Trouble installing, MySQL Query Failed

Hello. Have tried to install zenphoto, but get this error message:
Zenphoto Error

MySQL Query ( SELECT `name`, `value` FROM `foto_options` ) Failed. Error: Table 'medkom.foto_options' doesn't exist
It looks like your zenphoto tables haven't been created. You may need to run the setup script.
When I go to `zenphoto/zp-core/setup.php` i get this message:
No input file specified.
Anyone know what to do? Have checked, double-checked and tripple-checked the database info, have also tried on two different databases.

Comments

  • trisweb Administrator
    Looks like you're missing the setup.php file... try re-installing fresh from the package.

    Also, you may want to try the 1.1.3 release that is due out Sunday. It has much improved setup.
  • Sorry, can's say it worked. The setup.php-file is in the zp-core-folder. If I should take a wild guess, it looks like the database don't accept/import the tables. I have no knowledge about this, so i can't say for sure.

    I'll wait for the 1.1.3-release and try then.
  • trisweb Administrator
    What's the address of your installation? We can help you easier if we can look at it. Thanks.

    Or, yes, just wait for 1.1.3
  • The adress is http://medkom.org/zenphoto/

    Will try the 1.1.3-version, priority others above me. :)

    At least to the next time I'll need help.

    Edit: Damn, won't work with the 1.1.3 version. Seems to be the same. Is there a way to check if my DB information is correct?

    Edit2: Okay, I managed to install bbpress, so it shouldn't be anything wrong with the database information.

    But, if it helps, the configure file:
    <backticks><?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */
    $conf = array();
    define("DEBUG", false);

    /** Do not edit above this line. **/
    /**********************************/

    /////////// zenPHOTO Configuration Variables //////////////////////////////
    // After you're done editing this file, load
    // http://www.yoursite.com/zenphotodir/zp-core/setup.php
    // to run the setup (of course, replacing the paths where needed).

    // NOTE: web_path and server_path are no longer needed! If you're having problems
    // with the auto-detected paths, you can override them at the bottom of this file.
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    // Database Information (the most important part!)
    ////////////////////////////////////////////////////////////////////////////////

    $conf['mysql_user'] = "altarussen";
    $conf['mysql_pass'] = "*password*";
    $conf['mysql_host'] = "db2.subsys.no"; // Won't need to change this 90% of the time.
    $conf['mysql_database'] = "altarussen";

    // If you're sharing the database with other tables, use a prefix to be safe.
    $conf['mysql_prefix'] = "zp_";

    ////////////////////////////////////////////////////////////////////////////////
    // zp-config.php required options
    ////////////////////////////////////////////////////////////////////////////////

    // location of album folder.
    // change 'album_folder' to rename the album folder inside the zenphotos installation
    // change 'external_album_folder' to locate your album folder outside the zenphoto folders
    $conf['album_folder'] = '/albums/';
    $conf['external_album_folder'] = null;

    // Change this to "https" if you use an HTTPS server (a "https://..." url)
    // Otherwise you should leave it at "http"
    $conf['server_protocol'] = "http";

    ////////////////////////////////////////////////////////////////////////////////
    // Comment cleaning configuration
    ////////////////////////////////////////////////////////////////////////////////

    // Tags and attributes allowed in comments
    // Follow the array form array('tag' => array('attribute' => array()))
    $conf['allowed_tags'] = array (
    'a' => array ('href' => array (), 'title' => array ()),
    'abbr' => array ('title' => array ()),
    'acronym' => array ('title' => array ()),
    'b' => array (),
    'blockquote' => array ('cite' => array ()),
    'code' => array (),
    'em' => array (),
    'i' => array (),
    'strike' => array (),
    'strong' => array (),
    'ul' => array (),
    'ol' => array (),
    'li' => array (),
    );

    ////////////////////////////////////////////////////////////////////////////////
    // Path Overrides
    ////////////////////////////////////////////////////////////////////////////////
    // Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS,
    // like "file not found" or "not readable" errors.
    // These allow you to override Zenphoto's detection of the correct paths
    // on your server, which might work better on some setups.
    ////////////////////////////////////////////////////////////////////////////////

    // define('WEBPATH', '/zenphoto');
    // define('SERVERPATH', '/full/server/path/to/zenphoto');

    /** Do not edit below this line. **/
    /**********************************/

    $_zp_conf_vars = $conf;
    unset($conf);

    ?>
    </backticks>
    This gallery lays here: http://utvikling.altarussen.org/zen/
  • Are you still getting the same error message? If not, what is the message this time?

    Setup should have given you a checklist report. I assume it said everything was ok.
  • You have provided two urls. The first ( http://medkom.org/zenphoto/ ) gives me the zenphoto error that is an indication that the setup program has not been run. The second ( http://utvikling.altarussen.org/zen/ ) takes me to a logon screen.

    Which is the correct one? On the first site I tried to run setup for you, however I got a page not found error indicating that setup.php is missing from the install. Have you run setup.php?
  • kristofferb,

    that same thing happened to me since i have re-installed it to version 1.1.3, dunno why. im still trying to figure it out but it aint working.
    :(

    i have fresh intalled everything and it wont work at all.
  • trisweb Administrator
    Daxeno, what's your site's address? Are you also getting the error with setup.php not being found, or just the Options table mysql error?

    kristofferb, For some reason on the medkom.org site the Setup.php file cannot be found. This is the main problem, but I don't know what's causing it -- the "No input file specified" error is *not* from Zenphoto.

    I just thought of something --- what are the permissions set on your zp-core .php files? They should be set such that the server process can read them, so try chmodd'ing at least `chmod 644`, or even try `chmod 777` to see if it works... (if you're just using an FTP client, just make the permissions so User Group and Everyone can [R]ead, and also try allowing everyone to Execute as well).

    But -- the main (and only) problem is that the server (specifically the PHP CGI process) can't read the PHP files. It's a server config problem, but we'll try to help you solve it...
  • Hello Tris!

    Here's my site address > http://daxeno.craserv.com/zenphoto/

    hope you could figure it out.
    in IE : it says

    The webpage cannot be found
    HTTP 404
    Most likely causes:
    There might be a typing error in the address.
    If you clicked on a link, it may be out of date.

    This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage.

    and on the FF, it says

    No input file specified.

    Dunno whats wrong.... all files have been uploaded successfully. This only happened since i have changed to 1.1.3.
  • Is there any possibility you guys did not notice the change from the php folder's old name of `zen` to the new name of `zp-core`?
  • trisweb Administrator
    Daxeno, I want you also to check the permissions on all those files, make sure the server can read them. I don't see why not though... this is very odd...

    Stephen it's definitely happening in zp-core. It also doesn't work with rss.php

    It could be a mod_rewrite bug: Try this out:
    http://daxeno.craserv.com/zenphoto/zp-core/testtest.php
    That gives you a zenphoto error, when I believe it should not redirect (since it's the zp-core folder)

    daxeno/kristofferb -- Try removing the .htaccess file. I want to see what that does...
  • Removing the .htaccess file helped (see http://utvikling.altarussen.org/zen/ user/password: dev/dev) getting up the setting page. Thank you all for the help.

    But why is there so few repports on this?
  • could you post what was in your .htaccess file?
  • Tris, all files CHMOD's correct and the servers reading it.
    i also have tried the tes.php and the result was the same >

    "Zenphoto Error
    MySQL Query ( SELECT `name`, `value` FROM `zp_options` ) Failed. Error: Table 'daxenoc_dakseno.zp_options' doesn't exist
    It looks like your zenphoto tables haven't been created. You may need to run the setup script."

    i removed the .htaccess and now it is working. so it might be the htaccess file.
    this is whats inside that file:

    # htaccess file for zenphoto
    # NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.

    <IfModule mod_rewrite.c>
    RewriteEngine On

    #### !!! Change this to the web path (eg: http://www.yourwebsite.com/photos --> /photos) !!!
    RewriteBase /zenphoto
    ####

    RewriteRule ^admin/?$ zp-core/admin.php [R,L]

    RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
    RewriteCond %{REQUEST_FILENAME} -d [NC]
    RewriteRule ^.*$ - [R,L]

    RewriteRule index\.php$ index.php [L,QSA]
    RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
    RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]
    RewriteRule ^(.*)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]

    #### Rewrite rule addtion for seach
    RewriteRule ^page/([A-Za-z0-9\-_]+)/([A-Za-z0-9\-_]+)/?$ index.php?p=$1&words=$2 [L,QSA]
    RewriteRule ^page/([A-Za-z0-9\-_]+)/([A-Za-z0-9\-_]+)/([0-9]+)/?$ index.php?p=$1&words=$2&page=$3 [L,QSA]

    #### Rewrite rule addtion for archive-/date-search (needed to be separarted because of the same structur)
    RewriteRule ^page/([A-Za-z0-9\-_]+)/archive/([A-Za-z0-9\-_]+)/?$ index.php?p=$1&date=$2 [L,QSA]
    RewriteRule ^page/([A-Za-z0-9\-_]+)/archive/([A-Za-z0-9\-_]+)/([0-9]+)/?$ index.php?p=$1&date=$2&page=$3 [L,QSA]

    RewriteRule ^(.*)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA]
    RewriteRule ^(.*)/image/([^/\\]+)$ zp-core/i.php?a=$1&i=$2 [L,QSA]
    ####

    # Catch-all - everything else gets handled in PHP for compatibility.
    RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]
    </IfModule>
  • trisweb Administrator
    Daxeno, it seems to be a bug in the mod_rewrite configuration, so try deleting or renaming your .htaccess file to fix it. Then you should be able to run setup.

    This seems to be a problem specific to servers running PHP as a CGI process, which isn't the most common setup but exists nonetheless (and can be better in some cases). Our .htaccess file seems to be messing with that.. I'll try setting up a PHP-CGI and test it out. Until then, if you're seeing this problem unfortunately you'll have to disable .htaccess for now while we get it figured out.

    (Stephen: I wonder what changed since 1.1.2?)
  • trisweb:

    There were additions for the search rules that malte put in. Basically line 12 `rewriterule ^search/? index.php?p=search [R,L]` was dropped and
    ` #### Rewrite rule addtion for seach

    RewriteRule ^page/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/?$ index.php?p=$1&words=$2 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([0-9]+)/?$ index.php?p=$1&words=$2&page=$3 [L,QSA]

    #### Rewrite rule addtion for archive-/date-search (needed to be separarted because of the same structur)

    RewriteRule ^page/([A-Za-z0-9-_]+)/archive/([A-Za-z0-9-_]+)/?$ index.php?p=$1&date=$2 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9-_]+)/archive/([A-Za-z0-9-_]+)/([0-9]+)/?$ index.php?p=$1&date=$2&page=$3 [L,QSA]`
    was added after line 21

  • Tris,

    it worked now but disabling the .htaccess and deleting it had affected my site - i cannot access the fils or photos if i enable the mod rewrite. :(
  • Yes, without an .htaccess file you cannot use mod_rewrite. Sorry about that.
  • is there any way we can have this fixed? :( coz i cannot access some of my photos.
  • acrylian Administrator, Developer
    Did you disable mod-rewrite in the zenphoto options? You need to do that to get zp working without a htaccess file.
  • it is disabled as well... thats y it is not working. and i think without the htaccess file - the mod rewrite function is non functinal.
  • Daxeno:

    Zenphoto should run without an .htaccess file if you have gone to the admin options tab gallery configuration and reset the checkmark on `mod rewrite`. I have verified that this works on the current version.

    If you have done this and zenphoto is not working then there is something else wrong. maybe one problem with your server configuration that is causing all the troubles. (Your .htaccess file looks just like the one that is working for me.)
  • I have same problems with 1.13, install on ISS local host for testing.. i'm sure that is fress install and my data is connect good..
    i do process setup and all check list is good in blue, but it alway repeat to screen force me to enter data detail ( in fact the data is connected ).. and still can not see the GO button ???

    i have look at the code then line 308 look like this
    ==================
    echo "You need to address the problems indicated above then run `setup.php` again.";
    exit();
    =================
    then comment out the >> exit funtions
    ========
    // exit();
    ========

    now the process can continue with GO button..
    i will put the testing right now.. if see any issue will be report..
    kind regards
  • binhaus:

    There should be green check icons for each setup item. If you are not seeing any graphics, then something is wrong. The last person to report this did not have GD support in PHP. If you view the source of the setup page you will see "pass" and "fail" indications where the graphics should be.

    The lack of a GO button indicates that one of the checks failed, probably one having to do with graphics on your site.
Sign In or Register to comment.