Category: PHP

Pages: 1 2 3 >>

02/07/10

Permalink 04:43:25 am, by admin Email , 54 words   English (US)
Categories: Apache, PHP

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:

php_flag register_globals on

01/22/10

Permalink 04:50:10 am, by admin Email , 59 words   English (US)
Categories: PHP

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:

    AddHandler application/x-httpd-php5 .php 
    ScriptAlias /bin /opt/php51/cgi-bin
    Action application/x-httpd-php5 /bin/php5

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

Permalink 04:46:53 am, by admin Email , 89 words   English (US)
Categories: PHP

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

11/08/09

Permalink 01:25:16 pm, by admin Email , 328 words   English (US)
Categories: Apache, Email, PHP

PHPList Install to RackSpace Cloud Server (CentOS)

Here's a step-by-step to setup a RackSpace Cloud Server with CentOS for PHPList (http://phplist.com):

  1. Install PHP, PHP IMAP module, PHP MySQL module, MySQL Server and FTP server:

    > yum install php
    > yum install php-imap
    > yum install php-mysql
    > yum install mysql-server
    > yum install vsftpd
    

    Apache and a number of other related packages are installed automatically as dependencies.

  2. Set Apache, MySQL and FTP service to start on boot:

    > /sbin/chkconfig --level 345 httpd on
    > /sbin/chkconfig --level 345 mysqld on
    > /sbin/chkconfig --level 345 vsftpd on
    
  3. Start Apache, MySQL and FTP:

    > /sbin/service httpd start
    > /sbin/service mysqld start
    > /sbin/service vsftpd start
    
  4. Set MySQL root password:

    > /usr/bin/mysqladmin -u root password 'somepass'
    > /usr/bin/mysqladmin -u root -h ENS password 'somepass'
    
  5. Download PHPList distribution:

    > mkdir /root/archive
    > cd /root/archive
    > wget http://downloads.sourceforge.net/project/phplist/phplist/2.10.10/phplist-2.10.10.tgz?use_mirror=voxel
    
  6. Unpack and install

    > tar -xvzf phplist-2.10.10.tgz
    > rsync -avz phplist-2.10.10/public_html/lists \
          /var/www/html/
    
  7. Add FTP user and set file ownership:

    > /usr/sbin/useradd -d /var/www/ webmaster
    > passwd webmaster
    > chown --recursive webmaster.webmaster /var/www/html/
    
  8. Create database:

    > echo "CREATE DATABASE lists" | mysql --password=somepass -u root
    > echo "GRANT ALL PRIVILEGES ON lists.* TO 'lists_web'@'localhost' 
          identified by 'yyyyyy';" | \
          mysql --password=somepass -u root
    > echo "FLUSH PRIVILEGES" | \
          mysql --password=somepass -u root
    
  9. Configure firewall:

    > system-config-securitylevel-tui
    

    From the security level menus, set SELinux to disabled, then customize and allow incoming WWW and FTP.

  10. Setup PHPList config file:

    > vi /var/www/html/lists/config/config.php
    

    In the editor, set database parameters.

  11. In your web browser go to:

    http://your.domain.com/lists/admin/
    

    You'll be prompted to initialize the database. Follow the installation screens to complete the install process.

  12. The basic install is now complete. The PHPList admin screens are located at:
    http://your.domain.com/lists/admin
    

10/19/09

Permalink 07:24:03 am, by admin Email , 36 words   English (US)
Categories: Project Gallery, PHP

Upgrade CentOS4 to PHP 5.2.9 with SQLite

Here's an update to this article:

Upgrade CentOS4 to PHP 5.2.9

The spec file has been modified to build the php-sqlite module which is needed by Plesk Sitebuilder. Here's the new package:

php-5.2.9_for_centos4.2.tar.gz

1 2 3 >>

March 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution