[GENERAL] php4 and postgresql 8.3

2009-03-02 Thread shadrack
My basic question is...are php4 and postgresql 8.3 compatible?
I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
some of those versions are old...its government, and I unfortunately
don't have control over the version.  In fact, I don't even have root
access right now.  But I've got projects waiting to go live if I can
get php and postgresql to talk to each other.
When I try to connect, I get...call to undefined function pg_connect.
When I look in the php.ini file, there is no pgsql.so file, and in the
extension library in /usr/lib/php4...I only see ldap.so.
So do I need to have the IT person download the pgsql-php rpm?  Will
that take care of this?  This might be the only option, so hoepfully
there's something I can do.
Or should I just push to install php5 if they let me?  Will php5 and
postgresql work together inherently?  Or will I need to add modules to
the initial php5 installation?
Thanks for any help!
Shad

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread shadrack
On Mar 2, 5:35 pm, pie...@hogranch.com (John R Pierce) wrote:
 Tom Lane wrote:
  shadrack shadke...@hotmail.com writes:

  My basic question is...are php4 and postgresql 8.3 compatible?
  I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
  some of those versions are old...its government, and I unfortunately
  don't have control over the version.

  Er ... Red Hat *what*?  I don't think they ever used such a version
  number.  If they did it was a very long time ago (for calibration,
  they were just about to release RHL 7.3 when I joined the company,
  in 2001).  

 well, remember, they went Red Hat Linux 7.x, 8.x, 9 then very quickly
 switched to Red Hat Enterprise Linux 2, 2.1, 3, 4, and currently RHEL
 5.   RHEL 3 has had several quarterly updates, most recent of which is
 u9(I think), sometimes referred to as 3.9.

 if its RHEL 3 update-something that shadrack is discussing, it came with
 php 4.3.2 and rh-postgresql 7.3.21 (shudder!)

 --
 Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
 To make changes to your 
 subscription:http://www.postgresql.org/mailpref/pgsql-general

Yes, we had postgresql 7.3 but I installed postgresql 8.3 onto the
rhel3.  Do you think its going to work?  What's the solution that
involves the least work, considering I'm not the one maintaining these
machines?  Do you think it would be simple for the IT person to update
to rhel5 and php5?  Its basically just one machine that he would have
to update.  Thoughts?  Thanks so much for all the feedback.
shad

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] beginner postgis question lat/lon

2008-03-03 Thread shadrack
Thanks for the help!  Stupid error,
Shad

On Feb 28, 7:04 am, [EMAIL PROTECTED] (Michael Fuhr) wrote:
 On Wed, Feb 27, 2008 at 04:59:07PM -0800, shadrack wrote:
  This may seem like a very simple question...it is...but I can't find
  documentation on it to help. I've seen some posts about lat/long but
  none that give simple solutions on how to insert lat/long in tables.

 See the PostGIS documentation, in particular Chapter 4 Using PostGIS:

 http://postgis.refractions.net/docs/ch04.html

 (The site isn't responding right now; hopefully it'll be available
 soon.)

  postgis=# insert into routes_geom values(1, 'J084',
  GeomFromText('LINESTRING(38.20 -121.00, 38.20, -118.00)', 4326));

  I receive this error:
  ERROR:  parse error - invalid geometry
  CONTEXT:  SQL function geomfromtext statement 1

 There are two problems with the geometry string: the syntax error is
 due an extra comma in the second pair of coordinates, and coordinates
 should be (X Y) therefore (lon lat) instead of (lat lon).  Try this:

 insert into routes_geom values(1, 'J084', GeomFromText('LINESTRING(-121.00 
 38.20, -118.00 38.20)', 4326));

 You might wish to subscribe to the postgis-users mailing list if you
 have additional questions.

 --
 Michael Fuhr

 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?

                http://www.postgresql.org/docs/faq


---(end of broadcast)---
TIP 6: explain analyze is your friend


[GENERAL] beginner postgis question lat/lon

2008-02-27 Thread shadrack
Hi,
This may seem like a very simple question...it is...but I can't find
documentation on it to help. I've seen some posts about lat/long but
none that give simple solutions on how to insert lat/long in tables.
I'm a new user to postgis...I've been using mysql for a while but
needed the spatial functions so just recently downloaded postgresql/
postgis.
How do I create a simple table with several linestrings that have
coordinates in latitude/longitude?
Eventually, I'd like to create polygons with coordinates in lat/long
and see if they intersect various linestrings, but I'm trying to start
out simple.
Here's what I've done so far...

postgis=# \d routes_geom;
 Table public.routes_geom
 Column | Type  | Modifiers
+---+---
 id | integer   |
 name   | character varying(25) |
 geom   | geometry  |
Check constraints:
enforce_dims_geom CHECK (ndims(geom) = 2)
enforce_geotype_geom CHECK (geometrytype(geom) =
'LINESTRING'::text OR geom IS NULL)
enforce_srid_geom CHECK (srid(geom) = 4326)
postgis=# insert into routes_geom values(1, 'J084',
GeomFromText('LINESTRING(38.20 -121.00, 38.20, -118.00)', 4326));

I receive this error:
ERROR:  parse error - invalid geometry
CONTEXT:  SQL function geomfromtext statement 1

Do you have a good way to input lat/lon and do spatial relationships
using lat/long coords?
Thanks for any help,
Shad

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq