 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6  | This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 16th, 2004, 10:02 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Getting PHP and Apache to work together.
Getting PHP and Apache to work together.
Hello. Is anyone else experiencing a similar problem?
I have Windows98. Whatever I try, I still can't ensure that both PHP 4.3.6 and Apache 1.3.31 have been installed together - as suggested on page 18 of the book. My Apache screen states
Apache/1.3.29 (win32) PHP/4.3.6 runningâ¦. This after following helpful advice to Ray about editing httpd.conf to not referencing the sapi subfolder
But when I try to run the test program including php commands none produce any effect in my browser window although the file loads and its source can be inspected in the browser.
I have :-
1. Copied the php dll files into my windows/system folder,
2. Copied the php4ts.dll file into my Apache bin folder, into the folder containing apache.exe, into my windows folder, and into the folder where php4apache.dll file is loaded from.
3. Renamed and edited the php.ini file in line with recommendations in the PHP installation text file, copying it into my windows folder.
I donât know if this is relevant â my Apache screen also states
[warn] (2)No such file or directory: exec() may not be safe.
Can anyone suggest anything please?
Steve
|
|

May 17th, 2004, 04:49 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You should check Apache's httpd.conf file to make sure you've registered .php files as PHP scripts.
You should have the following lines somewhere in there:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Take care,
Nik
http://www.bigaction.org/
|
|

June 1st, 2004, 10:00 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I've now succeeded at last in getting PHP to work with Apache. Phew!
It seems Nik's advice worked . I used the lines he gave me rather than the 2 AddType lines listed on page 15 of the book.
The book doesn't make clear about the difference between running PHP as an Apache module as opposed to a CGI binary. I found the article How to Install and Configure PHP4 to Run with Apache on Windows
by Christopher Heng, http://www.thesitewizard.com/ very helpful.
My face went red when I found I had also made two other mistakes which are very basic:
1) downloading the wrong Apache installation file instead of apache_1.3.31-win32-x86-no_src.msi
2) omitting the > at the end of the title line in the phptest.php test file as given in the book (this prevented the php script working.)
Regards
Stephen Russell-Lacy
|
|

June 7th, 2004, 03:00 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just FYI, the reason the apache config lines in the book didn't work (specifically the "LoadModule..." line), is because the book uses Apache 2.0.47, not anything from the 1.3.x branch. Loading the "php4apache2.dll" module as stated in the book, in 1.3.x, will do nothing.
--Jason
|
|
 |