can't get random block to work on new server. help.
mgoyal
Joined: 2007-01-23
Posts: 7 |
Posted: Tue, 2007-01-23 05:34 |
Hi, I recently copied my website (Wordpress 2.1 and Gallery 1.55pl1) over a to a new server. The DNS is pointing to the new server and almost everything is working fine. The only issue I'm having is with block-random.php and block-random-enhanced.php. Other PHP files using my gallery run fine, such as "topXalbums.php" at http://www.snagabag.com/gallery/topXalbums.php However, both http://www.snagabag.com/gallery/block-random.php and http://www.snagabag.com/gallery/block-random-enhanced won't run. block-random.php gives me the following error: and block-random-enhanced.php is presented as a download by my browser instead of being executed. however, when I try to run it from my blog I get the following error: You can see it working here: And not working here: I'm looking for any help on how to get it to run on my new server. Thanks! |
|
Posts: 27300
http://codex.gallery2.org/index.php/Gallery1:FAQ#Why_do_I_get_the_error_Allowed_memory_size_of_Xxx_bytes_exhausted.3F
http://codex.gallery2.org/index.php/Gallery2:FAQ#PHP_memory_limit_-_Why_do_I_get_the_error_Allowed_memory_size_of_Xxx_bytes_exhausted.3F
Your new server needs more memory allocated to php
Dave
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!
Posts: 1
grt info florid
Posts: 7
Thanks for the info! Very helpful. I'm a PHP/programming novice, but I did some investigation.
My old server (where block-random.php works) returned the following from "ulimit -a":
My new server, where block-random isn't work, returned the following:
In addition to have some additional parameters, the new server has a limit on "max locked memory" and "stack size" both of which are 'unlimited' on the original server.
Can I change these (max locked memory and/or stack size) via .htaccess or inserting a little php into my main.php file? Is it safe to try? I'm on a shared server and don't want to screw anything up.
Thanks!
Posts: 7
Also, what does it mean that a specific PHP file is being presented as a download by my browser? (ie-FireFox is asking if I want to open or save the PHP file.)
On my new server, other PHP files run just fine:
http://www.snagabag.com/gallery/topXalbums.php
but the random photo PHP file is presented as a file to download:
http://snagabag/gallery/block-random-enhanced.php
even though the same file is executed properly in my browser on my old server:
http://209.51.150.53/~snagabag/gallery/block-random-enhanced.php
I've checked the permissions for these PHP files and they are set to 644 on both my old and new servers.
(apologies in advance if my questions are asinine...I'm not well versed in these matters.)
Posts: 7
Updated info...
1. I did not perform a fresh install of Gallery on my new server. Rather I copied my Gallery install over from the old server and reran the config script. Everything appears to be fine (except for the block-random) with Gallery on the new server.
2. Got the following info from my webhost:
"Memory limit is set to 32 megs on www11 and they're (now) set to 50 megs on the new server, yet it's not working on the new server, there's something that needs adjusting on the script not sure what, but 50 megs is more than I really like to set for a memory limit (it was set to 40 which is more sensible).
Maybe see if the authors can shed some light on why it would use way way more memory on one server than another."
3. Used the info in the codex referenced above to increase the PHP memory limit but still getting the same error:
"Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 40 bytes) in /home/snagab00/domains/snagabag.com/public_html/gallery/classes/Album.php on line 924"
The "Allowed memory size" increases to match the increased PHP memory limit. I increased it to 64megs with no luck. (The above quote is from a 50meg limit set.) Again, the memory limit on the old server (where it still works) is 32megs.
ANY help is appreciated.
Thanks.
Posts: 7
ok...found out my new server might have the following issue.
"the newer servers has restricted the ability to open http requests with SSI or PHP because there a security issue and can cause infinate loops."
waiting for confirmation from my webhost.