andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


globals off

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> FAQ Manager
View previous topic :: View next topic  
Author Message
wolfryder
Newbie


Joined: 19 Feb 2003
Posts: 3

PostPosted: Wed Feb 19, 2003 3:01 pm    Post subject: globals off Reply with quote

I followed the instructions (I thought) about using the class.faqmanager.php with globals off.

I found the places to replace with $_GET

It connects to the database because the questions and catagories are there, but the links, when clicked, won't load the answers.

Any suggestions?
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Thu Feb 20, 2003 8:16 am    Post subject: Reply with quote

Hi there,

When you changed to the '$_GET' option I imagined you did it on this line:

Code:

        $this->gpcVars = $HTTP_GET_VARS;  // could use $_GET in 4.1.0


to make it look like:

Code:

        $this->gpcVars = $_GET;


If so, then check out the line below that - it should look like:

Code:

        $this->_self   = $PHP_SELF;


Try changing the $PHP_SELF to $_SERVER['PHP_SELF'] and see what that does for you.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
wolfryder
Newbie


Joined: 19 Feb 2003
Posts: 3

PostPosted: Fri Feb 21, 2003 10:00 am    Post subject: Reply with quote

Okay, I changed the $HTTP_GET_VARS to $_GET and $PHP_SELF to $_SERVER['PHP_SELF'] and even altered the

global $HTTP_GET_VARS,$PHP_SELF;

to

global $_GET,$_SERVER;

and

global $_GET,$_SERVER['PHP_SELF']

and even commented the entire thing out. Still no luck. I know it can see the database because the catagories are there and the questions, but clicking on the links doesn't display the answers.

I am using PHP 4.30 and Apache 1.3.27(whatever the newest one is before 2.0) and MySQL3.23XX (the one just below MySQL4)

I don't know what I'm missing Sad
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Sat Feb 22, 2003 11:00 am    Post subject: Reply with quote

Hmm.. I haven't tried this script with 4.3.0+, so it may be something to do with that, I'm not sure. Try this and see if the links are clickable:

Code:
$this->_self = "nameofscript.php";


In that you should give it the name of the file (and path, if needs be) that you are calling the script from. That way you should have a (semi) hard coded file name and it should give you a clickable link.

If you have this online somewhere where I could take a look at it, that's be great. (running and/or as a .phps file.)

Also, for the superglobals ($_GET. $_SERVER. etc.) you don't need to declare them as global, because they already are to any function.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
wolfryder
Newbie


Joined: 19 Feb 2003
Posts: 3

PostPosted: Mon Feb 24, 2003 11:35 am    Post subject: Reply with quote

well, that's 1/2 of it. I now get some response, but I think removing the variable confuses the page because it doesn't know where the reply is supposed to go. I get a "page not found" error message (which is more than I had been getting!)

I'd rather not put the IP of my machine up on a public forum. Can I reply to the email address I was sent to notify me of a reply here?

I really appreciate all the help you're giving me Smile

WolfRyder
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Mon Feb 24, 2003 7:13 pm    Post subject: Reply with quote

Hi,

I can understand about not wanting to make that information public. Just click on the 'pm' or 'email' graphic links against my name/posts so you can either private message me on here or email me.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> FAQ Manager All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group