php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #944 Polluted name space - PHP fails to compile for use with PostgreSQL
Submitted: 1998-11-23 10:46 UTC Modified: 1998-11-23 11:07 UTC
From: achowe at snert dot com Assigned: jah (profile)
Status: Closed Package: Compile Failure
PHP Version: 3.0.5 OS: Redhat Linux 5.0
Private report: No CVE-ID: None
 [1998-11-23 10:46 UTC] achowe at snert dot com
I've compiled this code on several machines aready with the same configuration of Redhat 5.x,
Apache 1.3.3, Postgres 6.3.2, and PHP 3.0.5 and now, while trying to update yet another machine,
I get a compile error, where before I only got compiler warnings concerning "palloc".   The Postgres
include files define a "palloc" and Apache define "palloc".  

Without looking at the mod_php3.c code in detail, it is unclear which version of palloc is the correct
one to use (Postgres: #define palloc malloc  OR  Apache: #define palloc ap_palloc). 


System :

Red Hat Linux release 5.0 (Hurricane)
Kernel 2.0.35 on an i586


Compiler:

[root@kerberos src]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3


My configuration for PHP :

./configure \
--with-shared-apache=../apache_1.3.3 \
--with-pgsql=/usr/local/pgsql \
--enable-debug=no \
--enable-track-vars=yes \
--enable-bcmath=yes


Build error :
...
gcc -g -O2 -O2 -fpic  -I. -I.   -I../apache_1.3.3/src/include -I../apache_1.3.3/src/os/unix          -I/usr/local/pgsql/include            -c internal_functions.c -o internal_functions.o
In file included from functions/php3_pgsql.h:46,
                 from internal_functions.c:62:
/usr/local/pgsql/include/libpq-fe.h:349: warning: `palloc' redefined
../apache_1.3.3/src/include/ap_compat.h:232: warning: this is the location of the previous definition
In file included from internal_functions.c:70:
functions/php3_gd.h:44: gd.h: No such file or directory
make: *** [internal_functions.o] Error 1
[root@kerberos php-3.0.5]#

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-23 11:07 UTC] jah
The problem seems to missing gd.h, not palloc redefined.
Either configure using '--without-gd' or put the gd headers and libs somewhere they can be found, like /usr/local/{include|lib}.

In file included from internal_functions.c:70:
functions/php3_gd.h:44: gd.h: No such file or directory
make: *** [internal_functions.o] Error 1
 [2021-09-13 10:38 UTC] git@php.net
Automatic comment on behalf of cmb69
Revision: https://github.com/php/doc-en/commit/57ea81ca453bbf964446ba28043790c799d262c3
Log: Fix #944: Usage of class keyword unclear
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 13:01:33 2024 UTC