#29180 [Fbk->NoF]: Client crash
| From: | sniper@php.net | Date: | Wed, 29 Dec 2004 17:32:18 +0000 |
| Subject: | #29180 [Fbk->NoF]: Client crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-71234@lists.php.net to get a copy of this message | ||
ID: 29180
Updated by: sniper@php.net
Reported By: tila at home dot nl
-Status: Feedback
+Status: No Feedback
Bug Type: PostgreSQL related
Operating System: Linux 2.4.24
PHP Version: 5.0.0
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2004-12-22 09:19:41] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
------------------------------------------------------------------------
[2004-07-18 00:33:45] tila at home dot nl
42 by the way is the number of records in the database. So $offset
takes the value of $total
------------------------------------------------------------------------
[2004-07-16 10:34:23] tila at home dot nl
No, When I remove the PEAR::DB class and the code that's using it, it
will display '5' just as expected.
When I use pg_exec and pg_fetch_row etc.. the result displays '42' ????
<?php
$db = pg_connect("host=localhost user=apache password=apache
dbname=groupware");$QUERY = "SELECT o.* FROM personoverview o";
$result = pg_exec($QUERY);
$total = pg_numrows($result);
$offset = $_GET['id']?$_GET['id']:0;
$perpage = 10;
for ($i = $offset; (($i < $total) && ($i < ($offset + $perpage)));
$i++) {
$row = pg_fetch_row($result, $i);
}
echo $offset;
?>
------------------------------------------------------------------------
[2004-07-16 00:59:04] tularis@php.net
does it also crash when NOT using the PEAR::DB class?
------------------------------------------------------------------------
[2004-07-16 00:40:32] tila at home dot nl
new code, I am sorry. I cannot provide a link to the server.
open it with ?id=5 as parameter.
<?php
require_once ('DB.php');
$dsn = "pgsql://apache:apache@localhost/groupware";
$db = DB::connect($dsn, true);
$QUERY = "SELECT o.* FROM personoverview o";
$result = $db->query($QUERY);
$total = $result->numRows();
$offset = $_GET['id']?$_GET['id']:0; $perpage = 10;
for ($i = $offset; (($i < $total) && ($i < ($offset + $perpage)));
$i++) {
$row = $result->fetchRow(DB_FETCHMODE_ASSOC, $i);
}
echo $offset;
?>
------------------------------------------------------------------------
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/29180
--
Edit this bug report at http://bugs.php.net/?id=29180&edit=1