Installation, testing question
Moderator: General Moderators
Installation, testing question
Hello everyone,
Yes, I am a complete NOVICE at the whole MySQL, Apache and PHP arena. I am trying to develop a site much like this however I cannot actually disclose what it will be used for due to security reasons.
My issue is as follows:
I bought the Sams Teach Yourself PHP, MySQL and Apache All-In-One book and it came with the CD with the programs on it. It's a fairly easy read and all so far.
I installed MySQL and Apache fine. Or I should say that they both seemed to install fine. I went to php.net to get the latest version of PHP, 5.1.6. I unzipped that and put it into the ' C:\php5 ' directory like specified.
I edited the httpd.conf file with the required lines (depicted below):
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .html
PHPIniDir "C:\php5"
So when finished, I tried the ' http://localhost ' and it showed the Apache page. However, I tried to make the 'test file' for PHP and input ' http://localhost/phpinfo.php ' into the web browser (firefox and IE) and both returned a cannot display page error.
Anyone know what I did wrong? Please help!
I'll probably be posting a lot of questions so I hope you all have a lot of answers and don't get annoyed.
Thanks in advance,
B
Yes, I am a complete NOVICE at the whole MySQL, Apache and PHP arena. I am trying to develop a site much like this however I cannot actually disclose what it will be used for due to security reasons.
My issue is as follows:
I bought the Sams Teach Yourself PHP, MySQL and Apache All-In-One book and it came with the CD with the programs on it. It's a fairly easy read and all so far.
I installed MySQL and Apache fine. Or I should say that they both seemed to install fine. I went to php.net to get the latest version of PHP, 5.1.6. I unzipped that and put it into the ' C:\php5 ' directory like specified.
I edited the httpd.conf file with the required lines (depicted below):
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .html
PHPIniDir "C:\php5"
So when finished, I tried the ' http://localhost ' and it showed the Apache page. However, I tried to make the 'test file' for PHP and input ' http://localhost/phpinfo.php ' into the web browser (firefox and IE) and both returned a cannot display page error.
Anyone know what I did wrong? Please help!
I'll probably be posting a lot of questions so I hope you all have a lot of answers and don't get annoyed.
Thanks in advance,
B
That's funny! ALL of the books on PHP that I have say to put it in the ' C:\php5 ' directory!!!feyd wrote:Where did you place the file phpinfo.php? If it is not in the Apache document root, you'll get such an error.
**NOPE, wait...
I put it in the ' C:\Program Files\Apache Group\Apache2\htdocs ' directory and still the same issue...
Did I put it in the wrong directory?
Nah, didn't work either.Weirdan wrote:throw an empty index.html file into your htdocs directory and see if apache test page goes away.
The ' http://localhost ' command on IE and Firefox show the Apache page. It's the ' http://localhost/phpinfo.php ' file that does not display the php configuration or details.
You know what I mean?
I've tried to reinstall ALL of the aspects (MySQL, PHP, Apache) , even cleared all registry entries and the edit to the MS Windows PATH file. It still doesn't work.
Any more suggestions?
Alright, I'm going to uninstall and reinstall EVERYTHING. Delete ALL files and registry entries that were made. When I reinstall it all, I'm going to accept ALL defaults.
The question is:
When I have to edit the httpd.conf file in Apache, where do I put the below statements EXACTLY? And did I type them wrong?...
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .html
PHPIniDir "C:\php5"
The question is:
When I have to edit the httpd.conf file in Apache, where do I put the below statements EXACTLY? And did I type them wrong?...
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php .html
PHPIniDir "C:\php5"
ARGH...
Ok, did what you said Feyd. As far as the placement of the LoadModule and AddType lines in the httpd.conf file. I did this after deletion and reinstallation of all of the programs. MySQL, PHP 5 and Apache 2.0.58.
Same issue still resides. I followed the instructions step by step for all of the programs from BOTH books that I have on MySQL, PHP 5 and Apache. Anyone have any ideas?
Ok, did what you said Feyd. As far as the placement of the LoadModule and AddType lines in the httpd.conf file. I did this after deletion and reinstallation of all of the programs. MySQL, PHP 5 and Apache 2.0.58.
Same issue still resides. I followed the instructions step by step for all of the programs from BOTH books that I have on MySQL, PHP 5 and Apache. Anyone have any ideas?
First you have to find the right httpd.conf - the file where the apache httpd reads its configuration from.
Insertat the beginning and try to start the apache. It shouldn't work. If it does you didn't edit the right httpd.conf. (Do not forget to remove the line)
When you have found the proper httpd.conf search for DocumentRoot
Insert
Code: Select all
TheDirectiveThatWasnt <>When you have found the proper httpd.conf search for DocumentRoot
Place your test.php into the directory DocumentRoot is pointing to. Then call http://localhost/test.php#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot
Ok, did all that and still I get:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
The line that you said to add "TheDirectiveThatWasn' <>", that worked. When I restarted Apache it said, "Error". Took it out and it restarted fine.
Then I renamed my phpinfo.php to test.php and still, returned the error above.
Do you think that I did something wrong with the installation of PHP? or the editing of the httpd.conf file? I searched and put the required lines in at the end of the section WITHOUT '#' signs infront of it to negate it. Still nothing.
Is there certain areas it must be in? I even upgraded from the version of PHP that was on the CD that came with the book (it was like 5.1.4 and I put in 5.1.6, directly from php.net)
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
The line that you said to add "TheDirectiveThatWasn' <>", that worked. When I restarted Apache it said, "Error". Took it out and it restarted fine.
Then I renamed my phpinfo.php to test.php and still, returned the error above.
Do you think that I did something wrong with the installation of PHP? or the editing of the httpd.conf file? I searched and put the required lines in at the end of the section WITHOUT '#' signs infront of it to negate it. Still nothing.
Is there certain areas it must be in? I even upgraded from the version of PHP that was on the CD that came with the book (it was like 5.1.4 and I put in 5.1.6, directly from php.net)