Installing Zend Server on Centos to run Magento

Installed Zend Server CE on one of my servers today.

Installing Zend Server CE via yum on Centos

To install via YUM, you can add the Zend repo as /etc/yum.repos.d/zend.repo

  [Zend]
  name=Zend CE $releasever - $basearch - Released Updates
  baseurl=http://repos.zend.com/rpm/ce/$basearch/
  enabled=1
  gpgcheck=0
  [Zendce-noarch]
  name=Zend CE - noarch
  baseurl=http://repos.zend.com/rpm/ce/noarch
  enabled=1
  gpgcheck=0

Then run yum install zend-ce

This will run a muck on your current website, it basically replaces your current php installation, replaces your mod_php with a zend. The files for the Zend Server are stored in /usr/local/zend. You will need to restart apache to take advantage of the new Zend.

Accessing the Zend Server admin interface

In a browser you just go to <yourserver>:10081, from there it will prompt you for a password, then pass you along to the Zend admin page. From there you can enable caching/optimization.

Magento

I already had Magento installed, and Zend Server messed with some settings that caused my Magento to generate an error.

Can't connect to local MySQL server through socket '/tmp/mysql.sock'

This took me a while to figure out, it went around looking at the config files for Zend /usr/local/zend/etc/conf.d/ that didn't seem to help. The fix was specifically telling Magento what unix_socket to use for the db connection.
Need to change local.xml

      <connection>
          <host><![CDATA[localhost]]></host>
          <username><![CDATA[YOURUSERNAME]]></username>
          <password><![CDATA[YOURPASSWORD]]></password>
          <dbname><![CDATA[YOURDBNAME]]></dbname>
          <unix_socket><![CDATA[/var/lib/mysql/mysql.sock]]></unix_socket>
          <active>1</active>
      </connection>

I enabled both the Zend Cache and the Zend Optimizer+ and saw some decent increases in performance. Magento is a resource hog and you really need a beefy server to run it, utilizing cacheing is almost a must.

Comments

May not be related, but I had

May not be related, but I had an issue after installing my Zend Server CE, then I was getting an error message when clicking on 'proceed to checkout'.

Warning: call_user_func(Zend_Validate_Hostname_Com::getCharacters) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback  in /home/leif/aerostich.com/magento/lib/Zend/Validate/Hostname.php on line 329

I took the advice of this post and it seemed to work.
http://www.magentocommerce.com/boards/viewreply/154233/

Also, for some reason Zend

Also, for some reason Zend Server didn't have the correct path to the sendmail file so I had to configure it using the interface /usr/sbin/sendmail

hi shane thanks for the above

hi shane

thanks for the above that's very useful. Can you tell me what kind of performance improvements the ZEND CE you are witnessing. Do you also install APC or eAccelerator in conjunction with this or just Zend ?
Is there a min spec. of server that is required for ZEND to work ?
I have a simple Magento site with 4000sku, with upto 10k user stats per month, will it help with this kind of environment ?

many thanks

seb

This is a great post...

This is a great post... thanks for listing it.

Man, I should look at my

Man, I should look at my comments more often... sorry seb.

The Zend server is fantastic on performance. I've found it to be at least as fast as mod_php in all environments (Drupal and Magento). It's really helpful to have the web console to see PHP errors and adjust some PHP directives and restart without having to restart Apache.

hey Shane, thanks for your

hey Shane,

thanks for your input, i took your advice and installed Zend CE on my centos box. Install seemed to have worked, i did it via Yum. on my centos box.

I had exactly the same problem as above ! thanks for the fix, you saved my butt.

Problems is even though Zend has installed i can see via command line. I can't get access to the admin panel via the browser !

Am i missing something ?

cheers

seb

@seb, To get to the Zend

@seb,

To get to the Zend Server admin page you just go to port 10081 on your server. For example
http://www.example.com:10081

This should redirect you to the login for your Zend Server.

hi Shane, yeah i did the

hi Shane,

yeah i did the default path install and i can see the files sitting in the default directory usr/local/zend

but when i try to login with http://77.68.36.166:1081/ZendServer

nothing appears ! 404

This is currently sitting on my hosted server, and im trying to access it over the web.

any other suggestions ?

and many thanks by the way .

seb

ps i think its working, i can see a a change in the front end access speeds, just cant see the control panel. Also noticed and im not sure if this related, but the Adminback end of magento, with v1.3.2.4 is not much slower -not sure if this is related !

Shane ignore the last msg, i

Shane ignore the last msg, i got the darn thing to work....IT WAS THE FIREWALLL !!!!! DOH

many thanks

seb

The problem (with Zend Server

The problem (with Zend Server & Magento) is the include_path, Zend Server install zend framework and add path into php.ini, also Magento have Zend Framework installed (in app/lib). To avoid mix of two versions (for example, the above error appear because Zend/Validate/Hostname/Com.php exists in /usr/local/zend/share/ZendFramework/library/ but not in Magento and versions are incompatible) add into .htaccess

php_value include_path "."

(this will remove path to share version of Zend framework)

@carco, You're right, they

@carco,

You're right, they could be a source of conflict and your advice is well taken. Magento does override it for the most part with this code in app/Mage.php

    /**
     * Set include path
     */
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
    $paths[] = BP . DS . 'lib';
 
    $app_path = implode(PS, $paths);
    set_include_path($app_path . PS . Mage::registry('original_include_path'));

I addressed this issue of using different Zend Framework versions when using Zend Server on ServerFault recently.
http://serverfault.com/questions/111223/how-to-use-a-different-version-o...

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal5>, <drupal6>, <javascript>, <php>, <sql>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options