bos_inc. wrote:OpenCart 2.2.x.x
Since using opencart (few weeks..) everything works fine, except for the fact that my webserver doesn't support glob_brace.
I've read a lot about the problem, but can't find a workaround.
one of the error is in the image manager, but that one is solved.
The other one is when refreshing my modifications. It show's a fault page.
Code: Select all
Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /mnt/web015/b3/59/57275859/htdocs/admin/controller/extension/modification.php on line 179Warning: glob() expects parameter 2 to be long, string given in /mnt/web015/b3/59/57275859/htdocs/admin/controller/extension/modification.php on line 179Warning: Cannot modify header information - headers already sent by (output started at /mnt/web015/b3/59/57275859/htdocs/admin/controller/startup/error.php:34) in /mnt/web015/b3/59/57275859/htdocs/system/library/response.php on line 12
So i can't install a bunch of extensions, I think a lot of people are helped when there is a solution.
I am aware that i am using a Solaris webserver (strato), that doesn't support GLOB_BRACE...
I would be very thankful !
Your web server must be operating on SOLARIS system which GLOB_BRACE is not supported.
However, according to this post:
https://github.com/symfony/symfony/issues/14502 , the following should resolved the issue:
In admin/controller/extension/modification.php file,
find:
replace with:
Code: Select all
$files = glob($path, (defined('GLOB_BRACE') ? GLOB_BRACE | GLOB_ONLYDIR : GLOB_ONLYDIR));
In admin/controller/common/filemanager.php file,
find:
Code: Select all
$files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
replace with:
Code: Select all
$files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', (defined('GLOB_BRACE') ? GLOB_BRACE | GLOB_ONLYDIR : GLOB_ONLYDIR));
Optional:
In your install/model/upgrade/1006.php file,
find:
Code: Select all
$files = glob(DIR_OPENCART . '{config.php,*/config.php}', GLOB_BRACE);
replace with:
Code: Select all
$files = glob(DIR_OPENCART . '{config.php,*/config.php}', (defined('GLOB_BRACE') ? GLOB_BRACE | GLOB_ONLYDIR : GLOB_ONLYDIR));
This should rectify the problem. The GLOB_BRACE should only be used when SOLARIS servers are not involved.