13 Jan 2011

Adding Zend Frame Work to Plesk vhost.conf

hosting, plesk Comments Off
Replace bizante.com with the domain you are configuring.
This article requires knowledge of linux text editor from terminal command line.
I used this procedure to get started with the Google Data PHP Client Library which is included as part of the ZEND FRAMEWORK
From a terminal with SU / root type the following:
cd /usr/local/src
wget http://framework.zend.com/releases/ZendFramework-1.11.2/ZendFramework-1.11.2.tar.gz
tar -xvf ZendFramework-1.11.2.tar.gz
cd /var/www/vhosts/bizante.com/conf
vi vhost.conf
Put the following into vhost.conf
<Directory /var/www/vhosts/bizante.com/httpdocs>
php_admin_value include_path “.:/usr/local/src/ZendFramework-1.11.2/library”
php_admin_value open_basedir “/usr/local/src/ZendFramework-1.11.2/library:/var/www/vhosts/bizante.com/httpdocs:/var/www/vhosts/bizante.com/application:/var/www/vhosts/bizante.com/data”
</Directory>

save and exit vi.

so now we need to ask Plesk to re-configure our domain configuration (Plesk will add a Include line in the domain virtual host configuration file), to do so, we type:

/usr/local/psa/admin/sbin/websrvmng -av

next, we ask Apache to re-read the configuration files:

apachectl graceful

for the pedantic out there, you can also reboot the whole server by executing:

 /etc/init.d/httpd restart

Now we can just *use* the Zend Framework based app without having to copy the framework files in the library folder.

Further links for me:

Google Calendar API starting point

http://code.google.com/apis/calendar/data/1.0/developers_guide_php.html

Google DATA API online demos

http://googlecodesamples.com/?lang=PHP

Comments are closed.