jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] php string issue


From: Olivier Sessink
Subject: Re: [Jailkit-users] php string issue
Date: Fri, 17 Jun 2016 22:58:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 14-06-16 17:39, Simone Fantini wrote:
Hello, on a Debian Wheezy machine i have installed and enabled latest version of Jailkit. It is working great and i have the flexibility to fix issues in no time. Thanks Olivier!

Although, today my user just faced an issue. He is running Magento in the jail and i have enabled php5-fpm 

[php]
comment = the php interpreter and libraries
executables = /usr/bin/php
directories = /usr/lib/php5, /usr/include/php5, /usr/share/php, /usr/share/php5, /etc/php5, [B]/usr/share/zoneinfo[/B]
includesections = env

basic php commands are working great , but a module in magento return this issue

Fatal error:  Uncaught exception 'Zend_Validate_Exception' with message 'Validate class not found from basename 'StringLength'' in /home/gilmar/public_html/lib/Zend/Validate.php:244

it looks like some PHP class is not available in the jail. Look for a file called StringLength.php



i have created a php file:

<?php
echo iconv_strlen("Test iconv_strlen here", "ISO-8859-1");

?>

if i run this with root user, outside the jail, i get:

"22"

if i run same file in jail i get:

PHP Notice:  iconv_strlen(): Wrong charset, conversion from `ISO-8859-1' to `UCS-4LE' is not allowed in /home/gilmar/strlen.php on line 2

Notice: iconv_strlen(): Wrong charset, conversion from `ISO-8859-1' to `UCS-4LE' is not allowed in /home/gilmar/strlen.php on line 2

any one can please identify the root cause and fix the issue?

you need encoding support in your jail. I'm not sure which directories are needed, so you'll need some trial and error:

I guess it will be /usr/share/i18n/charmaps/ but it could be /usr/lib/i386-linux-gnu/gconv/ or /usr/lib/x86_64-linux-gnu/gconv/

Olivier


reply via email to

[Prev in Thread] Current Thread [Next in Thread]