I'm getting these error messages when i try to "mass upload" a number of files.
* warning: shell_exec() has been disabled for security reasons in /home/hecatomb/public_html/sites/all/modules/acidfree/acidfree.module on line 2062.
* warning: system() has been disabled for security reasons in /home/hecatomb/public_html/sites/all/modules/acidfree/acidfree.module on line 1502.
when i asked to my hosting provider, they said that it's a security issue, so they disabled this function from the php.
So is there any workaround for this process?
Btw, when i try to upload a zip file, i'm getting that error.
when i try to upload multiple images directly from those 5 upload sections, i'm still getting those errors but that time the images are uploaded. and here is the error code when i try to upload like that;
* Importing file DSCN3777l.jpg
* Importing file image0.jpg
* Importing file resim40.jpg
* warning: shell_exec() has been disabled for security reasons in /home/hecatomb/public_html/sites/all/modules/acidfree/acidfree.module on line 2062.
* warning: shell_exec() has been disabled for security reasons in /home/hecatomb/public_html/sites/all/modules/acidfree/acidfree.module on line 2062.
* warning: shell_exec() has been disabled for security reasons in /home/hecatomb/public_html/sites/all/modules/acidfree/acidfree.module on line 2062.
So i guess i have two choices,
1- a way to make shell_exec work for my unix account (do you know any way to do this, using .htaccess etc.)
2- a workaround for this process.
or do i have them?
Comments
Comment #1
vhmauery commentedI am pretty sure that you can't change out of safe mode by using a .htaccess file. That would kind of defeat the whole purpose. The documentation for safe mode is here: http://us2.php.net/manual/en/features.safe-mode.php
There is a way to set up safe mode to allow a small subset of programs to be executed in a safe-mod directory. Tell your system admin folks that this is what you want. You need 'tar', 'unzip', and 'file' to be allowed to execute in safe mode.
Comment #2
korayal commentedwhen i checked from the php info, i saw that the server is not in the safe mode. i also saw this too;
disable_functions ; show_source, system, shell_exec, passthru, exec, popen, proc_openSo i guess they entirely disabled the function.
Comment #3
vhmauery commentedSounds like it is time to buy some pizza and beer for the sysadmin of your server.
Or find a new provider. There is really no way around this (well, at least that I am willing to do). There are functions that will extract archives for you in php, but they are slow, memory intensive and not something I will make Acidfree depend on.
As far as the `file -bin $filename` goes, you can probably get around this by commenting out that line or something. It is just trying to determine the mimetype of the file. If your files are all standard named, then Acidfree should be able to guess.
Comment #4
korayal commentedas you said, when i changed the line 2127-2141 to this;
The error codes went away, but i guess i still need the system() function to be able to upload the compressed archieves.
As far as i rename the files as i like before the upload, and upload 5 files everytime, i guess this will work for me. thanks.