|Can't run PHP scripts at all [message #653999 is a reply to message #653659]
||Sat, 12 February 2011 17:57
Registered: February 2011
Location: Central MN
It seems there are a number of similar threads about people having trouble running PHP scripts. None that I have come across have been answered (save this one, but I started with downloading and installing the OP's linked installer.|
I'm VERY new to Eclipse and I'm using it to learn from a book about OOP in PHP. I can't for the life of me figure out how to view PHP scripts in a browser.
My project is located in an Eclipse Projects folder in My Documents. If I run one of the book's HTML files (also in the project folder) from Eclipse, my default browser opens and the page displays properly. But if I try to Run a PHP script - even a simple
<?php echo 'Hello, world!'; ?>
- it won't run.
If I select "run as a PHP script", a message window opens titled "Launch Error - Session Terminated" with the message "The session could not be started. In order to generate debug information, please make sure that the debugger is properly configured as a php.ini directive."
If I select "run as a PHP web page", another tab opens in Eclipse and I get the standard message when IE can't find a web page ("This program cannot display the webpage. Most likely causes: You are not connected to the Internet...") This makes sense because the tab's address bar is pointing to http://localhost/MyProject/filename.php, and that file isn't there - it's where I'm working on it: in the project folder in My Docs.
I have a WAMP server setup and running and I know that works, as I use that for Dreamweaver development, but I'm guessing I shouldn't have to work on my Eclipse project directly on the server.
It seems to me that the cause is because Eclipse is not deploying the file(s) in question to the server, hence the "file not found" error when I try to view the script as a web page. I must be missing some sort of setup area that would resolve this, but I can't figure it out. I've looked at the Run Configurations page, but again, I don't see how to fix this there.
Any help will be greatly appreciated!
Sorry if I'm not providing enough or the right information for you to help me. Let me know and I'll be glad to post more info!
Thanks in advance.
Powered by FUDForum
. Page generated in 0.02689 seconds