1.6.11 php error when attaching images

Please report bugs here!

Moderator: Thorsten

Post Reply
LamBras
Posts: 7
Joined: Tue Aug 05, 2003 9:22 am

1.6.11 php error when attaching images

Post by LamBras »

Fatal error: Call to a member function read() on a non-object in /FAQ/admin/editor/plugins/ImageManager/Classes/ImageManager.php on line 106

This happens when I click the image-icon ("insert/modify Image") in a edit view.

Any suggestions?
Thanks.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I cannot reproduce that. What PHP version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
LamBras
Posts: 7
Joined: Tue Aug 05, 2003 9:22 am

Post by LamBras »

php5-common/etch uptodate 5.2.0-8+etch3
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

can you check, if this example is working on your server?

http://de3.php.net/manual/de/class.dir.php

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
LamBras
Posts: 7
Joined: Tue Aug 05, 2003 9:22 am

Post by LamBras »

With the included path /etc/php5, my open_basedir restriction comes into effect.

when setting
$d = dir(".");
I get
Handle: Resource id #2 Path: . . .. admin docs font lang template add.php attachments data artikel.php ask.php contact.php images inc help.php index.php mailsend2friend.php main.php open.php pdf.php save.php pdf test.php savecomment.php savequestion.php savevoting.php search.php send2friend.php sendmail.php show.php writecomment.php xml.php xml xmlrpc.php template.orig feed install _.htaccess _httpd.ini sitemap.php _lighttpd.conf phpmyfaq.spec

when setting $d to my absolute path to the FAQ:
Handle: Resource id #2 Path: /var/www/dvdboard/FAQ . .. admin docs font lang template add.php attachments data artikel.php ask.php contact.php images inc help.php index.php mailsend2friend.php main.php open.php pdf.php save.php pdf test.php savecomment.php savequestion.php savevoting.php search.php send2friend.php sendmail.php show.php writecomment.php xml.php xml xmlrpc.php template.orig feed install _.htaccess _httpd.ini sitemap.php _lighttpd.conf phpmyfaq.spec
Doesn't look like a PHP problem to me.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
LamBras wrote:With the included path /etc/php5, my open_basedir restriction comes into effect.
that's the problem: your open_basedir directive is not correct because it doesn't contain the phpMyFAQ path. It's not a bug in phpMyFAQ.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
LamBras
Posts: 7
Joined: Tue Aug 05, 2003 9:22 am

Post by LamBras »

When open_basedir restricts access to /etc/php5 in the previous example, I get a specific open_basedir error message telling me /etc/php5 is inacessible. Such an error message is lacking in the faq case.

Also my basedir settings look ok to me:

<Directory /var/www/dvdboard>
php_admin_value open_basedir /var/www/dvdboard:/tmp:/var/lib/php5
php_admin_value disable_functions system,popen,phpinfo,passthru,proc_open,allow_url_fopen,shell,shellexec,shell_exec
</Directory>

The FAQ is located in /var/www/dvdboard/FAQ/

Any more suggestions or hints?
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

we're hiding the open_basedir error message with a @ right before the dirt() function and so you'll get in the next line a fatal error.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
LamBras
Posts: 7
Joined: Tue Aug 05, 2003 9:22 am

Post by LamBras »

Problem was an unaccessible subdirectory (the dir() command tried to get into as the user running the webserver but failed).

Thanks for your help.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

ah, okay! Great!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply