Zend

OSX 10.8 Mountain Lion Zend Server CE Config

November 29th, 2012 0 Comments

Zend Server CE is a great stack for PHP developers, especially those that like to develop with the Zend Framework framework. Unfortunately, the server experiences some issues for the latest OSX users. I’ve created some other blog posts that walk you through a setup…

http://www.cmiwebstudio.com/blog/zend-server-ce-for-mac-osx-10-lion/
and
http://www.cmiwebstudio.com/blog/osx-mountain-lion-and-zend-server-ce/

but you will need to fix this issue with MySQL for the DB to work correctly. At first, you may not have an issue, but quickly you will run into the issue that many others have faced, including getting the following error:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/usr/local/zend/mysql/tmp/mysql.sock’ (2)

And if you navigate to this directory, you’ll see this file doesn’t even exist / was removed over time from a software issue. Here’s the fix…

Fire up the terminal, and enter…

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

On the fifth line you’ll see the following statement:

MYSQL_EN=”false”;

Change it to the following:

MYSQL_EN=”true”;

Now, go further down within the file, until you come to the start sequence. Here we’re going to add one line that’ll issue the “start-mysql”-command.

“start”)
$ECHO_CMD “Starting $PRODUCT_NAME $PRODUCT_VERSION ..\n”
$0 start-zdd %
$0 start-monitor-node
$0 start-mysql %
$0 start-apache %
$0 start-lighttpd %
$0 start-jb %
$0 start-jqd %
$ECHO_CMD “\n$PRODUCT_NAME started…”
;;
Below the start sequence you’ll find the restart sequence, which should look like this.

“restart”)
$0 restart-zdd
$0 restart-monitor-node
$0 restart-apache
$0 restart-mysql
$0 restart-lighttpd
$0 restart-jb
$0 restart-jqd
;;

And, if you go further down you’ll find the stop sequence, which should look like this.

“stop”)
$ECHO_CMD “Stopping $PRODUCT_NAME $PRODUCT_VERSION ..\n”
$0 stop-apache %
sleep 2
$ZCE_PREFIX/bin/clean_semaphores.sh
$0 stop-lighttpd %
$0 stop-jb %
$0 stop-mysql %
$0 stop-jqd %
$0 stop-zdd %
$0 stop-monitor-node %
$ECHO_CMD “\n$PRODUCT_NAME stopped.”
;;
Now, save and exit by pressing ctrl+x, select “Yes” to the question “Save modified buffer” and write to the same filename.

The next thing we need to do is to make sure that the correct script is executing when starting up OS X. To do this you’ll need to go to the startup directory, remove the old script and link in the new script:

cd /Library/StartupItems/ZendServer_init/
sudo rm zendctl.sh
ln -s /usr/local/zend/bin/zendctl.sh ./
To ease maintenance we’re going to setup a link within the our sbin-folder.

cd /usr/sbin
ln -s /usr/local/zend/bin/zendctl ./

Now restart the server: sudo zendctl.sh restart

***************

STILL not working? Well, that’s not unheard of, as many online can attest to. Unfortunately, Zend doesn’t seem to have an official answer to this issue either.

When in doubt… download MAMP. MAMP is a GREAT stack to use. Very easy to use and setup, includes virtually everything you’d want to install out of the box, incredibly easy to config on the fly, and for MAC users that like things that “just work”, MAMP is a great option. You can learn more at MAMP

Zend Developer Cloud Technology

September 6th, 2012 1 Comments

Want to setup a cloud based PHP development environment in 30 seconds?  No, I’m not joking.  Yes, it really is that easy. Let me guess… you’ve worked at enterprise level PHP development houses where your environment setup instructions looked like a wiki page exploded.  Things are changing quickly and we’re happy about that.

One might think that if you build applications in the cloud that you are building “cloud applications”. While much of the focus on the cloud has been on building cloud-based applications and pushing them to the cloud, there are many, perhaps more, circumstances where an organization doesn’t need the features offered by cloud vendors. And so, many developers will dismiss the cloud as hype or not pertinent to their needs. However, with all of the focus being on the production cloud few are asking whether or not the cloud can provide solutions for developers, regardless of where they deploy.

Visit phpcloud.com for more information.

Zend Framework 2 Is Here!

September 6th, 2012 0 Comments

The component structure of Zend Framework 2 is unique; each component is designed with few dependencies on other components. ZF2 follows the SOLID object oriented design principle. This loosely coupled architecture allows developers to use whichever components they want. We call this a “use-at-will” design.

The component structure of Zend Framework 2 is unique; each component is designed with few dependencies on other components. ZF2 follows the SOLID object oriented design principle. This loosely coupled architecture allows developers to use whichever components they want. We call this a “use-at-will” design.

An important part of Zend Framework 2 is the migration layer that will allow ZF 1 code to run on the new ZF 2 engine, which will be made available once the ZF 2 APIs are finalized. With it, you will be able to add new ZF 2 code, and refactor existing code, at a controlled pace.

Download ZF2 Now.