Koozali.org: home of the SME Server

What is newest versio on PHP tested with SME

ekip77

What is newest versio on PHP tested with SME
« on: July 20, 2004, 03:12:36 AM »
Hello



There has been found 2 critical securityholes in PHP 4.3.7 and earliers. Is there rpms or howtos for newer PHP packkages. I now use PHP 4.3.6 and server is 6.0b3 updated all the way from 5.5  :lol:

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
What is newest versio on PHP tested with SME
« Reply #1 on: July 20, 2004, 08:03:16 AM »
Although not yet announced, 4.3.8 is available for SME thanks to Dan Brown.

PHP 4.3.8
http://www.ibiblio.org/pub/linux/distributions/e-smith/contrib/DanBrown/RPMS/i386/

There is a forum thread on upgrading PHP:
http://forums.contribs.org/index.php?topic=22754.0

There is a script which shows what to do (for 4.3.7):
http://ergin.dyndns.org/download/php4.3.7-upgrade.sh

Ian
............

deunan

What is newest versio on PHP tested with SME
« Reply #2 on: July 20, 2004, 10:07:15 PM »
Yeah..

I'm burning midnight oil here, installing and re-installing SME playing around with egroupware and phprojekt/postnuke combo...

One good thing that came out of it is this new script..

php4.3.8-upgrade.sh ,get it here ;-)
http://www.deunan.net/php4.3.8-upgrade.sh


Deunan

-ps  This is an update, ergin's script is much better than mine, get his! - http://ergin.dyndns.org/download/php4.3.8-upgrade.sh

Buddha_Joe

Problems with PHP after upgrade to 4.3.8
« Reply #3 on: July 21, 2004, 01:04:15 AM »
Fresh install of 6.0.1. Upgraded to 4.3.8 using the script posted by deunan and now I am getting the following errors

Fatal error: Call to undefined function: mysql_connect()

Did a phpinfo() and there is no section for MySQL.

Checked the installed RPMS on the server and I see php-mysql-4.3.8-1db. Am I correct in assuming that this RPM is what adds the MySQL Support? or do I need to take a closer look at the PHP.INI?

Any suggestions would be greatly appreciated.

deunan

What is newest versio on PHP tested with SME
« Reply #4 on: July 21, 2004, 02:02:11 AM »
Just a thought, do a manual wget for each and every RPMs listed in the script, then do the rpm -Uvh --nodeps php*.rpm, also manually.

Quite possibly that, the script's execution did not successfully download the RPM completely.

Sometimes I do get timeouts while accessing ibiblio.org.

Hope you install's successful..


Deunan

Buddha_Joe

manual wget and rpm install
« Reply #5 on: July 21, 2004, 03:00:04 AM »
Well I tried it one rpm at a time and tried the rpm -Uvh. the system reports that all the rpms are already installed.

I checked /usr/lib/php4 and found the mysql.so. I double checked  phpinfo() and the extensions dir is set correctly and that mysql.so is called in the php.ini. any other ideas?

I do have an additional question for you though. in your script you have

Code: [Select]


echo 'include_path        = ".:/usr/share/pear"' > /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories



Why do you have " .: " at the start of the path statement?

webster

Re: Problems with PHP after upgrade to 4.3.8
« Reply #6 on: July 21, 2004, 03:11:57 AM »
Quote from: "Buddha_Joe"
Fresh install of 6.0.1. Upgraded to 4.3.8 using the script posted by deunan and now I am getting the following errors

Fatal error: Call to undefined function: mysql_connect()

Did a phpinfo() and there is no section for MySQL.

Checked the installed RPMS on the server and I see php-mysql-4.3.8-1db. Am I correct in assuming that this RPM is what adds the MySQL Support? or do I need to take a closer look at the PHP.INI?

Any suggestions would be greatly appreciated.



Try
/sbin/e-smith/expand-template /etc/php.ini
service httpd restart


if you have any other problems maybe try
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

have a look at
http://forums.contribs.org/index.php?topic=22425.msg88998#msg88998
also could have a look at
http://forums.contribs.org/index.php?topic=17964.0


HTH
T

Buddha_Joe

Webster
« Reply #7 on: July 21, 2004, 03:33:19 AM »
I tried all of your suggestions and still have the same problem.

MySQL does not show up on phpinfo()

still getting Fatal error: Call to undefined function: mysql_connect()

Any other ideas?

webster

Re: Webster
« Reply #8 on: July 21, 2004, 04:32:46 AM »
Quote from: "Buddha_Joe"
I tried all of your suggestions and still have the same problem.

MySQL does not show up on phpinfo()

still getting Fatal error: Call to undefined function: mysql_connect()

Any other ideas?


whats it say if you type
# rpm -q php-mysql

deunan

Re: manual wget and rpm install
« Reply #9 on: July 21, 2004, 06:14:53 AM »
Quote from: "Buddha_Joe"

I do have an additional question for you though. in your script you have

Code: [Select]


echo 'include_path        = ".:/usr/share/pear"' > /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories



Why do you have " .: " at the start of the path statement?


Now, that's quite a tricky question there..  The answer that you'll get from me is a newbie amateur PHP-wannabe developer's answer  ;-)

It's a PHP thing, for include path, you can specify multiple directories for PHP to search for whatever it needs to look for.  To specify multiple directories, you separate each directories with a colon (:).

About the period (.) thing, basically it means the current directory.

What we have at the above is the include path having two (2) directories being specified for it, the current directory, represented by a period, seperated by a colon, then the "/usr/share/pear" directory. Thus, we have

Code: [Select]

include_path = .:/usr/share/pear



or another example for three separate directories

Code: [Select]

include_path = .:/usr/local/lib/php:./include



Hope I got the explanation correct...  Constructive criticism welcomed.  ;-)


Regards

Deunan

Buddha_Joe

deunan
« Reply #10 on: July 21, 2004, 02:31:11 PM »
oooohhhhhhhhhhhhhhhh. :pint:

Thank you very much.. I did not know about that little trick.

Buddha_Joe

Webster
« Reply #11 on: July 21, 2004, 02:33:24 PM »
Quote
whats it say if you type
# rpm -q php-mysql


php-mysql-4.3.8-1db

.

Buddha_Joe

Just to make sure
« Reply #12 on: July 21, 2004, 03:11:58 PM »
Just to make sure the rpm installed with out a problem I just did the following using the rpms I downloaded myself with wget earlier on in this thread.

Code: [Select]

rpm -e --nodeps php-mysql-4.3.8-1db

rpm -Uvh --nodeps php-mysql-4.3.8-1db.i386.rpmrpm -Uhv --nodeps

service httpd restart

.


Still having the same problem.

Buddha_Joe

phpinfo()
« Reply #13 on: July 21, 2004, 03:23:16 PM »
Here is what phpinfo() is saying

Code: [Select]


PHP Version 4.3.8

System Linux server1 2.4.20-18.7 #1 Thu May 29 08:32:50 EDT 2003 i686
Build Date Jul 19 2004 19:28:31
Configure Command './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-dom' '--with-bz2' '--with-db3' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-gd' '--with-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png' '--with-regex=system' '--with-ttf' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-mime-magic' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-iconv' '--enable-mbstring' '--with-imap=shared,/usr/local/src/imap-2002e' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--with-apxs=/usr/sbin/apxs'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2, compress.zlib

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen Off Off
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_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
disable_classes no value no value
disable_functions no value no value
display_errors On On
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 syslog syslog
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php4 /usr/lib/php4
file_uploads On On
gpc_order GPC GPC
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 On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path /usr/share/pear /usr/share/pear
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time -1 -1
memory_limit 32M 32M
open_basedir /home/e-smith/files/ibays/phptest no value
output_buffering no value no value
output_handler no value no value
post_max_size 20M 20M
precision 14 14
register_argc_argv On On
register_globals On On
report_memleaks On On
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 me@localhost.com me@localhost.com
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
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 10M 10M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance Off Off

apache
APACHE_INCLUDE no value
APACHE_TARGET no value
Apache Version Apache
Apache Release 10327100
Apache API Version 19990320
Hostname:Port www.home.lan:80
User/Group www(100)/102
Max Requests Per Child: 100 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Server Root /etc/httpd
Loaded Modules mod_ssl, mod_php4, mod_setenvif, mod_so, mod_usertrack, mod_headers, mod_expires, mod_digest, mod_auth_external, mod_auth_db, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_proxy, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_log_referer, mod_log_agent, mod_log_config, mod_env, http_core

Directive Local Value Master Value
child_terminate 0 0
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
DOCUMENT_ROOT /home/e-smith/files/ibays/phptest/html
HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING gzip,deflate
HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5
HTTP_CONNECTION keep-alive
HTTP_HOST www.home.lan
HTTP_KEEP_ALIVE 300
HTTP_USER_AGENT Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9
PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
REDIRECT_STATUS 200
REDIRECT_URL /
REMOTE_ADDR 192.168.1.66
REMOTE_PORT 33023
SCRIPT_FILENAME /home/e-smith/files/ibays/phptest/html/index.php
SERVER_ADDR 192.168.1.10
SERVER_ADMIN admin@home.lan
SERVER_NAME www.home.lan
SERVER_PORT 80
SERVER_SIGNATURE no value
SERVER_SOFTWARE Apache
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /
SCRIPT_NAME /index.php

HTTP Headers Information
HTTP Request Headers
HTTP Request GET / HTTP/1.1
Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding gzip,deflate
Accept-Language en-us,en;q=0.5
Connection keep-alive
Host www.home.lan
Keep-Alive 300
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9
HTTP Response Headers
X-Powered-By PHP/4.3.8
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html

bcmath
BCMath support enabled

bz2
BZip2 Support Enabled
BZip2 Version 1.0.2, 30-Dec-2001

ctype
ctype functions enabled

dba
DBA support enabled
Supported handlers gdbm cdb cdb_make db3 inifile flatfile

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20419
HTML Support enabled
XPath Support enabled
XPointer Support enabled

ftp
FTP support enabled

gd
GD Support enabled
GD Version bundled (2.0.23 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

gettext
GetText Support enabled

gmp
gmp support enabled

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.2.5

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

imap
IMAP c-Client Version 2001
SSL Support enabled
Kerberos Support enabled

ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.130.2.10 2004/06/01 21:05:33 iliaa Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version 20026

mbstring
Multibyte Support enabled
Japanese support enabled
Simplified chinese support enabled
Traditional chinese support enabled
Korean support enabled
Russian support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding ISO-8859-1 no value
mbstring.language neutral neutral
mbstring.substitute_character no value no value

openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.6b [engine] 9 Jul 2001

overload
User-Space Object Overloading Support enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.5 01-December-2003

posix
Revision $Revision: 1.51.2.2 $

session
Session Support enabled
Registered save handlers files user mm

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid On On

shmop
shmop support enabled

sockets
Sockets Support enabled

standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value

tokenizer
Tokenizer Support enabled

wddx
WDDX Support enabled
WDDX Session Serializer enabled

xml
XML Support active
XML Namespace Support active
EXPAT Version expat_1.95.2

yp
YP Support enabled

zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name
sysvsem
sysvshm

Environment
Variable Value
PWD /
LANG en_US
SHLVL 1
PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_ /sbin/initlog

PHP Variables
Variable Value
PHP_SELF /index.php
_SERVER["DOCUMENT_ROOT"] /home/e-smith/files/ibays/phptest/html
_SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_HOST"] www.home.lan
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9
_SERVER["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_SERVER["REDIRECT_STATUS"] 200
_SERVER["REDIRECT_URL"] /
_SERVER["REMOTE_ADDR"] 192.168.1.66
_SERVER["REMOTE_PORT"] 33023
_SERVER["SCRIPT_FILENAME"] /home/e-smith/files/ibays/phptest/html/index.php
_SERVER["SERVER_ADDR"] 192.168.1.10
_SERVER["SERVER_ADMIN"] admin@home.lan
_SERVER["SERVER_NAME"] www.home.lan
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"] Apache
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /
_SERVER["SCRIPT_NAME"] /index.php
_SERVER["PATH_TRANSLATED"] /home/e-smith/files/ibays/phptest/html/index.php
_SERVER["PHP_SELF"] /index.php
_SERVER["argv"]

Array
(
)

_SERVER["argc"] 0
_ENV["PWD"] /
_ENV["LANG"] en_US
_ENV["SHLVL"] 1
_ENV["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_ENV["_"] /sbin/initlog

.

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
What is newest versio on PHP tested with SME
« Reply #14 on: July 21, 2004, 04:17:57 PM »
One minor difference is that I have the value:
include_path   .:/usr/share/pear   .:/usr/share/pear

whereas you have
include_path   /usr/share/pear   /usr/share/pear

I additionally have the crucial part that you are missing.

mysql
MySQL Support   enabled
...etc

Directive   Local Value   Master Value
mysql.allow_persistent   On   On
...etc

But I don't know why.

I rebuilt a 6.0.1 test machine, and even with PHP 4.1.2 the MySQL parts were in phpinfo.
Then I upgraded using the script, and the Mysql lines were still there (as above).

So after a fresh install, and after an upgrade I couldn't reproduce the problem. I have not touched anything else on the server php.ini is unedited by me.
............