Localhost server with xampp

Pseudo -  
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   -

Hello,

I am using XAMPP on Windows and I would like to know why when I try to launch my site (inscription.php) with the port for MySQL it shows me:

"This page is not working

localhost sent an invalid response."

If you can help me.

I am attaching a photo of the XAMPP code and the error.

Thank you in advance.

5 réponses

barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 

Hello,

Your site is not running on port 3306; it's MySQL that uses this port.



0
Pseudo
 

So what do I do?

0
barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 

Try HTTP ports: 80 or 443

0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 

Hello,

The default port being 80, it is not even necessary to specify it in the URL

just go to: http://localhost/

If your registration page is indeed in the www or httdocs folder (I can't remember with xamp), in this case, the URL will be

http://localhost/inscription.php

By the way, here are some useful info to integrate into your site:

https://forums.commentcamarche.net/forum/affich-37584947-php-gestion-des-erreurs-debogage-et-ecriture-du-code

https://forums.commentcamarche.net/forum/affich-37584941-php-pdo-gerer-les-erreurs$

This will surely save you from future questions about PHP...


.
Best regards,
Jordane

0
Pseudo
 

Thank you both!! I will try that later.

0
Pseudo
 

With port 443 it returns:

"Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.


Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at www.example.com Port 443."

Port 80 redirects me to the XAMPP site for Windows.

And finally, when I put http://localhost/inscription.php it shows me:

"Not Found

The requested URL was not found on this server.


Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at localhost Port 80."

I don't understand why this is happening. However, the website folder is indeed in the htdocs folder.

0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830 > Pseudo
 

Can you show us a screenshot of the structure of your files in the httdocs?

0
Pseudo > jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention  
 
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830 > Pseudo
 

You have a subfolder... (remove the space in the name and replace it with a hyphen or an underscore)

Then you need to include it in the path

http://localhost/site-web/inscription.php

0
Pseudo
 

Okay it's fine except this time it shows this:

0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 

There is another issue here.

I therefore invite you to mark this discussion as RESOLVED, and then to create a new discussion (in the correct forum) regarding this new issue.

By the way, please make sure to post your code correctly on the forum by using the designated icon when writing a message.

I also see that you did not follow the instructions given in the links I provided you… it would be good to do so.

And finally... the error message you are showing us concerns a connection issue with the database.

Either your password is incorrect... or the name of the database...

0