PHP won't interpret php code any more

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hup@addall.com

    PHP won't interpret php code any more

    One of my Linux (CentOS) server stop interpret php code any more. I
    did try to compile and installed other version of php, but it's still
    not working.

    [root@ns6 php-5.1.6]# cat /tmp/phpinfo.php
    <?
    phpinfo()
    ?>

    [root@ns6 php-5.1.6]# /usr/local/bin/php -v
    PHP 5.1.6 (cli) (built: Dec 25 2006 11:38:30)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


    [root@ns6 php-5.1.6]# /usr/local/bin/php /tmp/phpinfo.php
    <?
    phpinfo()
    ?>

    PHP simply print out the code instead of interpret it. Any idea?
    I guess some of my libraries may be corrupted, any suggestion what
    maybe the problem?
    Thanks for any help.




    [root@ns6 php-5.1.6]# uname -a
    Linux ns6 2.6.9-11.ELsmp #1 SMP Wed Jun 8 17:54:20 CDT 2005 i686 i686
    i386 GNU/Linux

    [root@ns6 php-5.1.6]# './configure' '--with-mysql=/home/db'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-mbstring'
    '--enable-fastcgi' '--enable-zend-multibyte' --with-zlib
    --with-gd=shared; make


    my make test result:

    TEST RESULT SUMMARY
    ---------------------------------------------------------------------
    Exts skipped : 56
    Exts tested : 23
    ---------------------------------------------------------------------

    Number of tests : 2264 1317
    Tests skipped : 947 ( 41.8%) --------
    Tests warned : 0 ( 0.0%) ( 0.0%)
    Tests failed : 4 ( 0.2%) ( 0.3%)
    Tests passed : 1313 ( 58.0%) ( 99.7%)

    FAILED TEST SUMMARY
    ---------------------------------------------------------------------
    Bug #37346 (gdimagecreatef romgif, bad colormap)
    [ext/gd/tests/bug37346.phpt]
    Bug #37360 (gdimagecreatef romgif, bad image sizes)
    [ext/gd/tests/bug37360.phpt]
    Bug #16069 [ext/iconv/tests/bug16069.phpt]
    iconv stream filter [ext/iconv/tests/iconv_stream_fi lter.phpt]


    =============== =============== =============== =============== =============== =====
    /home/root/php-5.1.6/ext/gd/tests/bug37346.phpt
    =============== =============== =============== =============== =============== =====
    FATAL: emalloc(): Unable to allocate 52156 bytes
    =============== =============== =============== =============== =============== =====
    001+ FATAL: emalloc(): Unable to allocate 52156 bytes
    001- Warning: imagecreatefrom gif(): '%sbug37346.gif ' is not a valid GIF
    file in %sbug37346.php on line %d
    =============== =============== =============== =============== =============== =====



    =============== =============== =============== =============== =============== =====
    /home/root/php-5.1.6/ext/gd/tests/bug37360.phpt
    =============== =============== =============== =============== =============== =====
    FATAL: emalloc(): Unable to allocate 65535 bytes
    =============== =============== =============== =============== =============== =====
    001+ FATAL: emalloc(): Unable to allocate 65535 bytes
    001- resource(%d) of type (gd)


    =============== =============== =============== =============== =============== =====
    /home/root/php-5.1.6/ext/iconv/tests/iconv_stream_fi lter.phpt
    =============== =============== =============== =============== =============== =====
    string(20) "1b244224332473 244b24"
    string(10) "41244f1b28 "
    string(2) "42"
    string(20) "a4b3a4f3a4cba4 c1a4cf"
    string(10) "69636f6e76 "
    string(2) "0a"
    string(20) "1b244f24332466 245824"
    string(10) "4e24421b28 "
    string(2) "4f"
    =============== =============== =============== =============== =============== =====
    007+ string(20) "1b244f24332466 245824"
    008+ string(10) "4e24421b28 "
    009+ string(2) "4f"
    007-
    008- Warning: fread(): iconv stream filter ("ISO-2022-JP"=>"EUC-JP"):
    invalid multibyte sequence in %s on line %d
    009- string(0) ""
    010- string(0) ""
    011- string(0) ""

    =============== =============== =============== =============== =============== =====
    BUILD ENVIRONMENT
    =============== =============== =============== =============== =============== =====
    OS:
    Linux - Linux ns6.addall.com 2.6.9-11.ELsmp #1 SMP Wed Jun 8 17:54:20
    CDT 2005 i686

    Autoconf:
    autoconf (GNU Autoconf) 2.59
    Written by David J. MacKenzie and Akim Demaille.

    Copyright (C) 2003 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is
    NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.

    Bundled Libtool:
    ltmain.sh (GNU libtool) 1.5.20 (1.1220.2.287 2005/08/31 18:54:15)

    Copyright (C) 2005 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is
    NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.

    System Libtool:
    ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.95 2004/04/11 05:50:42)

    Copyright (C) 2003 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is
    NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.

    Compiler:
    Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
    --infodir=/usr/share/info --enable-shared --enable-thread
    s=posix --disable-checking --with-system-zlib --enable-__cxa_atexit
    --disable-libunwind-exceptions --enable-java-awt=gtk --ho
    st=i386-redhat-linux
    Thread model: posix
    gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)

    Bison:
    bison (GNU Bison) 1.875c
    Written by Robert Corbett and Richard Stallman.

    Copyright (C) 2003 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is
    NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.

    Libraries:
    libcrypt.so.1 =/lib/libcrypt.so.1 (0x00d0b000)
    libmysqlclient. so.10 =/home/db/lib/mysql/libmysqlclient. so.10
    (0x0027e000)
    libz.so.1 =/usr/lib/libz.so.1 (0x00ce7000)
    libm.so.6 =/lib/tls/libm.so.6 (0x004cd000)
    libresolv.so.2 =/lib/libresolv.so.2 (0x00544000)
    libdl.so.2 =/lib/libdl.so.2 (0x004c7000)
    libnsl.so.1 =/lib/libnsl.so.1 (0x0056d000)
    libxml2.so.2 =/usr/lib/libxml2.so.2 (0x00585000)
    libpthread.so.0 =/lib/tls/libpthread.so.0 (0x00559000)
    libc.so.6 =/lib/tls/libc.so.6 (0x0039c000)
    /lib/ld-linux.so.2 (0x00383000)

    =============== =============== =============== =============== =============== =====
    phpinfo()
    PHP Version =5.1.6

    System =Linux ns6 2.6.9-11.ELsmp #1 SMP Wed Jun 8 17:54:20 CDT 2005
    i686
    Build Date =Dec 25 2006 11:35:52
    Configure Command = './configure' '--with-mysql=/home/db'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-mbstring' '--e
    nable-fastcgi' '--enable-zend-multibyte' '--with-zlib'
    '--with-gd=shared'
    Server API =Command Line Interface
    Virtual Directory Support =disabled
    Configuration File (php.ini) Path =/usr/local/lib/php.ini
    PHP API =20041225
    PHP Extension =20050922
    Zend Extension =220051025
    Debug Build =no
    Thread Safety =disabled
    Zend Memory Manager =enabled
    IPv6 Support =enabled
    Registered PHP Streams =php, file, http, ftp, compress.zlib
    Registered Stream Socket Transports =tcp, udp, unix, udg
    Registered Stream Filters =string.rot13, string.toupper,
    string.tolower, string.strip_ta gs, convert.*, consumed, convert.ic
    onv.*, zlib.*


    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

    Configuration

    PHP Core

    Directive =Local Value =Master Value
    allow_call_time _pass_reference =Off =Off
    allow_url_fopen =On =On
    always_populate _raw_post_data =Off =Off
    arg_separator.i nput =& =&
    arg_separator.o utput =& =&
    asp_tags =Off =Off
    auto_append_fil e =no value =no value
    auto_globals_ji t =On =On
    auto_prepend_fi le =no value =no value
    browscap =no value =no value
    default_charset =no value =no value
    default_mimetyp e =text/html =text/html
    define_syslog_v ariables =Off =Off
    detect_unicode =On =On
    disable_classes =no value =no value
    disable_functio ns =no value =no value
    display_errors =Off =Off
    display_startup _errors =Off =Off
    doc_root =no value =no value
    docref_ext =no value =no value
    docref_root =no value =no value
    enable_dl =On =On
    error_append_st ring =no value =no value
    error_log =no value =no value
    error_prepend_s tring =no value =no value
    error_reporting =2047 =2047
    expose_php =On =On
    extension_dir =/usr/lib/php4 =/usr/lib/php4
    file_uploads =On =On
    highlight.bg =#FFFFFF =#FFFFFF
    highlight.comme nt =#FF8000 =#FF8000
    highlight.defau lt =#0000BB =#0000BB
    highlight.html =#000000 =#000000
    highlight.keywo rd =#007700 =#007700
    highlight.strin g =#DD0000 =#DD0000
    html_errors =Off =On
    ignore_repeated _errors =Off =Off
    ignore_repeated _source =Off =Off
    ignore_user_abo rt =Off =Off
    implicit_flush =On =Off
    include_path =.:/usr/local/lib/php =.:/usr/local/lib/php
    log_errors =On =On
    log_errors_max_ len =1024 =1024
    magic_quotes_gp c =Off =Off
    magic_quotes_ru ntime =Off =Off
    magic_quotes_sy base =Off =Off
    mail.force_extr a_parameters =no value =no value
    max_execution_t ime =0 =30
    max_input_time =-1 =60
    open_basedir =no value =no value
    output_bufferin g =0 =4096
    output_handler =no value =no value
    post_max_size =8M =8M
    precision =14 =14
    realpath_cache_ size =16K =16K
    realpath_cache_ ttl =120 =120
    register_argc_a rgv =On =Off
    register_global s =Off =Off
    register_long_a rrays =Off =Off
    report_memleaks =On =On
    report_zend_deb ug =Off =Off
    safe_mode =Off =Off
    safe_mode_exec_ dir =no value =no value
    safe_mode_gid =Off =Off
    safe_mode_inclu de_dir =no value =no value
    sendmail_from =no value =no value
    sendmail_path =/usr/sbin/sendmail -t -i =/usr/sbin/sendmail -t -i
    serialize_preci sion =100 =100
    short_open_tag =Off =Off
    SMTP =localhost =localhost
    smtp_port =25 =25
    sql.safe_mode =Off =Off
    track_errors =Off =Off
    unserialize_cal lback_func =no value =no value
    upload_max_file size =2M =2M
    upload_tmp_dir =no value =no value
    user_dir =no value =no value
    variables_order =GPCS =GPCS
    xmlrpc_error_nu mber =0 =0
    xmlrpc_errors =Off =Off
    y2k_compliance =On =On
    zend.ze1_compat ibility_mode =Off =Off

  • =?UTF-8?B?SXbDoW4gU8OhbmNoZXogT3J0ZWdh?=

    #2
    Re: PHP won't interpret php code any more

    hup@addall.com wrote:
    PHP simply print out the code instead of interpret it. Any idea?
    Yeah:
    short_open_tag =Off =Off
    Try this:

    <?php
    phpinfo();
    ?>


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


    Proudly running Debian Linux with 2.6.17-1-686 kernel, KDE3.5.3, and PHP
    5.2.0-8 generating this signature.
    Uptime: 21:26:20 up 3 days, 22:16, 1 user, load average: 0.60, 0.55, 0.55

    Comment

    • Anonymous

      #3
      Re: PHP won't interpret php code any more

      hup@addall.com wrote:
      >
      One of my Linux (CentOS) server stop interpret php code any more. I
      did try to compile and installed other version of php, but it's still
      not working.
      >
      [root@ns6 php-5.1.6]# cat /tmp/phpinfo.php
      <?
      phpinfo()
      ?>
      PHP scripts start with "<?PHP" not just wirh "<?".

      What you are using is called a short tag. Short tag use is disencouraged
      nowadays because XML documents also start with "<?" ("<?xml" to be more
      exact). That's why on any modern PHP version short tags are switched off
      by default. See your own config:
      short_open_tag =Off =Off
      Either set this to on or use "<?PHP" instead of "<?", which would be the
      better solution.

      Bye!

      Comment

      Working...