Обсуждение: PHP and PostgreSQL connection

Поиск
Список
Период
Сортировка

PHP and PostgreSQL connection

От
Rafael Mora
Дата:
Hello!
 Is there any special config to connect PHP+PostgreSQL+Apache2.0.54?, because I try to do pg_connect() and it seems that PHP doesn´t find the db, so please any help will be appreciated
 
Rafa

Re: PHP and PostgreSQL connection

От
Frank Bax
Дата:
At 07:31 AM 1/11/06, Rafael Mora wrote:
>  Is there any special config to connect PHP+PostgreSQL+Apache2.0.54?,
> because I try to do pg_connect() and it seems that PHP doesn´t find the
> db, so please any help will be appreciated


Presumably you've already installed php and pgsql.  You also need to
install php-pgsql package; then enable the module.


Re: PHP and PostgreSQL connection

От
"Javier Carlos"
Дата:
   What does your phpinfo() says? It sould say that your version of PostgreSQL
installation is Enabled. If so, what is the error message when you try to
connect with pg_connect ?

   Regards,

   Javier


On Wed, 11 Jan 2006 07:48:35 -0500, Frank Bax wrote
> At 07:31 AM 1/11/06, Rafael Mora wrote:
> >  Is there any special config to connect PHP+PostgreSQL+Apache2.0.54?,
> > because I try to do pg_connect() and it seems that PHP doesn´t find the
> > db, so please any help will be appreciated
>
> Presumably you've already installed php and pgsql.  You also need to
> install php-pgsql package; then enable the module.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
nediam.com.mx


Re: PHP and PostgreSQL connection

От
Rafael Mora
Дата:
Javier where can I find phpinfo()?? sorry I'm new with this... thanx for your help
 
Rafa

Re: PHP and PostgreSQL connection

От
seem.iges@mail.ee
Дата:
Hi,

make a simple text/php file e.g. info.php like this:

<?php
phpinfo();
?>

place the file into your document root dir set in apache httpd.conf.
Exec info.php in browser and you'll get a nice html table of
your php conf.

regards,
iges.

On Wednesday, 11. January 2006 15:17, you wrote:
> Javier where can I find phpinfo()?? sorry I'm new with this... thanx for
> your help
>
> Rafa

Re: PHP and PostgreSQL connection

От
"Javier Carlos"
Дата:
Create a new file with the following line:

<?php echo phpinfo(); ?>

and save as for example "hello.php" (it could be any name).

Then in your browser check it:

http://yourhost/path/to/hello.php


More information about this function: http://www.php.net/phpinfo

Regards,

Javier

PD. After you finish using this file hello.php, I recommend you to delete this file or change its permissions, or move it to another directory that it's not browsable by web.


On Wed, 11 Jan 2006 09:17:23 -0400, Rafael Mora wrote
> Javier where can I find phpinfo()?? sorry I'm new with this... thanx for your help
>  
> Rafa


--
nediam.com.mx

Re: PHP and PostgreSQL connection

От
Frank Bax
Дата:
At 08:17 AM 1/11/06, Rafael Mora wrote:

>Javier where can I find phpinfo()?? sorry I'm new with this... thanx for
>your help
>


Have you tried google?  Either of the first two hits when searching for
"phpinfo" would have answered this question.


Re: PHP and PostgreSQL connection

От
Rafael Mora
Дата:
Yeah sure no doubt Google would help me, but I'm doing another project in Java using RMI, im studying Informatic Engineering (like Computer Engineering) and I prefered to get your help!! while I'm focused on the other project...
 
Rafa

 
On 1/11/06, Frank Bax <fbax@sympatico.ca> wrote:
At 08:17 AM 1/11/06, Rafael Mora wrote:

>Javier where can I find phpinfo()?? sorry I'm new with this... thanx for
>your help
>


Have you tried google?  Either of the first two hits when searching for
"phpinfo" would have answered this question.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Re: PHP and PostgreSQL connection

От
"Joshua D. Drake"
Дата:
Rafael Mora wrote:

> Yeah sure no doubt Google would help me, but I'm doing another project
> in Java using RMI, im studying Informatic Engineering (like Computer
> Engineering) and I prefered to get your help!! while I'm focused on
> the other project...


More specifically, the PHP docs will help you. We are happy to help of
course but you should do a little research.

Sincerely,

Joshua D. Drake

>
> Rafa
>
>
> On 1/11/06, *Frank Bax* <fbax@sympatico.ca <mailto:fbax@sympatico.ca>>
> wrote:
>
>     At 08:17 AM 1/11/06, Rafael Mora wrote:
>
>     >Javier where can I find phpinfo()?? sorry I'm new with this...
>     thanx for
>     >your help
>     >
>
>
>     Have you tried google?  Either of the first two hits when
>     searching for
>     "phpinfo" would have answered this question.
>
>
>     ---------------------------(end of
>     broadcast)---------------------------
>     TIP 9: In versions below 8.0, the planner will ignore your desire to
>           choose an index scan if your joining column's datatypes do not
>           match
>
>


--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PLphp, PLperl - http://www.commandprompt.com/


Re: PHP and PostgreSQL connection

От
Rafael Mora
Дата:
Thank you all guys, it's amazing the speed of answers here!!!!, I'll be writing you soon If I find more problems after the test, I've listened about some install app that installs  everything you need, i mean apache, php and postgresql, have you heard about them??
 
Thank you very much!!
Regards from Caracas, Venezuela

Rafa

 
On 1/11/06, Javier Carlos <nediam@nediam.com.mx> wrote:
Create a new file with the following line:

<?php echo phpinfo(); ?>

and save as for example " hello.php" (it could be any name).

Then in your browser check it:

http://yourhost/path/to/hello.php


More information about this function: http://www.php.net/phpinfo

Regards,

Javier

PD. After you finish using this file hello.php, I recommend you to delete this file or change its permissions, or move it to another directory that it's not browsable by web.


On Wed, 11 Jan 2006 09:17:23 -0400, Rafael Mora wrote
> Javier where can I find phpinfo()?? sorry I'm new with this... thanx for your help
>  
> Rafa


--
nediam.com.mx


Re: PHP and PostgreSQL connection

От
"Eustache Safari"
Дата:
Rafael,

Open source is :
1. read docs from the software.
2. If you can't find an answer, then you Google it...
3. lastly, people on the distribution will assist.

From your Project, you'll get more benefit by "trying it your self
first". Especially while you're learning.

Regards


-----Original Message-----
From: pgsql-php-owner@postgresql.org
[mailto:pgsql-php-owner@postgresql.org] On Behalf Of Joshua D. Drake
Sent: Wednesday, January 11, 2006 5:03 PM
To: Rafael Mora
Cc: Frank Bax; pgsql-php@postgresql.org
Subject: Re: [PHP] PHP and PostgreSQL connection

Rafael Mora wrote:

> Yeah sure no doubt Google would help me, but I'm doing another project

> in Java using RMI, im studying Informatic Engineering (like Computer
> Engineering) and I prefered to get your help!! while I'm focused on
> the other project...


More specifically, the PHP docs will help you. We are happy to help of
course but you should do a little research.

Sincerely,

Joshua D. Drake

>
> Rafa
>
>
> On 1/11/06, *Frank Bax* <fbax@sympatico.ca <mailto:fbax@sympatico.ca>>

> wrote:
>
>     At 08:17 AM 1/11/06, Rafael Mora wrote:
>
>     >Javier where can I find phpinfo()?? sorry I'm new with this...
>     thanx for
>     >your help
>     >
>
>
>     Have you tried google?  Either of the first two hits when
>     searching for
>     "phpinfo" would have answered this question.
>
>
>     ---------------------------(end of
>     broadcast)---------------------------
>     TIP 9: In versions below 8.0, the planner will ignore your desire
to
>           choose an index scan if your joining column's datatypes do
not
>           match
>
>


--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PLphp, PLperl - http://www.commandprompt.com/


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

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

Re: PHP and PostgreSQL connection

От
Дата:
> Yeah sure no doubt Google would help me, but I'm
> doing another project in
> Java using RMI, im studying Informatic Engineering
> (like Computer
> Engineering) and I prefered to get your help!! while
> I'm focused on the
> other project...
>
> Rafa

Rafa, welcome!  since i didn't hear this mentioned,
what operating system and version are you using -
Linux, Windows or Mac?  I have a reasonably thorough
apache, php and pgsql isntall tutorial for winxp i'd
be glad to share if it is relevant to your case.

good luck.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: PHP and PostgreSQL connection

От
Дата:
> > Yeah sure no doubt Google would help me, but I'm
> > doing another project in
> > Java using RMI, im studying Informatic Engineering
> > (like Computer
> > Engineering) and I prefered to get your help!!
> while
> > I'm focused on the
> > other project...
> >
> > Rafa
>
> Rafa, welcome!  since i didn't hear this mentioned,
> what operating system and version are you using -
> Linux, Windows or Mac?  I have a reasonably thorough
> apache, php and pgsql isntall tutorial for winxp i'd
> be glad to share if it is relevant to your case.
>
> good luck.
>

i had a request to post the winxp apache, php and
postrgresql install instructions, so here goes...

http://www.geocities.com/operationsengineer1/

do feel free to provide feedback (good and/or bad).  i
think it is close (and should get someone up and
running), but i'm sure it can be improved and i'd be
happy to do so if i get some feedback.  of course, the
software versions may well have changed, so feel free
to apply the most up to date software in place of what
i used.

good luck.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: PHP and PostgreSQL connection

От
Дата:
if the downloads reach their bandwidth limit, try back
later.  i will not be taking them down anytime soon.

as a courtesy to others, though, it would be best to
download apache, get it set up, download php, get it
set up, download pgsql and get it set up.

that way the badwidth will be spread out and more
people will be able to get started.

again, please give feedback - good, bad or ugly. i'd
like to keep improving the documents.


> i had a request to post the winxp apache, php and
> postrgresql install instructions, so here goes...
>
> http://www.geocities.com/operationsengineer1/
>
> do feel free to provide feedback (good and/or bad).
> i
> think it is close (and should get someone up and
> running), but i'm sure it can be improved and i'd be
> happy to do so if i get some feedback.  of course,
> the
> software versions may well have changed, so feel
> free
> to apply the most up to date software in place of
> what
> i used.
>
> good luck.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: PHP and PostgreSQL connection

От
Rafael Mora
Дата:
I've found something about erase ";" on ";ext= php_pgsql" on my php.ini file, Im working with WinXP, i put it in C:\WINDOWS as well...
 
anything else?, how do I enable the module??
 
Rafa