WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.vc.shawcable.net)
Date: February 13, 2020 10:39PM

Hi all,

I have tried many methods (Setting.json, environment variable, reactivate...etc.) found on Google but nothing worked for me. All my sites used to load no problem but suddenly one day it stopped loading. When I load "live server" in VS code, it just loads the directory for file download. If this is not a WAMP problem please do provide potential solution as I cannot tell why this is happening and do not know what to do to fix this.

1 - Windows version used (Specify version number AND whether 32 or 64 bit): WIndows 10 64bit

2 - Version WampServer (Specify version number AND whether 32 or 64 bit): Wamp 3.1.7 64bit

3 - Apache Version/ 4 - PHP Version/ 5 - MySQL Version/ 5a - MariaDB version if applicable:
Apache 2.4.37 Port 80- PHP 7.3.1
MySQL 5.7.24 Port 3306
MariaDB 10.3.12 Port 3307
PHP 5.6.40 for CLI (Command-Line Interface)

6 - What color is the WampServer icon (in the notification area of the taskbar): green

7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines?: 127.0.0.1 localhost
::1 localhost


8 - Do you have access to localhost (Homepage WampServer)?
8a - If so, is there an error message at the bottom of the page? No

9 - Do you have access to phpMyAdmin? Yes

10 - If you refer to an error message, please include the EXACT wording of the error in your post: N/A

11 - If you use an Antivirus and / or Firewall, please include the names of these: Windows Defender but changed nothing

12 - What is the full path to the installation of WampServer (eg D:\wamp\): C:\wamp64

13 - If you have one or more Virtual Hosts defined, please show their definition(s): N/A


This is what I see when I try to load my php file: [i.stack.imgur.com]


If I missed anything my apologies. I would really like to solve this issue so I can fix my site locally. Thank you!

K.

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: RiggsFolly (Moderator)
Date: February 13, 2020 10:53PM

Why on earth are you using port 5500?

Do you have a index.php file in that folder?
Did you mess with the c:\wamp\www folder? you shoudl NOT amend that folder.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.vc.shawcable.net)
Date: February 13, 2020 11:04PM

I didn't change any port setting myself. I had this setup when I was in school but now I don't know why it won't load php

My sites are in the www folder as taught.

What can I do to fix this problem? please help.

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: RiggsFolly (Moderator)
Date: February 14, 2020 10:55AM

Hi

If a directory does not have a index.php or index.html file in it, you get a directory listing.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.vc.shawcable.net)
Date: February 14, 2020 04:38PM

Hi,

It does have index.php. I tried loading my sites and it still gives me the directory.

Another potential issue thats causing this? Thank you!

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Otomatic (Moderator)
Date: February 14, 2020 04:44PM

Hi,

.htaccess file in the root directory.

And... remember RiggsFolly ask : "Why on earth are you using port 5500?"

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.bchsia.telus.net)
Date: February 15, 2020 04:11AM

Hi,


htaccess file is within the individual folder of the website. Should it be elsewhere? I never moved them hence this problem appeared.

I did answer RiggsFolly. I did not set up the port myself. It was setup with the instructor when I was in school. I do not recall exactly the settings to make it port 5500. Is this a bad thing? Please do kindly explain as I do not understand.

Thank you!

K.

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Otomatic (Moderator)
Date: February 15, 2020 09:50AM

Hi,

If your instructor hasn't explained to you why he's using port 5500, he's a bad instructor.

The http protocol uses port 80 by default. If another port is to be used, Apache must be explicitly told to listen on that port.

So don't put a port number in your http requests.

As for the .htaccess file, this was to tell you that directives in this file can modify the http access conditions.

Since you can access the Wampserver homepage 'http://localhost/' and PhpMyAdmin without any problem, this is not a problem related to Wampserver.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.bchsia.telus.net)
Date: February 17, 2020 04:18AM

Hi Otomatic,

Do you have reliable sites that I can refer to to understand more about "port" ? How it works with WAMP?


Then for my case, what could be the problem given your expertise in this field? Is it because of my VS code? What else can I potentially do to fix the problem I have on hand.


Thank you!

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Otomatic (Moderator)
Date: February 17, 2020 10:30AM

Hi,

Do Internet search (Wikipedia) :
- What is port number
- What port does Internet access use?

On the image you gave the link, you can see: 127.0.0.1:5500 so request to use port 5500 instead of the default port 80.
You have to do the same but without adding port 5500, so only 127.0.0.1.

If the file 'testingJan.php' is in the folder wamp64/www/mysite/testingJan.php you can launch it by :
'http://localhost/mysite/testingJan.php'
or, if you have defined a VirtualHost for the mysite folder with ServerName 'JanSite' as ServerName, you can start it with :
'http://JanSite/testingJan.php'

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.vc.shawcable.net)
Date: February 20, 2020 04:18AM

Hi,

I'll look up on those.

I am not sure how it was setup to request 5500 to begin with. I guess i'll have to Google that as well to remove that.

I can use localhost but doing "GO LIVE" in VS code and run php is better than doing localhost? Unless I am wrong?

K.

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Otomatic (Moderator)
Date: February 20, 2020 10:12AM

Hi,

VS code is not part of Wampserver, so we can't give an opinion on it.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.2/7.3.14/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: WAMP not loading PHP - tried many methods but failed
Posted by: Kalyori (---.vc.shawcable.net)
Date: February 20, 2020 08:31PM

Hi,

Dont worry, I understand. Thank you for your help though the issue remains. Hope I can figure out why soon, now knowing that it is not an issue with WAMP.

K.

Options: ReplyQuote


Sorry, only registered users may post in this forum.