My first PHP program with XAMPP

I got the installation to go correctly. I put a sample program in the htdocs directory and I could not successfully load it into Internet Explorer or any other browser. I was hoping that someone here on this website could give me a synopsis of the simplified general case to getting a PHP script to load and attempt to run.
Leonard GojerCAD Technician/ProgrammerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have you tried to reach the page like this:

It is always a good idea to put each application in a different folder.

If you have set a different port (80 is default) you will need to add it to the url.

If your PC is running 64bit make sure you have installed the appropriate package.
Make sure Xampp is running and the services are started.
Make sure nothing (antivirus, firewall) is blocking port 80 (sometimes software like Skype may use the port already).

I'm using Wampserver I find it is easier to use

If you have an error message check if you have a .htaccess file that may cause the issue.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
thank you for responding to my question. I am not at that computer right now, and I won't be there until about the end of the day. When I get there, I will down the list of your steps.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
(go down the list of your steps)
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Julian HansenCommented:
First and foremost - did you start the Apache service?
What OS?
What if you browse to the server name?
Brian TaoSenior Business Solutions ConsultantCommented:
Start with an HTML file.  Put a simple test.html in htdocs folder with the following content:
<title>Test Page</title>
<p>It works!</p>

Open in new window

Open a browser window and point to http://localhost/test.html.  If it displays correctly then proceed to try PHP script.  If not, your installation/configuration is having problems (or like other experts' question: did you start your Apache service?)
Dave BaldwinFixer of ProblemsCommented:
The version of XAMPP that I have puts it's own 'index.php' in the 'htdocs' directory and intercepts and redirects the browser to it's admin pages.  Is that what you are seeing?
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
I placed the 'test.html' file in the htdocs directory. then I started Apache and went to:


It gave me an error saying that the file was not there
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
I also tried other spellings such as localhost/test.html and got the same result
Dave BaldwinFixer of ProblemsCommented:
"localhost/test.html" works fine for me so I think you have other problems going on.  What does work?  Does anything?  Do you get the XAMPP admin pages at 'http://localhost/'?  If not, you should probably uninstall and then re-install XAMPP.  Maybe even download a new copy.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
I can get the admin pages.

I wish that there was a reference book to this set of chores.
Dave BaldwinFixer of ProblemsCommented:
This is pretty basic stuff.  Please show us a screen shot of the page you get when you go to http://localhost/ .  Is there a reason that you are not running Apache and MySQL as services so they are always available?
Julian HansenCommented:
Can you locate your Apache httpd.conf (or similar) file - if so can you post that.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
My problem is that I have a limited resource of time and money to devote to this task. I was hoping that all of what you are saying was spelled out in a textbook so that I could learn it at my own pace rather than take up your time for several hours here on the internet.

My hope was to start writing PHP programs in a self-paced way, but I think now what I have to do is uninstall a lot of software from my machine, because it is overloaded with all of this software that I purchased or downloaded for free.

I'm trying to do more than what fits in the available time to do it right.

In my prior work, I was successful with C# and I have a lot of C# coding to produce. Right now, I am taking a courses in school and some free courses online that aren't for a grade. I think that I have to postpone this idea. I have about 30 different pieces of software installed that I ambitiously wanted to use simultaneously, and that is too much.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
When you take a course in school, the timing is worked out by the course material so that you can finish the tasks on time, but I didn't account for the time here correctly.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
I know what the solution to this is: I have to rework my system of machines.

I have a cloud based machine on GoDaddy. I am going to move a lot of software to that cloud based machine and then try to do this all over again when I get to that point.
Brian TaoSenior Business Solutions ConsultantCommented:
Another question: maybe port 80 is occupied by IIS? so that the admin screen you saw was actually the IIS admin page and your Apache has never been started correctly

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
I think that I am going to close this question and postpone this idea until I get enrolled in a good course in PHP at the junior college.
Leonard GojerCAD Technician/ProgrammerAuthor Commented:
Sorry for taking your people's time.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.