Problems adding pictures with class attribute image

Author Message

Jerry Jalava

Tuesday 10 June 2003 4:06:41 pm

Hi,

I'm having trouble using the image attribute in classes. It just doesn't upload any pictures. I'm using eZ 3.0-2. I just founded this out while playing with the forum classes. If someone could be nice and send me some suggestions where to start looking for conclusion to this problem.

Once more,
- I try to make new forum "folder" and I choose image from my hdd and press publish.
- Everything else comes available expect the picture.
- It just doesn't upload it to the server...
- I could use some hints how to solve this annoing prob.

Regards,
Jerry

Jan Borsodi

Wednesday 11 June 2003 3:41:51 am

You could try these documents.
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/typical_problems_and_solutions/images_do_not_work
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/how_to_start_beginners

you should also try to search the forums for this problem.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Claudius Frank

Wednesday 11 June 2003 4:22:49 am

I am not able to publish any images on a hosted server, neither with GD nor with ImageMagick. I have read all pieces of advice in the forum, but nothing helped to solve the problem.

I receive always these errors:

Warning:
Exec: /usr/local/bin/convert -geometry "600x600>" var/storage/reference/image//php6N5P5i.jpg jpg:var/storage/variations/image/p/h/p//php6N5P5i_600x600_368.jpg, Err: , Ret: 127
Warning: PHP
getimagesize(var/storage/variations/image/p/h/p/php6N5P5i_600x600_368.jpg) [<a href='http://www.php.net/function.getimagesize'>function.getimagesize</a>]: failed to create stream: No such file or directory in /mySite.com/ezpublish/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 234
Warning: PHP
filesize() [<a href='http://www.php.net/function.filesize'>function.filesize</a>]: Stat failed for var/storage/variations/image/p/h/p/php6N5P5i_600x600_368.jpg (errno=2 - No such file or directory) in /mySite.com/ezpublish/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 249
Error:
Could not create variation for var/storage/variations/image/p/h/p/php6N5P5i_600x600_368.jpg
Error: eZTemplate @ design/standard/templates/content/datatype/view/ezimage.tpl:8[14] Cannot retrieve attribute of a boolean

Regards

Jan Borsodi

Wednesday 11 June 2003 5:04:30 am

You either have openbasedir restrictions on or the PHP version you are using has some bugs. Consider upgrading or removing openbasedir restriction if possible.

Some more information can be found here:
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/typical_problems_and_solutions/open_basedir_problem
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/typical_problems_and_solutions

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Claudius Frank

Wednesday 11 June 2003 5:51:20 am

Thank you very much for reply.

The server is a shared host so I can't change nothing.
The entries in php.ini are:

Version
4.3.1

Extensions
xml, wddx, tokenizer, swf, standard, session, recode, posix, pcre, overload, mysql, mcrypt, imap, gettext, gd, ftp, exif, dbase, dba, db, ctype, calendar, bcmath, zlib, apache, Zend Optimizer

Safe mode is off.
Basedir restriction is off.
Global variable registration is off.
File uploading is enabled.
Maximum size of post data (text and files) is 8M.
Script memory limit is 16M.
Maximum execution time is 30 seconds.

Regards

Jerry Jalava

Wednesday 11 June 2003 7:57:31 am

Thanks for your reply. But I still can't get them to work. I get this in log: No such attribute for object(ezhttpfile): filename
Choose one of following: original_filename, filename, filesize, is_temporary, mime_type, mime_type_category, mime_type_part

Don't know if that has nothing to do with this...

But the images work correctly when I installed the demo site, but now when I installed eZ without demo stuff they just don't seem to work...

Thanks,
Jerry

Douglas Hammond

Wednesday 11 June 2003 11:29:17 am

did you notice the double slash in jpg:var/storage/variations/image/p/h/p//php6N5P5i_600x600_368.jpg

this stoped images working for. I use GD and had to make a number of fixes.

to get rid of the double // in

change

line 331
if ( preg_match( "#(.+/)?(.+)$#", $file, $matches ) )
{
$dirs = $matches[1];
$file = $matches[2];
}

to
if ( preg_match( "#((.+)/)?(.+)$#", $file, $matches ) )
{
$dirs = $matches[2];
$file = $matches[3];
}

you also have to do the same on line 351.

Claudius Frank

Wednesday 11 June 2003 2:12:08 pm

I know all the details which you have described. I have changed all the files proposed by you, but the result was the same. Nothing has changed.

Regards

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:43:06
Script start
Timing: Jan 18 2025 18:43:06
Module start 'layout'
Timing: Jan 18 2025 18:43:06
Module start 'content'
Timing: Jan 18 2025 18:43:06
Module end 'content'
Timing: Jan 18 2025 18:43:06
Script end

Main resources:

Total runtime0.7184 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0625152.6406
Module start 'layout' 0.00650.0029 740.703139.4766
Module start 'content' 0.00950.7075 780.1797672.5000
Module end 'content' 0.71700.0013 1,452.679720.1250
Script end 0.7183  1,472.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4210160.0002
Check MTime0.00120.1709160.0001
Mysql Total
Database connection0.00090.131810.0009
Mysqli_queries0.644389.6903760.0085
Looping result0.00070.0934740.0000
Template Total0.687495.720.3437
Template load0.00170.239820.0009
Template processing0.685795.450920.3428
Template load and register function0.00020.021110.0002
states
state_id_array0.00080.110710.0008
state_identifier_array0.00150.214220.0008
Override
Cache load0.00160.2256830.0000
Sytem overhead
Fetch class attribute can translate value0.00060.076940.0001
Fetch class attribute name0.00150.208590.0002
XML
Image XML parsing0.00100.134040.0002
class_abstraction
Instantiating content class attribute0.00000.0029100.0000
General
dbfile0.00080.1111170.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs