Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-16-2003, 12:08 PM
|
#1
|
Member
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 30
Rep:
|
PHP unable to read .php files
Hi all,
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:
Method 1:
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
Method 2:
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...
Tuka
|
|
|
09-16-2003, 12:11 PM
|
#2
|
Member
Registered: Sep 2003
Location: Denmark
Distribution: FreeBSD
Posts: 110
Rep:
|
Do you have PHP installed?
|
|
|
09-16-2003, 04:16 PM
|
#3
|
Member
Registered: Sep 2003
Location: Ontario, Canada
Distribution: Gentoo, Suse
Posts: 59
Rep:
|
tuka,
Maybe try tring "XBitHack" on in httpdcof, as follows:
<Directory />
Options FollowSymLinks
Options +Includes
XBitHack on
AllowOverride None
</Directory>
Then make the php file executable (ie:chmod 755 blah.php), worked for me. ;
Booster
|
|
|
09-16-2003, 05:53 PM
|
#4
|
Member
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 30
Original Poster
Rep:
|
Thanks guys,
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....
Thansk again,
|
|
|
10-12-2003, 06:12 PM
|
#5
|
LQ Newbie
Registered: Apr 2003
Posts: 9
Rep:
|
I have similar problem..have you found a solution please?
|
|
|
10-12-2003, 06:20 PM
|
#6
|
Senior Member
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Rep:
|
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.
|
|
|
10-12-2003, 06:40 PM
|
#7
|
LQ Newbie
Registered: Dec 2002
Location: usa
Distribution: LMDE
Posts: 22
Rep:
|
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.
Scott
|
|
|
All times are GMT -5. The time now is 03:13 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|