Search code examples
phphttp-status-code-404wampservernetbeans-8netbeans-11

How to set up a new PHP project in NetBeans IDE (version 8.2 or 11.3) using WampServer?


I have done the following steps, but still I get the error 'Not Found' (with the description: Not Found The requested URL was not found on this server. Apache/2.4.41 (Win64) PHP/7.3.12 Server at localhost Port 80) in tow different versions of NetBeans 8.2 and 11.3.

Step 1. Running WampServer Version 3.2.0 64bit installed on Windows 10 OS ==> I see the green icon in status bar, indicating all services are running.

Step 2. In NetBeans IDE I created a new php project (File > New Project; chosen in the Categories list, PHP). Then next as follow:

NetBeans IDE 8.2 enter image description here and in NetBeans IDE 11.3: enter image description here Step 3. I left the configuration settings by their default values as the following picture:

NetBeans IDE 8.2 enter image description here and in NetBeans IDE 11.3: enter image description here

Finally, when I run the application I get the following output on my browser: Not Found! for both the versions.

enter image description here

Does anybody know how this error can be handled?


Solution

  • I found a way that can solve this problem to set up a local web site configuration as follows:

    1. Click right on the project name and choose properties.
    2. From categories click on Run Configuration
    3. In right panel, from the Run As dropdown list, choose Local Web Site.
    4. In the Project URL field, check the automatically generated URL address. Then specify the port number explicitly, in the format localhost:<port number>. As shown in the screen shot below: enter image description here

    Click OK and run the project again to see the output on the browser. In the picture above, in the Project URL field after the port number, you can add any arbitrary name optionally, like the project name if you are going to have more projects running on the same port.