Editing PHP Files in IDE, Cannot Find Files in Browser

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Editing PHP Files in IDE, Cannot Find Files in Browser

Postby quay » 03. May 2016 17:45

Hi Everyone,

First, I'm running XAMPP 7.0.5-0 with El Capitan Version 10.11.4

I'm trying to build a PHP project with NetBeans. When I try to open a page in any browser though, I get an error message saying the requested URL is not found on this server.

I've made sure the source folder and run configuration URL point to the same place on my Mac HD, but I still get the error. I've tinkered around by copying files to different folders and subfolders on my HD and trying to run them from there but had no luck.

I've had success with this using Bootcamp to run Windows 10 with WAMP on my partitioned HD. There I can use NetBeans to edit and run PHP files because my local server can find the files I'm working on. But with XAMPP on El Capitan, my browser can't find the files no matter what I do.

I hope I've explained the problem clearly. Has anyone encountered the same problem, and/or has anyone found a solution? Thanks in advance for your help.

Best Wishes,

Quay
quay
 
Posts: 3
Joined: 03. May 2016 17:17
XAMPP version: 7.0.5-0
Operating System: El Capitan 10.11.4

Re: Editing PHP Files in IDE, Cannot Find Files in Browser

Postby Nobbie » 03. May 2016 21:29

quay wrote:I've made sure the source folder and run configuration URL point to the same place on my Mac HD


What exactly did you in Xampp, what exactly did you do in Netbeans?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Editing PHP Files in IDE, Cannot Find Files in Browser

Postby quay » 03. May 2016 22:29

In XAMPP I had to change a default port to make MySQL Database start. Apache always worked and continues to work.

In Netbeans, my Project and Source folders are: /XAMPP/www/book_apps/tech_support. The XAMPP folder is directly on my hard drive and doesn't belong to any higher folder.

My Project URL is: http://localhost/XAMPP/www/book_apps/tech_support

This URL is what the browser tries and fails to find and open.
quay
 
Posts: 3
Joined: 03. May 2016 17:17
XAMPP version: 7.0.5-0
Operating System: El Capitan 10.11.4

Re: Editing PHP Files in IDE, Cannot Find Files in Browser

Postby Nobbie » 04. May 2016 10:34

The folder for http://localhost is defined in the Xampp configuration (httpd.conf etc.) and it is called "DocumentRoot". You have to establish, that as well Xampp/Apache and Netbean yield to the same folder. Either change Xampp, or Netbeans or both. The default DocumentRoot for Xampp is something like /Applications/Xampp/xamppfiles/htdocs or similar (I dont have an OSX installation here).
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Editing PHP Files in IDE, Cannot Find Files in Browser

Postby quay » 04. May 2016 16:27

Nobbie,

Thank you for your time and help. I was able to follow your instructions but still couldn't get NetBeans to work with XAMPP. Instead I installed MAMP and it works okay.

Thanks again!

Quay
quay
 
Posts: 3
Joined: 03. May 2016 17:17
XAMPP version: 7.0.5-0
Operating System: El Capitan 10.11.4


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 11 guests