Page 1 of 1

SOLVED - PHP does not run

PostPosted: 05. May 2015 23:38
by debchat1955
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.

Re: PHP does not run

PostPosted: 06. May 2015 00:11
by Altrea
contents of this simple php file?

Re: PHP does not run

PostPosted: 06. May 2015 14:26
by mark.mcdonald
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?

Re: PHP does not run

PostPosted: 07. May 2015 01:24
by debchat1955
Here is the content of page534.php file -

<?php
phpinfo();
?>

Re: PHP does not run

PostPosted: 07. May 2015 01:34
by debchat1955
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.

Re: SOLVED - PHP does not run

PostPosted: 07. May 2015 15:23
by debchat1955
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.