From: kmh496 <kmh496@kornet.net>
To: pgsql-php@postgresql.org
Subject: Re: where to place the PHP scripts...
Date: Thu, 27 Apr 2006 22:51:12 +0900
Message-ID: <1146145873.28615.3.camel@var.sirfsup.com> (raw)
In-Reply-To: <11461448758536.1.ppp10@ppp10>
References: <11461448758536.1.ppp10@ppp10>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: kmh496@kornet.net
Subject: Re: where to place the PHP scripts...
In-Reply-To: <1146145873.28615.3.camel@var.sirfsup.com>
References: <11461448758536.1.ppp10@ppp10> <1146145873.28615.3.camel@var.sirfsup.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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