Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
ep_nl CreditAttribution: ep_nl commentedis there no-one around to fix this problem?
Please?
Comment #2
ep_nl CreditAttribution: ep_nl commentedStill nobody?
Please?
Comment #3
ufku CreditAttribution: ufku commentedAre you using a php: prefixed directory in your profile settings. If so, there seems to be a syntax error in your php code.
Comment #4
ep_nl CreditAttribution: ep_nl commentedhello 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!
Comment #5
ufku CreditAttribution: ufku commentedGo to admin/settings/imce then edit your Configuration profiles in which you'll notice settings for directory paths.
Comment #6
ep_nl CreditAttribution: ep_nl commentedoh 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 ..
Comment #7
ufku CreditAttribution: ufku commentedtry this as a directory path
php: return "users/$user->name";
Comment #8
ep_nl CreditAttribution: ep_nl commentedthanks 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
Comment #9
ufku CreditAttribution: ufku commentedThis is strange. You have to find out what this unexpected '/' is. Is there any / character other than the one in users/$user->uid
Comment #10
ep_nl CreditAttribution: ep_nl commentedhello 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?
Comment #11
ufku CreditAttribution: ufku commentedNo 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.
Comment #12
ep_nl CreditAttribution: ep_nl commentedwell 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! :)
Comment #13
ufku CreditAttribution: ufku commentedI'll look into implementing more validation for admin pages.