This is a discussion on PHP 5 Doesn't Work within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm running Apache 1.3 on my server. I've run the installer file for PHP 5.0.4. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm running Apache 1.3 on my server. I've run the installer
file for PHP 5.0.4. I paste the following code into the httpd.conf file: # Add to the end of the LoadModule section LoadModule php5_module "C:/php/php5apache.dll" # Add to the end of the AddModule section AddModule mod_php5.c # Add this line inside the <IfModule mod_mime.c> conditional brace AddType application/x-httpd-php .php # For syntax highlighted .phps files, also add AddType application/x-httpd-php-source .phps Then, I go to the DOS prompt and type 'net stop apache'. After it stops, I type 'net start apache'. I keep getting an error message saying that Apache did not start. The weird thing is tha there is no php5apache.dll file in the C:\PHP subdirectory. There *is* a php5ts.dll file there. I tried chaning that line to reflect the php5ts.dll, but that didn't work. Any suggestions? Fred |
|
|||
|
"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com... > Then, I go to the DOS prompt and type 'net stop apache'. > After it stops, I type 'net start apache'. I keep getting an error > message saying that Apache did not start. The message logged in Window's system log should be more informative. Alternatively, go to the folder where Apache is installed and run Apache as a usertask. > The weird thing is tha there is no php5apache.dll file in the > C:\PHP subdirectory. It may have been installed in some folder under c:\windows IF the user running install had sufficient access rights. > There *is* a php5ts.dll file there. I tried chaning that line > to reflect the php5ts.dll, but that didn't work. IIRC that's for use with Windows Terminal Server. HansH |
|
|||
|
On Mon, 13 Jun 2005 22:14:10 +0200, "HansH" <hans@niet.op.het.net>
wrote: >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht >news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com.. . >> Then, I go to the DOS prompt and type 'net stop apache'. >> After it stops, I type 'net start apache'. I keep getting an error >> message saying that Apache did not start. >The message logged in Window's system log should be more informative. >Alternatively, go to the folder where Apache is installed and run Apache as >a usertask. I'm not sure about where to find the system log or how to run it as a 'user task?'. >> The weird thing is that there is no php5apache.dll file in the >> C:\PHP subdirectory. >It may have been installed in some folder under c:\windows IF the user >running install had sufficient access rights. I was running under my own username, which has full administrative rights. >> There *is* a php5ts.dll file there. I tried chaning that line >> to reflect the php5ts.dll, but that didn't work. >IIRC that's for use with Windows Terminal Server. I see. Hmmm. >HansH > |
|
|||
|
hi,
>>> There *is* a php5ts.dll file there. I tried chaning that line >>> to reflect the php5ts.dll, but that didn't work. looks like you just loaded the installable cgi-only package from php.net. if you load the complete archive (zipped package, about 7,5 mb) than there you will also find the necessary modlue-files php5apache.dll (for apache 1.3x) and php5apache2.dll (for apache 2.x). just extract the archive over the installation directory ;) bye |
|
|||
|
"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:aa7sa15jj6h1i85ubr9mrdanqulqti964d@4ax.com... > On Mon, 13 Jun 2005 22:14:10 +0200, "HansH" <hans@niet.op.het.net> > wrote: > >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht > >news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com.. . > >> Then, I go to the DOS prompt and type 'net stop apache'. > >> After it stops, I type 'net start apache'. I keep getting an error > >> message saying that Apache did not start. > >The message logged in Window's system log should be more informative. > >Alternatively, go to the folder where Apache is installed and run Apache as > >a usertask. > I'm not sure about where to find the system log Start with 'This computer' right-click 'manage' and you'll probably find your way where translation fails on me. > or how to run it as a 'user task?'. In this case, run it from a DOSsie prompt ;-) HansH |
|
|||
|
On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org>
wrote: >hi, > >>>> There *is* a php5ts.dll file there. I tried chaning that line >>>> to reflect the php5ts.dll, but that didn't work. > >looks like you just loaded the installable cgi-only package from php.net. if >you load the complete archive (zipped package, about 7,5 mb) than there you >will also find the necessary modlue-files php5apache.dll (for apache 1.3x) >and php5apache2.dll (for apache 2.x). just extract the archive over the >installation directory ;) > >bye > I just downloaded the latest version of PHP 5.0. I unzipped it to the C:\PHP directory (I had deleted all files that were there before). I put these two lines of code into my httpd.conf file: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php I stopped Apache. I restarted Apache. Again, it won't restart. So I am removing those two lines. Any other suggestions? Fred |
|
|||
|
"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com... > On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org> > I just downloaded the latest version of PHP 5.0. I unzipped > it to the C:\PHP directory > (I had deleted all files that were there before). Now you probably lost your php.ini ... > I put these two lines of code into my httpd.conf file: > LoadModule php5_module "c:/php/php5apache2.dll" > AddType application/x-httpd-php .php > I stopped Apache. I restarted Apache. Again, it won't restart. You're running apache-1.3, than indeed php5apache2.dll will fail: try php5apache.dll. Instead of either option given in c:/php/readme.txt " To make php4ts.dll / php5ts.dll available you have three options: copy the file to the Windows system directory, copy the file to the web server's directory, or add your PHP directory, C:\php to the PATH. For better maintenance, we advise you to follow the last option, add C:\php to the PATH, because it will be simpler to upgrade PHP in the future. ..." you may need to add this line before the 'LoadModule ...' LoadFile c:/php/php5ts.dll .... it's not the TerminalServer version, but the main library [Oops, sorry!] Next time please quote the failure report Apache returns if started _directly_ from the command line ( thus not by 'net start apache') HansH |
|
|||
|
On Thu, 16 Jun 2005 20:31:03 +0200, "HansH" <hans@niet.op.het.net>
wrote: >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht >news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com.. . >> On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org> >> I just downloaded the latest version of PHP 5.0. I unzipped >> it to the C:\PHP directory >> (I had deleted all files that were there before). >Now you probably lost your php.ini ... > >> I put these two lines of code into my httpd.conf file: >> LoadModule php5_module "c:/php/php5apache2.dll" >> AddType application/x-httpd-php .php >> I stopped Apache. I restarted Apache. Again, it won't restart. >You're running apache-1.3, than indeed php5apache2.dll will fail: try >php5apache.dll. > >Instead of either option given in c:/php/readme.txt >" To make php4ts.dll / php5ts.dll available you have three options: copy > the file to the Windows system directory, copy the file to the web > server's directory, or add your PHP directory, C:\php to the PATH. For > better maintenance, we advise you to follow the last option, add > C:\php to the PATH, because it will be simpler to upgrade PHP in the > future. ..." >you may need to add this line before the 'LoadModule ...' > LoadFile c:/php/php5ts.dll >... it's not the TerminalServer version, but the main library >[Oops, sorry!] > >Next time please quote the failure report Apache returns if started >_directly_ from the command line ( thus not by 'net start apache') > > >HansH > Well, that almost fixed it. Now, Apache starts. But, when I try to pull up a PHP file, I now get a Forbidden message. It says 'You don't have permission to access /PHP/ on this server'. Weird. Fred |
|
|||
|
"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:rv84b11b8r5kknor39rv2845ukr7a27aoa@4ax.com... > >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht > >news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com.. . > >> On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org> > >> I just downloaded the latest version of PHP 5.0. I unzipped > >> it to the C:\PHP directory > >> (I had deleted all files that were there before). > >Now you probably lost your php.ini ... > > > >> I put these two lines of code into my httpd.conf file: > >> LoadModule php5_module "c:/php/php5apache2.dll" > >> AddType application/x-httpd-php .php > >> I stopped Apache. I restarted Apache. Again, it won't restart. > >You're running apache-1.3, than indeed php5apache2.dll will fail: try > >php5apache.dll. > > > >you may need to add this line before the 'LoadModule ...' > > LoadFile c:/php/php5ts.dll > Well, that almost fixed it. Now, Apache starts. > > But, when I try to pull up a PHP file, I now get a Forbidden > message. It says 'You don't have permission to access /PHP/ on this > server'. Deactivate a line like Action application/x-httpd-php "c:/php/php.exe" from your config Is /PHP/ part of the URL you use to access a script? Is /PHP/ a physical folder below the documentroot? Where is your php.ini file located? A relevant snippet from your error.log might shed some more light too... HansH |