Repeatable: Always
Steps to repeat:

  1. visit admin/config/media/imce/profile/edit/
  2. in the directory section, set this directory path:
    php: return 'images_uploaded_by_users/'.$user->name;
    
  3. Save configuration
  4. visit imce

Expected Results:
User sees imce file browser.

Actual Results:
The browser says that the connection has been interrupted by the server. Checking in the Apache Error Log showed a segmentation fault

I don't know exactly why, but the problem is caused by the eval in imce_process_directories() function. Anyway, this simple patch to imce.page.inc file solves the problem:

@@ -776,7 +776,8 @@
 
   foreach ($directories as $directory) {
     if (substr($directory['name'], 0, 4) == 'php:') {
-      $directory['name'] = eval(substr($directory['name'], 4));
+      $directory_name = substr($directory['name'], 4);
+      $directory['name'] = eval($directory_name);
      //php may return an array of directories
       if (is_array($directory['name'])) {
         foreach ($directory['name'] as $name) {

Comments

ufku’s picture

Status: Patch (to be ported) » Closed (works as designed)

This is probably an xdebug bug. Try updating it.

These could be related;
http://bugs.xdebug.org/view.php?id=586
https://bugs.php.net/bug.php?id=53479

antoniopironti’s picture

I've upgraded xdebug to the 2.1.3 version: all works fine now.
It seems that this bug affects only xdebug 2.0.5 : with xdebug 2.0.3 I haven't any problem.

Thank you very much for your quick reply and support.