PHP

PHP for Perl Users

php-mssql

Apparently, Redhat doesn't think it can use freetds/php-mssql for license reasons. Here's how I got it to work.

  1. Get latest php source rpm from an updates site
  2. install the source rpm
  3. edit /usr/src/redhat/SPECS/php.spec to build mssql.

    Here's mine php.spec.fc7, and here's a patch php.spec.patch I copied the added mssql stuff is from Remi Collet's php-mssql spec file. (http://remi.collet.free.fr/rpms/SPEC/php-5.2.1-remi.spec)

  4. be ready to install a boat-load of devel dependencies
  5. run rpmbuild -bb php.spec

You will probably have to install a bunch of stuff that the build depends on.

PHP-CGI

We run php through cgiwrap, so we use the php-cgi executable, not the regular php executable. The main difference is that php-cgi adds headers to your script output.

log_errors

When php is run from the command line, the log_errors setting does not actually log the errors, it sends them to STDERR, which really upsets web servers. Turn this off with:

ini_set('log_errors',0);

or use ini_set to set 'error_log' to the name of a usable log file, or to 'syslog'

Pear

Set your umask! 0077 is bad! 0022 is OK.

Is like CPAN. Run  pear search NAME  to search and  pear install --alldeps NAME  to install.


CategoryNotes

PHP (last edited 2008-06-09 16:10:51 by dmartin)