Archive for the ‘PHP’ Category

Zend Server CE on OSX 10.6 Snow Leopard

No Comments » by Jon Hibbins on 18 October 2009
Filed under: MySQL, PHP

When I installed Zend Server CE on OSX 10.6 Snow Leopard the admin interface failed, the following fixed the issue :

1. Download this: Watchdog update

2. Backup watchdog with the command

sudo mv /usr/local/zend/bin/watchdog /usr/local/zend/bin/watchdogOLD

3. Extract the new watchdog to /usr/local/zend/bin/ (I used the go to folder in finder, if you can view hidden files)

4. Run the following command to restart the Zend server

sudo /usr/local/zend/bin/zendctl.sh restart

4 Coding tips

No Comments » by Jon Hibbins on 26 August 2009
Filed under: .NET, C#, Code, Java, Objective-C, PHP, Quick Tips, Software Development

1: Delete It !
If a chunk of code comment or class is not used, don’t comment it out, just delete it.

2: Write clear code.
“make sure you document code that’s hard to understand”. Question: why is the code hard to understand?

3: Comment
Comments can indeed be useful but mostly as a summary of action

4: Don’t Repeat Yourself
Duplication is bad. If you have more than 4-5 lines of code that do the same thing in a single class, refactor to remove duplication.

Autostart Zend Core on Ubuntu

No Comments » by Jon Hibbins on 18 September 2008
Filed under: MySQL, PHP, Platform, Unix/Linux

This is the 2nd time I have had to search for starting up Zend Core automatically on Ubuntu Workstation, so here is the answer:

First change the permissions of /etc/rc.local by opening a terminal window (Applications|Accessories|Terminal) and enter the following command:

sudo chmod 777 /etc/rc.local

Then open this file with the text editor (Applications|Accessories|Text Editor) and put the following text before the exit 0 command

cd /usr/local/Zend/Core/mysql && ./bin/safe_mysqld &
/usr/local/Zend/apache2/bin/apachectl start &

Zend Core, PHP and MySQL should now all start automaticaly at boot time.