hey all this is the scenario : i downloaded apache 1.3x (latest version), php4 (latest version), i wanted to install php using the static method. In Apache src directory (apache_1.3.14/) # ./configure --prefix=/usr/local/apache In PHP src directory (php-4.0.3pl1/) # ./configure --with-mysql \ --with-xml \ --enable-track-vars \ --with-apache=../apache_1.3.14 \ # make # make install In Apache src directory (apache_1.3.14) # ./configure --prefix=/usr/local/apache \ --enable-module=rewrite \ --activate-module=src/modules/php4/libphp4.a # make # make install now apache works fine, cgi scripts work as well. i added addtype application/x-httpd-php php to the httpd.conf , then i tested a script php after chmod 755 , i keep getting "(8) exec format error", next line "premature end of script headers" im using the phpinfo.php test file, <? phpinfo(); ?> help me out out please, thanks. jake
Can this help you? http://www.faqts.com/knowledge_base/view.phtml/aid/5605 Check httpd.conf within the <IfModule mod_mime.c> directive to make sure that: 1) You have: AddType application/x-httpd-php .php 2) You DON'T have .php listed here: AddHandler cgi-script .cgi You should also check to be sure that the php script is not in a directory listed in the ScriptsAlias section as there it will be executed as a normal unix script, instead it should be in a normal directory of web pages. (This took me rather a while to figure out.)
hey thanks dude thanks alot, the addtype directive was already there so i tried changing the directory and boom it worked! thanks sooo much i spent like 2 days researching that error jake