greenhornet Posted November 13, 2003 Share Posted November 13, 2003 Hi There, I am running one server with PHP 4.1 and Apache 1.3, in this server there are a number of old html files that have some <?PHP ... ?> scripts in them. These were parsed by PHP fine, as well as all the regular .php files. The following lines are the in Apache 1.3 httpd.conf *snip* <IfModule mod_dir.c> DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi </IfModule> <IfModule mod_php4.c> AddType application/x-httpd-php .php .php4 .php3 .phtml .html .htm AddType application/x-httpd-php-source .phps </IfModule> *end snip* Now I am trying to move these websites to a mew server running Apache 2.0 and PHP 4.2, with the following in /etc/httpd/conf.d/php.conf *snip* <Files *.php> SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 524288 </Files> DirectoryIndex index.php index.php3 index.php4 *end snip* and the following in /etc/httpd/conf/httpd.conf; AddType application/x-httpd-php .html .htm I\'m a little confused, this setup on Apache2 seems to break some things, like when a user gets a 404 error it downloads an empty file with the same name as the bogus file they had in the URL? What is the proper way to setup PHP 4.2 (or 4.3) with Apache 2.0??? This will be on a Red Hat 9.0 server with PHP + Apache installed from RPMs. Thanks heaps for your help guys, I love the way this site is focused on PHP hosting and development, I\'ll be spending a lot more time here!! Quote Link to comment https://forums.phpfreaks.com/topic/1353-apache-2-setup-for-parsing-html-files-with-php-content/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.