Hi I have installed the latest version of the ZendFramework, but cannot see where I need to set the php include path. I've set:- ln -s release-1.11.6 current include_path = ".:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear" in:- /etc/php5/apache2/php.ini but this does not seem to be correct as I still receive file not found errors for the Zend php files Brian A
Yes; in fact I followed the relevant part of this how to http://www.howtoforge.com/basic-web-server-on-ubuntu-9.04-with-zend-framework Apache was restarted serveral time and even did a complete reboot. Brian
Which php type have you set in the website settings in ispconfig for thsi website? Did you add any custom php.ini settings in that website?
In ISPConfig the php settings for this site are Fast-CGI. The adddress is www.thissite.com/BookPdf.php There are no custom php.ini settings in this site i.e we are not using set_include_path() or anything else. Here is index.php for this folder <?php include_once("BookPdf.php"); include './Templates/BookConfig.php'; include './Templates/BookTemplate.php'; $pdf = new BookPdf(); $pdf->PrintBook($bookTemplatePort, $book, 4); ?> and here is the header of the BookPdf class require_once('Zend/Pdf.php'); class BookPdf { //*****// } When we run this web address we get Fatal error: require_once() [function.require]: Failed opening required 'Zend/Pdf.php' (include_path='/opt/ZendFramework/current/library/') in /var/www/clients/client1/web1/web/BookPdf/BookPdf.php on line 15 So I'm lost at the moment Brian A
I guess you edited the wrong php.ini file. The file /etc/php5/apache2/php.ini is for mod_php only. I you want to set a value for cgi or fastcgi, you have to edit the file /etc/php5/cgi/php.ini
Ok I edited that file too without any change, so set the php call to the full path like this require_once('/opt/ZendFrameWork/current/library/Zend/Pdf.php'); Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/opt/ZendFrameWork/current/library/Zend/Pdf.php) is not within the allowed path(s): (/var/www/clients/client1/web1) in /var/www/clients/client1/web1/web/BookPdf/BookPdf.php on line 15 So does this mean I should set some permissions in some place? Brian
First, make sure that you resatrted the apache webserver after the changes. Then add your installation path /opt/ZendFrameWork/current/library/ at the end of the open_baesir paths separated by a : in the website settings and wait a minute until your system is reconfigured.
I'm sure each time to restart apache, but I'm not sure when you say 'at the end of the open_baesir' where to find this? I don't find it the php.ini or in the ISPConfig panel. Can you tell me where to find it. Brian A
See website settings in ISPconfig, there is only one field with the name open_baesdir on the options tab.
In IPSConfig 3.0.1.4 in Sites tab Selecting this site in Options tab I have:- Web Domain * Domain * Redirect * SSL * Stats * Options Linux User web1 Linux Group client1 Apache directives Is this where you mean? Brian
OK that seems to do trick with the latest ispconfig I can get to the Zend library. Thank you for your advice. Now I have an extra problem that I don't get on my dev server: Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 642616 bytes) in /opt/ZendFrameWork/release-1.11.6/library/Zend/Pdf/Parser.php on line 379 I guess I should be more clear, sorry. What I mean is; do I need to do something with ISPConfig or is better to set "memory_limit" = 32; in the php.ini or use ini_set("memory_limit","32M") in the script; Brian
Install ZendFramework on Ubuntu with ISPConfig 3 We needed to install the latest version of the ZendFramework on our existing Ubuntu 10.1 server that already had ISPConfig 3 installed. With a lot of help from other posts and forums on this site http://www.howtoforge.com/basic-web-server-on-ubuntu-9.04-with-zend-framework and especially help from till and falko, this is what we needed to do. 1. We needed to upgrade our ISPConfig from 3.0.1.4 to 3.0.3.3. We followed the guide here to do that. http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/ 2. Installing the ZendFramework we followed these parts of this howto, http://www.howtoforge.com/basic-web-server-on-ubuntu-9.04-with-zend-framework. I'll repeat the steps we used from this. vim /etc/apache2/sites-available/default [...] DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> [...] cd /opt mkdir ZendFramework cd /ZendFramework svn co http://framework.zend.com/svn/framework/standard/tags/release-1.11.6/ ln -s release-1.11.6 current vim /etc/php5/apache2/php.ini add include path include_path = ".:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear" and to allow for Fast-CGI vim /etc/php5/cgi/php.ini add include path include_path = ".:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear" We found that the memory_limit was set to 16M which is too small for some Zend file and image operations so we set it to memory_limit = 32M restart apache /etc/init.d/apache2 restart for the command line just in case we need it later vim /etc/php5/cli/php.ini include_path = ".:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear" get out of super user exit vim ~/.bashrc [...] PATH=/opt/ZendFramework/current/bin:"${PATH}" [...] sudo reboot When you log back in don't sudo su but instead: zf.sh show version should show this Zend Framework Version: 1.11.6 3. Finally some additions to options for the sites in ISPConfig In Sites - for each site to update In Options - PHP open_basedir add :/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear to the end of the string Close ISPConfig panel and restart apache just for luck. Well this worked for us, thanks to the good advice we got from this forum Brian