Not getting it to work.

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

Not getting it to work.

Postby Arbu » 03. April 2017 16:39

OK so I've downloaded XAMPP v 3.2.2. I've put my php file, along with a number of other files that it references, in the folder C:\xampp\htdocs and successfully started Apache and My SQL through the XAMPP control panel. I then double click on my php file to open it in Chrome. That's my understanding of what I have to do.

But it doesn't work. I just see the code listed in the browser. What am I doing wrong?
Arbu
 
Posts: 2
Joined: 03. April 2017 16:33
XAMPP version: 3.2.2
Operating System: Windows 7

Re: Not getting it to work.

Postby Altrea » 03. April 2017 19:55

Arbu wrote:I then double click on my php file to open it in Chrome.

That's wrong. You need to request the file the same way as it would be placed on any webserver on earth.
Therefore you have a special domain name pointing to your very own computer: localhost.
So your URL should start with http://localhost/
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: Not getting it to work.

Postby Arbu » 03. April 2017 20:28

Oh yes I forgot about that, apologies.

So it now works with a simple php file. But I have another file which I have copied over from my website, along with a related sql database. And for this I get the error:

"There was a problem

Unable to connect to MySQL"

I have SQL running in the control panel. Any thoughts as to what I might be doing wrong?
Arbu
 
Posts: 2
Joined: 03. April 2017 16:33
XAMPP version: 3.2.2
Operating System: Windows 7

Re: Not getting it to work.

Postby Altrea » 03. April 2017 20:30

Wrong credentials?
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: Not getting it to work.

Postby Nobbie » 03. April 2017 20:38

Arbu wrote:Any thoughts as to what I might be doing wrong?


Which Database do you try to connect in your PHP script? Which UserID do you apply for the connect and which password do you apply? And finally which server do you connect?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 146 guests