#41770 [Opn->Asn]: SSL: fatal protocol error due to buffer issues

2007-07-03 Thread tony2001
 ID:   41770
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.3
-Assigned To:  pollita
+Assigned To:  iliaa


Previous Comments:


[2007-07-02 16:50:24] [EMAIL PROTECTED]

iliaa: All you did is make the warning not appear with that commit. You
didn't fix the underlying issue with the connection. It still closes the
connection and now it will just mysteriously start failing rather then
giving a warning about why it's failing.

I would revert your commit and not mark this as fixed.



[2007-07-02 16:42:17] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2007-06-21 19:35:37] [EMAIL PROTECTED]

It's some streams issue, reclassified as such. Too bad we're out of
streams developers right now. :)



[2007-06-21 19:22:17] [EMAIL PROTECTED]

Bug #34668 as well.



[2007-06-21 19:21:43] [EMAIL PROTECTED]

Description:

Essentially this bug is a mash up of #39283, #35758, #41021, #39039 and
possibly others.

Essentially the code I'm using looks like:

$fd = fsockopen("ssl://myhost, myport, $error, $timeout);
$data = fread($fd, 8192);

But you can create the same error using:
 - SoapClient to fetch a WSDL file.
 - file_get_contents()
 - file()

The backend can be an Apache server or a custom app internally that
serves SSL encrypted data. It doesn't matter.

If the transmitted data is smaller then the $length passed to fread,
everything works successfully. I chose 8192 in my example because
file(), file_get_contents() and SoapClient all use 8192 internally based
on how the work.

Now if the actual data being transmitted is 1 for example, you will
receive the first block of data fine. Then the next time you call
fread(), or in the case of SoapClient, file_get_contents(), file() they
will do this internally. You will get:

"SSL: fatal protocol error" printed out and any subsequent action on
the file descriptor will result in an OpenSSL error saying the socket
has already been shutdown, as per line 116 (current CVS) of
ext/openssl/xp_ssl.c

Now you can create this situation with 2048 of data as well. Just call
fread($fd, 1024); or fread($fd, 2000); and it will trigger. Basically
the $length has to be less then your total amount of data and it will
occur.

A lot of the previous bugs PHP developer mention IIS while users
mention Apache. I have not tested IIS. I have only tested Apache and a
custom app which serves data over SSL. I have tested the output of
Apache with wget and the custom app with openssl s_client and both work
properly.






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


#41736 [Opn->Asn]: Mixed up characters in UTF-8 database with Hebrew via FreeTDS

2007-07-03 Thread tony2001
 ID:   41736
 Updated by:   [EMAIL PROTECTED]
 Reported By:  www dot php dot net at landrovez dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Fedora Core 6, Kernel: 2.6.20
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  fmk


Previous Comments:


[2007-06-19 10:19:36] www dot php dot net at landrovez dot com

Description:

I'm running FreeTDS version 0.64 ( latest + stable ) connecting to
mssql  2000 database.

At the FreeTDS config located at: /etc/freetds.conf I've specified 
tds version = 8.0 
client charset = UTF-8

at the related connection, so far so good. it works.

The problem starts printing the data from the database.

When the last char of the selected array that I get from the DB query
is a hebrew char it moves it to the next position in the array for some
reason.

It only happens when the last char is hebrew, if the last char is "."
for example it works just fine.

I think its something to do with UTF-8.



Reproduce code:
---
$mssql = mssql_connect("SQLSERVER", "root", "PASSWORD");
$mssql_db = mssql_select_db("devel_table", $mssql);

$download_id = "1";

$download_res = mssql_query("SELECT ID, Title, Description, URL FROM
tblDemo WHERE Download_ID = '$download_id'");

$download = mssql_fetch_array($download_res);

echo ""
  print_r($download[Title]);
echo "";

Expected result:

Array
(
[0] => 1
[ID] => 1

[1] => THE BEST GAME IN THE WORLD
[Title] => THE BEST GAME IN THE WORLD

[2] => DOWNLOADS THIS GREAT GAME NOW
[Description] => DOWNLOADS THIS GREAT GAME NOW

[3] => http://sample.com/download.zip
[URL] => http://sample.com/download.zip
)


Actual result:
--
Array
(
[0] => 1
[ID] => 1

[1] => THE BEST GAME IN THE WORL
[Title] => THE BEST GAME IN THE WORL

[2] => DDOWNLOADS THIS GREAT GAME NO
[Description] => DDOWNLOADS THIS GREAT GAME NO

[3] => Whttp://sample.com/download.zip
[URL] => Whttp://sample.com/download.zip
)

*** the title should have been at hebrew for this bug to happen, for
your continence the title and description are set to English just to
show the example. 

As you can see it took the LAST hebrew letter from the END of the vchar
and moved it to the NEXT one by the select order.





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


#41635 [Opn->Asn]: SoapServer and zlib.output_compression with FastCGI result in major slowdown

2007-07-03 Thread tony2001
 ID:   41635
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jln at magentammt dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: FreeBSD 6.2
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-07-02 14:14:14] jln at magentammt dot com

Still couldn't get the ./configure version of PHP working, even when
using the same parameters as used by the ports, but according to some
older notes of mine the Apache/mod_php5 and zlib.output_compression
combination worked. Didn't try Apache with FastCGI, and Lighttpd only
works with FastCGI.



[2007-06-26 14:25:20] jln at magentammt dot com

I'm probably daft, but I can't get zlib compression working:

./configure --enable-soap --enable-fastcgi --with-zlib --with-zlib-dir
--enable-force-cgi-redirect --enable-discard-path
--with-mysqli=/usr/local/bin/mysql_config

followed by make and copy to the proper location, update php.ini,
restart lighttpd. But the http headers don't have any output compression
bits in them... Also the webservice (soap) doesn't work anymore, no
messages just 'http request failed' in the client. The newly build
version of php is used (5.2.4/dev). If I switch to the regular, ports
build, 5.2.3 compression works (not for soap of-course).



[2007-06-26 11:13:37] [EMAIL PROTECTED]

>I'm using the FreeBSD ports system which automatically patches 
>the sources, and that fails on the snapshot.

You don't need any patches or port systems to install the snapshot.
Moreover, they can be causing your problems, that's why I want you to
test clean PHP sources without any third-party patches.
Just grab the sources, ./configure it, make and put the result binaries
to the correct place.



[2007-06-26 07:48:27] jln at magentammt dot com

I'm using the FreeBSD ports system which automatically patches the
sources, and that fails on the snapshot. Could you indicate which files
you have changed/fixed for this bug? Then I'll try copying those after
the patching on the 5.2.3 files. I searched
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/ but couldn't find any
recent changes.



[2007-06-25 19:13:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





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

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


#41639 [Opn->Asn]: odbc_execute fails with parameters

2007-07-03 Thread tony2001
 ID:   41639
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cody dot stockwell at qsicorp dot com
-Status:   Open
+Status:   Assigned
 Bug Type: ODBC related
 Operating System: Red Hat 4 ES
 PHP Version:  4.4.7
-Assigned To:  
+Assigned To:  kalowsky


Previous Comments:


[2007-06-08 18:08:47] cody dot stockwell at qsicorp dot com

Description:

The script works fine when talking to Apache(WinXP)/PHP5/DNS [SQL
Server]/MS SQL Express 2005,
but when I try to get it to run on Apache
(Linux)/PHP4/[unixODBC/FreeTDS]/MS SQL Express 2005 I get an error from
PHP.

If I place variables into the odbc_prepare() statement directly it
works fine, but for some reason refuses to replace the '?' parameter in
odbc_execute(). Obviously that would negate the security advantage of
using odbc_prepare().

So it appears to be a bug in PHP4, but unfortunately the boss is
hesitant to install PHP5 or any new version for fear of breaking
everything.

Reproduce code:
---



Expected result:

FIRST_NAME  MIDDLE_INITIAL  LAST_NAME
Joseph  C   Smith
Travis  M   Smith
2

Actual result:
--
Warning: odbc_execute(): SQL error: <�tH�
I��5, SQL state 0 in SQLExecute in
/var/www/html/v_contact.php on line 11






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


#41568 [Asn->Bgs]: PHP 5.2.3 php_mysql.dll and libmysql.dll not working?

2007-07-03 Thread tony2001
 ID:   41568
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Sephiroth dot PZC at gmail dot com
-Status:   Assigned
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Windows XP
 PHP Version:  5.2.3
 Assigned To:  Andrey
 New Comment:

.


Previous Comments:


[2007-06-27 01:17:45] saenito at itelcel dot com

At least for my case the old libmysql.dll was the problem (i think),
some of that was commented in previous messages



[2007-06-27 01:12:00] saenito at itelcel dot com

Same problem, was a wrong version of libmysql.dll on c:\windows, copy
from php to c:\windows or delete it from c:\windows and modify path
environment variable to php

make sure extensions directory is ok, f.e. ./ext or c:\php-5.2.3\ext

it worked for me
Erwin



[2007-06-12 11:53:20] [EMAIL PROTECTED]

I'm not seeing this problem at all on any of my installs.

PHP 5.2.3 using the MSI installer ( updated from 5.2.2 )
MySQL 5.0.41 using the MSI installer ( installed before PHP 5.2.3 )

phpinfo() reports using MySQL client API version 5.0.37 ( which is the
version bundled with PHP 5.2.3 ).

I think the problem is with the libmysql.dll from MySQL 5.0.41 being
loaded instead of the one packaged with PHP.



[2007-06-09 22:42:54] [EMAIL PROTECTED]

If this isn't the case then please re-open this report.



[2007-06-07 13:29:34] [EMAIL PROTECTED]

The libmysql.dll from 5.0.41 can't be loaded dynamically due to a bug
in MySQL more detail is available at
http://bugs.mysql.com/bug.php?id=28358

If you're not using 5.0.41 or a 5.1 beta then you've most likely got
other libmysql.dll files on your system somewhere that need removed.



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

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


#41522 [Opn->Asn]: PDO firebird driver returns null if it fails to connect

2007-07-03 Thread tony2001
 ID:   41522
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mark-phpbugs at vectrex dot org dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.2
-Assigned To:  
+Assigned To:  abies


Previous Comments:


[2007-05-28 17:08:09] mark-phpbugs at vectrex dot org dot uk

Description:

The firebird PDO driver returns nothing, or null if it fails to connect
- this is contradictory to what the PDO documentation says (should throw
PDOException) and the behaviour of the other drivers.

Reproduce code:
---
$conn = new PDO("firebird:dbname=localhost:test.fdb",
  'SYSDBA','wrong password');


Expected result:

It should throw a PDOException, ideally with an explanation or error
code.

Actual result:
--
Returns NULL with no errors or warnings even with
error_reporting(E_ALL)





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


#41501 [Opn->Asn]: crash on date test 009.phpt

2007-07-03 Thread tony2001
 ID:   41501
 Updated by:   [EMAIL PROTECTED]
 Reported By:  stas at zend dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Windows XP
 PHP Version:  5.2.3RC1
-Assigned To:  
+Assigned To:  stas


Previous Comments:


[2007-05-27 18:10:07] [EMAIL PROTECTED]

I think all those that are not in MSDN docs:

http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.71).aspx



[2007-05-27 17:52:26] [EMAIL PROTECTED]

Stas can you please identify which tokens does MSVC8 does not 
understand?



[2007-05-25 19:41:57] [EMAIL PROTECTED]

Looks like it happens because Windows strftime doesn't understand many
of the formats Unix one does _and_ on MSVC8 it is configured by default
to throw an error (leading to DrWatson dialog) when invalid parameters
are used.



[2007-05-25 18:02:20] stas at zend dot com

Description:

php build 5.2.3rc1 crashes on date/tests/009.phpt on Windows. 
The line leading to the crash seems to be this one:

var_dump(strftime("%a %A %b %B %c %C %d %D %e %g %G %h %H %I %j %m %M
%n %p %r %R %S %t %T %u %U %V %W %w %x %X %y %Y %Z %z %%", $t));







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


#41518 [Asn->Csd]: file_exists() warns of open_basedir restriction on non-existent file

2007-07-03 Thread tony2001
 ID:   41518
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ruben dot willmes at emil2001 dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux
 PHP Version:  5.2.2
 Assigned To:  tony2001
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2007-06-18 18:41:24] paul at moonkhan dot org

@Ruben

Running PHP 5.2.3 on Redhat Enterprise Linux 4 I get the following:

#php -d open_basedir=/tmp -r 'var_dump(file_exists("/tmp/nosuch"));'
bool(false)

But if I switch /tmp to /tmp/ (ie, with trailing slash):

#php -d open_basedir=/tmp/ -r 'var_dump(file_exists("/tmp/nosuch"));'
PHP Warning:  file_exists(): open_basedir restriction in effect.
File(/tmp/nosuch) is not within the allowed path(s): (/tmp/) in Command
line code on line 1

Warning: file_exists(): open_basedir restriction in effect.
File(/tmp/nosuch) is not within the allowed path(s): (/tmp/) in Command
line code on line 1
bool(false)


We can eliminate this problem in our environment if we remove the
trailing slashes from our open_basedir settings but that's not how
open_basedir was intended to work, since trailing slashes prevent
"wildcarding". For example, "/tmp" matches "/tmpfoo" and "/tmpbar" but
"/tmp/" should only match, well, /tmp/.

-Paul



[2007-06-01 00:02:29] phpbugs at thequod dot de

This might be related to bug #39123, where open_basedir=/tmp/ 
started to fail, as internally only "/tmp" (without trailing slash) 
got considered. (http://bugs.php.net/bug.php?id=39123)



[2007-05-31 12:40:31] ruben dot willmes at emil2001 dot de

Your example is correct, that does work, but what if you change the 
following:

Instead of 

#php -d open_basedir=/tmp -r 'var_dump(file_exists("/tmp/nosuch"));'

try

#php -d open_basedir=/tmp/ -r 'var_dump(file_exists("/tmp/nosuch"));'

Notice the slash behind "open_basedir=/tmp/". With that you get

Warning: file_exists(): open_basedir restriction in effect. File(/tmp/
nosuch) is not within the allowed path(s): (/tmp/) in Command line 
code on line 1
bool(false)



[2007-05-31 11:06:13] [EMAIL PROTECTED]

I don't think I get what you're talking about:
# ls -l /tmp/nosuch
ls: cannot access /tmp/nosuch: No such file or directory
#php -d open_basedir=/tmp -r 'var_dump(file_exists("/tmp/nosuch"));'
bool(false)

No warning whatsoever.



[2007-05-30 20:20:58] ruben dot willmes at emil2001 dot de

Sorry, but i have to reopen this bug again.

Thx for the reply, Tony, but i don't think you understood me. 

I don't want to generally remove this error message, it's just under 
your OWN open_basedir, where you shouldn't get this message since 
you should be able to check whether the file exists under your OWN 
open_basedir, or am i wrong?

Let's make an example:

Two users, user1 and user2, both locked in their homedirs with 
open_basedir:
/home/user1/
/home/user2/

Both have one file in their directory, let's call it test.php

Now, if user1 checks whether test.php exists, he get's a true, as 
well as user2. If user1 checks user2's test.php, he'll get a false 
and an open_basedir warning since he's out of his open_basedir. 
That's correct. 

But what if user1 checks a file called test2.php under his own 
directory, /home/user1/? Should he get an open_basedir error? In my 
eyes he should only get a 'false' as the file does not exist, but no 
open_basedir warning, since he's still in his own open_basedir.

In the recent PHP5 release (5.2.2) one get's an open_basedir warning 
if you check a non-existent file under your OWN open_basedir. In a 
previous release the message was not present (i think it was 5.2.0 
or 5.2.1).

so, please reconsider this bug



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

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


#41461 [Opn->Asn]: E_STRICT notice when overriding methods not defined by an Interface in hierarchy

2007-07-03 Thread tony2001
 ID:   41461
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ralph at smashlabs dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: *
 PHP Version:  *
-Assigned To:  
+Assigned To:  helly


Previous Comments:


[2007-06-19 21:52:26] ralph at smashlabs dot com

Marcus,

After re-reading, I didn't think that I was clear in my original bug
report, so I attempted to clarify the matter (2 posts up).  I still
think this is a problem and that it hinders the usage of interfaces as
it restricts concrete classes from overriding methods introduced at the
abstract layer, not the interface layer.

If this is still by design, go ahead and close, but I wanted to make
absolutely sure as most people either do not care about E_STRICT, or
haven't run into the problem yet ;)

Thanks again,
Ralph



[2007-05-28 17:53:41] ralph at smashlabs dot com

PS. I did check this with the internals list before I posted.. And I
think you actually confirmed it for me on the list

http://news.php.net/php.internals/29646

Thank you for your time,
-ralph



[2007-05-28 17:42:50] ralph at smashlabs dot com

I am sorry, perhaps I should rephrase (I was rushed when I wrote the
original bug report) and I don't think I was especially clear.

In general, we are speaking strictly of Method Overriding.  PHP
currently allows concrete classes to override methods in abstract
classes as demonstrated by this code:

[EMAIL PROTECTED] ~/tmp $ cat test_method_override.php 
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

PHP follows strict is_a inheritance.

By the way, it is called signature and even if you could change it it
would not solve the problem. And anyway it would break inheritance
rules.



[2007-05-21 23:06:13] ralph at smashlabs dot com

Description:

When an interface is a parent of a class, the interface is implying a
specific profile for a given function (here its __get) even though it is
not defined in the interface itself.  This is making it impossible to
overload and/or change the profile of the function in a descendant
class.


Reproduce code:
---
The following will produce this notice:

Strict Standards: Declaration of Z_Concrete::__get() should be
compatible with that of Z_Abstract::__get() in xxx on line 16

http://bugs.php.net/?id=41461&edit=1


#41404 [Opn->Asn]: ODBC makes memory leaks

2007-07-03 Thread tony2001
 ID:   41404
 Updated by:   [EMAIL PROTECTED]
 Reported By:  geniuz at geniuz dot cz
-Status:   Open
+Status:   Assigned
 Bug Type: ODBC related
 Operating System: XP
 PHP Version:  5.2.2
-Assigned To:  
+Assigned To:  kaolwsky


Previous Comments:


[2007-05-15 21:34:24] geniuz at geniuz dot cz

Description:

When I select over ODBC from table with any column data type defined as
TEXT (detected over odbc_columns function), and I fetch rows, I receive
one of following messages or php freeze. I selected more than 10
rows.
When I replaced selected TEXT data type column for any other column ie.
STRING data type column (and with more saved datas), all is ok without
errors.
Well, problem must be with TEXT datatype (LONG columns).

Warning: odbc_exec() [function.odbc-exec]: SQL error: Failed to fetch
error message, SQL state HY000 in SQLExecDirect in
M:\4D\.WebRoot\ctp\eshop\index.php on line 65

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Simba][Simba
ODBC Driver]Memory allocation error., SQL state S1001 in SQLExecDirect
in M:\4D\.WebRoot\ctp\eshop\index.php on line 65


Reproduce code:
---
$sql = "SELECT Col1, Col2, Col3 FROM MYTABLE";
$rs=odbc_exec($conn,$sql);
while( odbc_fetch_row($rs) )
{
$data1 = odbc_result($rs,'Col1');
$data2 = odbc_result($rs,'Col2');
$data3 = odbc_result($rs,'Col3');
}


Expected result:

no sql error

Actual result:
--
sql error





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


#41393 [Opn->Asn]: affected can't return

2007-07-03 Thread tony2001
 ID:   41393
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hack988 at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: windows 2003
 PHP Version:  4.4.7
-Assigned To:  
+Assigned To:  fmk


Previous Comments:


[2007-05-15 04:13:50] hack988 at gmail dot com

Description:

after executed sql query like that
IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName = 'rrgrrg'))
INSERT INTO NumberGroup(GroupName, AddTime) VALUES ('rrgrrg', 1);

an executed mssql_rows_affected alway return 0 either GroupName=
'rrgrrg' not in database

Reproduce code:
---
i have no idea to deal with this problem by myself

Expected result:

mssql_query("IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName
= 'rrgrrg')) INSERT INTO NumberGroup(GroupName, AddTime) VALUES
('rrgrrg', 1);");

var_dump(mssql_affected_rows($dblink);









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


#40695 [Opn->Asn]: odbc_execute/prepared statements does not work with Access

2007-07-03 Thread tony2001
 ID:   40695
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a at bc dot de
-Status:   Open
+Status:   Assigned
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  kalowsky


Previous Comments:


[2007-03-02 18:34:29] a at bc dot de

Description:

[repost of bug 6275]

Hello,

My problem is odbc_execute fails with the following error message:

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT
field
incorrect , SQL state 07001 in SQLExecute in
d:\Inetpub\wwwroot\php\adodb\index.php on line 77

The odbc_exec INSERT works fine. I am using a plain vanilla NorthWind
MS
Access database and am using the ISAPI version of PHP, with ODBC built
in.



Reproduce code:
---
$conn = odbc_connect("nwind","","");
odbc_exec($conn,"drop table ADOXYZ"); 
odbc_exec($conn,"create table ADOXYZ (id int, firstname char(24),
lastname char(24))");   
odbc_exec($conn,"insert into ADOXYZ (id,firstname,lastname) values
(0,'Zend','PHP')");
$stmt = odbc_prepare($conn,"insert into ADOXYZ (id,firstname,lastname)
values (?,?,?)");
if ($stmt) {
print "Trying execute";
$stmt = odbc_execute($stmt,array(1,"John","Lim"));
}

Actual result:
--
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT
field
incorrect , SQL state 07001 in SQLExecute in
d:\Inetpub\wwwroot\php\adodb\index.php on line 77





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


#41668 [Opn->Bgs]: fgetcsv(): wrong parse of double quote when combined with enclosure

2007-07-03 Thread tony2001
 ID:   41668
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jkapicak at chip dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Debian / Ubuntu
 PHP Version:  5.2.3
 New Comment:

"If a field's value contains a double quote character it is escaped by
placing another double quote character next to it."


Previous Comments:


[2007-06-12 10:03:23] jkapicak at chip dot de

Description:

If the double quote is close to enclosure, fgetcsv parses the line
wrong.
This is parsed wrong: "200"|"15,4""|"aa"
When escaped, it would work: "200"|"15,4\""|"aa"

Jozef

Reproduce code:
---
test.csv:

"200"|"15,4""|"aa"
"200"|"15,4 "|"aa"

text.php:

 

Expected result:

Array
(
[0] => 200
[1] => 15,4"
[2] => aa
)
Array
(
[0] => 200
[1] => 15,4
[2] => aa
)


Actual result:
--
Array
(
[0] => 200
[1] => 15,4"|aa"
)
Array
(
[0] => 200
[1] => 15,4
[2] => aa
)






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


#41862 [Bgs->Opn]: Errorhandler doesn't work

2007-07-03 Thread thomas at thoftware dot de
 ID:   41862
 User updated by:  thomas at thoftware dot de
 Reported By:  thomas at thoftware dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  4.4.7
 New Comment:

I've checked the documentation another time and did not find anything
that explains or even discusses the above behaviour. As I'm not sure if
anyone is reading this while the status is "Bogus", I've decided to
reopen it.

Maybe someone can read my additional submissions - and if you are sure
it is bogus, than please give me a little more specific hint, where I
can find it in the documentation (as normally done when a submission is
answered with the "Thank you for taking the time"-Text).

Thank you in advance.


Previous Comments:


[2007-07-02 06:42:34] thomas at thoftware dot de

Something I found even earlier is: "The following error types cannot be
handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR,
E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT
raised in the file where set_error_handler() is called.". Is that what
you mean I should have read? Please note, that that isn't the problem.

I don't want these error types to be handled. I simply want the whole
construct to run and not to crash. The above script works fine in these
2 versions:

Reproduce code 2 (works):
---
  function foo($foo) {
return($foo);
  }
  error_reporting(E_ALL);
  require_once(foo('foo'));

Reproduce code 3 (works):
---
  function ehandler($e,$t,$f,$l,$c) {
echo $t;
  }
  set_error_handler('ehandler');
  error_reporting(E_ALL);
  require_once('foo');

(Where 'fine' means, it shows the error an stops.)

Can you pleease explain to me, why the first version crashes
without any message?



[2007-07-02 06:29:19] thomas at thoftware dot de

Neither with require_once(), require(), include() nor with
set_error_handler() anything about the above behaviour is explained. I
checked it four times. Can you please simply give me a direct link to
that part of the documentation where it is mentioned? Or am I supposed
to read the comlplete documentation as in that way you always have the
chance that somewhere there might be some well hidden information about
it?



[2007-07-02 01:34:29] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.



[2007-06-30 21:29:30] thomas at thoftware dot de

Description:

Setting an Errorhandler with set_error_handler() and then calling
require() with a Function as Argument doesn't produce the expected
Result.

Reproduce code:
---
  function ehandler($e,$t,$f,$l,$c) {
echo $t;
  }
  function foo($foo) {
return($foo);
  }
  set_error_handler('ehandler');
  error_reporting(E_ALL);
  require_once(foo('foo'));


Expected result:

Some Errormessage like this:

main(foo) [function.main]: failed to open stream: No such file or
directory
Fatal error: main() [function.require]: Failed opening required 'foo'
(include_path='.;c:\php4\pear') in foo.php on line x

Actual result:
--
Nothing (infinite loop?). PHP crashes.

Using no Errorhandler or giving 'foo' directly to require_once() works.





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


#41884 [NEW]: ReflectionClass::getDefaultProperties() does not handle static attributes

2007-07-03 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Irrelevant
PHP version:  5CVS-2007-07-03 (CVS)
PHP Bug Type: Feature/Change Request
Bug description:  ReflectionClass::getDefaultProperties() does not handle 
static attributes

Description:

Static properties with default values do not appear in the result of
ReflectionClass::getDefaultProperties().

Reproduce code:
---
getDefaultProperties());

Expected result:

Array
(
[fooStatic] => foo
[foo] => foo
)

Actual result:
--
Array
(
[foo] => foo
)

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


#41878 [Asn->Fbk]: special characters where not displayed as graphic

2007-07-03 Thread pajoye
 ID:   41878
 Updated by:   [EMAIL PROTECTED]
 Reported By:  letters at rmroppert dot de
-Status:   Assigned
+Status:   Feedback
 Bug Type: GD related
 Operating System: NetBSD (different Versions)
 PHP Version:  4.4.7
 Assigned To:  pajoye
 New Comment:

Do you use UTF-8? Text has to be given in UTF-8. If not, it may cause
some troubles by the encoding detection or the glyph selection in
freetype (esp. when the font only has utf-8).




Previous Comments:


[2007-07-02 23:23:42] letters at rmroppert dot de

Description:

 want to put special characters (german umlauts) into an image.
I use imagettftext() and the string "( ä ü ö xx Ä Ü Ö ß ) without
blanks ( äüöxxÄÜÖß )".
If i put an blank around the characters it works without blanks there
squares.
You see the result on:
http://heisenberg.rmroppert.com/test/gd_php_out.pdf

I tried the same on different machines (i386) under different NETBSD
Versions (NetBSD 1.6, NetBSD 3.0.1, NetBSD 3.1)
and different php versions.

You may find the output of phpinfo of our testserver under:
http://heisenberg.rmroppert.com/test/phpinfo1.pdf

I think this is an problem of th built-in version og gd. Perhaps the
image is correct if i use perl and gnuplot. 

Reproduce code:
---



Expected result:

see links in Description







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


#41884 [Opn]: ReflectionClass::getDefaultProperties() does not handle static attributes

2007-07-03 Thread tony2001
 ID:   41884
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Irrelevant
 PHP Version:  5CVS-2007-07-03 (CVS)
 New Comment:

Here is a patch for it: http://dev.daylessday.org/diff/bug41884.diff
but I'd like to hear Marcus opinion before committing it.



Previous Comments:


[2007-07-03 08:35:29] [EMAIL PROTECTED]

Description:

Static properties with default values do not appear in the result of
ReflectionClass::getDefaultProperties().

Reproduce code:
---
getDefaultProperties());

Expected result:

Array
(
[fooStatic] => foo
[foo] => foo
)

Actual result:
--
Array
(
[foo] => foo
)





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


#41870 [Fbk->Opn]: PDO_ODBC module linking fails with iODBC

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41870
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Sorry, your patch does not work. It seems that comma is a problem for
the constant PDO_ODBC_TYPE. The result is like this.

/bin/sh /root/build/php/php-5.2.3/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic, iodbc\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend   
-I/usr/include -g -O2  -c
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c -o
ext/pdo_odbc/pdo_odbc.lo
gcc: iodbc": No such file or directory
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c: In function
'zm_info_pdo_odbc':
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c:162: error: missing
terminating " character
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c:162: error: syntax
error before string constant
make: *** [ext/pdo_odbc/pdo_odbc.lo] Error 1


I have tried various updates to ext/pdo_odbc/config.m4, but it seems
that the file is cached somewhere and it is very difficult to get the
changes appear in Makefile.

Any advice is appreciated. But as I have stated earlier,
"generic-iodbc" works (no commas,spaces,parantheses).


Previous Comments:


[2007-07-03 06:49:16] [EMAIL PROTECTED]

Try this patch please: http://dev.daylessday.org/diff/bug41870.diff
(don't forget to run ./buildconf after applying it)



[2007-07-02 11:10:17] roman dot vanicek at gmail dot com

Sorry for a small detail, the error appears during the compilation and
not the linking - i was a bit confused seeing libtool at the beginning
of the line. Apart from this, everything holds true.



[2007-07-02 09:43:19] roman dot vanicek at gmail dot com

Description:

I want to compile PHP with PDO_ODBC against iODBC.

Configure settings:
--with-pdo-odbc=generic,/usr,iodbc

Configure works fine, compilation too but during the linking phase, i
am getting this error:

/bin/sh: -c: line 0: syntax error near unexpected token `('

The problem is in the Makfile generated by configure. The parantheses
probably need to be quoted (or not used at all).

If I change these parameters (3 times in the Makefile)

-DPDO_ODBC_TYPE=\"generic (iodbc)\"

manually to 

-DPDO_ODBC_TYPE=\"generic-iodbc\"

then it works like a charm :-)

Probably it would be best to fix the code that generates the Makefile
without parantheses ("generic","generic-iodbc" works, on the other hand
"generic - iodbc","generic iodbc" does not work).


Reproduce code:
---
./configure --with-pdo-odbc=generic,/usr,iodbc
make


Expected result:

Build complete.

Actual result:
--
/bin/sh /root/build/php/php-5.2.3/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib -I/usr/include/freetype2
-I/root/build/php/php-5.2.3/ext/mbstring/oniguruma
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl/mbfl
-I/usr/local/lib/oracli/sdk/include -I/root/build/bin/freetds/include
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend   
-I/usr/include -g -O2  -c
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c -o
ext/pdo_odbc/pdo_odbc.lo
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/sh /root/build/php/php-5.2.3/libtool
--silent --preserve-dup-deps --mode=compile gcc
-I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib -I/usr/include/freetype2
-I/root/build/php/php-5.2.3/ext/mbstring/oniguruma
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl/mbfl
-I/usr/local/lib/oracli/sdk/include -I/root/build/bin/freetds/include
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend   
-I/usr/include -g -O2  -c
/root/build/php/php-5.2.3/ext/pdo_odb

#41870 [Opn]: PDO_ODBC module linking fails with iODBC

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41870
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

I propose this patch:

--- /bkp/config.m4 2007-07-03 09:31:27.0 +0200
+++ config.m4   2007-07-03 11:49:31.0 +0200
@@ -89,7 +89,7 @@
 pdo_odbc_def_lib="`echo $PHP_PDO_ODBC | cut -d, -f3`"
 pdo_odbc_def_ldflags="`echo $PHP_PDO_ODBC | cut -d, -f4`"
 pdo_odbc_def_cflags="`echo $PHP_PDO_ODBC | cut -d, -f5`"
-pdo_odbc_flavour="$pdo_odbc_flavour ($pdo_odbc_def_lib)"
+pdo_odbc_flavour="$pdo_odbc_flavour-$pdo_odbc_def_lib"
 ;;

   *)


Previous Comments:


[2007-07-03 09:41:01] roman dot vanicek at gmail dot com

Sorry, your patch does not work. It seems that comma is a problem for
the constant PDO_ODBC_TYPE. The result is like this.

/bin/sh /root/build/php/php-5.2.3/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic, iodbc\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend   
-I/usr/include -g -O2  -c
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c -o
ext/pdo_odbc/pdo_odbc.lo
gcc: iodbc": No such file or directory
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c: In function
'zm_info_pdo_odbc':
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c:162: error: missing
terminating " character
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c:162: error: syntax
error before string constant
make: *** [ext/pdo_odbc/pdo_odbc.lo] Error 1


I have tried various updates to ext/pdo_odbc/config.m4, but it seems
that the file is cached somewhere and it is very difficult to get the
changes appear in Makefile.

Any advice is appreciated. But as I have stated earlier,
"generic-iodbc" works (no commas,spaces,parantheses).



[2007-07-03 06:49:16] [EMAIL PROTECTED]

Try this patch please: http://dev.daylessday.org/diff/bug41870.diff
(don't forget to run ./buildconf after applying it)



[2007-07-02 11:10:17] roman dot vanicek at gmail dot com

Sorry for a small detail, the error appears during the compilation and
not the linking - i was a bit confused seeing libtool at the beginning
of the line. Apart from this, everything holds true.



[2007-07-02 09:43:19] roman dot vanicek at gmail dot com

Description:

I want to compile PHP with PDO_ODBC against iODBC.

Configure settings:
--with-pdo-odbc=generic,/usr,iodbc

Configure works fine, compilation too but during the linking phase, i
am getting this error:

/bin/sh: -c: line 0: syntax error near unexpected token `('

The problem is in the Makfile generated by configure. The parantheses
probably need to be quoted (or not used at all).

If I change these parameters (3 times in the Makefile)

-DPDO_ODBC_TYPE=\"generic (iodbc)\"

manually to 

-DPDO_ODBC_TYPE=\"generic-iodbc\"

then it works like a charm :-)

Probably it would be best to fix the code that generates the Makefile
without parantheses ("generic","generic-iodbc" works, on the other hand
"generic - iodbc","generic iodbc" does not work).


Reproduce code:
---
./configure --with-pdo-odbc=generic,/usr,iodbc
make


Expected result:

Build complete.

Actual result:
--
/bin/sh /root/build/php/php-5.2.3/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib -I/usr/include/freetype2
-I/root/build/php/php-5.2.3/ext/mbstring/oniguruma
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl/mbfl
-I/usr/local/lib/oracli/sdk/include -I/root/build/bin/freetds/include
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend   
-I/usr/include -g -O2  -c
/root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c -o
ext/pdo_odbc/pdo_odbc.lo
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/sh /root/build/php/php-5.2.3/libtool
--silent --preserve-dup-deps --mode=compile gcc
-I/root/build/php/php-5.2.3/ext  -I/usr/include
-DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo

#41871 [Bgs]: mysql_free_result does not free result for a referenced result variable

2007-07-03 Thread kulakov74 at yandex dot ru
 ID:   41871
 User updated by:  kulakov74 at yandex dot ru
 Reported By:  kulakov74 at yandex dot ru
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: Linux / Windows
 PHP Version:  5.2.3
 New Comment:

Well maybe, but I checked MySql API mysql_free_result() source code and
there's no reference counting logic, it just frees stuff. I suppose this
is PHP's mysql_free_result() implementation that checks reference count,
and it was intended as a kind of service to prevent people from losing a
result set while there is still another reference around. But I do not
think this is really expected and people use it this way by calling
mysql_free_result() first and then using the same result again from
another variable. I think most people expect PHP mysql_free_result() to
call MySql mysql_free_result directly whatsoever. 

Also, I suppose PHP might call mysql_free_result() automatically when
reference count goes to 0 even before the script is over, for example if
I execute an Sql-query inside a function and then return from it without
saving the result PHP might call mysql_free_result() when destroying the
variable. 

But it is not obvious that reference count check should be done at
direct calls to mysql_free_result() as then I say I want it, no matter
how many references I still have. Also, it is not clear which exactly
variable is dereferenced from the result set as the variable passed to
mysql_free_result() still exists after the call and I can use it again.
If I call mysql_free_result() with the same variable again it does free
the result :)


Previous Comments:


[2007-07-02 23:11:16] [EMAIL PROTECTED]

This is expected result. mysql_free_result() just decreases the
refcount to the result and actual freeing happens during request
shutdown (if refcount to the result is 0!).



[2007-07-02 13:12:53] kulakov74 at yandex dot ru

Description:

When I call mysql_free_result($Res) I expect I won't be able to use the
result in calls to mysql_fetch_array() etc. But if $Res is passed by
reference as a function parameter and is copied to another variable the
result is not freed and I can still use it. 

I realize this is a VERY unlikely condition and I found it by accident
(mixed 2 lines of code and got surprised to see no error). Also this
might well be intentional behavior. Anyway, just in case. 

Reproduce code:
---
a($Res);

function a(&$Res){
$Res=mysql_query("Show Tables"); $Res1=$Res;
mysql_free_result($Res);
mysql_fetch_array($Res); //still works!
}

Expected result:

Warning: mysql_fetch_array(): 7 is not a valid MySQL result resource in

Actual result:
--
No errors





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


#41871 [Bgs]: mysql_free_result does not free result for a referenced result variable

2007-07-03 Thread kulakov74 at yandex dot ru
 ID:   41871
 User updated by:  kulakov74 at yandex dot ru
 Reported By:  kulakov74 at yandex dot ru
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: Linux / Windows
 PHP Version:  5.2.3
 New Comment:

A clarification: by saying "PHP might call mysql_free_result()
automatically" I do not mean a feature request, I mean I suppose PHP
already does so.


Previous Comments:


[2007-07-03 10:01:19] kulakov74 at yandex dot ru

Well maybe, but I checked MySql API mysql_free_result() source code and
there's no reference counting logic, it just frees stuff. I suppose this
is PHP's mysql_free_result() implementation that checks reference count,
and it was intended as a kind of service to prevent people from losing a
result set while there is still another reference around. But I do not
think this is really expected and people use it this way by calling
mysql_free_result() first and then using the same result again from
another variable. I think most people expect PHP mysql_free_result() to
call MySql mysql_free_result directly whatsoever. 

Also, I suppose PHP might call mysql_free_result() automatically when
reference count goes to 0 even before the script is over, for example if
I execute an Sql-query inside a function and then return from it without
saving the result PHP might call mysql_free_result() when destroying the
variable. 

But it is not obvious that reference count check should be done at
direct calls to mysql_free_result() as then I say I want it, no matter
how many references I still have. Also, it is not clear which exactly
variable is dereferenced from the result set as the variable passed to
mysql_free_result() still exists after the call and I can use it again.
If I call mysql_free_result() with the same variable again it does free
the result :)



[2007-07-02 23:11:16] [EMAIL PROTECTED]

This is expected result. mysql_free_result() just decreases the
refcount to the result and actual freeing happens during request
shutdown (if refcount to the result is 0!).



[2007-07-02 13:12:53] kulakov74 at yandex dot ru

Description:

When I call mysql_free_result($Res) I expect I won't be able to use the
result in calls to mysql_fetch_array() etc. But if $Res is passed by
reference as a function parameter and is copied to another variable the
result is not freed and I can still use it. 

I realize this is a VERY unlikely condition and I found it by accident
(mixed 2 lines of code and got surprised to see no error). Also this
might well be intentional behavior. Anyway, just in case. 

Reproduce code:
---
a($Res);

function a(&$Res){
$Res=mysql_query("Show Tables"); $Res1=$Res;
mysql_free_result($Res);
mysql_fetch_array($Res); //still works!
}

Expected result:

Warning: mysql_fetch_array(): 7 is not a valid MySQL result resource in

Actual result:
--
No errors





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


#26004 [Com]: $_POST variables not set when using enctype="multipart/form-data"

2007-07-03 Thread info at netsilik dot nl
 ID:   26004
 Comment by:   info at netsilik dot nl
 Reported By:  jacknorton101 at hotmail dot com
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: RedHat Linux 9
 PHP Version:  4.3.3
 New Comment:

Althoug I cannot reproduce the error myself some of my custommers
experience the bug described above.
And they pop-up in my error-log files

When reguesting a page with the POST method and the enctype is set to
"multipart/form-data", the $_POST suberglobal is left empty.

(Post requests without enctype="multipart/form-data" work fine.)

I've recently moved to PHP 5.1.6.
The exact same code worked fine for months on the previous version.


some php.ini settings (same as previous version):
  max_execution_time = 60
  max_input_time = 120
  memory_limit = 24M
  post_max_size = 8M
  file_uploads = On
  upload_max_filesize = 3M

The html-form: (the document is valid XHTML 1.0 Transitional)


  
  
  
  
  
  
  
  


I've not yet found a solutions for this VERY SERIOUS problem
If there is anyone that has a fix, please let me know.


Previous Comments:


[2007-05-11 04:56:29] no_patience at hotmail dot com

I worked around this injecting the values I wanted into the forms
"action" statement and using $_GET to extract these values, the file
uploading part then extracts its informaion from the POST part.

I was also seeing this happening with both IE and FF



[2007-05-10 08:47:07] dlodhia at yahoo dot com

hi, having same problem.

This is working fine with FF, but not with IE.

If its working fine with FF, it could not be problem with PHP.INI or
HTTD.CONF.

any suggestion what could be the reason?



[2006-08-10 06:25:06] cometfish at hotmail dot com

Hi, I had this same problem. I spent hours searching the web, but found
nothing except this:
--
from http://www.php.net/manual/en/features.file-upload.php
jason
09-Jan-2006 05:08 
Regarding empty $_FILES and $_POST arrays when uploading files larger
than post_max_size:
Tucked away in
http://us3.php.net/manual/en/ini.core.php#ini.post-max-size is this
nugget:
"If the size of post data is greater than post_max_size, the $_POST and
$_FILES superglobals are empty. This can be tracked in various ways,
e.g. by passing the $_GET variable to the script processing the data,
i.e. , and then checking if
$_GET['processed'] is set."
This may seem like a bug. You'd expect something like
UPLOAD_ERR_FORM_SIZE to be set. But you just two empty superglobals.
I've seen it submitted to bugs.php.net twice and it's been marked as
bogus both times. 


I saw this, and realised that my MAX_FILE_SIZE hidden form element was
missing. Inserting this fixed the problem immediately. My PHP version is
4.4.2. Hope this helps.



[2006-05-11 21:24:50] hostgeekz at gmail dot com

I am having this issue on PHP 5.0.4, and PHP 5.1.4

Exactly the same as stated above,
enctype="multipart/form-data"



[2006-04-07 08:07:58] timecop at gmail dot com

Yes this is still valid.
whats worse, if enctype=multipart/form-data,
NONE of the variables make it into $_POST.

PHP 5.1.2 / linux



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

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


#41885 [NEW]: The problem case by "phpsessid=deleted"

2007-07-03 Thread ivyrake at gmail dot com
From: ivyrake at gmail dot com
Operating system: linux
PHP version:  5.2.3
PHP Bug Type: Session related
Bug description:  The problem case by "phpsessid=deleted"

Description:

Perhaps it was my fault(i use the code:setcookie("PHPSESSID", "", time() -
3600);),but it make me very trouble.
Now and then my website user could access other's accounts by HIMSELF 
ID/Password!
This remained until I found some user's cookie['phpsessid']="deleted".
So I wrote some code in my login.php:
if ("deleted" == session_id())
{
exit();
}
.

later I traced the file head.c,I find that if setcookie("PHPSESSID", "") 
"PHPSESSID=deleted;expires=" will appear in HTTP head(for ie).It
really an accurate method? 

At the same time  I find that Cookie sent by user's browser has no
";expires=",only has "PHPSESSID=deleted", What can cause this appear? 

Sorry for my poor english:(


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


#41885 [Opn->Bgs]: The problem case by "phpsessid=deleted"

2007-07-03 Thread tony2001
 ID:   41885
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ivyrake at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: linux
 PHP Version:  5.2.3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2007-07-03 11:34:48] ivyrake at gmail dot com

Description:

Perhaps it was my fault(i use the code:setcookie("PHPSESSID", "",
time() - 3600);),but it make me very trouble.
Now and then my website user could access other's accounts by HIMSELF 
ID/Password!
This remained until I found some user's cookie['phpsessid']="deleted".
So I wrote some code in my login.php:
if ("deleted" == session_id())
{
exit();
}
.

later I traced the file head.c,I find that if setcookie("PHPSESSID",
"") 
"PHPSESSID=deleted;expires=" will appear in HTTP head(for
ie).It really an accurate method? 

At the same time  I find that Cookie sent by user's browser has no
";expires=",only has "PHPSESSID=deleted", What can cause this
appear? 

Sorry for my poor english:(






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


#41886 [NEW]: int added by float ended as not equal to float equavalent value

2007-07-03 Thread c00lways at gmail dot com
From: c00lways at gmail dot com
Operating system: windows xp prof sp 2
PHP version:  5.2.3
PHP Bug Type: Math related
Bug description:  int added by float ended as not equal to float equavalent 
value

Description:

int added by float ended as not equal to float equavalent value

Reproduce code:
---
//this output , not 1
echo isValidRange( 5.23, 1, 10, 0.01 );

//this output 1
//echo 5.23 == (1+4.23);



function isValidRange( $p_value, $p_start, $p_end, $p_step=1 )
{
//reverse step
if( $p_end < $p_start )
{
$p_step = -($p_step);
}
if( $p_step == 0.00 )
{
raiseError(1, "Invalid step: " . $p_step);
}
for( $c = $p_start; $c <= $p_end; $c+=$p_step )
{
//this part caused the problem
if( $p_value == $c )
{
return true;
}
   //if change it to
   //if( $p_value."" == $c."" )
   // then it works! return true



}
return false;
}



Expected result:

1

Actual result:
--


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


#41886 [Opn->Bgs]: int added by float ended as not equal to float equavalent value

2007-07-03 Thread tony2001
 ID:   41886
 Updated by:   [EMAIL PROTECTED]
 Reported By:  c00lways at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: windows xp prof sp 2
 PHP Version:  5.2.3
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.




Previous Comments:


[2007-07-03 11:42:22] c00lways at gmail dot com

Description:

int added by float ended as not equal to float equavalent value

Reproduce code:
---
//this output , not 1
echo isValidRange( 5.23, 1, 10, 0.01 );

//this output 1
//echo 5.23 == (1+4.23);



function isValidRange( $p_value, $p_start, $p_end, $p_step=1 )
{
//reverse step
if( $p_end < $p_start )
{
$p_step = -($p_step);
}
if( $p_step == 0.00 )
{
raiseError(1, "Invalid step: " . $p_step);
}
for( $c = $p_start; $c <= $p_end; $c+=$p_step )
{
//this part caused the problem
if( $p_value == $c )
{
return true;
}
   //if change it to
   //if( $p_value."" == $c."" )
   // then it works! return true



}
return false;
}



Expected result:

1

Actual result:
--






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


#41874 [Fbk->Opn]: php (CLI) exec function passes no stderr output

2007-07-03 Thread ckeefer at us dot nomura dot com
 ID:   41874
 User updated by:  ckeefer at us dot nomura dot com
 Reported By:  ckeefer at us dot nomura dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.3
 New Comment:

Thank you for the quick response.  The new version still shows no
STDERR output from a cmd.exe window.

Thanks

C:\php5.2fix>php test_exec.php
Two exec statements:
---
This exec should result in error for non-existant dir:
Array
(
)
---
This exec works:

Array
(
[0] =>  Volume in drive C is LOCAL DISK
[1] =>  Volume Serial Number is 4054-8345
[2] =>
[3] =>  Directory of C:\php5.2fix
[4] =>
[5] => 07/03/2007  08:08 AM32,821 php.exe
[6] =>1 File(s) 32,821 bytes
[7] =>0 Dir(s)  58,549,849,088 bytes free
)

C:\php5.2fix>
C:\php5.2fix>type test_exec.php



Previous Comments:


[2007-07-03 06:41:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2007-07-02 18:39:25] ckeefer at us dot nomura dot com

Description:

PHP CLI version 5.1.8 thru 5.2.1 Windows Binary - exec() function, when
error is generated passes STDERR no problem to CLI window.  5.2.2+
STDERR output has vanished.  Nothing in documentation or search suggests
what happened.  No other changes 5.2.1 just downloaded and tested with
generic setup (no php.ini or other modifications) stderr from exec()
functions perfectly.  5.2.2+ system() apparently passes stderr properly,
but is not useful for most of what we do. STDOUT appears to be fine all
versions.

Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1

Note in 5.2.2 changelog contains this bit:
- Fixed commandline handling for CLI and CGI. (Marcus, Johannes)


Thanks,

Chip Keefer

Reproduce code:
---



Expected result:

NJPC3916:php5.22$ php test_exec.php 
php test_exec.php 
The system cannot find the path specified.

- Works properly with cygwin

Actual result:
--
C:\php5.22>php test_exec.php


C:\php5.22>

No STDERR





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


#41888 [NEW]: Segfault when attempting to update PDO LOB column in a stream wrapper

2007-07-03 Thread hans at velum dot net
From: hans at velum dot net
Operating system: Gentoo Linux
PHP version:  5.2.3
PHP Bug Type: PDO related
Bug description:  Segfault when attempting to update PDO LOB column in a stream 
wrapper

Description:

I am trying to use PDO LOB columns with PostgreSQL within a user-defined
stream wrapper class.  PDO is correctly handling the LOB with PostgreSQL as
stream resources; however, when I attempt to update a LOB column using
another stream (e.g. php://temp, php://memory) in my stream_flush()
command, I get a segmentation fault.

Reproduce code:
---
I was able to create a basic reproduce case; however, it is more than 20
lines of code.

Here is a link to a snippet that creates the stream wrapper and attempts
to perform an update:

http://pastebin.com/941246

This consistently segfaults in my environment.

Expected result:

No segfault.

Actual result:
--
Segfault.  I have PHP compiled w/ debug flags; however, the backtrace in
this case is very unhelpful.


Program terminated with signal 11, Segmentation fault.
#0  0x0830aabd in _zval_dtor_func ()
(gdb) bt
#0  0x0830aabd in _zval_dtor_func ()
#1  0x082fdf90 in ?? ()
#2  0x0870bf34 in ?? ()
#3  0x085bdec4 in ?? ()
#4  0x0023 in ?? ()
#5  0x085c0268 in ?? ()
#6  0x0001 in ?? ()
#7  0x0001 in ?? ()
#8  0xbf8f0108 in ?? ()
#9  0x082fe146 in _zval_ptr_dtor ()
Backtrace stopped: frame did not save the PC
(gdb)


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


#41888 [Opn->Asn]: Segfault when attempting to update PDO LOB column in a stream wrapper

2007-07-03 Thread tony2001
 ID:   41888
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hans at velum dot net
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Gentoo Linux
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2007-07-03 12:58:52] hans at velum dot net

Description:

I am trying to use PDO LOB columns with PostgreSQL within a
user-defined stream wrapper class.  PDO is correctly handling the LOB
with PostgreSQL as stream resources; however, when I attempt to update a
LOB column using another stream (e.g. php://temp, php://memory) in my
stream_flush() command, I get a segmentation fault.

Reproduce code:
---
I was able to create a basic reproduce case; however, it is more than
20 lines of code.

Here is a link to a snippet that creates the stream wrapper and
attempts to perform an update:

http://pastebin.com/941246

This consistently segfaults in my environment.

Expected result:

No segfault.

Actual result:
--
Segfault.  I have PHP compiled w/ debug flags; however, the backtrace
in this case is very unhelpful.


Program terminated with signal 11, Segmentation fault.
#0  0x0830aabd in _zval_dtor_func ()
(gdb) bt
#0  0x0830aabd in _zval_dtor_func ()
#1  0x082fdf90 in ?? ()
#2  0x0870bf34 in ?? ()
#3  0x085bdec4 in ?? ()
#4  0x0023 in ?? ()
#5  0x085c0268 in ?? ()
#6  0x0001 in ?? ()
#7  0x0001 in ?? ()
#8  0xbf8f0108 in ?? ()
#9  0x082fe146 in _zval_ptr_dtor ()
Backtrace stopped: frame did not save the PC
(gdb)






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


#41878 [Fbk->Opn]: special characters where not displayed as graphic

2007-07-03 Thread letters at rmroppert dot de
 ID:   41878
 User updated by:  letters at rmroppert dot de
 Reported By:  letters at rmroppert dot de
-Status:   Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: NetBSD (different Versions)
 PHP Version:  4.4.7
 Assigned To:  pajoye
 New Comment:

Hello,
thank you for the answer.

I thought it is utf-8, because the function mb_detect_encoding gives
utf-8.

After your answer i testet it with
function is_utf8($string) {
   
// From http://w3.org/International/questions/qa-forms-utf-8.html
return preg_match('%^(?:
  [\x09\x0A\x0D\x20-\x7E]# ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|  \xE0[\xA0-\xBF][\x80-\xBF]# excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
|  \xED[\x80-\x9F][\x80-\xBF]# excluding surrogates
|  \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3}  # planes 4-15
|  \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$%xs', $string);
   
}

and this gives 0, also not utf-8. :-(

I quickly made this test:
I use char("äüö") it gives 228 which is correct ISO... "ä",
then utf8_encode("äüö") and testing with the function is_utf8 gives 1,
also the string seems now to be utf-8 encoded.
If i now send this converted string to "imagettftext" the result is
again one square and ö.
Possibly i made something wrong, because i am not an php programmer.  
But for me it seems, that the code of two characters become one utf-8
character. 

I am making more tests next days an then i tell the results.
If someone can tell some futher tests, i will do them an post the
results.


Previous Comments:


[2007-07-03 08:59:25] [EMAIL PROTECTED]

Do you use UTF-8? Text has to be given in UTF-8. If not, it may cause
some troubles by the encoding detection or the glyph selection in
freetype (esp. when the font only has utf-8).





[2007-07-02 23:23:42] letters at rmroppert dot de

Description:

 want to put special characters (german umlauts) into an image.
I use imagettftext() and the string "( ä ü ö xx Ä Ü Ö ß ) without
blanks ( äüöxxÄÜÖß )".
If i put an blank around the characters it works without blanks there
squares.
You see the result on:
http://heisenberg.rmroppert.com/test/gd_php_out.pdf

I tried the same on different machines (i386) under different NETBSD
Versions (NetBSD 1.6, NetBSD 3.0.1, NetBSD 3.1)
and different php versions.

You may find the output of phpinfo of our testserver under:
http://heisenberg.rmroppert.com/test/phpinfo1.pdf

I think this is an problem of th built-in version og gd. Perhaps the
image is correct if i use perl and gnuplot. 

Reproduce code:
---



Expected result:

see links in Description







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


#41886 [Bgs->Opn]: int added by float ended as not equal to float equavalent value

2007-07-03 Thread c00lways at gmail dot com
 ID:   41886
 User updated by:  c00lways at gmail dot com
 Reported By:  c00lways at gmail dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Math related
 Operating System: windows xp prof sp 2
 PHP Version:  5.2.3
 New Comment:

Hi,

if what you states is true,
how come:

//this output 1
//echo 5.23 == (1+4.23);


Previous Comments:


[2007-07-03 11:46:03] [EMAIL PROTECTED]

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.





[2007-07-03 11:42:22] c00lways at gmail dot com

Description:

int added by float ended as not equal to float equavalent value

Reproduce code:
---
//this output , not 1
echo isValidRange( 5.23, 1, 10, 0.01 );

//this output 1
//echo 5.23 == (1+4.23);



function isValidRange( $p_value, $p_start, $p_end, $p_step=1 )
{
//reverse step
if( $p_end < $p_start )
{
$p_step = -($p_step);
}
if( $p_step == 0.00 )
{
raiseError(1, "Invalid step: " . $p_step);
}
for( $c = $p_start; $c <= $p_end; $c+=$p_step )
{
//this part caused the problem
if( $p_value == $c )
{
return true;
}
   //if change it to
   //if( $p_value."" == $c."" )
   // then it works! return true



}
return false;
}



Expected result:

1

Actual result:
--






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


#41886 [Opn->Fbk]: int added by float ended as not equal to float equavalent value

2007-07-03 Thread tony2001
 ID:   41886
 Updated by:   [EMAIL PROTECTED]
 Reported By:  c00lways at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Math related
 Operating System: windows xp prof sp 2
 PHP Version:  5.2.3
 New Comment:

Read this please:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm


Previous Comments:


[2007-07-03 13:52:09] c00lways at gmail dot com

Hi,

if what you states is true,
how come:

//this output 1
//echo 5.23 == (1+4.23);



[2007-07-03 11:46:03] [EMAIL PROTECTED]

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.





[2007-07-03 11:42:22] c00lways at gmail dot com

Description:

int added by float ended as not equal to float equavalent value

Reproduce code:
---
//this output , not 1
echo isValidRange( 5.23, 1, 10, 0.01 );

//this output 1
//echo 5.23 == (1+4.23);



function isValidRange( $p_value, $p_start, $p_end, $p_step=1 )
{
//reverse step
if( $p_end < $p_start )
{
$p_step = -($p_step);
}
if( $p_step == 0.00 )
{
raiseError(1, "Invalid step: " . $p_step);
}
for( $c = $p_start; $c <= $p_end; $c+=$p_step )
{
//this part caused the problem
if( $p_value == $c )
{
return true;
}
   //if change it to
   //if( $p_value."" == $c."" )
   // then it works! return true



}
return false;
}



Expected result:

1

Actual result:
--






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


#41886 [Fbk->Bgs]: int added by float ended as not equal to float equavalent value

2007-07-03 Thread tony2001
 ID:   41886
 Updated by:   [EMAIL PROTECTED]
 Reported By:  c00lways at gmail dot com
-Status:   Feedback
+Status:   Bogus
 Bug Type: Math related
 Operating System: windows xp prof sp 2
 PHP Version:  5.2.3
 New Comment:

.


Previous Comments:


[2007-07-03 14:06:56] [EMAIL PROTECTED]

Read this please:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm



[2007-07-03 13:52:09] c00lways at gmail dot com

Hi,

if what you states is true,
how come:

//this output 1
//echo 5.23 == (1+4.23);



[2007-07-03 11:46:03] [EMAIL PROTECTED]

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.





[2007-07-03 11:42:22] c00lways at gmail dot com

Description:

int added by float ended as not equal to float equavalent value

Reproduce code:
---
//this output , not 1
echo isValidRange( 5.23, 1, 10, 0.01 );

//this output 1
//echo 5.23 == (1+4.23);



function isValidRange( $p_value, $p_start, $p_end, $p_step=1 )
{
//reverse step
if( $p_end < $p_start )
{
$p_step = -($p_step);
}
if( $p_step == 0.00 )
{
raiseError(1, "Invalid step: " . $p_step);
}
for( $c = $p_start; $c <= $p_end; $c+=$p_step )
{
//this part caused the problem
if( $p_value == $c )
{
return true;
}
   //if change it to
   //if( $p_value."" == $c."" )
   // then it works! return true



}
return false;
}



Expected result:

1

Actual result:
--






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


#41878 [Opn->Fbk]: special characters where not displayed as graphic

2007-07-03 Thread tony2001
 ID:   41878
 Updated by:   [EMAIL PROTECTED]
 Reported By:  letters at rmroppert dot de
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: NetBSD (different Versions)
 PHP Version:  4.4.7
 Assigned To:  pajoye


Previous Comments:


[2007-07-03 13:50:26] letters at rmroppert dot de

Hello,
thank you for the answer.

I thought it is utf-8, because the function mb_detect_encoding gives
utf-8.

After your answer i testet it with
function is_utf8($string) {
   
// From http://w3.org/International/questions/qa-forms-utf-8.html
return preg_match('%^(?:
  [\x09\x0A\x0D\x20-\x7E]# ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|  \xE0[\xA0-\xBF][\x80-\xBF]# excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
|  \xED[\x80-\x9F][\x80-\xBF]# excluding surrogates
|  \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3}  # planes 4-15
|  \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$%xs', $string);
   
}

and this gives 0, also not utf-8. :-(

I quickly made this test:
I use char("äüö") it gives 228 which is correct ISO... "ä",
then utf8_encode("äüö") and testing with the function is_utf8 gives 1,
also the string seems now to be utf-8 encoded.
If i now send this converted string to "imagettftext" the result is
again one square and ö.
Possibly i made something wrong, because i am not an php programmer.  
But for me it seems, that the code of two characters become one utf-8
character. 

I am making more tests next days an then i tell the results.
If someone can tell some futher tests, i will do them an post the
results.



[2007-07-03 08:59:25] [EMAIL PROTECTED]

Do you use UTF-8? Text has to be given in UTF-8. If not, it may cause
some troubles by the encoding detection or the glyph selection in
freetype (esp. when the font only has utf-8).





[2007-07-02 23:23:42] letters at rmroppert dot de

Description:

 want to put special characters (german umlauts) into an image.
I use imagettftext() and the string "( ä ü ö xx Ä Ü Ö ß ) without
blanks ( äüöxxÄÜÖß )".
If i put an blank around the characters it works without blanks there
squares.
You see the result on:
http://heisenberg.rmroppert.com/test/gd_php_out.pdf

I tried the same on different machines (i386) under different NETBSD
Versions (NetBSD 1.6, NetBSD 3.0.1, NetBSD 3.1)
and different php versions.

You may find the output of phpinfo of our testserver under:
http://heisenberg.rmroppert.com/test/phpinfo1.pdf

I think this is an problem of th built-in version og gd. Perhaps the
image is correct if i use perl and gnuplot. 

Reproduce code:
---



Expected result:

see links in Description







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


#41889 [NEW]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
From: roman dot vanicek at gmail dot com
Operating system: Ubuntu Linux 6.06
PHP version:  5.2.3
PHP Bug Type: Reproducible crash
Bug description:  file_get_contents crashes on some SSL sites

Description:

I have a PHP compiled with OpenSSL support. Calling function
file_get_contents with an URL should give me a string but it crashes
instead (segmentation fault).

If my PHP runs as CLI or Apache2 module, it works fine. If my PHP runs as
Apache1.3 module, it segfaults.

With HTTP url, it works. With HTTPS url it works for some sites and
crashes for others.

With PHP version 5.2.0, everything works fine under the same circumstances
(Apache1.3 module, HTTPS, same sites).



Reproduce code:
---
https://www.mikropost.cz/index.php"; );

var_dump($s);

?>

Expected result:

The contents of the web-page.

Actual result:
--
Nothing - Apache process ends with segmentation fault.

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


#41889 [Opn->Fbk]: file_get_contents crashes on some SSL sites

2007-07-03 Thread tony2001
 ID:   41889
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:


[2007-07-03 14:21:59] roman dot vanicek at gmail dot com

Description:

I have a PHP compiled with OpenSSL support. Calling function
file_get_contents with an URL should give me a string but it crashes
instead (segmentation fault).

If my PHP runs as CLI or Apache2 module, it works fine. If my PHP runs
as Apache1.3 module, it segfaults.

With HTTP url, it works. With HTTPS url it works for some sites and
crashes for others.

With PHP version 5.2.0, everything works fine under the same
circumstances (Apache1.3 module, HTTPS, same sites).



Reproduce code:
---
https://www.mikropost.cz/index.php"; );

var_dump($s);

?>

Expected result:

The contents of the web-page.

Actual result:
--
Nothing - Apache process ends with segmentation fault.





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


#41861 [Asn->Csd]: getNamespaces() returns the namespaces of a node's siblings

2007-07-03 Thread rrichards
 ID:  41861
 Updated by:  [EMAIL PROTECTED]
 Reported By: hubert dot roksor at gmail dot com
-Status:  Assigned
+Status:  Closed
 Bug Type:SimpleXML related
 PHP Version: 5CVS-2007-06-30 (CVS)
 Assigned To: rrichards
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2007-06-30 17:12:02] hubert dot roksor at gmail dot com

Description:

In addition to a node's own namespaces, getNamespaces() seems to return
the namespaces of its latter siblings.

In the reproduce code below, we create a tree composed of 5 nodes: the
first and last nodes have no namespaces and the 3 nodes in-between each
have their own namespace. We observe that getNamespaces() returns all 3
namespaces for the first node, altough it should have none, then 3, 2, 1
namespaces for the subsequent nodes (which should only have one each)
then finally no namespace for the last node, as expected.

children(), on the other hand, behaves correctly and does not find the
nodes under those "extra" namespaces so I guess the problem is located
in getNamespaces().

Thanks for reading :]


Tested on:

PHP 5.2.4-dev (cli) (built: Jun 30 2007 12:04:20)
WinXP
libxml2 2.6.26
SimpleXML Revision: 1.151.2.22.2.29

PHP 5.2.2-pl1-gentoo (cli) (built: May 24 2007 00:26:35)
libxml 2.6.27
SimpleXML Revision: 1.151.2.22.2.26

Reproduce code:
---
$xml = simplexml_load_string('






');

foreach (array(null, '#ns1', '#ns2', '#ns3') as $ns)
{
foreach ($xml->children($ns) as $child)
{
$name = $child->getName();
$namespaces = $child->getNamespaces(false);

echo "children($ns) has found '$name' -- Its namespaces: ",
implode(', ', $namespaces), "\n";
}
}

Expected result:

children() has found 'first_node_no_ns' -- Its namespaces: #ns1, #ns2,
#ns3
children() has found 'last_node_no_ns' -- Its namespaces:
children(#ns1) has found 'node1' -- Its namespaces: #ns1, #ns2, #ns3
children(#ns2) has found 'node2' -- Its namespaces: #ns2, #ns3
children(#ns3) has found 'node3' -- Its namespaces: #ns3

Actual result:
--
children() has found 'first_node_no_ns' -- Its namespaces:
children() has found 'last_node_no_ns' -- Its namespaces:
children(#ns1) has found 'node1' -- Its namespaces: #ns1
children(#ns2) has found 'node2' -- Its namespaces: #ns2
children(#ns3) has found 'node3' -- Its namespaces: #ns3





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


#41889 [Fbk->Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

The stack trace (--disable-debug).

#3  0xb7f4eb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb65c2115 in __do_global_dtors_aux ()
   from /usr/local/lib/oracli/libclntsh.so.10.1
#5  0xb71120be in _fini () from
/usr/local/lib/oracli/libclntsh.so.10.1
#6  0xb7f4f8f4 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#7  0xb7cd75d7 in exit () from /lib/tls/i686/cmov/libc.so.6
#8  0x0805dd58 in ap_start_restart ()
#9  0x0805f070 in ap_update_child_status ()
#10 0x08060e0f in main ()
(gdb)

The stack trace (--enable-debug).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211394368 (LWP 13339)]
0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
(gdb) bt
#0  0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#1  0xb7f597c9 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#2  0xb7f5cbf6 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#3  0xb7f5cb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb6303055 in A_X931RandomContextDestroy ()
   from /usr/local/lib/oracli/libnnz10.so
#5  0xb7c1f7d6 in ssl3_get_key_exchange ()
   from /usr/lib/i686/cmov/libssl.so.0.9.8
#6  0xb7c22207 in ssl3_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#7  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#8  0xb7c287ce in ssl23_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#9  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#10 0xb19a782e in php_openssl_enable_crypto (stream=0x8115de4,
sslsock=0x8115d80, cparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/ext/openssl/xp_ssl.c:418
#11 0xb19a72a5 in php_openssl_sockop_set_option (stream=0x8115de4,
option=8,
value=0, ptrparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/ext/openssl/xp_ssl.c:666
#12 0xb1c13631 in _php_stream_set_option (stream=0x8115de4, option=8,
value=0,
ptrparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/main/streams/streams.c:1133
#13 0xb1c2132e in php_stream_xport_crypto_enable (stream=0x8115de4,
activate=1)
at /root/build/php/php-5.2.3/main/streams/transports.c:371
---Type  to continue, or q  to quit---


Previous Comments:


[2007-07-03 14:56:30] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2007-07-03 14:21:59] roman dot vanicek at gmail dot com

Description:

I have a PHP compiled with OpenSSL support. Calling function
file_get_contents with an URL should give me a string but it crashes
instead (segmentation fault).

If my PHP runs as CLI or Apache2 module, it works fine. If my PHP runs
as Apache1.3 module, it segfaults.

With HTTP url, it works. With HTTPS url it works for some sites and
crashes for others.

With PHP version 5.2.0, everything works fine under the same
circumstances (Apache1.3 module, HTTPS, same sites).



Reproduce code:
---
https://www.mikropost.cz/index.php"; );

var_dump($s);

?>

Expected result:

The contents of the web-page.

Actual result:
--
Nothing - Apache process ends with segmentation fault.





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


#41889 [Opn->Fbk]: file_get_contents crashes on some SSL sites

2007-07-03 Thread sniper
 ID:   41889
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Are each and every one of those extensions linked with same SSL
libraries? And none of them is linked with static ssl libs?


Previous Comments:


[2007-07-03 15:38:16] roman dot vanicek at gmail dot com

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

The stack trace (--disable-debug).

#3  0xb7f4eb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb65c2115 in __do_global_dtors_aux ()
   from /usr/local/lib/oracli/libclntsh.so.10.1
#5  0xb71120be in _fini () from
/usr/local/lib/oracli/libclntsh.so.10.1
#6  0xb7f4f8f4 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#7  0xb7cd75d7 in exit () from /lib/tls/i686/cmov/libc.so.6
#8  0x0805dd58 in ap_start_restart ()
#9  0x0805f070 in ap_update_child_status ()
#10 0x08060e0f in main ()
(gdb)

The stack trace (--enable-debug).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211394368 (LWP 13339)]
0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
(gdb) bt
#0  0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#1  0xb7f597c9 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#2  0xb7f5cbf6 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#3  0xb7f5cb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb6303055 in A_X931RandomContextDestroy ()
   from /usr/local/lib/oracli/libnnz10.so
#5  0xb7c1f7d6 in ssl3_get_key_exchange ()
   from /usr/lib/i686/cmov/libssl.so.0.9.8
#6  0xb7c22207 in ssl3_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#7  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#8  0xb7c287ce in ssl23_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#9  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#10 0xb19a782e in php_openssl_enable_crypto (stream=0x8115de4,
sslsock=0x8115d80, cparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/ext/openssl/xp_ssl.c:418
#11 0xb19a72a5 in php_openssl_sockop_set_option (stream=0x8115de4,
option=8,
value=0, ptrparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/ext/openssl/xp_ssl.c:666
#12 0xb1c13631 in _php_stream_set_option (stream=0x8115de4, option=8,
value=0,
ptrparam=0xbfe5fd30)
at /root/build/php/php-5.2.3/main/streams/streams.c:1133
#13 0xb1c2132e in php_stream_xport_crypto_enable (stream=0x8115de4,
activate=1)
at /root/build/php/php-5.2.3/main/streams/transports.c:371
---Type  to continue, or q  to quit---



[2007-07-03 14:56:30] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2007-07-03 14:21:59] roman dot vanicek at gmail dot com

Description:

I have a PHP compiled with OpenSSL support. Calling function
file_get_contents with an URL should give me a string but it crashes
instead (segmentation fault).

If my PHP runs as CLI or Apache2 module, it works fine. If my PHP runs
as Apache1.3 module, it segfaults.

With HTTP url, it works. With HTTPS url it works for some sites and
crashes for others.

With PHP version 5.2.0, everything works fine under the same
circumstances (Apache1.3 module, HTTPS, same sites).



Reproduce code:
---
https://www.mikropost.cz/index.php"; );

var_dump($s);

?>

Expected result:

The contents of the web-page.

Actual result:
--
Nothing - Apache process ends with segmentation fault.





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


#41889 [Fbk->Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7889000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7867000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7864000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb784f000)
 libz.so.1 => /usr/lib/libz.so.1 (0xb783a000)
 libiodbc.so.2 => /usr/lib/libiodbc.so.2 (0xb77f7000)
 libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb76e8000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75b9000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75a7000)
 /lib/ld-linux.so.2 (0x8000)
 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb74ec000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xb74ab000)
 libiodbcinst.so.2 => /usr/lib/libiodbcinst.so.2 (0xb7499000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb748f000)



ldd oci8.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7189000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7054000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e4c000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e2a000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e18000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e03000)
 /lib/ld-linux.so.2 (0x8000)

ldd pdo_oci.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7194000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb705f000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5b000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e57000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e35000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e23000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e0e000)
 /lib/ld-linux.so.2 (0x8000)


Previous Comments:


[2007-07-03 15:42:30] [EMAIL PROTECTED]

Are each and every one of those extensions linked with same SSL
libraries? And none of them is linked with static ssl libs?



[2007-07-03 15:38:16] roman dot vanicek at gmail dot com

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

The stack trace (--disable-debug).

#3  0xb7f4eb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb65c2115 in __do_global_dtors_aux ()
   from /usr/local/lib/oracli/libclntsh.so.10.1
#5  0xb71120be in _fini () from
/usr/local/lib/oracli/libclntsh.so.10.1
#6  0xb7f4f8f4 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#7  0xb7cd75d7 in exit () from /lib/tls/i686/cmov/libc.so.6
#8  0x0805dd58 in ap_start_restart ()
#9  0x0805f070 in ap_update_child_status ()
#10 0x08060e0f in main ()
(gdb)

The stack trace (--enable-debug).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211394368 (LWP 13339)]
0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
(gdb) bt
#0  0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#1  0xb7f597c9 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#2  0xb7f5cbf6 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#3  0xb7f5cb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb6303055 in A_X931RandomContextDestroy ()
   from /usr/local/lib/oracli/libnnz10.so
#5  0xb7c1f7d6 in ssl3_get_key_exchange ()
   from /usr/lib/i686/cmov/libssl.so.0.9.8
#6  0xb7c22207 in ssl3_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#7  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#8  0xb7c287ce in ssl23_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#9  0xb7c345f4 in SSL_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#10 0xb19a782e in php_openssl_enable_cryp

#41889 [Opn->Fbk]: file_get_contents crashes on some SSL sites

2007-07-03 Thread tony2001
 ID:   41889
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.


Previous Comments:


[2007-07-03 15:54:02] roman dot vanicek at gmail dot com

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7889000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7867000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7864000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb784f000)
 libz.so.1 => /usr/lib/libz.so.1 (0xb783a000)
 libiodbc.so.2 => /usr/lib/libiodbc.so.2 (0xb77f7000)
 libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb76e8000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75b9000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75a7000)
 /lib/ld-linux.so.2 (0x8000)
 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb74ec000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xb74ab000)
 libiodbcinst.so.2 => /usr/lib/libiodbcinst.so.2 (0xb7499000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb748f000)



ldd oci8.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7189000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7054000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e4c000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e2a000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e18000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e03000)
 /lib/ld-linux.so.2 (0x8000)

ldd pdo_oci.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7194000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb705f000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5b000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e57000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e35000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e23000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e0e000)
 /lib/ld-linux.so.2 (0x8000)



[2007-07-03 15:42:30] [EMAIL PROTECTED]

Are each and every one of those extensions linked with same SSL
libraries? And none of them is linked with static ssl libs?



[2007-07-03 15:38:16] roman dot vanicek at gmail dot com

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

The stack trace (--disable-debug).

#3  0xb7f4eb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb65c2115 in __do_global_dtors_aux ()
   from /usr/local/lib/oracli/libclntsh.so.10.1
#5  0xb71120be in _fini () from
/usr/local/lib/oracli/libclntsh.so.10.1
#6  0xb7f4f8f4 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#7  0xb7cd75d7 in exit () from /lib/tls/i686/cmov/libc.so.6
#8  0x0805dd58 in ap_start_restart ()
#9  0x0805f070 in ap_update_child_status ()
#10 0x08060e0f in main ()
(gdb)

The stack trace (--enable-debug).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211394368 (LWP 13339)]
0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
(gdb) bt
#0  0xb7f593d3 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#1  0xb7f597c9 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#2  0xb7f5cbf6 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#3  0xb7f5cb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb6303055 in A_X931RandomContextDestroy ()
   from /usr/local/lib/oracli/libnnz10.so
#5  0xb7c1f7d6 in ssl3_get_key_exchange ()
   from /usr/lib/i686/cmov/libssl.so.0.9.8
#6  0xb7c22207 in ssl3_connect () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#7  0xb7c345f4 in S

#41810 [Bgs->Opn]: Unable to catch Parse Errors

2007-07-03 Thread d dot albano at gmail dot com
 ID:   41810
 User updated by:  d dot albano at gmail dot com
 Reported By:  d dot albano at gmail dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.3
 New Comment:

Looking to the code looks simply to do the modification, naturally, as
you said, the problem is testing.

However i founded an eval behaviour to support my feature request: if
there is a parse error execution continues

Can be that this is a bug or an unwanted behaviour, however nothing
start to work strange after that a parse error was outputted.

So, if all works with eval why it shouldn't work correctly with normal
parse errors?

Here there is some example code:


It output
BEGIN
Parse error: syntax error, unexpected '-', expecting '}' in
C:\web\htdocs\test.php(5) : eval()'d code on line 1
END


Previous Comments:


[2007-06-26 13:07:22] d dot albano at gmail dot com

When i said:
> If it remains in a unstable state there is serious problem somewhere

i answered to your phrase:
> After parse error the parser/compiler and whole engine may be in
unstable state

If parsing a file may put the entire engine in an unstable state there
is a problem: never heard that a parser can do this

The problem can be that the engine is written to shutdown after a
parser error and this is can cause troubles i think, but the problem is
that i'm not zend/php developer :)

However i don't think that is necessary to rewrite the engine from the
scracth, a feature like this, at logic level, must follow rules followed
by other errors

This afternoon i'll take a look to the parser and to the zend engine to
understand how errors are passed

Thanks a lot
Bye



[2007-06-26 12:43:06] [EMAIL PROTECTED]

>If it remains in a unstable state there is serious problem somewhere
:\
I don't think so, but you're encouraged to help us, the sources are
open after all.

I'm sure nobody is going to rewrite the engine from scratch using some
other tools just because you want to catch parse errors.
So there is no sense to keep this feature request open.



[2007-06-26 12:34:37] d dot albano at gmail dot com

if parser, before to compile and execute, check the code to see if the
syntax is right how can remain the engine in an unstable state?



[2007-06-26 12:31:16] d dot albano at gmail dot com

If there is a parse error, this error stop parsing of scripting engine,
and this is ok, but where is the problem? And why it should remain in an
unstable state? This doesn't make sense: it's parsing php code ... it
isin't executing it

If it remains in a unstable state there is serious problem somewhere :\



[2007-06-26 11:49:38] [EMAIL PROTECTED]

After parse error the parser/compiler and whole engine may be in
unstable state, hence it's impossible to catch it as well as any other
fatal errors.
They are fatal errors just because of that.



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

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


#41810 [Opn->Bgs]: Unable to catch Parse Errors

2007-07-03 Thread tony2001
 ID:   41810
 Updated by:   [EMAIL PROTECTED]
 Reported By:  d dot albano at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:


[2007-07-03 16:29:58] d dot albano at gmail dot com

Looking to the code looks simply to do the modification, naturally, as
you said, the problem is testing.

However i founded an eval behaviour to support my feature request: if
there is a parse error execution continues

Can be that this is a bug or an unwanted behaviour, however nothing
start to work strange after that a parse error was outputted.

So, if all works with eval why it shouldn't work correctly with normal
parse errors?

Here there is some example code:


It output
BEGIN
Parse error: syntax error, unexpected '-', expecting '}' in
C:\web\htdocs\test.php(5) : eval()'d code on line 1
END



[2007-06-26 13:07:22] d dot albano at gmail dot com

When i said:
> If it remains in a unstable state there is serious problem somewhere

i answered to your phrase:
> After parse error the parser/compiler and whole engine may be in
unstable state

If parsing a file may put the entire engine in an unstable state there
is a problem: never heard that a parser can do this

The problem can be that the engine is written to shutdown after a
parser error and this is can cause troubles i think, but the problem is
that i'm not zend/php developer :)

However i don't think that is necessary to rewrite the engine from the
scracth, a feature like this, at logic level, must follow rules followed
by other errors

This afternoon i'll take a look to the parser and to the zend engine to
understand how errors are passed

Thanks a lot
Bye



[2007-06-26 12:43:06] [EMAIL PROTECTED]

>If it remains in a unstable state there is serious problem somewhere
:\
I don't think so, but you're encouraged to help us, the sources are
open after all.

I'm sure nobody is going to rewrite the engine from scratch using some
other tools just because you want to catch parse errors.
So there is no sense to keep this feature request open.



[2007-06-26 12:34:37] d dot albano at gmail dot com

if parser, before to compile and execute, check the code to see if the
syntax is right how can remain the engine in an unstable state?



[2007-06-26 12:31:16] d dot albano at gmail dot com

If there is a parse error, this error stop parsing of scripting engine,
and this is ok, but where is the problem? And why it should remain in an
unstable state? This doesn't make sense: it's parsing php code ... it
isin't executing it

If it remains in a unstable state there is serious problem somewhere :\



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

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


#41393 [Asn]: affected can't return

2007-07-03 Thread fmk
 ID:   41393
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hack988 at gmail dot com
 Status:   Assigned
 Bug Type: MSSQL related
 Operating System: windows 2003
 PHP Version:  4.4.7
 Assigned To:  fmk
 New Comment:

The MSSQL server returns two result sets. The first one for the status
of the IF statement and the second for the insert.

The current implementation will not allow you to access the second
result set (the first one must contain columns for the system to
establish multiple result sets).

Workaround:

Use transactions and two querie. One to check if the row exists and one
to insert the row.



Previous Comments:


[2007-05-15 04:13:50] hack988 at gmail dot com

Description:

after executed sql query like that
IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName = 'rrgrrg'))
INSERT INTO NumberGroup(GroupName, AddTime) VALUES ('rrgrrg', 1);

an executed mssql_rows_affected alway return 0 either GroupName=
'rrgrrg' not in database

Reproduce code:
---
i have no idea to deal with this problem by myself

Expected result:

mssql_query("IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName
= 'rrgrrg')) INSERT INTO NumberGroup(GroupName, AddTime) VALUES
('rrgrrg', 1);");

var_dump(mssql_affected_rows($dblink);









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


#41736 [Com]: Mixed up characters in UTF-8 database with Hebrew via FreeTDS

2007-07-03 Thread www dot php dot net at landroverz dot com
 ID:   41736
 Comment by:   www dot php dot net at landroverz dot com
 Reported By:  www dot php dot net at landrovez dot com
 Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Fedora Core 6, Kernel: 2.6.20
 PHP Version:  5.2.3
 Assigned To:  fmk
 New Comment:

screenshot example:
http://landroverz.com/pics/php5-mssql-bad-output-demo.jpg

The red color shows the jumping char.
The blue color shows the missing char.. which is gone somewhere.


Previous Comments:


[2007-06-19 10:19:36] www dot php dot net at landrovez dot com

Description:

I'm running FreeTDS version 0.64 ( latest + stable ) connecting to
mssql  2000 database.

At the FreeTDS config located at: /etc/freetds.conf I've specified 
tds version = 8.0 
client charset = UTF-8

at the related connection, so far so good. it works.

The problem starts printing the data from the database.

When the last char of the selected array that I get from the DB query
is a hebrew char it moves it to the next position in the array for some
reason.

It only happens when the last char is hebrew, if the last char is "."
for example it works just fine.

I think its something to do with UTF-8.



Reproduce code:
---
$mssql = mssql_connect("SQLSERVER", "root", "PASSWORD");
$mssql_db = mssql_select_db("devel_table", $mssql);

$download_id = "1";

$download_res = mssql_query("SELECT ID, Title, Description, URL FROM
tblDemo WHERE Download_ID = '$download_id'");

$download = mssql_fetch_array($download_res);

echo ""
  print_r($download[Title]);
echo "";

Expected result:

Array
(
[0] => 1
[ID] => 1

[1] => THE BEST GAME IN THE WORLD
[Title] => THE BEST GAME IN THE WORLD

[2] => DOWNLOADS THIS GREAT GAME NOW
[Description] => DOWNLOADS THIS GREAT GAME NOW

[3] => http://sample.com/download.zip
[URL] => http://sample.com/download.zip
)


Actual result:
--
Array
(
[0] => 1
[ID] => 1

[1] => THE BEST GAME IN THE WORL
[Title] => THE BEST GAME IN THE WORL

[2] => DDOWNLOADS THIS GREAT GAME NO
[Description] => DDOWNLOADS THIS GREAT GAME NO

[3] => Whttp://sample.com/download.zip
[URL] => Whttp://sample.com/download.zip
)

*** the title should have been at hebrew for this bug to happen, for
your continence the title and description are set to English just to
show the example. 

As you can see it took the LAST hebrew letter from the END of the vchar
and moved it to the NEXT one by the select order.





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


#41889 [Fbk->Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Yes, I think you are right. It is probably some clash between the
specific versions of Apache/mod_ssl, OpenSSL, PHP/OCI modules and
Instantclient.

Even though I don't understand, why this clash isn't reported during
the linking or the loading of the libraries.

I have tried with the newest instantclient and there is no change.

Just to summarize, I have:
Ubuntu Linux 6.06
Apache 1.3.34 with mod_ssl 2.8.25
OpenSSL 0.9.8a
PHP 5.3.2 with oci8.so a pdo_oci.so as dynamic modules at the same
time
Instantclient 10.1.0.5.

Last notice: If pdo_oci is compiled statically into PHP and oci8
dynamically (it refuses to be built static), it works fine. I think I
can accept this as a workaround.

And if there is someone else unfortunate enough to meet the same
circumstances as me, i hope this helps him at least a little bit ;-)


Previous Comments:


[2007-07-03 16:02:08] [EMAIL PROTECTED]

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.



[2007-07-03 15:54:02] roman dot vanicek at gmail dot com

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7889000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7867000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7864000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb784f000)
 libz.so.1 => /usr/lib/libz.so.1 (0xb783a000)
 libiodbc.so.2 => /usr/lib/libiodbc.so.2 (0xb77f7000)
 libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb76e8000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75b9000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75a7000)
 /lib/ld-linux.so.2 (0x8000)
 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb74ec000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xb74ab000)
 libiodbcinst.so.2 => /usr/lib/libiodbcinst.so.2 (0xb7499000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb748f000)



ldd oci8.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7189000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7054000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e4c000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e2a000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e18000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e03000)
 /lib/ld-linux.so.2 (0x8000)

ldd pdo_oci.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7194000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb705f000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5b000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e57000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e35000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e23000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e0e000)
 /lib/ld-linux.so.2 (0x8000)



[2007-07-03 15:42:30] [EMAIL PROTECTED]

Are each and every one of those extensions linked with same SSL
libraries? And none of them is linked with static ssl libs?



[2007-07-03 15:38:16] roman dot vanicek at gmail dot com

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

The stack trace (--disable-debug).

#3  0xb7f4eb30 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#4  0xb65c2115 in __do_global_dtors_aux ()
   from /usr/local/lib/oracli/libclntsh.so.10.1
#5  0xb71120be in _fini () from
/usr/local/lib/oracli/libclntsh.so.10.1
#6  0xb7f4f8f4

#41889 [Opn->Fbk]: file_get_contents crashes on some SSL sites

2007-07-03 Thread tony2001
 ID:   41889
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

>Last notice: If pdo_oci is compiled statically into PHP and oci8
>dynamically (it refuses to be built static)
Huh? I _never_ build it as dynamic extension.





Previous Comments:


[2007-07-03 20:52:41] roman dot vanicek at gmail dot com

Yes, I think you are right. It is probably some clash between the
specific versions of Apache/mod_ssl, OpenSSL, PHP/OCI modules and
Instantclient.

Even though I don't understand, why this clash isn't reported during
the linking or the loading of the libraries.

I have tried with the newest instantclient and there is no change.

Just to summarize, I have:
Ubuntu Linux 6.06
Apache 1.3.34 with mod_ssl 2.8.25
OpenSSL 0.9.8a
PHP 5.3.2 with oci8.so a pdo_oci.so as dynamic modules at the same
time
Instantclient 10.1.0.5.

Last notice: If pdo_oci is compiled statically into PHP and oci8
dynamically (it refuses to be built static), it works fine. I think I
can accept this as a workaround.

And if there is someone else unfortunate enough to meet the same
circumstances as me, i hope this helps him at least a little bit ;-)



[2007-07-03 16:02:08] [EMAIL PROTECTED]

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.



[2007-07-03 15:54:02] roman dot vanicek at gmail dot com

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7889000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7867000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7864000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb784f000)
 libz.so.1 => /usr/lib/libz.so.1 (0xb783a000)
 libiodbc.so.2 => /usr/lib/libiodbc.so.2 (0xb77f7000)
 libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb76e8000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75b9000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75a7000)
 /lib/ld-linux.so.2 (0x8000)
 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb74ec000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xb74ab000)
 libiodbcinst.so.2 => /usr/lib/libiodbcinst.so.2 (0xb7499000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb748f000)



ldd oci8.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7189000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7054000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e4c000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e2a000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e18000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e03000)
 /lib/ld-linux.so.2 (0x8000)

ldd pdo_oci.so
 linux-gate.so.1 =>  (0xe000)
 libclntsh.so.10.1 => /usr/local/lib/oracli/libclntsh.so.10.1
(0xb7194000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb705f000)
 libnnz10.so => /usr/local/lib/oracli/libnnz10.so (0xb6e5b000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e57000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6e35000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e23000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb6e0e000)
 /lib/ld-linux.so.2 (0x8000)



[2007-07-03 15:42:30] [EMAIL PROTECTED]

Are each and every one of those extensions linked with same SSL
libraries? And none of them is linked with static ssl libs?



[2007-07-03 15:38:16] roman dot vanicek at gmail dot com

I have more details and the strack-trace (below). The problem appears
only if there are both oci8.so and pdo_oci.so loaded as dynamic modules.
If there is none of them loaded or just one of them present, it works
ok. When there are both of them, it segfaults. The static linking i have
not tried. 

Th

#41889 [Fbk->Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Ah, I see, I have checked it again and there must be something queer at
the configure phase. I need almost all database drivers at the same
time.

Doing this is ok:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=shared,instantclient,/usr/local/lib/oracli

Doing this produces this error during configure:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=instantclient,/usr/local/lib/oracli

checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes...
/root/build/php/php-5.2.3/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof
(char *), 77
See `config.log' for more details.
---
config.log
configure:96562: checking for PDO includes
configure:96568: checking for PDO includes
configure:96579: result: /root/build/php/php-5.2.3/ext
configure:97708: checking for char *
configure:97732: gcc -c -I/usr/include -g  -O0  conftest.c >&5
configure:97738: $? = 0
configure:97741: test -z || test ! -s
conftest.err
configure:97744: $? = 0
configure:97747: test -s conftest.o
configure:97750: $? = 0
configure:97761: result: yes
configure:97764: checking size of char *
configure:98076: gcc -o conftest -I/usr/include -g  -O0  -L/usr/lib 
-Wl,-rpath,/root/build/bin/firebird/lib -L/root/build/bin/firebird/lib
-Wl,-rpath,/usr/local/lib/oracli -L/usr/local/lib/oracli conftest.c
-lfbclient -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2
-lz -lm -ldl -lm -lnsl -lirc -lclntsh >&5
/usr/bin/ld: cannot find -lirc
collect2: ld returned 1 exit status
configure:98079: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
...


There is some problem with -lirc but what is this library?


Previous Comments:


[2007-07-03 21:03:22] [EMAIL PROTECTED]

>Last notice: If pdo_oci is compiled statically into PHP and oci8
>dynamically (it refuses to be built static)
Huh? I _never_ build it as dynamic extension.






[2007-07-03 20:52:41] roman dot vanicek at gmail dot com

Yes, I think you are right. It is probably some clash between the
specific versions of Apache/mod_ssl, OpenSSL, PHP/OCI modules and
Instantclient.

Even though I don't understand, why this clash isn't reported during
the linking or the loading of the libraries.

I have tried with the newest instantclient and there is no change.

Just to summarize, I have:
Ubuntu Linux 6.06
Apache 1.3.34 with mod_ssl 2.8.25
OpenSSL 0.9.8a
PHP 5.3.2 with oci8.so a pdo_oci.so as dynamic modules at the same
time
Instantclient 10.1.0.5.

Last notice: If pdo_oci is compiled statically into PHP and oci8
dynamically (it refuses to be built static), it works fine. I think I
can accept this as a workaround.

And if there is someone else unfortunate enough to meet the same
circumstances as me, i hope this helps him at least a little bit ;-)



[2007-07-03 16:02:08] [EMAIL PROTECTED]

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.



[2007-07-03 15:54:02] roman dot vanicek at gmail dot com

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7889000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7867000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7864000)
 libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb784f000)
 libz.so.1 => /usr/lib/libz.so.1 (0xb783a000)
 libiodbc.so.2 => /usr/lib/libiodbc.so.2 (0xb77f7000)
 libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb76e8000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75b9000)
 libpth

#41889 [Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

To complete my comment - these parameters of configure lead to the same
error

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli


Previous Comments:


[2007-07-03 21:55:56] roman dot vanicek at gmail dot com

Ah, I see, I have checked it again and there must be something queer at
the configure phase. I need almost all database drivers at the same
time.

Doing this is ok:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=shared,instantclient,/usr/local/lib/oracli

Doing this produces this error during configure:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=instantclient,/usr/local/lib/oracli

checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes...
/root/build/php/php-5.2.3/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof
(char *), 77
See `config.log' for more details.
---
config.log
configure:96562: checking for PDO includes
configure:96568: checking for PDO includes
configure:96579: result: /root/build/php/php-5.2.3/ext
configure:97708: checking for char *
configure:97732: gcc -c -I/usr/include -g  -O0  conftest.c >&5
configure:97738: $? = 0
configure:97741: test -z || test ! -s
conftest.err
configure:97744: $? = 0
configure:97747: test -s conftest.o
configure:97750: $? = 0
configure:97761: result: yes
configure:97764: checking size of char *
configure:98076: gcc -o conftest -I/usr/include -g  -O0  -L/usr/lib 
-Wl,-rpath,/root/build/bin/firebird/lib -L/root/build/bin/firebird/lib
-Wl,-rpath,/usr/local/lib/oracli -L/usr/local/lib/oracli conftest.c
-lfbclient -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2
-lz -lm -ldl -lm -lnsl -lirc -lclntsh >&5
/usr/bin/ld: cannot find -lirc
collect2: ld returned 1 exit status
configure:98079: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
...


There is some problem with -lirc but what is this library?



[2007-07-03 21:03:22] [EMAIL PROTECTED]

>Last notice: If pdo_oci is compiled statically into PHP and oci8
>dynamically (it refuses to be built static)
Huh? I _never_ build it as dynamic extension.






[2007-07-03 20:52:41] roman dot vanicek at gmail dot com

Yes, I think you are right. It is probably some clash between the
specific versions of Apache/mod_ssl, OpenSSL, PHP/OCI modules and
Instantclient.

Even though I don't understand, why this clash isn't reported during
the linking or the loading of the libraries.

I have tried with the newest instantclient and there is no change.

Just to summarize, I have:
Ubuntu Linux 6.06
Apache 1.3.34 with mod_ssl 2.8.25
OpenSSL 0.9.8a
PHP 5.3.2 with oci8.so a pdo_oci.so as dynamic modules at the same
time
Instantclient 10.1.0.5.

Last notice: If pdo_oci is compiled statically into PHP and oci8
dynamically (it refuses to be built static), it works fine. I think I
can accept this as a workaround.

And if there is someone else unfortunate enough to meet the same
circumstances as me, i hope this helps him at least a little bit ;-)



[2007-07-03 16:02:08] [EMAIL PROTECTED]

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.



[2007-07-03 15:54:02] roman dot vanicek at gmail dot com

Yes, these extensions are built together with the main PHP engine. I am
using libssl.so.0.9.8 that comes with Ubuntu 6.06. I think that Oracle
(instant-client) is not linked to openssl (at least not dynamically).
For details see below. Anyhow, with CLI the sames script works without
problems (both oci modules loaded).

ldd /root/libphp5.so
 linux-gate.so.1 =>  (0xe000)
 libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7aa2000)
 librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a9a000)
 libfbclient.so.2 => /root/build/bin/firebird/lib/libfbclient.so.2
(0xb7a09000)
 libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb79cb000)
 libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb789c000)
 libresolv.so.2 => /lib/tls/i686/cmov/libres

#41889 [Opn->Bgs]: file_get_contents crashes on some SSL sites

2007-07-03 Thread tony2001
 ID:   41889
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

There seem to be a bug in Oracle Instant Client.
See http://forums.oracle.com/forums/thread.jspa?messageID=1508129 and 
http://forums.oracle.com/forums/thread.jspa?threadID=307303


Previous Comments:


[2007-07-03 22:05:33] roman dot vanicek at gmail dot com

To complete my comment - these parameters of configure lead to the same
error

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli



[2007-07-03 21:55:56] roman dot vanicek at gmail dot com

Ah, I see, I have checked it again and there must be something queer at
the configure phase. I need almost all database drivers at the same
time.

Doing this is ok:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=shared,instantclient,/usr/local/lib/oracli

Doing this produces this error during configure:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=instantclient,/usr/local/lib/oracli

checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes...
/root/build/php/php-5.2.3/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof
(char *), 77
See `config.log' for more details.
---
config.log
configure:96562: checking for PDO includes
configure:96568: checking for PDO includes
configure:96579: result: /root/build/php/php-5.2.3/ext
configure:97708: checking for char *
configure:97732: gcc -c -I/usr/include -g  -O0  conftest.c >&5
configure:97738: $? = 0
configure:97741: test -z || test ! -s
conftest.err
configure:97744: $? = 0
configure:97747: test -s conftest.o
configure:97750: $? = 0
configure:97761: result: yes
configure:97764: checking size of char *
configure:98076: gcc -o conftest -I/usr/include -g  -O0  -L/usr/lib 
-Wl,-rpath,/root/build/bin/firebird/lib -L/root/build/bin/firebird/lib
-Wl,-rpath,/usr/local/lib/oracli -L/usr/local/lib/oracli conftest.c
-lfbclient -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2
-lz -lm -ldl -lm -lnsl -lirc -lclntsh >&5
/usr/bin/ld: cannot find -lirc
collect2: ld returned 1 exit status
configure:98079: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
...


There is some problem with -lirc but what is this library?



[2007-07-03 21:03:22] [EMAIL PROTECTED]

>Last notice: If pdo_oci is compiled statically into PHP and oci8
>dynamically (it refuses to be built static)
Huh? I _never_ build it as dynamic extension.






[2007-07-03 20:52:41] roman dot vanicek at gmail dot com

Yes, I think you are right. It is probably some clash between the
specific versions of Apache/mod_ssl, OpenSSL, PHP/OCI modules and
Instantclient.

Even though I don't understand, why this clash isn't reported during
the linking or the loading of the libraries.

I have tried with the newest instantclient and there is no change.

Just to summarize, I have:
Ubuntu Linux 6.06
Apache 1.3.34 with mod_ssl 2.8.25
OpenSSL 0.9.8a
PHP 5.3.2 with oci8.so a pdo_oci.so as dynamic modules at the same
time
Instantclient 10.1.0.5.

Last notice: If pdo_oci is compiled statically into PHP and oci8
dynamically (it refuses to be built static), it works fine. I think I
can accept this as a workaround.

And if there is someone else unfortunate enough to meet the same
circumstances as me, i hope this helps him at least a little bit ;-)



[2007-07-03 16:02:08] [EMAIL PROTECTED]

This looks like a symbol clash between OpenSSL and Oracle Client.
Try updating Oracle Client and searching their bug database.



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

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


#41889 [Bgs->Opn]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Sorry again, it seems that there must be some part of configure
information that is cached and it interferes when I run configure again.


I have unpacked the sources to get a fresh, clean setup and I ran the
above command again and it worked well. And it still worked when I added
almost all the other database drivers.

BUT - there seems to be some kind of interference between oci8 and
pdo-odbc in configure, because this command does not work even from the
source files freshly unpacked:


./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli \
--with-pdo-odbc=generic,/usr,iodbc

checking for SQLBindCol in -liodbc... no
configure: error: Your ODBC library does not exist or there was an
error. Check config.log for more information

But it does exist, and changing the command to this (again from fresh
sources), works:

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=shared,instantclient,/usr/local/lib/oracli \
--with-pdo-odbc=generic,/usr,iodbc

I cannot figure why. Maybe it's getting late...(midnight has just
passed here :-)

I add that --with-iodbc is not a problem and --with-pdo-oci is not a
problem. Just having these two together (--with-oci8= and
--with-pdo-odbc=generic,/usr,iodbc) seems to kick me.


Previous Comments:


[2007-07-03 22:11:18] [EMAIL PROTECTED]

There seem to be a bug in Oracle Instant Client.
See http://forums.oracle.com/forums/thread.jspa?messageID=1508129 and 
http://forums.oracle.com/forums/thread.jspa?threadID=307303



[2007-07-03 22:05:33] roman dot vanicek at gmail dot com

To complete my comment - these parameters of configure lead to the same
error

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli



[2007-07-03 21:55:56] roman dot vanicek at gmail dot com

Ah, I see, I have checked it again and there must be something queer at
the configure phase. I need almost all database drivers at the same
time.

Doing this is ok:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=shared,instantclient,/usr/local/lib/oracli

Doing this produces this error during configure:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=instantclient,/usr/local/lib/oracli

checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes...
/root/build/php/php-5.2.3/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof
(char *), 77
See `config.log' for more details.
---
config.log
configure:96562: checking for PDO includes
configure:96568: checking for PDO includes
configure:96579: result: /root/build/php/php-5.2.3/ext
configure:97708: checking for char *
configure:97732: gcc -c -I/usr/include -g  -O0  conftest.c >&5
configure:97738: $? = 0
configure:97741: test -z || test ! -s
conftest.err
configure:97744: $? = 0
configure:97747: test -s conftest.o
configure:97750: $? = 0
configure:97761: result: yes
configure:97764: checking size of char *
configure:98076: gcc -o conftest -I/usr/include -g  -O0  -L/usr/lib 
-Wl,-rpath,/root/build/bin/firebird/lib -L/root/build/bin/firebird/lib
-Wl,-rpath,/usr/local/lib/oracli -L/usr/local/lib/oracli conftest.c
-lfbclient -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2
-lz -lm -ldl -lm -lnsl -lirc -lclntsh >&5
/usr/bin/ld: cannot find -lirc
collect2: ld returned 1 exit status
configure:98079: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
...


There is some problem with -lirc but what is this library?



[2007-07-03 21:03:22] [EMAIL PROTECTED]

>Last notice: If pdo_oci is compiled statically into PHP and oci8
>dynamically (it refuses to be built static)
Huh? I _never_ build it as dynamic extension.






[2007-07-03 20:52:41] roman dot 

#41889 [Opn->Bgs]: file_get_contents crashes on some SSL sites

2007-07-03 Thread roman dot vanicek at gmail dot com
 ID:   41889
 User updated by:  roman dot vanicek at gmail dot com
 Reported By:  roman dot vanicek at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux 6.06
 PHP Version:  5.2.3
 New Comment:

Yes, you are right, the configure problem is a bug in the
instantclinet, thank you a lot for the link, it saved my night :-))

I confirm the solution is to remove -lirc from ths file
sdk/demo/sysliblist.

So, to summarize, configure is working fine for me now, I can build
both modules static (oci8 and pdo-oci). The crash still remains under
some circumstances:

PHP-CLI: OK
PHP-Apache2: OK
PHP-Apache1.3 + no oci: OK
PHP-Apache1.3 + oci8 dynamic: OK
PHP-Apache1.3 + pdo-oci dynamic: OK
PHP-Apache1.3 + oci8 dynamic + pdo-oci dynamic: SIGSEGV
PHP-Apache1.3 + oci8 dynamic + pdo-oci static: OK
PHP-Apache1.3 + oci8 static + pdo-oci static: OK

It's a rare situation and there is a workaround (static build), so let
us leave it as bogus.


Previous Comments:


[2007-07-03 22:25:27] roman dot vanicek at gmail dot com

Sorry again, it seems that there must be some part of configure
information that is cached and it interferes when I run configure again.


I have unpacked the sources to get a fresh, clean setup and I ran the
above command again and it worked well. And it still worked when I added
almost all the other database drivers.

BUT - there seems to be some kind of interference between oci8 and
pdo-odbc in configure, because this command does not work even from the
source files freshly unpacked:


./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli \
--with-pdo-odbc=generic,/usr,iodbc

checking for SQLBindCol in -liodbc... no
configure: error: Your ODBC library does not exist or there was an
error. Check config.log for more information

But it does exist, and changing the command to this (again from fresh
sources), works:

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=shared,instantclient,/usr/local/lib/oracli \
--with-pdo-odbc=generic,/usr,iodbc

I cannot figure why. Maybe it's getting late...(midnight has just
passed here :-)

I add that --with-iodbc is not a problem and --with-pdo-oci is not a
problem. Just having these two together (--with-oci8= and
--with-pdo-odbc=generic,/usr,iodbc) seems to kick me.



[2007-07-03 22:11:18] [EMAIL PROTECTED]

There seem to be a bug in Oracle Instant Client.
See http://forums.oracle.com/forums/thread.jspa?messageID=1508129 and 
http://forums.oracle.com/forums/thread.jspa?threadID=307303



[2007-07-03 22:05:33] roman dot vanicek at gmail dot com

To complete my comment - these parameters of configure lead to the same
error

./configure --prefix=/usr --with-config-file-path=/etc/php5
--with-apxs=/usr/bin/apxs \
--prefix=/build/install \
--enable-debug --without-pear --without-mysql \
--with-openssl \
--with-oci8=instantclient,/usr/local/lib/oracli



[2007-07-03 21:55:56] roman dot vanicek at gmail dot com

Ah, I see, I have checked it again and there must be something queer at
the configure phase. I need almost all database drivers at the same
time.

Doing this is ok:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=shared,instantclient,/usr/local/lib/oracli

Doing this produces this error during configure:

--with-sybase-ct=/usr/local/lib/freetds \
--with-interbase=/usr/local/lib/firebird \
--with-oci8=instantclient,/usr/local/lib/oracli

checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes...
/root/build/php/php-5.2.3/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof
(char *), 77
See `config.log' for more details.
---
config.log
configure:96562: checking for PDO includes
configure:96568: checking for PDO includes
configure:96579: result: /root/build/php/php-5.2.3/ext
configure:97708: checking for char *
configure:97732: gcc -c -I/usr/include -g  -O0  conftest.c >&5
configure:97738: $? = 0
configure:97741: test -z || test ! -s
conftest.err
configure:97744: $? = 0
configure:97747: test -s conftest.o
configure:97750: $? = 0
configure:97761: result: yes
configure:97764: checking size of char *
configure:98076: gcc -o conftest -I/usr/include -g  -O0  -L/usr/lib 
-Wl,-rpath,/root/

#40479 [Com]: zend_mm_heap corrupted

2007-07-03 Thread giampaolo at tomassoni dot biz
 ID:   40479
 Comment by:   giampaolo at tomassoni dot biz
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

I'm experiencing the very same problem reported by rocker_pr.

It seems to me that this problem is triggered by using PHP5 classes,
but I can't provide a small testcase: no small code seems affected.


Previous Comments:


[2007-04-26 14:11:47] christian dot kaps at imaxx21 dot com

Hi
 
I get the same message in my logs. I can reproduce the error in our
system, but it is impossible to locate it. Sometimes I can reproduce the
error by editing a comment. I add a character and the error occurs. I
remove the character and the script runs perfectly. Each time I try to
isolate the error I can reproduce it with an other action.

That what i could isolate is:
-load xml file with simplexml
-add a node
-clone the object
-process xpath query
-print the object with print_r
-serialize the object
-include a file (the error occurs)

When I edit the included file. E.g. remove methods or properties the
script runs without errors. That is funny(o;

Version: 5.2.1
Os: ubuntu



[2007-04-17 14:04:58] [EMAIL PROTECTED]

We still don't have zero info on how to reproduce it.



[2007-04-17 13:48:09] mrfree at infinito dot it

Same problem here.

I'm trying to use horde-imp but "zend_mm_heap corrupted" problem occurs
when I open admin/setup/config.php?app=imp to configure the app and the
browser offers to download config.php file.

Please devs give us a working patch :)



[2007-03-16 16:16:31] rocker_pr at hotmail dot com

I have the same problem with zend_mm_heap corrupted on the error logs,
when I tried to open one of the pages I programmed it show me some
internal server error and that error message was in the log.

Same version php 5.2.1

I migrated my classes from php 5 to work with php 4, all worked fine
again, but then for experimenting purpose I switched back from php 4 to
php 5, but this time not using the keywords: private, public, constuctor
and destructor. I keep the php 4 compatibility, but running the scripts
on php 5.2.1 and it worked fine.

So i think that maybe there is a problem with the memory management on
the classes or objects, I´m not sure, but that was producing the problem
in my case.



[2007-03-12 07:25:14] noah at hd dot se

Fwiw, I experienced the same error with the following code and the
latest PHP.

...
for($i = 0; $i < $foo; $i++) {
 ...
  for($i = 0; $i < $bar; $i++) {
...
  }
  ...
}
...



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

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


#34784 [Com]: Changed database context error when SELECT > 33 columns

2007-07-03 Thread vollmer at ampache dot org
 ID:   34784
 Comment by:   vollmer at ampache dot org
 Reported By:  jwall at webpeak dot com
 Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Windows XP
 PHP Version:  5CVS-2005-10-08 (snap)
 Assigned To:  fmk
 New Comment:

I'm running into this same issue with large result sets. 

I am running a Debian ETCH server with Apache2/PHP5.2
dpkg --list | grep "php" 
ii  libapache2-mod-php5   5.2.0-8+etch4  
server-side, HTML-embedded scripting languag
ii  php-pear  5.2.0-8+etch4  
PEAR - PHP Extension and Application Reposit
ii  php5-cli  5.2.0-8+etch4  
command-line interpreter for the php5 script
ii  php5-common   5.2.0-8+etch4  
Common files for packages built from the php
ii  php5-curl 5.2.0-8+etch4  
CURL module for php5
ii  php5-gd   5.2.0-8+etch4  
GD module for php5
ii  php5-ldap 5.2.0-8+etch4  
LDAP module for php5
ii  php5-mcrypt   5.2.0-8+etch4  
MCrypt module for php5
ii  php5-mysql5.2.0-8+etch4  
MySQL module for php5
ii  php5-snmp 5.2.0-8+etch4  
SNMP module for php5
ii  php5-sybase   5.2.0-8+etch4  
Sybase / MS SQL Server module for php5

The exact error I am seeing is
Query: SELECT * FROM L_U_t_State WHERE Status='1' (51 Rows returned)
Error: Changed database context to 'RMS'.

Complexity or speed of query doesn't appear to matter, my larger
multi-table selects/joins/unions do not produce the same error. 

PHP Code that is producing the error message



-Karl Vollmer


Previous Comments:


[2006-08-07 20:25:47] haunw at spcollege dot edu

I have this same issue on PHP 4.3.11(running as CGI) on Windows2000
server.

Happens intermittently.  Only pattern seems to be that it is when SQL
Server is running a bit slower.



[2006-06-16 14:14:51] hectorjazz at hotmail dot com

Corrected



[2006-06-16 14:13:21] hectprjazz at hotmail dot com

extension of PHP 4.4.x (mssql.dll) = SQL Server 2000

extension of PHP 4.3.x (mssql.dll) = SQL Server 7



[2006-03-24 21:15:21] zane dot wright at langley dot af dot mil

I also have the problem using 5.0.3 and a combination of PEAR's
LiveUser using DB.

It can be reproduced with a 
$db =& DB::connect($dsn, $options);
var_dump($db->query('INSERT INTO liveuser_users_seq (vapor) VALUES
(0)'));



[2006-03-16 03:42:01] mcollard at hotmail dot com

This also happens for me in PHP 4.4.0 build of MSSQL.dll.



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

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


#41868 [Asn->Bgs]: Error with multiple instances of same named parameter

2007-07-03 Thread iliaa
 ID:   41868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nick+phpbugs at ag dot arizona dot edu
-Status:   Assigned
+Status:   Bogus
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.3
 Assigned To:  iliaa
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.


Previous Comments:


[2007-07-02 19:51:53] jay at mysql dot com

This was unsupported behaviour and only worked by accident before
5.2.1.  Use bindValue() instead.  For more information, see here:

http://paul-m-jones.com/blog/?p=243

Cheers,

Jay



[2007-07-02 05:10:28] nick+phpbugs at ag dot arizona dot edu

Description:

A named parameter should be able to be included more than once in a
query, but bound only once.  Instead, when code like the given is
executed, the following error is produced:

Warning: PDOStatement::execute() [function.PDOStatement-execute]:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables
does not match number of tokens in /home/njm/public_html/test.php on
line 7

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'test', 'whatever');
$db->exec('CREATE TABLE foo (a INT, b INT)');
$sth = $db->prepare('INSERT INTO foo (a, b) VALUES (:value, :value)');
$sth->bindParam(':value', 10);
$sth->execute();


Expected result:

A row inserted into foo where a = b = 10.






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


#41876 [Asn->Fbk]: bindParam() and bindValue() do not work with MySQL MATCH () AGAINST ()

2007-07-03 Thread iliaa
 ID:   41876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jay at mysql dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Linux 2.6.20
 PHP Version:  5.2.3
 Assigned To:  iliaa
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Seems to work fine in latest CVS


Previous Comments:


[2007-07-02 20:02:37] jay at mysql dot com

Description:

When using the MATCHES(cols...) AGAINST (phrase) construct in MySQL
using PDO prepared statements and bound parameters, the binding does not
recognize the "?" within the AGAINST ().

Reproduce code:
---
$pdo= new
PDO("mysql:host=localhost;dbname=some_db","some_user","some_pass");
$sql= "SELECT * FROM some_table WHERE MATCH(some_col) AGAINST (?)";
$statement= $pdo->prepare($sql);
$statement->bindValue(1, "some search phrase");
$statement->execute(); // Will error here with "invalid parameter
number, no parameters bound"

If you replace the ? in the SQL statement with the string search phrase
value, it will work fine.

Expected result:

Expect to bind the value into the unnamed parameter and execute
properly.

Actual result:
--
Warning: PDOStatement::execute() [function.PDOStatement-execute]:
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound in
XXX





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


#34668 [NoF->Fbk]: SSL: fatal protocol error

2007-07-03 Thread iliaa
 ID:   34668
 Updated by:   [EMAIL PROTECTED]
 Reported By:  smajor at gmail dot com
-Status:   No Feedback
+Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Red Hat Enterprise Linux 3
 PHP Version:  5.0.5
 New Comment:

Do you have a reproduce case? With latest CVS the code works fine fir 
me.


Previous Comments:


[2007-06-21 16:51:39] [EMAIL PROTECTED]

This is still an issue. I have tested this using PHP 5.2.2 and 5.2.3
against Apache 2.2.4 and have run into the same issue.

Using fsockopen and fread will result in the same error from fread.



[2005-10-06 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".



[2005-09-28 13:01:09] [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





[2005-09-28 11:24:47] smajor at gmail dot com

THE OS is redhat enterprise 3 linux with apache 2



[2005-09-28 11:21:32] [EMAIL PROTECTED]

This is probably an error in the server you are connecting to. Which
software has the remote server? windows+IIS?

IIS doesn't conform with the standards, but PHP was supposed to
suppress the warning automatically for these servers.



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

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


#20022 [Com]: OCI8 Recursive call!

2007-07-03 Thread mjsee7707 at paran dot com
 ID:   20022
 Comment by:   mjsee7707 at paran dot com
 Reported By:  jesper at sivertsen dot org
 Status:   No Feedback
 Bug Type: OCI8 related
 Operating System: * (ZTS)
 PHP Version:  4.3.0-dev
 New Comment:

SERVER = IIS + php5.0.4 + oracle9.2

*** php source **
$con_string = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS = (PROTOCOL=
TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA =
(SERVICE_NAME=ORA9I)))"; 
$db_mw = ocilogon("test","test", $con_string); 


error 

Warning : ocilogon() [function.ocilogon] : OCI8 Recursive call! 
Warning : PHP Shutdown : OCI8 Recursive call! 

Someday Suddenly appear error.
I don't know why error.
help me~~~


Previous Comments:


[2005-09-16 01:00:02] 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-06-18 12:32:20] [EMAIL PROTECTED]

>Is 9i ( 9.2.0.1.0 ) supported ?
yes

>PHP has encountered an Access Violation at {NUMBER}
any reproduce script ?



[2004-06-18 12:28:32] FISHeR at smtp dot ru

PHP has encountered an Access Violation at {NUMBER}

Is 9i ( 9.2.0.1.0 ) supported ?

Windows 2000 / IIS 5.0 / isapi



[2003-01-02 05:44:19] [EMAIL PROTECTED]

OCI(in_call) is a thread-local variable. so it's only global the the
current thread.





[2002-12-23 07:59:47] vivanov at tmsoft-ltd dot kiev dot ua

I have same problem with "OCI8 Recursive call".
This error happens when
PHP works as !ISAPI module! (not CGI) under IIS.

I just analyzed source and think I found where bug is.

In case of ISAPI module 
functions of this extension (and OCI8 calls) can be called
_simultaneously_ (not recursive but parallel) from different threads. 
conclusion: following manner of using flag 'in_call' is erroneous:
 ext/oci8.c -
#define CALL_OCI(call) \
{ \
if (OCI(in_call)) { \
php_error(E_WARNING, "OCI8 Recursive call!\n"); \
exit(-1); \
} else { \
OCI(in_call)=1; \
call; \
OCI(in_call)=0; \
} \
}
#define CALL_OCI_RETURN(retcode,call) \
// ... similar code

I propose two alternatives:
1) remove away this checks
2) use some synchonization mechanizm instead

>as i don't use windows myself there's 
>nothing i can do to
If need, I can provide help
-- 
P.S.
sorry about poor english... 
My native lang. is C/C++ ;)



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

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


#41873 [Fbk->Opn]: strtotime produces incorrect output

2007-07-03 Thread kevin at creativeanvil dot com
 ID:   41873
 User updated by:  kevin at creativeanvil dot com
 Reported By:  kevin at creativeanvil dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Date/time related
 Operating System: RHEL 4
 PHP Version:  5.2.3
 New Comment:

Yes, most of the time it is correct, but I've found if the day wanted
is the last day of the month, it may not work correctly.  Friday was an
example, it probably has nothing to do with Friday specifically, that's
just what I tested and found the problem.


Previous Comments:


[2007-07-03 06:44:47] [EMAIL PROTECTED]

Works perfectly fine here:
10/26/2007
07/27/2007



[2007-07-02 15:13:26] kevin at creativeanvil dot com

Description:

For the last friday of the month for several months it is incorrect. 
Tends to happen when the last day of the month is on the date you're
looking for.

Reproduce code:
---
$stamp = strtotime("last Friday", gmmktime(0,0,0,11,0,2007);
echo date("m/d/Y", $stamp).";

$stamp = strtotime("last Friday", gmmktime(0,0,0,8,0,2007);
echo date("m/d/Y", $stamp);



Expected result:

11/30/2007
8/31/2007

Actual result:
--
11/23/2007
8/24/2007





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


#41859 [Fbk->Opn]: *nix benchmark results

2007-07-03 Thread champs dot name at gmail dot com
 ID:   41859
 User updated by:  champs dot name at gmail dot com
-Summary:  Low throughput with readfile/fpassthru
 Reported By:  champs dot name at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Performance problem
 Operating System: Windows Server 2003/IIS6
 PHP Version:  5.2.3
 New Comment:

This does not appear to be a problem with Apache 2 + PHP5 + Linux,
performance numbers are within 5% of eachother.

While I cannot test the Apache + Win32 combination, I can look at the
PHP source to say that it does not appear to be something in the
ISAPI-specific code, although it may have something to do with the
affected code's interaction with IIS.


Previous Comments:


[2007-07-03 06:54:54] [EMAIL PROTECTED]

Did you try to reproduce on *nix ?



[2007-06-30 11:58:31] judas dot iscariote at gmail dot com

You have to choose between readfile() and your code, readfile is
"designed" to be fast AND use few memory.

The best way you have to do this is simple. DO NOT serve files through
PHP :) use mod_secdownload and/or X-SendFile with lighttpd...with apache
use mod_auth_token and/or mod_sendfile to make the webserver itself to
serve the file



[2007-06-29 22:10:08] champs dot name at gmail dot com

Description:

With a client using a 10Mbps connection, it is possible to saturate the
pipe using print(fread(...)) in chunks of 32K or larger, but the
throughput of fpassthru() and readfile() is consistently ~1/3 of that
speed.  On the other side of the coin, a client with sub-Mbit DSL is not
able to complete 100MB downloads at all, unless readfile/fpassthru() is
used.

This has been tested in different orders, at different times of day,
and on different, non-consecutive days.

Reproduce code:
---
if ($file = fopen($path, $mode)) {
$chunk_size = 32;

while(!feof($file)) {

print(fread($file, $chunk_size * 1024));
if (connection_status() == 0) {
flush();
}
else {
break;
}
}

fclose($file);
}


Expected result:

Similar throughput if while() block is replaced with "fpassthru($file)"
or "readfile($path)".

Actual result:
--
File is served at over 900kB/s with fread(), less than 300kB/s with
fpassthru/readfile().





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


#41829 [Fbk->Opn]: PDO Seg fault issues

2007-07-03 Thread john_judy at homedecorators dot com
 ID:   41829
 User updated by:  john_judy at homedecorators dot com
 Reported By:  john_judy at homedecorators dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

After further testing in 5.2.3 we were unable to recreate it. It may
have been just showing up on our less upgraded servers as we are in the
middle of upgrading to 5.2.3 and so our error logs are sometimes mixed.


Previous Comments:


[2007-06-27 19:48:47] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2007-06-27 19:48:02] [EMAIL PROTECTED]

We can't fix it without having a reproduce case and/or a clear
backtrace.



[2007-06-27 19:40:06] john_judy at homedecorators dot com

Description:

When using PDO we experience random seg fault errors:  [Wed Jun 27
09:52:31 2007] [notice] child pid 82572 exit signal Segmentation fault
(11)

Unfortunately it doesn't happen consistently on any given page or query
select. We are using a set of wrapper classes to provide extra
functionality to PDO (record counts, function names similar to what we
are currently using, extra debugging info, caching soon).

The seg fault appears to happen when returning the result set from our
PDOconnection object during execute(). Debugging code and unimportant
functions have been removed below.

Reproduce code:
---
class PDOStatementx extends PDOStatement{
function execute($input=null){
$this->params=$input;
parent::execute($input);
$this->cursorPos=0;
}
}
class PDOconnection extends PDO{
function __construct($update){
parent::__construct( "mysql:host=". $connServer .";dbname=".$db,
$uid, $pwd);
$this->setAttribute( PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
$this->setAttribute( PDO::ATTR_STATEMENT_CLASS,
array('PDOStatementx'));
$this->setAttribute(PDO::ATTR_EMULATE_PREPARES,true);
}
function execute($SQL,$debug=false){//legacy wrapper function
$this->result = $this->prepare($SQL);
$this->result->execute();
return $this->result;
}





Actual result:
--
As of right now I do not have access to a backtrace. The only error we
are receiving is the one listed above: "[Wed Jun 27 09:52:31 2007]
[notice] child pid 82572 exit signal Segmentation fault (11)"





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


#22427 [Com]: Missing Form Post Data

2007-07-03 Thread ads at alex4all dot com
 ID:   22427
 Comment by:   ads at alex4all dot com
 Reported By:  jroland at uow dot edu dot au
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Windows XP / 2000
 PHP Version:  4.2.3
 New Comment:

I just want to say Thanks a lot for comment called ([27 Mar 2003 2:08am
UTC] sendoffer at ukr dot net); because my problem solved for same
issue.

BR, Ali


Previous Comments:


[2007-06-13 22:27:20] relisys002 at yahoo dot com

As a follow-up to my post yesterday, it appears as though the firewall
software we have on our Windows machine (Comodo Firewall) was the cause
of the problem. Using the Windows firewall didn't cause any problems.
This may not be the case in for the other people with problems but I
thought I would at least post the resolution to mine.

I would recommend that everyone disable all firewall and security
software if they are experiencing this problem.



[2007-06-12 21:29:21] relisys002 at yahoo dot com

Just came across the same problem myself last week.
PHP 5.1.6
Apache 2.0.59
FreeBSD 6.1-RELEASE-p11

EVERY browser I have tried in Windows fails to work past a request size
of about 1450 bytes. I have tested IE 6.0, FF 2.0.0.3 and Safari Beta 3.
PHP still returns the requests size via getenv("CONTENT_LENGTH") but
both $_POST and $_GET are empty.

When I try the EXACT same page on the EXACT same server with both FF
2.0.0.3 and Safari 2.0.4(419.3) I have no problems submitting however
much data I want. Here's my test form:

/ CODE -/

TEST














/ CODE -/

I get the same result with and without the enctype. I can't believe
nobody has found a solution for this yet. If somebody has, please post
it here or email me and I will.



[2007-05-10 09:15:10] tnieto at greenbit dot es

I have experienced this issue also.

My environment is:

- php 4.4.2 as a module
- Apache 1.3
- Windows 2000 Server

When I send a form with a text area using POST i don't receive any
data.

In my case, it was because I was sending de form using a Javascript
code:

  function newitem(tipus)
  {
var accion;
if (tipus == 1)
{
  accion = 
document.mailing.action="pre_mailingsmanuals.php";
}
else
{
  accion = 
document.mailing.action="env_mailingsmanuals.php";
}
document.mailing.action=accion;
document.mailing.submit();
  } 

The input was specified as a button: http://www.thescripts.com/forum/thread4451.html - which covers my issue,
and I have implemented the solution by checking for
(isset($_POST['submit']) || isset($_POST['submit_x'])) to check whether
my submit button has been clicked. Note that is an underscore, not a
'.'.

The solution works for GET method as well, if you are using that. If
you submit a form with a 'submit' image button using GET, the browser
URL shows submit.x=aa&submit.y=bb where aa and bb are the coordinates
within the button image of where you clicked, but you should still check
for $_GET['submit_x'] NOT $_GET['submit.x'].
 
As discussed in the above referred forum log this is an issue affecting
Internet Explorer, Netscape and Opera, and maybe other browsers, and
seems to be a simple failure to conform to the HTML standard for
handling forms.

Hope this helps someone.

Andy



[2007-03-12 19:53:16] jpsoren at gmail dot com

I experience this problem as well.
* Happens both with and without enctype set for form
* Happens in IE6 and IE7, NOT in Firefox 1.5/2
* Changing form to GET works flawlessly
* Input can range from a few text fields (1-6) or a mix of text fields
and file fields, or just file fields (enctype set when file fields
exist) and POST data will come up empty
* Often times hitting reload and selecting to resubmit the form data
will have the POST data show up
* NO POST data will show up - I don't just lose some early fields

PHP 5.2.x (module), Apache 2.2.x, Windows XP SP2

This is a serious issue. Doesn't seem like anyone in this thread has
found any sort of solution. Please post (or GET, ha) if you have any
insight.



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

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