[RCD] BUG: please use @file_exists() instead of file_exists()

Reindl Harald h.reindl at thelounge.net
Sun May 25 10:47:47 CEST 2014

[25-May-2014 05:45:01 Europe/Vienna] PHP Warning:  file_exists(): open_basedir restriction in effect.
File(vendor/autoload.php) is not within the allowed path(s):
(/usr/share/roundcubemail:/var/log/roundcubemail:/etc/roundcubemail:/usr/share/pear:/var/www/uploadtemp) in
/usr/share/roundcubemail/program/include/iniset.php on line 64

GENERAL: please use @file_exists() everywhere to prevent such messages on production servers
running witeh E_ALL fro good reasons and sending twice an hour anything from the php errorlog
via email to the admin which normally is empty

[builduser at buildserver64:/rpmbuild/SOURCES]$ cat roundcubemail-flie_exists_warning.patch
--- roundcubemail-1.0.1-dep-original/program/include/iniset.php 2014-05-09 16:09:02.000000000 +0200
+++ roundcubemail-1.0.1-dep-patched/program/include/iniset.php  2014-05-25 10:44:05.730983819 +0200
@@ -61,7 +61,7 @@

 // include composer autoloader (if available)
-if (file_exists('vendor/autoload.php')) {
+if (@file_exists('vendor/autoload.php')) {
     require 'vendor/autoload.php';

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20140525/f340fe7d/attachment.sig>

More information about the dev mailing list