Daniela's podcast "The Real DNA" is available on Spotify & Apple Podcasts   

Post new topic Reply to topic  [ 10 posts ] 

Board index : Technical Support

Author Enter your Message here

Site Admin
 Post subject: General Problems with php
PostPosted: 5. April 2009 10:59 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
Does anybody know the reason and the solution to:


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





Top
  Profile WWW
Reply with quote  

blue webmaster
 Post subject: Re: General Problems with php
PostPosted: 5. April 2009 11:30 
Offline
User avatar

Joined: 23. April 2008
Posts: 1385
Location: near Cologne, Germany
Local Time:
|12. May 2021| 17:31
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 ;) )..


Top
  Profile
Reply with quote  

Site Admin
 Post subject: Re: General Problems with php
PostPosted: 5. April 2009 12:31 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
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.





Top
  Profile WWW
Reply with quote  

blue webmaster
 Post subject: Re: General Problems with php
PostPosted: 8. April 2009 12:15 
Offline
User avatar

Joined: 23. April 2008
Posts: 1385
Location: near Cologne, Germany
Local Time:
|12. May 2021| 17:31
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.


Top
  Profile
Reply with quote  

Site Admin
 Post subject: Re: General Problems with php
PostPosted: 9. April 2009 10:27 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
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?





Top
  Profile WWW
Reply with quote  

Site Admin
 Post subject: Re: General Problems with php
PostPosted: 10. April 2009 23:05 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
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

no stupid message





Top
  Profile WWW
Reply with quote  

Site Admin
 Post subject: Re: General Problems with php
PostPosted: 11. April 2009 11:52 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
remember how we earlier talked about how the pictures should be arranged by name but isn't?
Well check this out:





Top
  Profile WWW
Reply with quote  

blue webmaster
 Post subject: Re: General Problems with php
PostPosted: 12. April 2009 00:27 
Offline
User avatar

Joined: 23. April 2008
Posts: 1385
Location: near Cologne, Germany
Local Time:
|12. May 2021| 17:31
remember how we earlier talked about how the pictures should be arranged by name but isn't?
Well check this out:

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.


Top
  Profile
Reply with quote  

blue webmaster
 Post subject: Re: General Problems with php
PostPosted: 12. April 2009 01:22 
Offline
User avatar

Joined: 23. April 2008
Posts: 1385
Location: near Cologne, Germany
Local Time:
|12. May 2021| 17:31
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:


Top
  Profile
Reply with quote  

Site Admin
 Post subject: Re: General Problems with php
PostPosted: 12. April 2009 01:33 
Offline
User avatar

Joined: 26. April 2008
Posts: 1291
Location: Denmark
Local Time:
|12. May 2021| 18:31
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.





Top
  Profile WWW
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

Board index : Technical Support


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  






This forum is powered by phpBB • Style based on N.Design by Midnight Phoenix
Chat and Shoutbox based on Ajax Chat by blueimpFacebook connect for phpBB by SVmods.
Privacy policy