"Cannot modify header information"

I'm a new user. After installation and configuring .htaccess and zp-config, I have successfully established a connection to my database, but I get two warnings when logging in:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/i/r/fire5ign0/html/obi_V3/zenphoto/zen/zp-config.php:2) in /home/content/f/i/r/fire5ign0/html/obi_V3/zenphoto/zen/auth_zp.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/i/r/fire5ign0/html/obi_V3/zenphoto/zen/zp-config.php:2) in /home/content/f/i/r/fire5ign0/html/obi_V3/zenphoto/zen/auth_zp.php on line 33

Can someone point me in the right direction towards fixing this problem?

thanks in advance ...

Comments

  • trisweb Administrator
    Make sure your `zp-config.php` file has no whitespace or text before or after the `<?php` and `?>` lines, not even one space. If you can't find any space or text there, you can start fresh from the `zp-config.php.example` file.
  • I started over, using a fresh config file but I get the same result: two warnings...
  • Ok, some progress, at least!

    I nuked everything and started completely over; this time uploading the files with rBrowser and editing zp-config with BBEdit, instead of relying on GoLive. Started up slick and without warnings. I can upload images, edit meta information, but I cannot view the albums: when I click on the link to an album, I get 404'd.

    The first thing I discover is that the url to the album is not where the images are: the link is to
    http://originbiomed.com/obi_V3/zenphoto/test/

    but the actual images are at
    http://originbiomed.com/obi_V3/zenphoto/albums/test/

    and even if I edit the url in the browser, it STILL returns "page not found"!

    I'm wondering if I am perhaps not understanding the purpose of the RewriteBase variable in .htaccess . As a naive user, I had interpreted this to be a folder into which my images would be processed and saved, so I made a directory named it "stockimages". The path to this folder is originbiomed.com/obi_V3/stockimages, so that is the path I set in .htaccess. However, now that I've uploaded some images, I see that they go into the albums folder. I'm now wondering what the purpose of the RewriteBase variable is, and what it should be in this case.

    -Michael
  • trisweb Administrator
    First, read
    http://www.zenphoto.org/trac/wiki/ZenphotoFAQ#MypicturesareinzenphotoalbumsMyAlbumbuttheURLsayszenphotoMyAlbumItswrong

    Gotta love that long URL. Anyway. Did you really think the URL to the image page just links directly to the image? That would be pretty lame don't you think? Nah. It's mod_rewrite pretty URLs doing their job. (Sorry for being snappy, I'm just reeeeeally tired of that confusion... everyone and their mother comes in and tells me there's a bug because the URLs don't match the folders... sigh...)

    That link above will also tell you how to set the RewriteBase, as you do indeed have it wrong. In your case, it should simply be:

    `RewriteBase /obi_V3/zenphoto`

    Read the FAQ entry above, it should answer all your questions about mod_rewrite. Sorry it's not more obvious, I plan to make all that automatic by the next release. :-)
  • Apology accepted ... I deserved it for not reading the FAQ.

    BTW, I made the change, it all makes sense to me now, and it all works like a charm.

    thanks,
    Michael
  • trisweb Administrator
    I really am sorry, I was just frustrated, which should tell me something! I need to make it more obvious and more automatic, which I will do. Glad you got everything working!
Sign In or Register to comment.