Announcement

Collapse
No announcement yet.

Strange Behavior of PHP scripts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange Behavior of PHP scripts

    Hello, Im not sure the is the right question for this forum, but...

    I have two hosting providers. One provider is running FreeBSD and PHP as Apache module (provider1).

    The second provider runs CloudLinux with cPanel (provider2).

    I have .htaccess in my DocumentRoot:

    Code:
    ErrorDocument 404 /page.php
    In this file (page.php) I have the code:

    Code:
    <?php
    
    header("HTTP/1.0 200 OK");
    
    ?>
    
    Test
    On the first provider everything is OK, 200 is returned.

    On the second provider with cloudLinux and cPanel - we have 404 code as the result. But if I change code to

    Code:
    <?php
    
    header($_SERVER["SERVER_PROTOCOL"]." 202 Some test", true, 202);
    
    ?>
    
    Test
    We have 202 code as the result.

    But the same time if

    Code:
    <?php
    
    header($_SERVER["SERVER_PROTOCOL"]." 200 Some test", true, 200);
    
    ?>
    
    Test
    We have 404 code as the result.

    It seems to me its kind of a feature of mod_lsapi. is it? Could not find the proper documentation about this...
Working...
X