H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

PHP Compilation

 

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:

  1. From the command line, run the following commands:
    cd /hsphere/shared/apache/htdocs
    echo "<?phpinfo(1)?>" > opt.php
  2. In your browser's address field, type http://your_site/opt.php where your_site is your site's domain name. You will get the page with your current PHP settings.
  3. Copy the content of the Configure Command section. These are the options you will need to include when you configure your PHP.
  4. Change dir to your PHP sources.
  5. Run the following commands:
    EAPI_MM=/hsphere/shared
    export EAPI_MM
  6. Paste the line you copied from the Configure Command section. 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
    --with-gd=/hsphere/shared \
    with
    --with-gd \
  7. Press Enter.
  8. When configure finishes, type make to compile PHP.
  9. Type make install to install PHP.
  10. Restart Apache.

PHP Update Warning for H-Sphere 2.3 RC4:
H-Sphere 2.3 RC4 will have slightly different configuration. 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.

Note: PHP 4.3.1 is a vulnerability patch that fixes PHP running as CGI only, and is not necessary for H-Sphere web servers.

PHP compilation options for H-Sphere 2.3.1

 

Troubleshooting

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:

# cd /usr/ports/devel/zziplib
# make install clean



Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.