Daniela Hantuchova :: Unofficial, private Forum for Fans
https://www.daniela-hantuchova.net/

General Problems with php
https://www.daniela-hantuchova.net/viewtopic.php?f=23&t=284
Page 1 of 1

Author:  christina [ 5. April 2009 10:59 ]
Post subject:  General Problems with php

Does anybody know the reason and the solution to:
To see links you must be a member of our community! Please register for free!


Fatal error: Out of memory (allocated 40894464) (tried to allocate 14856 bytes) in /home/renebs/public_html/hantuchova-fan/azarenka-fan/Media/test.php on line 65

Author:  BlueDragon [ 5. April 2009 11:30 ]
Post subject:  Re: General Problems with php

not yet, but I'll have a look at it when I use my own computer again. And probably ask my provider (I know that my provider is in no way concerned with your site, christina, but he is very friendly and an expert with php ;) )..

Author:  christina [ 5. April 2009 12:31 ]
Post subject:  Re: General Problems with php

not yet, but I'll have a look at it when I use my own computer again. And probably ask my provider (I know that my provider is in no way concerned with your site, christina, but he is very friendly and an expert with php ;) )..

thank you so much. I really need to learn php one of these days. I've had the problems before. Kallur tried some different things and we concluded it has something to do with the very large HQ pictures, but I couldn't figure out if it's something I can edit in the php or if it is something to do with my provider.

Author:  BlueDragon [ 8. April 2009 12:15 ]
Post subject:  Re: General Problems with php

ok, I'm pretty sure that the error occurs while creating the thumbnails of the images. If there are no thumbnails in the "thumbs" directory, and you open the gallery, your website tries automatically to generate them.

Up to about five images is ok, but 60 are too much, because they would use too much memory on your website's server if the php-script didn't stop.




On top of test.php
/*this can take a looong time and a good size of memory... XD*/
ini_set("memory_limit", "90000M");
ini_set("max_execution_time", "0");

obviously here the the memorylimit has been set, but I don't know if your host uses a different one. You can try and increase it, but on your own risk ;)
Another possibility is creating the thumbnail images on your own ;)
A good proggy for this purpose: The
I've used it for several website gallerys and I love it. It also can help you with easily renaming hundreds of images, all you have to do is specify some settings (not very difficult to find out about them) and a mouse click.

Author:  christina [ 9. April 2009 10:27 ]
Post subject:  Re: General Problems with php

I'll try to do it manually. Thanks for the help and the link. Thoug the page can do it for 60 smaller images, but the the HQ images.

Another question. It is about my navigation bar. It looks fine in firefox no matter how big a font I (as a user) choose to have, however, in explorer it only looks good in one font size. If you don't understand what I mean, I'll make screen caps for you. Does anybody know what to do in css to make the link bar universal?

Author:  christina [ 10. April 2009 23:05 ]
Post subject:  Re: General Problems with php

you are a genius.
I downloaded the program and it is great. So fast to use and it has so many cool options. I created all the thumbnails for the 2009 Miami final with it, and voila
To see links you must be a member of our community! Please register for free!

no stupid message

Author:  christina [ 11. April 2009 11:52 ]
Post subject:  Re: General Problems with php

remember how we earlier talked about how the pictures should be arranged by name but isn't?
Well check this out:
To see links you must be a member of our community! Please register for free!

Author:  BlueDragon [ 12. April 2009 00:27 ]
Post subject:  Re: General Problems with php

remember how we earlier talked about how the pictures should be arranged by name but isn't?
Well check this out:
To see links you must be a member of our community! Please register for free!

simply fascinating :shock:


...at first glance! This morning, i was really astonished, but now I have a theory on this behaviour. In the "Various Off-Court"- Page, all the images have just numbers as their filenames (like 02.jpg) . In the other galleries the images have additional words, for example victoria_azarenka_miami_final_2009_02.jpg

I've tested it, and the result is the same in both cases.

Author:  BlueDragon [ 12. April 2009 01:22 ]
Post subject:  Re: General Problems with php

christina, I got it!!!!
All your albums are now ordered alphabetically!!! :bananasrock:

The issue with only numbers being sorted made me look again at these lines:

function orderByName($files)
{
for($check = 1; $check < count($files); $check++)
for($element = 0; $element < (count($files) - 1); $element++)
{
if(
intval($files[$element]['name']) > intval($files[$element + 1]['name']))
{
$aux = $files[$element];
$files[$element] = $files[($element + 1)];
$files[($element + 1)] = $aux;
}
}
return $files;
}


I took a closer look at it and wondered what "intval" might mean. I just used google and realized that this only returns numbers (called integer). But we want to sort words (called strings), so I searched the web for "php sort strings".
After a little while of reading and thinking, I replaced the code above with these simple lines:

function orderByName($files)
       {
          sort($files);
          return    $files;
        }

And it works :lol:

Author:  christina [ 12. April 2009 01:33 ]
Post subject:  Re: General Problems with php

I stand by my first assumption, you are a genius. Wow. I knew that the newly discovered bit of information would do more for you than me. Ans as that took me way too long to type, I'll stop now and maybe continue tomorrow with less alcohol in my blood.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/