File uploading/thumbnail problem

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
nichri
Posts: 8
Joined: Sun 11. Jul 2004, 15:39

File uploading/thumbnail problem

Post by nichri »

Hi,
I installed phpwcms a few days ago and I must admit that the learning cycle for it is quite fast.
I have a problem when trying to upload pictures of file size 800-900k. It gives an error:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes) in /var/www/html/phpwcms/include/inc_ext/hft_image/hft_image.php on line 155

The file is though uploaded successfully but I cannot create any thumbnail and ofcourse I cannot include the photo/picture in any article.

Can any body please advise?
thnx
nichri
Pappnase

Post by Pappnase »

hello

please look into the (include/inc_conf/)conf.inc.php

line 48

you will find this.

Code: Select all

// content values
$phpwcms["file_maxsize"]      = 52428800; //Bytes (50 x 1024 x 1024)
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

No - the problem is your PHP process has not enough memory. A JPEG file that is 800K will often has around 10MB in memory because it is a compressed image format.

This value can be changed in php.ini only.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Pappnase

Post by Pappnase »

Oliver Georgi wrote:No - the problem is your PHP process has not enough memory. A JPEG file that is 800K will often has around 10MB in memory because it is a compressed image format.

This value can be changed in php.ini only.

Oliver
hello oliver

sometimes it's better to read the error message 2 times! :oops:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes)
nichri
Posts: 8
Joined: Sun 11. Jul 2004, 15:39

Post by nichri »

Oliver Georgi wrote:No - the problem is your PHP process has not enough memory. A JPEG file that is 800K will often has around 10MB in memory because it is a compressed image format.

This value can be changed in php.ini only.

Oliver
Oliver I think you 're right :) I checked my php.ini and has a limitation as follows:
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

Is it wise to increase this figure and if yes how much do you recommend? FYI, I have my site set on my home pc and I then plan to put it on a public server (my pc is on a static internet ip though accessible from outside).
nichri
nichri
Posts: 8
Joined: Sun 11. Jul 2004, 15:39

Post by nichri »

I increased the memory limit from 8M to 12M and worked w/o any errors!
Thnx for yr assistance :D
nichri
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I recommend around 30MB, min. 16MB.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
registeringsucks
Posts: 9
Joined: Mon 9. Aug 2004, 19:51

imagemagick thumbnails

Post by registeringsucks »

I'm having a similar problem where very small images are uploaded and the thumbnails appear, but images that really need a thumbnail, either upload and a broken image appears (red X icon) or it won't generate the thmbnail. I've installed ImageMagic in C:\ImageMagick and if I use convert on a command line, it generates the thumbnail.

I like this feature rich system and I want to use it for images as well as other files types.

I changed the entry in php.ini for maximum upload to 30M.

Any suggestions why some upload and other don't?
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

what ImageMagick release do you use?
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
registeringsucks
Posts: 9
Joined: Mon 9. Aug 2004, 19:51

ImageMagick problems

Post by registeringsucks »

I'm using the latest version. 6.0.3-Q16.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

and what kind of images - you can send me a link via private message. Then I can check that against my local windows install.

oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
registeringsucks
Posts: 9
Joined: Mon 9. Aug 2004, 19:51

ImageMagick problems

Post by registeringsucks »

I don't have the images anywhere but on my harddrive. The server that I have ImageMagick and phpwcms on is behind a firewall, on a private network.

I guess there is no way to make attachments here?
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

is "convert -version" anywhere working in command line.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
registeringsucks
Posts: 9
Joined: Mon 9. Aug 2004, 19:51

ImageMagick problems

Post by registeringsucks »

As I stated in my first message, I can run convert from the command line, but I always navigate to the directory C:\ImageMagick before I run convert. Are you wondering if that directory is available in the PATH statement? I didn't try that! It still doesn't make sense why some files convert and others do not. I'm still confused!
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

oh - some are and some not

but I can not help you without having a sample image.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply