Problem updating PHP 4.3.0 DEV to PHP 4.3.3

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

    #1

    Problem updating PHP 4.3.0 DEV to PHP 4.3.3

    Hi!

    I had Apache 2.0.47 and PHP 4.3.0 DEV running successfully on a W2k
    Server. For some reason, I couldn't get PHP to read XML-Attributes
    with the DOM XML -functions. So I thought, it would be time to update
    PHP to a newer version.
    So I simply replaces the old php-files with the new ones and of course
    kept the php.ini. But now, PHP doesn't work anymore. As soon as I
    request a page with php code, I get a "document contains no data"
    error after a while. (Apache's error log looks like the excerpt at the
    end of this message)

    If I install PHP5, I can't even start Apache.

    Does anyone have an idea, what may go wrong here?

    Thanks in advance,

    Tobias

    [...]
    [Wed Sep 24 20:46:56 2003] [debug] child.c(695): Child 3196: Worker
    thread 248 starting.
    [Wed Sep 24 20:46:56 2003] [debug] child.c(695): Child 3196: Worker
    thread 249 starting.
    [Wed Sep 24 20:47:24 2003] [notice] Parent: child process exited with
    status 3221225477 -- Restarting.
    [Wed Sep 24 20:47:25 2003] [notice] Parent: Created child process 3032
    [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(505 ): Parent: Sent the
    scoreboard to the child
    [Wed Sep 24 20:47:25 2003] [notice] Child 3032: Child process is
    running
    [Wed Sep 24 20:47:25 2003] [info] Parent: Duplicating socket 220 and
    sending it to child process 3032
    [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(426 ): Child 3032:
    Retrieved our scoreboard from the parent.
    [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(623 ): Parent: Sent 1
    listeners to child 3032
    [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(582 ): Child 3032:
    retrieved 1 listeners from parent
    [Wed Sep 24 20:47:25 2003] [notice] Child 3032: Acquired the start
    mutex.
    [Wed Sep 24 20:47:25 2003] [notice] Child 3032: Starting 250 worker
    threads.
    [Wed Sep 24 20:47:25 2003] [debug] child.c(695): Child 3032: Worker
    thread 0 starting.
    [Wed Sep 24 20:47:25 2003] [debug] child.c(695): Child 3032: Worker
    thread 1 starting.
    [...]
  • Tobias Grimm

    #2
    DOMXML and Umlauts (Re: Problem updating PHP 4.3.0 DEV to PHP 4.3.3)

    Hi again,

    I've found the problem. There was a dll from an old backup still
    somwhere in the search path.

    But now I have a new problem. When I use the domxml-functions to
    parse a xml document with ISO-8859-1 encoding, and simply print out
    the parsed texts with echo, then all the umlauts get messed
    (ö -> ö and so on). The html is set to charset=iso-8859-1, the xml
    encoding is ISO-8859-1. So why do my umlauts become 2-byte codes in
    output, that can't even convert with htmlentities()?

    bye,

    Tobias

    Comment

    • Tony Marston

      #3
      Re: DOMXML and Umlauts (Re: Problem updating PHP 4.3.0 DEV to PHP 4.3.3)

      I had a similar problem a few months back, and when I queried it with PHP
      support they told me that while the default character set for PHP is
      ISO-8859-1 the character set used by the DOM XML functions is UTF-8. In
      order to correctly process accented characters this is what you do:-

      1) Use the mb_convert-encoding() function along with the
      $doc->create_text_no de() function to convert from ISO-8859-1 to UTF-8, as
      in:
      $value =
      $xml_doc->create_text_no de(mb_convert_e ncoding($fieldv alue,'UTF-8','ISO-8859
      -1'));

      2) On the $xml_doc->dump_mem() command change the encoding back to
      ISO-8859-1 as in:
      $xml_string = $xml_doc->dump_mem(true, 'ISO-8859-1');

      I hope this helps.

      Tony Marston
      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL


      "Tobias Grimm" <tobias.grimm@g mx.de> wrote in message
      news:bktepc$bj0 $00$1@news.t-online.com...[color=blue]
      > Hi again,
      >
      > I've found the problem. There was a dll from an old backup still
      > somwhere in the search path.
      >
      > But now I have a new problem. When I use the domxml-functions to
      > parse a xml document with ISO-8859-1 encoding, and simply print out
      > the parsed texts with echo, then all the umlauts get messed
      > (ö -> ö and so on). The html is set to charset=iso-8859-1, the xml
      > encoding is ISO-8859-1. So why do my umlauts become 2-byte codes in
      > output, that can't even convert with htmlentities()?
      >
      > bye,
      >
      > Tobias
      >[/color]


      Comment

      Working...