From: Giancarlo Boaron on 20 May 2010 10:05 Hi all. Recently, I wrote an email about the problem I was having with some Postgres functions that when those functions were called, I received the following error: "Call to undefined function <function_name>". After some answers, I decided to rebuild a brand new linux virtual machine with Apache + PHP + Postgres, but I still get this annoying error messege with some functions like pg_prepare() and pg_escape_string(). I compiled Postgres with --without-readline option. I compiled PHP with --with-apxs2=/usr/local/apache2/bin/apxs and --with-pgsql=/usr/local/pgsql/ And the compilation process has no errors. What am I doing wrong? Do I have to change something in php_config.h file? If so, what do I have to change? Thank you.
From: Jim Lucas on 20 May 2010 12:04 Giancarlo Boaron wrote: > Hi all. > > Recently, I wrote an email about the problem I was having with some Postgres functions that when those functions were called, I received the following error: "Call to undefined function <function_name>". > > After some answers, I decided to rebuild a brand new linux virtual machine with Apache + PHP + Postgres, but I still get this annoying error messege with some functions like pg_prepare() and pg_escape_string(). > > I compiled Postgres with --without-readline option. > I compiled PHP with --with-apxs2=/usr/local/apache2/bin/apxs and --with-pgsql=/usr/local/pgsql/ > > And the compilation process has no errors. > > What am I doing wrong? Do I have to change something in php_config.h file? If so, what do I have to change? > > Thank you. > > > > Depending on what version of apache you are running, you need to make sure that you are loading the pgsql.so file or have the psql.ini file in your /var/www/conf/php5/ directory. This way it knows to load pg. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare
From: Giancarlo Boaron on 20 May 2010 12:21 Hi Jim. I think it depends on each server configuration but I checked in my server and I don't have the 'pgsql.so' and 'psql.ini' files and neither the 'www' directory. My Apache version is 2.2.15 and my root directory is /usr/local/apache2/htdocs. Thank you. --- Em qui, 20/5/10, Jim Lucas <lists(a)cmsws.com> escreveu: > De: Jim Lucas <lists(a)cmsws.com> > Assunto: Re: [PHP] Some undefined function errors > Para: "Giancarlo Boaron" <gboaron(a)yahoo.com.br> > Cc: pgsql-general(a)postgresql.org, php-general(a)lists.php.net, pgsql-novice(a)postgresql.org > Data: Quinta-feira, 20 de Maio de 2010, 13:04 > Giancarlo Boaron wrote: > > Hi all. > > > > Recently, I wrote an email about the problem I was > having with some Postgres functions that when those > functions were called, I received the following error: "Call > to undefined function <function_name>". > > > > After some answers, I decided to rebuild a brand new > linux virtual machine with Apache + PHP + Postgres, but I > still get this annoying error messege with some functions > like pg_prepare() and pg_escape_string(). > > > > I compiled Postgres with --without-readline option. > > I compiled PHP with > --with-apxs2=/usr/local/apache2/bin/apxs and > --with-pgsql=/usr/local/pgsql/ > > > > And the compilation process has no errors. > > > > What am I doing wrong? Do I have to change something > in php_config.h file? If so, what do I have to change? > > > > Thank you. > > > > > > > > > > Depending on what version of apache you are running, you > need to make sure that > you are loading the pgsql.so file or have the psql.ini file > in your > /var/www/conf/php5/ directory. > > This way it knows to load pg. > > -- > Jim Lucas > > "Some men are born to greatness, some > achieve greatness, > and some have greatness > thrust upon them." > > Twelfth Night, Act II, Scene V > by William Shakespeare >
From: Ashley Sheridan on 20 May 2010 12:26 On Thu, 2010-05-20 at 09:21 -0700, Giancarlo Boaron wrote: > Hi Jim. > > I think it depends on each server configuration but I checked in my server and I don't have the 'pgsql.so' and 'psql.ini' files and neither the 'www' directory. > > My Apache version is 2.2.15 and my root directory is /usr/local/apache2/htdocs. > > Thank you. > > > --- Em qui, 20/5/10, Jim Lucas <lists(a)cmsws.com> escreveu: > > > De: Jim Lucas <lists(a)cmsws.com> > > Assunto: Re: [PHP] Some undefined function errors > > Para: "Giancarlo Boaron" <gboaron(a)yahoo.com.br> > > Cc: pgsql-general(a)postgresql.org, php-general(a)lists.php.net, pgsql-novice(a)postgresql.org > > Data: Quinta-feira, 20 de Maio de 2010, 13:04 > > Giancarlo Boaron wrote: > > > Hi all. > > > > > > Recently, I wrote an email about the problem I was > > having with some Postgres functions that when those > > functions were called, I received the following error: "Call > > to undefined function <function_name>". > > > > > > After some answers, I decided to rebuild a brand new > > linux virtual machine with Apache + PHP + Postgres, but I > > still get this annoying error messege with some functions > > like pg_prepare() and pg_escape_string(). > > > > > > I compiled Postgres with --without-readline option. > > > I compiled PHP with > > --with-apxs2=/usr/local/apache2/bin/apxs and > > --with-pgsql=/usr/local/pgsql/ > > > > > > And the compilation process has no errors. > > > > > > What am I doing wrong? Do I have to change something > > in php_config.h file? If so, what do I have to change? > > > > > > Thank you. > > > > > > > > > > > > > > > > Depending on what version of apache you are running, you > > need to make sure that > > you are loading the pgsql.so file or have the psql.ini file > > in your > > /var/www/conf/php5/ directory. > > > > This way it knows to load pg. > > > > -- > > Jim Lucas > > > > "Some men are born to greatness, some > > achieve greatness, > > and some have greatness > > thrust upon them." > > > > Twelfth Night, Act II, Scene V > > by William Shakespeare > > > > > > I've generally found these sorts of things to be in /etc/php, /etc/php5 or something similar. Within /etc you should see directories for both Apache and PHP. If you have shell access to the machine, try calling a whereis command, which might give you a better idea of where things are kept in your system. Thanks, Ash http://www.ashleysheridan.co.uk
|
Pages: 1 Prev: Automatic PHP Security tool Next: [PHP] Some undefined function errors |