PHP upgrade breaks version 1.9.12+

PHP upgrade breaks version 1.9.12+

by Kelly Bramble -
Number of replies: 5

Upgraded from php 5.2.17 to 5.3.15 on a fully functional moodle install version 1.9.12+.

Nothing changed on my moodle install or configuration.

I have tried everything I can find within these moodle forums.

Site Admin:

Server --> Environment shows all OK

Errors I get are that within an existing course, when one selects "link to file" option the file does not link and the error is:

"No valid arguments supplied or incorrect server configuration"

File is not found - have verified that file is on server. Also, when I select the "Update resource" option and "Choose or upload file" I can see the target file, however there is not an "Choose" link available.

Moodle is clearly not resolving the path during selected file operations.

PHP info:

Version 5.3.15

Linux host.engineersedge.com 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64

System  Linux host.engineersedge.com 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 

Build Date  Aug 5 2012 16:50:41 

Configure Command  './configure' '--disable-fileinfo' '--disable-mbregex' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-icu-dir=/usr' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' 

Server API  Apache 2.0 Handler 

Virtual Directory Support  disabled 

Configuration File (php.ini) Path  /usr/local/lib 

Loaded Configuration File  /usr/local/lib/php.ini 

Scan this dir for additional .ini files  (none) 

Additional .ini files parsed  (none) 

PHP API  20090626
 
PHP Extension  20090626 

Zend Extension  220090626 

Zend Extension Build  API220090626,NTS 

PHP Extension Build  API20090626,NTS 

Debug Build  no 

Thread Safety  disabled
 
Zend Memory Manager  enabled 

Zend Multibyte Support  disabled 

IPv6 Support  enabled 

Registered PHP Streams  https, ftps, compress.zlib, php, file, glob, data, http, ftp, zip 

Registered Stream Socket Transports  tcp, udp, unix, udg, ssl, sslv3, sslv2, tls 

Registered Stream Filters  zlib.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk 

 This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
 

Very frustrating..

 

Thanks in advance..

Average of ratings: -
In reply to Kelly Bramble

Re: PHP upgrade breaks version 1.9.12+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hmmmm.... I'm not saying this isn't related to the PHP upgrade but I'm sceptical that it has anything to do with the version change per se.

A bit more information wouldn't go amiss... what sort of system is this (operating system)? How was the upgrade done? Have you run Moodle with Debugging switched on? Have you checked your web server error log?

Also, was php.ini changed as part of the upgrade. If so, what was changed? If you still have the old version do a diff and see if anything jumps out at you.
In reply to Howard Miller

Re: PHP upgrade breaks version 1.9.12+

by Kelly Bramble -

Thanks for replying,

As given above it a Linux server running Apache with Cpanel  WHM Centos.

I did the php upgrade from Cpanel.

No server related errors in the logs.

With debug on I get :

Warning: preg_replace() [function.preg-replace]: Compilation failed:
unknown option bit(s) set at offset -1 in
/home/phost/public_html/lib/moodlelib.php on line 465

Searching the interent this COULD to be related to the PCRE extension bug not being compiled with UTC-8.

 

In reply to Kelly Bramble

Re: PHP upgrade breaks version 1.9.12+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's the one. Seen it before. They've build it using a non-utf8 PCRE library.

Should be easy enough to fix, but means recompiling the PCRE library and then PHP.

Seeing as you mention Cpanel, I suspect you will have to complain to your hosting company.
In reply to Howard Miller

Re: PHP upgrade breaks version 1.9.12+

by Kelly Bramble -

Ok, recompiling the PCRE library with utf8 support fixed it.

For the other folks arriving at this thread, here's the steps on a Linux box:

I already had the source file on my server.

cd /var/cpanel/perl/easy/Cpanel/Easy/OptLib

tar xvzf  pcre.pm.tar.gz

cd  pcre-8.21

./configure --enable-utf8 --enable-unicode-properties

Then, via cPanel rebuild using EasyApache

 

Thanks Howard...

Average of ratings: Useful (1)
In reply to Kelly Bramble

Re: PHP upgrade breaks version 1.9.12+

by rana saad -

Hi i just installed my moodle 1.9 on a php 5 version and it didnt work i get a blank white page when i click on the registration page http://www.example.com/lms/login/index.php?Lang=en_utf8

Please advise on how can i fix it, i was able to view php info page i installed the latest version of sql server, php apache only my moodle version is old as i am not the website developer, please advice i" ve been stuck in this for a week now i am out of any solutions.