Webpage not found (HTTP 404)

I am running Zenphoto V1.1.7 under Xubuntu. I am extremely pleased with Zenphoto. I apologize if this issue has been addressed before. But I am not able to locate a solution for it.

I can view all my albums and pictures. I successfully can click on an Album thumbnail but on clicking an individual picture (from the Add a comment, etc page) I get the "HTTP 404 not found error".

I think it's because I am accessing my albums from a drive that's got "Windows style" directory names. I'm not sure why the paths are not broken when clicking the individual picture thumbnails earlier. Is there a way to fix this?

Thanks in advance for any suggestions.

Here's the error (from Firefox)

==================================================================================

Not Found

"The requested URL /media/sdb1/Documents and Settings/WindowsUser/My Documents/My Pictures/Albums/0036/DSC.JPG was not found on this server.
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.5 with Suhosin-Patch Server at mywebsite.webhop.net Port 80"

Comments

  • acrylian Administrator, Developer
    You should try the latest version of Zenphoto first.
  • Thanks for the replay.

    I upgraded to 1.2.3 and then zenphoto-2009-03-06-trunk. Both times I noticed that setup has trouble initializing tables. My zp-config.php is updated with the mysql user/pass/database name. :

    Warnings are:
    1. You should consider disabling magic_quotes_gpc. For more information click here.
    2. Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly.
    3.When this option is not in effect, file and folder permissions are relaxed. This could constitute a security risk so it is recommended that you enable Strict Permissions. However, on some servers Zenphoto does not function correctly with strict file/folder permissions. If you enable this option and Zenphoto has permission errors, run setup again and disable the option.

    Click here to use strict file/folder permissions.
    4.MySQL did not return a list of the database tables for zenphoto.
    Setup will attempt to create all tables. This will not over write any existing tables.
    5.Zenphoto core files [Some files are missing or their filemtimes seem out of variance.]
    Warning! Perhaps there was a problem with the upload. You should check the following files:
    .htaccess

    NOTE: This option applies only to new files and folders created by Zenphoto. You may have to change permissions on existing ones to resolve problems.

    On clicking go:

    Table creation failure: Can't create table 'zp_captcha' (errno: 13)
    Table creation failure: Can't create table 'zp_options' (errno: 13)
    Table creation failure: Can't create table 'zp_tags' (errno: 13)
    Table creation failure: Can't create table 'zp_obj_to_tag' (errno: 13)
    Table creation failure: Can't create table 'zp_administrators' (errno: 13)
    Table creation failure: Can't create table 'zp_admintoalbum' (errno: 13)
    Table creation failure: Can't create table 'zp_options' (errno: 13)
    Table creation failure: Can't create table 'zp_albums' (errno: 13)
    Table creation failure: Can't create table 'zp_comments' (errno: 13)
    Table creation failure: Can't create table 'zp_images' (errno: 13)
    Table creation failure: Can't create table '#sql-1a1c_1793' (errno: 13)

    Is there some way around this eg. manually creating the tables? My gallery is appearing but I'm unable to administer the albums with mysql errors : eg: MySQL Query ( SELECT `name` FROM `zp_tags` ORDER BY `name` ) failed. Error: Can't find file: './zenphoto/zp_tags.frm' (errno: 13)

    Backtrace:

    in query (functions-db.php [117])
    in query_full_array (functions.php [1367])
    in getAllTagsUnique (admin-functions.php [845])
    in tagSelector (admin-functions.php [1246])
    in printAlbumEditForm (admin-edit.php [509])

    All due to the missing tables?
  • Here is a quick summary of your errors:

    1. this is a warning. You can ignore it if you wish although it would be best to disab le the options in PHP>

    2.also a warning. This is not a problem for English speaking installations. Unless you want accented characters you can ignore this.

    3. this is another warning. Some servers will not work with strict permissions, so until everything else is resolved, leave this alone.

    4. This is a little more of a problem. When setup runs it attempts to create only new tables. If your MySQL will not tell Zenphoto what tables exist, the only option is to try to create them. This may also be related to the `sql` errors. If those tables already exist, then you can ignore the error. If not, it is unlikely that things can be made to work correctly. You could create the tables manually--their definitions are in setup.php. If you do that, be sure to run setup afterwards since the definsions are not updated when the tables change. Instead, the tables are modified later on in the process.

    NB: I do not know what table `#sql-1a1c_1793` would be. It is not something Zenphoto tries to create.

    #5. You have probably not copied the .htaccess file that came with the Zenphoto install. Probably not an issue since there is a revision check to be sure that the .htaccess version matches what is expected by Zenphoto.
  • Thanks for the explanation. I went ahead and manually removed the /var/lib/mysql/zenphoto (database) directory. Then created a new zenphoto MySQL database fine. Running setup again shows all issues resolved. Just Warning #1 and 2 remain. I believe that's fine.

    Now I tried to create the tables individually, but get an error. I'm not a SQL/DB person and would appreciate your help setting it up (I have tried with or without the "`" on literals.
    eg:
    mysql> CREATE TABLE IF NOT EXISTS zp_captcha (id int(11) UNSIGNED NOT NULL auto_increment, 1008 ptime int(32) UNSIGNED NOT NULL,1009 hash varchar(255) NOT NULL, 1010 PRIMARY KEY (id) 1011);
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1008 ptime int(32) UNSIGNED NOT NULL,1009 hash varchar(255) NOT NULL, 1010 PRIMA' at line 1
  • The numbers (1008, 1009, 1010, etc.) do not belong in the SQL. Not sure what they are. The peck marks should be used on the literals so that they are not confused for MySQl syntactical items.
  • Sorry, line numbers accidentally pasted. I tried the following:
    mysql> CREATE TABLE IF NOT EXISTS `zp_captcha` (`id` int(11) UNSIGNED NOT NULL auto_increment,`ptime` int(32) UNSIGNED NOT NULL,`hash` varchar(255) NOT NULL,PRIMARY KEY (`id`) ) ;
    ERROR 1005 (HY000): Can't create table 'zp_captcha' (errno: 13)

    How to fix this SQL?
  • Your SQL looks correct. I am sorry, but I do not know what that error code means. Maybe you need to ask your ISP for help.
  • Thanks for the help! It turns out I had a permissions problem with the new DB directory I had setup. Changing that and in un-checking mod_rewrite (Options) my albums work fine.
    With V1.2.3 my path problem (404) appears to have been resolved. Thank you!

    1) I can't seem to retain checking "Allow Comments" (from "Edit Album" as Administrator). It becomes unchecked. Is there a way to enable entering comments for guest users? Individual images have "Allow Comments" checked. But I think I have the feature disabled somehow.
    2) How can I un-grey (enable) the "Image Rotation" feature? I must have accidentally disabled it.
  • 1) Comments may be disabled at three different levels:

    There is a golbal theme opiton
    There is an album option
    There is an image option.

    If any of these are disabled, you will not be able to post comments on the image.

    2) This is caused by your PHP not having the proper function configured. Off hand I do not remember the function name/module that contains it. The warning should give you a clue.
Sign In or Register to comment.