#27219 [NEW]: Compilation error in libmysql.c

2004-02-11 Thread martin at ibuildings dot nl
From: martin at ibuildings dot nl
Operating system: Redhat 6.1
PHP version:  4.3.4
PHP Bug Type: Scripting Engine problem
Bug description:  Compilation error in libmysql.c

Description:

When a class does not have member variables, creating a static instance of
the class becomes impossible. See the code below. If the member variable
is declared, one onstance is created, and each next call to getInstance
will return the existing instance.Without the member var, new instances
are created every time.

Reproduce code:
---
class mySingleton
{
  // var $m_dummy = ""; // uncommenting this line is a 
// workaround

  function &getInstance()
  {
static $s_instance = NULL;
if ($s_instance == NULL)
{
  echo "Creating a new instance";
  $s_instance = new mySingleton();
}
else
{
  echo "Using existing instance";
}
return $s_instance;
  }
}

$tmp = &mySingleton::getIntance();
$tmp2 = &mySingleton::getIntance();



Expected result:

Creating a new instance
Using existing instance

Actual result:
--
Creating a new instance
Creating a new instance

-- 
Edit bug report at http://bugs.php.net/?id=27219&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27219&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27219&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=27219&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=27219&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27219&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=27219&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=27219&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=27219&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=27219&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=27219&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=27219&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=27219&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27219&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=27219&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=27219&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=27219&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27219&r=float


#26028 [Bgs]: Compilation error in libmysql.c

2003-11-04 Thread martin at ibuildings dot nl
 ID:   26028
 User updated by:  martin at ibuildings dot nl
 Reported By:  martin at ibuildings dot nl
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Redhat 6.1
 PHP Version:  4.3.3
 New Comment:

/usr/local/jdk/jre/bin or other dirs from my java_home aren't listed in
ld.so.conf.
ldconfig -v doesn't show the libraries. Rebuilding the cache makes no
difference


Previous Comments:


[2003-10-29 12:40:20] [EMAIL PROTECTED]

See #22590. Make sure that your system doesn't use
/usr/local/jdk/jre/bin/libjpeg.so when it's not told to do so (i.e.
adjust your /etc/ld.so.conf and run ldconfig afterwards).




[2003-10-29 10:09:57] martin at ibuildings dot nl

I also tried PHP 4.3.2 with same results



[2003-10-29 09:35:21] martin at ibuildings dot nl

Description:

I try to compile PHP 4.3.3. It gives me an error at compilation.
My settings:

TARGET="/usr/local/apache_1.3.28"

./configure \
--prefix=$TARGET \
--with-apxs=$TARGET/bin/apxs \
--with-config-file-path=$TARGET/conf \
--enable-memory-limit \
--with-mysql \
--disable-cli \
--with-oci8 \
--with-gd=/usr/local/gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-ttf=/usr \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--with-gettext \
--enable-track-vars \
--enable-sigchild \
--with-xml \
--with-zlib \
--with-java=/usr/local/jdk

configures runs ok but, when i do a make it fails with this:
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:4:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:260: warning:
redefinition of `uint'
/usr/include/sys/types.h:131: warning: `uint' previously declared here
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:261: warning:
redefinition of `ushort'
/usr/include/sys/types.h:130: warning: `ushort' previously declared
here
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:11:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `__extension__'
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `&&'
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1

config.log says for ushort and uint:
configure:51709: checking for type ushort
configure:51728: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51717 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  ushort foo;
  foo++;
  exit(0);
}
configure:51666: checking for type uint
configure:51685: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51674 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  uint foo;
  foo++;
  exit(0);
}

USHORT and UINT aren't defined in main/php_config.h

The problem looks a lot like bug 17809 and 12451







-- 
Edit this bug report at http://bugs.php.net/?id=26028&edit=1


#26028 [Opn]: Compilation error in libmysql.c

2003-10-29 Thread martin at ibuildings dot nl
 ID:   26028
 User updated by:  martin at ibuildings dot nl
 Reported By:  martin at ibuildings dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Redhat 6.1
 PHP Version:  4.3.3
 New Comment:

I also tried PHP 4.3.2 with same results


Previous Comments:


[2003-10-29 09:35:21] martin at ibuildings dot nl

Description:

I try to compile PHP 4.3.3. It gives me an error at compilation.
My settings:

TARGET="/usr/local/apache_1.3.28"

./configure \
--prefix=$TARGET \
--with-apxs=$TARGET/bin/apxs \
--with-config-file-path=$TARGET/conf \
--enable-memory-limit \
--with-mysql \
--disable-cli \
--with-oci8 \
--with-gd=/usr/local/gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-ttf=/usr \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--with-gettext \
--enable-track-vars \
--enable-sigchild \
--with-xml \
--with-zlib \
--with-java=/usr/local/jdk

configures runs ok but, when i do a make it fails with this:
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:4:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:260: warning:
redefinition of `uint'
/usr/include/sys/types.h:131: warning: `uint' previously declared here
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:261: warning:
redefinition of `ushort'
/usr/include/sys/types.h:130: warning: `ushort' previously declared
here
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:11:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `__extension__'
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `&&'
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1

config.log says for ushort and uint:
configure:51709: checking for type ushort
configure:51728: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51717 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  ushort foo;
  foo++;
  exit(0);
}
configure:51666: checking for type uint
configure:51685: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51674 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  uint foo;
  foo++;
  exit(0);
}

USHORT and UINT aren't defined in main/php_config.h

The problem looks a lot like bug 17809 and 12451







-- 
Edit this bug report at http://bugs.php.net/?id=26028&edit=1


#26028 [NEW]: Compilation error in libmysql.c

2003-10-29 Thread martin at ibuildings dot nl
From: martin at ibuildings dot nl
Operating system: Redhat 6.1
PHP version:  4.3.3
PHP Bug Type: Compile Failure
Bug description:  Compilation error in libmysql.c

Description:

I try to compile PHP 4.3.3. It gives me an error at compilation.
My settings:

TARGET="/usr/local/apache_1.3.28"

./configure \
--prefix=$TARGET \
--with-apxs=$TARGET/bin/apxs \
--with-config-file-path=$TARGET/conf \
--enable-memory-limit \
--with-mysql \
--disable-cli \
--with-oci8 \
--with-gd=/usr/local/gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-ttf=/usr \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--with-gettext \
--enable-track-vars \
--enable-sigchild \
--with-xml \
--with-zlib \
--with-java=/usr/local/jdk

configures runs ok but, when i do a make it fails with this:
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:4:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:260: warning:
redefinition of `uint'
/usr/include/sys/types.h:131: warning: `uint' previously declared here
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:261: warning:
redefinition of `ushort'
/usr/include/sys/types.h:130: warning: `ushort' previously declared here
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:11:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `__extension__'
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `&&'
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1

config.log says for ushort and uint:
configure:51709: checking for type ushort
configure:51728: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51717 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  ushort foo;
  foo++;
  exit(0);
}
configure:51666: checking for type uint
configure:51685: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51674 "configure"
#include "confdefs.h"
#include 
#include 
main()
{
  uint foo;
  foo++;
  exit(0);
}

USHORT and UINT aren't defined in main/php_config.h

The problem looks a lot like bug 17809 and 12451



-- 
Edit bug report at http://bugs.php.net/?id=26028&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26028&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26028&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=26028&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=26028&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26028&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=26028&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=26028&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=26028&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=26028&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=26028&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=26028&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26028&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=26028&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=26028&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=26028&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26028&r=float