Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97933 - Some postgresql functions are not avaiblable within PHP5.
Summary: Some postgresql functions are not avaiblable within PHP5.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-04 13:22 UTC by Julien Biezemans
Modified: 2007-09-22 23:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Biezemans 2005-07-04 13:22:06 UTC
Some functions like pg_query_params() and pg_send_query_params() are not defined
in PHP 5.0.4 (did not try any other version). Anyway some other functions are
available (pg_query() DOES work).

Reproducible: Always
Steps to Reproduce:
1. call a function like pg_query_params() within a php script.

Actual Results:  
"Fatal error:  Call to undefined function pg_query_params() (...)"

Expected Results:  
Called the function instead of printing an error message from php compiler.

installed packages:

dev-db/postgresql-8.0.1-r4
dev-db/libpq-8.0.1
dev-php/mod_php-5.0.4
dev-php/php-5.0.4-r1

I noticed that the configure command of the mod_php package set the flag
"--with-pgsql", shouldn't it set "--with-pgsql=<DIR>" instead? PHP manual says
that "--with-pgsql" defaults to path "/usr/local/pgsql" which is wrong on
gentoo. (I don't know anything about ebuild prog though)

emerge info:

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-ck8 i686)
=================================================================
System uname: 2.6.11-ck8 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  3 2005, 19:56:11)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.7.9-r1, 1.6.3, 1.9.5, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.gentoo.skynet.be/pub/gentoo/"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://amenophis/gentoo-portage"
USE="x86 3dnow X aac alsa apache2 apm avi berkdb bitmap-fonts cdparanoia cdr
crypt cups dba dga divx4linux dvd dvdr emboss encode esd fam ffmpeg flac
foomaticdb fortran gd gdbm gif gpm gstreamer gtk gtk2 id3 imagemagick imlib ipv6
jack java jikes jpeg junit kde lame libg++ libwww live mad mikmod mmx motif
mozilla mp3 mp4live mpeg mpeg2 mysql mythtv ncurses network nls nptl ogg
oggvorbis opengl oss pam pda pdflib perl php player png postgres python qt
quicktime readline rtc ruby samba sdl session slp spell sse ssl svga tcpd tiff
truetype truetype-fonts type1-fonts v4l v4l2 vorbis xine xinerama xml xml2 xmms
xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Canal Vorfeed 2005-07-04 14:06:22 UTC
Ookay. What's wrong ? pg_query_params and pg_send_query_params were introduced
in PHP 5.1 beta2. You are using PHP 5.0.4. Do you think PHP should magically
pull and install new version if you'll calling new functions, or what ?
Comment 2 Julien Biezemans 2005-07-04 15:40:02 UTC
(In reply to comment #1)
> Ookay. What's wrong ? pg_query_params and pg_send_query_params were introduced
> in PHP 5.1 beta2. You are using PHP 5.0.4. Do you think PHP should magically
> pull and install new version if you'll calling new functions, or what ?

PHP manual says the function is available in PHP5
http://fr.php.net/manual/en/function.pg-send-query-params.php. This can be the
cause of my problem but I'm not a god and cannot guess errors in official manuals!

Would you please be kind enough to show me where you got this information?

Could you also please be less agressive in your reply? I'm only contributing and
trying to help. If I made a mistake, I apologize but I don't have to undergo
your painful comments. 

Thank you.
Comment 3 Julien Biezemans 2005-07-04 15:52:01 UTC
As stated before, those functions are not available in PHP5 but in 5.1. (this is
badly documented, though).
Comment 4 Canal Vorfeed 2005-07-04 16:00:34 UTC
> This can be the cause of my problem but I'm not a god and cannot guess errors
in official manuals!

Why not ? PHP manuals are *KNOWN* to be not 100% reliable as far as version
information is concerned: function description is included in manual when
function is added to CVS - and at that stage information about release where
it'll be introduced is not yet available! Always check
http://cvs.php.net/php-src/NEWS file if in doubt (select last version without
"branch" tag - currently it's http://cvs.php.net/co.php/php-src/NEWS?r=1.1979).
Comment 5 Julien Biezemans 2005-07-04 16:29:00 UTC
(In reply to comment #4)
> > This can be the cause of my problem but I'm not a god and cannot guess errors
> in official manuals!
> 
> Why not ? PHP manuals are *KNOWN* to be not 100% reliable as far as version
> information is concerned: function description is included in manual when
> function is added to CVS - and at that stage information about release where
> it'll be introduced is not yet available! Always check
> http://cvs.php.net/php-src/NEWS file if in doubt (select last version without
> "branch" tag - currently it's http://cvs.php.net/co.php/php-src/NEWS?r=1.1979).

Thank you for the hints about php doc being not 100% reliable concerning
versions. I never had such a problem before. 

Concerning the changelog I actually looked in the CVS but didn't find the
information. In fact I only checked 1.1760.2.448 which was the first entry and
displayed above 1.1979 (I thought it was the newest version, but I was wrong).