#30539 [Opn]: shell doesnt close the connex after forking a process

2004-10-27 Thread toppi at kacke dot de
 ID:   30539
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Fedora Core 2 Linux
 PHP Version:  5.0.2
 New Comment:

Thanks for the hint lobbin.

i tired the shopt -s huponexit

but Shell says its turned on butdidnt help out tho.


Previous Comments:


[2004-10-26 17:16:27] lobbin at localhost dot nu

I've seen this problem pretty often, it might be related to (open)ssh
and your shell.

More info here:
http://www.openssh.com/faq.html#3.10



[2004-10-24 13:50:41] toppi at kacke dot de

I tired the code by using cli now. Same problem even when i close
STDIN.

Also i tired it, by creating a shutdown_function()

register_shutdown_function(
   create_function('','fclose(STDIN); fclose(STDOUT);
fclose(STDERR); return true;')
);

A test on another system, to make sure its not a os-config thingo,
gives the same result.

Run the code as root (to make sure, its no perm. thing) doesnt help
tho.

The child always post his outputstream ahead tru sshd (but no bash
alive). 

When creating a socket around the child and you just close the
terminal-window to get disconnected from the master, the code chrashes
on connect.



[2004-10-24 06:53:45] [EMAIL PROTECTED]

Use CLI then? Personally I do not think that CGI version is the best
choice for daemons, as it wasn't designed for such purposes.



[2004-10-23 20:28:39] toppi at kacke dot de

Hi Tony,

it doenst work.

STDIN is not defined/open. When i understood the manual correctly, its
only defined when using cli sapi.

I have 
php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)

I tired a lot of things, to kill the stream and getting
disconnected...but nothing helped yet.

When i remember me right, we didnt have that prob @ 4.3.x. but not sure
tho.

I have no clue anymore :)



[2004-10-23 17:40:51] [EMAIL PROTECTED]

fclose(STDIN); after successful fork() call should help you.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30539

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


#30539 [Opn]: shell doesnt close the connex after forking a process

2004-10-27 Thread toppi at kacke dot de
 ID:   30539
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Fedora Core 2 Linux
 PHP Version:  5.0.2
 New Comment:

I forgott... 

a nohup ./testd.php also doesnt do it

seems theres no chance to fork a process when using sshd atm.

I would be very thankful about any workaround or any tip, behavior

Thank you guys

Toppi


Previous Comments:


[2004-10-27 21:15:30] toppi at kacke dot de

Thanks for the hint lobbin.

i tired the shopt -s huponexit

but Shell says its turned on butdidnt help out tho.



[2004-10-26 17:16:27] lobbin at localhost dot nu

I've seen this problem pretty often, it might be related to (open)ssh
and your shell.

More info here:
http://www.openssh.com/faq.html#3.10



[2004-10-24 13:50:41] toppi at kacke dot de

I tired the code by using cli now. Same problem even when i close
STDIN.

Also i tired it, by creating a shutdown_function()

register_shutdown_function(
   create_function('','fclose(STDIN); fclose(STDOUT);
fclose(STDERR); return true;')
);

A test on another system, to make sure its not a os-config thingo,
gives the same result.

Run the code as root (to make sure, its no perm. thing) doesnt help
tho.

The child always post his outputstream ahead tru sshd (but no bash
alive). 

When creating a socket around the child and you just close the
terminal-window to get disconnected from the master, the code chrashes
on connect.



[2004-10-24 06:53:45] [EMAIL PROTECTED]

Use CLI then? Personally I do not think that CGI version is the best
choice for daemons, as it wasn't designed for such purposes.



[2004-10-23 20:28:39] toppi at kacke dot de

Hi Tony,

it doenst work.

STDIN is not defined/open. When i understood the manual correctly, its
only defined when using cli sapi.

I have 
php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)

I tired a lot of things, to kill the stream and getting
disconnected...but nothing helped yet.

When i remember me right, we didnt have that prob @ 4.3.x. but not sure
tho.

I have no clue anymore :)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30539

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


#30539 [Fbk-Opn]: shell doesnt close the connex after forking a process

2004-10-24 Thread toppi at kacke dot de
 ID:   30539
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Fedora Core 2 Linux
 PHP Version:  5.0.2
 New Comment:

I tired the code by using cli now. Same problem even when i close
STDIN.

Also i tired it, by creating a shutdown_function()

register_shutdown_function(
   create_function('','fclose(STDIN); fclose(STDOUT);
fclose(STDERR); return true;')
);

A test on another system, to make sure its not a os-config thingo,
gives the same result.

Run the code as root (to make sure, its no perm. thing) doesnt help
tho.

The child always post his outputstream ahead tru sshd (but no bash
alive). 

When creating a socket around the child and you just close the
terminal-window to get disconnected from the master, the code chrashes
on connect.


Previous Comments:


[2004-10-24 06:53:45] [EMAIL PROTECTED]

Use CLI then? Personally I do not think that CGI version is the best
choice for daemons, as it wasn't designed for such purposes.



[2004-10-23 20:28:39] toppi at kacke dot de

Hi Tony,

it doenst work.

STDIN is not defined/open. When i understood the manual correctly, its
only defined when using cli sapi.

I have 
php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)

I tired a lot of things, to kill the stream and getting
disconnected...but nothing helped yet.

When i remember me right, we didnt have that prob @ 4.3.x. but not sure
tho.

I have no clue anymore :)



[2004-10-23 17:40:51] [EMAIL PROTECTED]

fclose(STDIN); after successful fork() call should help you.



[2004-10-23 15:01:21] toppi at kacke dot de

Description:

After forking a process and setting the child as sessionleader (becomes
deamon) you cant disconnect from the current terminal-session (exit)
solong the child is in process.

After typing exit, the terminal prints the output from the child again.
Youre always connected but no more control

Current Config:

[EMAIL PROTECTED] simon]$ php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies


Reproduce code:
---
#!/usr/local/bin/php -q
?PHP

declare (ticks = 1);
set_time_limit (0);
ob_implicit_flush ();
error_reporting(E_ALL);

if( ($pid = pcntl_fork()) == -1 ) {
echo Error: Cant fork myself ! Dying \n;
}
elseif($pid) {
//PARENT PROCESS
echo Parent-Pid: .getmypid(). quits here\n;
exit(0);
} else {
//CHILD PROCESS
// detatch from the controlling terminal
if (!posix_setsid()) {
die(could not detach from terminal);
}
//Install Signalhandler
pcntl_signal(SIGTERM, sig_handler);
pcntl_signal(SIGCHLD, SIG_IGN);
$i=0;
$childpid = getmypid();

//Do something for testing
while ($i20){
sleep(1);
echo Child-Pid $childpid ist working - type exit to quit your
shell-session -it doesnt close the connex \n;
$i++;
}

echo Just now we get diconnectet from the shell\n;
exit(0);
}

function sig_handler($signo) {
 switch($signo) {
 case SIGTERM:
 exit;
 case SIGCHLD:
 while( pcntl_waitpid(-1,$status,WNOHANG)0 ) { }
 break;
 default:
 break;
 }
}

Expected result:

closing shell (telnet/ssh) and the child doing his background work

Actual result:
--
when starting ./testd.php (above) it looks

7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd
7361 simon 25   0  4396 1340 3948 S  0.0  0.1   0:00.00 bash
7976 simon 16   0 10012 3452 8872 S  0.0  0.3   0:00.00 testd.php

when EXIT the shell
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd ---
left

solong the child repeats 20 times
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd

when the child is done
everthing got closed and the terminal is disconnected





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


#30539 [NEW]: shell doesnt close the connex after forking a process

2004-10-23 Thread toppi at kacke dot de
From: toppi at kacke dot de
Operating system: Fedora Core 2 Linux
PHP version:  5.0.2
PHP Bug Type: *General Issues
Bug description:  shell doesnt close the connex after forking a process

Description:

After forking a process and setting the child as sessionleader (becomes
deamon) you cant disconnect from the current terminal-session (exit)
solong the child is in process.

After typing exit, the terminal prints the output from the child again.
Youre always connected but no more control

Current Config:

[EMAIL PROTECTED] simon]$ php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies


Reproduce code:
---
#!/usr/local/bin/php -q
?PHP

declare (ticks = 1);
set_time_limit (0);
ob_implicit_flush ();
error_reporting(E_ALL);

if( ($pid = pcntl_fork()) == -1 ) {
echo Error: Cant fork myself ! Dying \n;
}
elseif($pid) {
//PARENT PROCESS
echo Parent-Pid: .getmypid(). quits here\n;
exit(0);
} else {
//CHILD PROCESS
// detatch from the controlling terminal
if (!posix_setsid()) {
die(could not detach from terminal);
}
//Install Signalhandler
pcntl_signal(SIGTERM, sig_handler);
pcntl_signal(SIGCHLD, SIG_IGN);
$i=0;
$childpid = getmypid();

//Do something for testing
while ($i20){
sleep(1);
echo Child-Pid $childpid ist working - type exit to quit your
shell-session -it doesnt close the connex \n;
$i++;
}

echo Just now we get diconnectet from the shell\n;
exit(0);
}

function sig_handler($signo) {
 switch($signo) {
 case SIGTERM:
 exit;
 case SIGCHLD:
 while( pcntl_waitpid(-1,$status,WNOHANG)0 ) { }
 break;
 default:
 break;
 }
}

Expected result:

closing shell (telnet/ssh) and the child doing his background work

Actual result:
--
when starting ./testd.php (above) it looks

7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd
7361 simon 25   0  4396 1340 3948 S  0.0  0.1   0:00.00 bash
7976 simon 16   0 10012 3452 8872 S  0.0  0.3   0:00.00 testd.php

when EXIT the shell
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd ---
left

solong the child repeats 20 times
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd

when the child is done
everthing got closed and the terminal is disconnected

-- 
Edit bug report at http://bugs.php.net/?id=30539edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30539r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30539r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30539r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30539r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30539r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30539r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30539r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30539r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30539r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30539r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30539r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30539r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30539r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30539r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30539r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30539r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30539r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30539r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30539r=mysqlcfg


#30539 [Fbk-Opn]: shell doesnt close the connex after forking a process

2004-10-23 Thread toppi at kacke dot de
 ID:   30539
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Fedora Core 2 Linux
 PHP Version:  5.0.2
 New Comment:

Hi Tony,

it doenst work.

STDIN is not defined/open. When i understood the manual correctly, its
only defined when using cli sapi.

I have 
php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)

I tired a lot of things, to kill the stream and getting
disconnected...but nothing helped yet.

When i remember me right, we didnt have that prob @ 4.3.x. but not sure
tho.

I have no clue anymore :)


Previous Comments:


[2004-10-23 17:40:51] [EMAIL PROTECTED]

fclose(STDIN); after successful fork() call should help you.



[2004-10-23 15:01:21] toppi at kacke dot de

Description:

After forking a process and setting the child as sessionleader (becomes
deamon) you cant disconnect from the current terminal-session (exit)
solong the child is in process.

After typing exit, the terminal prints the output from the child again.
Youre always connected but no more control

Current Config:

[EMAIL PROTECTED] simon]$ php -v
PHP 5.0.2 (cgi) (built: Oct 23 2004 14:07:24)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies


Reproduce code:
---
#!/usr/local/bin/php -q
?PHP

declare (ticks = 1);
set_time_limit (0);
ob_implicit_flush ();
error_reporting(E_ALL);

if( ($pid = pcntl_fork()) == -1 ) {
echo Error: Cant fork myself ! Dying \n;
}
elseif($pid) {
//PARENT PROCESS
echo Parent-Pid: .getmypid(). quits here\n;
exit(0);
} else {
//CHILD PROCESS
// detatch from the controlling terminal
if (!posix_setsid()) {
die(could not detach from terminal);
}
//Install Signalhandler
pcntl_signal(SIGTERM, sig_handler);
pcntl_signal(SIGCHLD, SIG_IGN);
$i=0;
$childpid = getmypid();

//Do something for testing
while ($i20){
sleep(1);
echo Child-Pid $childpid ist working - type exit to quit your
shell-session -it doesnt close the connex \n;
$i++;
}

echo Just now we get diconnectet from the shell\n;
exit(0);
}

function sig_handler($signo) {
 switch($signo) {
 case SIGTERM:
 exit;
 case SIGCHLD:
 while( pcntl_waitpid(-1,$status,WNOHANG)0 ) { }
 break;
 default:
 break;
 }
}

Expected result:

closing shell (telnet/ssh) and the child doing his background work

Actual result:
--
when starting ./testd.php (above) it looks

7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd
7361 simon 25   0  4396 1340 3948 S  0.0  0.1   0:00.00 bash
7976 simon 16   0 10012 3452 8872 S  0.0  0.3   0:00.00 testd.php

when EXIT the shell
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd ---
left

solong the child repeats 20 times
7360 simon 15   0  7308 2060 6856 S  0.0  0.2   0:00.00 sshd

when the child is done
everthing got closed and the terminal is disconnected





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


#28754 [Opn]: No TLS / SSL support for FTP

2004-07-22 Thread toppi at kacke dot de
 ID:   28754
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux/unix
 PHP Version:  4.3.4
 New Comment:

Maybe an idea...

What about to add something like SSLv23_client_method() ?
kinda STREAM_get_SSLv23_client() ?

So you could easy add the tls/ssl layer to any FP created by
fsockopen(), fopen() etc... ? Imo would be a kewl thingy to make it
some more flexible.

Also i have no clue if this is possible :) just an idea !

ps.
Wez ... if you feel bored sometimes, please remeber this :-)


Previous Comments:


[2004-07-14 20:12:10] toppi at kacke dot de

And last but not least (hope) the final release of php5 tells me the
same.



[2004-07-14 20:06:36] toppi at kacke dot de

We did the following on a OS: Fedora Core 2 Linux

Version 4.3.8
/configure --prefix=/home/simon/php348
--with-mysql=/usr/local/mysql-4.0.18 --with-zlib --enable-ftp
--with-curl --enable-bcmath  --with-openssl --with-mcrypt --with-mhash
--enable-pcntl --enable-shmop --enable-sockets --enable-sysvmsg
--enable-sysvsem --enable-sysvshm

GIves Error:
bWarning/b:  fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /

error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): php_stream_sock_ssl_activate_with_method:
SSL handshake/connection failed in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): failed to activate SSL mode 2 in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
 failed SSLhandshakebr /

PHP 5 RC3

PHP Warning:  fsockopen() [a
href='function.fsockopen'function.fsockopen/a]: SSL operation failed
with code 1. OpenSSL Error messages:

error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
/home/simon/php348/bin/test.php on line 4



[2004-07-14 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-07-06 16:02:45] [EMAIL PROTECTED]

Please update first to PHP 4.3.7!!



[2004-06-13 12:13:55] toppi at kacke dot de

glftpd 1.3x Linux + TLS



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28754

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


#29248 [NEW]: FTP does not work on glFTPD + TLS

2004-07-18 Thread toppi at kacke dot de
From: toppi at kacke dot de
Operating system: Linux
PHP version:  5.0.0
PHP Bug Type: FTP related
Bug description:  FTP does not work on glFTPD + TLS

Description:

When using ftp_ssl_connect + ftp_login on a glFTPd + TLS 
it connects but all further commands are fail

I expect the portcmds are failing

Used SFTPd glFtpd 1.3 + TLS   


Reproduce code:
---
?
error_reporting(E_ALL);

if(!$conn = ftp_ssl_connect(HOST,PORT,10)){
echo no connex;
exit;
}
if(!ftp_login($conn, USER,PASS)){
echo wrong lp;
exit;
}
echo (ftp_systype($conn)).br;
$path = ftp_pwd($conn);
echo $pathbr;

//until here everthing seems ok


var_dump(ftp_rawlist($conn,$path));
var_dump(ftp_nlist($conn,$path));
var_dump(ftp_raw($conn, CWD $path));
ftp_quit($conn);
exit;

//all this == false
?

Expected result:

one ralist
one nlist
one cwd incomingdir

Actual result:
--
The example above gives:

--
UNIX
/
bool(false)
bool(false) 
array(0) { } 
--


I found the same kind of symptoms when using
fsockopen(tls://.host,port, etc

Already posted at Bug #28754 No TLS / SSL support for FTP were the connect
already fails.

This one above connects, but keep stick.

A glFtpd + TLS support would be really cool cause much in use

Thank you guys ! 

-- 
Edit bug report at http://bugs.php.net/?id=29248edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29248r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29248r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29248r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29248r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29248r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29248r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29248r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29248r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29248r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29248r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29248r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29248r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29248r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29248r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29248r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29248r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29248r=float


#28754 [NoF-Opn]: No TLS / SSL support for FTP

2004-07-14 Thread toppi at kacke dot de
 ID:   28754
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
-Status:   No Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: linux/unix
 PHP Version:  4.3.4
 New Comment:

We did the following on a OS: Fedora Core 2 Linux

Version 4.3.8
/configure --prefix=/home/simon/php348
--with-mysql=/usr/local/mysql-4.0.18 --with-zlib --enable-ftp
--with-curl --enable-bcmath  --with-openssl --with-mcrypt --with-mhash
--enable-pcntl --enable-shmop --enable-sockets --enable-sysvmsg
--enable-sysvsem --enable-sysvshm

GIves Error:
bWarning/b:  fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /

error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): php_stream_sock_ssl_activate_with_method:
SSL handshake/connection failed in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): failed to activate SSL mode 2 in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
 failed SSLhandshakebr /

PHP 5 RC3

PHP Warning:  fsockopen() [a
href='function.fsockopen'function.fsockopen/a]: SSL operation failed
with code 1. OpenSSL Error messages:

error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
/home/simon/php348/bin/test.php on line 4


Previous Comments:


[2004-07-14 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-07-06 16:02:45] [EMAIL PROTECTED]

Please update first to PHP 4.3.7!!



[2004-06-13 12:13:55] toppi at kacke dot de

glftpd 1.3x Linux + TLS



[2004-06-12 16:53:14] [EMAIL PROTECTED]

What sftp server daemon are you using?



[2004-06-12 14:49:38] toppi at kacke dot de

Description:

TLS/SSL Protocols/Wrappers doesnt work when using
fsockopen()


Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages: error:1408F10B:SSL routines:func(143):reason(267) in
/sb3/ftp.inc on line 58

Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL
handshake/connection failed in /sb3/ftp.inc on line 58

Warning: fsockopen(): failed to activate SSL mode 2 in /sb3/ftp.inc on
line 58


also FOPEN() doesnt do that

ftp_ssl_connect is working fine but useless cause no valid stream for
fget() etc

there sould be a way to connect ssl/tls FTP wihout using php's ftp.lib


Reproduce code:
---
just try

$this-_sock = fsockopen(tls://.$server, $port, $errno, $errstr,
$this-timeout);

Expected result:

-Connect to FTP (plain)
-enable wrapper
-get a pointer back








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


#28754 [Opn]: No TLS / SSL support for FTP

2004-07-14 Thread toppi at kacke dot de
 ID:   28754
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux/unix
 PHP Version:  4.3.4
 New Comment:

And last but not least (hope) the final release of php5 tells me the
same.


Previous Comments:


[2004-07-14 20:06:36] toppi at kacke dot de

We did the following on a OS: Fedora Core 2 Linux

Version 4.3.8
/configure --prefix=/home/simon/php348
--with-mysql=/usr/local/mysql-4.0.18 --with-zlib --enable-ftp
--with-curl --enable-bcmath  --with-openssl --with-mcrypt --with-mhash
--enable-pcntl --enable-shmop --enable-sockets --enable-sysvmsg
--enable-sysvsem --enable-sysvshm

GIves Error:
bWarning/b:  fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /

error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): php_stream_sock_ssl_activate_with_method:
SSL handshake/connection failed in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
bWarning/b:  fsockopen(): failed to activate SSL mode 2 in
b/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php/b
on line b4/bbr /
 failed SSLhandshakebr /

PHP 5 RC3

PHP Warning:  fsockopen() [a
href='function.fsockopen'function.fsockopen/a]: SSL operation failed
with code 1. OpenSSL Error messages:

error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
/home/simon/php348/bin/test.php on line 4



[2004-07-14 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-07-06 16:02:45] [EMAIL PROTECTED]

Please update first to PHP 4.3.7!!



[2004-06-13 12:13:55] toppi at kacke dot de

glftpd 1.3x Linux + TLS



[2004-06-12 16:53:14] [EMAIL PROTECTED]

What sftp server daemon are you using?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28754

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


#28854 [Com]: Class and Vars

2004-06-22 Thread Toppi at kacke dot de
 ID:   28854
 Comment by:   Toppi at kacke dot de
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: linux/unix
 PHP Version:  5.0.0RC3
 New Comment:

Hm prolly it is cause 7 is no valid level.
Seems its set to kinda (0) then.
But a fatal error should be displayed tho...

Dunno since years 7 makes me happy :)
Im sorry then !

seems its more a thing of error_reporting()


Previous Comments:


[2004-06-22 12:01:17] toppi at kacke dot de

Yes right.

I figured out, that i used always , until yet, error_reporting(7) as
default error level.

Try

classA.php

?
Class a {

var $ssl;
var $ssl;
var $ssl;

function a (){
$ssl = true;
}
}
?

and 

test.php

?
error_reporting(7);
include classA.php;
echo Hello;
exit;
?

and nothing will happen. NO fatal error, no hello displayed.

Are the error_levels cahnged in php 5 yet ?



[2004-06-21 23:43:42] rodolfo at rodsoft dot org

The correct way to declare the member variables would be: 
var $a. This way, your example would be:
class a
{
   var $a;
   var $b;
   var $a;
}

which would give the correct fatal error:
Fatal error: Cannot redeclare a::$a in /var/www/htdocs/tst.php on line
5



[2004-06-20 16:27:55] toppi at kacke dot de

Description:

Class and Vars

Declare a var twice

Script breaks without error when including

Reproduce code:
---
class a {

var a;
var b;
var a;

function a(){
   //
}
}



Expected result:

any warning/error

Actual result:
--
script ends/break regular @ including-point





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


#28854 [NEW]: Class and Vars

2004-06-20 Thread toppi at kacke dot de
From: toppi at kacke dot de
Operating system: linux/unix
PHP version:  5.0.0RC3
PHP Bug Type: *General Issues
Bug description:  Class and Vars

Description:

Class and Vars

Declare a var twice

Script breaks without error when including

Reproduce code:
---
class a {

var a;
var b;
var a;

function a(){
   //
}
}



Expected result:

any warning/error

Actual result:
--
script ends/break regular @ including-point

-- 
Edit bug report at http://bugs.php.net/?id=28854edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28854r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28854r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28854r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28854r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28854r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28854r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28854r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28854r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28854r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28854r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28854r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28854r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28854r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28854r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28854r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28854r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28854r=float


#28754 [Fbk-Opn]: No TLS / SSL support for FTP

2004-06-13 Thread toppi at kacke dot de
 ID:   28754
 User updated by:  toppi at kacke dot de
 Reported By:  toppi at kacke dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: linux/unix
 PHP Version:  4.3.4
 New Comment:

glftpd 1.3x Linux + TLS


Previous Comments:


[2004-06-12 16:53:14] [EMAIL PROTECTED]

What sftp server daemon are you using?



[2004-06-12 14:49:38] toppi at kacke dot de

Description:

TLS/SSL Protocols/Wrappers doesnt work when using
fsockopen()


Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages: error:1408F10B:SSL routines:func(143):reason(267) in
/sb3/ftp.inc on line 58

Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL
handshake/connection failed in /sb3/ftp.inc on line 58

Warning: fsockopen(): failed to activate SSL mode 2 in /sb3/ftp.inc on
line 58


also FOPEN() doesnt do that

ftp_ssl_connect is working fine but useless cause no valid stream for
fget() etc

there sould be a way to connect ssl/tls FTP wihout using php's ftp.lib


Reproduce code:
---
just try

$this-_sock = fsockopen(tls://.$server, $port, $errno, $errstr,
$this-timeout);

Expected result:

-Connect to FTP (plain)
-enable wrapper
-get a pointer back








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


#28754 [NEW]: No TLS / SSL support for FTP

2004-06-12 Thread toppi at kacke dot de
From: toppi at kacke dot de
Operating system: linux/unix
PHP version:  4.3.4
PHP Bug Type: Sockets related
Bug description:  No TLS / SSL support for FTP

Description:

TLS/SSL Protocols/Wrappers doesnt work when using
fsockopen()


Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages: error:1408F10B:SSL routines:func(143):reason(267) in
/sb3/ftp.inc on line 58

Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL
handshake/connection failed in /sb3/ftp.inc on line 58

Warning: fsockopen(): failed to activate SSL mode 2 in /sb3/ftp.inc on
line 58


also FOPEN() doesnt do that

ftp_ssl_connect is working fine but useless cause no valid stream for
fget() etc

there sould be a way to connect ssl/tls FTP wihout using php's ftp.lib


Reproduce code:
---
just try

$this-_sock = fsockopen(tls://.$server, $port, $errno, $errstr,
$this-timeout);

Expected result:

-Connect to FTP (plain)
-enable wrapper
-get a pointer back




-- 
Edit bug report at http://bugs.php.net/?id=28754edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28754r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28754r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28754r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28754r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28754r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28754r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28754r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28754r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28754r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28754r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28754r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28754r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28754r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28754r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28754r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28754r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28754r=float


#21642 [Bgs-Opn]: fsockopen() tls doenst work with tlsftp's

2003-01-15 Thread toppi
 ID:  21642
 User updated by: [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Bogus
+Status:  Open
 Bug Type:Sockets related
 PHP Version: 4.3.0
 New Comment:

TLS becomes more a standard instead of FTP.

I cant recognize the reason why fsockopen() doesnt handle tls/ssl
similare to fopen().

Why not starting (like fopen() it does) in clear mode, then switch to
tls/ssl if this all is FLASE return fail ?

Atm i have to run a TLSwrapper in background to connect FTP+TLS cause
fsock yes but ssl...

The use of Curl or fopen instead ? Sounds a bit crazy for me tho :)

A Create a socket function should handle all streams.

Im looking forward to fsockopen supports ftp+tls :)

Greetings
Toppi


Previous Comments:


[2003-01-14 16:41:05] [EMAIL PROTECTED]

this is expected behaviour; fsockopen(tls://) opens the socket with
TLS turned on.
By default, TLS-enabled ftp servers start in the clear - with crypto
turned off.

If you want to use TLS over ftp, consider using fopen(ftps://)
instead (which will attempt TLS negotiation according to the relevant
rfcs), or if that is not sufficient, try using the curl functions.




[2003-01-14 16:28:29] [EMAIL PROTECTED]

Trying to tls://ftp_ip:port ... 

Warning: fsockopen() [function.fsockopen]:
php_stream_sock_ssl_activate_with_method: SSL handshake/connection
failed in ftpclass.php on line 204

Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode
2 in ftpclass.php on line 204

The TLS SERVER replies tru fread() at least :

UK (glftpd 1.28_Linux+TLS) ready.
500 '': Command not understood.

I would expect when using a tls-prefix its working similare to
ftp_ssl_connect (what is working fine but not needed cause no
filepointer back).

No chance in php to connect ftp+tls tru fsock which is needed if you
need a filepointer back to use fread/write etc.

Greetings

Toppi 





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




#21642 [Opn]: fsockopen() tls doenst work with tlsftp's

2003-01-15 Thread toppi
 ID:  21642
 User updated by: [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:Sockets related
 PHP Version: 4.3.0
 New Comment:

Just info when using fopen();

it retruns

Warning: fopen(ftps://...@ip:port) [function.fopen]: failed to create
stream: Operation not permitted in .


Previous Comments:


[2003-01-15 05:12:21] [EMAIL PROTECTED]

TLS becomes more a standard instead of FTP.

I cant recognize the reason why fsockopen() doesnt handle tls/ssl
similare to fopen().

Why not starting (like fopen() it does) in clear mode, then switch to
tls/ssl if this all is FLASE return fail ?

Atm i have to run a TLSwrapper in background to connect FTP+TLS cause
fsock yes but ssl...

The use of Curl or fopen instead ? Sounds a bit crazy for me tho :)

A Create a socket function should handle all streams.

Im looking forward to fsockopen supports ftp+tls :)

Greetings
Toppi



[2003-01-14 16:41:05] [EMAIL PROTECTED]

this is expected behaviour; fsockopen(tls://) opens the socket with
TLS turned on.
By default, TLS-enabled ftp servers start in the clear - with crypto
turned off.

If you want to use TLS over ftp, consider using fopen(ftps://)
instead (which will attempt TLS negotiation according to the relevant
rfcs), or if that is not sufficient, try using the curl functions.




[2003-01-14 16:28:29] [EMAIL PROTECTED]

Trying to tls://ftp_ip:port ... 

Warning: fsockopen() [function.fsockopen]:
php_stream_sock_ssl_activate_with_method: SSL handshake/connection
failed in ftpclass.php on line 204

Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode
2 in ftpclass.php on line 204

The TLS SERVER replies tru fread() at least :

UK (glftpd 1.28_Linux+TLS) ready.
500 '': Command not understood.

I would expect when using a tls-prefix its working similare to
ftp_ssl_connect (what is working fine but not needed cause no
filepointer back).

No chance in php to connect ftp+tls tru fsock which is needed if you
need a filepointer back to use fread/write etc.

Greetings

Toppi 





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




#21642 [Bgs]: fsockopen() tls doenst work with tlsftp's

2003-01-15 Thread toppi
 ID:  21642
 User updated by: [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Bogus
 Bug Type:Sockets related
 PHP Version: 4.3.0
 New Comment:

Hi Wez,

i know this prolly no faq here but im sticky since days on it and i
didnt get help anywhere yet, so excuse my last question in this thread
please.

example:

?PHP

$sock = fsockopen($server, $port, $errno, $errstr, timeout);
fgets($sock);
if TLS then {
frwite (ftp, AUTH, TLS))

//to use php_stream_api or streams and options
//and swtich into ssl mode ? like php.ftp it does ?

// ctx = SSL_CTX_new(SSLv23_client_method()); ?

//or a simple stream wrapper from php

frwite(ftp, PBSZ)
.
...and so on.
}
?


a simple yes or no from your side would be enough, so
ill try to figure it out by myself.

Maybe theres something easie php-trick i dont know,
to solve this problem.

Also theres no help available on the web to it.

Im sorry to waste your time in here , but its realy importand to
realize it in php.


Toppi


Previous Comments:


[2003-01-15 07:23:13] [EMAIL PROTECTED]

fsockopen is intended to open *only* a raw socket and not implement
some protocol level stuff - that is what the URL wrappers are for in
fopen().
Please try one of the alternative methods for working with secure ftp.
If you find a problem with those, then open a new bug report.



[2003-01-15 05:51:31] [EMAIL PROTECTED]

Please add rfc2228 handle to fsockopen(); 

:-)



[2003-01-15 05:41:13] [EMAIL PROTECTED]

Just info when using fopen();

it retruns

Warning: fopen(ftps://...@ip:port) [function.fopen]: failed to create
stream: Operation not permitted in .



[2003-01-15 05:12:21] [EMAIL PROTECTED]

TLS becomes more a standard instead of FTP.

I cant recognize the reason why fsockopen() doesnt handle tls/ssl
similare to fopen().

Why not starting (like fopen() it does) in clear mode, then switch to
tls/ssl if this all is FLASE return fail ?

Atm i have to run a TLSwrapper in background to connect FTP+TLS cause
fsock yes but ssl...

The use of Curl or fopen instead ? Sounds a bit crazy for me tho :)

A Create a socket function should handle all streams.

Im looking forward to fsockopen supports ftp+tls :)

Greetings
Toppi



[2003-01-14 16:41:05] [EMAIL PROTECTED]

this is expected behaviour; fsockopen(tls://) opens the socket with
TLS turned on.
By default, TLS-enabled ftp servers start in the clear - with crypto
turned off.

If you want to use TLS over ftp, consider using fopen(ftps://)
instead (which will attempt TLS negotiation according to the relevant
rfcs), or if that is not sufficient, try using the curl functions.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21642

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




#21642 [NEW]: fsockopen() tls doenst work with tlsftp's

2003-01-14 Thread toppi
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.3.0
PHP Bug Type: Sockets related
Bug description:  fsockopen() tls doenst work with tlsftp's

Trying to tls://ftp_ip:port ... 

Warning: fsockopen() [function.fsockopen]:
php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed
in ftpclass.php on line 204

Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode 2
in ftpclass.php on line 204

The TLS SERVER replies tru fread() at least :

UK (glftpd 1.28_Linux+TLS) ready.
500 '': Command not understood.

I would expect when using a tls-prefix its working similare to
ftp_ssl_connect (what is working fine but not needed cause no filepointer
back).

No chance in php to connect ftp+tls tru fsock which is needed if you need
a filepointer back to use fread/write etc.

Greetings

Toppi 

-- 
Edit bug report at http://bugs.php.net/?id=21642edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21642r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21642r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21642r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21642r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21642r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21642r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21642r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21642r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21642r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21642r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21642r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21642r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21642r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21642r=gnused