Installing iHRIS on Ubuntu 10.4 (Lucid): Difference between revisions
(→APC) |
(→APC) |
||
Line 2: | Line 2: | ||
==APC== | ==APC== | ||
To compile pecl packages yourself you'll need these packages installed. They may already be installed. | |||
<source lang="bash"> | |||
sudo apt-get install php5-dev apache2-prefork-dev | |||
</source> | |||
The version of APC that ships with 10.4 causes problems. You'll need to downgrade it for it to work. When it asks if you want to use the spin locks type in yes. Run the following commands in a terminal: | The version of APC that ships with 10.4 causes problems. You'll need to downgrade it for it to work. When it asks if you want to use the spin locks type in yes. Run the following commands in a terminal: | ||
Line 9: | Line 14: | ||
sudo pecl install APC-3.1.2 | sudo pecl install APC-3.1.2 | ||
sudo pecl config-set preferred_state stable | sudo pecl config-set preferred_state stable | ||
</source> | </source> | ||
Revision as of 10:21, 14 May 2010
Ubuntu 10.4 comes with PHP 5.3 so there a few a few issues that need to be corrected.
APC
To compile pecl packages yourself you'll need these packages installed. They may already be installed. <source lang="bash"> sudo apt-get install php5-dev apache2-prefork-dev </source>
The version of APC that ships with 10.4 causes problems. You'll need to downgrade it for it to work. When it asks if you want to use the spin locks type in yes. Run the following commands in a terminal: <source lang="bash"> sudo apt-get remove php-apc sudo pecl config-set preferred_state beta sudo pecl install APC-3.1.2 sudo pecl config-set preferred_state stable </source>
Now you need to set the configuration options for APC. Create or edit the ini file by typing: <source lang="bash"> sudo gedit /etc/php5/conf.d/apc.ini </source>
The contents should be: <source lang="ini"> extension=apc.so apc.shm_size=100 apc.write_lock=1 apc-slam_defense=0 </source>
Sessions
Now you need to set the session save path. The default is /tmp but that is causing problems and the script to clean up sessions doesn't look there. You'll need to edit the files for apache and cli and make the same change. To edit the apache php config type: <source lang="bash"> sudo gedit /etc/php5/apache2/php.ini </source>
Find the line that looks like: <source lang="ini">
- session.save_path = "/tmp"
</source> And change it to be (don't forget to remove the semi-colon): <source lang="ini"> session.save_path = "/var/lib/php5" </source>
Now edit the cli config file and make the same change: <source lang="bash"> sudo gedit /etc/php5/cli/php.ini </source>
Overloaded Functions
Until the code can be updated, you'll need to change a few functions in one file. If you're using the 4.0.4 or before you'll need to make this change. The development code and any future releases won't need this change. You'll need to edit your I2CE_Form.php file which is under I2CE/modules/Forms/lib depending on where you installed I2CE.
The functions __get, __set, __isset and __unset need to be changed from protected to public. For example: <source lang="php"> protected function __get( $key ) { </source> Should now be: <source lang="php"> public function __get( $key ) { </source>
You should make this change for all the functions listed above.
Restart
Now restart apache and memcached (if you're using it) and try to access your site again. <source lang="bash"> sudo /etc/init.d/apache2 restart sudo /etc/init.d/memcached restart </source>