Re: [postgis-users] Db connect

2010-03-04 Thread Nicolas Ribot
> With them in place..
> ERROR received
> Parse error: syntax error, unexpected '=' in C:\OSGeo4W\apache\htdocs\lu.php 
> on line 2
>

Hi,

$db_handle = pg_connect(”host = localhost port = 5432
 dbname = postgis user = postgres password = GrassJump”);

Put this on one line, not two.
Escape your '\' chars: c:\\OSGeo4W\\...

Nico
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Db connect

2010-03-02 Thread Ravi
Hi Ben,
> If you are just getting that output it makes me wonder does
> your script start with ... ie 
> 
>  
> $db_handle = pg_connect(”host = localhost port = 5432
> dbname = postgis user = postgres password = GrassJump”);
> 
> $query = “SELECT * FROM rjybound”; 
> 
> $result = pgexec($dbhandle, $query);
> 
> ?>
With them in place..
ERROR received
Parse error: syntax error, unexpected '=' in C:\OSGeo4W\apache\htdocs\lu.php on 
line 2

Ravi Kumar
> 
> Ben
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 


  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Db connect

2010-03-02 Thread Ben Madin
Ravi,

On 03/03/2010, at 14:45 , Ravi wrote:

> no error is given from the browser, but it just displays
> 
> $db_handle = pg_connect(”host = localhost port = 5432 dbname = postgis user = 
> postgres password = GrassJump”); $query = “SELECT * FROM rjybound”; $result = 
> pgexec($dbhandle, $query);

If you are just getting that output it makes me wonder does your script start 
with ... ie 




cheers

Ben


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Db connect

2010-03-02 Thread Ben Madin
Ravi,

A little bit more information about what is happening would help?

Do you have some output from the apache/php error log?

Does the User / Password combination have access to the tables normally?

cheers

Ben



On 03/03/2010, at 11:01 , Ravi wrote:

> Hi,
> am using OSGeo4W bundle and the apache and php there in.
> Apache installed OK showing as aservice and in the browser
> http:\\localhost
> issues the OSGeo4w welcome screen and phpthere on
> 
> with the following wish to connect to PGSQL 8.4 and postGIS there in
> with the following. But it doesnt work. Where am I going wrong ?
> 
> $db_handle = pg_connect(”host = localhost port = 5432 dbname = postgis user = 
> postgres password = GrassJump”); $query = “SELECT * FROM rjybound”; $result = 
> pgexec($dbhandle, $query);
> 
> Ravi Kumar
> 
> 
>  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
> http://downloads.yahoo.com/in/internetexplorer/
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Db connect

2010-03-02 Thread Ravi
Hi,
am using OSGeo4W bundle and the apache and php there in.
Apache installed OK showing as aservice and in the browser
http:\\localhost
issues the OSGeo4w welcome screen and phpthere on

with the following wish to connect to PGSQL 8.4 and postGIS there in
with the following. But it doesnt work. Where am I going wrong ?

$db_handle = pg_connect(”host = localhost port = 5432 dbname = postgis user = 
postgres password = GrassJump”); $query = “SELECT * FROM rjybound”; $result = 
pgexec($dbhandle, $query);

Ravi Kumar


  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users