p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 (http://p2p.wrox.com/forumdisplay.php?f=123)
-   -   Chapter 1 - Adding PHP to the Equation (http://p2p.wrox.com/showthread.php?t=30565)

Chudz June 17th, 2005 03:58 PM

Chapter 1 - Adding PHP to the Equation
 
Hi have just got your book and install all the software onto my PC. I have just got to the bit where you add the PHP code into the apache httpd.conf file.

Then i tried to restart the Apache server and then it says "Operation Failed" The book says to find this code in the httpd.conf file:

Code:

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
AddType application/x-tar .tgz
AddType image/x-icon .ico

But when i search all i could find was this code:

Code:

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz

I just added the new code under that section i think my httpd.conf maybe be newer than the book?

Please help me thanks

dbdave June 18th, 2005 08:05 AM

What version of Apache are you trying to install?

Also, what does it say after the "Operation failed" message? It usually gives a line number that caused it to fail..


Chudz June 18th, 2005 09:11 AM

There is no line number with the operation failed! and im running Apache 2.0.54 (win32)[xx(]


Chudz June 18th, 2005 09:13 AM

maybe someone could post me there httpd.conf file which has the php code in it etc? C:\Program Files\Apache Group\Apache2\conf


dbdave June 19th, 2005 04:04 AM

This is an excert from my httpd.conf file. I've indicated the bit you're looking at with a single >

I've also indicated (with >>>) what you need to add.

#
># AddType allows you to add to or override the MIME configuration
># file mime.types for specific file types.
>#
>#AddType application/x-tar .tgz
>#
# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# 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

>>> # php
>>> AddType application/x-httpd-php .php .php3

#

That should add the first bit you need. Then all you need to do, is add the LoadModule code.

If that doesn't work, then post back ( or e-mail me ) the contents of your httpd.conf


Chudz June 21st, 2005 03:41 PM

I posted in wrong place on forum im using the newer version of the book but no one is helping me on the other forum!

I will type the page out in a email and send you my conf file and see what you think!?


Chudz June 21st, 2005 03:59 PM

its saying wont LoadModule php5_module “c:/php/php5apache2.dll” when i know that file is there [:p] this is wrong [xx(]


dbdave June 22nd, 2005 11:32 AM

I await your e-mail, although I don't use PHP5...

One thing you can try if you wish ( and it's cheating ) is use an AMP installer such as the one provided by http://www.appservnetwork.com/



All times are GMT -4. The time now is 08:50 AM.

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