setup.php unable to login - no error

Hi,

I'm unable to login to setup.php theres no errors it just keeps giong back to setup.php login site.

I have set up the DB and a user name and pass in the zp-config.php (and retried with at new user/pass, still no go)

.htaccess also set up
RewriteBase /zenphoto

Is there more?
«1

Comments

  • update!

    Ok, on index.php i get this error
    MySQL Query ( SELECT *, (date + 0) AS date FROM zenalbums WHERE `folder`='test' LIMIT 1; ) Failed. Error: Table 'GrithZen.zenalbums' doesn't exist

    I oploaded one folder 'test' with one picture in it, they all have permissions 777
  • trisweb Administrator
    That's because you haven't run setup.php.

    Might be a problem with cookies or the login script... are you sure you have the right admin_user and admin_pass in zp-config.php? Those are the ones you use to log in to setup.
  • I have reinstaled zenphoto made the changes + one album named test with one photo in it. uploaded to the server.
    setup.php didnt work
    changed permissions on album and cache
    setup.php didnt work
    deleted test album
    setup.php didn't work

    I'm sure i have the right admin and pass tried several different.

    why won't it work, it makes no sense!
  • what are you running on the server? apache? iis?
  • don't know acually. It's on www.servage.net
    a friend of mine has it working.
  • dont know why but it worked from another pc.

    thanks for the help!!!
  • I have the same problem. I cannot use the .httaccess file, co I set

    $conf['mod_rewrite'] = false;

    Set up the database connection, changed the attributes and ran zen/setup.php.
    A login form showed up, so I entered the admin/1234 and got back to the login form. And again and again. When I enter something else, it says "There was an error logging in."
    No tables created in the database, no other error.
    The index.php shows empty gallery.
    The server runs on Windows.
    Can anybody help? I am desperately looking for a nice and simple gallery.
  • I'm having the same issue...
    Attempt to login to setup.php but entering the correct user/password (as per $conf['adminuser'] and $conf['adminpass'] in zp-config.php) just takes me back to the login form again without displaying an error. Entering incorrect user/password gives me the error "There was an error logging in.
    Check your username and password and try again."

    I'm on a Windows machine with IIS and also have mod_rewrite off ($conf['mod_rewrite'] = false;)

    I see that Somebum was able to login from another machine which I'll try, but shouldn't have to...

    Has anyone resolved this without logging in from a different machine?
  • I have noted that sometimes this is specifically related to cookies. That may explain why somebum's worked from another pc. I have noted that if the browser cannot save the cookies properly, it will keep returning to the same username/password screen again. At least on my test installations it has done this.
  • trisweb Administrator
    I will definitely be taking a good look at this before releasing the next version, as I have seen the same problem in my own installations. It's usually a redirect problem -- try manually going to `/zen/admin.php` and see if you're logged in then. After that try `/zen/setup.php` again. It's definitely bad in 1.0.3 though, sorry about that.
  • @trisweb
    Thanks. In the meantime, where might I download previous versions of zenphoto?
  • trisweb Administrator
    http://www.zenphoto.org/files has a directory listing, should be some old versions in there.

    Try deleting your cookies first? Sorry for this.. :-/
  • @trisweb
    thanks for the link. Based on the previous comments, I definitely deleted my cookies when retrying the login... but no luck. Going to /zen/setup.php didn't seem to work for me either. I've yet to try logging in from a different machine, but would rather not have to resort to that.

    Sounds like you're aware of the 1.0.3 cookie issues - is there any timetable on a new version with a fix to this?

    For now, I'll see if I can get 1.0.2b up and running. Thanks again!
  • trisweb Administrator
    1.0.3 was supposed to fix cookie issues, but apparently I didn't do a good enough job. I'll take another look at the whole thing before the next release... should be within the week.
  • Wow, great to hear... thanks for all your hard work =)
  • hmmm... got 1.0.5 and I'm still having the same issue with the login
  • ...to add to my post above - I finally did try logging in on a different machine, and got the same result = correct login just displays the login form again without an error message; Incorrect login displays an error message.

    I have zenphoto running fine on a LAMP server, so I'm guessing maybe Windows/IIS could have a role in this issue...
  • trisweb Administrator
    Ahhhh it is probably an IIS problem. I should install it and test... will add it to my list. Sorry again...
  • thanks... I look forward to a possible solution
  • trisweb Administrator
    I have tested thoroughly on IIS and everything is working perfectly... this is going to be harder than I first thought.

    Can I get a phpinfo() output from you perhaps?

    -------------------------------------------------------
    Edit: Thought of something we could try. Have you looked at the WEBPATH variable at the bottom of zp-config.php? Try setting that manually.
  • trisweb Administrator
    Updates after research: (Found in the PHP Forums for setcookie()):
    ======================================================================================
    setcookie + header Location + IIS 5 = Trouble

    It took me a long time to figure out what was causing a missing cookie in one system while it worked perfectly in another...

    See this one: http://support.microsoft.com/kb/q176113/

    In short, this WILL NEVER WORK IN IIS 5:
    <?php
    header("Pragma: no-cache");
    header('Location: http://www.example.com/');
    setcookie('AA','1',0,'/');
    setcookie('BB','2',time() + 24 * 3600,'/');
    ?>

    You will ONLY get the Location Header, everything else will be "cut out" by IIS 5 CGI implementation.

    Solutions:
    1- Migrate to Apache/IIS6/Whatever
    2- Use a Non Parsed Header Script (nph-*.php)
    3- Try with header('Refresh: 0; $URL');

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

    This is in fact what zenphoto is doing: `setcookie` followed by `header("Location: ...");` redirect.

    In fact, the redirect is usually not used, and you can delete that line safely to set your cookie better, with the possible downside of having to navigate a little more.

    It's line 31 in `auth_zp.php`:
    `header("Location: " . FULLWEBPATH . $redirect);`
    Just comment it out (put `//` before it) or delete it and it should work.

    I will work on a long-term solution for this in the next version if that works. Let me know! Thanks!

    Edit: Also if you want (and know how) try replacing that line with:

    `header('Refresh: 0; ' . FULLWEBPATH . $redirect);`

    And tell me what happens. Thanks again!
  • also... FYI tris.. I tend to think I am here often enough and know what I am doing with this by now.. Whenever I say that I got it working.. you can rest assured that I got it working on IIS6 and also if you ever want any feedback or testing on IIS I can help out there. Obviously it looks like you got it figured out but for the piece of mind for IIS6. I normally install the updates the day they are released and I continually updated my svn copies all on windows servers running IIS6
  • From a network admin Point Of View, IIS 5 is not as robust either. Microsoft has had a lot of trouble integrating things like PHP and ActivePERL with their 5.0 server. I have a few 5.0 installations at work that I administer, some of which have PHP and ActivePERL installed. I've had nothing but trouble with them (in a general sense) vs IIS 6 servers, which I've had little trouble with. So I will have to agree with the migration to either Apache (preferred) or if not that, definitely IIS6. It will solve a lot of trouble, not only for Zenphoto, but also for other things as well.
  • trisweb Administrator
    @chilifrei - IIS6 isn't really the problem though Daniel, it was IIS 3/4/5.

    Out of curiosity, did you mention a specific solution in the past? If so I apologize for not catching it.

    Are there any other issues or fixes I should be aware of? Thanks for keeping current!
  • @trisweb - I commented out line 31 and was able to login successfully. Looks like all is well except thumbnail generation - perhaps i don't have the libraries ZP depends on... or could be more IIS5 shenanigans... I'll have to look into this.

    You can see the output of phpinfo here: http://tinyurl.com/y2t2pt (output page is hosted on a different server)

    Thanks for all your help
  • trisweb Administrator
    Thanks analogpanda, very helpful. I'll have to do more testing with IIS5 along those lines...

    The image problem might be with windows permissions on the cache directory. PHP running in IIS takes account of those for file operations. I'm not sure how you would change them. But it does look like you have the GD library installed, based on your phpinfo.

    One way you can find out is to load the image URL directly in your browser. In firefox, right click a (broken) image and select "View Image". You'll then get to see the errors.

    Based on your phpinfo, I've found the site and your zenphoto installation (I apologize for going behind your back) and that is indeed the problem. Somehow you need to set write/modify permissions for the IIS user on the /cache directory, I'm not sure how you do it exactly...
  • That did the trick -- had to change some permissions on the /cache directory as well as the /albums directory. Seems to be fine now... of course if it's not I'm sure I'll be back.
    Trisweb, I removed the phpinfo page in the tinyurl link just to be safe - if you need to see it again, I'd be happy to re-post it. Thanks again for your guidance...
  • I have same problem on FireFox 2. anyway setup.php work very well on IE.
  • kwanbis Member
    Same here. The strange thing is that it worked Ok while i was ussing DreamHost. Now i'm on 1and1, and i have to use IE to make it work. Opera also works. This is very strange.
  • kwanbis Member
    ok, i deleted all of my web page cookies, and then it worked.
Sign In or Register to comment.