pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PHP + PostgreSQL
16+ messages / 11 participants
[nested] [flat]

* PHP + PostgreSQL
@ 2002-08-08 08:11  Carlos Garcìa Gòmez <garciagca@inta.es>
  0 siblings, 6 replies; 16+ messages in thread

From: Carlos Garcìa Gòmez @ 2002-08-08 08:11 UTC (permalink / raw)
  To: pgsql-php

Hi everybody! I've just begun with postgre and php and I really need a good
tutorial or any kind of document that can help me.

Thank U all!




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

* Re: PHP + PostgreSQL
@ 2002-08-08 13:14  Martín Marqués <martin@bugs.unl.edu.ar>
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: Martín Marqués @ 2002-08-08 13:14 UTC (permalink / raw)
  To: pgsql-php

On Jue 08 Ago 2002 05:11, Carlos Garcìa Gòmez wrote:
> Hi everybody! I've just begun with postgre and php and I really need a good
> tutorial or any kind of document that can help me.

Both php and postgreSQL hav large documentation. The documentation of both is 
very complete, and simple to read.
If you're on some Linux and installed from rpm or deb, you should look for the 
php-manual and postgresql-docs packages, and install them.

Saludos... :-)


-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------



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

* Re: PHP + PostgreSQL
@ 2002-08-08 13:44  Andre Dubuc <aajdubuc@webhart.net>
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: Andre Dubuc @ 2002-08-08 13:44 UTC (permalink / raw)
  To: Carlos Garcìa Gòmez <garciagca@inta.es>; pgsql-php

Hi Carlos,

Sorry about that blank first reply [hit the wrong button on my browser :>]

Probably the best tutorial I used when beginning with PHP + PostgreSQL was 
found in the 'Tutorial' > "PostgreSQL' section at:

URL:http://www.newbienetwork.net

After you've tried a few examples, try the wonderful examples at devnetwork.

URL:http://www.devshed.com

Have fun -- it always gets more interesting!
Hth,
Andre


On Thursday 08 August 2002 04:11 am, Carlos Garcìa Gòmez wrote:
> Hi everybody! I've just begun with postgre and php and I really need a good
> tutorial or any kind of document that can help me.
>
> Thank U all!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



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

* Re: PHP + PostgreSQL
@ 2002-08-08 14:45  mike <mike@partner2partner.com>
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: mike @ 2002-08-08 14:45 UTC (permalink / raw)
  To: Carlos Garcìa Gòmez <garciagca@inta.es>; +Cc: pgsql-php

Carlos Garcìa Gòmez writes:
> Hi everybody! I've just begun with postgre and php and I really 
> need a good tutorial or any kind of document that can help me.

'PHP and PostgreSQL' by Ewald Geschwinde and Hans-Jurgen Schonig 

http://www.amazon.com/exec/obidos/ASIN/0672323826/qid=1028817869/sr=8-1/ref= 
sr_8_1/104-7521931-8220702 

-- 
Michael J. Upchurch
Partner2Partner Communications  mike@partner2partner.com  615.286.2199 




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

* Re: PHP + PostgreSQL
@ 2002-08-08 15:51  Hans-Jürgen Schönig <postgres@cybertec.at>
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: Hans-Jürgen Schönig @ 2002-08-08 15:51 UTC (permalink / raw)
  To: Carlos Garcìa Gòmez <garciagca@inta.es>; pgsql-php

Carlos Garcìa Gòmez wrote:

>Hi everybody! I've just begun with postgre and php and I really need a good
>tutorial or any kind of document that can help me.
>
>Thank U all!
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>  
>



I have written a book called "PHP and PostgreSQL: Advanced Web 
Development" - I hope this is what you have been looking for.

    Best regards,
        Hans-Jürgen Schönig


-- 
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14
A-1160 Vienna, Austria
www.postgresql.at <http://www.postgresql.at;, cluster.postgresql.at 
<http://cluster.postgresql.at;, www.cybertec.at 
<http://www.cybertec.at;, kernel.cybertec.at <http://kernel.cybertec.at;




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

* Re: PHP + PostgreSQL
@ 2002-08-08 19:33  Chadwick Rolfs <cmr@shell.gis.net>
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: Chadwick Rolfs @ 2002-08-08 19:33 UTC (permalink / raw)
  To: Carlos Garcìa Gòmez <garciagca@inta.es>; +Cc: pgsql-php

I've learned quite a bit from zend.com's tutorials.  It's mostly php, but
if you couple it with the postgresql tutorial, it comes together
eventually.

First look on the zend home page, then check out:
http://www.zend.com/interest/databases.php

Then go to tutorials... it's all mysql, but the differences in php code is
very little.  This one may help:
http://www.zend.com/zend/tut/tutorial-yank.php

You shouldn't _need_ to buy a book, but it's always good to support the
authors :).  Let us know what you went with!

On Thu, 8 Aug 2002, [iso-8859-1] Carlos Garcìa Gòmez wrote:

> Hi everybody! I've just begun with postgre and php and I really need a good
> tutorial or any kind of document that can help me.
> 
> Thank U all!
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-Chadwick




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

* Re: PHP + PostgreSQL
@ 2002-08-09 01:27  hodges@xprt.net
  parent: Carlos Garcìa Gòmez <garciagca@inta.es>
  5 siblings, 0 replies; 16+ messages in thread

From: hodges@xprt.net @ 2002-08-09 01:27 UTC (permalink / raw)
  To: pgsql-php

The book by Julie Morani, PHP Fast and Easy Web Development
(I think) is excellent.  It is aimed at MySQL but as a
complete DB newbie I had no trouble converting the
examples to PostgreSQL.

Tom

On 8 Aug 2002 at 15:33, Chadwick Rolfs wrote:

> I've learned quite a bit from zend.com's tutorials.  It's mostly php, but
> if you couple it with the postgresql tutorial, it comes together
> eventually.
>
> First look on the zend home page, then check out:
> http://www.zend.com/interest/databases.php
>
> Then go to tutorials... it's all mysql, but the differences in php code is
> very little.  This one may help:
> http://www.zend.com/zend/tut/tutorial-yank.php
>
> You shouldn't _need_ to buy a book, but it's always good to support the
> authors :).  Let us know what you went with!
>
> On Thu, 8 Aug 2002, [iso-8859-1] Carlos Garcìa Gòmez wrote:
>
> > Hi everybody! I've just begun with postgre and php and I really need a good
> > tutorial or any kind of document that can help me.
> >
> > Thank U all!
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
>
> -Chadwick
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>





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

* PHP/postgreSQL
@ 2006-02-04 22:14  vince@weaktight.com
  0 siblings, 2 replies; 16+ messages in thread

From: vince@weaktight.com @ 2006-02-04 22:14 UTC (permalink / raw)
  To: pgsql-php

I'm running PHP/mySQL via a web hosting service.  I require my PHP scripts to
access an external PostgreSQL database.

I have the PostgreSQL server setup to accept connections from anyone:
[pg_hba_conf]

# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all all 0.0.0.0/0 trust

[--]

I've tested this connection via pgAdminIII and I'm able to connect using this
IP, but when I try to connect via php from the hosted webpage...

My php script is simple:

<?php
$conn_string = "host=24.85.82.xxx port=5432 dbname=PGSQL1 user=postgres
password=xxx";

$dbconn = pg_connect($conn_string);

if ($dbconn) {

print "Successfully connected to: " . pg_host($dbconn) . "<br/>\n";

} else {

print pg_last_error($dbconn);
exit;
}

pg_close($dbconn);
?>

But I'm foiled by:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect
to server: Operation timed out Is the server running on host "24.85.82.xxx" and
accepting TCP/IP connections on port 5432? in
/usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on line 13

Any thoughts or suggestions would be greatly appreciated. I'm not very
experienced with any of this stuff.

Thanks.




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

* Re: PHP/postgreSQL
@ 2006-02-04 23:40  Gavin M. Roy <gmr@ehpg.net>
  parent: vince@weaktight.com
  1 sibling, 2 replies; 16+ messages in thread

From: Gavin M. Roy @ 2006-02-04 23:40 UTC (permalink / raw)
  To: vince@weaktight.com; +Cc: pgsql-php

Are you sure your isp isn't blocking access?  First thought to come  
to mind is shaw cable might be blocking port 5432.  Can you try and  
telnet to the box from your server on port 5432?  Also check to make  
sure pgsql is listening on tcp/ip.  Also if you're a home shaw  
customer, are you behind a nat router?  Have you opened up access on  
the nat router to get to your box behind it?

HTH,

Gavin

On Feb 4, 2006, at 2:14 PM, vince@weaktight.com wrote:

> I'm running PHP/mySQL via a web hosting service.  I require my PHP  
> scripts to
> access an external PostgreSQL database.
>
> I have the PostgreSQL server setup to accept connections from anyone:
> [pg_hba_conf]
>
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
> host all all 0.0.0.0/0 trust
>
> [--]
>
> I've tested this connection via pgAdminIII and I'm able to connect  
> using this
> IP, but when I try to connect via php from the hosted webpage...
>
> My php script is simple:
>
> <?php
> $conn_string = "host=24.85.82.xxx port=5432 dbname=PGSQL1  
> user=postgres
> password=xxx";
>
> $dbconn = pg_connect($conn_string);
>
> if ($dbconn) {
>
> print "Successfully connected to: " . pg_host($dbconn) . "<br/>\n";
>
> } else {
>
> print pg_last_error($dbconn);
> exit;
> }
>
> pg_close($dbconn);
> ?>
>
> But I'm foiled by:
>
> Warning: pg_connect(): Unable to connect to PostgreSQL server:  
> could not connect
> to server: Operation timed out Is the server running on host  
> "24.85.82.xxx" and
> accepting TCP/IP connections on port 5432? in
> /usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on  
> line 13
>
> Any thoughts or suggestions would be greatly appreciated. I'm not very
> experienced with any of this stuff.
>
> Thanks.
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster




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

* Re: PHP/postgreSQL
@ 2006-02-04 23:54  vince@weaktight.com
  parent: Gavin M. Roy <gmr@ehpg.net>
  1 sibling, 0 replies; 16+ messages in thread

From: vince@weaktight.com @ 2006-02-04 23:54 UTC (permalink / raw)
  To: Gavin M. Roy <gmr@ehpg.net>; +Cc: pgsql-php

So the setup is as follows:

I have a web server hosted by stormweb that runs the PHP scripts.  On 
one of my
local machines behind a router, I have a postgreSQL server service setup.

If I run pgAdminIII on the postgreSQL server machine using the external IP to
connnect (24.85.82.xxx), it works ONLY with these postgreSQL server settings:

>> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>> host all all 0.0.0.0/0 trust

(I believe this is the setting that makes "sure pgsql is listening on tcp/ip")

I have enabled port forwarding on my router to forward 5432 to the proper
machine. Additionally, when I was starting, I was not able to connect from my
local server machine to itself via 24.85.82.xxx until I allowed the 5432 port
to pass through the window's firewall. (I've tried disabling that as well)

Given that it connects, can I assume that it's taking an external route to get
there and that shaw is allowing this traffic? (otherwise the firewall wouldn't
have any effect?)

Are there any possible problems from the web server machine that might be
preventing the connection?


Quoting "Gavin M. Roy" <gmr@ehpg.net>:

> Are you sure your isp isn't blocking access?  First thought to come  
> to mind is shaw cable might be blocking port 5432.  Can you try and  
> telnet to the box from your server on port 5432?  Also check to make  
> sure pgsql is listening on tcp/ip.  Also if you're a home shaw  
> customer, are you behind a nat router?  Have you opened up access on  
> the nat router to get to your box behind it?
>
> HTH,
>
> Gavin
>
> On Feb 4, 2006, at 2:14 PM, vince@weaktight.com wrote:
>
>> I'm running PHP/mySQL via a web hosting service.  I require my PHP  
>> scripts to
>> access an external PostgreSQL database.
>>
>> I have the PostgreSQL server setup to accept connections from anyone:
>> [pg_hba_conf]
>>
>> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>> host all all 0.0.0.0/0 trust
>>
>> [--]
>>
>> I've tested this connection via pgAdminIII and I'm able to connect  
>> using this
>> IP, but when I try to connect via php from the hosted webpage...
>>
>> My php script is simple:
>>
>> <?php
>> $conn_string = "host=24.85.82.xxx port=5432 dbname=PGSQL1  user=postgres
>> password=xxx";
>>
>> $dbconn = pg_connect($conn_string);
>>
>> if ($dbconn) {
>>
>> print "Successfully connected to: " . pg_host($dbconn) . "<br/>\n";
>>
>> } else {
>>
>> print pg_last_error($dbconn);
>> exit;
>> }
>>
>> pg_close($dbconn);
>> ?>
>>
>> But I'm foiled by:
>>
>> Warning: pg_connect(): Unable to connect to PostgreSQL server:  
>> could not connect
>> to server: Operation timed out Is the server running on host  
>> "24.85.82.xxx" and
>> accepting TCP/IP connections on port 5432? in
>> /usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on  line 13
>>
>> Any thoughts or suggestions would be greatly appreciated. I'm not very
>> experienced with any of this stuff.
>>
>> Thanks.
>>
>>
>> ---------------------------(end of  broadcast)---------------------------
>> TIP 2: Don't 'kill -9' the postmaster
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>






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

* Re: PHP/postgreSQL
@ 2006-02-04 23:57  vince@weaktight.com
  parent: Gavin M. Roy <gmr@ehpg.net>
  1 sibling, 1 reply; 16+ messages in thread

From: vince@weaktight.com @ 2006-02-04 23:57 UTC (permalink / raw)
  To: Gavin M. Roy <gmr@ehpg.net>; +Cc: pgsql-php

> Can you try and  telnet to the box from your server on port 5432?

I don't have shell access to the webserver machine.  I can connect from one of
my local machines via: telnet 24.85.82.xxx 5432

It brings up an empty console that closes after I enter input.


Quoting "Gavin M. Roy" <gmr@ehpg.net>:

> Are you sure your isp isn't blocking access?  First thought to come  
> to mind is shaw cable might be blocking port 5432.  Can you try and  
> telnet to the box from your server on port 5432?  Also check to make  
> sure pgsql is listening on tcp/ip.  Also if you're a home shaw  
> customer, are you behind a nat router?  Have you opened up access on  
> the nat router to get to your box behind it?
>
> HTH,
>
> Gavin
>
> On Feb 4, 2006, at 2:14 PM, vince@weaktight.com wrote:
>
>> I'm running PHP/mySQL via a web hosting service.  I require my PHP  
>> scripts to
>> access an external PostgreSQL database.
>>
>> I have the PostgreSQL server setup to accept connections from anyone:
>> [pg_hba_conf]
>>
>> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>> host all all 0.0.0.0/0 trust
>>
>> [--]
>>
>> I've tested this connection via pgAdminIII and I'm able to connect  
>> using this
>> IP, but when I try to connect via php from the hosted webpage...
>>
>> My php script is simple:
>>
>> <?php
>> $conn_string = "host=24.85.82.xxx port=5432 dbname=PGSQL1  user=postgres
>> password=xxx";
>>
>> $dbconn = pg_connect($conn_string);
>>
>> if ($dbconn) {
>>
>> print "Successfully connected to: " . pg_host($dbconn) . "<br/>\n";
>>
>> } else {
>>
>> print pg_last_error($dbconn);
>> exit;
>> }
>>
>> pg_close($dbconn);
>> ?>
>>
>> But I'm foiled by:
>>
>> Warning: pg_connect(): Unable to connect to PostgreSQL server:  
>> could not connect
>> to server: Operation timed out Is the server running on host  
>> "24.85.82.xxx" and
>> accepting TCP/IP connections on port 5432? in
>> /usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on  line 13
>>
>> Any thoughts or suggestions would be greatly appreciated. I'm not very
>> experienced with any of this stuff.
>>
>> Thanks.
>>
>>
>> ---------------------------(end of  broadcast)---------------------------
>> TIP 2: Don't 'kill -9' the postmaster
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>






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

* Re: PHP/postgreSQL
@ 2006-02-05 04:04  Jeff MacDonald <jam@zoidtechnologies.com>
  parent: vince@weaktight.com
  0 siblings, 1 reply; 16+ messages in thread

From: Jeff MacDonald @ 2006-02-05 04:04 UTC (permalink / raw)
  To: vince@weaktight.com; +Cc: pgsql-php

On Sat, 2006-02-04 at 18:57 -0500, vince@weaktight.com wrote:
> > Can you try and  telnet to the box from your server on port 5432?
> 
> I don't have shell access to the webserver machine.  I can connect from one of
> my local machines via: telnet 24.85.82.xxx 5432
> 
> It brings up an empty console that closes after I enter input.
> 

ok.. in all of your tests you have been connecting across your local
network, which takes the shaw devices out of the equation.

if you are able to connect with pgAdmin3 via ip address (and from your
message it seems that you are), my guess is that pgsql is accepting
connections via tcp/ip.

since you are attempting to connect to pgsql on your local network from
your web server (which is hosted elsewhere) and it times out, this tells
me that there is a device in the middle someplace that is firewalling
the packets.

you are *unlikely* to convince shaw to make firewall changes (if that is
what is happening) so you can do this.

ok.. now the hopefully easy question :): why are you trying to set
things up this way?

regards,
J
-- 
Jeff MacDonald
Zoid Technologies, http://zoidtechnologies.com/




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

* Re: PHP/postgreSQL
@ 2006-02-05 04:24  vince@weaktight.com
  parent: Jeff MacDonald <jam@zoidtechnologies.com>
  0 siblings, 1 reply; 16+ messages in thread

From: vince@weaktight.com @ 2006-02-05 04:24 UTC (permalink / raw)
  To: Jeff MacDonald <jam@zoidtechnologies.com>; +Cc: pgsql-php

Quoting Jeff MacDonald <jam@zoidtechnologies.com>:

> ok.. in all of your tests you have been connecting across your local
> network, which takes the shaw devices out of the equation.
>
> if you are able to connect with pgAdmin3 via ip address (and from your
> message it seems that you are), my guess is that pgsql is accepting
> connections via tcp/ip.
>
> since you are attempting to connect to pgsql on your local network from
> your web server (which is hosted elsewhere) and it times out, this tells
> me that there is a device in the middle someplace that is firewalling
> the packets.
>
> you are *unlikely* to convince shaw to make firewall changes (if that is
> what is happening) so you can do this.
>
> ok.. now the hopefully easy question :): why are you trying to set
> things up this way?
>
> regards,
> J
> --
> Jeff MacDonald
> Zoid Technologies, http://zoidtechnologies.com/


Fair question.  I'll tell you what I'm trying to do, and perhaps you 
can advise
a better solution.

On my local machine I have a postpreSQL database.  This database I update
constantly let's say.

Hosted on another machine in cyberspace is my webserver.  On this 
machine I have
a webpage that I want to update using data from the database on my local
machine.  The webserver is running PHP/mySQL.

Can you think of a better way?  A direct connection querying the 
database seemed
like the best solution for this.

I'm not sure if my web host would allow me to run a postgreSQL server on it as
well.  So, ftp'ing the database up once a day say may not be an option.

One of my original thoughts (before I understood the systems at all) 
was that I
would have to have a "cron" job running on my local machine that would ftp up
data as it was collected.  The webserver, the next time a php script 
ran, would
check for new data, parse it, add it to the mySQL database on the 
webserver, and
then run the scripts using the data from the webserver's mySQL server.

Sounds horrid!









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

* Re: PHP/postgreSQL
@ 2006-02-05 05:02  Jeff MacDonald <jam@zoidtechnologies.com>
  parent: vince@weaktight.com
  0 siblings, 1 reply; 16+ messages in thread

From: Jeff MacDonald @ 2006-02-05 05:02 UTC (permalink / raw)
  To: vince@weaktight.com; +Cc: pgsql-php

On Sat, 2006-02-04 at 23:24 -0500, vince@weaktight.com wrote:
> Quoting Jeff MacDonald <jam@zoidtechnologies.com>:
> > ok.. now the hopefully easy question :): why are you trying to set
> > things up this way?

> Fair question.  I'll tell you what I'm trying to do, and perhaps you 
> can advise a better solution.
> 
> On my local machine I have a postpreSQL database.  This database I update
> constantly let's say.
> 
> Hosted on another machine in cyberspace is my webserver.  On this machine I have
> a webpage that I want to update using data from the database on my local
> machine.  The webserver is running PHP/mySQL.
> 

> I'm not sure if my web host would allow me to run a postgreSQL server on it as
> well.  So, ftp'ing the database up once a day say may not be an option.
> 

ask. if they say no, get an isp that will say yes.

> One of my original thoughts (before I understood the systems at all)
>  was that I would have to have a "cron" job running on my local machine
>  that would ftp up data as it was collected.  The webserver, the next
>  time a php script ran, would check for new data, parse it, add it to
>  the mySQL database on the webserver, and then run the scripts using
>  the data from the webserver's mySQL server.
> 

have you considered SOAP? as much as I "love" mySQL, it does work (most
of the time ;)) and with SOAP you can still update your data fairly
often.

regards,
J
-- 
Jeff MacDonald
Zoid Technologies, http://zoidtechnologies.com/




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

* Re: PHP/postgreSQL
@ 2006-02-05 05:50  vince@weaktight.com
  parent: Jeff MacDonald <jam@zoidtechnologies.com>
  0 siblings, 0 replies; 16+ messages in thread

From: vince@weaktight.com @ 2006-02-05 05:50 UTC (permalink / raw)
  To: Jeff MacDonald <jam@zoidtechnologies.com>; +Cc: pgsql-php

Quoting Jeff MacDonald <jam@zoidtechnologies.com>:

>> I'm not sure if my web host would allow me to run a postgreSQL 
>> server on it as
>> well.  So, ftp'ing the database up once a day say may not be an option.
>
> ask. if they say no, get an isp that will say yes.
>
>> One of my original thoughts (before I understood the systems at all)
>>  was that I would have to have a "cron" job running on my local machine
>>  that would ftp up data as it was collected.  The webserver, the next
>>  time a php script ran, would check for new data, parse it, add it to
>>  the mySQL database on the webserver, and then run the scripts using
>>  the data from the webserver's mySQL server.
>
> have you considered SOAP? as much as I "love" mySQL, it does work (most
> of the time ;)) and with SOAP you can still update your data fairly
> often.
>
> regards,
> J
> --
> Jeff MacDonald
> Zoid Technologies, http://zoidtechnologies.com/

I am still on a 30 day trial with their hosting, but I'm new to web 
development,
so I'm slow to code up the things I want and wasn't sure what I needed going
into this...

I'm not quite sure what role SOAP would play in the desired system, but I'll
look into it.

Thanks for your help,
Vince.
Another technology to learn!




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

* Re: PHP/postgreSQL
@ 2006-02-09 21:08  Frank Bax <fbax@sympatico.ca>
  parent: vince@weaktight.com
  1 sibling, 0 replies; 16+ messages in thread

From: Frank Bax @ 2006-02-09 21:08 UTC (permalink / raw)
  To: pgsql-php

At 05:14 PM 2/4/06, vince@weaktight.com wrote:

>I'm running PHP/mySQL via a web hosting service.  I require my PHP scripts to
>access an external PostgreSQL database.
>
>I have the PostgreSQL server setup to accept connections from anyone:
>I've tested this connection via pgAdminIII and I'm able to connect using this
>IP, but when I try to connect via php from the hosted webpage...
>
>But I'm foiled by:
>
>Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
>connect
>to server: Operation timed out Is the server running on host 
>"24.85.82.xxx" and
>accepting TCP/IP connections on port 5432? in
>/usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on line 13
>
>Any thoughts or suggestions would be greatly appreciated. I'm not very
>experienced with any of this stuff.


Your webhosting company must be blocking outgoing requests on port 5432.  I 
was able to connect to your server with your code - no problem. 




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


end of thread, other threads:[~2006-02-09 21:08 UTC | newest]

Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 08:11 PHP + PostgreSQL Carlos Garcìa Gòmez <garciagca@inta.es>
2002-08-08 13:14 ` Martín Marqués <martin@bugs.unl.edu.ar>
2002-08-08 13:44 ` Andre Dubuc <aajdubuc@webhart.net>
2002-08-08 14:45 ` mike <mike@partner2partner.com>
2002-08-08 15:51 ` Hans-Jürgen Schönig <postgres@cybertec.at>
2002-08-08 19:33 ` Chadwick Rolfs <cmr@shell.gis.net>
2002-08-09 01:27 ` hodges@xprt.net
2006-02-04 22:14 PHP/postgreSQL vince@weaktight.com
2006-02-04 23:40 ` Re: PHP/postgreSQL Gavin M. Roy <gmr@ehpg.net>
2006-02-04 23:54   ` Re: PHP/postgreSQL vince@weaktight.com
2006-02-04 23:57   ` Re: PHP/postgreSQL vince@weaktight.com
2006-02-05 04:04     ` Re: PHP/postgreSQL Jeff MacDonald <jam@zoidtechnologies.com>
2006-02-05 04:24       ` Re: PHP/postgreSQL vince@weaktight.com
2006-02-05 05:02         ` Re: PHP/postgreSQL Jeff MacDonald <jam@zoidtechnologies.com>
2006-02-05 05:50           ` Re: PHP/postgreSQL vince@weaktight.com
2006-02-09 21:08 ` Re: PHP/postgreSQL Frank Bax <fbax@sympatico.ca>

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