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
Problems with a first time install of php
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Problems with a first time install of php
Well ... there's your problem!bowlesj wrote:Hi, I have been programming 33 years in 11 programming languages
just kidding...bowlesj wrote: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.
Make sure you installed the correct Visual C++ for your computer x86 / 32bit / 64bit. It also needs to be the correct version for the Apache and PHP you installed. You may have the incorrect one installed.bowlesj wrote: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.
(#10850)
Re: Problems with a first time install of php
Additionally, there are applications like XAMPP or WAMP that provide most all of what you'll need in a single install. Finally, Vagrant. Vagrant is definitely a little more involved to set up, but it's definitely worth the effort. Per-project virtual machine with exactly and only the applications/extensions you need, all in a small provisioning file that you can add to your VCS repo, and all without cluttering up your own machine.
Re: Problems with a first time install of php
LOL - yeah. Your probably right. You would think I would learn. After having programmed 11 languages (only 2 of them lately by the way) what am I doing learning 3 more languages (or 4 if I include Javascript).
I had my heart on getting down to basics and using what I gather would be "good old fashion Apache" however I will try anything at this point (never had this much trouble installing anything before). Like you said Christopher I may have to uninstall the PHP and try the one that PHP.net suggested.
I guess I was running it correctly. I just found the link again where it told me how to run the php file. I had forgotten that. Long day.
http://www.phpknowhow.com/basics/running-php-files/
Your comments give me hope and direction.
Thanks,
John
I had my heart on getting down to basics and using what I gather would be "good old fashion Apache" however I will try anything at this point (never had this much trouble installing anything before). Like you said Christopher I may have to uninstall the PHP and try the one that PHP.net suggested.
I guess I was running it correctly. I just found the link again where it told me how to run the php file. I had forgotten that. Long day.
http://www.phpknowhow.com/basics/running-php-files/
Your comments give me hope and direction.
Thanks,
John
Last edited by bowlesj on Sat Jul 19, 2014 5:34 am, edited 1 time in total.
Re: Problems with a first time install of php
I installed the version of PHP that the php.net suggested (hidden in the archives which I found via a google search) and managed to get rid of the error which I have listed below.
"The program can't start because MSVCR110.dll is missing from your computer. Try re-installing the program to fix this problem."
So that feels good - LOL. Unfortunately it still can't find the phpinfo.php file via a browser call. Maybe I will reboot again. If in doubt always reboot! LOL.
"The program can't start because MSVCR110.dll is missing from your computer. Try re-installing the program to fix this problem."
So that feels good - LOL. Unfortunately it still can't find the phpinfo.php file via a browser call. Maybe I will reboot again. If in doubt always reboot! LOL.
Re: Problems with a first time install of php
Success! The reboot worked - LOL. Not sure if that was the real solution but I don't care at this point - LOL.
The only thing is I have the phpinfo.php script file in about 4 places. I just have to do the good old process of elimination step to figure out the proper location and it is all done.
It turns out the browser command "localhost/phpinfo.php" executed the file from "C:\Apache\Apache2\htdocs". Thats just amazing - LOL. Tomorrow I will be a master PHP programmer
The only thing I am not sure about is if I got the safe thread version or not. There was no comment in the old archives. At least it works for now.
Thanks again guys, your inspiration and guidance was very helpful. I was thinking I would never get this thing running. Now it is back to smiles again.
John
The only thing is I have the phpinfo.php script file in about 4 places. I just have to do the good old process of elimination step to figure out the proper location and it is all done.
It turns out the browser command "localhost/phpinfo.php" executed the file from "C:\Apache\Apache2\htdocs". Thats just amazing - LOL. Tomorrow I will be a master PHP programmer
The only thing I am not sure about is if I got the safe thread version or not. There was no comment in the old archives. At least it works for now.
Thanks again guys, your inspiration and guidance was very helpful. I was thinking I would never get this thing running. Now it is back to smiles again.
John