How to view headers that are sent php4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ircmaxell

    #1

    How to view headers that are sent php4

    I'm working on a php project modifying a CMS. I need to be able to
    view the headers that the script is sending at runtime. In php5, I can
    use headers_list(), but I'm using php4. Is there any way of getting
    the info I need short of re-requesting the file?

  • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

    #2
    Re: How to view headers that are sent php4

    ircmaxell wrote:
    I'm working on a php project modifying a CMS. I need to be able to
    view the headers that the script is sending at runtime. In php5, I can
    use headers_list(), but I'm using php4. Is there any way of getting
    the info I need short of re-requesting the file?




    --
    ----------------------------------
    Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

    http://acm.asoc.fi.upm.es/~mr/ ; http://acm.asoc.fi.upm.es/~ivan/
    MSN:i_eat_s_p_a _m_for_breakfas t@hotmail.com
    Jabber:ivansanc hez@jabber.org ; ivansanchez@kde talk.net

    Comment

    • ircmaxell

      #3
      Re: How to view headers that are sent php4

      On Mar 7, 10:15 am, Iván Sánchez Ortega <ivansanchez-...@rroba-
      escomposlinux.-.punto.-.orgwrote:
      ircmaxell wrote:
      I'm working on a php project modifying a CMS. I need to be able to
      view the headers that the script is sending at runtime. In php5, I can
      use headers_list(), but I'm using php4. Is there any way of getting
      the info I need short of re-requesting the file?
      >

      >
      --
      ----------------------------------
      Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
      >

      MSN:i_eat_s_p_a _m_for_breakf.. .@hotmail.com
      Jabber:ivansanc ...@jabber.org ; ivansanc...@kde talk.net
      Maybe I wasn't clear. I need to get this list at runtime from within
      the php script...

      Comment

      • Toby A Inkster

        #4
        Re: How to view headers that are sent php4

        ircmaxell wrote:
        I'm working on a php project modifying a CMS. I need to be able to
        view the headers that the script is sending at runtime. In php5, I can
        use headers_list(), but I'm using php4.
        You could try defining your own replacement for the header() function:

        function _header ($x)
        {
        $GLOBALS['HEADERS'][] = $x;
        header($x);
        }

        Wherever your code calls header(), replace it with _header(). Then you
        can use something like this:

        function _headers_list ()
        {
        return $GLOBALS['HEADERS'];
        }

        --
        Toby A Inkster BSc (Hons) ARCS
        Contact Me ~ http://tobyinkster.co.uk/contact
        Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

        * = I'm getting there!

        Comment

        • ircmaxell

          #5
          Re: How to view headers that are sent php4

          On Mar 8, 9:47 pm, Toby A Inkster <usenet200...@t obyinkster.co.u k>
          wrote:
          ircmaxell wrote:
          I'm working on a php project modifying a CMS. I need to be able to
          view the headers that the script is sending at runtime. In php5, I can
          use headers_list(), but I'm using php4.
          >
          You could try defining your own replacement for the header() function:
          >
          function _header ($x)
          {
          $GLOBALS['HEADERS'][] = $x;
          header($x);
          >
          }
          >
          Wherever your code calls header(), replace it with _header(). Then you
          can use something like this:
          >
          function _headers_list ()
          {
          return $GLOBALS['HEADERS'];
          >
          }
          >
          --
          Toby A Inkster BSc (Hons) ARCS
          Contact Me ~http://tobyinkster.co.uk/contact
          Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
          >
          * = I'm getting there!
          I would like to stay away from this for compatability reasons... I'm
          modifying a popular CMS, and want to retain 3pd compatability. If it
          was going to be just mine, I could just install a pecl package that
          would give me the functionality needed... Thanks for your input...

          Comment

          Working...