Top Nav

Archive | PHP

Install PHP SSH2 extension on RHEL 5.6 with EPEL repository

Here are the steps to install the PHP SSH2 extention on RHEL 5.6 with the EPEL repository.

  1. Install packages that may be needed:
  2. Temporarily allow binary execution in /tmp
  3. Install the extension:
  4. Restore /tmp restrictions:
  5. Reload apache:
0

Install WordPress on Ubuntu virtual server at Media Temple

Server is a MediaTemple “ve” server which is a Parallels Virtuozzo container with Ubuntu 10.04 LTS Lucid installed as the operating system.

The first step is to install packages:

Now set mysql service to start automatically:

Next create a database for wordpress:

Next we’ll download and install wordpress:

Now set the database credentials in /var/www/wp-config.php:

Finally point your web browser to the site and run the WordPress installer.

7

Turn on PHP register_globals with .htaccess file

It is of course a bad idea to write code that depends on register_globals for security reason, but sometimes when faced with old code it’s a necessary evil. You can turn on register_globals for a site or directory by adding the following line to your .htaccess file:

1

PHP4 and PHP5 On The Same Server

If you have a server with PHP4 installed but need PHP5 on some websites then:

  1. Install a custom build of PHP5 to /opt/php5.
  2. Add lines like the following to your apache virtual host:

You might also find the RemoveHandler directive handy to disable PHP4.

0

PHP4 on CentOS5/RHEL5

If you need PHP4 on a CentOS5/RHEL5 server then you’ll find the RPMs linked below very handy. They install to /opt/php4 and can coexist with a default PHP 5 install.

The included conf.d/php4.conf file includes sample lines to run it as a CGI or as a module.

RPMs are here:
http://repo.conforge.com/conforge/CentOS/5/i386/RPMS/
http://repo.conforge.com/conforge/CentOS/5/x86_64/RPMS/

See this URL for details to add the yum repo:

http://wiki.conforge.com/wiki/Linux-PHP4cgiAndPHP5on+CentOS5

2