I installed Apache2, PHP5, openssl, Mysql4.1 all from src(except MySql=>RPM). The problem I am having is with PHP ( well I think anyway ). When I start Apache it loads php without error, but when I point Firefox to localhost/test.php which contains

CODE:
<?php phpinfo(); ?>

,its displayed rather than executed.

Any Ideas, been beating my head for a two days with this. I am able to connect to mysql with out a problem also.

Thanks Demetri

What disto? You will need to add

APACHE2_OPTS="-D SSL -D PHP5"

to your apache2 conf. file.It is located in different places in different distro's.The above is for php and ssl support,that loads the modules when apache2 starts.

What disto? You will need to add

APACHE2_OPTS="-D SSL -D PHP5"

to your apache2 conf. file.It is located in different places in different distro's.The above is for php and ssl support,that loads the modules when apache2 starts.

Shoot, I am sorry. I am running Suse 9.1. Also I tried the code above and when started Apache with error. Something like "error on line #### misspelled or enabled in a module". Apache was installed /usr/local/apache2, php5 /usr/local/php5, and openssl /usr/local/lib. If this helps, when I point firefox to an url that does not exist I get the apache file not found error. The last line states "apache 2 mod_ssl openssl php5" thats not word for word. The MySql installation was done with the seperate RPM packages from mysql.com.

Did you add the .php extension and the php module into apaches config file

Yup did that. When I point firefox to http://localhost/phpinfo.php I am asked if i would like to download the file instead.

Dont get it LOLOL, must be something I am overlooking.

Thanks
Demetri

OK got it working. I had placed the AddType... statement at the wrong location. To correct the error, I placed it at the last line of the httpd.config file. All is well now.

Thanks for the help
Demetri

This article has been dead for over six months. Start a new discussion instead.