≡ Menu


I've brand new Ubuntu Linux server (Apache + PHP5 FastCGI + Lighttpd image only server) installed for my wordpress, mediawiki and vBullietin software. I can load forntpage of all software but user cannot edit any wiki pages or post anything and I get the following error in log file:

PHP Fatal error: Allowed Memory Size of 20971520 Bytes exhausted (tried to allocate 131072 bytes) in /usr/share/mediawiki/includes/OutputHandler.php on line 81

How do I fix this problem?
[click to continue…]

Q. I'm trying to upgrade my PHP version from 5.2.6 to 5.2.8 using portupgrade command. But I'm getting following errors:

*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.42275.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php5-pcre-5.2.6_2 UPGRADE_PORT_VER=5.2.6_2 make reinstall
---> Restoring the old version
pkg_add: warning: package 'php5-pcre-5.2.6_2' requires 'php5-5.2.8', but 'php5-pcre-5.2.6_2' is installed
** Fix the installation problem and try again.
[Updating the pkgdb
in /var/db/pkg ... - 62 packages found (-0 +1) . done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
! lang/php5 (php5-pcre-5.2.6_2) (install error)

How do I fix this problem and upgrade php5-pcre?
[click to continue…]

I'm setting up WordPress based blog system under Debian or Ubuntu Linux. I am getting an error which read as follows:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

How do I fix this problem under Debian or Ubuntu Linux?
[click to continue…]

FreeBSD Configure Apache 2.2 PHP with FastCGI mod_fcgi Module

I'd like to switch from mod_php5 to mod_fastcgi. I'm using FreeBSD 7 release along with following software:

+ Apache 2.2
+ PHP as mod_php5
+ MySQL DB 5.1.23 server
How do I configure php as FastCGI server?
[click to continue…]

Install PHP 5 in Red Hat Enterprise Linux 5

Q. I saw your earlier article about how to install PHP 5 under Red Hat Enterprise Linux version 4. But I’m using Red Hat enterprise Linux 5 and I don’t want to mess up with old version instructions. Is there a way that I can install PHP5 under RHEL 5 without using source rpm?

A. Redhat Enterprise 5 supports PHP version 5 out of box. You can install PHP 5 using any one of the following method:

Method #1: Download and install php 5 from RHN

Type the following command to install php 5:
# yum install php
You may also want to install Apache and other php 5 extensions:
# yum install httpd php-gd php-mysql

Method #2: CD/DVD

Mount CD/DVD rom and use rpm command to install PHP5:
# rpm -ivh php*

Method #3: Use GUI package manager

Type the following command to start GUI package manager:
# system-config-package
Now Select PHP (under Web Servers) and install the same.

Ubuntu Linux: Install or Add PHP-GD Support To Apache Web Server

I am using an Apache web server and PHP 5 server-side scripting language to produce dynamic web pages for our corporate website. How do I install install php gd support on an Apache/PHP5 for dynamically manipulating images under Ubuntu Linux LTS?
[click to continue…]

PHP not connecting to a MySQL database server

Q. I have Apache Web server and MySQL configured. Everything works fine except I am not able to connect to a MySQL database server (I am able to connect mysql server with mysql client). So how do I configure or connect PHP scripts?

A. You need to install MySQL module for php4 or php5. Without php-mysql shared object or module, php scripts won't able to connect to MySQL database server.

Debian / Ubuntu Linux User

To install type the following command:
# apt-get install php4-mysql
if you are using PHP5, enter:
# apt-get install php5-mysql

RHEL <= 4 user

If you are using Red Hat Linux:
# up2date php-mysql

If you are using Fedora / CentOS / RHEL 5 Linux:
# yum install php-mysql
Restart apache to take effect. Now you will be able to connect MySQL via PHP scripts.
# service httpd restart