Permissions (again)

Hi all, I have read alot into this and i am still having alot of troubles with my permissions.

I am on shared hosting and i cannot change any files within the zenphoto admin page - every time i click apply the data i have entered disappears.

I have tried strict and nothing will work, on relaxed 777, everything seems to work okay. However anytime i install a 3rd party plugin - i am unable to edit the plugin settings as they keep not applying - i have tried multiple permission types!

Any help will be appreciated. I have tried running everything at 777 but i get errors there too.

Comments

  • acrylian Administrator, Developer
    You have read this?: http://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders
    777 is really not recommended. You probably need to contact your host about this if that all does not work.

    If settings are not applying this is more a database issue normally. There should be errors.

    (We assume that you didn't use an install helper script and use the latest release.)
  • fugisan Member
    Hi thanks for your resposne, yeah not to happy with 777 - but it was the only way to get a clean install.
    I ftp'd the files across rather than using a cpanel script, and used the latest stable build. Hmmm db error, i'll look into it but seems to be working.

    Thanks again for your reply

    >>Below is some more info on the problem, i haven't found any error logs.

    In addit - i have reninstalled zenphoto, with global permissions for all folders in the directory to 777.

    This allowed setup to run perfectly, however i am still unable to edit settings in plugins i add, as the data is simply deleted after i click apply.

    I am also unable to edit any settings in gallery and website title as again it is deleted on applying, this is the same of news articles too. I also cannot edit any uploaded photos descriptive text. Not sure whats going on.

    Everything is still set to 777.
  • acrylian Administrator, Developer
    Please post some info about your server config like php and mysql version. Make sure they really match our requirements.
  • fugisan Member
    Current stats are;
    Zenphoto version 1.4.2.3 [9710] (Official Build)
    Current locale setting: C
    Current gallery theme: zpMasonry
    PHP version: 5.2.6
    Graphics support: PHP GD library bundled (2.0.34 compatible)
    PHP memory limit: 128M (Note: Your server might allocate less!)
    MySql version: 5.0.95
    Database name: andrewpo_zenphoto
    Table prefix: zenphoto_
    Spam filter: simple
    CAPTCHA generator: zenphoto

    Shared server with .htaccess (globals, safe and magic off)

    I did read you prefer mysqul 5.5, but said it should work below..... but as mine is 5.0.95 maybe thats why there are issues.

    Mysql overall data.
    MySql version: 5.0.95
    •Database name: andrewpo_zenphoto
    • Table prefix: zenphoto_
    •character_set_client: utf8
    •character_set_connection: utf8
    •character_set_database: latin1
    •character_set_filesystem: binary
    •character_set_results: utf8
    •character_set_server: latin1
    •character_set_system: utf8
    •character_sets_dir: /usr/share/mysql/charsets/
    •collation_connection: utf8_general_ci
    •collation_database: latin1_swedish_ci
    •collation_server: latin1_swedish_ci

    Its the only thing i can think of thats causing issues, but it seems to be working okay.... In the respect that other than the fact i just cant save date to my zenphoto, the sites up and i can upload photos!

    The only thing i can think of trying would be to ask the hosting provider to update their mysql, but unsure if they would do that? Dont think i can locally.

    Cheers, :)
  • acrylian Administrator, Developer
    Looks good so far and mysql 5.0.x should not be a problem, I have only that on my live test site as well. You have a mixture of char sets in your db some utf8 and some latin1. That could be a reason but I am not sure. You could try re-install.

    The file/folder permission do not directly impact storing values in the database.

    I am sorry I have no idea maybe my colleague has later on.
  • fugisan Member
    Hi i have changed the sever to have mostly utf8_general_ci, however there is still a latin1_sweedish_ci that i cant find anywhere with phpmyadmin to remove. Still no change in being able to edit files. I will attempt to reinstall on the db now that it is set standard for utf8_general_ci and see if that makes a difference.

    MySql version: 5.0.95
    Database name: andrewpo_zenphoto
    Table prefix: zenphoto_
    character_set_client: utf8
    character_set_connection: utf8
    character_set_database: utf8
    character_set_filesystem: binary
    character_set_results: utf8
    character_set_server: latin1
    character_set_system: utf8
    character_sets_dir: /usr/share/mysql/charsets/
    collation_connection: utf8_general_ci
    collation_database: utf8_general_ci
    collation_server: latin1_swedish_ci
  • fugisan Member
    Addit:

    I have found an error log within zp-core, unsure if it means anything.

    [08-May-2012 19:23:18] PHP Fatal error: Call to a member function albumSubRights() on a non-object in /home/andrewpo/public_html/zenphoto/zp-core/admin-functions.php on line 404
    [08-May-2012 19:23:22] PHP Fatal error: Call to a member function albumSubRights() on a non-object in /home/andrewpo/public_html/zenphoto/zp-core/admin-functions.php on line 404

    Have run setup again and still no dice :(

    Systems check was as fine with the only warnings;

    Systems Check:
    •PHP version 5.2.6
    •File/Folder Permissions [are loose (0777)]
    •MySql version 5.0.95
  • acrylian Administrator, Developer
    A fatal error always means something. Could be related to your permissions but you should have something about that in the php error log as well.

    I will have to leave this to my colleague.
  • fugisan Member
    Thanks,

    I have completely re installed with a new database and removed the table_prefix but i am still unable to change setting for 3rd party plugins i.e. zenpaypal, or add or edit any text data, i.e. news articles or photo descriptions.

    Cheers again dude, hopefully someone can help me out because im lost.

    And since the new install i get no error logs.
    Anytime i click 'apply' it goes 'applied' but nothing has applied.
  • fugisan Member
    I can defiantly confirm that there is an issue with the zenpage admin page and the database connection.

    I have edited most of the details i need to get the site running directly through myphpadmin by editing the mysql data field directly. Its like they were able to be formed during setup, but now - none of the admin functions are updating the fields.
  • acrylian Administrator, Developer
    Ok, I cannot reproduce it so I can only suggest to try the trunk nightly build or even the dev nightly build of the coming 1.4.3 (not on the same site of course!).
  • Does your database login have the proper permissions to update fields?

    Edit:
    For clarification, I mean the permissions granted by MySql to the DBUser, such as Create, Select, Update, etc.. That would be where I would start.
  • fugisan Member
    I am in the process of trying the latest trunk build. I'll let you know how that goes.

    When i created the MySQL user, i gave it all the permissions, maybe i should only select the essential rights it needs.

    I have noticed that if i edit any fields within the admin page that update the database, it then deletes all the other variables in the database. I.e. update a plugin setting page, it will delete all plugin data from all the plugins.

    I'll look into reducing permissions to essential. And trying tunk build, will update.

    Thanks all
  • acrylian Administrator, Developer
    Ok, please try the nightly build. We had a problem with the bulk assignment of tags that deleted existing assignement to that item but we didn't get any report of such behaviour.
  • fugisan Member
    I have just installed the latest trunk build and i am still unable to apply changes to the database via the admin page.

    I have not changed any user privliges yet, allthough i created a new database and just hit 'all privileges' for the user.

    I have no idea, whats going on.
  • acrylian Administrator, Developer
    Well, we do neither. What does setup report?
  • fugisan Member
    Gah!

    Nothing, Setup says A'okay, other than the permissions needing to be loose mostly at 777.....
    It says the php (5.26) and mysql (5.0.95) versions are acceptable but not perfect.

    It has no problems. It connects to the database, fills all the fields, except when i input new data it wont save... If i input directly into mysql via phpmyadmin the data appears in the site.

    So im guessing its some kind-of database/script communication error. It is defiantly communicating, as if i click apply it will delete all the fields that were on the page back to default (whats already in the textboxes on the admin page).. Its just like it has no permission to update which is just not possible i set all the privilege!

    Thanks for all your help guys, im going to continue figuring it out, i love your site - and other than having to input data manually its great!

    I'll let you know if i figure anything out.

    Is there anyway to check a mysql log of incoming connections from zen?
  • acrylian Administrator, Developer
    Zenphoto has a debug, a setup and a security log where you could look for issues. It seems to be a mysql issue to me. But that is a guess. You would have to look into the mysql server log. Your host should know where that is located.
  • MySQL issues with items not being saved tend to be character set issues. So check that the character sets are UTF-8 on all your tables.
  • fugisan Member
    OMG! :)

    Thank you so much sbillard. When acrylian first suggested that my tables were in different char sets, i changed them all to UTF-8, however i selected utf8_general_ci, when i read your post i thought id much around with some other char sets. So i tried utf8_unicode_ci.

    It now works perfectly. No database issues anymore. Completely fixed. Cant believe such a small change in char sets can make that much difference.

    This has been driving me crazy for days. You guys rock! Gonna help support you guys! xD

    Have an awesome one! xD
Sign In or Register to comment.