Bug #51680 [Asn->Dup]: Sqlite returns without waiting for timeout

2010-06-06 Thread magicaltux
Edit report at http://bugs.php.net/bug.php?id=51680&edit=1

 ID:   51680
 Updated by:   magical...@php.net
 Reported by:  ncoesel at dealogic dot nl
 Summary:  Sqlite returns without waiting for timeout
-Status:   Assigned
+Status:   Duplicate
 Type: Bug
 Package:  SQLite related
 Operating System: Linux
 PHP Version:  Irrelevant
 Assigned To:  scottmac

 New Comment:

This bug is a duplicate of http://bugs.php.net/51295 (which includes a
slightly 

better way of fixing this).


Previous Comments:

[2010-04-28 10:49:22] ncoesel at dealogic dot nl

Description:

Sqlite has a protection mechanism that prevents firing two (or) more
queries from the same process and wait for the database to become
available. 



The typical behaviour is that every now and then (depending on the
database load) a query exits immediately with "SQLSTATE[HY000]: General
error: 5 database is locked". Setting other busy timeout values doesn't
help.



I've attached a patch that solves the problem unless the database is
locked for a very long time (as usual some error . The patch is created
for an older version of PHP. I've checked the latest CVS version and I'm
quite sure the patch will still apply.







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


Req #51295 [Asn]: SQLite3::busyTimeout not existing

2010-06-06 Thread magicaltux
Edit report at http://bugs.php.net/bug.php?id=51295&edit=1

 ID:   51295
 Updated by:   magical...@php.net
 Reported by:  magical...@php.net
 Summary:  SQLite3::busyTimeout not existing
 Status:   Assigned
 Type: Feature/Change Request
 Package:  SQLite related
 Operating System: Linux Gentoo 2.6.33
 PHP Version:  5.3SVN-2010-03-14 (SVN)
 Assigned To:  scottmac

 New Comment:

Ok, I had some troubles to make a meaningful test for this bug (the php
function 

is just calling the equivalent sqlite function), but in the end I got
this.



http://ookoo.org/svn/snip/20100607_php_test_bug51295.php (didn't manage
to 

attache this to this bug report, even renamed as .txt)



Anyway here it is. It forks, open a sqlite file and locks it, then the
other 

process will try to access it with a 1 second busyTimeout then dumps the
waited 

time and the result (should have failed with a 1 second delay with +/-
10ms)



Remaining steps includes converting this test to phpt and run it once to
get the 

"right" output (I'll need to check doc to find the right format for phpt
since 

it's been a while).


Previous Comments:

[2010-03-14 08:29:39] magical...@php.net

Description:

In SQLite3, method busyTimeout() is missing, and by default there is no
busy 

handler.



In old SQLite extension, a default timeout of 60 seconds was set, and a


busyTimeout() method was available to define the timeout.



I recently started with SQLite3 to have this kind of errors as load was
growing 

on SELECT statement:



Warning: SQLite3Stmt::execute(): Unable to execute statement: database
is locked



Some internet research showed that this could be fixed by setting a
different 

busy timeout, and I noticed PHP wasn't setting any on SQLite3.



While I'm unsure about setting a default busyTimeout on SQLite3 (it
currently 

have none, but PHP_5_3 is still young enough to change this kind of
behaviour) 

it should be at least possible to set one.



Patch to add a SQLite3::busyTimeout() method (same behaviour as old 

SQLite::busyTimeout() method, with the exception this one has a
true/false 

return value, while sqlite3_busy_timeout will always return SQLITE_OK,
it may 

change in the future).



The patch:



https://ookoo.org/svn/snip/php_5_3-sqlite3-busytimeout-method.patch







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


Bug #45711 [Com]: Undefined References

2010-06-06 Thread jonsmith04 at hotmail dot com
Edit report at http://bugs.php.net/bug.php?id=45711&edit=1

 ID:   45711
 Comment by:   jonsmith04 at hotmail dot com
 Reported by:  dmass83 at hotmail dot com
 Summary:  Undefined References
 Status:   No Feedback
 Type: Bug
 Package:  Compile Failure
 Operating System: Solaris 10
 PHP Version:  5.2.6

 New Comment:

This is potentially a zlib/openssl issue. I had a source compiled
version of php 5.3.2 with openssl (0.9.8) working just fine. I tried to
add zlib (1.2.5) for pear and starting getting similar errors. I
upgraded and compiled openssl (1.0.0a) with no-zlib configure option,
did a make distclean on php and recompiled with openssl and zlib
enabled, and it worked just fine. YMMV.


Previous Comments:

[2010-04-13 21:37:14] tkevans at tkevans dot com

Still seems to be a problem with 5.3.2, AIX 5.3, and OpenSSL 1.0


[2009-07-24 17:41:10] mrpalassis at hotmail dot com

Some more info...



These symbols do show in the compiled openssl binaries:



$ nm $APACHE_HOME/lib/libcrypto.so | egrep "EVP_MD_size|EVP_CIPHER_"

[6239]  |761792|  88|FUNC |GLOB |3|14
|EVP_CIPHER_asn1_to_param

[4525]  |762432|   8|FUNC |GLOB |3|14
|EVP_CIPHER_block_size

[4548]  |762464|  12|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_block_size

[6291]  |762496|   8|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_cipher

[3934]  |744576| 184|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_cleanup

[5938]  |763040|  16|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_clear_flags

[3092]  |744320| 176|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_ctrl

[6158]  |744512|  12|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_flags

[4515]  |732672|  44|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_free

[6057]  |762560|   8|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_get_app_data

[3581]  |744288|  24|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_init

[6406]  |744544|  12|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_iv_length

[5648]  |762688|   8|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_key_length

[3740]  |730592|  68|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_new

[3789]  |762720|  12|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_nid

[6103]  |732960|  68|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_rand_key

[3278]  |762592|   8|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_set_app_data

[4757]  |763008|  16|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_set_flags

[6182]  |732736| 144|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_set_key_length

[4827]  |732896|  40|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_set_padding

[]  |763072|  12|FUNC |GLOB |3|14
|EVP_CIPHER_CTX_test_flags

[3215]  |762528|   8|FUNC |GLOB |3|14 |EVP_CIPHER_flags

[3739]  |761600| 172|FUNC |GLOB |3|14
|EVP_CIPHER_get_asn1_iv

[4247]  |762624|   8|FUNC |GLOB |3|14
|EVP_CIPHER_iv_length

[3420]  |762656|   8|FUNC |GLOB |3|14
|EVP_CIPHER_key_length

[5320]  |745792|   8|FUNC |GLOB |3|14 |EVP_CIPHER_nid

[4635]  |762016|  88|FUNC |GLOB |3|14
|EVP_CIPHER_param_to_asn1

[4821]  |761888| 128|FUNC |GLOB |3|14
|EVP_CIPHER_set_asn1_iv

[3851]  |762112| 316|FUNC |GLOB |3|14 |EVP_CIPHER_type

[4440]  |762848|   8|FUNC |GLOB |3|14 |EVP_MD_size

[4664]  |897184| 812|FUNC |GLOB |3|14
|PEM_get_EVP_CIPHER_INFO



$ nm $APACHE_HOME/lib/libssl.so | egrep "EVP_MD_size|EVP_CIPHER_"

[786]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_block_size

[1324]  | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_block_size

[639]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_cipher

[1185]  | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_cleanup

[982]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_init

[1139]  | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_iv_length

[801]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_CTX_key_length

[660]   | 0|   0|FUNC |GLOB |0|UNDEF  |EVP_CIPHER_flags

[823]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_iv_length

[873]   | 0|   0|FUNC |GLOB |0|UNDEF 
|EVP_CIPHER_key_length

[1132]  | 0|   0|FUNC |GLOB |0|UNDEF  |EVP_MD_size





Also looks like some others have had similar problems:

http://marc.info/?l=php-install&m=119696768506493&w=2

http://www.phpbuilder.com/board/archive/index.php/t-10357481.html


[2009-07-24 17:30:46] mrpalassis at hotmail dot com

We experience the same error with PHP 5.3.0:





Undefined   first r

[PHP-BUG] Bug #52012 [NEW]: DOMDocument throws Unexpected end tag error when loading valid HTML

2010-06-06 Thread xwisdom at gmail dot com
From: 
Operating system: Windows XP
PHP version:  5.3.2
Package:  DOM XML related
Bug Type: Bug
Bug description: DOMDocument throws Unexpected end tag error when loading valid 
HTML

Description:

I'm getting a php warning from DOMDocument after running a test script in
an 

attempt to load some html inside the DOM and then echo the html to the

browser:



Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Unexpected end
tag

: strong in Entity, line: 8 in C:\www\dom-test.php on line 23



The problem is that DOMDocument::loadHTML() attempts to remove the

''  tag from within a JavaScript string variable inside the

 tag. If I try to wrap  around the content of the