Hi there,

I am currently using Drupal 5.1, but I have a problem after I installed it in my Freehostia account. Is showed me the below message,

"Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentation for more information."

I had tried to add the following 2 sentences in settings.php but it did not solve my problem.

ini_set('mbstring.http_input', 'pass');
ini_set('mbstring.http_output', 'pass');

Now, I am trying to create a custom php.ini file to fix the problem, can anyone tell me which path should I locate my php.ini file? What content should I put in?

I am a newbie and I don't really know much about php and SQL .Hope you don’t mind showing me the ways to solve the problem. Thanks.

Sorry for any inconvenience caused.

Comments

cog.rusty’s picture

Normally Drupal's .htaccess file should have taken care of this with the lines

php_value mbstring.http_input   pass
php_value mbstring.http_output  pass

If you do have Drupal's .htaccess file, maybe something in the server setup does not allow those lines to be processed.

If the ini_set lines in settings.php don't work, it *may* be possible to use a php.ini file but that depends on your host. Normally you copy your host's php.ini file to your site's web root and add the changes you want to the end, that is

mbstring.http_input  = pass
mbstring.http_output = pass

Where you can find the php.ini file depends... Often it can be found in /usr/local/lib/php/ or in /usr/local/Zend/etc/

Probably the simplest way is to tell your host's tech support that you want to set those variables and ask them what to do.

DLZJ’s picture

Hi cog.rusty, thanks for your reply.

I did try to make an amendment earlier as follow, but the error remained after I saved it.

# PHP 4, Apache 1.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass

# PHP 4, Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass

# PHP 5, Apache 1 and 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass

After that, I tried another method to solve the problem by adding the below 2 lines as follow:

ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
ini_set('mbstring.http_input','pass');
ini_set('mbstring.http_output','pass');

But, I failed to save it, due to it appeared a message, which was "Error while saving the file! Please contact the technical support! " The technical support team advised me to create a custom php.ini file in the installation folder of the script with the content below to solve my problem.

mbstring.http_input = pass
mbstring.http_output = pass

The problem is that I do not really know what is "installation folder of the script", I have been trying to create the custom php.ini file in all possible folders, but it seems not working.

On the other hand, I did try to look for the php.ini file in /usr/local/lib/php/ or in /usr/local/Zend/etc/ (as you mentioned earlier). However, I looked all the folders but I don't see any folders contain usr file.

What is the risk if I ignore this error?

I have been trying all kinds of methods but still encountered failure so far.
Sorry for troubling you and taking much of your time to read this passage.

Thanks!

cog.rusty’s picture

If you couldn't save your settings.php file with the additional ini_set lines, then probably Drupal has automatically write-protected it (444) and you need to chmod it to 644 first, either using the command line or with an FTP program. I think this is your easiest chance.

DLZJ’s picture

I get my problem solved, Thanks to cog.rusty. I really appreciate your kindness.