QUESTION to Allowed memory size of X bytes exhausted QUESTION to Allowed memory size of X bytes exhausted
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

QUESTION to Allowed memory size of X bytes exhausted

Started by Lada, September 10, 2004, 11:19:31 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Lada

I read your comments and your 3 suggestions :
I want to upload 1280x1024 pics but unfortunatly I am missing about 300-5000 bytes of allowed memory.
I have tried your 3. point but it does not work. If I overwrite the small pics with the high res pics it has in the database still info about the old ones. So If I want them to see it shows the former small resolution. Only one solution is to rewrite the info in cpg132_pictures   using phpMyAdmin. But it is pretty slow to change it for each pic.
Is there any script to do it automaticaly ?

Casper

If all the pics in an album are the same size, it should be easy enough to run a db query to update the sizes for all pics in that album.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Lada

Casper: How to do it ? I am not familiar with php databases and phpMyadmin.
How to solve it if not all the files have the same resolution ? It means to find out what resol has given file and based on this to repair it in the database

Casper

I suggest you do what is suggested, upload the smaller files to a new album, then overwrite them with the full size pics,
Then run a query like this to set the database to the new sizes.  Will only work if all images the same size.  Chane CPG to your actual prefix, and 25 to the actual album id.
QuoteUPDATE  `CPG_pictures`  SET  `pwidth`  =1280 'pheight' = 1024 WHERE  `aid`  = '25';

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Lada

I have put this
UPDATE  `cpg132_pictures`  SET  `pwidth`  =1280 'pheight' = 1024 WHERE  `aid`  = `7`;

and got error #1064 that the syntax is strange near ''pheight' =1024 WHERE  `aid`  =  `7`'

mstralka

Quote from: Lada on September 11, 2004, 01:14:57 AM
I have put this
UPDATE  `cpg132_pictures`  SET  `pwidth`  =1280 'pheight' = 1024 WHERE  `aid`  = `7`;

and got error #1064 that the syntax is strange near ''pheight' =1024 WHERE  `aid`  =  `7`'

You need a comma between 1280 and `pheight':
You can also get rid of all the backticks and single quotes (phpMyAdmin puts them in, but they're really not necessary around field names, only around string values)

update cpg132_pictures SET pwidth = 1280, pheight = 1024 where aid = 7;


-Mark
GO IRISH

Lada

mstralka: YOur query works. Thanks
But the general idea of hyperion  from sticky post does not work. I did it like his quideline (original sizes uploaded to databse 500x500 about 23kB, overwritten with pics 1280x1024 about 95kB)  but the result is -- the quality of the pic is like resampling from 500x500 to 1280x1024. If I open the image from the gallery its size is 1280x1024 but opened from URL size remains 500x500. So it seems something is wrong in his idea, i think.
The strange thing is that the pics have now really the resolution 1280x1024 but opened from the URL it is 500x500. I do not know where the info is taken from and is stored.

database http://www.alba.lam-sro.com/displayimage.php?pos=-33
URL  http://www.alba.lam-sro.com/albums/rodinne/eliska/1mesic/eliska_13_7_04_01.jpg

Casper

I just browsed to http://www.alba.lam-sro.com/albums/rodinne/eliska/1mesic/eliska_13_7_04_01.jpg, and the pic is 500x500, so you have not overwritten it with the larger sized pic yet.

You need to put the original full size pic on the server for this to work.

ps, why did you save a rectangular pic in a square format?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

mstralka

I'm not familiar with the actual problem, but the image eliksa_13_7_04_01.jpg is physically stored on the server at 500x500.  When you click on the picture in displayimage.php, it opens displayimage.php but with different settings that tries to display the image at 1280x1024.  It is being resampled by the browser, but if you were to save the file to your desktop and view its properties, you would see that it's 500x500.  I think you should delete the images from your server (using an FTP client, not CPG) and re-upload them at full size using an FTP client.  Be very careful that you delete the right images.

Mark
GO IRISH

Lada

Quote from: Casper on September 11, 2004, 03:43:10 PM
I just browsed to http://www.alba.lam-sro.com/albums/rodinne/eliska/1mesic/eliska_13_7_04_01.jpg, and the pic is 500x500, so you have not overwritten it with the larger sized pic yet.

You need to put the original full size pic on the server for this to work.

ps, why did you save a rectangular pic in a square format?

As I have already written in my prev post - I have overwritten. I checked with ftp clients. Look at the database there is the larger. The strange thing is it shows the smaller size.

I put 500x500 just as an sample to get smaller size of pics. There is No deeper intention behid this.

Lada

Now solved. Something strange with my ftp client. I have had to 1. delete the files 2. and then upload the bigger ones. The overwritten did not work.

mstralka

Glad to hear that worked.  Most FTP clients will prompt to overwrite a file, but it can be configured to overwrite only if the file is newer or different size. 
GO IRISH