You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Daniel Gaddy <dg...@sparctech.com> on 2002/06/06 15:05:40 UTC

Mod_php for Win2kPro on Apache 2.0.35

Where do I get mod_php from and the instructions on how to implement it into
apache... Because your right, I WOULD rather have mod_php so that it would
stay active within apache rather than opening up a new process EVERY time
php is accessed on the server... That will quickly bog down my box... Can
you assist me with this...

Thanks,
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>; <dg...@sparctech.com>
Sent: Thursday, June 06, 2002 4:57 AM
Subject: Re: CGI and PHP issue on Apache 2.0.35 for Win2kPro


>
> Daniel Gaddy wrote,
>
> > Now for PHP... I found on the net a nice download for an application
known
> > as PHP4 for Win32... I installed this application and did the exact
steps
> > that are in the document for installing PHP in Apache... That document
> > reads:
> >
> > If you want to install PHP for Windows Apache (CGI version),
> > install Apache (See Apache install guide) and the PHP EasyWindows
> > installer. Then add the following lines to the
> > Apache/conf/httpd.conf file:
>
> This is a guess, but I think you rather want to install the extension of
PHP
> above the CGI-version. Without any specific experience about modules etc,
> and none about PHP, I installed PHP 4.2.1 for Windows XP on Apache 2.0.36
> _very_ easy; just followed the instructions. So, if it isn't so that you
> must have the CGI-version, I would recommend you to use the extension
module
> instead, as it is much better/faster.
>
> > Also, if anyone has a great link for a how-to type manual for installing
> and
> > configuring Perl v5.6.1 and all needed modules, I would love that...
>
> As I understood it, you had already got Perl working fine, and you do not
> need it in any special way for PHP, so have it like it is (or was, if you
> made changes).
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Mod_php for Win2kPro on Apache 2.0.35

Posted by Robert Andersson <ro...@profundis.nu>.
I'm not very experienced here, but i'll try to help you through your
problems, as I caused them ;-)

Daniel Gaddy wrote,

> I got this PHP zip package, and extracted all files to c:\php_4.2.1  Then
I
> copied php4ts.dll and php.ini to the c:\winnt\system32\ folder.  Then I
> edited the php.ini file so that paths were correct... I then in the
> httpd.conf file for apache, inserted the three lines you said to insert,
> which were:
>
> > LoadModule php4_module "G:/usr/local/php4/sapi/php4apache2.dll"
> > AddType application/x-httpd-php .php .phtml
> > AddType application/x-httpd-php-source .phps
>
> I added the two ADDTYPE entries under the one AddType application
directive
> that comes in httpd.conf by default.  I assume this is where I should have
> put them rather than beneath the actual LoadModule statement, as other
> LoadModule statements were below.  And I then saved and restarted the web
> server, and it would not start... The error message was: The requested
> operation has failed.  My logs offered no help at all...

How did you restart the server, and where did this error message pop up, and
do you run Apache as a service?
Perhaps you said so in an earlier letter, but which os/version are you doing
this on?
And, does it start and work if you only uncomment the LoadModule-directive?
There are both a "php4apache.dll" and a "php4apache2.dll". You are sure
you're using the latter?
You must also use forward slashes / in all path names in httpd.conf.

> So something is
> wrong... Are you sure I am suppose to use the quotes around the drive and
> path for the module, and are you sure the .dll will work rather than the
> .so, which apache mainly uses for modules...

Pretty sure; it works for me, and you're encouraged to do so in the manual.
For the .dll, modules can be either compiled in, loadable modules (.so) or
dlls. The PHP extension is in form of a dll.

> I appologize if I have
> forgotten to do something, but in following your steps, I was unable to
get
> it to work properly...
>
> I would appreciate whatever help you could offer

We shall try to sort this out. If it don't magically start to function, do
send/attache your httpd.conf and php.ini (you can cut out irrelevant stuff
if you want) and will look at them to see if I have missed to point out
something obvious. The problem here is that I really don't know what one
needs to do to get this working. I was lucky, reading some posts in this
forum about Win32+Apache2+PHP4 and the install notes, and it just worked the
first time, but hopefully we reach that point for you too :-)

Regards,
Robert Andersson




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Mod_php for Win2kPro on Apache 2.0.35

Posted by Daniel Gaddy <dg...@sparctech.com>.
I got this PHP zip package, and extracted all files to c:\php_4.2.1  Then I
copied php4ts.dll and php.ini to the c:\winnt\system32\ folder.  Then I
edited the php.ini file so that paths were correct... I then in the
httpd.conf file for apache, inserted the three lines you said to insert,
which were:

> LoadModule php4_module "G:/usr/local/php4/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps

I added the two ADDTYPE entries under the one AddType application directive
that comes in httpd.conf by default.  I assume this is where I should have
put them rather than beneath the actual LoadModule statement, as other
LoadModule statements were below.  And I then saved and restarted the web
server, and it would not start... The error message was: The requested
operation has failed.  My logs offered no help at all... So something is
wrong... Are you sure I am suppose to use the quotes around the drive and
path for the module, and are you sure the .dll will work rather than the
.so, which apache mainly uses for modules... I appologize if I have
forgotten to do something, but in following your steps, I was unable to get
it to work properly...

I would appreciate whatever help you could offer

Thanks...

----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>; "Daniel Gaddy" <dg...@sparctech.com>
Sent: Thursday, June 06, 2002 12:36 PM
Subject: Re: Mod_php for Win2kPro on Apache 2.0.35


>
> Daniel Gaddy wrote,
>
> > Where do I get mod_php from and the instructions on how to implement it
> into
> > apache... Because your right, I WOULD rather have mod_php so that it
would
> > stay active within apache rather than opening up a new process EVERY
time
> > php is accessed on the server... That will quickly bog down my box...
Can
> > you assist me with this...
>
> Lets see...
>
> 1. First download the binaries from here: http://www.php.net/downloads.php
> Select the first one ("PHP 4.2.1 zip package") which includes the
extension.
>
> 2. Unpack the archive to a good place. You won't install (copy) this, so
> it'll be where you put it now forever :-)
> I put mine besides apache at G:/usr/local/php4/ (being somewhat unix
> compatible)
>
> 3. You should then open up install.txt (for example:
> G:/usr/local/php4/install.txt), and goto the section: "Windows Manual
> install from zip binary distribution". Read the stuff so you're in on it,
> but I comment some important steps.
> - I'm not sure this is necessary, but you should copy the php4ts.dll to
> %SYSTEMROOT%\system32 (if you're on NT)
> - Copy the php.ini-dist to %SYSTEMROOT% and remove the '-dist'-part.
> - Just follow the instructions when configuring the php.ini-file. You
don't
> need to change much but paths etc.
>
> 4. Skip down to the section "Web server configuration", and "Installing
PHP
> on Windows with Apache 1.3.x" (I know the version, but most stuff will
work
> anyway).
> - Instead of modifying httpd.conf the way they say, add these lines:
>
> LoadModule php4_module "G:/usr/local/php4/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
> You should, of course, change the path to the dll to what you have. A tip
is
> to also add index.php etc. to the DirectoryIndex directiv
>
> 5. I hope i remembered most steps. Hopefully you restart the server and
> everything works great. Try searching the archives here, as there were
some
> discussions about php4+Apache2 a while ago. Let me know if you run into a
> rock.
>
> Regards,
> Robert Andersson
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Mod_php for Win2kPro on Apache 2.0.35

Posted by Prachait Saxena <su...@sitesontesting.com>.
Hello Robert Andersson

I had done as it is as you wrote. and PHP Module
But when restarting the apache I am getting the error as 
<31> A device attached to the system is not functioning

and same error when loading the SSL Module

Ya I have one TVTuner card on my machine which is not working. I removed 
it but still the same error. Any idea ???

My Machine Conf.
Win98 + Apache 1.3.24 + No NetworkCard

Please help me.

Bye and Have a nice day 

Prachait Saxena

WebMaster
SitesOnTesting.Com

If you do for other's !
Other's will do for you !!

Visit me at http://www.sitesontesting.com/prachait


-----Original Message-----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>, "Daniel Gaddy" <dg...@sparctech.com>
Date: Thu, 6 Jun 2002 19:36:51 +0200
Subject: Re: Mod_php for Win2kPro on Apache 2.0.35

> 
> Daniel Gaddy wrote,
> 
> > Where do I get mod_php from and the instructions on how to implement
> it
> into
> > apache... Because your right, I WOULD rather have mod_php so that it
> would
> > stay active within apache rather than opening up a new process EVERY
> time
> > php is accessed on the server... That will quickly bog down my box...
> Can
> > you assist me with this...
> 
> Lets see...
> 
> 1. First download the binaries from here:
> http://www.php.net/downloads.php
> Select the first one ("PHP 4.2.1 zip package") which includes the
> extension.
> 
> 2. Unpack the archive to a good place. You won't install (copy) this,
> so
> it'll be where you put it now forever :-)
> I put mine besides apache at G:/usr/local/php4/ (being somewhat unix
> compatible)
> 
> 3. You should then open up install.txt (for example:
> G:/usr/local/php4/install.txt), and goto the section: "Windows Manual
> install from zip binary distribution". Read the stuff so you're in on
> it,
> but I comment some important steps.
> - I'm not sure this is necessary, but you should copy the php4ts.dll to
> %SYSTEMROOT%\system32 (if you're on NT)
> - Copy the php.ini-dist to %SYSTEMROOT% and remove the '-dist'-part.
> - Just follow the instructions when configuring the php.ini-file. You
> don't
> need to change much but paths etc.
> 
> 4. Skip down to the section "Web server configuration", and "Installing
> PHP
> on Windows with Apache 1.3.x" (I know the version, but most stuff will
> work
> anyway).
> - Instead of modifying httpd.conf the way they say, add these lines:
> 
> LoadModule php4_module "G:/usr/local/php4/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
> 
> You should, of course, change the path to the dll to what you have. A
> tip is
> to also add index.php etc. to the DirectoryIndex directiv
> 
> 5. I hope i remembered most steps. Hopefully you restart the server and
> everything works great. Try searching the archives here, as there were
> some
> discussions about php4+Apache2 a while ago. Let me know if you run into
> a
> rock.
> 
> Regards,
> Robert Andersson



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Mod_php for Win2kPro on Apache 2.0.35

Posted by Robert Andersson <ro...@profundis.nu>.
Daniel Gaddy wrote,

> Where do I get mod_php from and the instructions on how to implement it
into
> apache... Because your right, I WOULD rather have mod_php so that it would
> stay active within apache rather than opening up a new process EVERY time
> php is accessed on the server... That will quickly bog down my box... Can
> you assist me with this...

Lets see...

1. First download the binaries from here: http://www.php.net/downloads.php
Select the first one ("PHP 4.2.1 zip package") which includes the extension.

2. Unpack the archive to a good place. You won't install (copy) this, so
it'll be where you put it now forever :-)
I put mine besides apache at G:/usr/local/php4/ (being somewhat unix
compatible)

3. You should then open up install.txt (for example:
G:/usr/local/php4/install.txt), and goto the section: "Windows Manual
install from zip binary distribution". Read the stuff so you're in on it,
but I comment some important steps.
- I'm not sure this is necessary, but you should copy the php4ts.dll to
%SYSTEMROOT%\system32 (if you're on NT)
- Copy the php.ini-dist to %SYSTEMROOT% and remove the '-dist'-part.
- Just follow the instructions when configuring the php.ini-file. You don't
need to change much but paths etc.

4. Skip down to the section "Web server configuration", and "Installing PHP
on Windows with Apache 1.3.x" (I know the version, but most stuff will work
anyway).
- Instead of modifying httpd.conf the way they say, add these lines:

LoadModule php4_module "G:/usr/local/php4/sapi/php4apache2.dll"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

You should, of course, change the path to the dll to what you have. A tip is
to also add index.php etc. to the DirectoryIndex directiv

5. I hope i remembered most steps. Hopefully you restart the server and
everything works great. Try searching the archives here, as there were some
discussions about php4+Apache2 a while ago. Let me know if you run into a
rock.

Regards,
Robert Andersson





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org