[PHP] Problem querying postgres
Hi, I am new to postgres using PHP. I have gotten PHP POSTGRES and PHPADMIN installed and have a database setup using PHPADMIN. The problem that I am having is that when I connect to postgres outside of PHPADMIN and try use pg_query() to do a select such as "SELECT PersonID FROM person" the string that is sent is "select personid from person". Now this is a problem because in the data base the field PersonID is not the same case as in the select that is sent and I get the error Warning: pg_query(): Query failed: ERROR: column "personid" does not exist in /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData.php on line 70 If I change the field to all lower case in the database this does not happen. Also I can isue this select within PHPADMIN and it does work! Can anyone tell me where the setting(s)are that are controling how php is sending strings? Thanx Joshua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem connecting to Postgres
Hi, I am a newby having a configuration problem. I am using PHP 4.3.6 and postgres 7.4.3 The problem is when I try to execute my php scripts that connect to postgres from the command line I get error like this: Fatal error: Call to undefined function: pg_connect() in /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData .php on line 28 But it works fine from a browser using apache. I have tried various user logins and have checked the environmental paths and all seems ok so it must be some configure problem but with what PHP or Postgres? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem connecting to Postgres
Thanks On Aug 23, 2004, at 12:04 PM, Jay Blanchard wrote: [snip] Fatal error: Call to undefined function: pg_connect() in /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData .php on line 28 [/snip] http://www.php.net/manual/en/features.commandline.php -- 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
Re: [PHP] Problem connecting to Postgres
Yes I have found that I am running v 4.3.2 on the command line and 4.3.6 under apache Is it possible to run the same version both on the command line and running on apache? On Aug 23, 2004, at 12:23 PM, Michal Migurski wrote: I am a newby having a configuration problem. I am using PHP 4.3.6 and postgres 7.4.3 The problem is when I try to execute my php scripts that connect to postgres from the command line I get error like this: Fatal error: Call to undefined function: pg_connect() in /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData .php on line 28 But it works fine from a browser using apache. The version of PHP used by Apache may not necessarily have been configured the same way as the one you're using on the command line. Try phpinfo() to determine what's there, and recompile/reinstall if you're lacking PG support. Or, try to find the command line instance that corresponds to the apache module you're using. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- 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
Re: [PHP] Problem connecting to Postgres
Ok next stupid question At the command line how to I force the execution of the 4.3.6 apache version or change the default to it. On Aug 23, 2004, at 2:39 PM, Jay Blanchard wrote: [snip] Yes I have found that I am running v 4.3.2 on the command line and 4.3.6 under apache Is it possible to run the same version both on the command line and running on apache? [/snip] Yes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file to blob
Hi, I am relatively new to php and could use a good pointing in the right direction. I have a soap client in NuSoap that I developed for a webservice that I wrote in another language and I need it to be able to send a file in a blob. I can't find an example of how you load a file in its entirety (not just the content) into a blob in PHP. I need to be able to do this because the webservice that is being called recreates the document locally for the user. Can this be done in PHP? Thanks Joshua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php