Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Damned servers

KrakKrak New
edited April 2007 in Vanilla 1.0 Help
Why is it that on my localhost server my app will work fine. Soon as I upload it to my live sever i get hounded with error after error.
(The one that really jumps out is header redirects.)

WHY?!

Anyone have this problem? Why does it work fine locally then it all goes to hell after I upload it. What would be the difference?

Comments

  • Options
    Local admin rights vs remote user rights.

    Permissions in effect.
    Or paths, that springs to mind too.

    Have you the same OS at both ends?
  • Options
    hmm did you reinstall? installation writes server specific paths to settings.php
  • Options
    Or maybe the server is running different (older) php version than you have on your localhost
  • Options
    Local is my daily windows xp box, when i need the servers i run a batch file that starts the services for mysql and apache. Server is debian linux with apache/mysql. Server php 4.4.4-8+etch1 Local php 4.4.4 Both have the same Apache version (only difference is one is linux other is windows) Not getting any SQL errors so I havent checked the versions although I believe they are v5. (It is not a Vanilla install that I am referring to, but some things Ive coded myself.) Paths are correct as far as I can tell, I don't get many errors on that, either way thats an easy fix. Most common error is the header('location: url blah'); redirect. Spits out and says headers are already sent. Works on my local not on the server, what would cause that?
  • Options
    if anything has been echoed out then you cant change header, but i dont know why it wold work on localhost.
  • Options
    DavidKDavidK New
    edited April 2007
    Most common error is the header('location: url blah'); redirect. Spits out and says headers are already sent. Works on my local not on the server, what would cause that?
    White space above the PHP opening block in one of the parsed files. The white space gets sent, which means you can no longer add any headers.

    I agree with y2kbg though, this shouldn't differ between localhost and server.

    Perhaps Gzip being enabled would affect it though, as that would cause output buffering on the server in which it was enabled. This is just a hunch.
  • Options
    You probably have output buffering turned on in php.ini locally, but off at the server. Local script results are buffered until the script is done processing, thus you never get the message that headers are already sent.

    Might be a good idea to compare phpinfos() to make sure you have similar configurations
  • Options
    KrakKrak New
    edited April 2007
    That was it, output buffering. Enabled it on the server, no more errors. Or would that be a bad practice?
  • Options
    It should be OK.

    Just keep in mind that your script will have to completely finish before its output starts travelling down the wire. If you have some time intensive scripts sometimes its better to send the site header down the wire so the suer sees that the page is still loading.
This discussion has been closed.