Visit Jeremy's Blog.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 08-02-2006, 02:58 PM   #1
Registered: Jan 2006
Distribution: RHEL3
Posts: 97

Rep: Reputation: 15
PHP5 on Apache saving .php files

I've been working for weeks to get the right configuration and was beating my brains in to get the httpd.conf file to stop reporting errors when upgrading from PHP4 (4.4.2) to PHP5 (5.1.4). Finally I found a good resource and successfully can stop and start the server with the PHP 5 configuration in place.

And now nothing which runs php works at all. Instead of loading up the expected pages, I am prompted to save the .php file (Firefox) and on a Windows machine in IE it simply loads a "Page cannot be displayed" message.

Here are the notable lines from my httpd.conf file regarding php:

LoadModule php5_module /usr/lib/httpd/modules/
AddHandler php5-script php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType text/html .php
Yes, the httpd.conf file is the correct one.

I've seen the .phps line written with or without the "." and I have tried both ways.

I have seen this noed on a couple of other posts here and there with possible resolutions? Not really sure or if the issue was simply dropped.
Old 08-03-2006, 07:56 AM   #2
Registered: Jun 2006
Distribution: messed up debian
Posts: 250

Rep: Reputation: 30
I run php5 with no problems, try ### all the lines but this

LoadModule php5_module /usr/lib/httpd/modules/

and restart apache. Should work. By the way I assume is in the correct folder.
Old 08-03-2006, 08:25 AM   #3
Registered: Jan 2006
Distribution: RHEL3
Posts: 97

Original Poster
Rep: Reputation: 15
For the couple months I have been fighting these issues, you bet...

I upgraded my version of apache to 2.2.3 and it appears to be working now. Evidently there are some issues (notably unpublished issues) with 2.0.46. Now I just have to rectify a MySQL issue with connectivity to my database.


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
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
Apache doesn't execute PHP files? dbc001 Linux - Software 2 01-28-2006 02:29 PM
php files errors on apache - sometimes amimusa Debian 1 04-07-2005 12:52 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
writing files on to apache with php djgerbavore Programming 12 11-15-2004 02:01 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 03:40 PM.

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