in reply to Infamous "Premature end of script headers"

Thank you for all replies, recommending me to try other options. The point is that the same script WORKS when ran by root (in a cron task) and fails when ran in the browser. Permission is 755 to be run in the browser).

I would like to understand what's going wrong with this :)
  • Comment on Re: Infamous "Premature end of script headers"

Replies are listed 'Best First'.
Re^2: Infamous "Premature end of script headers"
by soonix (Chancellor) on Dec 16, 2021 at 09:51 UTC
    problem is: "run in the browser" is usually "run on server, wrapped in requests and responses from and to the browser", i.e.
    1. browser sends request to server
    2. server runs script
    3. server sends response back
    4. Browser renders response
    and if it "fails/does not work", you have to find out which of these four steps is at fault, and decompose that further...
Re^2: Infamous "Premature end of script headers"
by marto (Cardinal) on Dec 16, 2021 at 10:18 UTC

    Start here, reply if you have problems. If you've rebuilt a server/environment there's likely part of the config which is wrong. Reading the logs and the debugging tips posted previously will most likely track down the problem.

Re^2: Infamous "Premature end of script headers"
by bliako (Abbot) on Dec 16, 2021 at 10:17 UTC

    OK root works fine, but what user the script serving the browser runs under? And with what @INC?

Re^2: Infamous "Premature end of script headers"
by Anonymous Monk on Dec 16, 2021 at 10:10 UTC

    I would like to understand what's going wrong with this :)

    ;) time to get started, the list is not long

A reply falls below the community's threshold of quality. You may see it by logging in.