Connecting Tech Pros Worldwide Help | Site Map

PHP won't interpret php code any more

hup@addall.com
Guest
 
Posts: n/a
#1: Dec 25 '06
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 (gdimagecreatefromgif, bad colormap)
[ext/gd/tests/bug37346.phpt]
Bug #37360 (gdimagecreatefromgif, bad image sizes)
[ext/gd/tests/bug37360.phpt]
Bug #16069 [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.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: imagecreatefromgif(): '%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_filter.phpt
================================================== ==============================
string(20) "1b244224332473244b24"
string(10) "41244f1b28"
string(2) "42"
string(20) "a4b3a4f3a4cba4c1a4cf"
string(10) "69636f6e76"
string(2) "0a"
string(20) "1b244f24332466245824"
string(10) "4e24421b28"
string(2) "4f"
================================================== ==============================
007+ string(20) "1b244f24332466245824"
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_tags, 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.input =& =&
arg_separator.output =& =&
asp_tags =Off =Off
auto_append_file =no value =no value
auto_globals_jit =On =On
auto_prepend_file =no value =no value
browscap =no value =no value
default_charset =no value =no value
default_mimetype =text/html =text/html
define_syslog_variables =Off =Off
detect_unicode =On =On
disable_classes =no value =no value
disable_functions =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_string =no value =no value
error_log =no value =no value
error_prepend_string =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.comment =#FF8000 =#FF8000
highlight.default =#0000BB =#0000BB
highlight.html =#000000 =#000000
highlight.keyword =#007700 =#007700
highlight.string =#DD0000 =#DD0000
html_errors =Off =On
ignore_repeated_errors =Off =Off
ignore_repeated_source =Off =Off
ignore_user_abort =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_gpc =Off =Off
magic_quotes_runtime =Off =Off
magic_quotes_sybase =Off =Off
mail.force_extra_parameters =no value =no value
max_execution_time =0 =30
max_input_time =-1 =60
open_basedir =no value =no value
output_buffering =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_argv =On =Off
register_globals =Off =Off
register_long_arrays =Off =Off
report_memleaks =On =On
report_zend_debug =Off =Off
safe_mode =Off =Off
safe_mode_exec_dir =no value =no value
safe_mode_gid =Off =Off
safe_mode_include_dir =no value =no value
sendmail_from =no value =no value
sendmail_path =/usr/sbin/sendmail -t -i =/usr/sbin/sendmail -t -i
serialize_precision =100 =100
short_open_tag =Off =Off
SMTP =localhost =localhost
smtp_port =25 =25
sql.safe_mode =Off =Off
track_errors =Off =Off
unserialize_callback_func =no value =no value
upload_max_filesize =2M =2M
upload_tmp_dir =no value =no value
user_dir =no value =no value
variables_order =GPCS =GPCS
xmlrpc_error_number =0 =0
xmlrpc_errors =Off =Off
y2k_compliance =On =On
zend.ze1_compatibility_mode =Off =Off

=?UTF-8?B?SXbDoW4gU8OhbmNoZXogT3J0ZWdh?=
Guest
 
Posts: n/a
#2: Dec 25 '06

re: PHP won't interpret php code any more


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

<?php
phpinfo();
?>


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

http://acm.asoc.fi.upm.es/~mr/
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

Anonymous
Guest
 
Posts: n/a
#3: Dec 25 '06

re: PHP won't interpret php code any more


hup@addall.com wrote:
Quote:
>
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:
Quote:
short_open_tag =Off =Off
Either set this to on or use "<?PHP" instead of "<?", which would be the
better solution.

Bye!
Closed Thread