Support ⇒ Upgrades ⇒ [Fixed] Multi language open_basedir restriction in effect ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexUpgrades

[Fixed] Multi language open_basedir restriction in effect Reply to topic


hi,

I noticed an error message when multilanguage feature is enable in DF 9.3.2.0

includes/functions/language.php•Warning line 299: file_exists(): open_basedir restriction in effect. File(/volume1/web/DF9imotion/language/.htaccess/main.php) is not within the allowed path(s): (/etc.defaults:/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes) •Warning line 299: file_exists(): open_basedir restriction in effect. File(/volume1/web/DF9imotion/language/info.txt/main.php) is not within the allowed path(s): (/etc.defaults:/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes)

it seams that the files .htaccess and info.txt are taken as folders. Indeed when changing the code at line 298 of includes/functions/language.php like this the error went away.

if (isdir ("language/" . $file)){ if (file_exists(BASEDIR."language/$file/main.php")) { $languages[] = $file; } elseif (ereg('lang-(.*).php$', $file, $matches)) { $languages[] = $matches[1]; } }

Sorry i was not able to file this in the bugtracker, i don't know why.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


Thanks for the report, your post was marked as patch.

Including a modified patch into v9 for a maintenance release

while ($file = readdir($handle)) { +if (0 === strpos($file, '.') || !is_dir('language/'. $file) || 'cvs' == strtolower($file)) continue; if (file_exists(BASEDIR."language/$file/main.php")) { $languages[] = $file; }

Thank you.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS

All times are UTC


Jump to: