A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearPHP: Messaging/Logging to Eclipse Console? - page 1
User InfoPosts
PHP: Messaging/Logging to Eclipse Console?#1
Is it possible to send messages from a PHP script to the console in Eclipse? Has anyone attempted this already? I'm not very familiar with how the console works, so I'm not sure if there is a standardized method for communicating with it.

posted date: 2008-12-16 16:31:00

Re: PHP: Messaging/Logging to Eclipse Console?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-16 16:31:01

Re: PHP: Messaging/Logging to Eclipse Console?#3
All output from an Eclipse external tool launch goes to the console by default, so if you execute a PHP script using an external tool launcher any output from the script will go to the console.For example:<?phpecho "Hello World\n";?>Will send "Hello World" to the console.

posted date: 2008-12-17 07:52:00

Re: PHP: Messaging/Logging to Eclipse Console?#4
If you look at...Main Menu -> Run -> External Tools -> Open External Tools Dialog.In there I have set up PHP Codesniffer with the following...Name : Code SnifferLocation : /usr/bin/phpcsWorking Directory : ${workspace_loc}Arguments : --standard=${resource_loc}That runs the codesniffer as an external tool and all the messages it returns appear in the console. Once you have set it up, click the down arrow and choose "Code Sniffer" and then anything the external program (in this case codesniffer) outputs will be in the Eclipse console.If you set it up like this...Name : PHPLocation : /usr/bin/phpcsWorking Directory : ${workspace_loc}Arguments : ${workspace_loc}${resource_path}It will just run php in CLI mode and if you run it with Wilco's code (above) you will get.Hello WorldIn the terminal.Hope that helps.

posted date: 2008-12-29 15:16:00

Re: PHP: Messaging/Logging to Eclipse Console?#5
Any echo or print you do should go to the console automatically. This has been very unreliable for a long time, however. Please vote to have this bug fixed at:https://bugs.eclipse.org/bugs/show_bug.cgi?id=282997

posted date: 2010-02-09 08:02:00

Re: PHP: Messaging/Logging to Eclipse Console?#6
I also found better results using the External Tools option to run a local PHP script as opposed to the actual Run As -> PHP Script option. I have voted up that Eclipse bug too.

posted date: 2011-01-14 07:08:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.