Re: where to place the PHP scripts...

From: kmh496 <kmh496(at)kornet(dot)net>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: where to place the PHP scripts...
Date: 2006-04-27 13:51:12
Message-ID: 1146145873.28615.3.camel@var.sirfsup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-php by date

  From Date Subject
Next Message belfegor666 2006-04-27 15:37:26 Re: PostgreSQL 8.1 + PHP5.1.x/4.4.2 + Apache 2.0.55/1.3.34
Previous Message richelle e argones 2006-04-27 13:32:33 where to place the PHP scripts...