Jump to content

Install/configure problems with PHP/Apache on CentOS 4.4


Recommended Posts

Hey all,

I have php-4.3.9-3.22 with Apache(httpd) 2.0.52-28.ent.centos4 on CentOS4.4. Both of these were included in the OS install. When I open a .php file, at first it was just the garbled code showing up in the browser, now the browser says "The file install.php is of type application/x-httpd-php, and seamonkey does not know how to handle this file. I need to install dokuwiki, and I can't because of this setback.

Here are the changes I've made so far.

In [b]/etc/httpd/conf/httpd.conf[/b], added:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "/etc/httpd/conf"

This is what's in the [b]/etc/httpd/conf.d/php.conf[/b] file (called by httpd.conf):

# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
<Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
        LimitRequestBody 9524288
</Files>

AddType application/x-x509-ca-cert .crt
AddType application/x-httpd-php-source .phps

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php


I have also copied the php.ini file from /etc to /etc/httpd/conf. Am I missing something?? I am really stuck, and would appreciate any help!
Thanks,
Mike


Link to comment
Share on other sites


Ok, I uninstalled the PHP and Apache I had and installed php 5.2 and apache 2.2.3. Both seem to be working now, but when I try to locally open a php file (install.php for dokuWiki), I get a message from Seamonkey stating that it is of type application/x-httpd-php and does not know what to do with it, and to manually choose a program to open this file.



Any ideas?



Thanks all.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.