View previous topic :: View next topic |
Author |
Message |
madchaz l33t


Joined: 01 Jul 2003 Posts: 995 Location: Quebec, Canada
|
Posted: Tue Jan 18, 2005 4:50 pm Post subject: apache unable to parse PHP |
|
|
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 |
|
 |
RudyG n00b

Joined: 25 Feb 2004 Posts: 32
|
Posted: Tue Jan 18, 2005 8:00 pm Post subject: |
|
|
did you make sure to add "-D PHP4" to the /etc/conf.d/apache file under the APACHE_OPTS config variable?
Everyone forgets that  |
|
Back to top |
|
 |
madchaz l33t


Joined: 01 Jul 2003 Posts: 995 Location: Quebec, Canada
|
Posted: Wed Jan 19, 2005 2:56 pm Post subject: |
|
|
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  |
DOH!!!!!!!!!
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 |
|
 |
madchaz l33t


Joined: 01 Jul 2003 Posts: 995 Location: Quebec, Canada
|
Posted: Wed Jan 19, 2005 3:01 pm Post subject: |
|
|
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 |
|
 |
madchaz l33t


Joined: 01 Jul 2003 Posts: 995 Location: Quebec, Canada
|
Posted: Wed Jan 19, 2005 3:34 pm Post subject: |
|
|
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 |
|
 |
RudyG n00b

Joined: 25 Feb 2004 Posts: 32
|
Posted: Wed Jan 19, 2005 5:35 pm Post subject: |
|
|
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 |
|
 |
madchaz l33t


Joined: 01 Jul 2003 Posts: 995 Location: Quebec, Canada
|
Posted: Wed Jan 19, 2005 6:13 pm Post subject: |
|
|
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 |
|
 |
RudyG n00b

Joined: 25 Feb 2004 Posts: 32
|
Posted: Mon Jan 24, 2005 5:03 am Post subject: |
|
|
overall, using $_GET or $_POST is a better way of doing things anyway. |
|
Back to top |
|
 |
morphal Apprentice

Joined: 17 Feb 2005 Posts: 183 Location: Houston
|
Posted: Fri Jan 06, 2006 12:07 am Post subject: |
|
|
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 |
|
 |
|