Okay here's the deal. I played around with this for the last couple of days to see if it was my configuration, or if there was a workaround to no avail.
I receive a timeout when trying to add or modify actions in imagecache. I can add a new scale, resize, or crop action just fine. But when I try to add values to any of these and click on the "Update Preset" button it times out. That said, I can sometimes get a value in scale, but any modification to it or when I create an additional scale action it times out just as before. The error it throws when timing out is below.
Location http://www.glosswerks.com/drupal/?q=admin/imagecache/preset/5
Referrer http://www.glosswerks.com/drupal/?q=admin/imagecache/preset/5
Message array_walk() [function.array-walk]: Unable to call () - function does not exist in /home/alfa/public_html/drupal/includes/common.inc on line 512.
Severity error
What do you guys think? I don't have a bug do I? If not, any further troubleshooting I should do?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Imagecache Administration drupal.png | 63.39 KB | JJMcKay |
Comments
Comment #1
dopry commentedWhat version of drupal and imagecache are you using?
Comment #2
JJMcKay commentedDrupal 4.7.4 and imagecache.module,v 1.9.2.11 2006/11/15
Comment #3
dopry commentedCan put drupal_set_message('
'. print_r(debug_backtrace(), TRUE) .'');in common.inc on line 511, and paste me the output.
It seems like a magic_quotes_gpc error somewhere. Disabling magic_quotes should be a symptomatic solution.
Comment #4
dopry commentedsilly escaping, those were supposed to be pre tags.
Comment #5
JJMcKay commentedWell that changed something. Bad news first, right? It still times out when trying to define a parameter for the preset. The good news, I think is that it doesn't throw an error that is logged. Actually that might be bad as it makes it harder to trouble shoot. It also, as you said it would spit out a bunch of debugging information where the error was usually displayed. Keep in mind, however, that I can't paste anything from when it is trying to update the action and times out because... it times out. I can paste the debug output on the screen before I update it however.
And just to make sure, I placed your code so that lines 510-522 look as such:
Comment #6
JJMcKay commentedYou don't think another module is conflicting do you? CCK or otherwise..
Comment #7
dopry commentedArray Walk seems to be getting valid input. I don't know why that error would be popping up in fix_magic_gpc().
As for the timeout issues... Is there anything in your webservers error logs? what web server are you running?
Is it requesting the proper domain name? Is there anything in watchdog? Can you add some debugging steps the print output throughout the work flow? Does upgrading to 4.7.x-dev solve your issues?
Comment #8
chrisschaub commentedI'm having the same issue, 4.7.4 on Linux, even bumped the memory to 256M . I've also updated the common.inc to the latest 4.7.4 rev since the gpc stuff was slightly patched.
Watchdog is recording this error ...
array_walk() [function.array-walk]: Unable to call 1.15894751662E-268() - function does not exist in /home/.....
Dying on line 512 in common.inc
It's trying to call a really bogus function name for the walk. Or maybe this is some weird watchdog translation error and not a problem.
It's funny, I can create a preset and then delete it. But after I add an action (say resize) then I can't do anything, just hangs. Delete, flush and update hang. I think the flush is hanging because its called by all three, but I'm not sure. Oh, and I can't create more than one preset after I add an action to the first one. I've also tried adding a "magic_quotes_gpc -> 0" to my php.ini with no luck.
Disabling the array_walk at line 512 in common.inc fixes the problem. Strange.
I've disabled all non-core mods except for image, nice menus and imagecache. So, I think there's a bug in imagecache or common or both?
Any help is greatly appreciated.
Comment #9
chrisschaub commentedOk, maybe this will help somebody else. If your php is running via CGI (not an apache module) using suexec then you might need to create a php.ini file in the root of your drupal install to turn off magic quotes. Then add the line ...
magic_quotes_gpc=off
to the php.ini file. All set, imagecache now works, no more hanging for me. I didn't think to check the php exec method. This also means that the major php overrides in the .htaccess supplied with drupal 4.7.x will not affect this type of install. You'll need to check the execution method of php and adjust. Can't say this will work everywhere, but it worked for me.
Comment #10
jurriaanroelofs commentedI had the same problem, time outs when specifying actions. However, I installed the module on another site, on the same server, and it worked without problems.
Dopry, you asked the other person: "Is it requesting the proper domain name?"
What do you mean by that and how do you check it? Because I installed drupal on this account before the domain was connected, and now it's on a temporary domain so that I could work with clean urls, is that bad?
Comment #11
dopry commentedYou just have to have magic_quotes_gpc off. To check the domain, look at the URL. Is this still an issue with imagecache or is it resolved? I can't reproduce.
Comment #12
rickvug commentedIs there any chance that the module could be patched to work with magic_quotes_gpc turned on? This is the default setting for many popular web hosts (Site5 + MediaTemple are confirmed to default to "on"). Dealing with PHP configuration is beyond most Drupal users.
Comment #13
seanenroute commentedI found that I was able to eliminate the error by upgrading my server to PHP5 from PHP4. With my hosting company it was just a matter of adding a line to my .htaccess file (http://faq.1and1.com/scripting_languages_supported/php/9.html).
Hope this helps.
Comment #14
dopry commentedThe problem for the case reported here originally occurs in _fix_gpc_quotes which is not a part of imagecache. And should provide compatibility with gpc_magic_quotes on or off already. This may be a php4/php5 compatibility issue with Drupal in general. So I'm setting it to won't fix regarding the gpc_magic_quotes issue.
Comment #15
jurriaanroelofs commentedI'm having the same problem.
Like with other people in this discussion, this site was transferred from a temporary domain to a final domain before I found out it was broken.
I have verified that on this same server, on the same cpanel account, I can run imagecache without problem. I did this by just installing another drupal in a subfolder of this site, while it was on the final domain.
if someone could shed some light on this it would be greatly appreciated.
Comment #16
jurriaanroelofs commentedif someone reads this and still doesn't understand what to do, as far as I know the easiest fix (hack) is to go to includes/common.inc and disable array_walk at line 512, by preceding the line with 2 slashes, like so:
// array_walk($item, '_fix_gpc_magic');
Comment #17
dopry commentedCan you please provide the php versions you are using?