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, 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 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 August 31st, 2004, 11:06 AM
Registered User
 
Join Date: Aug 2004
Location: Chicago, IL, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default I need help installing php apache mysql

Hello all, I just installed apache ver 2.0.50
mysql ver 4.0.20d-win
php-5.0.1-win32
on my pc (windows xp home edition)
I have some questions
First: Which httpd file are they referring to? Is it httpd or httpd.default? This file is located in c:\program files\ApacheGroup\Apache2\conf
Second:Since I have downloaded and installed a later version of php than is used in the book, aren't there different instructions for "Customizing your installation" "Adding php to the equation"?
If so could you please tell me what the correct instructions are? I am able to get the "If this works, we did it!" to show when I type http://localhost in my browser, but I can't get the http://localhost/phptest.php to work. I followed the directions, and created a test folder and pointed apache to the test directory. I think I'm having problems with the httpd.conf file entries, because I'm not sure if I have the correct file httpd file, and I'm using a later version of php. Please help, or point to the correct sources who can help.
Thanks in advance,
cardme42
Reply With Quote
  #2 (permalink)  
Old August 31st, 2004, 02:23 PM
Authorized User
 
Join Date: Jul 2004
Location: Las Vegas, NV, USA.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by cardme42
 Hello all, I just installed apache ver 2.0.50
mysql ver 4.0.20d-win
php-5.0.1-win32
on my pc (windows xp home edition)
I have some questions
First: Which httpd file are they referring to? Is it httpd or httpd.default? This file is located in c:\program files\ApacheGroup\Apache2\conf
Second:Since I have downloaded and installed a later version of php than is used in the book, aren't there different instructions for "Customizing your installation" "Adding php to the equation"?
If so could you please tell me what the correct instructions are? I am able to get the "If this works, we did it!" to show when I type http://localhost in my browser, but I can't get the http://localhost/phptest.php to work. I followed the directions, and created a test folder and pointed apache to the test directory. I think I'm having problems with the httpd.conf file entries, because I'm not sure if I have the correct file httpd file, and I'm using a later version of php. Please help, or point to the correct sources who can help.
Thanks in advance,
cardme42
OK seems as if you have not set up PHP in Apache. Use the httpd.conf DO NOT USE THE httpd.default or httpd-default.conf. SAVE IT AS A BACKUP. Also make a backup of your file that you create to be safe.

PHP installation is differant for 5 versus 4. As for apache; 2 is differant from 1. Using any PHP with Apache 2 is differant from one.

Did you modify the conf file? If so what did you do?

http://www.php.net/manual/en/installation.php - this might help also.

Quicky instructions (should really be in a FAQ):

Copy the file php5ts.dll to your system directory. (PHP's site will tell you to put c:\PHP in the PATH. I am opposed to this. I try to keep as much OUT of the path as possible for security reasons)

add these lines ot your httpd.conf file [u](in the appropriate sections)</u> Any place you see a "#" that is a comment. Find that line and comment it out. No need to copy mine in:
LoadModule php5_module c:/php/php5apache2.dll

# DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
#
DocumentRoot "C:/Program Files/Apache Group/Apache2/test"


# <Directory "C:/Program Files/Apache Group/Apache2/htdocs">
<Directory "C:/Program Files/Apache Group/Apache2/test">


AddType application/x-httpd-php .php3 .php .phtml
AddType application/x-httpd-php-source .phps


The PHP.INI file will work fine, but I suggest a few things.
- short_open_tag set to OFF
- asp_tags set to OFF
- log_errors set to ON
- register_globals set to OFF (very few 3d party servers will allow this)
- file_uploads set to OFF (I don't need this for a local server)
- session.save_path (I put mine in c:\php\sessions, makes it easier to find)
Reply With Quote
  #3 (permalink)  
Old September 1st, 2004, 10:39 AM
Registered User
 
Join Date: Aug 2004
Location: Chicago, IL, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks codewizard, I edited the correct httpd.conf file and added the lines you recommended. Also I copied php5ts.dll and php.ini to windows/system32, this took care of my operation failed error I was receiving everytime I tried to restart Apache. However I can get the http://localhost/ to show "If this works, we dit it!" but when I try to use the http://localhost/phptest.php I get an error saying the page was not found. I don't understand what's wrong, I went to the php website and followed their instructions. The problem may be that I mixed them in with the book's instructions, which were for the configuration of an earlier edition of php.
from cardme42
Reply With Quote
  #4 (permalink)  
Old September 13th, 2004, 09:05 AM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had problems installing Apache, PHP and MySQL on OSX and then on XP. I could get apache and PHP working but MySQL was a nightmare!

My advice is to use the installer below. It installs all 3 applications as a bundle. Downside, it isn't the latest versions but it works a treat.
Apache 1.3.28
MySQL 4.0.12
PHP 4.3.3
PHP MyAdmin 2.5.0

Download this, it should do the trick on XP:
http://www.e-novative-download.com/setup_WAMP_1.5.0.exe

FAQ's
http://www.e-novative.de/en/support/faq/wamp.php

p.s. if you've already tried installing Apache, PHP and MySQL you must uninstall. Don't forget to delete the 'my.conf' file in the window directory. This holds extra settings for MySQL and if you have tried installing and they are wrong - it won't work. The installer will configure everything for you.

Luke

Reply With Quote
  #5 (permalink)  
Old September 13th, 2004, 09:06 AM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had problems installing Apache, PHP and MySQL on OSX and then on XP. I could get apache and PHP working but MySQL was a nightmare!

My advice is to use the installer below. It installs all 3 applications as a bundle. Downside, it isn't the latest versions but it works a treat.
Apache 1.3.28
MySQL 4.0.12
PHP 4.3.3
PHP MyAdmin 2.5.0

Download this, it should do the trick on XP:
http://www.e-novative-download.com/setup_WAMP_1.5.0.exe

FAQ's
http://www.e-novative.de/en/support/faq/wamp.php

p.s. if you've already tried installing Apache, PHP and MySQL you must uninstall. Don't forget to delete the 'my.conf' file in the window directory. This holds extra settings for MySQL and if you have tried installing and they are wrong - it won't work. The installer will configure everything for you.

Luke
Reply With Quote
  #6 (permalink)  
Old September 13th, 2004, 01:10 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The real question here is "what is the issue that XP has that keeps Apache from displaying PHP pages?"

I have tried PHP 4.3.8 and 5.0.1 with the same problem.

Does anyone have any information on issues with XP Home that keeps Apache from recognizing PHP pages?

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
[Php 5 MySQL 5 Apache 2 Win32]Install universalbitmapper PHP Databases 1 February 24th, 2006 04:16 AM
Beg apache, php, MYSQL need some help dreadhead BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 December 20th, 2004 11:37 PM
Chapter 9 - Apache, PHP and Mysql Development AMP_Engineer Beginning PHP 1 September 25th, 2004 11:27 AM
freshbie-help on installing php/apache favor PHP How-To 1 July 28th, 2004 09:21 AM
problems installing php and mySQL mjmadick Beginning PHP 1 July 26th, 2004 02:46 AM



All times are GMT -4. The time now is 09:12 AM.


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