Problem with upgrading - related to exec()?
scrumpy
Joined: 2004-05-29
Posts: 21 |
Posted: Sun, 2004-08-01 21:31 |
Hi, I've seen a similar post recently regarding exec() and upgrading to G1 v1.44. I've just this evening started to upgarde to 1.44 from a 1.44-rc2, and I now get the "serious error" relating to exec() function when running the configuration wizard. Has something changed in the code? all was working well in the rc2, and the upgrade wen't like clock work. I'll mail my hosting provider (www.hosting-unlimited.net) but I would hope that they would mail me when there was to be a change as major as this. Appreciate any assistance. Thanks, Stuart |
|
Posts: 2322
exec is the function that Gallery uses to run all of the programs like NetPBM, ImageMagick, jhead, etc. If exec is disabled, Gallery won't be able to process images.
The error was added as an extra warning because many users would try and install Gallery on servers where exec was disabled, and then have to ask us why it didn't work.
Posts: 21
Hi,
I've been using G1 for many many months now, and I still continue to do so with the 1.44-rc2. This can be seen at www.crump.co.uk/gallery
However, as I said I upgraded to the gold version of 1.44 and it no longer works, well it no longer allows me to complete the config wizard after uploading the new G1 files/code.
Stuart
Posts: 2322
Try the last step in FAQ Gallery:c.2 and tell us what it reports.
Posts: 21
The results from the php statement listed in the FAQ are:
system, shell_exec, popen
So does that mean exec() is disabled? and if so how is gallery installed and working up till now?
Regards,
Stuart
Posts: 2322
No... it's a false positive that I've just corrected in the code. There's no reason that the fail message on the first screen should prevent you from running setup, however. It's just a message.. it doesn't actually cause setup to perform anything differently.
Posts: 21
I should be able to run the config wizard. Where can I get the new code? will it be in the CVS library?
Many thanks for being v.responsive.
Stuart
Posts: 133
Hi All, I have also just tried to upgrade to 1.4.4 and get that error abour exec ().
I have asked where I host my site if this can be fixed and there reply was....
"As exec() can be a security risk on a shared hosting setup we disable this for your accounts safty, as such our engineers would not be willing to enable access to that function. Could you please confirm for me what the script is attempting to execute?"
Not knowing anything about the technical side of servers or programming why has this suddenly popped up?
Is this new as previous versions of Gallery have always worked?
Does this now mean I won't be able to upgrade to later versions of Gallery any more...
Posts: 2322
tomcat76, if you just upgraded from a previously operational Gallery, you should be able to ignore the message. (Unless your host disabled something at the same time you upgraded.)
Posts: 133
Hi, thanks for the reply, what I normally do is create a second gallery (gallery2) and make sure it all works ok before updating, so its a new install, the host said this has always been disabled....
Steve
Posts: 2322
If exec is disabled, Gallery would have never worked, so if you have a working installation, it's probably safe to ignore. It's probably a false positive by the script accidentically catching "shell_exec" for "exec"
Posts: 133
Phew, that's a relief....
So how do I get around the config and install?
Posts: 2322
Just ignore the error. The error doesn't cause setup to do anything differently... it just tells you that it probably won't work.
Posts: 133
But I cannot proceed with the configuration...
"There are errors in your configuration that will prevent Gallery from functioning properly.
You must fix them before you can continue."
Unless I missed something?
Posts: 2322
On step 4?
Locate the error in red.. what is it?
Posts: 133
Button?
I'm on Gallery Config Page 1
The last line is that warning message... no button...
Posts: 2322
Sorry.. yes. You can replace a bit of code.
Find
in the "check_exec" function of setup/functions.inc
and replace it with
Posts: 133
Many thanks.... fixed.
Posts: 21
I've changed the code in functions.inc as noted in the discussion but how will that affect any further upgrades? Can I assume that this code change is now incorporated in the 1.x code stream?
Again, thanks for jumping on this one for me and for others.
Please look out for a PayPal donation, your doing a top notch job.
Stuart
Posts: 15
I changed the lines in functions.inc... but same result... it stops after step 1 and says it cant run any longer.
Isn't there a way to just get rid of this exec() check, so that the configuration can complete??
Posts: 133
My fresh install was doing exactly that... and the above code change cured that, it did for me and allowed me to complete the installation.
Posts: 2322
If you changed the code and it still fails, then exec really is disabled, and Gallery won't run.
Posts: 21
I concur with what you are saying...
If you change the code and it works in G1 1.44 then exec() was a false positive, essentially exec() is actually enabled on your hosting companys system and it's just G1 reporting this incorrectly. Now, if you change this in the code and it still doesn't work then your web hosting company has this exec() function disabled for security reasons.
I hope this is clear.
Regards, Stuart
Posts: 133
Not really...
My hosting company say....
"As exec() can be a security risk on a shared hosting setup we disable this for your accounts safty, as such our engineers would not be willing to enable access to that function......"
But Gallery works with the change to the code for me... sorry if I have misunderstood but tis all very confusing...
Posts: 2322
So, it works, or it doesn't work...?
Posts: 133
Yes, it works.... can complete the configuration and it's up and running though I normally try it for a few weeks to see if it continues to work... before I use this as my main gallery...
Strange thing I just had the option "print this photo with shutterfly" yet all the options were not ticked....
Posts: 15
Let me try to clarify:
1. My webhost Lunarpages has disabled EXEC.
2. Until the recent version 1.4.4 of Gallery, I did get errors during installation but it did complete.
3. When installation was finished, I changed the fs_unix.php file to use the PASSTHRU command and not EXEC... AND I have been running many versions of Gallery, and right now on two galleries on version 1.4.3pl2... on my Lunarpages host... that has EXEC disabled.!
(I use Gallery Remote for uploading)
So for years I have been running Gallery (slightly modified) on a host with EXEC disabled.
4. NOW, from version 1.4.4 the script not only reports error during installation.... BUT completely stops without any way of getting everything installed... and modifying it as before.
5. SO back to initial question.... how do I get the installation script to run despite the errors..... ???
6. Seems only option is to leave Gallery at 1.4.3 or leave Gallery for good, as it has become almost impossible to use this great script unless you host your own environment.
Posts: 2322
Well, if you've modified the code enough to know how to do the passthru, you could always just update the check routine. The code is even helpfully pasted in the thread for you.
Posts: 15
Hello Signe,
Are you referring to your earlier help with modifying functins.inc?....
I did try to modify it, but the install script still stops after the exec check..
So I guess it will take some more to disable it completely.
About the PASSTHRU command, it's actually just one line in fs_unix that is changed.... and after that Gallery has been working very great.
Since Gallery is the best script found, it would really be great with a workaround, since many many hosts now have stopped EXEC... so more and more people have problems running Gallery....
Will G2 have same problem?
Posts: 2322
Yes, G2 will have the very same problem.
What I said was to modify the check so that it looks for passthru instead of exec... it's a one word change.
Posts: 15
I changed the check for exec() to passthru, and together with the change in fs_unix.php I know run Gallery 1.4.4 on a system with exec() disabled.
So it can be done.... even if there is still a warning when running the config wizard...
But I know have a fully functional Gallery... :lol: so why bother that it is not supposed to work.... :D
Posts: 11
I have the same problem with the exec() not working. I made sure from the host that it is enabled but when I run the setup it tells me that it isn’t. So, I replaced the code you suggested earlier in this thread, but all I get now is this error
Parse error: parse error, unexpected T_STRING in /home/soldinf/public_html/gallery/setup/functions.inc on line 331
I have tried saving it in many formats with no luck. If this is going to fix my setup problem, can some one email me or post the functions.inc modified file so I can try it?
Posts: 1
peh - What should the syntax be for the new passthru line? I changed exec to passthru to get through the config, but it's giving me an incorrect number of arguments error when I try to upload images.
NEVERMIND!!!! I found it here>
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=19154&highlight=passthru
Thanks!