Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing "Run as... PHP Script" in Eclipse

I have Eclipse 4.2 (Juno) + PDT 3.1.1 freshly installed and i've selected PHP perspective. I've created empty "Test Project" PHP project and added "test.php" file to it. Now i want to run this file as PHP Script. But i simply don't have it in my "Run as..." context menu when i right click on "test.php" file. Please help. I am exhausted.

Additional information:

  • I have php5 installed on my PC and i can run .php files in my Windows command line window using "php filename.php" syntax.

  • I've tried same thing in so-called "All-in-one" Eclipse+PDT package. Same problem.

like image 607
Rokannon Avatar asked Jul 30 '12 17:07

Rokannon


People also ask

How do I run a PHP script?

php” file is placed inside the “htdocs” folder. If you want to run it, open any web browser and enter “localhost/demo. php” and press enter. Your program will run.

Can we write PHP code in Eclipse?

To run PHP and Eclipse you need a working web server with PHP installed, a Java runtime environment and last but not least a copy of Eclipse. You might also want a copy of MySQL running and a debugger but these are optional extras.


1 Answers

Go to Preferences>PHP>Debug, check "Enable CLI Debug" on.

like image 175
atlanto Avatar answered Sep 23 '22 05:09

atlanto