|
|

08-07-2012, 06:44 PM
|
|
Member
|
|
Join Date: Oct 2010
Posts: 37
|
|
[solved] Error: Compilation failed: POSIX named classes are supported only
full title:Error: Compilation failed: POSIX named classes are supported only within a class
This error from openID class in Zend Framework. Working fine on other web server except Litespeed.
preg_match() [function.preg-match]: Compilation failed: POSIX named classes are supported only within a class at offset 21
PHP Code:
preg_match('|^([^:]+)://([^:@]*(?:[:][^@]*)?@)?([^/:@?#]*)(?:[:]([^/?#]*))?(/[^?]*)?((?:[?](?:[^#]*))?(?:#.*)?)$|', Zend_OpenId::selfUrl(), $reg)) {
And
PHP Code:
preg_match('|^([^:]+)://([^:@]*(?:[:][^@]*)?@)?([^/:@?#]*)(?:[:]([^/?#]*))?(/[^?#]*)?((?:[?](?:[^#]*))?)((?:#.*)?)$|', $res, $reg)
Source file: http://framework.zend.com/svn/framew...end/OpenId.php
Line 162, 409.
I try to upgrade, downgrade php from 5.3.5 to 5.3.14 but it can not help.
Could you please help me fix this?
Thank you.
Last edited by NiteWave; 08-14-2012 at 10:16 PM..
|

08-08-2012, 04:20 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,389
|
|
|
make sure litespeed svr has the matching PHP built as other server.
|

08-08-2012, 04:33 PM
|
|
Member
|
|
Join Date: Oct 2010
Posts: 37
|
|
Quote:
Originally Posted by webizen
make sure litespeed svr has the matching PHP built as other server.
|
I try upgrade/downgrade all versions of PHP, same to others too, but it can not help, issue is still exist.
|

08-09-2012, 11:27 AM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,389
|
|
|
It is not just the PHP version but the compile options.
|

08-09-2012, 03:59 PM
|
|
Member
|
|
Join Date: Oct 2010
Posts: 37
|
|
|
Is there any advice on build option as I left other as default DirectAdmin built.
|

08-10-2012, 11:16 AM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,389
|
|
|
run from command line 'php -i' (look for Configure Command line) to get Apache php compile option and use the same options in LSWS php compile
|

08-13-2012, 11:51 PM
|
|
Member
|
|
Join Date: Oct 2010
Posts: 37
|
|
I try it, try with different php versions,
Quote:
|
'--with-config-file-path=/usr/local/etc/php5/cgi' '--with-curl=/usr/local/lib' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--enable-gd-native-ttf' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring'
|
But that code still have error. Sample test which has error:
PHP Code:
<?php
preg_match('|^([^:]+)://([^:@]*(?:[:][^@]*)?@)?([^/:@?#]*)(?:[:]([^/?#]*))?(/[^?]*)?((?:[?](?:[^#]*))?(?:#.*)?)$|', 'asdf');
?>
http://dev.vimobi.com/test.php
|

08-14-2012, 05:20 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,389
|
|
Here is the one I have. PHP 5.3.6
Configure Commands:
Quote:
|
'./configure' '--prefix=/usr/local/opt/lsws/lsphp5' '--with-libdir=lib64' '--with-mysqli=mysqlnd' '--with-mysql' '--enable-ftp' '--with-openssl' '--enable-pdo' '--with-pdo-mysql' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-curl' '--with-mcrypt' '--with-litespeed'
|
test code
Code:
<?php
$subject = 'http://www.example.com/ext/url';
preg_match('|^([^:]+)://([^:@]*(?:[:][^@]*)?@)?([^/:@?#]*)(?:[:]([^/?#]*))?(/[^?]*)?((?:[?](?:[^#]*))?(?:#.*)?)$|', $subject, $matches);
print_r($matches);
?>
result
|

08-14-2012, 09:30 PM
|
|
Member
|
|
Join Date: Oct 2010
Posts: 37
|
|
|
The error was fixed with your configure command.
Thanks for your support.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:18 PM.
|
|