Holiday Hours

Our offices will be closed Monday December 24th and Tuesdsay December 25th in observance of the Christmas Holiday. We will reopen Wednesday December 26th @ 10am. All support requests and emails received after close of business on Friday December 21st will be responded to when we return on Wednesday the 26th in the order they were received. We apologize if this causes any inconvenience.

Help & Support

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Flux - Gallery problems

Andy Ogden Jul 19, 2012 05:32AM EDT

I've created a new gallery and uploaded some images, then set a featured image. It appears correctly in a profile page, however when I view the gallery itself it takes about a minute for the page to appear empty with just the left and right controls visible.

The page can be seen here -

Is this a known problem?

Up 9 rated Down
RAWfolio Support Jul 19, 2012 07:12AM EDT RAWfolio Agent

It appears that your server is not allowing the page to calculate the size of the images, that page uses a built in PHP function called getimagesize() to calculate the size of an image and then populate that onto the page. What’s most likely happening is that your server has a lot threshold set for memory usage of a single script, so for each image it’s hitting the memory limit, hanging, and then going to the next and trying. We’ll see if we can find a solution that will try to prevent this.

Up 11 rated Down
Andy Ogden Jul 19, 2012 07:31AM EDT
My hosting is with Heart Internet and I've just searched their support database for 'script limit' and got the following article.

If you could suggest a suitable memory limit, would this work?

My script needs a higher memory allocation, how do I increase it?

You can create your own php.ini file inside whatever sub-directory your script is in. There's a lot of documentation on how to use the various configuration features inside php.ini online at

memory_limit = 32M;

and then make or amend a .htaccess file as well

RLimitMEM 256000000

This will increase the memory limit for a php script to 32MB

If this still does not work, take note of the error message that is produced. Is PHP now reporting that it is running out of memory at 32MB, or is it still reporting the old amount? In the former case, try upping the memory again. If you keep getting memory errors at each level, it is quite likely that an infinite loop has been created within your script, and it will run out of memory, no matter how much you use. In the latter case, it is likely that the PHP memory limit is being set elsewhere, either within your code, or via another php.ini.
Up 5 rated Down
RAWfolio Support Jul 19, 2012 07:35AM EDT RAWfolio Agent

The easiest way to increase the memory limit is the create a file called php.ini and put the line ‘memory_limit = 32M;’ (without the quotation) and then FTP it to your root directory of your site. This will automatically direct PHP to use a higher memory limit. We have a workaround for the images not displaying when this fails but it won’t solve the problem of the load time since that’s the actual server not responding.

Up 6 rated Down
Andy Ogden Jul 19, 2012 08:29AM EDT
I've tried amending the existing php.ini and adding the memory_limit = 32 line, however this results in a 500 internal server error which persists until I remove the line from the file.

I went to log a support call with my host and their form included the last 5 errors from my logs: -

[Thu Jul 19 13:21:40 2012] [error] [client] PHP Warning: getimagesize( [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: Connection refused in /home/sites/ on line 91

The other 4 were the same error with a different timestamp

Does this change things?
Up 2 rated Down
RAWfolio Support Jul 19, 2012 08:38AM EDT RAWfolio Agent

Yes, it seems your server is not allowing the function to run, it might be a case that they are not allowing it with explicit http:// because it technically could be on another site.. I would check with your support to see if they can enable it.. you could also check if they will turn on ‘allow_url_fopen’

Up -2 rated Down
Andy Ogden Jul 19, 2012 03:28PM EDT
Ok so I've sent your comments and this is what I got back...

Thanks for contacting us. The issue here is that this script appears to be trying to create an HTTP connection to the same server as the site is on. This is known as a 'loop-back' connection. I'm afraid we have loopback connections disabled on all of our servers, as they pose a high security risk to our systems. These are an easy way for a malicious user to take down a webserver, which is why they aren't allowed I'm afraid.

If you can change this script so that it references the path to the file on the server, in the form '/home/sites/' instead though, this should work correctly, and you should not have this issue again.

Can the explicit path be turned off in favor of a relative path in settings? Or is there a code fix I can use?

Up 4 rated Down
RAWfolio Support Jul 19, 2012 04:28PM EDT RAWfolio Agent


Thank you for the update. This is Tim Miller, Customer Support Representative here at

Our developer is currently out of the office today and tomorrow and will look further into this issue for you Monday.

We will be in touch as soon as possible.

-Tim Miller
RAWFolio Customer Support

Up 1 rated Down
Andy Ogden Jul 19, 2012 05:10PM EDT
Thanks Tim

I appreciate the update, I'l look forward to hearing more on Monday

Up 2 rated Down
RAWfolio Support Jul 23, 2012 01:35PM EDT RAWfolio Agent

We’ve pushed an update (1.0.9) that should remedy this issue, let us know if you run into any other problems.

Up 0 rated Down
Andy Ogden Jul 23, 2012 03:11PM EDT
That's got it sorted, thanks. I really appreciate the fix, some other developers would've just said the problem was with my hosting.

Excellent service!

Up 0 rated Down
Andy Ogden Jul 24, 2012 07:04AM EDT
Although this has resolved the display issues, I'm receiving '504 Gateway Time-out' whilst saving updates to the gallery. Although the gallery works afterwards some of the later images are missing.

I've found the following related errors in my log files

[Tue Jul 24 11:44:11 2012] [warn] [client] Timeout waiting for output from CGI script /home/sites/, referer:
[Tue Jul 24 11:44:11 2012] [error] [client] Script timed out before returning headers: post.php, referer:
Up 11 rated Down
RAWfolio Support Jul 24, 2012 08:52AM EDT RAWfolio Agent

The post.php file is a native WordPress file, the Flux theme doesn’t make any modifications or alter the file in any way. The time-out message means that something is ‘hanging’ on your server while processing/saving the post. Are there any more details included in the log file that may be of assistance?

Up 18 rated Down
Andy Ogden Jul 24, 2012 09:28AM EDT

The page I'm trying to save is a Gallery and therefore a custom page type. I have no problem saving other posts.

I checked the error log before attempting the save and copied the only two new entries that appeared after clicking update and receiving the 504 error.

I've added a number of images (all less than 500k) to the gallery and when I click save I get the error.

I've done some testing and created new galleries with fewer images and found the amount of time it takes to save directly relates to the number of images in the gallery. My page that is timing out has 22 images, surely this isn't excessive?

Up 10 rated Down
RAWfolio Support Jul 24, 2012 05:30PM EDT RAWfolio Agent

Yes the galleries are custom post types, but under the hood custom post types are just a sub classification of WordPress’ ‘Post’ objects just like pages, images and attachments are, and all of them are essentially run by the post.php file.

Are you using version or In 9.2 we put in some rules that defers some of the image processing until it’s actually needed but none of the logic for the galleries tie into post.php other than to set a flag that the gallery has been saved/updated. Is there any other error showing besides the 504 error? Perhaps a line number where we can trace what is being executed when it’s timing out?

Up 10 rated Down
Andy Ogden Jul 25, 2012 09:12AM EDT
I'd just updated and tested the galleries with when I made that post, so wasn't available yet.

I've just installed it and I'm happy to report my page save time is now down to a reasonable few seconds and all my images now load.

Thanks for the help with this


This question has received the maximum number of answers.


Got a Pre-Sales question? Take a look at our FAQ page.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found