pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
where to place the PHP scripts...
2+ messages / 2 participants
[nested] [flat]

* where to place the PHP scripts...
@ 2006-04-27 13:32  richelle e argones <richelle.e.argones@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: richelle e argones @ 2006-04-27 13:32 UTC (permalink / raw)
  To: pgsql-php

hi!

This is my first time to use PostgreSQL database engine, and i don't have
any idea where to put the PHP scripts so PostgreSQL can recognize the
commands. Where in Apache should i place my PHP scripts? In what specific
folder?

i am using Apache version 1.3.28 as my server and my PHP is version 4.1.1. My
Apache and PHP is a part of PHPtriad which has also MySQL. Is it necessary
for me to have an Apache server and PHP separate from PHPtriad? If so, what
versions of Apache and PHP should i use?

The version of PostgreSQL that i installed in my WindowsXP machine is 8.0.

Please help. Thank you.

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

* Re: where to place the PHP scripts...
@ 2006-04-27 13:51  kmh496 <kmh496@kornet.net>
  0 siblings, 0 replies; 2+ messages in thread

From: kmh496 @ 2006-04-27 13:51 UTC (permalink / raw)
  To: pgsql-php

2006-04-27 (¸ñ), 21:32 +0800, richelle e argones ¾²½Ã±æ:
> hi! 
>  
> This is my first time to use PostgreSQL database engine, and i don't
> have any idea where to put the PHP scripts so PostgreSQL can recognize
> the commands. Where in Apache should i place my PHP scripts? In what
> specific folder?
find httpd.conf which should be in c:\program_files \ apache \ apache2 \
conf \ X!!
or somethign similar.
do a search for DocumentRoot and that is where the php scripts should be
located.
>  
> i am using Apache version 1.3.28 as my server and my PHP is version
> 4.1.1. My Apache and PHP is a part of PHPtriad which has
> also MySQL. Is it necessary for me to have an Apache server and PHP
> separate from PHPtriad? If so, what versions of Apache and PHP should
> i use? 
>  
you need to try to run a simple pg_connect query to see if the command
was recognized.
some sample is like this


<?php
$connection = pg_Connect ("dbname=test port=5432 user=webuser password='webuser'");
if($connection == 0)
	{
	die("Connection failed\n");
	}
$sql = "select nextval('mysequence');";
$result=pg_Exec($connection, $sql); 
$row = pg_fetch_row($result, 0);
$number = $row[0];
echo $number;
?>




please try that or something similar.  use google, find code.

> The version of PostgreSQL that i installed in my WindowsXP machine is
> 8.0.
>  
php needs compiled-in support for postgresql, though, probably some dll
or other.
> Please help. Thank you.
-- 
my site <a href="http://www.myowndictionary.com">myowndictionary</a; was
made to help students of many languages learn them faster.








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


end of thread, other threads:[~2006-04-27 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-27 13:32 where to place the PHP scripts... richelle e argones <richelle.e.argones@gmail.com>
2006-04-27 13:51 Re: where to place the PHP scripts... kmh496 <kmh496@kornet.net>

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