Forums

[Plugin ZenPhotoPress] ok on the laptop, fails on the server. (16 posts)

  1. toufalk
    Member
    Posted 2 years ago #

    Hello,

    The configuration:
    - WordPress Version: 2.8.4
    - Activated plugins: nothing for the moment.
    - ZenPhoto Version: 1.2.6
    - ZenPhotoPress Version: 1.6

    I have a mini server with ubuntu-desktop 9.04 installed (the server version did not want work). I try every soft on my laptop (ubuntu-desktop 9.04 too) before installing it on the server.
    I'd like to include a picture gallery in my wordpress blog. That's why I tried ZenPhoto and ZenPhotoPress. On the laptop, everything was ok. After the various tests, I decided to install them on the server.

    First, ZenPhoto was wrong. A problem with the exif data of my pictures (exactly the same as the ones on the laptop !) I "fixed" the problem like that. It's not clean but it works.

    The main problem concerns ZenPhotoPress. When the plugin is activated, I can't access to the Widget Administration page : the ZenPhotoPress Badge produces this error:

    Warning: file_get_contents(http://mydomaine.org/wordpress/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_nested_albums&data_path=/var/www/zenphoto/zp-data) [function.file-get-contents]: failed to open stream: Connection timed out in /var/www/wordpress/wp-content/plugins/zenphotopress/classes.php on line 248

    Permissions are ok : /var/www/zenphoto has 775, /var/www/zenphoto/zp-data has 777 and zp-config.php has 666. The owner of all the directories and files in /var/www is www-data. I don't see what is the file that can't be opened...

    And my blog can't be accessed too : "Waiting for mydomaine.org" in the firefox state bar... and nothing more !

    When I desactivate the plugin, everything turn ok (the Widget administration page and the site.)
    I don't understand why it perfectly works on my laptop and fails on the server... I've done exactly the same things !

    Any idea ??

    Another question, in the FAQ of ZenPhotoPress, there is something for a debug mode. I turned it on, but I don't know where to find the logs (error and warning messages). Where is it ?

    PS: Sorry for my English, I'm not used to write in English... I hope I'm sufficiently understandable...

  2. Simbul
    Member
    Posted 2 years ago #

    The logs are actually messages that appear in the ZenphotoPress popup (the one you can open when editing a new post).

    Are you sure your Apache and PHP configurations are the same on both laptop and server? It's unlikely that two different machines will share the same exact configuration.

    Something you could try: activate cURL for PHP on your server. This will bypass the call to file_get_contents() which seems to be giving you troubles.
    If the problem is at a lower level this won't be a solution, but it's a good starting point.

  3. toufalk
    Member
    Posted 2 years ago #

    Thanks for the reply.

    I've installed cURL. Now, there is no more problem with the file_get_contents() function.

    But I've got another problem. The widget doesn't display any image and in the ZenPhotoPress popup, there is no album at all. It is as if ZenPhotoPress can't connect to ZenPhoto...
    Here is all the info displayed by the popup :

    INFO
    PHP Version: 5.2.6-3ubuntu4.2
    
    INFO
    Current working directory: /var/www/wordpress/wp-content/plugins/zenphotopress/tinymce
    
    INFO
    POST:
    
    INFO
    GET: Array ( [tinyMCE] => 1 )
    
    INFO
    ZenphotoProxy method: cURL
    
    INFO
    ZenphotoProxy call: http://mydomain.org/wordpress/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_nested_albums&data_path=/var/www/zenphoto/zp-data
  4. Simbul
    Member
    Posted 2 years ago #

    What do you see if you visit with your browser the address in the "ZenphotoProxy call"?

  5. toufalk
    Member
    Posted 2 years ago #

    a:2:{i:1;a:4:{s:5:"value";s:1:"1";s:4:"name";s:14:"Germany 2009";s:8:"parentid";N;s:8:"children";N;}i:2;a:4:{s:5:"value";s:1:"2";s:4:"name";s:19:"France 2009";s:8:"parentid";N;s:8:"children";N;}}

    So ZenPhotoPress see the 2 albums... So why can't it display the latest photos ??

  6. Simbul
    Member
    Posted 2 years ago #

    By any chance, do you have any password-protected directory on the webserver? Maybe you can see the albums because you entered the pass, but ZenphotoPress cannot know it, obviously.

  7. toufalk
    Member
    Posted 2 years ago #

    No, every album is public (no passwd in ZenPhoto). Every album directory has 777 permissions and the photos in them has 644.

  8. Simbul
    Member
    Posted 2 years ago #

    Actually, I was referring to webserver password protection: the kind that you do with .htaccess and that pops up a little window asking for the password.

  9. toufalk
    Member
    Posted 2 years ago #

    No, I haven't edited any .htaccess file. For the moment it is a basic wordpress installation. I'll do some security improvements when everything will work.

  10. Simbul
    Member
    Posted 2 years ago #

    I'm sorry. I'd need to do some testing but I can't find the time, at the moment. Did you by chance discover something new?

  11. toufalk
    Member
    Posted 2 years ago #

    No I have not discovered anything new. I think I will remove an re-install WP and ZP. Perhaps I did something wrong...

  12. Simbul
    Member
    Posted 2 years ago #

    I did some testing. The ZenphotoProxy response that you posted is actually quite strange.

    I won't get too technical (but tell me if you prefer to get the details): it may be a character encoding issue. Double check your configuration with this in mind and let me know ;)

  13. toufalk
    Member
    Posted 2 years ago #

    Yes, that's possible. I have not re-install yet. I'll try this when i'll have enough time (in 2 or 3 days).
    I know that (by default) Ubuntu is in utf8 and php in iso-8859. I don't know about Mysql, wordpress and ZenPhoto.

  14. toufalk
    Member
    Posted 2 years ago #

    Hello, i'm back...

    According to the w3c test, apache2 send in utf8.
    Wordpress is set to utf8.
    According to phpMyAdmin, the configuration of MySql is

    character set client utf8
    (Global Value) latin1
    character set connection utf8
    (Global Value) latin1
    character set database latin1
    character set filesystem binary
    character set results utf8
    (Global Value) latin1
    character set server latin1
    character set system utf8

    According to zenPhoto, it is in utf8.

    I saw a warning in zenPhoto stating that i should set mbstring.internal_encoding to UTF-8 in php.ini. I've done it and restarted apache2... nothing more!

    I'm lost ! What should i do? Do you think that it is better to re-install everything? And if so, can i save the database ? Or have i to (re)begin from scratch ?

  15. toufalk
    Member
    Posted 2 years ago #

    I just found something odd.

    My server (LAMP+WP+ZP) is at home. I configure it by ssh (because it has no screen). The configuration of WP:
    blog adress: http://www.mydomain.org
    WP web adress: http://www.mydomain.org/wordpress
    ZP gallery url: http://www.mydomain.org/zenphoto
    ZP data path: /var/www/zenphoto/zp-data

    This don't work. But if i replace all 'www.mydomain.org' by 'pop' (that's the name of the server in the local net, then everything is ok...??

    Can it be possible that the problem comes from the "ZP gallery url" ? And it is, i don't know what to write there. I tried several things like http://localhost/zenphoto or http://pop/zenphoto.

  16. Simbul
    Member
    Posted 2 years ago #

    The gallery url is correct (provided your gallery is accessible from http://www.mydomain.org/zenphoto, of course).

    Have a look at the discussion on this page:
    http://www.zenphoto.org/support/topic.php?id=1896&page=6
    I have no idea if it's connected with your problem, but it's an issue I still haven't had time to fix, so it may be worth trying it.

Topic Closed

This topic has been closed to new replies.

About this Topic