You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Wee Keat <we...@visualdensity.com> on 2003/01/31 05:07:52 UTC

[users@httpd] Unable to Restart Apache after Adding PHP Module

Hi all,

Please help me with this problem. I'm an absolute newbie in using Apache.
This is my first time.

/* My System */
Windows XP
PHP 4.3.0
Apache 2.0.43


I'm trying to setup Apache server with PHP 4.3.0 as module.

Here's what I've done:

With PHP... I have extracted them to C:\php\   I then have the php4ts.dll
file along with all other dlls copied to C:\windows\system32 (the dlls are
also in the original php folder - to be safe). Then as usual... php.ini (the
dist version) into C:\windows\

Now the apache... pretty easy setup... installed using the MSI version...
setup... "localhost" for both domain and servername and
webmaster@localhost.com. Nothing special. After installing, everything went
fine. The server was up...  and running smoothly with all the htmls.

Now ... the problem... I was following this tutorial on how to setup PHP as
a module in a few articles from sitewizard.com, devarticles.com and
php.net... all of them says just add this:

/* From Devarticles and The sitewizard.com */

LoadModule php4_module c:/php/sapi/php4apache2.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

/* From php.net */

LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php

I first tried the one from devarticles and the site wizard..... adding the
LoadModule, AddModule and AddType to the end of httpd.conf file. When I
restarted the Apache webserver, it could not restart. It just said "The
Requested Operation Failed".

I then tried just the LoadModule and AddType as instructed in php.net. The
same problem occurred. I could not restart the Apache server. It also just
said "The Requested Operation Failed". I tried to check the error logs...
but it does not seem to record a lot of things that I could understand.. the
only thing that I can find on errors are somewhere along these lines:

/* The errors from log */

[Fri Jan 31 11:57:23 2003] [notice] Parent: Received restart signal --
Restarting the server.
[Fri Jan 31 11:57:23 2003] [notice] Child 2540: Exit event signaled. Child
process is ending.
[Fri Jan 31 11:57:23 2003] [warn] (720995)The I/O operation has been aborted
because of either a thread exit or an application request.  : winnt_accept:
Asynchronous AcceptEx failed.
[Fri Jan 31 11:57:24 2003] [notice] Child 2540: Released the start mutex
[Fri Jan 31 11:57:25 2003] [notice] Child 2540: Waiting for 250 worker
threads to exit.
[Fri Jan 31 11:57:25 2003] [notice] Child 2540: All worker threads have
exited.
[Fri Jan 31 11:57:25 2003] [notice] Child 2540: Child process is exiting

/* end */

But everytime I take the lines in the above off (the AddModules, LoadModules
& AddType),
Apache can be restarted without problems at all.

Can anyone please help me with this? I'm really at a dead end here. I tried
searching for tutorials and resources... but all of them seems so simple...
BUT I just can't seem to get this simple setup right.

Please provide me with some guidance. Did I setup Apache wrongly or the PHP
wrongly? Or did I forgot to do something?

Any help will be deeply appreciated.


Thank you all in advance.


Yours,
Wee Keat Chin
------------------------------------------------
"I think, therefore I am" - Descartes




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Unable to Restart Apache after Adding PHP Module

Posted by Wee Keat <we...@visualdensity.com>.
Hi Jeff..!!

Thank you for your prompt reply!


>Copy the file from c:\php\sapi\php2apache2.dll to
>c:\php\sapi\php2apache2.dll and it should work.

Errr.... I don't really see the difference between the two paths... Can you
please point that out to me again?

Thanks a lot again. Really appreciate it.

>All the best,
>Jeff Cohen

Yours,

Wee Keat Chin




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Unable to Restart Apache after Adding PHP Module

Posted by "J. Greenlees" <ja...@shaw.ca>.

Wee Keat wrote:
> Hi Jeff..!!
> 
> Thank you for your prompt reply!
> 
> 
> 
>>Copy the file from c:\php\sapi\php2apache2.dll to
>>c:\php\sapi\php2apache2.dll and it should work.
> 
> 
> Errr.... I don't really see the difference between the two paths... Can you
> please point that out to me again?
> 
> my php4.apache2.dll is in my c:\php\sapi\ folder.
> 
> Thanks a lot again. Really appreciate it.
> 
> 
>>All the best,
>>Jeff Cohen
> 
> 
> Yours,
> 
> Wee Keat Chin

well maybe if you:

Copy the file from c:\php\sapi\php2apache2.dll to
the folder in apache with all the modules in it.
c:\path\to\apache\modules\on\win\hexp\
(where you are working as system administrator, not regular user to have 
as service )
then edit your httpd.conf so the addmodule/loadmodule/ifmodule/ifdefine 
(which ever one's you use for your system )shows the new path.
instead of apache wandering off to the php folder looking for the dll it 
will find it with the rest in the apache folder structure, less likely 
to cause conflicts.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Unable to Restart Apache after Adding PHP Module

Posted by Jeff Cohen <ap...@gej-it.com>.
Copy the file from c:\php\sapi\php2apache2.dll to c:\php\ folder.
Jeff Cohen
> -----Original Message-----
> From: Wee Keat [mailto:weekeat@visualdensity.com]
> Sent: Thursday, January 30, 2003 11:48 PM
> To: Apache
> Subject: Re: [users@httpd] Unable to Restart Apache after Adding PHP
> Module
> 
> Hi Jeff..!!
> 
> Thank you for your prompt reply!
> 
> 
> >Copy the file from c:\php\sapi\php2apache2.dll to
> >c:\php\sapi\php2apache2.dll and it should work.
> 
> Errr.... I don't really see the difference between the two paths... Can
> you
> please point that out to me again?
> 
> my php4.apache2.dll is in my c:\php\sapi\ folder.
> 
> Thanks a lot again. Really appreciate it.
> 
> >All the best,
> >Jeff Cohen
> 
> Yours,
> 
> Wee Keat Chin
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Unable to Restart Apache after Adding PHP Module

Posted by Wee Keat <we...@visualdensity.com>.
Hi Jeff..!!

Thank you for your prompt reply!


>Copy the file from c:\php\sapi\php2apache2.dll to
>c:\php\sapi\php2apache2.dll and it should work.

Errr.... I don't really see the difference between the two paths... Can you
please point that out to me again?

my php4.apache2.dll is in my c:\php\sapi\ folder.

Thanks a lot again. Really appreciate it.

>All the best,
>Jeff Cohen

Yours,

Wee Keat Chin





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Unable to Restart Apache after Adding PHP Module

Posted by Jeff Cohen <ap...@gej-it.com>.
Copy the file from c:\php\sapi\php2apache2.dll to
c:\php\sapi\php2apache2.dll and it should work.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Wee Keat [mailto:weekeat@visualdensity.com]
> Sent: Thursday, January 30, 2003 11:08 PM
> To: Apache
> Subject: [users@httpd] Unable to Restart Apache after Adding PHP Module
> 
> Hi all,
> 
> Please help me with this problem. I'm an absolute newbie in using Apache.
> This is my first time.
> 
> /* My System */
> Windows XP
> PHP 4.3.0
> Apache 2.0.43
> 
> 
> I'm trying to setup Apache server with PHP 4.3.0 as module.
> 
> Here's what I've done:
> 
> With PHP... I have extracted them to C:\php\   I then have the php4ts.dll
> file along with all other dlls copied to C:\windows\system32 (the dlls are
> also in the original php folder - to be safe). Then as usual... php.ini
> (the
> dist version) into C:\windows\
> 
> Now the apache... pretty easy setup... installed using the MSI version...
> setup... "localhost" for both domain and servername and
> webmaster@localhost.com. Nothing special. After installing, everything
> went
> fine. The server was up...  and running smoothly with all the htmls.
> 
> Now ... the problem... I was following this tutorial on how to setup PHP
> as
> a module in a few articles from sitewizard.com, devarticles.com and
> php.net... all of them says just add this:
> 
> /* From Devarticles and The sitewizard.com */
> 
> LoadModule php4_module c:/php/sapi/php4apache2.dll
> AddModule mod_php4.c
> AddType application/x-httpd-php .php
> 
> /* From php.net */
> 
> LoadModule php4_module c:/php/sapi/php4apache2.dll
> AddType application/x-httpd-php .php
> 
> I first tried the one from devarticles and the site wizard..... adding the
> LoadModule, AddModule and AddType to the end of httpd.conf file. When I
> restarted the Apache webserver, it could not restart. It just said "The
> Requested Operation Failed".
> 
> I then tried just the LoadModule and AddType as instructed in php.net. The
> same problem occurred. I could not restart the Apache server. It also just
> said "The Requested Operation Failed". I tried to check the error logs...
> but it does not seem to record a lot of things that I could understand..
> the
> only thing that I can find on errors are somewhere along these lines:
> 
> /* The errors from log */
> 
> [Fri Jan 31 11:57:23 2003] [notice] Parent: Received restart signal --
> Restarting the server.
> [Fri Jan 31 11:57:23 2003] [notice] Child 2540: Exit event signaled. Child
> process is ending.
> [Fri Jan 31 11:57:23 2003] [warn] (720995)The I/O operation has been
> aborted
> because of either a thread exit or an application request.  :
> winnt_accept:
> Asynchronous AcceptEx failed.
> [Fri Jan 31 11:57:24 2003] [notice] Child 2540: Released the start mutex
> [Fri Jan 31 11:57:25 2003] [notice] Child 2540: Waiting for 250 worker
> threads to exit.
> [Fri Jan 31 11:57:25 2003] [notice] Child 2540: All worker threads have
> exited.
> [Fri Jan 31 11:57:25 2003] [notice] Child 2540: Child process is exiting
> 
> /* end */
> 
> But everytime I take the lines in the above off (the AddModules,
> LoadModules
> & AddType),
> Apache can be restarted without problems at all.
> 
> Can anyone please help me with this? I'm really at a dead end here. I
> tried
> searching for tutorials and resources... but all of them seems so
> simple...
> BUT I just can't seem to get this simple setup right.
> 
> Please provide me with some guidance. Did I setup Apache wrongly or the
> PHP
> wrongly? Or did I forgot to do something?
> 
> Any help will be deeply appreciated.
> 
> 
> Thank you all in advance.
> 
> 
> Yours,
> Wee Keat Chin
> ------------------------------------------------
> "I think, therefore I am" - Descartes
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org