LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP 4.2.2 and Apache 2.0.4 (https://www.linuxquestions.org/questions/programming-9/php-4-2-2-and-apache-2-0-4-a-79867/)

jm1389 08-07-2003 12:20 PM

PHP 4.2.2 and Apache 2.0.4
 
I have a Red Hat 9 box that I have recently setup. I am having a problem with PHP scripts. I recently setup IP Table Logger and everything is setup correctly and working with the exception of the the web part. I have PHP 4.2.2 Installed and at a command prompt where my php executable is I can type in "php -i" and I receive the html information page . However all of the PHP scripts for the iptable logger do not work. I already had to change the cgi.force.redirect in th php.ini file and that got me to an error that said "Premature end of script headers". Now the funny thing is that if I had the following line to the beginning of the script it will work for the text part of the html page, but not the graphics or pics.
#!/usr/bin/php

I have added
LoadModule php4_module modules/libphp4.so
&
DirectoryIndex index.php
&
application/x-httpd-php php
to my httpd.conf to no avail

Even with this added I can specify a path and it still doesn't detect the index.php file that I have. It just tels me that permission is denied for that directoy. However, I have apache running as the user apache and I made apache the owner of all files in /var/www/
Any insight or ideas would be greatly appreciated.

bandit 08-31-2003 05:29 AM

Sorry, no answer from me, as I am having a very similar problem: Currently unable to open any local PHP files running on apache.... (html files are served just fine)
If you (or anyone else) finds a solution to this, please le me know too: post reply here.

Thanks in advance

jm1389 08-31-2003 11:43 AM

PHP 4.2.2 and Apache 2.0.4
 
It has something to do with the permissions I think. All I did to get around the problem was move my PHP served pages into the /usr/share/web folder that I created and all php is now served fine. I never really had the time to research it as I needed the site up and running ASAP. Have fun !


All times are GMT -5. The time now is 08:50 AM.