Custom LAMP Stack on Ubuntu 10.7 - PHP giving me problems

In a nutshell:
Even though Apache2, MySQL and PHP seem to be running...
I am unable to successfully install phpMyAdmin.
I am unable to install my web software (ExpressionEngine)

In both cases I get a version of the following message:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/phpMyAdmin-4.0.5-english/libraries/sanitizing.lib.php on line 144

The PHP code is failing on calls related to string evaluation.

Line 144 in the above module is:
$message = preg_replace_callback($pattern, 'PMA_replaceBBLink', $message);

The failing line in the ExpressionEngine install tries to invoke
if ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $data['email']))

So it would seem that I have compiled PHP without a  required module.  Can anyone suggest what this missing module might be?

The configure string I'm using for PHP is:
./configure --with-config-file-path=/etc/php5 --with-apxs2=/usr/bin/apxs2 --with-curl=/usr/lib --with-pgsql --with-pear --with-mysql=/usr/local/mysql/lib --with-gd --with-mcrypt=/usr/lib --with-libdir=lib64

I am trying to configure a non-standard LAMP stack to  support an older piece of software.  I want to model a production environment so that I can load and then upgrade the client software that runs on this particular LAMP stack.  

I have the separate pieces, Apache2, PHP and MySQL running but PHP is not interoperating properly.

- Apache displays the proper default 'index.html' page.
- phpinfo() displays properly from within the document root.
- MySQL is functioning.
- I can successfully execute a PHP/MySQL query to connect to a database.

All good, right?

I have been unable to get phpMyAdmin to run.
Since phpMyAdmin is not essential I tried to bypass it and use the MySQL command interface to configure my users and databases.  When I try to install the client software (ExpressionEngine) it also fails, as described above.

I installed Apache2 via apt-get install apache2-apache2-mpm-prefork
I Installed MySQL from 5.0.91 source
I installed PHP from 5.2.1 source
I am attempting a manual install of phpMyAdmin (latest version)

I would appreciate suggestions.  In particular I see information on how to install LAMP components discretely because the 'package mode' does not seem to provide the flexibility that I require.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
I can not find version of Ubuntu 10.7 anywhere.  I have Ubuntu 10.04LTS and it appears to have almost everything PHP offers in the extension downloads.  Some of them are separate from the main installation.  It has PHP 5.3 and MySQL 5.1.7.  phpMyAdmin installed easily.  ExpressionEngine requires a newer version of PHP than you have.

What do you want that you feel is not available in the packages?
joexingAuthor Commented:
I beg your pardon; the version of Ubuntu I am using is 10.4.  The version of EE that I'm running is old (1.6.7) and it will not run on the latest releases of php or mysql.  The php issue is the elimination of 'preg.'  I am not sure of the changes to mysql that prevent me from running the latest version of mysql.  Have 'mysql' calls been phased out completely in favor of 'mysqli?'

If I could use the packages that are available for Ubuntu I would do so.  In fact, the production LAMP stack runs Apache 1.3 but I could not find a package for it.  I have chosen Apache2 because I understand that it should be able to interoperate with older versions of php & mysql.

Hope that clarifies my situation.  

Dave BaldwinFixer of ProblemsCommented:
I think you might mean the elimination of 'eregi' because the 'preg' functions are current.  'mysql' is not being phased out until PHP 5.5.  

The current versions in Ubuntu 10.4 are PHP 5.3.2 and MySQL 5.1.70 and Apache 2.2.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/phpMyAdmin-4.0.5-english/libraries/sanitizing.lib.php on line 144

this does not refer to a missing module. most likely you have a default php.ini or no php.ini which means any php script will abort while displaying this message after 30 seconds. i'd assume that the install script of your software needs more than 30 seconds to run. php on linux (at least this version) does not automagically remove the timeout when php is run from the command-line unless php-cli is used explicitely (and even then i'm unsure)
joexingAuthor Commented:
In my experience the install script runs (on other systems) in less than a second.  Clearly I have misconfigured php.  I am going to rethink my strategy of replicating the production environment.  Perhaps I should have installed the standard LAMP as a baseline and tested against it.  

Thank you for your thoughts.
Dave BaldwinFixer of ProblemsCommented:
I recommend starting with the 'standard' LAMP install and see what works for you.  The only thing I'm not sure about is the ExpressionEngine software since I've never used that.  See here:  If you have nothing else installed that you need to keep, you may want to start from scratch with a new install of Ubuntu.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
joexingAuthor Commented:
It happens that Ubuntu released version 10.4 in 2009, about the time that ExpressionEngine 1.6.7 was current.  Rather than attempting to replicate the production environment through a custom LAMP configuration I should have started with the 'standard' 10.4 LAMP as a baseline.  Although not exact, the standard LAMP appears to be close enough to allow me to continue the project.
Dave BaldwinFixer of ProblemsCommented:
Good, thanks for the points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.