SSI.php and undefined function db_query

Started by SirPoonga, July 13, 2010, 03:01:45 PM

Previous topic - Next topic

SirPoonga

I am trying to get the username from a forum.  The host gave me a subdomain to make a project site.  I would like to use the sites forum for user identification.

The forum is on a subdomain called forum.thedomain.com.  My project is on controls.thedomain.com.  The physical paths on the server are in different locations.  I tried the simple code :

<?php
require_once('/www/html/forum.thedomain.com/SSI.php');
ssi_whosOnline();
?>


I get the following error:
Fatal error: Call to undefined function db_query() in /www/html/forum.thedomain.com/SSI.php on line 654

I assume this is a security/permission issue.  What am I missing?

Wynna


SirPoonga

I see what you are getting at.  The forum software on that site is SMF 1.1.11.  I looked around, I am not sure how to get the current user name from 1.1.11.  I take it I was doing the 2.0 method.

Kindred

???  huh?

is '/www/html/forum.thedomain.com/SSI.php' *REALLY* the **PATH** to the forum subdomain?

are subdomain independent cookies turned ON (and database driven sessions turned OFF) on the forum?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SirPoonga

According to the owner of the site

Use subdomain independent cookies: Off
Use database driven sessions: On

Kindred

well, you will probably need to switch those settings if you want it to work
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SirPoonga

#6
Wait, wouldn't that be the right way?  I don't think subdomain cookies would be appropriate since we are looking at a single login across subdomains.

Plus how does that fix db_query() not found?  I could see that affecting not getting the logged in user but not finding a function?

Kindred

subdomain INDEPENDENT cookies needs to be turned ON in order to use cookies ACROSS subdomains.

the error is probably related to some security across the subdomains on the host.

Check if your SSI file works correctly if run from the forum subdomain.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SirPoonga

ssi_examples.php works on the forum subdomain.  So turning on the subdomain cookies, how could that affect the other subdomains on the site?  I'd like to know before I suggest it to the owner.

Kindred

it won't affect the other subdomains at all, unless those subdomains are also making calls to the same forum SSI.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SirPoonga

Ok, thanks for the info.  I'll see if I can get that change made and what happens then.

If for some reason that doesn't work what would be my next step?  Make my own login system?

Kill Em All

I don't see SSI being a problem to be honest. Take a look at the SSI Readme

Let us know if you need any further assistance with this.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Advertisement: