[PHP-DEV] PHP 4.0 Bug #8834: crypt() starts from not random salt

2001-01-22 Thread muhlig

From: [EMAIL PROTECTED]
Operating system: Solaris 2.4, 2.6
PHP version:  4.0 Latest CVS (22/01/2001)
PHP Bug Type: Strings related
Bug description:  crypt() starts from not random salt

PHP compiled as Apache module. Look like crypt() starts from not random salt. In case 
of my Solaris 2.4, first crypt() call always generates string starting from "IH". In 
case of Solaris 2.6 it always starts from "C.". 

Looks like in every instantiation of new Apache process PHP starts crypt from the same 
salt value.

In the same process next crypt() calls look like they generate random strings, though. 
But next process restarts with the same value.


-- 
Edit Bug report at: http://bugs.php.net/?id=8834&edit=1



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8857: microtime() doesn't work after setlocale(LC_NUMERIC,"pl")

2001-01-23 Thread muhlig

From: [EMAIL PROTECTED]
Operating system: Solaris 2.4
PHP version:  4.0 Latest CVS (23/01/2001)
PHP Bug Type: *Function Specific
Bug description:  microtime() doesn't work after setlocale(LC_NUMERIC,"pl")

the script:

";
echo "B: ", (double)microtime()*100;
?>

the script's output:

A: 773149
B: 0

it works however under Solaris 2.6:

A: 588313
B: 590748

It is possible pl locale for Solaris 2.4 is somehow broken (although it seems 
elsewhere to work). Nevertheless even buggy locale shouldn't prevent other (PHP) 
functions (in consequence it breaks mt_srand and mt_rand) from working.

What is interesting: all locale categories do not produce this effect except 
LC_NUMERIC and LC_ALL.



-- 
Edit Bug report at: http://bugs.php.net/?id=8857&edit=1



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8834 Updated: crypt() starts from not random salt

2001-04-05 Thread muhlig

ID: 8834
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Strings related
Description: crypt() starts from not random salt

here you are:

Solaris 2.4:

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
/* #undef HAVE_RANDOM */
#define HAVE_SRAND48 1
/* #undef HAVE_SRANDOM */
# uname -a
SunOS helios 5.4 Generic_101945-60 sun4d sparc
#

Solaris 2.6

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
#define HAVE_RANDOM 1
#define HAVE_SRAND48 1
#define HAVE_SRANDOM 1
# uname -a
SunOS uranos 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-4
#

unfortunately I'm not able to discuss the solution, although I can test the one 
provided :-)), thank you

Previous Comments:
---

[2001-04-05 14:57:44] [EMAIL PROTECTED]
This is most likely a Solaris specific issue as I can't 
reproduce this on Linux. 
Can you please include the output of this command in both
Solaris 2.4 and 2.6 (in php4):

# grep RAND main/php_config.h

It might be that in both of those system the seed generator
found is srand() which isn't so good as srandom() is.

But I also found (with google :) that srandom() might not be
that good either (in Solaris) so that leaves us with a problem. 

One solution might be that we run php_srand() in RINIT instead of MINIT when Solaris 
is used.

--Jani


---

[2001-01-22 06:05:34] [EMAIL PROTECTED]
PHP compiled as Apache module. Look like crypt() starts from not random salt. In case 
of my Solaris 2.4, first crypt() call always generates string starting from "IH". In 
case of Solaris 2.6 it always starts from "C.". 

Looks like in every instantiation of new Apache process PHP starts crypt from the same 
salt value.

In the same process next crypt() calls look like they generate random strings, though. 
But next process restarts with the same value.

---


Full Bug description available at: http://bugs.php.net/?id=8834


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8834 Updated: crypt() starts from not random salt

2001-04-05 Thread muhlig

ID: 8834
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Strings related
Description: crypt() starts from not random salt

here you are:

Solaris 2.4:

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
/* #undef HAVE_RANDOM */
#define HAVE_SRAND48 1
/* #undef HAVE_SRANDOM */
# uname -a
SunOS helios 5.4 Generic_101945-60 sun4d sparc
#

Solaris 2.6

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
#define HAVE_RANDOM 1
#define HAVE_SRAND48 1
#define HAVE_SRANDOM 1
# uname -a
SunOS uranos 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-4
#

unfortunately I'm not able to discuss the solution, although I can test the one 
provided :-)), thank you

Previous Comments:
---

[2001-04-05 15:14:41] [EMAIL PROTECTED]
here you are:

Solaris 2.4:

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
/* #undef HAVE_RANDOM */
#define HAVE_SRAND48 1
/* #undef HAVE_SRANDOM */
# uname -a
SunOS helios 5.4 Generic_101945-60 sun4d sparc
#

Solaris 2.6

# grep RAND main/php_config.h
#define HAVE_LRAND48 1
#define HAVE_RAND_R 1
#define HAVE_RANDOM 1
#define HAVE_SRAND48 1
#define HAVE_SRANDOM 1
# uname -a
SunOS uranos 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-4
#

unfortunately I'm not able to discuss the solution, although I can test the one 
provided :-)), thank you

---

[2001-04-05 14:57:44] [EMAIL PROTECTED]
This is most likely a Solaris specific issue as I can't 
reproduce this on Linux. 
Can you please include the output of this command in both
Solaris 2.4 and 2.6 (in php4):

# grep RAND main/php_config.h

It might be that in both of those system the seed generator
found is srand() which isn't so good as srandom() is.

But I also found (with google :) that srandom() might not be
that good either (in Solaris) so that leaves us with a problem. 

One solution might be that we run php_srand() in RINIT instead of MINIT when Solaris 
is used.

--Jani


---

[2001-01-22 06:05:34] [EMAIL PROTECTED]
PHP compiled as Apache module. Look like crypt() starts from not random salt. In case 
of my Solaris 2.4, first crypt() call always generates string starting from "IH". In 
case of Solaris 2.6 it always starts from "C.". 

Looks like in every instantiation of new Apache process PHP starts crypt from the same 
salt value.

In the same process next crypt() calls look like they generate random strings, though. 
But next process restarts with the same value.

---


Full Bug description available at: http://bugs.php.net/?id=8834


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14977: iconv library not propagated from PHP to Apache

2002-01-10 Thread muhlig

From: [EMAIL PROTECTED]
Operating system: Solaris 2.6
PHP version:  4.0.6
PHP Bug Type: Compile Failure
Bug description:  iconv library not propagated from PHP to Apache

PHP configure (please note '--with-iconv' presence):

./configure --with-zlib --with-mysql=/usr/local/hackphpmysql
--with-apache=../../apache/apache_1.3.22 --with-ldap=/usr/local/ldap
--enable-track-vars --enable-magic-quotes --enable-bcmath --with-gettext
--with-iconv --with-xml --with-mcrypt
--with-imap=/export/home/cto/software/imap/imap-2001a

making Apache module:

Apache make failure:

gcc  -DSOLARIS2=260 -DMOD_SSL=208105
-I/export/home/cto/software/php/php-4.0.6
-I/export/home/cto/software/php/php-4.0.6/main
-I/export/home/cto/software/php/php-4.0.6/main
-I/export/home/cto/software/php/php-4.0.6/Zend
-I/export/home/cto/software/php/php-4.0.6/Zend
-I/export/home/cto/software/php/php-4.0.6/TSRM
-I/export/home/cto/software/php/php-4.0.6/TSRM
-I/export/home/cto/software/php/php-4.0.6 -DEAPI -DUSE_EXPAT
-I./lib/expat-lite -DNO_DL_NEEDED `./apaci`
-L/software/openssl/openssl-0.9.6c   \
  -o httpd buildmark.o modules.o modules/ssl/libssl.a
modules/php4/libphp4.a modules/standard/libstandard.a main/libmain.a
./os/unix/libos.a ap/libap.a  lib/expat-lite/libexpat.a  -R/usr/ucblib
-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -R/usr/local/lib
-R/export/home/cto/software/imap/imap-2001a/c-client -R/usr/local/ldap/lib
-R/usr/local/hackphpmysql/lib/mysql  -L/usr/ucblib
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -L/usr/local/lib
-L/export/home/cto/software/imap/imap-2001a/c-client -L/usr/local/ldap/lib
-L/usr/local/hackphpmysql/lib/mysql -Lmodules/php4 -L../modules/php4
-L../../modules/php4 -lmodphp4  -lpam -lc-client  -ldl -lmysqlclient -lz
-lmcrypt -lltdl -lldap -llber -lpam -lintl -lz -lcrypt -lresolv -lresolv
-lm -ldl -lnsl -lsocket  -lsocket -lgcc   -lsocket -lnsl  -lssl -lcrypto
Undefined   first referenced
 symbol in file
libiconvmodules/php4/libphp4.a(iconv.o) 
(symbol belongs to implicit dependency /usr/local/lib/libiconv.so.2)
libiconv_open   modules/php4/libphp4.a(iconv.o) 
(symbol belongs to implicit dependency /usr/local/lib/libiconv.so.2)
libiconv_close  modules/php4/libphp4.a(iconv.o) 
(symbol belongs to implicit dependency /usr/local/lib/libiconv.so.2)
ld: fatal: Symbol referencing errors. No output written to httpd
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory
`/export/home/cto/software/apache/apache_1.3.22/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory
`/export/home/cto/software/apache/apache_1.3.22'
make: *** [build] Error 2
# 

It's obvious: '-liconv' is missing from gcc invocation. The workaround fix
is manual edit of Apache src/Makefile, adding -liconv to libraries.

Thank you.

Maciek

-- 
Edit bug report at: http://bugs.php.net/?id=14977&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]