RoundCube requirements and errors during update

Sheldon

Verified User
Joined
Dec 23, 2004
Messages
62
Location
Canada
Hello,

anacron tried to update roundcube last night. Seems my config for php is a problem. Please advise.

Code:
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/disable-functions
disable_functions = system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source
; enabled functions exec() (sheldon)

Code:
Editing roundcube configuration...
Roundcube 1.0.1 has been installed successfully.
PHP Warning:  ini_set(): SAFE MODE Restriction in effect.  The script whose uid is 500 is not allowed to access /var/www/html/roundcubemail-1.0.1/logs owned by uid 498 in /var/www/html/roundcubemail-1.0.1/program/lib/Roundcube/rcube_config.php on line 158

Warning: ini_set(): SAFE MODE Restriction in effect.  The script whose uid is 500 is not allowed to access /var/www/html/roundcubemail-1.0.1/logs owned by uid 498 in /var/www/html/roundcubemail-1.0.1/program/lib/Roundcube/rcube_config.php on line 158
WARNING: Mimetype to file extension mapping doesn't work properly!
Please check the 'mime_types' config option and run this script again.
Executing database schema update.
sh: /usr/local/php/bin/php: No such file or directory
sh: /usr/local/php/bin/php: No such file or directory
 
I'm seeing the similar errors. I have safe mode off in php.ini I am running mod_ruid2


PHP Warning: ini_set(): SAFE MODE Restriction in effect. The script whose uid is 500 is not allowed to access /var/www/html/roundcubemail-1.0.1/logs/errors owned by uid 48 in /var/www/html/roundcubemail-1.0.1/program/lib/Roundcube/rcube_config.php on line 158
WARNING: Mimetype to file extension mapping doesn't work properly!
Please check the 'mime_types' config option and run this script again.
Executing database schema update.
sh: /usr/local/php/bin/php: No such file or directory
sh: /usr/local/php/bin/php: No such file or directory
 
Hmm.. safe_mode should not be enabled globally.. but it seems to be.
What's the output from this:
Code:
which php
/usr/local/bin/php -v
/usr/local/bin/php -i | grep php.ini
/usr/local/bin/php -i | grep safe
John
 
which php
/usr/local/bin/php

/usr/local/bin/php -v
PHP 5.3.28 (cli) (built: Apr 9 2014 11:37:37)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.4.3, Copyright (c) 2002-2013, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

/usr/local/bin/php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

/usr/local/bin/php -i | grep safe
Configure Command => './configure' '--with-apxs2' '--with-curl=/usr/local/lib' '--with-gd' '--with-ttf' '--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-pdo-mysql=/usr' '--with-pcre-regex=/usr/local' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xsl' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-magic-quotes' '--enable-safe-mode' '--enable-soap' '--enable-sockets' '--enable-mbstring' '--enable-zip' '--enable-wddx'
safe_mode => On => On
safe_mode_exec_dir => /usr/local/php/bin => /usr/local/php/bin
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sql.safe_mode => Off => Off
filter.default => unsafe_raw => unsafe_raw
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH

So it looks like it's on globally and I was looking in the wrong file it's on in the php-config file

EDIT: turns out I had to uncomment safe_mode=off it was commented out...
 
Last edited:
I am having a similar issue and going nuts trying to figure out what the heck is going on, this is what I am getting at the moment:

Code:
[root@da2 custombuild]# which php
/usr/local/bin/php
[root@da2 custombuild]# /usr/local/bin/php -v
PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
PHP 5.3.28 (cli) (built: Jun  7 2014 21:20:08)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.4.0, Copyright (c) 2002-2013, by ionCube Ltd.                                                                             , and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
[root@da2 custombuild]# /usr/local/bin/php -i | grep php.ini
PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
[root@da2 custombuild]# /usr/local/bin/php -i | grep safe
PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
Configure Command =>  './configure'  '--with-apxs2' '--with-curl=/usr/local/lib'                                                                              '--with-gd' '--with-ttf' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--w                                                                             ith-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcry                                                                             pt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--                                                                             with-pdo-mysql=/usr' '--with-pcre-regex=/usr/local' '--with-pear' '--with-png-di                                                                             r=/usr/local/lib' '--with-xsl' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '-                                                                             -with-iconv=/usr/local' '--with-tidy' '--enable-bcmath' '--enable-calendar' '--e                                                                             nable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-magic-quotes' '--e                                                                             nable-safe-mode' '--enable-soap' '--enable-sockets' '--enable-mbstring' '--enabl                                                                             e-zip' '--enable-wddx' '--enable-soap' '--enable-json' '--disable-posix'
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sql.safe_mode => Off => Off
filter.default => unsafe_raw => unsafe_raw
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97                                                                              rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfi                                                                             sh enigma rc2 tripledes
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
suhosin.log.phpscript.is_safe => Off => Off
 
Removing "--enable-safe-mode" from "./configure" command for PHP should solve the problem, upgrade to CB 2.0 would solve the problem too.
 
I got it working again after suddenly remembering to rub "./build rewrite_confs" but I took your tip into mind as well just now and removed what you suggested. Now how would I change from CB1.2 to CB 2.0?

Removing "--enable-safe-mode" from "./configure" command for PHP should solve the problem, upgrade to CB 2.0 would solve the problem too.
 
Back
Top