PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Sep 19, 2019 12:39 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Jul 18, 2014 2:47 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
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


Top
 Profile  
 
PostPosted: Fri Jul 18, 2014 3:19 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Jul 18, 2014 3:25 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Additionally, there are applications like or that provide most all of what you'll need in a single install. Finally, . 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.


Top
 Profile  
 
PostPosted: Fri Jul 18, 2014 3:45 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
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


Last edited by bowlesj on Sat Jul 19, 2014 5:34 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jul 18, 2014 5:02 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
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.


Top
 Profile  
 
PostPosted: Fri Jul 18, 2014 5:12 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
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 :wink:

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group