Bug #53646 [Com]: Brackets being replaced with hash

2011-01-04 Thread phil dot allen at internode dot on dot net
Edit report at http://bugs.php.net/bug.php?id=53646edit=1

 ID: 53646
 Comment by: phil dot allen at internode dot on dot net
 Reported by:phil dot allen at internode dot on dot net
 Summary:Brackets being replaced with hash
 Status: Bogus
 Type:   Bug
 Package:Strings related
 Operating System:   Win x64
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

After further investigation it appears that Microsoft is the culprit. 
The code was being run in a popup window created by a javascript call to
window.open(). Internet Explorer was then modifying the output of teh
page to 'prevent cross-site scripting'.


Previous Comments:

[2011-01-04 07:44:02] ras...@php.net

There is no chance this is PHP doing that.  You must have something else
going on 

here.


[2011-01-04 07:41:55] phil dot allen at internode dot on dot net

Description:

When concatenating two strings, brackets are being replaced by hashes
(#).

Test script:
---
$data1 = '\'2011-1-1';

$data2 = '\' AS DATE)|CAST(';

echo $data1 . $data2;

Expected result:

'2011-1-1' AS DATE)|CAST( 

Actual result:
--
'2011-1-1' AS DATE#|CAST# 






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


[PHP-BUG] Bug #53646 [NEW]: Brackets being replaced with hash

2011-01-03 Thread phil dot allen at internode dot on dot net
From: 
Operating system: Win x64
PHP version:  5.3.4
Package:  Strings related
Bug Type: Bug
Bug description:Brackets being replaced with hash

Description:

When concatenating two strings, brackets are being replaced by hashes (#).

Test script:
---
$data1 = '\'2011-1-1';

$data2 = '\' AS DATE)|CAST(';

echo $data1 . $data2;

Expected result:

'2011-1-1' AS DATE)|CAST( 

Actual result:
--
'2011-1-1' AS DATE#|CAST# 

-- 
Edit bug report at http://bugs.php.net/bug.php?id=53646edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53646r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53646r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=53646r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53646r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53646r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53646r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=53646r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=53646r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=53646r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=53646r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=53646r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=53646r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=53646r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53646r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=53646r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=53646r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=53646r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=53646r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=53646r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=53646r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=53646r=mysqlcfg



#50772 [NEW]: mysqli constructor without parameters does not return a working mysqli object

2010-01-15 Thread elmo dot allen at iki dot fi
From: elmo dot allen at iki dot fi
Operating system: Windows 7
PHP version:  5.3.1
PHP Bug Type: MySQLi related
Bug description:  mysqli constructor without parameters does not return a 
working mysqli object

Description:

Documentation states that calling mysqli::__construct() without parameters
(i.e. new mysqli()) should do the same as calling mysqli_init(). It does
not, however, return a working mysqli object, but all the following calls
to its methods only return Warning Couldn't fetch mysqli.

Using mysqli_init() directly works as intended, but using it makes making
derived mysqli classes much harder, if trying to use real_connect(),
because derived classes can only call their parent's constructor, not
mysqli_init().

The following code is by design trying a connection and failing (with
MySQL server not running) and gracefully admitting it with an error message
(warnings not tried to be silenced here).

Not working in PHP 5.2.8 either. No newer snapshots for Windows seem to be
available.

Reproduce code:
---
?php

// Does not return a working object
$db1 = new mysqli();

// These calls fail
$db1-options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
$db1-real_connect(localhost);
if(mysqli_connect_error()) echo error 1;
else echo ok 1;

// This works
$db2 = mysqli_init();

// And these calls work as intended (give correct error msgs when
connection fails)
$db2-options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
$db2-real_connect(localhost);
if(mysqli_connect_error()) echo error 2;
else echo ok 2;

?

Expected result:

Warning:  mysqli::real_connect() [mysqli.real-connect]: [2002] A
connection attempt failed because the connected party did not  (trying to
connect via tcp://localhost:3306) in C:\Users\Elmo\Documents\Web
server\test.php on line 7



Warning:  mysqli::real_connect() [mysqli.real-connect]: (HY000/2002): A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.
 in C:\Users\Elmo\Documents\Web server\test.php on line 7

error 1

Warning:  mysqli::real_connect() [mysqli.real-connect]: [2002] A
connection attempt failed because the connected party did not  (trying to
connect via tcp://localhost:3306) in C:\Users\Elmo\Documents\Web
server\test.php on line 13



Warning:  mysqli::real_connect() [mysqli.real-connect]: (HY000/2002): A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.
 in C:\Users\Elmo\Documents\Web server\test.php on line 13

error 2


Actual result:
--
Warning:  mysqli::options() [mysqli.options]: Couldn't fetch mysqli in
C:\Users\Elmo\Documents\Web server\test.php on line 6



Warning:  mysqli::real_connect() [mysqli.real-connect]: Couldn't fetch
mysqli in C:\Users\Elmo\Documents\Web server\test.php on line 7

ok 1

Warning:  mysqli::real_connect() [mysqli.real-connect]: [2002] A
connection attempt failed because the connected party did not  (trying to
connect via tcp://localhost:3306) in C:\Users\Elmo\Documents\Web
server\test.php on line 13



Warning:  mysqli::real_connect() [mysqli.real-connect]: (HY000/2002): A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.
 in C:\Users\Elmo\Documents\Web server\test.php on line 13

error 2


-- 
Edit bug report at http://bugs.php.net/?id=50772edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50772r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50772r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50772r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50772r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50772r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50772r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50772r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50772r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50772r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50772r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50772r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50772r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50772r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50772r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50772r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50772r=dst
IIS

#44525 [NEW]: extensions.membership.html invalid file name

2008-03-24 Thread allen dot brumley at allenscomputers dot org
From: allen dot brumley at allenscomputers dot org
Operating system: Debian
PHP version:  5.2.5
PHP Bug Type: Filesystem function related
Bug description:  extensions.membership.html invalid file name

Description:

I am an end user.  This report is based on my Service Provider's
information from today.  I have the transcript of the conversation if you
need it.

Server reports that any file named *.membership.html is an illegal file
name.

My service provider StartLogic.com says that this is a php error that they
can not fix.

http://startlogic.com -- [EMAIL PROTECTED]

Actual php version on the server is 5.2.2

Platform Type 
Debian 
 
MySQL Version 
5.0.45 
 
Perl Version 
5.8.8 
 
PHP Version 
5.2.2 

If this is not a php error please advise me so that I can return to
startlogic.com for further advise.

Reproduce code:
---
any attempt to ftp or upload via the control panel (VDeck 3.0) gives a 550
error.



Expected result:

I would expect the file to upload to the server

Actual result:
--
550 extensions.membership.html: Forbidden command argument


-- 
Edit bug report at http://bugs.php.net/?id=44525edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44525r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44525r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44525r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44525r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44525r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44525r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44525r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44525r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44525r=support
Expected behavior:http://bugs.php.net/fix.php?id=44525r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44525r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44525r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44525r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44525r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44525r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44525r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44525r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44525r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44525r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44525r=mysqlcfg



#44525 [Opn]: extensions.membership.html invalid file name

2008-03-24 Thread allen dot brumley at allenscomputers dot org
 ID:   44525
 User updated by:  allen dot brumley at allenscomputers dot org
 Reported By:  allen dot brumley at allenscomputers dot org
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Debian
 PHP Version:  5.2.5
 New Comment:

error on the email address for startlogic.com support.  Correct email
is [EMAIL PROTECTED]


Previous Comments:


[2008-03-24 23:56:38] allen dot brumley at allenscomputers dot org

Description:

I am an end user.  This report is based on my Service Provider's
information from today.  I have the transcript of the conversation if
you need it.

Server reports that any file named *.membership.html is an illegal
file name.

My service provider StartLogic.com says that this is a php error that
they can not fix.

http://startlogic.com -- [EMAIL PROTECTED]

Actual php version on the server is 5.2.2

Platform Type 
Debian 
 
MySQL Version 
5.0.45 
 
Perl Version 
5.8.8 
 
PHP Version 
5.2.2 

If this is not a php error please advise me so that I can return to
startlogic.com for further advise.

Reproduce code:
---
any attempt to ftp or upload via the control panel (VDeck 3.0) gives a
550 error.



Expected result:

I would expect the file to upload to the server

Actual result:
--
550 extensions.membership.html: Forbidden command argument






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



#44407 [NEW]: When using FETCH_CLASS|CLASS_TYPE 'MyClass' an array of stdClass returned

2008-03-11 Thread robert dot allen at zircote dot com
From: robert dot allen at zircote dot com
Operating system: Windows XP
PHP version:  5.2.5
PHP Bug Type: PDO related
Bug description:  When using FETCH_CLASS|CLASS_TYPE  'MyClass' an array of 
stdClass returned

Description:

Windows XP / PHP 5.2.5 / PDO_ODBC

When setFetchMode is called with FETCH_CLASS and the Object type specified
the Object type is returned as stdClass in the array for fetchAll() however
for fetch() returns the expected result of the defined object.




Reproduce code:
---
$stmt-setFetchMode(PDO :: FETCH_CLASS | PDO :: FETCH_CLASSTYPE,
'MyClass');
$stmt-execute();
$all = $stmt-fetchAll();



Expected result:

return:
Array ( [0] = MyClass Object (.

Actual result:
--
return:
Array ( [0] = stdClass Object (.

-- 
Edit bug report at http://bugs.php.net/?id=44407edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44407r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44407r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44407r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44407r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44407r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44407r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44407r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44407r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44407r=support
Expected behavior:http://bugs.php.net/fix.php?id=44407r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44407r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44407r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44407r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44407r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44407r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44407r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44407r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44407r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44407r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44407r=mysqlcfg



#40869 [NEW]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
From: robert dot allen at unearthtravel dot com
Operating system: 
PHP version:  5.2.1
PHP Bug Type: MySQL related
Bug description:  Mysql gives incorrect result, using subqueries and variables

Description:

Hi

We are getting an odd result when submitting a query to a mysql server
(4.1.10), we get a different result when performing the query through php
(an incorrect result) as opposed to straight in to a mysql client.

It seems to have performed the sub-query twice, so the variable @j has
been incremented twice.

A simplified version of our code is shown below and reproduces the
problem, I have also included a sample table.  I have seen it on both
windows and linux.

Reproduce code:
---
mysql_query(SET @j=0;);
$sql = select offset from (select @j:[EMAIL PROTECTED] as offset,
if(element_id=2,1,0) as result from element) as t1 WHERE t1.result=1 ;
$result = mysql_query($sql);
$row = mysql_fetch_row($result);
echo $row[0];


/**DATABASE/

CREATE TABLE `element` (
  `element_id` int(10) unsigned NOT NULL auto_increment,
  `element_type_id` int(10) unsigned NOT NULL default '0',
  `lock_level` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`element_id`),
  KEY `new_index` (`element_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `element` */

insert  into `element`(`element_id`,`element_type_id`,`lock_level`) values
(1,1,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`) values
(2,10,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`) values
(3,2,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`) values
(4,10,1);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`) values
(5,2,0);


Expected result:

2

Actual result:
--
7

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


#40869 [Fbk-Opn]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
 ID:  40869
 User updated by: robert dot allen at unearthtravel dot com
 Reported By: robert dot allen at unearthtravel dot com
-Status:  Feedback
+Status:  Open
 Bug Type:MySQL related
 PHP Version: 5.2.1
 New Comment:

To be honest I am not sure how to do this, I have tried it on an xampp
bundle though and so presume they would have linked them correctly.  I
have also tried on our hosted managed server and get the same result in
both places.

Thanks for your help

Rob


Previous Comments:


[2007-03-20 17:45:35] [EMAIL PROTECTED]

Make sure PHP is linked with the correct libmysql, it should be of the
same version as the server.



[2007-03-20 17:40:43] robert dot allen at unearthtravel dot com

Description:

Hi

We are getting an odd result when submitting a query to a mysql server
(4.1.10), we get a different result when performing the query through
php (an incorrect result) as opposed to straight in to a mysql client.

It seems to have performed the sub-query twice, so the variable @j has
been incremented twice.

A simplified version of our code is shown below and reproduces the
problem, I have also included a sample table.  I have seen it on both
windows and linux.

Reproduce code:
---
mysql_query(SET @j=0;);
$sql = select offset from (select @j:[EMAIL PROTECTED] as offset,
if(element_id=2,1,0) as result from element) as t1 WHERE t1.result=1 ;
$result = mysql_query($sql);
$row = mysql_fetch_row($result);
echo $row[0];


/**DATABASE/

CREATE TABLE `element` (
  `element_id` int(10) unsigned NOT NULL auto_increment,
  `element_type_id` int(10) unsigned NOT NULL default '0',
  `lock_level` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`element_id`),
  KEY `new_index` (`element_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `element` */

insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (1,1,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (2,10,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (3,2,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (4,10,1);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (5,2,0);


Expected result:

2

Actual result:
--
7





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


#40869 [Fbk-Opn]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
 ID:  40869
 User updated by: robert dot allen at unearthtravel dot com
 Reported By: robert dot allen at unearthtravel dot com
-Status:  Feedback
+Status:  Open
 Bug Type:MySQL related
 PHP Version: 5.2.1
 New Comment:

The xampp bundle was installed on windows xp, our hosted server is a
linux system


Previous Comments:


[2007-03-20 18:12:10] [EMAIL PROTECTED]

Which OS is that?



[2007-03-20 18:07:52] robert dot allen at unearthtravel dot com

To be honest I am not sure how to do this, I have tried it on an xampp
bundle though and so presume they would have linked them correctly.  I
have also tried on our hosted managed server and get the same result in
both places.

Thanks for your help

Rob



[2007-03-20 17:45:35] [EMAIL PROTECTED]

Make sure PHP is linked with the correct libmysql, it should be of the
same version as the server.



[2007-03-20 17:40:43] robert dot allen at unearthtravel dot com

Description:

Hi

We are getting an odd result when submitting a query to a mysql server
(4.1.10), we get a different result when performing the query through
php (an incorrect result) as opposed to straight in to a mysql client.

It seems to have performed the sub-query twice, so the variable @j has
been incremented twice.

A simplified version of our code is shown below and reproduces the
problem, I have also included a sample table.  I have seen it on both
windows and linux.

Reproduce code:
---
mysql_query(SET @j=0;);
$sql = select offset from (select @j:[EMAIL PROTECTED] as offset,
if(element_id=2,1,0) as result from element) as t1 WHERE t1.result=1 ;
$result = mysql_query($sql);
$row = mysql_fetch_row($result);
echo $row[0];


/**DATABASE/

CREATE TABLE `element` (
  `element_id` int(10) unsigned NOT NULL auto_increment,
  `element_type_id` int(10) unsigned NOT NULL default '0',
  `lock_level` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`element_id`),
  KEY `new_index` (`element_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `element` */

insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (1,1,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (2,10,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (3,2,0);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (4,10,1);
insert  into `element`(`element_id`,`element_type_id`,`lock_level`)
values (5,2,0);


Expected result:

2

Actual result:
--
7





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


#40869 [Fbk-Opn]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
 ID:  40869
 User updated by: robert dot allen at unearthtravel dot com
 Reported By: robert dot allen at unearthtravel dot com
-Status:  Feedback
+Status:  Open
 Bug Type:MySQL related
 PHP Version: 5.2.1
 New Comment:

the  select version() query gave:
5.0.33

I am also using those dlls now

Thanks


Previous Comments:


[2007-03-20 18:25:16] [EMAIL PROTECTED]

And try php_mysql.dll from here:
http://dev.mysql.com/downloads/connector/php/



[2007-03-20 18:23:52] [EMAIL PROTECTED]

Run select version() on the server



[2007-03-20 18:15:52] robert dot allen at unearthtravel dot com

The xampp bundle was installed on windows xp, our hosted server is a
linux system



[2007-03-20 18:12:10] [EMAIL PROTECTED]

Which OS is that?



[2007-03-20 18:07:52] robert dot allen at unearthtravel dot com

To be honest I am not sure how to do this, I have tried it on an xampp
bundle though and so presume they would have linked them correctly.  I
have also tried on our hosted managed server and get the same result in
both places.

Thanks for your help

Rob



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/40869

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


#40869 [Bgs]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
 ID:  40869
 User updated by: robert dot allen at unearthtravel dot com
 Reported By: robert dot allen at unearthtravel dot com
 Status:  Bogus
 Bug Type:MySQL related
 PHP Version: 5.2.1
 New Comment:

The reason I reported it to php was due to the fact I get a different
result when executing it via php than a simple command line client.  

I presume you believe it to be a problem in the mysql dll's and
therefore their bug?

Thanks once again

Rob


Previous Comments:


[2007-03-20 18:45:13] [EMAIL PROTECTED]

Please report it to MySQL people.



[2007-03-20 18:40:49] robert dot allen at unearthtravel dot com

the  select version() query gave:
5.0.33

I am also using those dlls now

Thanks



[2007-03-20 18:25:16] [EMAIL PROTECTED]

And try php_mysql.dll from here:
http://dev.mysql.com/downloads/connector/php/



[2007-03-20 18:23:52] [EMAIL PROTECTED]

Run select version() on the server



[2007-03-20 18:15:52] robert dot allen at unearthtravel dot com

The xampp bundle was installed on windows xp, our hosted server is a
linux system



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/40869

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


#40869 [Bgs]: Mysql gives incorrect result, using subqueries and variables

2007-03-20 Thread robert dot allen at unearthtravel dot com
 ID:  40869
 User updated by: robert dot allen at unearthtravel dot com
 Reported By: robert dot allen at unearthtravel dot com
 Status:  Bogus
 Bug Type:MySQL related
 PHP Version: 5.2.1
 New Comment:

Hey

I have been playing with this some more and have found out that the
query returns the results I would expect if run through the mysqli
extension. I'm not sure if this gives you any further information as to
where the problem is but thought I would let you know in case it
indicates the problem is within php.

Thanks again

Rob


Previous Comments:


[2007-03-20 18:56:08] [EMAIL PROTECTED]

Your PHP uses mysql client libraries of different version, so I believe
it's some kind of client/server incompatibility.



[2007-03-20 18:50:42] robert dot allen at unearthtravel dot com

The reason I reported it to php was due to the fact I get a different
result when executing it via php than a simple command line client.  

I presume you believe it to be a problem in the mysql dll's and
therefore their bug?

Thanks once again

Rob



[2007-03-20 18:45:13] [EMAIL PROTECTED]

Please report it to MySQL people.



[2007-03-20 18:40:49] robert dot allen at unearthtravel dot com

the  select version() query gave:
5.0.33

I am also using those dlls now

Thanks



[2007-03-20 18:25:16] [EMAIL PROTECTED]

And try php_mysql.dll from here:
http://dev.mysql.com/downloads/connector/php/



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/40869

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


#39408 [NEW]: the Implements keyword

2006-11-06 Thread allen dot arbeau at gmail dot com
From: allen dot arbeau at gmail dot com
Operating system: Windows XP
PHP version:  5.2.0
PHP Bug Type: Class/Object related
Bug description:  the Implements keyword

Description:

I am using PHP 5.2.0, Dreamweaver 8 and IE 7. I receive an error on the
webpage pointing to my TextBox class (line 5) when I attempt to use the
keyword implements in that class.

Reproduce code:
---
(The line numbers are for reference only and are not actually in the
class.)

--Element.php
1 ?php
2   interface Element 
3   {
4   public function getUID(); //signature
5   }
6 ?
-



--TextBox.php
1 ?php
2
3   require_once 'Element.php';
4   
5   class TextBox implements Element
6   {
7  public function getUID()
8   { //implementation }
9  }
10 ?
-





Expected result:

I expect the application to recognize the keyword implements as a valid
keyword. In the case of Dreamweaver it should color code the word
interface as a keyword but it does not which suggests it does not
recognize implements as a valid keyword such as extends or class.

Actual result:
--
I get the error: 

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in
subscribers_kiosk/baseclass/TextBox.php on line 5

on the webpage when I try to include the TextBox.php page into any other
php page.


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


#36059 [Bgs]: change in $_GET behavior

2006-01-18 Thread allen dot montz at ipayx dot com
 ID:   36059
 User updated by:  allen dot montz at ipayx dot com
 Reported By:  allen dot montz at ipayx dot com
 Status:   Bogus
 Bug Type: *Web Server problem
 Operating System: Linux ES 4
 PHP Version:  5.1.2
 New Comment:

hmm ok. Maybe Apache changed.


Previous Comments:


[2006-01-17 21:03:44] [EMAIL PROTECTED]

No such change has been done. You're doing something wrong.



[2006-01-17 20:52:17] allen dot montz at ipayx dot com

Description:

Until PHP 5.0.5 with magic_quotes = OFF we preserved '+' characters in
$_GET variables. Since PHP 5.1.1 it appears that $_GET is automatically
urlencoded and in order to recover '+' we need to urldecode and
ereg_replace(' ', '+', ...). If this is new standard behavior please
provide me with reference on when this change has taken place and the
reason behind it.






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


#36059 [Bgs]: change in $_GET behavior

2006-01-18 Thread allen dot montz at ipayx dot com
 ID:   36059
 User updated by:  allen dot montz at ipayx dot com
 Reported By:  allen dot montz at ipayx dot com
 Status:   Bogus
 Bug Type: *Web Server problem
 Operating System: Linux ES 4
 PHP Version:  5.1.2
 New Comment:

One more question: are GET's automatically urlencoded or not? I'm not
sure if our 'fix' is a good or bad idea, although it seems to work now.


Previous Comments:


[2006-01-18 15:48:25] allen dot montz at ipayx dot com

hmm ok. Maybe Apache changed.



[2006-01-17 21:03:44] [EMAIL PROTECTED]

No such change has been done. You're doing something wrong.



[2006-01-17 20:52:17] allen dot montz at ipayx dot com

Description:

Until PHP 5.0.5 with magic_quotes = OFF we preserved '+' characters in
$_GET variables. Since PHP 5.1.1 it appears that $_GET is automatically
urlencoded and in order to recover '+' we need to urldecode and
ereg_replace(' ', '+', ...). If this is new standard behavior please
provide me with reference on when this change has taken place and the
reason behind it.






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


#36059 [NEW]: change in $_GET behavior

2006-01-17 Thread allen dot montz at ipayx dot com
From: allen dot montz at ipayx dot com
Operating system: Linux ES 4
PHP version:  5.1.2
PHP Bug Type: *Web Server problem
Bug description:  change in $_GET behavior

Description:

Until PHP 5.0.5 with magic_quotes = OFF we preserved '+' characters in
$_GET variables. Since PHP 5.1.1 it appears that $_GET is automatically
urlencoded and in order to recover '+' we need to urldecode and
ereg_replace(' ', '+', ...). If this is new standard behavior please
provide me with reference on when this change has taken place and the
reason behind it.


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


#33192 [Fbk-Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-03 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

my testing server is 
openssl s_server -accept port -cert sec.pem -Verify 1

and my actual server was first set up to accept only tls, I changed it
during testing to accept all three hoping that the problem was me being
too strict

I have tried tls:// ssl:// and sslv3:// -- they all return the same
error 

sslv2: returns no actual SSL error on the client, just the warnings
about failed to enable crypto and unable to connect
and returns 
12058:error:140710CA:SSL routines:REQUEST_CERTIFICATE:peer error no
certificate:s2_pkt.c:675:
from the server -- same error but for the sslv2 functions

I tried adding -tls1 to the end of my openssl s_server but that didn't
make any difference in what happened.

I'm actually pretty sure that tls uses the sslv3 handshake functions.


Previous Comments:


[2005-06-03 07:12:39] [EMAIL PROTECTED]

Looks to me like you want to be using sslv3:// instead of tls:// there
(just based on your server output).
Use ssl:// for automatic v2 or v3 support.  Only use tls:// when the
server can only speak tls; it's a different dialect of SSL.

The context options for openssl, including tls, are all bundled under
the name ssl.

I think your code should probably look more like this:

$c = stream_context_create(array(
   ssl = array(
   local_cert = sec.pem,
   ... other options ...
   )
);
$s = stream_socket_client(sslv3://., ., $c);





[2005-06-03 02:54:18] justin dot d dot allen at gmail dot com

so I added php_error_docref displays to the certfile and passphrase
GET_VER_OPT sections of php_SSL_new_from_context and recieved no
display from either.

It seems that the variables aren't getting parsed, but truthfuly, I'm
hacking with very broad swings on that one... and, I haven't at all
looked at the inner workings of the GET_VER_OPT macro.



[2005-06-02 20:48:27] justin dot d dot allen at gmail dot com

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.



[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the methods and if I take out the
SSL_set_connect_state() and switch the method to TSLv1_client_method()
I get the errors out of C... so it looks like it's in my openssl
libraries...
I'm running 0.9.7g, which is the latest stable... I'll try the snapshot
and see if that helps... I'll let you know if it does but after that, if
it doesn't, I'll probably bug openSSL about it cause it seems to be
their deal

#33192 [Opn-Bgs]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-03 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

%$#*@ so I didn't listen to you about the context settings that was
it... I was trying to use the transport name and not ssl... it works
that way for all of them... I must have forgot to change it for m tls
when I tested ssl://

that was it usage error thanks though.


Previous Comments:


[2005-06-03 19:04:18] justin dot d dot allen at gmail dot com

my testing server is 
openssl s_server -accept port -cert sec.pem -Verify 1

and my actual server was first set up to accept only tls, I changed it
during testing to accept all three hoping that the problem was me being
too strict

I have tried tls:// ssl:// and sslv3:// -- they all return the same
error 

sslv2: returns no actual SSL error on the client, just the warnings
about failed to enable crypto and unable to connect
and returns 
12058:error:140710CA:SSL routines:REQUEST_CERTIFICATE:peer error no
certificate:s2_pkt.c:675:
from the server -- same error but for the sslv2 functions

I tried adding -tls1 to the end of my openssl s_server but that didn't
make any difference in what happened.

I'm actually pretty sure that tls uses the sslv3 handshake functions.



[2005-06-03 07:12:39] [EMAIL PROTECTED]

Looks to me like you want to be using sslv3:// instead of tls:// there
(just based on your server output).
Use ssl:// for automatic v2 or v3 support.  Only use tls:// when the
server can only speak tls; it's a different dialect of SSL.

The context options for openssl, including tls, are all bundled under
the name ssl.

I think your code should probably look more like this:

$c = stream_context_create(array(
   ssl = array(
   local_cert = sec.pem,
   ... other options ...
   )
);
$s = stream_socket_client(sslv3://., ., $c);





[2005-06-03 02:54:18] justin dot d dot allen at gmail dot com

so I added php_error_docref displays to the certfile and passphrase
GET_VER_OPT sections of php_SSL_new_from_context and recieved no
display from either.

It seems that the variables aren't getting parsed, but truthfuly, I'm
hacking with very broad swings on that one... and, I haven't at all
looked at the inner workings of the GET_VER_OPT macro.



[2005-06-02 20:48:27] justin dot d dot allen at gmail dot com

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.



[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked

#33192 [Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-02 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the methods and if I take out the
SSL_set_connect_state() and switch the method to TSLv1_client_method()
I get the errors out of C... so it looks like it's in my openssl
libraries...
I'm running 0.9.7g, which is the latest stable... I'll try the snapshot
and see if that helps... I'll let you know if it does but after that, if
it doesn't, I'll probably bug openSSL about it cause it seems to be
their deal...

I will say my workaround(which I had previously thought was just
different syntax) worked for me in C... but I can see where you would
want to keep all CTX settings in php_SSL_new_from_context and not put
them in php_openssl_setup_crypto where you set up the methods... it's
alot cleaner that way


Previous Comments:


[2005-06-01 00:35:48] justin dot d dot allen at gmail dot com

installed php5-latest.tar.gz
am now getting the same error from server

but error from client is the same SSL error with added warnings
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in ssl.conector.php on line 17

Warning: stream_socket_client(): Failed to enable crypto in
ssl.conector.php on line 17

Warning: stream_socket_client(): unable to connect to tls://host:port
(Unknown error) in ssl.conector.php on line 17
 (0)br /


still no certificate passed


stream_socket_enable_crypto makes no difference



[2005-05-31 07:22:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

stream_socket_enable_crypto() was added in PHP 5.1-dev,
it's not (and will not be) in PHP 5.0.x




[2005-05-31 05:36:42] justin dot d dot allen at gmail dot com

line that was truncated on exapmle source is 
if (!fp =
stream_sockect_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNECT*/,$fc))
{



[2005-05-31 03:36:49] justin dot d dot allen at gmail dot com

Description:

Have been unable to get a socket_stream_client() to pass the
certificate whose path is specified by stream_context_create().

also stream_socket_enable_crypto() is an unknown function.

Reproduce code:
---
?php
ini_set(display_errors,1);
$fc = stream_context_create(array(
  'tls'=array(
 'passphrase'='***',
 'allow_self_signed'='TRUE',
 'local_cert'='sec.pem'
  )
));
if (!$fp =
stream_socket_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNE

#33192 [Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-02 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.


Previous Comments:


[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the methods and if I take out the
SSL_set_connect_state() and switch the method to TSLv1_client_method()
I get the errors out of C... so it looks like it's in my openssl
libraries...
I'm running 0.9.7g, which is the latest stable... I'll try the snapshot
and see if that helps... I'll let you know if it does but after that, if
it doesn't, I'll probably bug openSSL about it cause it seems to be
their deal...

I will say my workaround(which I had previously thought was just
different syntax) worked for me in C... but I can see where you would
want to keep all CTX settings in php_SSL_new_from_context and not put
them in php_openssl_setup_crypto where you set up the methods... it's
alot cleaner that way



[2005-06-01 00:35:48] justin dot d dot allen at gmail dot com

installed php5-latest.tar.gz
am now getting the same error from server

but error from client is the same SSL error with added warnings
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in ssl.conector.php on line 17

Warning: stream_socket_client(): Failed to enable crypto in
ssl.conector.php on line 17

Warning: stream_socket_client(): unable to connect to tls://host:port
(Unknown error) in ssl.conector.php on line 17
 (0)br /


still no certificate passed


stream_socket_enable_crypto makes no difference



[2005-05-31 07:22:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

stream_socket_enable_crypto() was added in PHP 5.1-dev,
it's not (and will not be) in PHP 5.0.x




[2005-05-31 05:36:42] justin dot d dot allen at gmail dot com

line that was truncated on exapmle source is 
if (!fp =
stream_sockect_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNECT*/,$fc))
{



[2005-05-31 03:36:49] justin dot d dot allen at gmail dot com

Description:

Have been unable to get a socket_stream_client() to pass the
certificate whose path is specified by stream_context_create().

also stream_socket_enable_crypto() is an unknown function

#33192 [Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-02 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

so I added php_error_docref displays to the certfile and passphrase
GET_VER_OPT sections of php_SSL_new_from_context and recieved no
display from either.

It seems that the variables aren't getting parsed, but truthfuly, I'm
hacking with very broad swings on that one... and, I haven't at all
looked at the inner workings of the GET_VER_OPT macro.


Previous Comments:


[2005-06-02 20:48:27] justin dot d dot allen at gmail dot com

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.



[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the methods and if I take out the
SSL_set_connect_state() and switch the method to TSLv1_client_method()
I get the errors out of C... so it looks like it's in my openssl
libraries...
I'm running 0.9.7g, which is the latest stable... I'll try the snapshot
and see if that helps... I'll let you know if it does but after that, if
it doesn't, I'll probably bug openSSL about it cause it seems to be
their deal...

I will say my workaround(which I had previously thought was just
different syntax) worked for me in C... but I can see where you would
want to keep all CTX settings in php_SSL_new_from_context and not put
them in php_openssl_setup_crypto where you set up the methods... it's
alot cleaner that way



[2005-06-01 00:35:48] justin dot d dot allen at gmail dot com

installed php5-latest.tar.gz
am now getting the same error from server

but error from client is the same SSL error with added warnings
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in ssl.conector.php on line 17

Warning: stream_socket_client(): Failed to enable crypto in
ssl.conector.php on line 17

Warning: stream_socket_client(): unable to connect to tls://host:port
(Unknown error) in ssl.conector.php on line 17
 (0)br /


still no certificate passed


stream_socket_enable_crypto makes no difference



[2005-05-31 07:22:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

stream_socket_enable_crypto() was added in PHP 5.1-dev,
it's not (and will not be) in PHP 5.0.x




[2005-05-31 05:36:42] justin dot d dot allen at gmail dot com

line that was truncated on exapmle source

#33192 [Fbk-Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-05-31 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
-PHP Version:  5.0.3
+PHP Version:  5.0.4(latest snapshot)
 New Comment:

installed php5-latest.tar.gz
am now getting the same error from server

but error from client is the same SSL error with added warnings
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in ssl.conector.php on line 17

Warning: stream_socket_client(): Failed to enable crypto in
ssl.conector.php on line 17

Warning: stream_socket_client(): unable to connect to tls://host:port
(Unknown error) in ssl.conector.php on line 17
 (0)br /


still no certificate passed


stream_socket_enable_crypto makes no difference


Previous Comments:


[2005-05-31 07:22:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

stream_socket_enable_crypto() was added in PHP 5.1-dev,
it's not (and will not be) in PHP 5.0.x




[2005-05-31 05:36:42] justin dot d dot allen at gmail dot com

line that was truncated on exapmle source is 
if (!fp =
stream_sockect_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNECT*/,$fc))
{



[2005-05-31 03:36:49] justin dot d dot allen at gmail dot com

Description:

Have been unable to get a socket_stream_client() to pass the
certificate whose path is specified by stream_context_create().

also stream_socket_enable_crypto() is an unknown function.

Reproduce code:
---
?php
ini_set(display_errors,1);
$fc = stream_context_create(array(
  'tls'=array(
 'passphrase'='***',
 'allow_self_signed'='TRUE',
 'local_cert'='sec.pem'
  )
));
if (!$fp =
stream_socket_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNE$
echo $errstr ($errno)br /\n;
} else {  
//stream_socket_enable_crypto($fp,true,STREAM_SOCKET_CRYPTO_METHOD_TLS_CLIENT);
  sleep(30);
}
?

Expected result:

expect to get successful connection to my ssl server software and it
waits for a command until sleep is complete

the sec.pem file is the result of cat cert.pem pk.pem
  this may not be the specified file format(if so docs weren't clear
enough for me)

I am able to connect to my server using 
openssl s_client -connect host:port -cert cert.pem -key pk.pem
successfully

Actual result:
--
from the php connector I recieve 
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in /home/ebay/test/ssl.conector.php on line 17

from the server(which for debugging is openssl s_server -accept port
-cert cert.pem -key pk.pem -Verify 1) I recieve
19447:error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did
not return a certificate:s3_srvr.c:2004:
  get same result from custom server

the commented out stream_socket_enable_crypto call gives me
Fatal error: Call to undefined function stream_socket_enable_crypto()
in /home/ebay/test/ssl.conector.php on line 20
  which I imagine is the problem 





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


#33192 [NEW]: failure to pass certificate in handshake of openssl related transport sockets

2005-05-30 Thread justin dot d dot allen at gmail dot com
From: justin dot d dot allen at gmail dot com
Operating system: linux(slackware)
PHP version:  5.0.3
PHP Bug Type: Sockets related
Bug description:  failure to pass certificate in handshake of openssl related 
transport sockets

Description:

Have been unable to get a socket_stream_client() to pass the certificate
whose path is specified by stream_context_create().

also stream_socket_enable_crypto() is an unknown function.

Reproduce code:
---
?php
ini_set(display_errors,1);
$fc = stream_context_create(array(
  'tls'=array(
 'passphrase'='***',
 'allow_self_signed'='TRUE',
 'local_cert'='sec.pem'
  )
));
if (!$fp =
stream_socket_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNE$
echo $errstr ($errno)br /\n;
} else {  
//stream_socket_enable_crypto($fp,true,STREAM_SOCKET_CRYPTO_METHOD_TLS_CLIENT);
  sleep(30);
}
?

Expected result:

expect to get successful connection to my ssl server software and it waits
for a command until sleep is complete

the sec.pem file is the result of cat cert.pem pk.pem
  this may not be the specified file format(if so docs weren't clear
enough for me)

I am able to connect to my server using 
openssl s_client -connect host:port -cert cert.pem -key pk.pem
successfully

Actual result:
--
from the php connector I recieve 
Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL
Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
in /home/ebay/test/ssl.conector.php on line 17

from the server(which for debugging is openssl s_server -accept port -cert
cert.pem -key pk.pem -Verify 1) I recieve
19447:error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did not
return a certificate:s3_srvr.c:2004:
  get same result from custom server

the commented out stream_socket_enable_crypto call gives me
Fatal error: Call to undefined function stream_socket_enable_crypto() in
/home/ebay/test/ssl.conector.php on line 20
  which I imagine is the problem 

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


#33192 [Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-05-30 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.3
 New Comment:

line that was truncated on exapmle source is 
if (!fp =
stream_sockect_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNECT*/,$fc))
{


Previous Comments:


[2005-05-31 03:36:49] justin dot d dot allen at gmail dot com

Description:

Have been unable to get a socket_stream_client() to pass the
certificate whose path is specified by stream_context_create().

also stream_socket_enable_crypto() is an unknown function.

Reproduce code:
---
?php
ini_set(display_errors,1);
$fc = stream_context_create(array(
  'tls'=array(
 'passphrase'='***',
 'allow_self_signed'='TRUE',
 'local_cert'='sec.pem'
  )
));
if (!$fp =
stream_socket_client(tls://host:port,$errno,$errstr,30,STREAM_CLIENT_CONNECT/*|STREAM_CLIENT_ASYNC_CONNE$
echo $errstr ($errno)br /\n;
} else {  
//stream_socket_enable_crypto($fp,true,STREAM_SOCKET_CRYPTO_METHOD_TLS_CLIENT);
  sleep(30);
}
?

Expected result:

expect to get successful connection to my ssl server software and it
waits for a command until sleep is complete

the sec.pem file is the result of cat cert.pem pk.pem
  this may not be the specified file format(if so docs weren't clear
enough for me)

I am able to connect to my server using 
openssl s_client -connect host:port -cert cert.pem -key pk.pem
successfully

Actual result:
--
from the php connector I recieve 
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure in /home/ebay/test/ssl.conector.php on line 17

from the server(which for debugging is openssl s_server -accept port
-cert cert.pem -key pk.pem -Verify 1) I recieve
19447:error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did
not return a certificate:s3_srvr.c:2004:
  get same result from custom server

the commented out stream_socket_enable_crypto call gives me
Fatal error: Call to undefined function stream_socket_enable_crypto()
in /home/ebay/test/ssl.conector.php on line 20
  which I imagine is the problem 





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


#28524 [Com]: IIS loads all PHP pages very slow - solution included

2004-09-14 Thread allen at benusa dot com
 ID:   28524
 Comment by:   allen at benusa dot com
 Reported By:  jorrit at gameparty dot net
 Status:   Bogus
 Bug Type: Performance problem
 Operating System: Windows
 PHP Version:  Irrelevant
 New Comment:

This is definitely the fix.
For the longest time I could not figure out why my php scripts when run
locally at the server run super fast, but when accessing the pages from
a client, the scripts were dog slow.
Set output_buffering = On


Previous Comments:


[2004-08-05 23:42:36] [EMAIL PROTECTED]

This is why it is a recommended setting in php.ini-recommended.



[2004-07-21 17:13:32] kswillis at midsouth dot rr dot com

I was having a similar problem that was made even stranger by the fact
the performance got worse the faster the network connection
was--connecting at 100 mbps or 1000 mbps was much worse performance on
the local network than throttling the connectiong through a 10mbps hub.
I was thought that's what I was going to be stuck with, until I turned
output buffering on in IIS, following the suggestion of this article,
and performance has improved dramatically. There may be other things
funky with the server (other than running Windows, that is) or the
network, but changing output_buffering to on solved a tremendous
performance problem with IIS and PHP. Thanks!



[2004-06-01 22:31:08] steph at taizer dot net

It certainly fixed my problems!!! IIS, PHP and MySQL were utterly
unbearable, I always thought it was in my systems. Even upgrades were
arranged but nothing worked...

I think this should be taken up in the installation manual for under
Windows: Want to use MySQL? Well, not without this setting...



[2004-05-26 10:43:46] jorrit at gameparty dot net

Description:

A friend of mine had the following problem for almost 2.5 years:

He is a Windows expert, and uses IIS to host his pages. He uses PHP to
make dynamical pages, and on different systems and with different PHP
versions, he had the problem that pages loaded very slow. He could not
find anything on the internet, only some suggestions in newsgroups that
IIS does not like a lot of small pieces of data outputted after
eachother, for instance echo-ing the contents of a table in a while
loop.

We fixed this bij setting output_buffering to On, causing PHP to return
all the output to IIS in one package. This solved the problem he had for
2.5 years immediately. I suggest that this is entered somewhere as a
comment in php.ini or the manual, because it can help a lot of people.






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


Bug #16938: Having trouble with Form variables

2002-05-01 Thread allen

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.2.0
PHP Bug Type: Scripting Engine problem
Bug description:  Having trouble with Form variables

Hello;
 
I'm the developer of a web server called TheServer.  I'm trying to add
support for PHP and I'm having trouble with PHP picking up the INPUT
variables from a posted HTML document.  I support several other scripting
languages and I try to adhere to the standard CGI rules.  You can download
TheServer and the source code at 

http://www.fastlinksoftware.com
 
I appreciate any help you can give me.  
 
Thanks,
 
Allen Rodgers.
 
[EMAIL PROTECTED]
www.fastlinksoftware.com
 
 
-- 
Edit bug report at http://bugs.php.net/?id=16938edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16938r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16938r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16938r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16938r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16938r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16938r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16938r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16938r=submittedtwice