Don't tell me I need a server, because I can manually go to terminal and write "php filename.php" and it will run it successfully for me. I just need to know how I can do it from Geany.


enter image description here

gnome-terminal -e "php %f" is what I had in mind, but it doesn't work, gives an error. Any suggestions?

  • 1
    Try just php %f - the default Geany execution environment already already knows to use your session's x-terminal-emulator – steeldriver Jun 15 '14 at 1:22
  • @steeldriver Tried this, didn't run at all? Where is it supposed to output? – hexagonest Jun 15 '14 at 1:25
  • It should pop up a terminal window when you invoke the execute action. Where did you write php "%f"? it should go in the Execute box under the Build --> Set build commands menu item. Note I missed the double quotes in my previous comment. – steeldriver Jun 15 '14 at 1:38
  • @steeldriver Weird, that doesn't work for me. – hexagonest Jun 15 '14 at 1:43
  • @steeldriver oops, I guess I didn't quote it. Works fine, thanks! – hexagonest Jun 15 '14 at 14:25

Answering my own question.

Use the command php "%f". It should automatically run it in the little window on the bottom.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.