Admin Access and Error Issues

I've had zenphoto installed (as a subdomain in a subdirectory) and working great for several months. A couple days ago I uploaded two new albums, tried to login to the admin and got the following error:

Warning: main(../../zp-core/sortable.php) [function.main]: failed to open stream: No such file or directory in /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/admin.php on line 4

In zp-config I have the webpath and severpaths defined. But the beginning is "/export/home/tilakpyle.com", not "/export/home/ti/tilakpyle.com". I don't know where the "ti" came from. ???

To fix this I defined line 4 on admin.php with the correct server path. Now I can access the admin, but several of the action links within the admin are wrong: they leave out the zenphoto folder in the url, and I get a 500 Internal Server Error. For example, the link to edit albums within the Overview tab is "http://www.travelalongwithme.com/zp-core/?page=edit" when it shouldbe "http://www.travelalongwithme.com/gallery/zp-core/?page=edit".

Does anyone know what's happened and/or what I can do to fix this?

THANKS!

Comments

  • fyi: I uploaded the albums via FTP.
  • I found a work around, but would still like to know what went wrong.

    So the main problem from above is that the admin.php file isn't pulling the correct paths, thereby messing up all the a hrefs. For axample, the code for the Edit Album link in admin.php (a href="../../zp-core/?page=edit&album=) came out as
    a href="www.travelalongwithme.com/zp-core/?page=edit&album=
    when it should be a href="http://www.travelalongwithme.com/gallery/zp-core/admin.php?page=edit&album=.

    If I hardcode it in each case, it works, but otherwise it leaves out both the zenphoto folder (gallery) and the admin.php in the url. I've defined the web and serverpath in zp-config and all links work fine in the photo galleries, just not in the admin.

    Can anyone tell me what went wrong? Thx.
  • acrylian Administrator, Developer
    Try uncommenting these both lines in zp-config.php and add your paths there:
    `// define('WEBPATH', '/zenphoto');

    // define('SERVERPATH', '/full/server/path/to/zenphoto');`
  • They are uncommented. I had them defined previously due to another issue: <http://www.zenphoto.org/support/topic.php?id=2101&replies=11>.

    I thought the above had fixed everything (replacing "../../zp-core/?page=edit&album=" with the hardcoded mydomain/zenfolder/zp-core/admin.php?page=edit&album=), but that was only for the hrefs and actions within admin.php.

    Now the problem I'm having is that when I try to delete this empty album+notes (http://www.travelalongwithme.com/gallery/index.php?album=Black+Water+Falls) from the admin page, I get the following errors:

    Warning: rmdir(/export/home/tilakpyle.com/public_html/www.travelalongwithme.com/gallery//albums/Black Water Falls/_notes/) [function.rmdir]: File exists in /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/class-album.php on line 495

    Warning: Cannot modify header information - headers already sent by (output started at /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/class-album.php:495) in /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/admin.php on line 130.

    Is it a problem with my serverpath?

    phpinfo defines it as this: /export/home/tilakpyle.com/public_html/www.travelalongwithme.com//gallery/phpinfo.php

    Why two slashes after .com?? (In zp-config, I put only one and it had been working fine up until a few days ago; would this matter?)

    And in this error message, why is it putting that /ti/?? Where is it getting that?

    This is driving me crazy.

    Any help???

    Thanks again.
  • I redefined the serverpath to get rid of the extra slash, but still have an issue. This album folder (http://www.travelalongwithme.com/gallery/index.php?album=Black+Water+Falls) shows a blank subalbum which shouldn't be there. When I try to delete via admin I still get the following error messages:

    `

    Warning: rmdir(/export/home/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/albums/Black Water Falls/_notes/) [function.rmdir]: File exists in /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/class-album.php on line 495

    Warning: Cannot modify header information - headers already sent by (output started at /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/class-album.php:495) in /export/home/ti/tilakpyle.com/public_html/www.travelalongwithme.com/gallery/zp-core/admin.php on line 130`

    I'm not exactly sure what this means, but I assume the problem is with however/wherever the localpath is defined: `return rmdir($this->localpath)` line 495 in class-album.

    Is there a way to define the path here? I'm not a programmer or phper by any means, so I'd appreciate any help.

  • It sounds like there is some file in the `Black Water Falls/_notes/` folder. Try deleting the folder and files via FTP.
  • Thanks, sbillard. _notes was a hidden system file that got uploaded within the folder.
Sign In or Register to comment.