Re: where to place the PHP scripts... - Mailing list pgsql-php

From kmh496
Subject Re: where to place the PHP scripts...
Date
Msg-id 1146145873.28615.3.camel@var.sirfsup.com
Whole thread Raw
In response to where to place the PHP scripts...  ("richelle e argones" <richelle.e.argones@gmail.com>)
List 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.






pgsql-php by date:

Previous
From: "richelle e argones"
Date:
Subject: where to place the PHP scripts...
Next
From:
Date:
Subject: Re: PostgreSQL 8.1 + PHP5.1.x/4.4.2 + Apache 2.0.55/1.3.34