when I enter the file browser (through the account setting tab) I get the message

Parse error: syntax error, unexpected '/' in ..sites/all/modules/imce/inc/page.inc(722) : eval()'d code on line 1

The filebrowser does appear.
However, when trying to create a directory or uploading a file, the system 'hangs', and I am asked if I would like to stop the running script.

I am running
Drupal - 6.8 (on a secure site)
PHP - 5.2.6
Apache - 2
MySQLi - 5.0.45

I am not a programmer.

thanks in advance to help me out! :)

Comments

ep_nl’s picture

is there no-one around to fix this problem?
Please?

ep_nl’s picture

Still nobody?

Please?

ufku’s picture

Are you using a php: prefixed directory in your profile settings. If so, there seems to be a syntax error in your php code.

ep_nl’s picture

hello ufku,

thanks a lot for your reply! ^^
Can you please tell me where to find these profile settings?
I use the standard Drupal installation .. should it be in Drupal somewhere?
Or is it something my provider has to take care about?

thanks!

ufku’s picture

Go to admin/settings/imce then edit your Configuration profiles in which you'll notice settings for directory paths.

ep_nl’s picture

oh my, I am SO glad there is someone to help! :)

here are my IMCE settings:
Directory path
sites/default/files/php: return 'users/'.$user->name;

I copied the help text that came with imce:
"Ex: php: return 'users/'.$user->name; defines users/USER-NAME as the directory path."

can't see a difference here ..
the spaces came with the example, I just copied the line. Can those be a cause of the problem?

The directories are there, the are created. But .. it takes a looooooong time (actually ages, no changes visible, only after starting the IMCE-browser anew), and then for example the upload was successful although there was no feedback about it.
Also change to a different directory causes a hang.
And the error message still there ..

ufku’s picture

try this as a directory path
php: return "users/$user->name";

ep_nl’s picture

thanks again ufku for your sweat. :)

but alas your suggestion didn't work out.
still got the error

Parse error: syntax error, unexpected '/' in /home/[my accountname at provider]/domains/[my domain]/private_html/sites/all/modules/imce/inc/page.inc(722) : eval()'d code on line 1

ufku’s picture

This is strange. You have to find out what this unexpected '/' is. Is there any / character other than the one in users/$user->uid

ep_nl’s picture

hello again ufku! :)

I cannot find a slash in the IMCE settings page that shouldn't be there.

The error message gives the *location* where a php code evaluation crashes. From an inspection of the code at this location,
it looks as if a directory specified by the user in php code is being evaluated.
When the evaluation fails, the error is not caught and reported but is allowed to propagate.
Apparently crash recovery elsewhere in the code causes the program to hang.
If user-provided code is evaluated, it would be better to be prepared for errors (for example, typing errors),
and report the offending string and its origin back to the user so that the user or programmer gets an opportunity to repair.

Could you please give me an extra line of code for file
sites/all/modules/imce/inc/page.inc
with a print statement to be able to display the faulty input generated at line 722?

ufku’s picture

No it's a parse error of the evaluated code.
I get the same error with php: return /; where it is expected to give an error.

ep_nl’s picture

well ufku, at last I found it!

I oversaw the second line in the config page. Apparently there was where the error occured.
I am very grateful for your help, otherwise I would not have found it! :)

However: site administrators being human, they can make an error in the configuration.
It would be very helpful if configuration errors are caught and reported with an error message that would at least indicate that this is a configuration error, and preferably identify the erroneous configuration item.

The situation as it was left the end user browsing the site with a totally unhelpful message that was strongly suggesting a program error.

Well. anyway I am very glad to have IMCE up and running now! :)

ufku’s picture

Status: Active » Fixed

I'll look into implementing more validation for admin pages.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.