Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » local running and debugging php setup(why do i need apache server running?)
local running and debugging php setup [message #685360] Fri, 17 June 2011 10:45 Go to next message
freetochoose is currently offline freetochooseFriend
Messages: 19
Registered: May 2011
Junior Member
Hi:

I am new to php. I have been using Eclipse for java for some time and have done
some simple html and php website stuff without a debugger.
But I cannot understand why I need to have my Apache running when I run or debug a php file locally.
As I understand, when your browser reads a file remotely, the server (Apache) on the romote machine will read the file requested and let php do its work if needs be.
THen send the resulting file back to your browser.
Now I have all my php files locally on my machine, there is no need for the Apache server running at all.
PDT can just read my php file and call php.exe to parse it and send the resulting file
to an internal browser or external browser such as firefox. this does not involve
the need of a server at all.
Now I need to have my Apache running and create a link of my php files to the web
root directory. and if i create more php files in different directories, i will need
to create more links so Apache can read these files.
This is quite unnecessary since all the files are on my local machine.
Am I missing something or setup something wrong here?
Any help is appreciated. I really just want to run and debug php, html files on my local harddrives.

ftc
Re: local running and debugging php setup [message #685735 is a reply to message #685360] Sat, 18 June 2011 17:12 Go to previous messageGo to next message
Carsten   is currently offline Carsten Friend
Messages: 9
Registered: June 2011
Location: Bonn, Germany
Junior Member
In general you've got two options:
Either create a Run/Debug configuration for a single PHP script (that would be the same as calling it from the console) or a configuration for a PHP Web Page (that would be the same as calling the script via an http request).

From what you write ("and send the resulting file to an internal browser or external browser such as firefox") I conclude you want to see the result in a web browser, wich involves the http protocol, so a web server is needed. So in your case you will have to use the PHP Web Page configuration, which implies that you have a fully functional webserver running.

You can, of course, also call the script like you do from the console. But then the result will not be passed to a browser but just displayed as plain text in the console. Alternatively you can print the output to a file (in your case probably a HTML file) and then manually launch the browser and open that file...
Re: local running and debugging php setup [message #685749 is a reply to message #685735] Sun, 19 June 2011 08:58 Go to previous message
freetochoose is currently offline freetochooseFriend
Messages: 19
Registered: May 2011
Junior Member
thank you very much.

ftc
Previous Topic:Cannot "Run As" in eclipse PDT (Php script)
Next Topic:Configuring wamp server and eclipse php
Goto Forum:
  


Current Time: Fri Mar 29 05:39:55 GMT 2024

Powered by FUDForum. Page generated in 0.03968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top