To add additional PHP features or update PHP to a later version, you need to recompile
PHP on your web box. H-Sphere PHP is compiled as a standard DSO module and can be reinstalled
at any moment without major problems. To recompile your PHP:
- Create the osdep.h link if it's not there:
# ln -s /hsphere/shared/include/c-client/os_slx.h \
# ln -s /hsphere/shared/include/c-client/os_bsf.h \
- From the command line, run the following commands:
echo "<?phpinfo(1)?>" > opt.php
- In your browser's address field, type
where your_site is your site's domain name. You will get the page with your
current PHP settings.
- Copy the content of the Configure Command section. These are the options
you will need to include when you configure your PHP.
- Change dir to your PHP sources.
- Run the following commands:
- Paste the line you copied from the Configure Command section. Remove all
single quotes embracing values in this line. Add more
parameters if you need them for your custom options. Mind that PHP version 4.3.0
and higher comes bundled with its own GD library, and if you want to use it, replace
You may also need to add the option:
- When configure finishes, type make to compile PHP.
- Type make install to install PHP.
- Restart Apache.
Warning for PHP Update from H-Sphere earlier than 2.3 RC4:
It is highly recommended that you update your PHP to version 4.3 to have the new version of WebShell running.
However, mind the following:
- the /usr/local/lib/php.ini file is backed up and then replaced during the update
(by the H-Sphere default php.ini file).
If you have custom php.ini settings,
check the file after the update and reconfigure it according to your requirements;
- new version of PHP doesn't support some of the old PHP scripts that may cause problems;
- osCommerce 2.0 may stop running, so make sure to update osCommerce to version 2.2.
If one of your servers has IMP installed, make sure to have its PHP
compiled with IMAP support.
While compiling PHP, I receive the error that libzzip is not found
H-Sphere default static PHP package includes the libzzip package. However, if you make your custom PHP build, you
should have the libzzip package installed. For Linux, download and intall it according to the instructions on the
SourceForge site. For FreeBSD, install it
under root in the following way: