PHP unable to read .php files
I am having some trouble configuring my httpd.conf file to understand .php file extensions.
Two refrences I am using suggest 2 methods of which I have tried without result. For both I need to insert this in the httpd.conf file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
The resul I get whenever I try to load up phpinfo.php from localhost is:
You have chosen to download a file of type :
application/x-httpd-php from httpd://localhost/
What should mozilla do with this file ?
How do I solve this ?
The file is in /htdoc - the apache document root and I am using apache 2.0.17 I did not compile with loadable module support.
Thanks for any help on this...
Do you have PHP installed?
Maybe try tring "XBitHack" on in httpdcof, as follows:
Then make the php file executable (ie:chmod 755 blah.php), worked for me. ;
I have been reviewing my installation of PHP and I think I did not install it right....I think that is my issue it was not installed right in the first place. Sorry there was no other way to test it except for a test.php file...
I am now trying to install a static module...still working at it.. will need some time to check a few things... I tried a dynamic DSO loadable module. But I cant compile it. I get the following (down below) as I was trying to compile a php loadable module for apache 2.0
I have installed and apxs too (although I do not know how to verify the version - would anyone know ?) My Apache 2.0 has DSO support. Basically I followed the steps given in the PHP INSTALL file for DSO install.
My config is thus:
./configure --prefix=/usr/local/php --with-xml --with-curl=/usr/bin --enable-shared-pdflib --enable-track-vars --enable-magic-quotes --with-gd=shared,/usr/lib --enable-safe-mode --with-exec-dir=/usr/bin --enable-ftp --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
which runs OK however my make hicups with this error (last 4 lines):
-lz -lssl -lcrypto -lcrypt -lcrypt -o libphp4.la
ext/ctype/ctype.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
Any suggestion of what is wrong?
I will keep working on the static version unless I replies soon.
If you have your compile scripts and step in making your apache compile into PHP version that would be helpful....
I have similar problem..have you found a solution please?
try installing "apt-get" for redhat and then "synaptic" which is a front end for apt-get.
you can then install apache (httpd), mysql and php all at the same time. just did so the other day. words fine.
For a dynamic php module you need to have mod_so running with apache. It does not install with the module by default (I believe...been awhile) so when installing apache type ./configure --enable-module=so. You should then be able to follow the php install for dynamic and everything should go smoothly.
|All times are GMT -5. The time now is 12:44 PM.|