Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Friday, November 6, 2009

PHP - killing long running exec process

Was writing a php script to run in commandline to process some files. Part of it is to run a 'whois' command from within PHP, but it hang (ip is 74.220.96.0). I don't know why.

Anyway, I searched and found this:
<?
exec("command & sleep 3 ; kill $!");
?>

Saturday, March 7, 2009

Aptana with cakePHP


Aptana is a pretty good IDE (http://www.aptana.com/) based on Ecplise.

The great thing is that it works with cakePHP.

Just one thing is that cakePHP v1.2 have the views with a ".ctp" extension and Aptana does not handle the code colouring, etc. Luckily this is an easy fix:

Click Window->Preferences...

Select General->Editors->File Associations

Click the "Add.." button and add in *.ctp

*.ctp will appear under "File Types". Click on *.ctp and click the "Add.." button for Associated Editors. Select Aptana PHP Editor.

Done.