![]() |
sponsored links |
|
|
sponsored links
|
|
1
11th July 05:01
External User
Posts: 1
|
ID: 35932
User updated by: j dot gizmo at aon dot at Reported By: j dot gizmo at aon dot at -Status: Bogus +Status: Open -Bug Type: Do***entation problem +Bug Type: PDO related Operating System: Windows 2000 -PHP Version: Irrelevant +PHP Version: 5.1.1 New Comment: In fact, I just found out that according to the online do***entation, the syntax used in the docs is in fact correct. However, the correct syntax does not work on PHP 5.1.1 on Win2K; so it is more a PDO related issue than do***entation related. Previous Comments: ------------------------------------------------------------------------ [2006-01-08 16:59:13] nlopess@php.net this is not a do***entation problem surely. PHP 5 deprecates the use of '=& new' syntax, as objects are always references. Please try with latest PHP 5 version available and if the problem persists, reopen this bug, but not as a do***entation problem. ------------------------------------------------------------------------ [2006-01-08 16:52:48] j dot gizmo at aon dot at Description: ------------ In code samples for the PDO object, objects are created with the assignment operator (=) instead of the reference operator (=&). Reproduce code: --------------- //Syntax used in code samples $conn = new PDO( $dsn ); //How it actually works $conn =& new PDO( $dsn ); Expected result: ---------------- The output shown below the corresponding code samples. Actual result: -------------- On windows, the first version doesn't report any errors, however any subsequent calls to methods of $conn results in the following warning: "SQL State [000000] No Error. PDO Constructor was not called." If you use the =& operator (and make $conn a reference to the newly created object) everything works as expected. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35932&edit=1 |
|
|
|
2
11th July 05:01
External User
Posts: 1
|
ID: 35932
Updated by: tony2001@php.net Reported By: j dot gizmo at aon dot at -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Windows 2000 PHP Version: 5.1.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-01-08 17:00:56] j dot gizmo at aon dot at In fact, I just found out that according to the online do***entation, the syntax used in the docs is in fact correct. However, the correct syntax does not work on PHP 5.1.1 on Win2K; so it is more a PDO related issue than do***entation related. ------------------------------------------------------------------------ [2006-01-08 16:59:13] nlopess@php.net this is not a do***entation problem surely. PHP 5 deprecates the use of '=& new' syntax, as objects are always references. Please try with latest PHP 5 version available and if the problem persists, reopen this bug, but not as a do***entation problem. ------------------------------------------------------------------------ [2006-01-08 16:52:48] j dot gizmo at aon dot at Description: ------------ In code samples for the PDO object, objects are created with the assignment operator (=) instead of the reference operator (=&). Reproduce code: --------------- //Syntax used in code samples $conn = new PDO( $dsn ); //How it actually works $conn =& new PDO( $dsn ); Expected result: ---------------- The output shown below the corresponding code samples. Actual result: -------------- On windows, the first version doesn't report any errors, however any subsequent calls to methods of $conn results in the following warning: "SQL State [000000] No Error. PDO Constructor was not called." If you use the =& operator (and make $conn a reference to the newly created object) everything works as expected. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35932&edit=1 |
|
|
3
11th July 21:31
External User
Posts: 1
|
ID: 35932
Updated by: dbs@php.net Reported By: j dot gizmo at aon dot at Status: Feedback Bug Type: PDO related Operating System: Windows 2000 PHP Version: 5.1.1 New Comment: In addition to trying the latest release snapshot, please provide more information: What PDO driver are you using? What database (including version) are you connecting to? What is the value of $dsn that you are passing to the PDO constructor? Previous Comments: ------------------------------------------------------------------------ [2006-01-08 17:13:36] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-01-08 17:00:56] j dot gizmo at aon dot at In fact, I just found out that according to the online do***entation, the syntax used in the docs is in fact correct. However, the correct syntax does not work on PHP 5.1.1 on Win2K; so it is more a PDO related issue than do***entation related. ------------------------------------------------------------------------ [2006-01-08 16:59:13] nlopess@php.net this is not a do***entation problem surely. PHP 5 deprecates the use of '=& new' syntax, as objects are always references. Please try with latest PHP 5 version available and if the problem persists, reopen this bug, but not as a do***entation problem. ------------------------------------------------------------------------ [2006-01-08 16:52:48] j dot gizmo at aon dot at Description: ------------ In code samples for the PDO object, objects are created with the assignment operator (=) instead of the reference operator (=&). Reproduce code: --------------- //Syntax used in code samples $conn = new PDO( $dsn ); //How it actually works $conn =& new PDO( $dsn ); Expected result: ---------------- The output shown below the corresponding code samples. Actual result: -------------- On windows, the first version doesn't report any errors, however any subsequent calls to methods of $conn results in the following warning: "SQL State [000000] No Error. PDO Constructor was not called." If you use the =& operator (and make $conn a reference to the newly created object) everything works as expected. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35932&edit=1 |
|
|