SOLVED - PHP does not run

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SOLVED - PHP does not run

Postby debchat1955 » 05. May 2015 23:38

Newcomer to XAMPP.

Created simple php code (filename=page534.php) and dropped the file in htdocs folder.

http://localhost/page534.php

I get an error message
"Unable to connect".

From XAMPP console, I can see that apache is running.
4:06:00 PM [Apache] Attempting to start Apache app...
4:06:00 PM [Apache] Status change detected: running

From the console, I clicked on ADMIN button next to Apache. Same error message.
Cannot see any of the logs.

Went to the physical directory
C:\xampp\apache\logs
There is only one old file install.txt

Any help is appreciated from experienced user.
Last edited by debchat1955 on 07. May 2015 15:19, edited 1 time in total.
debchat1955
 
Posts: 4
Joined: 05. May 2015 23:27
Operating System: Windows 8.1

Re: PHP does not run

Postby Altrea » 06. May 2015 00:11

contents of this simple php file?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8288
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: PHP does not run

Postby mark.mcdonald » 06. May 2015 14:26

Does your php file start with "<?php"? Are you trying to connect to your mysql database but the privileges in your mysql and what is in your php file don't match?
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: PHP does not run

Postby debchat1955 » 07. May 2015 01:24

Here is the content of page534.php file -

<?php
phpinfo();
?>
debchat1955
 
Posts: 4
Joined: 05. May 2015 23:27
Operating System: Windows 8.1

Re: PHP does not run

Postby debchat1955 » 07. May 2015 01:34

In fact, when I try http://localhost/xampp/ then also I get the same error message. "Unable to connect".

From XAMPP console, I find this apache error message.
[Tue May 05 17:20:02.739844 2015] [ssl:warn] [pid 3516:tid 392] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

I have the impression that I missed some initial configuration step during XAMPP installation. Any ideas? Thank you.
debchat1955
 
Posts: 4
Joined: 05. May 2015 23:27
Operating System: Windows 8.1

Re: SOLVED - PHP does not run

Postby debchat1955 » 07. May 2015 15:23

Problem solved by editing /etc/hosts file.

Locate the file in C:\Windows\System32\drivers\etc
Uncomment the lines
127.0.0.1 localhost
::1 localhost

Restart Windows. Restart XAMPP console.
I got warning message for certificate which I accepted for private computer.

After that I could get my simple php program to work.
debchat1955
 
Posts: 4
Joined: 05. May 2015 23:27
Operating System: Windows 8.1


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests