pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Help, plz...
3+ messages / 2 participants
[nested] [flat]

* Help, plz...
@ 2002-09-04 10:09  dr_sad(surguttel) <dr_sad@surguttel.ru>
  0 siblings, 1 reply; 3+ messages in thread

From: dr_sad(surguttel) @ 2002-09-04 10:09 UTC (permalink / raw)
  To: pgsql-php

use:
Linux SuSE 8.0 Pro
PostgreSQL 7.2
PHP 4.2.2
Apache 2.0.39

All posible deb messages in php.ini are enabled, but follow code:
-------------------------------------------------------------------------------
<html>
    <head>
        <title>PostgreSQL PHP Test</title>
    </head>
    <body>
        <table>
            <?
                printf("BEGIN<br>");
                require_once('DB.php');
                $userid='postgres';
                $password='gecnzr';
                $dbhost='dbserv';
                $database='ll';

                $db = DB::connect("pgsql://$userid:$password@$dbhost/$database");
                if ( DB::iserror( $db ))
                    {
                        die("DB.connect " . $db->getMessage());
                    }

                $sql = "select * from agreements";
                $q = $db->query( $sql );
                if ( DB::iserror( $q ))
                    {
                        die("Query  " . $q->getMessage());
                    }

                while ( $row = $q->fetchRow() )
                    {
                        ?>
                        <tr><td><?=$row[0] ?> </td>
                            <td><?=$row[1] ?> </td>
                            <td><?=$row[2] ?> </td>
                            <td><?=$row[3] ?> </td>
                        </tr>
                        <?
                    }
                printf("END.<br>");
            ?>
        </table>
    </body>
</html>
-------------------------------------------------------------------------------
return follow html:
------------------------------
<html>
    <head>
        <title>PostgreSQL PHP Test</title>
    </head>
    <body>
        <table>
            BEGIN<br>
------------------------------

can anybody help me? I don't see any error messages both apache and
php logs... :( If I change sitax of command, of course i see error
messages... Heh...

-- 
respect, Andrey.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Help, plz...
@ 2002-09-04 14:23  David C. Brown <dbrown@centennialwines.com>
  parent: dr_sad(surguttel) <dr_sad@surguttel.ru>
  0 siblings, 1 reply; 3+ messages in thread

From: David C. Brown @ 2002-09-04 14:23 UTC (permalink / raw)
  To: dr_sad(surguttel) <dr_sad@surguttel.ru>; +Cc: pgsql-php

I don't see any generic errors.  What I would do is insert debugging 
statments after DB::connect, after the query, and inside the while loop 
and see which one fails to show up.  (Like "Connected", "Query 
Returned", and "Looping While...") This should help you find out what 
command is failing to complete.

Hope this helps..

Dave

dr_sad(surguttel) wrote:

>use:
>Linux SuSE 8.0 Pro
>PostgreSQL 7.2
>PHP 4.2.2
>Apache 2.0.39
>
>All posible deb messages in php.ini are enabled, but follow code:
>-------------------------------------------------------------------------------
><html>
>    <head>
>        <title>PostgreSQL PHP Test</title>
>    </head>
>    <body>
>        <table>
>            <?
>                printf("BEGIN<br>");
>                require_once('DB.php');
>                $userid='postgres';
>                $password='gecnzr';
>                $dbhost='dbserv';
>                $database='ll';
>
>                $db = DB::connect("pgsql://$userid:$password@$dbhost/$database");
>                if ( DB::iserror( $db ))
>                    {
>                        die("DB.connect " . $db->getMessage());
>                    }
>
>                $sql = "select * from agreements";
>                $q = $db->query( $sql );
>                if ( DB::iserror( $q ))
>                    {
>                        die("Query  " . $q->getMessage());
>                    }
>
>                while ( $row = $q->fetchRow() )
>                    {
>                        ?>
>                        <tr><td><?=$row[0] ?> </td>
>                            <td><?=$row[1] ?> </td>
>                            <td><?=$row[2] ?> </td>
>                            <td><?=$row[3] ?> </td>
>                        </tr>
>                        <?
>                    }
>                printf("END.<br>");
>            ?>
>        </table>
>    </body>
></html>
>-------------------------------------------------------------------------------
>return follow html:
>------------------------------
><html>
>    <head>
>        <title>PostgreSQL PHP Test</title>
>    </head>
>    <body>
>        <table>
>            BEGIN<br>
>------------------------------
>
>can anybody help me? I don't see any error messages both apache and
>php logs... :( If I change sitax of command, of course i see error
>messages... Heh...
>
>  
>





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Help, plz...
@ 2002-09-05 05:09  dr_sad(surguttel) <dr_sad@surguttel.ru>
  parent: David C. Brown <dbrown@centennialwines.com>
  0 siblings, 0 replies; 3+ messages in thread

From: dr_sad(surguttel) @ 2002-09-05 05:09 UTC (permalink / raw)
  To: David C. Brown <dbrown@centennialwines.com>; +Cc: pgsql-php

Hi, Dave.
Thanx. I've made follow changes:
----------------
1. printf("BEGIN<br>");
2. require_once('DB.php');
3. printf("point 1<br>");
4. $userid='mrtg';
5. $password='';
6. $dbhost='dbserv';
7. $database='ll';
8. printf("point 2<br>");
9. $db = DB::connect("pgsql://$userid:$password@$dbhost/$database");
10. printf("point 3<br>");
----------------
text "point 3" Not printed :( so error inside line 10, however on
postgreSQL console no error messages and PHP is silent...

-- 
respect, Andrey.

Wednesday, September 04, 2002, 8:23:21 PM, you wrote:
DCB> I don't see any generic errors.  What I would do is insert debugging 
DCB> statments after DB::connect, after the query, and inside the while loop 
DCB> and see which one fails to show up.  (Like "Connected", "Query 
DCB> Returned", and "Looping While...") This should help you find out what 
DCB> command is failing to complete.

DCB> Hope this helps..

DCB> Dave

DCB> dr_sad(surguttel) wrote:

>>use:
>>Linux SuSE 8.0 Pro
>>PostgreSQL 7.2
>>PHP 4.2.2
>>Apache 2.0.39
>>
>>All posible deb messages in php.ini are enabled, but follow code:
>>-------------------------------------------------------------------------------
>><html>
>>    <head>
>>        <title>PostgreSQL PHP Test</title>
>>    </head>
>>    <body>
>>        <table>
>>            <?
>>                printf("BEGIN<br>");
>>                require_once('DB.php');
>>                $userid='postgres';
>>                $password='gecnzr';
>>                $dbhost='dbserv';
>>                $database='ll';
>>
>>                $db = DB::connect("pgsql://$userid:$password@$dbhost/$database");
>>                if ( DB::iserror( $db ))
>>                    {
>>                        die("DB.connect " . $db->getMessage());
>>                    }
>>
>>                $sql = "select * from agreements";
>>                $q = $db->query( $sql );
>>                if ( DB::iserror( $q ))
>>                    {
>>                        die("Query  " . $q->getMessage());
>>                    }
>>
>>                while ( $row = $q->fetchRow() )
>>                    {
>>                        ?>
>>                        <tr><td><?=$row[0] ?> </td>
>>                            <td><?=$row[1] ?> </td>
>>                            <td><?=$row[2] ?> </td>
>>                            <td><?=$row[3] ?> </td>
>>                        </tr>
>>                        <?
>>                    }
>>                printf("END.<br>");
>>            ?>
>>        </table>
>>    </body>
>></html>
>>-------------------------------------------------------------------------------
>>return follow html:
>>------------------------------
>><html>
>>    <head>
>>        <title>PostgreSQL PHP Test</title>
>>    </head>
>>    <body>
>>        <table>
>>            BEGIN<br>
>>------------------------------
>>
>>can anybody help me? I don't see any error messages both apache and
>>php logs... :( If I change sitax of command, of course i see error
>>messages... Heh...
>>
>>  
>>



DCB> ---------------------------(end of broadcast)---------------------------
DCB> TIP 3: if posting/reading through Usenet, please send an appropriate
DCB> subscribe-nomail command to majordomo@postgresql.org so that your
DCB> message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-09-05 05:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 10:09 Help, plz... dr_sad(surguttel) <dr_sad@surguttel.ru>
2002-09-04 14:23 ` David C. Brown <dbrown@centennialwines.com>
2002-09-05 05:09   ` dr_sad(surguttel) <dr_sad@surguttel.ru>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox