FORUM IS CLOSED. PLEASE USE QUESTIONS / ANSWERS PAGE INSTEAD
Login  |  Forum  |  Search   

Board index » Development » Help requests




Post new topic Reply to topic  [ 6 posts ] 
 
Author Message
 Post subject: can't use image widget
 Post Posted: Wed Feb 08, 2012 7:01 pm 
Offline

Joined: Sat Feb 04, 2012 3:50 pm
Posts: 35
Hi,
i tried to use image widget and here is what i have in system log:

<b>WARNING </b> fopen(/space/www/file/tmp//107b.jpg): failed to open stream: Permission denied<br /> in /space/website/ImpressPages_2_0rc2/ip_cms/modules/developer/upload/controller.php on line 106

thanks,
thierry


Top 
 Profile  
 
 Post subject: Re: can't use image widget
 Post Posted: Wed Feb 08, 2012 8:55 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
Prabably php has no write permission on file/tmp/ dir. You need to chmod it to 777. But I will take a look at that double slash.


Top 
 Profile  
 
 Post subject: Re: can't use image widget
 Post Posted: Thu Feb 09, 2012 7:31 am 
Offline

Joined: Sat Feb 04, 2012 3:50 pm
Posts: 35
hi,
the tmp dir is writable, it could be owner problem, i'm the owner of all file and directory but files created by the server own to www-data and aren't not in chmod 777.

look at the file directory:
Quote:
-rw-r--r-- 1 www-data www-data 127789 2012-02-09 08:25 107.jpg
-rwxrwxr-x 1 thierry thierry 20 2012-01-23 22:10 readme.txt*
drwxrwxr-x 2 thierry thierry 4096 2012-01-23 22:10 repository/
drwxrwxrwx 2 thierry thierry 4096 2012-02-09 08:25 tmp/


107.jpg is the one created by the image widget, so I can't control owner and permission.


Top 
 Profile  
 
 Post subject: Re: can't use image widget
 Post Posted: Thu Feb 09, 2012 9:19 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
Currently ImpressPages creates uploaded files and don't manage permissions or owner. In some configurations it might result in something similar you are experiencing.

Which hosting are you using? This thing happens to all any widgets files?


Top 
 Profile  
 
 Post subject: Re: can't use image widget
 Post Posted: Fri Feb 10, 2012 8:37 am 
Offline

Joined: Sat Feb 04, 2012 3:50 pm
Posts: 35
I did a fresh install to be sure and tried with ip_default theme:
-I can choose an image an see it in the widget
-I can resize
-I CANNOT confirm

please find below the log, it's running on a local apache server on ubuntu, I have already tried several cms without problems on the same server.

Code:
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagejpeg() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 216        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagecopyresampled() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 197        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagefilledrectangle() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 196        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagecolorallocatealpha() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 195        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagesavealpha() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 194        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagealphablending() expects parameter 1 to be resource, boolean given<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 193        
system    2012-02-10 09:34:31    error    <b>WARNING </b> imagecreatetruecolor(): Invalid image dimensions<br /> in /space/website/ImpressPages_2_0rc2/ip_libs/php/image/functions.php on line 192        
system    2012-02-10 09:34:31    error    <b>WARNING </b> Division by zero<br /> in /space/website/ImpressPages_2_0rc2/ip_cms/modules/standard/content_management/widget/IpImage/IpImage.php on line 78        
system    2012-02-10 09:34:31    error    <b>WARNING </b> Division by zero<br /> in /space/website/ImpressPages_2_0rc2/ip_cms/modules/standard/content_management/widget/IpImage/IpImage.php on line 76


Top 
 Profile  
 
 Post subject: Re: can't use image widget
 Post Posted: Fri Feb 10, 2012 8:13 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
I assume, that this is the problem:

Uploaded files gets permissions that does not allow for PHP to access those files. Hosting companies has configurations that handles this problem (xampp on Ubuntu also does). Also most CMS systems handles it manually if hosting doesn't. Unfortunately ImpressPages doesn't do that yet.

I've registered this bug. But i don't think it will be fixed next week. So the only fast way to fix the problem is to reconfigure your local environment or fix uploaded file permissions and suggest changes to github.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Development » Help requests


 
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

Search for:
Jump to:  
cron