Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2009, 08:16 AM
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default Installation Issues

First, I'd like to thank anyone who has the time and patience to answer this question! I am a total beginner and one of those who found this book on my desk with a 'Learn This!' sticky!

Anyway, I read through the installation info and then went on to install Apache. No problems there and the test worked correctly. I installed PHP and everything seemed fine.

When I began to work on the alterations to the code in the httpd.conf things started going wrong. I added the code as written in the text, but I could not get it to work. Each time I tried something, I got the same result, an error that would not allow Apache to restart.

The versions of PHP and Apache I am using are the newest (downloaded this afternoon). Here is what I added to the code.

Code:
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php6_module "C:\PHP\php6apache2_2.dll"
Code:
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    Addtype application/x-httpd-php .php
    Addtype application/x-httpd-php-source .phps
    PHPIniDir "C:\PHP"
Any thoughts, ideas, or advice is much appreciated!

Jason

Last edited by Jason M; March 14th, 2009 at 08:17 AM.. Reason: Clarity
Reply With Quote
  #2 (permalink)  
Old March 14th, 2009, 01:58 PM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi Jason,
You say an error is occurring preventing Apache restarting. Do you have any actual error message or number available, or are you doing the restart and it's just doing nothing?
I'm by no means an expert on Apache, but are the AddType bits, and the folder paths, case-sensitive? The built-in types are AddType and you have entered Addtype. I'm probably off target but just a thought.

HTH
Phil

Last edited by philip_cole; March 14th, 2009 at 02:02 PM..
Reply With Quote
The Following User Says Thank You to philip_cole For This Useful Post:
Jason M (March 14th, 2009)
  #3 (permalink)  
Old March 14th, 2009, 06:46 PM
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default Still no luck...

Hi Phil,

Thanks for the reply and noticing my lack of capital 't's'!

I did change the Addtype to AddType, but there was no change in results. I am still getting an error that says 'The requested operation has failed!' when I try to start Apache with the changes above.

Played around a bit more with it this morning, but still nothing.

Any other ideas?

Thanks all!
Jason
Reply With Quote
  #4 (permalink)  
Old March 14th, 2009, 07:16 PM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

I was wondering about the folder paths and I think they may be the problem. Have a look at http://php.net/manual/en/install.windows.apache2.php There is a note fairly near the top saying
Quote:
Remember that when adding path values in the Apache configuration files on Windows, all backslashes such as c:\directory\file.ext must be converted to forward slashes: c:/directory/file.ext. A trailing slash may also be necessary for directories.
So I reckon you should try
Code:
LoadModule php6_module "C:/PHP/php6apache2_2.dll"

PHPIniDir "C:/PHP"
Phil
Reply With Quote
  #5 (permalink)  
Old March 15th, 2009, 07:29 AM
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default No Change

Hi Phil,

Thanks again for your time and the info!

I tried the solution you pointed out but nothing seemed to happen. I played around for a while with the code and still nothing. I'll try to work it out and I'll let you know if I get anywhere.

Thanks again for the help!
Jason
Reply With Quote
  #6 (permalink)  
Old March 15th, 2009, 08:23 AM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

No problem. Sorry I can't be of more assistance. Hopefully one of the Apache gurus will be of more use than my random Googlings.
Good luck with the book once you get this working!
Reply With Quote
The Following User Says Thank You to philip_cole For This Useful Post:
Jason M (March 15th, 2009)
  #7 (permalink)  
Old March 19th, 2009, 04:53 PM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Possible Resolution

Hi Jason,

I had the same error, but then I realized I had downloaded the latest released version: PHP 5.2.9-1. However, the book refers to PHP 6 and therefore also uses that version in the instructions to configure Apache.

After making the following change to the line of code referenced on p.12 of the book, my Apache server started up just fine again! If you are using PHP 5 and not PHP 6, use the following line instead of the line referenced in the book:

LoadModule php5_module "C:/PHP/php5apache2_2.dll"

The differences are:
1) reference to php5 instead of php6
2) forward slashes instead of backslashes.

Hope this helps you!

Regards,
Connie
Reply With Quote
  #8 (permalink)  
Old April 27th, 2009, 06:29 AM
Authorized User
 
Join Date: Sep 2008
Location: Oslo, , Norway.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to peirix
Default

I'm getting an error as well. I've got the PHP6 from the snapshot site. Tried both VC6 and VC9 (don't know what the difference is). To be specific the error says: "Windows could not start the Apache2.2 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1."

I'm running XP SP3. Tried finding the "System Event Log", but the only thing I found was the error-log file, and that said nothing about any error. If I comment out the lines
Code:
PHPIniDir "C:/PHP"
and
Code:
LoadModule php6_module "C:/PHP/php6apache2_2.dll
Apache runs with no problems.

Btw. I got my php6apache2_2.dll from http://kromann.info/download.php?str...&strIndex=PHP6 here. Don't know if that will cause any issues?

As an additional note:
When running php.exe I get the following message:
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20070729
These options need to match
in Unknown on line 0

Last edited by peirix; April 27th, 2009 at 06:34 AM..
Reply With Quote
  #9 (permalink)  
Old April 27th, 2009, 09:27 AM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi Peirix,

Two things to look at.
First, you may have just posted it wrong, but the LoadModule line is missing a " at the end. This would probably mess up Apache parsing the file.
Secondly, the "System Event Log" is a program as opposed to a plain file. To get to it, right-click on My Computer from your desktop or Start Menu, and choose Manage from the menu. You will get a window with a tree structure on the left. Expand out Computer Managment (local) -> System Tools -> Event Viewer. In here are all the logs that every program can write to. You probably want to look in the "System" one, although there may also be something in "Application" of use. Note there will be a lot of entries so use the Time and Source, which should mention Apache somethere, to help.

Phil
Reply With Quote
  #10 (permalink)  
Old April 27th, 2009, 09:36 AM
Authorized User
 
Join Date: Sep 2008
Location: Oslo, , Norway.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to peirix
Default

Thanks, Phil.

Looking in the Application I found the Apache error: "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP."

I haven't quite figured out the difference between threadsafe and non-threadsafe yet. Do I need to get another version of PHP6? Or do I need to get another version of Apache2.2?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 1 - PHP installation issues Abelmiah BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 June 21st, 2009 05:01 PM
Installation issues Vorge BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 11 February 13th, 2004 06:14 PM
Yet More Installation Issues matthewfoley BOOK: ASP.NET Website Programming Problem-Design-Solution 5 November 18th, 2003 06:09 AM
PHP installation issues, yet again donh BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 September 22nd, 2003 07:12 PM



All times are GMT -4. The time now is 11:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.