pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Apache, Php and postgresql on windows
4+ messages / 3 participants
[nested] [flat]

* Apache, Php and postgresql on windows
@ 2006-01-20 18:56 Abhishek Goyal <abhishek.goyal@hotmail.com>
  2006-01-20 19:17 ` Re: Apache, Php and postgresql on windows Randy Moller <zoomerz@comcast.net>
  2006-01-22 20:29 ` Re: Apache, Php and postgresql on windows operationsengineer1@yahoo.com
  0 siblings, 2 replies; 4+ messages in thread

From: Abhishek Goyal @ 2006-01-20 18:56 UTC (permalink / raw)
  To: pgsql-php

Hello Everyone,

I have installed apache, php and postgresql on my system. Now i am calling 
pg_connect() function. If i run the php script through command line 
everything is working fine. But when i run the same script through apache 2, 
it gives me an error

Fatal error: Call to undefined function pg_connect()

It seems in apache, php isn't able to access php_pgsql.dll, Where as in 
command line execution it is able to.

What can be a possible fix for this.

-Abhishek

_________________________________________________________________
NRIs, Free Money Transfers to over 30 Million Visa Cards in India. 
http://creative.mediaturf.net/creatives/icicibank/MSN_VISA_TOL.htm




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

* Re: Apache, Php and postgresql on windows
  2006-01-20 18:56 Apache, Php and postgresql on windows Abhishek Goyal <abhishek.goyal@hotmail.com>
@ 2006-01-20 19:17 ` Randy Moller <zoomerz@comcast.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Randy Moller @ 2006-01-20 19:17 UTC (permalink / raw)
  To: 'Abhishek Goyal' <abhishek.goyal@hotmail.com>; pgsql-php

By default the pgsql functions are not enabled in php on windows. Check your
php.ini file, and if necessary, import the pgsql.dll file from the full zip
(not the cgi-based install) into wherever you're housing your php
extensions, then look for the line "extension=php_pgsql.dll" in your php.ini
file and uncomment it (remove the ";" from in front of it.

Then the pg_ functions should be available to you.

Z-

-----Original Message-----
From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org]
On Behalf Of Abhishek Goyal
Sent: Friday, January 20, 2006 11:57 AM
To: pgsql-php@postgresql.org
Subject: [PHP] Apache, Php and postgresql on windows

Hello Everyone,

I have installed apache, php and postgresql on my system. Now i am calling 
pg_connect() function. If i run the php script through command line 
everything is working fine. But when i run the same script through apache 2,

it gives me an error

Fatal error: Call to undefined function pg_connect()

It seems in apache, php isn't able to access php_pgsql.dll, Where as in 
command line execution it is able to.

What can be a possible fix for this.

-Abhishek

_________________________________________________________________
NRIs, Free Money Transfers to over 30 Million Visa Cards in India. 
http://creative.mediaturf.net/creatives/icicibank/MSN_VISA_TOL.htm


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date: 1/19/2006





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

* Re: Apache, Php and postgresql on windows
  2006-01-20 18:56 Apache, Php and postgresql on windows Abhishek Goyal <abhishek.goyal@hotmail.com>
@ 2006-01-22 20:29 ` operationsengineer1@yahoo.com
  2006-01-25 14:20   ` Re: Apache, Php and postgresql on windows Abhishek Goyal <abhishek.goyal@hotmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: operationsengineer1@yahoo.com @ 2006-01-22 20:29 UTC (permalink / raw)
  To: Abhishek Goyal <abhishek.goyal@hotmail.com>; pgsql-php

--- Abhishek Goyal <abhishek.goyal@hotmail.com> wrote:

> Hello Everyone,
> 
> I have installed apache, php and postgresql on my
> system. Now i am calling 
> pg_connect() function. If i run the php script
> through command line 
> everything is working fine. But when i run the same
> script through apache 2, 
> it gives me an error
> 
> Fatal error: Call to undefined function pg_connect()
> 
> It seems in apache, php isn't able to access
> php_pgsql.dll, Where as in 
> command line execution it is able to.
> 
> What can be a possible fix for this.
> 
> -Abhishek
> 

These questions can be tough b/c we don't know exactly
what you did during the install.

did you enable php_pgsql.dll in apache's config file
(httpd.conf)?

yuou may want to google the error message.  i had a
problem with php and apache b/c i installed it as cgi
and i had to change a setting to get it to work -
which wasn't, at least at the time, in the
instructions.

i created and posted some pretty current and complete
apache, php and postgresql winxp install instruction
here...

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

i know it worked on at least one machine...  ;-)

good luck.

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



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

* Re: Apache, Php and postgresql on windows
  2006-01-20 18:56 Apache, Php and postgresql on windows Abhishek Goyal <abhishek.goyal@hotmail.com>
  2006-01-22 20:29 ` Re: Apache, Php and postgresql on windows operationsengineer1@yahoo.com
@ 2006-01-25 14:20   ` Abhishek Goyal <abhishek.goyal@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Abhishek Goyal @ 2006-01-25 14:20 UTC (permalink / raw)
  To: operationsengineer1@yahoo.com; pgsql-php

The problem was finally discovered to be with phpinidir configuration in 
httpd.conf. Through command line it was working fine because php was able to 
find php.ini in system directory (C:\windows), but apache wasn't able to 
find php.ini and thus didn't knew if php should use any extensions.

Thanks everyone for the help,
-Abhishek


>From: <operationsengineer1@yahoo.com>
>To: Abhishek Goyal <abhishek.goyal@hotmail.com>, pgsql-php@postgresql.org
>Subject: Re: [PHP] Apache, Php and postgresql on windows
>Date: Sun, 22 Jan 2006 12:29:46 -0800 (PST)
>
>--- Abhishek Goyal <abhishek.goyal@hotmail.com> wrote:
>
> > Hello Everyone,
> >
> > I have installed apache, php and postgresql on my
> > system. Now i am calling
> > pg_connect() function. If i run the php script
> > through command line
> > everything is working fine. But when i run the same
> > script through apache 2,
> > it gives me an error
> >
> > Fatal error: Call to undefined function pg_connect()
> >
> > It seems in apache, php isn't able to access
> > php_pgsql.dll, Where as in
> > command line execution it is able to.
> >
> > What can be a possible fix for this.
> >
> > -Abhishek
> >
>
>These questions can be tough b/c we don't know exactly
>what you did during the install.
>
>did you enable php_pgsql.dll in apache's config file
>(httpd.conf)?
>
>yuou may want to google the error message.  i had a
>problem with php and apache b/c i installed it as cgi
>and i had to change a setting to get it to work -
>which wasn't, at least at the time, in the
>instructions.
>
>i created and posted some pretty current and complete
>apache, php and postgresql winxp install instruction
>here...
>
>http://www.geocities.com/operationsengineer1/
>
>i know it worked on at least one machine...  ;-)
>
>good luck.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend

_________________________________________________________________
Tried the new MSN Messenger? ItÂ’s cool! Download now. 
http://messenger.msn.com/Download/Default.aspx?mkt=en-in




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


end of thread, other threads:[~2006-01-25 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-20 18:56 Apache, Php and postgresql on windows Abhishek Goyal <abhishek.goyal@hotmail.com>
2006-01-20 19:17 ` Randy Moller <zoomerz@comcast.net>
2006-01-22 20:29 ` operationsengineer1@yahoo.com
2006-01-25 14:20   ` Abhishek Goyal <abhishek.goyal@hotmail.com>

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