Menu

CGI & Headers

Help
2008-01-26
2013-06-11
  • Nobody/Anonymous

    Hi,

    I have installed phpPgAdmin 4.1.3 in my university server. The Postgre version we are using is 7.3.4. The problem is PHP is installed as a cgi module and according to the administrators, so I have to include : "#!/usr/bin/php" otherwise I will get an error 500.

    The problem is I keep getting this error:
    #!/usr/bin/php
    Warning: Cannot modify header information - headers already sent by (output started at /public_html/phpPgAdmin/all_db.php:2) in /public_html/phpPgAdmin/classes/Misc.php on line 359

    I have tried removing #!/usr/bin/php, but then phpPgAdmin won't work.

    I am using PHP 5.2.1, and I cannot even dream of chaging the setup of PHP or Postgre.

    Any thoughts on how to avoid this error?
    Cheers,

     
    • Nobody/Anonymous

      Ok, let me first mention that Postgres 7.3.4 is really old, and has known data quality bugs and security risks; at a minimum your univeristy needs to upgrade to 7.3.21. It's also worth noting that there are no plans to release any future 7.3 releases, so your univeristy also needs to take a serious look at upgrading to a new 8.x version (8.3 preferred)

      Now, that said, I don't think that's related to your problem. I am wondering if you put the #!/usr/bin/php into all of the file, or just the ones in the main directory. My thinking is that all of the files under lib or classes, or any of the other subdirectories, should not have this line added. If you change that, do you get a different message? 

       
    • Nobody/Anonymous

      Nope, I just added the the #!/usr/bin/php to the .php files in the main folder, not in the subdirectories.

      I think the problem might be that all_db.php is sometimes executed on its own and sometimes included during other execution. Hence, I get the warning because the second time php sees #!/usr/bin/php, php treats it as text.

      Thanks a lot

       

Log in to post a comment.