You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Listuser <li...@rogers.com> on 2003/01/16 18:06:32 UTC

[users@httpd] Apache 2.0.43 and PHP 4.3.0 on Windows - Problems

Hi All,

I've been having a heck of a time over the last few days with PHP, MySQL and
now Apache on Windows - they all work great on Linux, but hey, what do you
expect..

Anyway. I installed Apache and it worked fine, I then installed PHP and all
tests show it works fine - but when I try to get the PHP modules loaded for
Apache in httpd.conf, the Apache server won't start. The only error I get is
a Windows error box that says "The requested operation has failed". There is
nothing in the apache logs. If  I un-comment these lines - Apache will
start.

I have followed the instructions in the PHP help file which I have included
below, but have no idea where to go from here as I'm really not sure what
the problem is due to a lack of logs or errormessages letting me know where
to look next.

Any help is appreciated.

TIA

  Installing PHP for Apache as module
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Now that version 4.1 introduces a safer sapi module, we recommend
  that you configure PHP as a module in Apache.

  To accomplish this, you have to load the php4apache.dll in your
  Apache httpd.conf.

  !! NOTE !!
  Whereever you load php4apache.dll from, php4apache.dll also
  needs the php4ts.dll also included in the PHP4 distribution.
  php4apache.dll depends on php4ts.dll which is loaded as soon as
  Apache loads php4apache.dll. If php4ts.dll can't be found, you
  usually get an error like (also see the "Problems?" section at
  the end of the file):

    Cannot load c:/php/sapi/php4apache.dll into server

  So where does php4ts.dll has to be to be properly loaded ?
  php4ts.dll is searched in the following order:

  1) in the directory where apache.exe is start from
  2) in the directory where php4apache.dll is loaded from
  3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
     %SYSTEMROOT% directory.
     Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
  4) in your whole %PATH%

  Note: What is %SYSTEMROOT% ? Depending on your Windows
        installation this may be for example c:\winnt or C:\windows

  Usually you would just copy it over to %SYSTEMROOT%\System32.
  But if you want to have multiple PHP installations (for
  whatever reason) this is a bad idea. For this circumstance the
  safest thing is to let php4ts.dll reside in the same directory
  where php4apache.dll is loaded from (see point 2 above).


  After you've set up the file layout properly, you're ready to
  finally configure Apache to load the PHP4 module. Just add the
  following lines to your httpd.conf:

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

  Note: Especially newer versions of Apache do not need the
        AddModule directive anymore, your milage may vary.


  Where do I have to put the php.ini ?
   The php.ini files is only searched in two places:
   1) in your Apache installation directory (e.g. c:\apache\apache)
   2) in your %SYSTEMROOT% directory.



---------------------------------------------------------------------
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] Apache 2.0.43 and PHP 4.3.0 on Windows - Problems

Posted by Jeff Cohen <ap...@gej-it.com>.
I had the exact same problem, you never read the archives of this list, I
listed the solution for it already.
Just copy the php4apache2.dll file from the sapi directory to the PHP root
directory and you'll see it's all running.
Also, you would like to check the newest stable version from
http://snaps.php.net 

All the best,
Jeff Cohen


> -----Original Message-----
> From: Listuser [mailto:listuser@rogers.com]
> Sent: Thursday, January 16, 2003 12:44 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Apache 2.0.43 and PHP 4.3.0 on Windows -
> Problems
> 
> Further info about my problem: The event viewer says that the file (the
> php
> .dll file) can not be found. However, the file is there and in the
> directory(s) specified in the PHP install manual.
> 
> ----- Original Message -----
> From: "Listuser" <li...@rogers.com>
> To: "Apache" <us...@httpd.apache.org>
> Sent: Thursday, January 16, 2003 12:06 PM
> Subject: [users@httpd] Apache 2.0.43 and PHP 4.3.0 on Windows - Problems
> 
> 
> > Hi All,
> >
> > I've been having a heck of a time over the last few days with PHP, MySQL
> and
> > now Apache on Windows - they all work great on Linux, but hey, what do
> you
> > expect..
> >
> > Anyway. I installed Apache and it worked fine, I then installed PHP and
> all
> > tests show it works fine - but when I try to get the PHP modules loaded
> for
> > Apache in httpd.conf, the Apache server won't start. The only error I
> get
> is
> > a Windows error box that says "The requested operation has failed".
> There
> is
> > nothing in the apache logs. If  I un-comment these lines - Apache will
> > start.
> >
> > I have followed the instructions in the PHP help file which I have
> included
> > below, but have no idea where to go from here as I'm really not sure
> what
> > the problem is due to a lack of logs or errormessages letting me know
> where
> > to look next.
> >
> > Any help is appreciated.
> >
> > TIA
> >
> >   Installing PHP for Apache as module
> >   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >   Now that version 4.1 introduces a safer sapi module, we recommend
> >   that you configure PHP as a module in Apache.
> >
> >   To accomplish this, you have to load the php4apache.dll in your
> >   Apache httpd.conf.
> >
> >   !! NOTE !!
> >   Whereever you load php4apache.dll from, php4apache.dll also
> >   needs the php4ts.dll also included in the PHP4 distribution.
> >   php4apache.dll depends on php4ts.dll which is loaded as soon as
> >   Apache loads php4apache.dll. If php4ts.dll can't be found, you
> >   usually get an error like (also see the "Problems?" section at
> >   the end of the file):
> >
> >     Cannot load c:/php/sapi/php4apache.dll into server
> >
> >   So where does php4ts.dll has to be to be properly loaded ?
> >   php4ts.dll is searched in the following order:
> >
> >   1) in the directory where apache.exe is start from
> >   2) in the directory where php4apache.dll is loaded from
> >   3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
> >      %SYSTEMROOT% directory.
> >      Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
> >   4) in your whole %PATH%
> >
> >   Note: What is %SYSTEMROOT% ? Depending on your Windows
> >         installation this may be for example c:\winnt or C:\windows
> >
> >   Usually you would just copy it over to %SYSTEMROOT%\System32.
> >   But if you want to have multiple PHP installations (for
> >   whatever reason) this is a bad idea. For this circumstance the
> >   safest thing is to let php4ts.dll reside in the same directory
> >   where php4apache.dll is loaded from (see point 2 above).
> >
> >
> >   After you've set up the file layout properly, you're ready to
> >   finally configure Apache to load the PHP4 module. Just add the
> >   following lines to your httpd.conf:
> >
> >    LoadModule php4_module c:/php/sapi/php4apache.dll
> >    AddModule mod_php4.c
> >    AddType application/x-httpd-php .php
> >
> >   Note: Especially newer versions of Apache do not need the
> >         AddModule directive anymore, your milage may vary.
> >
> >
> >   Where do I have to put the php.ini ?
> >    The php.ini files is only searched in two places:
> >    1) in your Apache installation directory (e.g. c:\apache\apache)
> >    2) in your %SYSTEMROOT% directory.
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
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] Apache 2.0.43 and PHP 4.3.0 on Windows - Problems

Posted by Listuser <li...@rogers.com>.
Further info about my problem: The event viewer says that the file (the php
.dll file) can not be found. However, the file is there and in the
directory(s) specified in the PHP install manual.

----- Original Message -----
From: "Listuser" <li...@rogers.com>
To: "Apache" <us...@httpd.apache.org>
Sent: Thursday, January 16, 2003 12:06 PM
Subject: [users@httpd] Apache 2.0.43 and PHP 4.3.0 on Windows - Problems


> Hi All,
>
> I've been having a heck of a time over the last few days with PHP, MySQL
and
> now Apache on Windows - they all work great on Linux, but hey, what do you
> expect..
>
> Anyway. I installed Apache and it worked fine, I then installed PHP and
all
> tests show it works fine - but when I try to get the PHP modules loaded
for
> Apache in httpd.conf, the Apache server won't start. The only error I get
is
> a Windows error box that says "The requested operation has failed". There
is
> nothing in the apache logs. If  I un-comment these lines - Apache will
> start.
>
> I have followed the instructions in the PHP help file which I have
included
> below, but have no idea where to go from here as I'm really not sure what
> the problem is due to a lack of logs or errormessages letting me know
where
> to look next.
>
> Any help is appreciated.
>
> TIA
>
>   Installing PHP for Apache as module
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>   Now that version 4.1 introduces a safer sapi module, we recommend
>   that you configure PHP as a module in Apache.
>
>   To accomplish this, you have to load the php4apache.dll in your
>   Apache httpd.conf.
>
>   !! NOTE !!
>   Whereever you load php4apache.dll from, php4apache.dll also
>   needs the php4ts.dll also included in the PHP4 distribution.
>   php4apache.dll depends on php4ts.dll which is loaded as soon as
>   Apache loads php4apache.dll. If php4ts.dll can't be found, you
>   usually get an error like (also see the "Problems?" section at
>   the end of the file):
>
>     Cannot load c:/php/sapi/php4apache.dll into server
>
>   So where does php4ts.dll has to be to be properly loaded ?
>   php4ts.dll is searched in the following order:
>
>   1) in the directory where apache.exe is start from
>   2) in the directory where php4apache.dll is loaded from
>   3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
>      %SYSTEMROOT% directory.
>      Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
>   4) in your whole %PATH%
>
>   Note: What is %SYSTEMROOT% ? Depending on your Windows
>         installation this may be for example c:\winnt or C:\windows
>
>   Usually you would just copy it over to %SYSTEMROOT%\System32.
>   But if you want to have multiple PHP installations (for
>   whatever reason) this is a bad idea. For this circumstance the
>   safest thing is to let php4ts.dll reside in the same directory
>   where php4apache.dll is loaded from (see point 2 above).
>
>
>   After you've set up the file layout properly, you're ready to
>   finally configure Apache to load the PHP4 module. Just add the
>   following lines to your httpd.conf:
>
>    LoadModule php4_module c:/php/sapi/php4apache.dll
>    AddModule mod_php4.c
>    AddType application/x-httpd-php .php
>
>   Note: Especially newer versions of Apache do not need the
>         AddModule directive anymore, your milage may vary.
>
>
>   Where do I have to put the php.ini ?
>    The php.ini files is only searched in two places:
>    1) in your Apache installation directory (e.g. c:\apache\apache)
>    2) in your %SYSTEMROOT% directory.
>
>
>
> ---------------------------------------------------------------------
> 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