mat11 Posted November 14, 2007 Share Posted November 14, 2007 Hi i loaded apache 1.3.24 and php 4.3.2 into my drive D i made the following changes in the httpd.conf file i had set while installing php,the following location for storing my PHP files D:/php/projects So i made this change in DocumentRoot "D:/php/projects" <Directory "D:/php/projects"> ScriptAlias /php/ "D:/php/" AddType application/x-httpd .php AddType application/x-httpd-php "/php/php.exe" AddType application/x-httpd-php-source .phps AddType application/x-tar .tgz LoadModule php4_module "d:/php/sapi/php4apache2.dll->1033 But when i starrt my apache, it displays the following error message-> Syntax error on line 1033 of d:/apache group/apache/conf/httpd.conf: Cannot load d:/php/sapi/php4apache2.dll into server: (1157) One of the library f iles needed to run this application cannot be found now wen i remove LoadModule php4_module "d:/php/sapi/php4apache2.dll and put it in the load module lines with # and run the apache,it doesnt giv any error,but wen i try to test my test.php, the browser displays a pop up window saying : you are downloading file from test.php would u like to save,open... wen i click open,it jus keeps loopin n loopin by displayin the same pop up... Wat did i do wrong? is it in my http.conf file?? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 14, 2007 Share Posted November 14, 2007 Just adding the following few lines should be sufficient: Add the following line at the end of the LoadModules list (do not add a # at the start of the line (lines starting with a # are considered comments and are ignored)) LoadModule php4_module "D:/php/sapi/php4apache2.dll" Scroll down and add the following few lines near the AddType's AddType application/x-httpd .php AddType application/x-httpd-php-source .phps No need to apply a script alias if you are loading PHP as an Apache Module. Quote Link to comment Share on other sites More sharing options...
mat11 Posted November 14, 2007 Author Share Posted November 14, 2007 i did wat u said, but there's something wrong in wat i'm doing. After tyrpin the loadmodule, n starting the apache, it gives the error that it cannot load and that one of lib fxn needed to run it,cant be found??? which lib file?? i checked my error log file and it says..[error] [client 127.0.0.1] no acceptable variant: d:/apache group/apache/htdocs/index.html Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 14, 2007 Share Posted November 14, 2007 Hold on, You are using Apache1.3.x however you are trying to load an Apache module called php4Apache2.dll That module is for use with Apache2.0.x only. You should be loading php4apache.dll. Your LoadModule line should be: LoadModule php4_module "D:/php/sapi/php4apache.dll" Quote Link to comment Share on other sites More sharing options...
mat11 Posted November 14, 2007 Author Share Posted November 14, 2007 yes dat was it..well the error has gone.. but my test.php aint working..i type in the browser,http://localhost it then displays,an index html,and shows my test.php. On clicking it,the browser displays a pop up window saying : you are downloading file from test.php would u like to save,open... wen i click open,it jus keeps loopin n loopin by displayin the same pop up...wats wrong? is it cos of the config setting?? Quote Link to comment 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.