glenelkins Posted January 11, 2007 Share Posted January 11, 2007 HiI have installed apache 2.2x and it works fine. I unzipped the php installation and added the following to httpd.conf (Running Windows 2003)[code]LoadModule php4_module "c:\php\php4apache2.dll"AddType application/x-httpd-php .phpPHPIniDir "C:\php\"[/code]my php is installed at c:\php with php.ini in this folder. I have added php to the windows path. Restarted the server and now apache wont start. I don't get this, all the files are there (including php4apache2.dll) but the above code taken out lets apache start...whats going on?? Iv even tried changing "\" to "/" and still no luckI followed the instructions to the letterOh and I also added the doc_root to php.ini Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 11, 2007 Share Posted January 11, 2007 I don't think PHP4 is not compatible with Apache2.2.x. The Apache module that comes with PHP4 is only compatible with Apache2.0.x. This is because Apache2.2.x now handles modules differently compared to Apache2.0.x.Try the latests CVS version of PHP4, or downgrade Apache to 2.0.x instead. Before you do that there may be a a third party Apache2.2.x module for PHP4 at apachelounge.comEDIT: Yeah, there is a third party apache2.2.x available [url=http://www.apachelounge.com/download/mods/php4apache2.dll-php4.4.x.zip]here[/url]. Download the zip and extract the module overwriting the existing apache2.0.x module. Quote Link to comment Share on other sites More sharing options...
wamasterhunter Posted January 18, 2007 Share Posted January 18, 2007 I am having the same problem, except I have php5 and Apache 2.2. Here is what I wrote: LoadModule php5_module c:/php5/php5apache2.dll I even went and checked to see if that was the right address and it was. But when I try to start apache it says I have an error and referrs me to this line. ??? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 19, 2007 Share Posted January 19, 2007 [quote author=wamasterhunter link=topic=121968.msg508190#msg508190 date=1169161402]I am having the same problem, except I have php5 and Apache 2.2. Here is what I wrote: LoadModule php5_module c:/php5/php5apache2.dll I even went and checked to see if that was the right address and it was. But when I try to start apache it says I have an error and referrs me to this line. ???[/quote]If you have PHP5.2 use php5apache2_2.dll instead this is the Apache2.2.x module. php5apache2.dll is the APache2.0.x module and php5apache.dll is the APache1.3.x module. Quote Link to comment Share on other sites More sharing options...
lional Posted January 23, 2007 Share Posted January 23, 2007 Hi AllI am having the same problem with apache 2.2.4 and php5.2 I have added the following into the httpd.conf but still no joy.LoadModule php5_module c:/Program Files/PHP5/php5apache2_2.dllAddType application/x-httpd-php .phpAction Application/x-httpd-php "/PHP5/php.exe"Can anybody helpThanksLional Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 24, 2007 Share Posted January 24, 2007 remove the Action line:Action Application/x-httpd-php "/PHP5/php.exe"not needed. I believe that's only needed if you load PHP as cgi. But you are loading PHP as a module - recommended.Also try not to install Apache or PHP in the the program files folder. I prefer to install Apache, PHP, MySQL and anything else relating to them in a folder called server in the root of my hard drive. Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 25, 2007 Share Posted January 25, 2007 I dont think apache 2.2 is that stable yet. Especially the windows version. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 25, 2007 Share Posted January 25, 2007 [quote author=andrewholway link=topic=121968.msg513157#msg513157 date=1169731695]I dont think apache 2.2 is that stable yet. Especially the windows version.[/quote]WHat you talking about! It is stable. It just you need to use the correct module for the version of PHP you are using! A lot of people have got confused over this when upgrading to Apache2.2.xThis is what the different modules are for:php5apache2_2.dll - for use with PHP5.2 (or above) and Apache2.2.xphp5apache2.dll - for use with PHP5.x and Apache2.0.x (NOT for Apache2.2.x!)php5apache.dll - for use with PHP5 and Apache1.3.x Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 25, 2007 Share Posted January 25, 2007 I'll get me coat.Unstable was the wrong term to use. In my albeit limited experiance playing with it. I have found it, as yet not very well understood be the forum community. Personally I shall be waiting a few months before I have the balls to upgrade.Andy Quote Link to comment Share on other sites More sharing options...
irken Posted January 28, 2007 Share Posted January 28, 2007 If you download the MSI installer for PHP (5?), it will configure Apache for you. It includes some modules, but you can download the others seperate and extract. Quote Link to comment Share on other sites More sharing options...
LegosJedi Posted February 1, 2007 Share Posted February 1, 2007 Okay, sorry for a little bump, but I don't know how to restart Apache. I've looked through tuts, articles, everything, but they aren't descriptive enough. Where am I supposed to type in these commands to stop and restart it? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 1, 2007 Share Posted February 1, 2007 If you are on Windows look for the Apache taskbar icon (lower right hand corner of screen). The icon has a green triangle inside a white circle which a pink/purple feather sticking out of it. Left click the icon select Apache2 from the list and select restart.Or you can go the long route and go to Start > All Programs > Apache HTTP Server 2.x..x > Control Apache Server > RestartIf you are on *unix then you need to do it via command prompt. Look at the Apache documentation for the correct command for restart Apache server on *nix based systems. http://httpd.apache.org for documentation Quote Link to comment Share on other sites More sharing options...
LegosJedi Posted February 1, 2007 Share Posted February 1, 2007 Oh. Okay, thanks. Now, I run the universal PHP test file, but all it shows is the actual PHP coding. Would this be a problem with my php.ini file, or the httpd.conf file? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 1, 2007 Share Posted February 1, 2007 What do you mean universal PHP test file? Are you going to http://localhost to run the php file? If you are and are just getting source code then Apache isn't configured correctly. How have you configured Apache? Quote Link to comment Share on other sites More sharing options...
lional Posted February 2, 2007 Share Posted February 2, 2007 HI all,I went to wampserver.com and downloaded the latest version, and it works perfectly. What could be easier.ThanksLional Quote Link to comment Share on other sites More sharing options...
LegosJedi Posted February 2, 2007 Share Posted February 2, 2007 I did all I thought I was supposed to. I added the PHP File types, and the path to the php.ini directory. Was there anything else I was supposed to do? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 2, 2007 Share Posted February 2, 2007 Did you add PHP as an Apache module? If yoiu didnt then APache is not configured correctly. Add this line to httpd.conf:[code]LoadModule php5_module "C:/php/php5apache2.dll"[/code]NOTE:change C:/php to the correct path to where PHP is installed. Also change php5apache2.dll to php5pache2_2.dll if you have installed Apache2.2.xafter:[code]#LoadModule ssl_module modules/mod_ssl.so[/code]Save the httpd.conf and restart Apache server. Quote Link to comment Share on other sites More sharing options...
LegosJedi Posted February 2, 2007 Share Posted February 2, 2007 Yeah, I did that too. Hmmm, let me try restarting Apache again.EDIT: There we go. It's working now. Thanks! 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.