Flash upload for User error / default Theme

Hi
I installed Zenphoto and after some troubles all seems to work fine now. Unless the Flash upload: I created a new user with all rights. When I'm logged in as that user, there is no chance uploading images using flash uploader. After uploading there is a message "HTML Error". HTML works fine, FTP as well. Logged in as master, the upload works without problems.
Im pretty sure that the problem is not at Zenphoto but at the hosting server. But I have no idea where to look. The folders have the permission 755, files 644 and even if I change folder permission to 777 there is no possibility uploading photos with flash.
FTP or HTML aren't the solution in this case - for me it would be ok, but not for that user.
Any idea where to find the solution?
Thanks
Elli

Comments

  • acrylian Administrator, Developer
    What about the jQuery uploader? Zenphoto currently has three upload handlers (plugins). Generally you should look into the Zenphoto and server logs for errors.
  • jQuery uploader needs PHP Version 5.3, I have only 5.2.3 on my hosting server.

    Security Log gives the following error:
    ---
    Admin access Failed /zenphoto/zp-core/zp-extensions/uploader_flash/uploader.php 2013-03-24 23:24:22 5.145.22.242 Album access *username* Blocked /zenphoto/zp-core/admin-edit.php
    ---

    In the PHP error log there are these two errors all the time, with different referers:
    ---
    [Sun Mar 24 23:24:22 2013] [error] [client 5.145.22.242] PHP Notice: Use of undefined constant ENT_SUBSTITUTE - assumed 'ENT_SUBSTITUTE' in /home/auto-studer/public_html/zenphoto/zp-core/functions-basic.php on line 97, referer: http://www.website.com/zenphoto/zp-core/admin-upload.php?page=upload&tab=albums

    [Sun Mar 24 23:24:22 2013] [error] [client 5.145.22.242] PHP Notice: Use of undefined constant PHP_MAJOR_VERSION - assumed 'PHP_MAJOR_VERSION' in /home/auto-studer/public_html/zenphoto/zp-core/functions-basic.php on line 80, referer: http://www.website.com/zenphoto/zp-core/admin-upload.php?page=upload&tab=albums
    ---

    Sorry, but as a basic user I can't interpret these logfiles. Would be thankful for any help, thanks.

    Elli
  • Best guess it that you have cookie or session issues. The access blocked means that the "user" did not have rights to access the album. So if the posting of the upload did not carry the proper user credentials it would fail. This is sometimes a browser issue, so try a different browser.

    The PHP error is strange. That constant is supposed to be part of PHP 5.4 and beyond. Zenphoto tests your version and acts appropriately, but apparently thinks you have v5.4 instead of v5.2.

    If you can, place some code somewhere to echo the `PHP_MAJOR_VERSION` and `PHP_MINOR_VERSION` constants reported by your PHP.
  • Thanks for your help. I tried uploading with other Browsers and on other computers - same. Opened a support ticket with the hosting provider, maybe they can help. I will tell you if we get a solution.

    I'm sorry to tell you that I don't understand where and how to place the code to echo the PHP_MAJOR_VERSION. I'm not familiar with php.

    Elli
  • acrylian Administrator, Developer
    Also your server could suffer from some security settings. My own server has an uploader issue under PHP 5.4 only for unknown reasons as 5.2 and 5.3 work fine (with Wordpress as well, so no ZP issue for me)... There is a older ticket about that https://github.com/zenphoto/zenphoto/issues/177
  • I have some news for you:

    I made a totally new installation with version 1.4.4.3. The installation stopped at the point, where you have to create a new user/password. PHP Log shows the following error: Call to undefined function hash() in /home/mywebspace/public_html/zenphoto/zp-core/lib-auth.php on line 1224. The errors mentioned before showed as well (ENT_SUBSTITUTE + PHP_MAJOR_VERSION). No way to get further.

    So I made a local install with XAMPP. Here the installation stopped at the point, where the database tables should be created. Following 2 errors were shown:

    Notice: Use of undefined constant ENT_FLAGS - assumed 'ENT_FLAGS' in C:\xampp\htdocs\zenphoto\zp-core\functions-common.php on line 294

    Warning: htmlspecialchars() expects parameter 2 to be long, string given in C:\xampp\htdocs\zenphoto\zp-core\functions-common.php on line 294

    Finally I downloaded Version 1.3.1.2. Installed locally without problems, could create Users, uploading files, all perfect.

    So I installed the same version to the onlie-Server: all works fine. Then - just for fun - installed the upgrade to version 1.4.3.5: same problems as usual.

    Seems that the new version and my server / pc aren't good friends... Online Server Info: PHP 5.2.3, MySQL 5.0.45. Local Server Info: PHP 5.4.7, MySQL 5.5.27.

    I don't know what's wrong with the new version. But at least I found a solution that works for me.
  • acrylian Administrator, Developer
    That's weird, it is for sure not PHP 5.4 as that is what I am testing on locally (using MAMP).
  • ...nor PHP 5.3 / MySQL 5.5 as on the server where my personal website is hosted all works fine.
  • Try 1.4.4.3s--the support build. But it will also help if you can tell us what the define PHP_MAJOR_VERSION reports.
  • sorry, I was wrong: I did try with the official 1.4.4.3 (and not as first mentioned with 1.4.3.5).

    How do I get the report of the define PHP_MAJOR_VERSION? I would like to tell you but no idea how to figure it out.
  • It's me again... Tried a new local install with 1.4.4.3: it works!! Don't know why it did not yesterday.

    So finally there is just the online server which doesn't work with the new version. Here I think the problem ist this error:

    Call to undefined function hash() in /home/auto-studer/public_html/zenphoto/zp-core/lib-auth.php on line 1226, referer: http://www.auto-studer.ch/zenphoto/zp-core/admin-users.php?page=users

    which makes it impossible to create a new user.

    If someone has an idea, what this means and how to solve this, please tell me. If not, I stay with the old version which functions pretty well.

    Thanks for all your support.
  • `hash()` is a PHP function that should be present if you are running PHP version 5 or greater.
  • acrylian Administrator, Developer
    That is this one? http://php.net/manual/de/book.hash.php
    THen maybe the host does not have that extension installed. Best you contact him.
  • Ok, I will tell my host if he can install that extension. Many thanks to sbillard and acrylian!
Sign In or Register to comment.