Hi - Newbie Question. Trying to configure Apache to run PHP
Moderator: General Moderators
Hi - Newbie Question. Trying to configure Apache to run PHP
I recently bought the SAMS Teach Yourself PHP, Apache and MySQL 2nd Ed. book.
It comes with:
PHP 5.0.2
MySQL 4.0.21
Apache 2.0.52
Running on Win XP home.
Following the instructions to the letter, I succesfully installed MySQL and Apache. Checked the Apache service was running OK.
For the life of me I cannot get the PHP up and running.
The book states I should first alter the httpd.conf file to include:
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .phtml . html
And rename and move php.ini-recommended to php.ini to c:\windows
And move php5ts.dll to c:\windows\system32
Restarted the Apache service - no problem
But when I creat a test page 'phpinfo.php' and save in the htdocs directory I get the message 'HTTP 404 - File not found'
Help please! Has anyone else encountered this problem, I'm sure it's easily rectified, but being new to it all I'm struggling!
Thanks in advance,
Dom
It comes with:
PHP 5.0.2
MySQL 4.0.21
Apache 2.0.52
Running on Win XP home.
Following the instructions to the letter, I succesfully installed MySQL and Apache. Checked the Apache service was running OK.
For the life of me I cannot get the PHP up and running.
The book states I should first alter the httpd.conf file to include:
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .phtml . html
And rename and move php.ini-recommended to php.ini to c:\windows
And move php5ts.dll to c:\windows\system32
Restarted the Apache service - no problem
But when I creat a test page 'phpinfo.php' and save in the htdocs directory I get the message 'HTTP 404 - File not found'
Help please! Has anyone else encountered this problem, I'm sure it's easily rectified, but being new to it all I'm struggling!
Thanks in advance,
Dom
Do you get a page not found error when you go to: http://localhost/
Hi there,
sorry for the delay in getting back to you.
I have no problem displaying the 'default' page http://localhost/
The problem occurs when I try and create a PHP test page....get a page not found error
any ideas?
cheers,
dom
sorry for the delay in getting back to you.
I have no problem displaying the 'default' page http://localhost/
The problem occurs when I try and create a PHP test page....get a page not found error
any ideas?
cheers,
dom
Nope haven't read the book. If this is your first time setting up Apache/MySql/PHP. May I recommend Xampp http://www.apachefriends.org/en/index.html
It will make your life much easier.
Note: you will prob. have to uninstall apache before you install Xampp
It will make your life much easier.
Note: you will prob. have to uninstall apache before you install Xampp
Yep, it's my first time, I'll give XAMPP a go tonight. I also considered giving WAMP5 a go http://www.wampserver.com/en/index.php.
Many thanks
dom
Many thanks
dom
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Well, I knew there was a full package available somewhere when I installed my local server a few weeks ago, but forgot the name, and couldn't be bothered searching.
I installed Apache first, then PHP and it took me about an hour in total to get it working, I haven't attempted MySQL yet, but I can't imagine it would be that difficult to set up. I had to refer to some user notes on php.net about installation a few times, they are quite helpful.
I installed Apache first, then PHP and it took me about an hour in total to get it working, I haven't attempted MySQL yet, but I can't imagine it would be that difficult to set up. I had to refer to some user notes on php.net about installation a few times, they are quite helpful.
only thing i can think to say about wamp5 is that its for php5, not all web hosts are supporting this yet so make sure to check what your configuration is on the webserver your going to be using.
PHP5 is quite a bit different from php4 but i`ve never looked at php5 so don`t uote me on any of this!
Simon
PHP5 is quite a bit different from php4 but i`ve never looked at php5 so don`t uote me on any of this!
Simon
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
It's mostly backward compatible. A few function changes/additions. OOP has introduced a lot of new features but the PHP4 stuff should basically still work.Simon.T wrote:only thing i can think to say about wamp5 is that its for php5, not all web hosts are supporting this yet so make sure to check what your configuration is on the webserver your going to be using.
PHP5 is quite a bit different from php4 but i`ve never looked at php5 so don`t uote me on any of this!
Simon
Going from 4 to 5 should be easy enough, but if you've learned loads of PHP5 specific things you may find it confusing to drop down to PHP4.
Thats what i was basicaly referring to is if atest server is running at the office / home with php 5 and scripts run ok, but then you upload to your really server only running php4 then theres gonna be problemsd11wtq wrote:It's mostly backward compatible. A few function changes/additions. OOP has introduced a lot of new features but the PHP4 stuff should basically still work.
Going from 4 to 5 should be easy enough, but if you've learned loads of PHP5 specific things you may find it confusing to drop down to PHP4.
I always try and run exactly the same version of software on the local test server as the real web server.
Simon