Cannot unzip images via pblog (safe mode)
| Project: | Pblog |
| Version: | 6.x-1.6 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
When trying to create a pblog entry and uploading a zip file of images i get these errors. The pblog entry is created but no images are added. It looks to be with safemode which i cannot disable on the server. Any way around this?
* warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 886114 is not allowed to access / owned by uid 0 in /customers/*****/*****/httpd.www/includes/file.inc on line 188.
* warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 886114 is not allowed to access / owned by uid 0 in /customers/*****/*****/httpd.www/includes/file.inc on line 188.
* warning: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode in /customers/*****/*****/httpd.www/sites/all/modules/pblog/pblog.module on line 472.
* warning: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode in /customers/*****/*****/httpd.www/sites/all/modules/pblog/pblog.module on line 475.

#1
Hey dom_b,
I think safe mode is stopping you upload the images in the first place from /includes/file.inc, so there is probably not a way around this with out turning off safe mode.
Do you know if php on the server has built in zip support and can you upload anything using other drupal modules?
Tomorrow I will check the code at the line numbers and see if I can think of a work around.
Cheers
baldy
#2
i can definitely upload, the zip file with the images even gets uploaded, it just doesnt get extracted. im not sure about zip support. is this something i could add myself? i doubt my host does support zip to be honest if its non standard, plus the file is not getting extracted.
sorry i can't be more helpful, my host gives limited support when it comes to cms etc.
#3
Ok, first thing to do is use the phpinfo function to see what functions exactly your host has turned on. You can find more information on phpinfo here -> http://uk2.php.net/phpinfo
This will tell you if you have zip support enabled as well as loads of other interesting info.
Zip support cannot really be added yourself unless you have a php library that does it, I have not seen one. If you find one let me know and I would be interested to have a look at it.
You say the zip file is getting uploaded, which folder do you see it in and are you sure this is the correct place?
Cheers
Baldy.