LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 09-16-2003, 12:08 PM   #1
tuka
Member
 
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 30

Rep: Reputation: 15
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
 
Old 09-16-2003, 12:11 PM   #2
WiZaC
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: FreeBSD
Posts: 110

Rep: Reputation: 15
Do you have PHP installed?
 
Old 09-16-2003, 04:16 PM   #3
Booster
Member
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: Gentoo, Suse
Posts: 59

Rep: Reputation: 15
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
 
Old 09-16-2003, 05:53 PM   #4
tuka
Member
 
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 30

Original Poster
Rep: Reputation: 15
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,
 
Old 10-12-2003, 06:12 PM   #5
wright_pm
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Rep: Reputation: 0
I have similar problem..have you found a solution please?
 
Old 10-12-2003, 06:20 PM   #6
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
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.
 
Old 10-12-2003, 06:40 PM   #7
littis
LQ Newbie
 
Registered: Dec 2002
Location: usa
Distribution: LMDE
Posts: 22

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete files via php on Linux burnham Linux - Newbie 6 05-26-2005 08:56 AM
Firefox won't read .php files Lagg Linux - Software 1 05-06-2005 12:40 AM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
Upgraded PHP from 4.3.4 to 4.3.10 and now it won't read php.ini gregmcavoy Linux - Software 11 01-22-2005 12:16 PM
read php files, redhat 8.0 lenlutz Linux - Software 8 10-21-2003 12:20 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration