Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache unable to parse PHP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Tue Jan 18, 2005 4:50 pm    Post subject: apache unable to parse PHP Reply with quote

Well, I've searched the forum and can't seam to get this fixed.

I've added this in apaches.conf

LoadModule php4_module extramodules/libphp4.so


I haven't changed anything else that I can think of. made sure to env-update (even rebooted a few times) but still I get the code instead of the parsed results.

Any idea?

site: http://www.madchaz.com

edit: I know the code's hugly. Going to work on that once I got the server working.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.


Last edited by madchaz on Wed Jan 19, 2005 3:01 pm; edited 2 times in total
Back to top
View user's profile Send private message
RudyG
n00b
n00b


Joined: 25 Feb 2004
Posts: 32

PostPosted: Tue Jan 18, 2005 8:00 pm    Post subject: Reply with quote

did you make sure to add "-D PHP4" to the /etc/conf.d/apache file under the APACHE_OPTS config variable?

Everyone forgets that :D
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Wed Jan 19, 2005 2:56 pm    Post subject: Reply with quote

RudyG wrote:
did you make sure to add "-D PHP4" to the /etc/conf.d/apache file under the APACHE_OPTS config variable?

Everyone forgets that :D


DOH!!!!!!!!! :oops:

Ok, that was one stupid mistake. Thanks for pointing it out. Glad to know everyone forgets however, hehehe
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Wed Jan 19, 2005 3:01 pm    Post subject: Reply with quote

ARG!!!
ok, now PHP parses but won't process the variables.

To see what I mean, go to www.madchaz.com

the links should give dif sections but all show the main page
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Wed Jan 19, 2005 3:34 pm    Post subject: Reply with quote

OK, I got it working again.

I had to set the following in php.ini for it to start working again.

Code:
register_globals = on


I'm not sure how I can modify my script so it won't need global vars for arguments passed via the URL however.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
Back to top
View user's profile Send private message
RudyG
n00b
n00b


Joined: 25 Feb 2004
Posts: 32

PostPosted: Wed Jan 19, 2005 5:35 pm    Post subject: Reply with quote

i'd have to see your code to know what you're talking about exactly. Usually they are available as $_GET['varname'] variables.
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Wed Jan 19, 2005 6:13 pm    Post subject: Reply with quote

RudyG wrote:
i'd have to see your code to know what you're talking about exactly. Usually they are available as $_GET['varname'] variables.


thanks for that. Guess that was still on by default last I had done PHP.

I was able to turn it off and use $_GET['variable'] to get the values.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
Back to top
View user's profile Send private message
RudyG
n00b
n00b


Joined: 25 Feb 2004
Posts: 32

PostPosted: Mon Jan 24, 2005 5:03 am    Post subject: Reply with quote

overall, using $_GET or $_POST is a better way of doing things anyway.
Back to top
View user's profile Send private message
morphal
Apprentice
Apprentice


Joined: 17 Feb 2005
Posts: 183
Location: Houston

PostPosted: Fri Jan 06, 2006 12:07 am    Post subject: Reply with quote

Keeping register_globals = off is a security precaution. Keep it off and use a bit of code something like this to do things the "proper" way ... (as proper as things get with new languages, new versions, differences of opinion, your specific use, etc. )

Code:
$varName = $_REQUEST["varName"];


If the action of your form is set to script.php then you'd include that line of code in script.php.

The moral of the story is that keeping register_globals = off is good. How you work around it is up to you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
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