LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2 and PHP5 (https://www.linuxquestions.org/questions/linux-software-2/apache2-and-php5-368529/)

SpiderIRE 09-30-2005 01:52 PM

Apache2 and PHP5
 
I need some help! installed Apache with no problems and can start it just fine! installed PHP with the standard ./configure, make, make install (and i'm pretty sure it installed alright)!

I am running Fedora Core 3 and placed a PHP test file into the directory /usr/local/apache2/htdocs/ the code is fine, but when i go to that file in a web browser and try to execute it, instead of running the file through PHP it simple displays the code from the phptest.php file in the browser!

i've read some places that i have to edit the httpd.conf file to point to the PHP parser or something......???? i need help so any ideas??

Thanks in advance!
-David

Mega Man X 09-30-2005 01:56 PM

If you are 100% sure the php-code is not flawed (would not hurt posting it here though ;)), I would advice you to look at your apache.conf or http.conf (it could be at /etc/apache/ or /etc/httpd.conf... if you are not sure which file it is, try searching for it with find. Might take a while, but I'd start at etc if I was you.e.g: find /etc -name apache.conf).

Once you've found that file, search for "DirectoryIndex" and make sure to place index.php in the front of the other extensions.

Regards!

SpiderIRE 09-30-2005 02:04 PM

alrighty the code:

<html>
<head>
<title> blah, blah </title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

simple! and as for those files-didn't find them! :( there isn't even a directory in /etc called apache........??? any more ideas??

Thanks,
David

EDIT:found the httpd.conf file in /usr/local/apache2/conf/
and also, where would PHP install by default?

SpiderIRE 09-30-2005 03:25 PM

so i did some searching around and it turns out i don't have this libphp*.so file! anyone wanna guess why not?? seriously though-i need help fast with this thing!

for both Apache and PHP all i did was:

tar zxvf filename.tar
./configure
make
make install

and it didn't throw up an error of any kind! apache will start fine, but it won't recognise PHP and i don't have the libphp*.so file! that's basically an update to everything!!

Thanks!!


All times are GMT -5. The time now is 11:33 AM.