0

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?

Ali Safari
  • 1,535
  • 10
  • 19
  • Did you realise we are on NetBeans 11 now? – RiggsFolly Mar 18 '20 at 18:28
  • I have just tried it with NetBeans 11.3, but the result remained just the same. So, the NetBeans versions are not the reason to get this error, perhaps my php project run configuration needs to be tweaked. – Ali Safari Mar 18 '20 at 19:32
  • I managed to get the right output using Internal WebServer of NetBeans 11.3 IDE. But with an external WebServer (Wamp64) still I get Not Found error. – Ali Safari Mar 18 '20 at 19:45

2 Answers2

0
  1. your sources Folder is c:/wamp64/www/Netbeans/php
  2. so your Project URL had to look like this http://localhost/Netbeans/php
  3. Have you create the index.php file?

There is a simple test, type in your browser: http://localhost when there is a folder named Netbeans open it next click on the php folder and in this folder there should be the index.php file when you created it

Pesi
  • 81
  • 1
  • 6
  • to nr. 1: Yes, nr.2: Your suggested url gives the same result, nr.3: Netbeans created the index file with placeholders automatically. Thanks for helping. – Ali Safari Mar 18 '20 at 18:53
  • by the way, in the localhost (viewed in the browser) I found NetBeans in the column called "Your Projects". But it is not clikable! So unfortunately I cannot test it as you recommended. – Ali Safari Mar 18 '20 at 19:37
0

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.

Ali Safari
  • 1,535
  • 10
  • 19