Problems with a first time install of php
Posted: Fri Jul 18, 2014 2:47 pm
Hi, I have been programming 33 years in 11 programming languages and I don't like to ask unless I have to but I guess I have to. It has been a long day trying to get this problem resolved.
I am completely new at PHP, HTML, MySql and Apache. I have spent a few weeks reading a book on setting up my own Database driven website as well as doing an overview of the primary PHP, HTML, MySql and CSS commands. So today I felt I had enough reading under my belt and I should dive in so I decided to install PHP and Apache on my Windows 7 machine. The books instructions were old so I found a great video below.
http://www.youtube.com/watch?v=6Y6lOHov3Bk
The Apache install succeeded (determined from keying in localhost on the browser and getting a web page telling me "if I see this the install was successful").
I can also pull up the Apache monitor so I assume this confirms the install was successful.
The PHP install I am not sure about.
I can not get the system to find the PHPinfo.php file which the person in the video suggested I set up to test the install's success or failure. The file contains
<?php
PHPinfo();
It has no ending ?> which I gather from my readings is actually better to leave out in certain situations (can't remember the details).
I am not sure if I am doing what is on the next line correctly.
I am typing in LocalHost/phpinfo.php from a browser window to try and run the php file.
I placed the PHPinfo.php fin in C:\Apache\Apache2\htdocs (this is the path set the video suggested I install into and my goggle research suggested I put the php file in htdocs)
Failing that, I created "C:\Program Files\Apache Software Foundation\htdocs" and put it in there (no luck on that one using the same method to get at it).
I even tried putting it in the C:\PHP directory which the video suggested for the install.
I watched the video again and placed it inside a directory inside my Users directory then used the method the person in the video used and again I got the web page saying it could not be found.
Okay, so here is what makes me wonder if I am doing it correctly but there may be another problem.
If I do what the video said and test PHP is running using Windows/start button/ cmd and enter the command "php - v" at the command prompt I get this error.
"The program can't start because MSVCR110.dll is missing from your computer. Try re-installing the program to fix this problem."
Okay so I did more Google searches and found this link.
http://pcsupport.about.com/od/findbyerr ... -error.htm
and I installed
"Visual C++ Redistributable for Visual Studio 2012 Update 4" which I gather installed this dll. (No luck on this try).
Okay so I searched for the msvcr110.dll and it is in the directory it is suppose to be.
If I go into the windows/start search box and key in php at the top I see php.exe at the top of the list under a grouping for programs suggesting it is in fact installed.
If I try to execute the php.exe directly I get the very same error message which I mentioned above.
I went to php.net and they suggested a slightly older PHP be installed for Apache 2.0. I was going to uninstall and redo it all with that one but I could not find good uninstall instructions.
I started at about 8am and I guess I have to ask after all to find out if I am calling the file wrong or if the error I am getting is the likely cause.
I don't think I made any mistakes in following the video.
Thanks for any suggestions,
John
I am completely new at PHP, HTML, MySql and Apache. I have spent a few weeks reading a book on setting up my own Database driven website as well as doing an overview of the primary PHP, HTML, MySql and CSS commands. So today I felt I had enough reading under my belt and I should dive in so I decided to install PHP and Apache on my Windows 7 machine. The books instructions were old so I found a great video below.
http://www.youtube.com/watch?v=6Y6lOHov3Bk
The Apache install succeeded (determined from keying in localhost on the browser and getting a web page telling me "if I see this the install was successful").
I can also pull up the Apache monitor so I assume this confirms the install was successful.
The PHP install I am not sure about.
I can not get the system to find the PHPinfo.php file which the person in the video suggested I set up to test the install's success or failure. The file contains
<?php
PHPinfo();
It has no ending ?> which I gather from my readings is actually better to leave out in certain situations (can't remember the details).
I am not sure if I am doing what is on the next line correctly.
I am typing in LocalHost/phpinfo.php from a browser window to try and run the php file.
I placed the PHPinfo.php fin in C:\Apache\Apache2\htdocs (this is the path set the video suggested I install into and my goggle research suggested I put the php file in htdocs)
Failing that, I created "C:\Program Files\Apache Software Foundation\htdocs" and put it in there (no luck on that one using the same method to get at it).
I even tried putting it in the C:\PHP directory which the video suggested for the install.
I watched the video again and placed it inside a directory inside my Users directory then used the method the person in the video used and again I got the web page saying it could not be found.
Okay, so here is what makes me wonder if I am doing it correctly but there may be another problem.
If I do what the video said and test PHP is running using Windows/start button/ cmd and enter the command "php - v" at the command prompt I get this error.
"The program can't start because MSVCR110.dll is missing from your computer. Try re-installing the program to fix this problem."
Okay so I did more Google searches and found this link.
http://pcsupport.about.com/od/findbyerr ... -error.htm
and I installed
"Visual C++ Redistributable for Visual Studio 2012 Update 4" which I gather installed this dll. (No luck on this try).
Okay so I searched for the msvcr110.dll and it is in the directory it is suppose to be.
If I go into the windows/start search box and key in php at the top I see php.exe at the top of the list under a grouping for programs suggesting it is in fact installed.
If I try to execute the php.exe directly I get the very same error message which I mentioned above.
I went to php.net and they suggested a slightly older PHP be installed for Apache 2.0. I was going to uninstall and redo it all with that one but I could not find good uninstall instructions.
I started at about 8am and I guess I have to ask after all to find out if I am calling the file wrong or if the error I am getting is the likely cause.
I don't think I made any mistakes in following the video.
Thanks for any suggestions,
John