[PHP] PHP Warning: ['xxxx']: Unable to initialize module

2002-05-30 Thread Steve G

Hello,

I'm running Linux 7.2 and apache.  Also PostgreSQL.

After upgrading from 4.0.4 I receive all of these errors and I have no idea
what API=xxx means.  I followed the instructions for upgrading to 4.2.1 and
everything apparently went well, but still have module errors.

Also, phpinfo() still echo'es 4.0, but the CLI sys 4.2.1!!??  What gives??


Is there somewhere to download modules from?  A separate way to install
them?

 Any help would be appreciated.

Thanks.


-steve

[root@Zeus /root]# php -m

Content-type: text/html



PHP Warning:  imap: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

PHP Warning:  ldap: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

PHP Warning:  pgsql: Unable to initialize module

Module compiled with module API=20001214, debug=0, thread-safety=0

PHPcompiled with module API=20020429, debug=0, thread-safety=0

These options need to match

 in Unknown on line 0

Running PHP 4.2.1

Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies


[PHP Modules]

xml

standard

sockets

session

posix

pcre

mysql

ctype


[Zend Modules]


[root@Zeus /root]#





Re: [PHP] FATAL call to undefined function pg_query()

2002-05-29 Thread Steve G

I'm using 4.0.6.  That would explain it...

So how does one using 4.0.6 perform a query on a postgres database?  I think
it's pg_exec.  However, my manual is for the newest versions of PHP.  Is the
syntax the same?  Is there an older manual out there?

Thanks!  That definitely answeres that question.

-steve

- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 11:17 PM
Subject: Re: [PHP] FATAL call to undefined function pg_query()


 On Wednesday 29 May 2002 11:37, Steve G wrote:

  Fatal error: Call to undefined function: pg_query() in
  /var/www/html/steve/frontdoor.php on line 42

  but for some reason pg_query gives me an undefined function.  What
gives??
  Is this function not valid?  The manual says it is..  I think my syntax
is
  correct...
 
  Line 42 - pg_query(select * from users, $link);

 What version of php are you using? pg_query is only available for PHP 4 =
 4.2.0

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 You should never bet against anything in science at odds of more than
 about 10^12 to 1.
 -- Ernest Rutherford
 */


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PostgreSQL - WHILE loop working too well / WARNING: Unable to jump to row 2 on PostgreSQL...

2002-05-29 Thread Steve G

I do not understand why PHP is trying to pull row 2!!  I want to create an
array of data and construct a table from a query.  The echo of $rows shows 2
rows, so if I'm setting my variable to 0 and incrementing with each loop, it
doesn't make sense to me why it tries to pull row 2.  It should stop at row
1 because the next loop would make the variable 2 and the if says if $ii is
less than 2.

WHAT AM I MISSING!?

I have a while loop written to pull data from a postgreSQL database.  I have
2 and only 2 rows of data in this table.  Probably labeled within PostgreSQL
as '0' and '1'.  The browser displays the error message along with the
proper table listed below it!!

  Warning: Unable to jump to row 2 on PostgreSQL result index 2 in
/var/www/html/steve/frontdoor.php on line 92
   sgaas  Steve  Gaas
  mjohnson  Matt  Johnson




The code is:
?
$results = pg_exec($link, select * from users);
 if (!$link) {
  print Could not connect;
  }

$ii = 0;

$rows = pg_numrows($results);

if ($rows) {
echo There are $rows rows of data in $localdb;
}

echo BR\nHR;
?

table

?
if ( $ii  $rows) {
 while ($tabledata = pg_fetch_array($results, $ii)) {--(LINE 92)

 $username = $tabledata[username];
 $firstname = $tabledata[firstname];
 $lastname = $tabledata[lastname];
 echo TR\n;
 echo td$username/td\n;
 echo td$firstname/td\n;
 echo td$lastname/td\n;
 echo /tr\n;
 $ii++;
 }

  }
?
/table


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] FATAL call to undefined function pg_query()

2002-05-28 Thread Steve G

Hello,

I don't know exactly why I'm getting this output:

Fatal error: Call to undefined function: pg_query() in
/var/www/html/steve/frontdoor.php on line 42

I can successfully connect to my db using:

$link = pg_connect (host=localhost dbname=$dbname user=$user);

And I even get the proper Database name using:

echo pg_db_name();

but for some reason pg_query gives me an undefined function.  What gives??
Is this function not valid?  The manual says it is..  I think my syntax is
correct...

Line 42 - pg_query(select * from users, $link);

Can anyone help me?

Thanks!

-steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php