[solved]PHP not executing

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

[solved]PHP not executing

Postby dlm84741 » 10. June 2012 08:51

HI, I'm David from California - and I apologize for asking about the same old problem that's shown up on this forum more than once. But I think mine has a slightly different twist.

Windows XP SP3
xampp win32 1.7.7

Just to be clear, I'm trying to run this code

Code: Select all
<!DOCTYPE html PUBLIC*-//WC3//DTD XHTML 1.0 STRICT//EN
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>PHP Hello World</title>
</head>

<body>
    <p>Hello World from HTML</p>
    <br>
    <p><?php echo "Hello World from PHP"; ?></p>
</body>


I've been learning PHP using David Power's book "PHP Solutions". I installed xampp several weeks ago and after the initial problem with port 80 I got everything running. I'm using Komodo 7.0 as an IDE. After working through several chapters I decided to get a better background in HTML and CSS, so I stopped working on PHP for about 3 weeks. During this time I tried to install Microsoft's C# and it trashed my system; killed my wireless connection and my mouse. I gave up on C# and got the wireless and mouse working again, and didn't think anything more about it.

Today I finished up my HTML and CSS work and returned to PHP - and found my problem.

I've uninstalled and reinstalled xampp. I've stopped IIS and the xampp control panel indicates that Apache and mySQL are running. My local host is (supposedly) c:\xampp\htdocs.

If I ignore the local host designation and enter this in the browser "file:///C:/xampp/htdocs/phpsols/PHP-HelloWorld.php" I only get the "Hello World from HTML". Just like everyone else who has mentioned the problem.

But if I use the local host designation, like this: "http:/localhost/phpsols/PHP-HelloWorld.php", the browser chokes. IE says it can't display the page, Firefox and Chrome say they can't connect to the local host.

So it seems I've trashed the local host parameter (or whatever you call it).

Does that sound correct? Is there anything I can try to repair it?

I'm about to the point of stripping the system down to nothing and start reloading XP from scratch - but I'd really rather not.

Thanks

David
dlm84741
 
Posts: 8
Joined: 08. March 2012 23:22
Operating System: XP sp3

Re: PHP not executing

Postby Altrea » 10. June 2012 12:12

Hi David,

What happens if you just try:
:?:

best wishes,
Altrea
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP not executing

Postby dlm84741 » 10. June 2012 16:43

Cool,

I get an authentication request: "The server localhost:80 requires a username and password" or a browser message saying it can't connect to the localhost. I was getting the browser messages from time to time, but I didn't put two and two together.

I have no idea what username/password the localhost requires. It's not taking any of my regular logins.

Is there any way to clear that (think i already know the answer).

I've tried going in through the sys admin, but somehow I gave the localhost a unique login, could be anything.

Thanks, knowing what the problem is makes me a much nicer person to be around.

David
dlm84741
 
Posts: 8
Joined: 08. March 2012 23:22
Operating System: XP sp3

Re: PHP not executing

Postby Altrea » 10. June 2012 17:07

dlm84741 wrote:Is there any way to clear that (think i already know the answer).

yes, simply delete or rename the \xampp\htdocs\xampp\.htaccess file

dlm84741 wrote:Thanks, knowing what the problem is makes me a much nicer person to be around.

That will not solve your problem with your own php file.
That authentification just protects the sensitive XAMPP Administration Page.

best wishes,
Altrea
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP not executing

Postby dlm84741 » 10. June 2012 18:46

Don't you ever sleep?
dlm84741
 
Posts: 8
Joined: 08. March 2012 23:22
Operating System: XP sp3

Re: PHP not executing

Postby Altrea » 10. June 2012 18:51

dlm84741 wrote:Don't you ever sleep?

Sure i do :lol:
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP not executing

Postby dlm84741 » 11. June 2012 15:25

I've decided to reinstall XP.

How do I mark this post as resolved?

thanks
dlm84741
 
Posts: 8
Joined: 08. March 2012 23:22
Operating System: XP sp3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 138 guests