[Problem] Swisscenter and images -> load_image_from_file

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.

[Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Sat Feb 28, 2009 1:14 am

Hello,

i have a problem with Swisscenter nearly everything is up and running. Nevertheless, no images or thumbs are displayed.

The log file says, that there is a problem with th function 'load_image_from_file'

Code: Select all
[2009.02.26 20:08:43] /Qmultimedia/2003/Wasserburg 2003_2004/2004_01_06/125_2594.JPG
[2009.02.26 20:08:43] Found Photo    : 125_2593.JPG
[2009.02.26 20:08:43] Found EXIF data : Yes
[2009.02.26 20:08:43] Found IPTC data : Yes
[2009.02.26 20:08:43] Found XMP data : No
[2009.02.26 20:08:43] Adding Photo   : 125_2593.JPG
[2009.02.26 20:08:43] ERROR: Image failed to load in function load_image_from_file



Also downloaded images for the skins are not displayed:
Code: Select all
[2009.02.27 17:57:20] Downloading remote file to the local filesystem
[2009.02.27 17:57:20] Array
[2009.02.27 17:57:20] (
[2009.02.27 17:57:20]     [remote] => http://update.swisscenter.co.uk/styles/Seeing Red.jpg
[2009.02.27 17:57:20]     [local] => /share/Qweb/swisscenter/cache/SwissCenter_download_73f79fb8f2f097b24175ad0bf0288361.jpg
[2009.02.27 17:57:20] )
[2009.02.27 17:57:20]
[2009.02.27 17:57:20] File already exists locally.
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='CACHE_DIR'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='IMAGE_RESIZING'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='CACHE_STYLE_DETAILS'
[2009.02.27 17:57:20] ERROR: Image failed to load in function load_image_from_file
[2009.02.27 17:57:20] /share/Qweb/swisscenter/cache/SwissCenter_download_73f79fb8f2f097b24175ad0bf0288361.jpg
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='IMAGE_ROTATE'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='IMAGE_ROTATE'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='NEW_MESSAGES_CHECK_TIME'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='MESSAGES_ENABLED'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='INTERNET_SETTING'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='INTERNET_CHECK_TIME'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='INTERNET_AVAILABLE'
[2009.02.27 17:57:20] SQL> select value from system_prefs where name='CACHE_DIR'
[2009.02.27 17:57:20] Downloading remote file to the local filesystem


Referring to google, there might be a problem with the GD library. Has anyone observed the same or a similar problem?

I have the 439 with x86 CPU

I also managed to install oxylbox and it works (even with thumbnail generation via nconvert). So in principle, the GD library should work.
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Sat Feb 28, 2009 4:16 am

Hey mr_hyde,

It would be nice, when everything is solved, you could write a "how to" for the installation of swisscenter and oxylbox. I had oxylbox running a while ago on a 109Pro (and on my desktop) and I loved the interface but it doesn't support srt so I would prefer using swisscenter. Which one do you prefer in combination with your Popcornhour?

Best Regards,
KL643
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Mon Mar 02, 2009 7:55 pm

KL643 wrote:Hey mr_hyde,

It would be nice, when everything is solved, you could write a "how to" for the installation of swisscenter and oxylbox. I had oxylbox running a while ago on a 109Pro (and on my desktop) and I loved the interface but it doesn't support srt so I would prefer using swisscenter. Which one do you prefer in combination with your Popcornhour?

Best Regards,
KL643


Hey KL643,

when i have time, i will summarize the installation of oxylbox. The generation of the thumbnails works on my 439 with the already implemented nconvert. Nevertheless, i also would preferr swisscenter, since it is database driven and from my point of view more professional

Actually it is possible to hear music and ** with swisscenter. but i still have problems to view images or thumbnails or albumart. It seems to be that the thumbs are generated, but they are not displayed. Also the background images are not displayed. I have to dig into this in more datail and i guess i have to post the problems in the swisscenter forum. As soon as i've got news, i will update you in this thread.

Regarding the oxylbox, i just copied the content of the zip from the PCH forum into /share/Qweb/oxylbox. I had to modify one file, which i could upload to the forum and i changed the apache.conf. I could also post this here, if this would be enough for you.
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Tue Mar 03, 2009 8:28 pm

Thanks for the reply, well take your time...no rush :wink:

B.R.
KL643
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Tue Mar 03, 2009 8:50 pm

Hi KL643,

regarding the swisscenter, i guess, that it might be a problem with php, since other users report similar problems on different applications.

BR
mr_hyde
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Fri Mar 06, 2009 4:04 am

Hello,

i have installed apache,php,php-gd,php-mysql,... via ipkg

Swisscenter displays the background of the skin,... and Albumart (Music and Movies) is also displayed.

I will also test the digital image directory (this will take some time)

Hopefully Qnap will fix the problem in the current FW soon. Then swisscenter will probably work perfectly on the x86 QNAP's
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Tue Mar 24, 2009 11:18 pm

mr_hyde wrote:Hopefully Qnap will fix the problem in the current FW soon. Then swisscenter will probably work perfectly on the x86 QNAP's


I hope Qnap can make a QPKG for Swisscenter.
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Wed Mar 25, 2009 12:42 am

KL643 wrote:
mr_hyde wrote:Hopefully Qnap will fix the problem in the current FW soon. Then swisscenter will probably work perfectly on the x86 QNAP's


I hope Qnap can make a QPKG for Swisscenter.


Hi,

to install swisscenter by itself is not complicated. Just copy the package to /share/Qweb and add some lines to the apache.conf

Actually the main problem is, that you need to patch the php-gd bug of the FW. It is still in the new stable (2.1.4 0317)

If you are interested, i could post a howto. But i hope, that they will eleminate the bug very soon. Then the php workaround will be obsolete
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Wed Mar 25, 2009 1:20 am

mr_hyde wrote:Hi,

to install swisscenter by itself is not complicated. Just copy the package to /share/Qweb and add some lines to the apache.conf

Actually the main problem is, that you need to patch the php-gd bug of the FW. It is still in the new stable (2.1.4 0317)

If you are interested, i could post a howto. But i hope, that they will eleminate the bug very soon. Then the php workaround will be obsolete


Pleazzzze do :) I'm trying the whole day to get it up and running (and I'm really not into this stuff...specially the add some lines to the apache.conf and the php stuff)

BR,
KL643
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Wed Mar 25, 2009 1:49 am

ok,

1. install ipkg via qpkg
2. connect via ssh to a console
3. type:
> ipkg install php
> ipkg install php-apache (this will also install an apache, but no problem)
> ipkg install php-gd (will also intall some libraries)
> ipkg install php-mbstring
> ipkg install php-mysql (this will install mysql which is needed)

-> should be everything with respect to php,...

goto /etc/config/apache and open apache.conf

comment:
#LoadModule php5_module modules/libphp5.so
and add:
LoadModule php5_module /opt/libexec/libphp5.so

-> this will force the implemented apache to use the php of ipkg

go back to /etc/config
substitute the php.ini

> mv php.ini php.original
> ln -sf /opt/etc/php.ini php.ini

which links the php.ini to the ipkg version

-> The webserver of the FW has to be enabled, mysql has to be disabled, since you have to use the ipkg mysql (probably there is also a way to use the built in one, but as long as it works, i don't want to add more time)

If so, just go to /etc/init.d and

>./Qthttpd.sh restart

Now the php-gd should work

you can test it with a simple script (the extension has to be .php)

Code: Select all
<?php
header('Content-type: image/jpg');
$im = @ImageCreateFromjpeg ('background.jpg'); /* Versuch, Datei zu öffnen */   
imagejpeg($im)
?>


Place this script in /share/Qweb and add also an image 'background.jpg' to the same place (owner should be guest)

If this works (an image is displayed), the main problems are solved.

Now you have to start mysql manually:
>/opt/etc/init.d/S70mysqld start

and mysql should be up and running

then go back again to /etc/config/apache

and add the following lines to the end:
Code: Select all
# SwissCenter Apache Virtual Host Configuration file
Listen 9060
<VirtualHost  192.168.163.105:9060>
ServerName 192.168.163.105
DocumentRoot /share/Qweb/swisscenter/
<Directory "/share/Qweb/swisscenter">
Options Indexes FollowSymLinks MultiViews

AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
Alias /root/ "/"

</VirtualHost>

Servername, IP Adress and Port have to be adapted to your preffered settings.

extract swisscenter and copy it to /share/Qweb/swisscenter

restart the webserver and you should find swisscenter at the corresponding port. If swisscenter shows up a background image, everything should work fine (also in the setup page only one problem should be shown up -> php module zip is not installed, but that is not a problem)

The only thing is that you have to restart mysql manually after a reboot, since it can't be started through autorun.s. At this stage of the boot sequence i think, the ipgk stuff is not linked.
Last edited by mr_hyde on Wed Apr 22, 2009 6:34 pm, edited 1 time in total.
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Wed Mar 25, 2009 2:07 am

mr_hyde wrote:> ipkg install mbstring



[code][~] # ipkg install mbstring
Configuring apache
update-alternatives: Linking //opt/sbin/htpasswd to /opt/sbin/apache-htpasswd
update-alternatives: Linking //opt/sbin/httpd to /opt/sbin/apache-httpd
httpd: bad user name nobody
httpd: bad user name nobody
postinst script returned status 1
ERROR: apache.postinst returned 1
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package mbstring.
Check the spelling or perhaps run 'ipkg update'/code]

mr_hyde wrote:comment:
#LoadModule php5_module modules/libphp5.so
and add:
LoadModule php5_module /opt/libexec/libphp5.so

-> this will force the implemented apache to use the php of ipkg



Do you mean replace LoadModule php5_module modules/libphp5.so or just ad the extra line LoadModule php5_module /opt/libexec/libphp5.so?
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Wed Mar 25, 2009 2:15 am

mr_hyde wrote:> ipkg install mbstring


sorry, it should be php-mbstring

the apache message was not important to me

mr_hyde wrote:comment:
#LoadModule php5_module modules/libphp5.so
and add:
LoadModule php5_module /opt/libexec/libphp5.so

-> this will force the implemented apache to use the php of ipkg



Do you mean replace LoadModule php5_module modules/libphp5.so or just ad the extra line LoadModule php5_module /opt/libexec/libphp5.so?

-> extra line and just add the '#' to the existing line
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Wed Mar 25, 2009 2:49 am

Almost there....but..i added the following lines at the bottom of the apache.conf


[code]# SwissCenter Apache Virtual Host Configuration file
Listen 9060
<VirtualHost 192.168.1.39:9060>
ServerName 192.168.1.39
DocumentRoot /share/Qweb/swisscenter/
<Directory "/share/Qweb/swisscenter">
Options Indexes FollowSymLinks MultiViews

AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
Alias /root/ "/"

</VirtualHost>
/code]

restarted the webserver and if I go to http://192.168.1.39:9060/swisscenter/config/index I get a page error. Also I'm getting warnings now : Re-launch process [apache].
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby mr_hyde » Wed Mar 25, 2009 2:54 am

pls. look again in the apache.conf

i got the problem, that the system changed the line 'listen 9060' to 'listen 80'

and apache was stopped.

Are there any error messages if you type /etc/init.d/Qthttpd.sh restart?

the following lines are ok
Code: Select all
Shutting down Qthttpd services: Qthttpd.
apache: Could not reliably determine the server's fully qualified domain name, using 192.168.163.105 for ServerName
Apache httpd is stopped.
Starting Qthttpd services:Apache logs have been cleaned.
apache: Could not reliably determine the server's fully qualified domain name, using 192.168.163.105 for ServerName


What is the error? Did you start the ipkg mysql and is it running?

BTW,
the php-gd test was ok?
QNAP TS-439 Pro
4 * Hitachi 500 GB HDD (RAID 5)
FW: 3.7.3
SSOTS 4.14
Squeezecenter 7.8.0
Gallery 3.03
Wordpress
2 x Squeezebox 3
1 x SB Touch
1 * LG BD570
1 * Raspberry Pi
mr_hyde
Easy as a breeze
 
Posts: 395
Joined: Sun Sep 02, 2007 3:51 pm
Location: Portland, OR
NAS Model: TS-439 Pro

Re: [Problem] Swisscenter and images -> load_image_from_file

Postby KL643 » Wed Mar 25, 2009 3:13 am

The problem starts when I ad the

Code: Select all

# SwissCenter Apache Virtual Host Configuration file
Listen 9060
<VirtualHost  192.168.163.105:9060>
ServerName 192.168.163.105
DocumentRoot /share/Qweb/swisscenter/
<Directory "/share/Qweb/swisscenter">
Options Indexes FollowSymLinks MultiViews

AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
Alias /root/ "/"

</VirtualHost>



At the bottom of the apache.conf...I get relaunch process Apache warnings and can not open http://192.168.1.39/9060/swisscenter/config/index
When I don't ad the lines to the Apache.conf I can open http://192.168.1.39/9060/swisscenter/config/index but with some errors


EDIT:
Also, I changed 1 thing..
go back to /etc >>I changed this to /etc/config because my original php.ini was here but this should be no problem...
substitute the php.ini

> mv php.ini php.original
> ln -sf /opt/etc/php.ini php.ini

which links the php.ini to the ipkg version
The solution to the most difficult "problem" is usually very simple.
User avatar
KL643
Experience counts
 
Posts: 1582
Joined: Sun Sep 23, 2007 9:21 pm
Location: Haarlem
NAS Model: TS-509 Pro

Next

Return to Web Server & Applications (Apache + PHP + MySQL / SQLite)

Who is online

Users browsing this forum: No registered users and 4 guests