Problems with Apache and "broken" links

Hi,

I tried installing the newest version of zenphoto on my Linux box with Apache running. The installation was successful, but I'm constantly getting some strange log messages from my Apache. I made zenphoto available through a subdomain of mine, pictures.mydomain.tld. On the webserver I created a VirtualHost with the documentroot pointing to /path/to/my/zenphoto. If I try to establish a connection via http I'll be redirected to https://pictures.mydomain.tld. After that zenphoto shows me the default gallery page, but it seems that the "RSS"-Image is somehow broken. I checked the webserver log an the entry says "GET /://pictures.mydomain.tld/zp-core/images/rss.png HTTP/1.1" 404 612 "https://pictures.mydomain.tld/" etc.
Im just wondering about the broken URL generated by zenphoto. Trying to login via https://pictures.mydomain.tld/zp-core/admin.php works fine. The URLs were correctly generated. Maybe its some strange behaviour related to the htaccess rewrite rules?

Hopefully someone can point me onto something.

Greetings,

Comments

  • acrylian Administrator, Developer
    Check the file/folder permissions. Also make sure you have setup both http and https versions for your domains.

    The rewrite rules work on normal Apache hosts for sure, we use them ourselves!
  • Hi,

    indeed the rewrite rules are working as expected. But I got that strange error again. I logged in as admin user and tried to enable one plugin. After submitting I got a message that some object could not be found: zp-core/://pictures.mydomain.tld/zp-core

    I checked the logs the POST command looked all normal. But the automated GET is something like this:

    GET /zp-core/://pictures.mydomain.tld/zp-core/admin-plugins.php?saved

    As you can see, the wrong part is /://pictures.mydomain.tld/zp-core, so far I'm not able to explain why this part got somehow "injected".

    My vhosts are pretty standard, i think. The "http" one is redirecting permanently to the https one. The latter sets the documentroot to /my/path/to/zenphoto, AllowOverride FileInfo which is needed for the .htaccess Rewriteengine further I disallowed Indexes and the Allow Directive is set to Allow from all. Thats it, nothing special. If zenphoto needs some special configuration I'd like to know it.

    I also tried changeing the file permissions via the setup script, but nothing changes the error occured again.
  • Hi,

    indeed the rewrite rules are working as expected. But I got that strange error again. I logged in as admin user and tried to enable one plugin. After submitting I got a message that some object could not be found: zp-core/://pictures.mydomain.tld/zp-core

    I checked the logs the POST command looked all normal. But the automated GET is something like this:

    GET /zp-core/://pictures.mydomain.tld/zp-core/admin-plugins.php?saved

    As you can see, the wrong part is /://pictures.mydomain.tld/zp-core, so far I'm not able to explain why this part got somehow "injected".

    My vhosts are pretty standard, i think. The "http" one is redirecting permanently to the https one. The latter sets the documentroot to /my/path/to/zenphoto, AllowOverride FileInfo which is needed for the .htaccess Rewriteengine further I disallowed Indexes and the Allow Directive is set to Allow from all. Thats it, nothing special. If zenphoto needs some special configuration I'd like to know it.

    I also tried changeing the file permissions via the setup script, but nothing changes the error occured again.
  • acrylian Administrator, Developer
    Try setting the WEBPATH and SERVERPATH within zp-data/zp-config manually. Some host require that.
  • I tried the path thing. I set WEBPATH to '/' and SERVERPATH to /filesystem/server/path/to/zenphoto. Now it appears that zenphoto "hangs". The logfile only contains the GET / ... entry, I'm still waiting for more action but nothing so far.
  • This almost has to be a messing up of the mod_rewrite. Try turning it off.

    The 404 error would happen if mod_rewrite thought that the link was not to an existing file/script. Perhaps a permissions issue that the rewrite check for an existing file is failing.

    Also check the rewrite base. If the path is different for the http vs. the https, rewrite will not work.
  • Hi,

    I did the following things, I disabled the redirection, I disabled mod_rewrite completely, I also removed the AllowOverride from my vhosts-file to be sure that the .htaccess file will be ignored, I commented the serverpath and webpath settings, I disabled the mod_rewrite setting within zenphoto, I restarted apache.

    I openend a browser, typed in https://pictures.mydomain.tld, the zenphoto main page displayed. The first thing I noticed the RSS Icon was not there. Than I selected a gallery and a random picture. Next I clicked onto the picture to open the large version. Than I checked the logs. It's the /: thing and that some links are somehow "degenerated"

    ~~~~~~~~~~~~~ Standard Accesslog ~~~~~~~~~~~~~~
    [23/Jun/2011:22:28:51 +0200] "GET / HTTP/1.1" 200 3109 "-" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:28:51 +0200] "GET /://pictures.mydomain.tld/zp-core/images/rss.png HTTP/1.1" 404 725 "https://pictures.mydomain.tld/" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:28:51 +0200] "GET /cache/picturealbum/c5c6a822e5d5ba2b24ba62b1f51530154f527aad.jpg HTTP/1.1" 200 3131 "https://pictures.mydomain.tld/" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:29:09 +0200] "GET /index.php?album=picturealbum HTTP/1.1" 200 3109 "https://pictures.mydomain.tld/" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:29:09 +0200] "GET /://pictures.mydomain.tld/zp-core/zp-extensions/colorbox/jquery.colorbox-min.js HTTP/1.1" 404 741 "https://pictures.mydomain.tld/index.php?album=picturealbum" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:29:09 +0200] "GET /://pictures.mydomain.tld/zp-core/images/rss.png HTTP/1.1" 404 580 "https://pictures.mydomain.tld/index.php?album=picturealbum" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:16 +0200] "GET /index.php?album=picturealbum&image=picture.jpg HTTP/1.1" 200 4521 "https://pictures.mydomain.tld/index.php?album=picturealbum" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:17 +0200] "GET /://pictures.mydomain.tld/zp-core/zp-extensions/colorbox/jquery.colorbox-min.js HTTP/1.1" 404 741 "https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:17 +0200] "GET /cache/picturealbum/c3940872843bc64936c413e6bf2dd679e5c0c6e1.jpg HTTP/1.1" 200 19423 "https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:17 +0200] "GET /://pictures.mydomain.tld/zp-core/images/rss.png HTTP/1.1" 404 725 "https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:18 +0200] "GET /zp-core/full-image.php?a=picturealbum&i=picture.jpg&q=75&wmk=! HTTP/1.1" 302 325 "https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"
    [23/Jun/2011:22:31:18 +0200] "GET /zp-core/://pictures.mydomain.tld/albums/picturealbum/picture.jpg" 404 612 "https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg" "Opera/9.80 (Windows NT 6.1; U; de) Presto/2.8.131 Version/11.11"

    ~~~~~~~~~~~~~~ Standard Error Log ~~~~~~~~~~~~~~~~~~~~

    [Thu Jun 23 22:28:51 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/:, referer: https://pictures.mydomain.tld/
    [Thu Jun 23 22:29:09 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/:, referer: https://pictures.mydomain.tld/index.php?album=picturealbum
    [Thu Jun 23 22:29:09 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/:, referer: https://pictures.mydomain.tld/index.php?album=picturealbum
    [Thu Jun 23 22:31:17 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/:, referer: https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg
    [Thu Jun 23 22:31:17 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/:, referer: https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg
    [Thu Jun 23 22:31:18 2011] [error] [client 31.18.9.159] File does not exist: /my/path/to/zenphoto/zp-core/:, referer: https://pictures.mydomain.tld/index.php?album=picturealbum&image=picture.jpg
  • Try tonight's build.
  • I tried installing both the trunk and development version from scratch, nothing changes. Could you be so kind and post some minimal apache vhosts config, that is know to be working? I'll just want check out if I did miss something.

    As a second guess, do I need some special PHP-options set?
  • acrylian Administrator, Developer
    Zenphoto works on pretty standard shared hosts. All special settings required (that are not that special) are noted on setup and listed on our installation page.
  • Well, my shared host is pretty standard. I did the "required"-settings during setup. But apparently it's only working 50%. I did a new install (my 6th one). Before that I manually created a new database, I cleared all folders, I checked the vhosts files and so on. During the installation process zenphoto asks me to set a user and password. After clicking on that link I got to the first options-pane. I wenn through some settings, I checked the main gallery-page the RSS icon was there. While thinking everything went well I tried clicking onto the users tab...nothing happend, I clicked again...nothing. I checked the logfile which told me this one (a new one btw):

    "GET /zp-core/admin-users.php?page=users HTTP/1.1" 302 580 "-" Opera ..."

    Now I'm really curious how the 302 got there...
Sign In or Register to comment.