#28235 [Com]: SQLite returns null error message when database file isn't writable

2004-05-13 Thread nobody at example dot org
 ID:   28235
 Comment by:   nobody at example dot org
 Reported By:  simen at lunarlounge dot org
 Status:   Open
 Bug Type: SQLite related
 Operating System: Debian/GNU testing
 PHP Version:  5.0.0RC2
 New Comment:

Never occured to me that this could be a bug, does the OO API handle
this? 

  function connect(){
try {
  if ( !$this->db_handle = @sqlite_open($this->db_name, 0666, $err)
){
if ($this->db_handle===false){
  throw new DBEx('0: Could not open/create db or directory');
} else {
  throw new DBEx(sqlite_last_error($this->db_handle).': '.
   
sqlite_error_string(sqlite_last_error($this->db_handle)));
}
  } else { return true; }
}
catch (DBEx $ex){ $ex->borkage(); return false; }
  }


Previous Comments:


[2004-04-30 16:41:07] simen at lunarlounge dot org

Description:

The SQLite extension fail to detect when a database file isn't
writable:

Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on
line 12



Reproduce code:
---
# touch test.sqlite
# chmod 0600 sqlite
# sqlite test.sqlite
> CREATE TABLE store (id INTEGER PRIMARY KEY, doc TEXT);

$db = sqlite_open('test.sqlite');

$sql = "INSERT INTO store (id, doc) VALUES (1, 'foo')";
$result = sqlite_query($db, $sql);

Expected result:

Warning: sqlite_query() [function.sqlite-query]: attempt to write a
readonly database in test.php on line 12

Actual result:
--
Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on
line 12





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


#43402 [NEW]: php_filter_validate_email not RFC2822 compliant

2007-11-25 Thread nobody at example dot org
From: nobody at example dot org
Operating system: N/A
PHP version:  5.2.5
PHP Bug Type: Filter related
Bug description:  php_filter_validate_email not RFC2822 compliant

Description:

The regex used in php_filter_validate_email does not permit all valid atom
chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43402&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43402&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43402&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43402&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43402&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=43402&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=43402&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=43402&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=43402&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=43402&r=support
Expected behavior:http://bugs.php.net/fix.php?id=43402&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=43402&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=43402&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43402&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43402&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43402&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=43402&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=43402&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43402&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=43402&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=43402&r=mysqlcfg


#43402 [Opn]: php_filter_validate_email not RFC2822 compliant

2007-11-25 Thread nobody at example dot org
 ID:   43402
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: N/A
 PHP Version:  5.2.5
 New Comment:

Adding test.


Previous Comments:


[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1


#43402 [Opn]: php_filter_validate_email not RFC2822 compliant

2007-11-25 Thread nobody at example dot org
 ID:   43402
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: N/A
 PHP Version:  5.2.5
 New Comment:

--TEST--
PMOPB-45-2007:PHP ext/filter Email Validation Vulnerability
--SKIPIF--

--FILE--

--EXPECT--  
bool(false)


Previous Comments:


[2007-11-25 23:42:35] nobody at example dot org

Adding test.



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1


#43402 [Opn]: php_filter_validate_email not RFC2822 compliant

2007-11-25 Thread nobody at example dot org
 ID:   43402
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: N/A
 PHP Version:  5.2.5
 New Comment:

--TEST--
RFC2822 conformance for local atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


# Apologies for bug spam


Previous Comments:


[2007-11-25 23:43:32] nobody at example dot org

--TEST--
PMOPB-45-2007:PHP ext/filter Email Validation Vulnerability
--SKIPIF--

--FILE--

--EXPECT--  
bool(false)



[2007-11-25 23:42:35] nobody at example dot org

Adding test.



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1


#43402 [Opn]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2007-11-26 Thread nobody at example dot org
 ID:   43402
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: N/A
 PHP Version:  5.2.5
 New Comment:

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}


Previous Comments:


[2007-11-25 23:46:34] nobody at example dot org

--TEST--
RFC2822 conformance for local atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


# Apologies for bug spam



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1


#43402 [Opn]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2007-11-26 Thread nobody at example dot org
 ID:   43402
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: N/A
 PHP Version:  5.2.5
 New Comment:

Updated test, php_filter_validate_email() returns string on success.
Surely bool would be a more appropriate return value for a logic filter?


Updated regex above fixes the specific issue I was having, I'm
uncertain about other edge cases ([EMAIL PROTECTED]@example.org)?

--TEST--
Bug 43402, RFC2822 allows chars (?, =) in dot-atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


Previous Comments:


[2007-11-26 11:34:19] nobody at example dot org

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}



[2007-11-25 23:46:34] nobody at example dot org

--TEST--
RFC2822 conformance for local atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


# Apologies for bug spam



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1


#45957 [Bgs]: I accidentally a whole namespace

2008-08-30 Thread nobody at example dot org
 ID:  45957
 User updated by: nobody at example dot org
 Reported By: nobody at example dot org
 Status:  Bogus
 Bug Type:Unknown/Other Function
 PHP Version: 5.2.6
 New Comment:

I can't believe I let that slip my mind. Dammit.


Previous Comments:


[2008-08-30 20:18:33] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Oops? Have to be more careful next time!

Not possible since namespaces are first included in 5.3, of course. :-P



[2008-08-30 20:02:15] nobody at example dot org

Description:

I accidentally a whole namespace, is that bad?






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



#45957 [NEW]: I accidentally a whole namespace

2008-08-30 Thread nobody at example dot org
From: nobody at example dot org
Operating system: 
PHP version:  5.2.6
PHP Bug Type: Unknown/Other Function
Bug description:  I accidentally a whole namespace

Description:

I accidentally a whole namespace, is that bad?


-- 
Edit bug report at http://bugs.php.net/?id=45957&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45957&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45957&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45957&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45957&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=45957&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=45957&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=45957&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=45957&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=45957&r=support
Expected behavior:http://bugs.php.net/fix.php?id=45957&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=45957&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=45957&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45957&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45957&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45957&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=45957&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=45957&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45957&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=45957&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=45957&r=mysqlcfg



#43402 [Com]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2008-09-22 Thread nobody at example dot org
 ID:   43402
 Comment by:   nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

I see no reason support for hostnames can't be added. 

 filter_var ($addr, FILTER_VALIDATE_EMAIL, FILTER_PERMIT_NON_FQDNS);

That's fine on a LAN and the additional flag stops web miscreants doing
what would, if this were the default behaviour, otherwise be
inevitable.

Back on topic, FILTER_VALIDATE_EMAIL validates nothing. It fails to
ensure an address is syntactically valid. 


--FILE--

--EXPECT--  
bool(true)



[2007-11-26 11:34:19] nobody at example dot org

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/43402

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



#41102 [NEW]: Unable to compile as static apache module

2007-04-16 Thread nobody at example dot org
From: nobody at example dot org
Operating system: Linux 2.6
PHP version:  5.2.2RC1
PHP Bug Type: *Compile Issues
Bug description:  Unable to compile as static apache module

Description:

I'm unable to compile 5.2.2RC1 as an Apache module on a specific
machine/configuration. Neither PHP_LIBS or PHP_CFLAGS are present in apache
src/modules/php5/Makefile 

Even after manually adding include paths and libs to EXTRA_* in the
makefile, build fails at linker stage.

Problem system has:
autoconf (GNU Autoconf) 2.59
gcc version 3.3.4

Successfully compiled on another system with:
autoconf (GNU Autoconf) 2.61
gcc version 3.4.6


Reproduce code:
---
# Manual additions to /src/modules/php5/Makefile
EXTRA_LIBS=-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5
\
-lcrypt -lz -ldl -lm -lxml2
EXTRA_INCLUDES=-I../../../../php-5.2.2RC1/main
-I../../../../php-5.2.2RC1/Zend \
-I../../../../php-5.2.2RC1/sapi/apache -I../../../../php-5.2.2RC1/ \
-I../../../../php-5.2.2RC1/TSRM


Expected result:

Clean compile.

Actual result:
--
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status

-- 
Edit bug report at http://bugs.php.net/?id=41102&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41102&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41102&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41102&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41102&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41102&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41102&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41102&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41102&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41102&r=support
Expected behavior:http://bugs.php.net/fix.php?id=41102&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41102&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41102&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41102&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41102&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41102&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41102&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41102&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41102&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41102&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41102&r=mysqlcfg


#41102 [Fbk->Opn]: Unable to compile as static apache module

2007-04-16 Thread nobody at example dot org
 ID:   41102
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
-Status:   Feedback
+Status:   Open
 Bug Type: *Compile Issues
 Operating System: Linux 2.6
 PHP Version:  5.2.2RC1
 New Comment:

> Not reproducible.

It is on the machine I'm attempting to build on - running Slackware
10.0. 

The same machine built a PHP5.1 static module without error.


Previous Comments:


[2007-04-16 13:53:35] [EMAIL PROTECTED]

Not reproducible.



[2007-04-16 13:43:28] nobody at example dot org

Description:

I'm unable to compile 5.2.2RC1 as an Apache module on a specific
machine/configuration. Neither PHP_LIBS or PHP_CFLAGS are present in
apache src/modules/php5/Makefile 

Even after manually adding include paths and libs to EXTRA_* in the
makefile, build fails at linker stage.

Problem system has:
autoconf (GNU Autoconf) 2.59
gcc version 3.3.4

Successfully compiled on another system with:
autoconf (GNU Autoconf) 2.61
gcc version 3.4.6


Reproduce code:
---
# Manual additions to /src/modules/php5/Makefile
EXTRA_LIBS=-Lmodules/php5 -L../modules/php5 -L../../modules/php5
-lmodphp5 \
-lcrypt -lz -ldl -lm -lxml2
EXTRA_INCLUDES=-I../../../../php-5.2.2RC1/main
-I../../../../php-5.2.2RC1/Zend \
-I../../../../php-5.2.2RC1/sapi/apache -I../../../../php-5.2.2RC1/ \
-I../../../../php-5.2.2RC1/TSRM


Expected result:

Clean compile.

Actual result:
--
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status





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


#41102 [Fbk->Opn]: Unable to compile as static apache module

2007-04-16 Thread nobody at example dot org
 ID:   41102
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
-Status:   Feedback
+Status:   Open
 Bug Type: *Compile Issues
-Operating System: Linux 2.6
+Operating System: Linux
 PHP Version:  5.2.2RC1
 New Comment:

> Great, but I apparently don't have your machine so I need to 
> know how to reproduce it on my machine.

++Great

If I knew enough about the PHP & Apache build processes to tell you
that, surely I'd be contributing a patch instead of filing a bug report?
 

AFAIK, the Apache build process has not changed and the PHP cli
installs without error. (related?) problems occur only when compiling
Apache with PHP as a static module.

Problem #1

The info in libphp5.module is not being transferred to the generated
$APACHE/src/modules/php5/Makefile although the file libphp5.module is
present in that dir. I've verified these exact tarballs build a static
PHP module on another system without error (as previously noted) and was
able to manually edit the Makefile.

Problem #2

After manually editing the Makefile, Apache build still fails with this
linker error: 

modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/build/src/apache-1.3/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/build/src/apache-1.3'
make: *** [build] Error 2


Previous Comments:


[2007-04-16 14:48:45] [EMAIL PROTECTED]

>It is on the machine I'm attempting to build on 
Great, but I apparently don't have your machine so I need to know how
to reproduce it on my machine.

--------------------

[2007-04-16 14:04:52] nobody at example dot org

> Not reproducible.

It is on the machine I'm attempting to build on - running Slackware
10.0. 

The same machine built a PHP5.1 static module without error.



[2007-04-16 13:53:35] [EMAIL PROTECTED]

Not reproducible.

--------------------

[2007-04-16 13:43:28] nobody at example dot org

Description:

I'm unable to compile 5.2.2RC1 as an Apache module on a specific
machine/configuration. Neither PHP_LIBS or PHP_CFLAGS are present in
apache src/modules/php5/Makefile 

Even after manually adding include paths and libs to EXTRA_* in the
makefile, build fails at linker stage.

Problem system has:
autoconf (GNU Autoconf) 2.59
gcc version 3.3.4

Successfully compiled on another system with:
autoconf (GNU Autoconf) 2.61
gcc version 3.4.6


Reproduce code:
---
# Manual additions to /src/modules/php5/Makefile
EXTRA_LIBS=-Lmodules/php5 -L../modules/php5 -L../../modules/php5
-lmodphp5 \
-lcrypt -lz -ldl -lm -lxml2
EXTRA_INCLUDES=-I../../../../php-5.2.2RC1/main
-I../../../../php-5.2.2RC1/Zend \
-I../../../../php-5.2.2RC1/sapi/apache -I../../../../php-5.2.2RC1/ \
-I../../../../php-5.2.2RC1/TSRM


Expected result:

Clean compile.

Actual result:
--
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status





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


#41102 [Fbk->Opn]: Unable to compile as static apache module

2007-04-16 Thread nobody at example dot org
 ID:   41102
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
-Status:   Feedback
+Status:   Open
 Bug Type: *Compile Issues
 Operating System: Linux
 PHP Version:  5.2.2RC1
 New Comment:

aclocal (GNU automake) 1.8.5
gcc version 3.3.4
GNU ld version 2.15.90.0.3 

Apache (1.3 dev snapshot)
PHP-5.2.2RC1

Tarballs verified to compile successfully on a desktop machine running
another (more up-to-date) distro.

cd src/apache-1.3
./configure --prefix=/srv/www
cd ../php-5.2.2RC1
./configure --disable-cgi --disable-ipv6 --disable-short-tags \
--with-apache=../apache-1.3 --with-gnu-ld --with-zend-vm=GOTO
make
su
make install
exit
cd ../apache-1.3
./configure --activate-module=src/modules/php5/libphp5.a \
--enable-module=rewrite --prefix=/srv/www
make
...
===> src/modules/php5
gcc -c  -I../../os/unix -I../../include   -DLINUX=22
-DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `../../apaci`mod_php5.c
mod_php5.c:22:29: php_apache_http.h: No such file or directory
In file included from mod_php5.c:23:
../../include/http_conf_globals.h:28: error: syntax error before "int"
../../include/http_conf_globals.h:29: error: syntax error before "int"
[Many errors as you can imagine]

src/modules/php5/Makefile doesn't contain paths and lib info from
src/modules/php5/libphp5.module

I Manually insert PHP_CFLAGS and PHP_LIBS from that file in to the
Makefile. Then resume

make 
===> src
make[1]: Entering directory `/home/build/apache-1.3'
make[2]: Entering directory `/home/build/apache-1.3/src'
===> src/regex
make[3]: Nothing to be done for `all'.
<=== src/regex
===> src/os/unix
make[3]: Nothing to be done for `all'.
<=== src/os/unix
===> src/ap
make[3]: Nothing to be done for `all'.
<=== src/ap
===> src/main
make[3]: Nothing to be done for `all'.
<=== src/main
===> src/lib
<=== src/lib
===> src/modules
===> src/modules/standard
make[4]: Nothing to be done for `all'.
<=== src/modules/standard
===> src/modules/php5
gcc -c  -I../../os/unix -I../../include   -DLINUX=22
-DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `../../apaci` -I/home/build/php-5.2.2RC1/main
-I/home/build/php-5.2.2RC1/Zend -I/home/build/php-5.2.2RC1/TSRM
-I/home/build/php-5.2.2RC1 -I/home/build/php-5.2.2RC1/sapi/apache
-I/home/build/php-5.2.2RC1/main -I/home/build/php-5.2.2RC1/Zend
-I/home/build/php-5.2.2RC1/TSRM   mod_php5.c
cp libmodphp5.a libphp5.
ar r libphp5. mod_php5.o
ranlib libphp5.
cp libphp5. libphp5.a
<=== src/modules/php5
<=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DHAVE_SET_DUMPABLE
-DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DHAVE_SET_DUMPABLE
-DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `./apaci` buildmark.c
gcc  -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX
-DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `./apaci`\
  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/php5/libphp5.a main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a   -lm -lcrypt -lexpat
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/build/apache-1.3/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/build/apache-1.3'
make: *** [build] Error 2


Previous Comments:


[2007-04-16 16:58:20] [EMAIL PROTECTED]

What EXACTLY are you doing and what do I need to do in order to
reproduce it?
Please describe all the steps.



[2007-04-16 16:50:46] nobody at example dot org

> Great, but I apparently don't have your machine so I need to 
> know how to reproduce it on my machine.

++Great

If I knew enough about the PHP & Apache build processes to tell you
that, surely I'd be contributing a patch instead of filing a bug report?
 

AFAIK, the Apache build process has not changed and the PHP cli
installs without error. (related?) problems occur only when compiling
Apache with PHP as a static module.

Problem #1

The info in libphp5.module is not being transferred to the generated
$APACHE/src/modules/php5/Makefile although the file libphp5.module is
present in that dir. I've verified these exact tarballs build a static
PHP module on another system without error (as previously noted) and was
able to manually edit the Makefile.

Problem #2

After manually editing the Makefile, Apache build still fails with this

#41102 [Fbk->Opn]: Unable to compile as static apache module

2007-04-16 Thread nobody at example dot org
 ID:   41102
 User updated by:  nobody at example dot org
 Reported By:  nobody at example dot org
-Status:   Feedback
+Status:   Open
 Bug Type: *Compile Issues
 Operating System: Linux
 PHP Version:  5.2.2RC1
 New Comment:

> Does this mean the same PHP works fine on another machine?

Compiles fine on my laptop.

> What do you mean by more up-to-date distro and what distro is that?

I'm referring to more recent releases of the toolchain.

aclocal (GNU automake) 1.10
gcc version 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10)
GNU ld version 2.16.1


Previous Comments:


[2007-04-16 17:56:04] [EMAIL PROTECTED]

>Tarballs verified to compile successfully on a desktop machine
> running another (more up-to-date) distro.

Does this mean the same PHP works fine on another machine?
What do you mean by more up-to-date distro and what distro is that?



[2007-04-16 17:48:04] nobody at example dot org

aclocal (GNU automake) 1.8.5
gcc version 3.3.4
GNU ld version 2.15.90.0.3 

Apache (1.3 dev snapshot)
PHP-5.2.2RC1

Tarballs verified to compile successfully on a desktop machine running
another (more up-to-date) distro.

cd src/apache-1.3
./configure --prefix=/srv/www
cd ../php-5.2.2RC1
./configure --disable-cgi --disable-ipv6 --disable-short-tags \
--with-apache=../apache-1.3 --with-gnu-ld --with-zend-vm=GOTO
make
su
make install
exit
cd ../apache-1.3
./configure --activate-module=src/modules/php5/libphp5.a \
--enable-module=rewrite --prefix=/srv/www
make
...
===> src/modules/php5
gcc -c  -I../../os/unix -I../../include   -DLINUX=22
-DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `../../apaci`mod_php5.c
mod_php5.c:22:29: php_apache_http.h: No such file or directory
In file included from mod_php5.c:23:
../../include/http_conf_globals.h:28: error: syntax error before "int"
../../include/http_conf_globals.h:29: error: syntax error before "int"
[Many errors as you can imagine]

src/modules/php5/Makefile doesn't contain paths and lib info from
src/modules/php5/libphp5.module

I Manually insert PHP_CFLAGS and PHP_LIBS from that file in to the
Makefile. Then resume

make 
===> src
make[1]: Entering directory `/home/build/apache-1.3'
make[2]: Entering directory `/home/build/apache-1.3/src'
===> src/regex
make[3]: Nothing to be done for `all'.
<=== src/regex
===> src/os/unix
make[3]: Nothing to be done for `all'.
<=== src/os/unix
===> src/ap
make[3]: Nothing to be done for `all'.
<=== src/ap
===> src/main
make[3]: Nothing to be done for `all'.
<=== src/main
===> src/lib
<=== src/lib
===> src/modules
===> src/modules/standard
make[4]: Nothing to be done for `all'.
<=== src/modules/standard
===> src/modules/php5
gcc -c  -I../../os/unix -I../../include   -DLINUX=22
-DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `../../apaci` -I/home/build/php-5.2.2RC1/main
-I/home/build/php-5.2.2RC1/Zend -I/home/build/php-5.2.2RC1/TSRM
-I/home/build/php-5.2.2RC1 -I/home/build/php-5.2.2RC1/sapi/apache
-I/home/build/php-5.2.2RC1/main -I/home/build/php-5.2.2RC1/Zend
-I/home/build/php-5.2.2RC1/TSRM   mod_php5.c
cp libmodphp5.a libphp5.
ar r libphp5. mod_php5.o
ranlib libphp5.
cp libphp5. libphp5.a
<=== src/modules/php5
<=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DHAVE_SET_DUMPABLE
-DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DHAVE_SET_DUMPABLE
-DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2
-fomit-frame-pointer -pipe `./apaci` buildmark.c
gcc  -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX
-DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `./apaci`\
  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/php5/libphp5.a main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a   -lm -lcrypt -lexpat
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/build/apache-1.3/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/build/apache-1.3'
make: *** [build] Error 2



[2007-04-16 16:58:20] [EMAIL PROTECTED]

What EXACTLY are you doing and what do I need to do in order to
reproduce it?
Please describe all the steps.



[2007-04-16 16:50:46] nobody at example dot org

> Great, but I apparently don't have 

#36436 [NEW]: DBA problem with Berkeley DB4

2006-02-17 Thread nobody at example dot org
From: nobody at example dot org
Operating system: linux 2.6 AMD64
PHP version:  5.1.2
PHP Bug Type: DBM/DBA related
Bug description:  DBA problem with Berkeley DB4

Description:

Berkeley DB 4.2.52 fails with error when using PHP's dba_exists() and
dba_fetch() methods. Other dba handlers work fine.

Reproducable: always 



Reproduce code:
---


Expected result:

b0rk

Actual result:
--
Notice: "DB_THREAD mandates memory allocation flag on DBT data..." 

Error string is from bdb.

-- 
Edit bug report at http://bugs.php.net/?id=36436&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36436&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36436&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36436&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36436&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36436&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36436&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36436&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36436&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36436&r=support
Expected behavior:http://bugs.php.net/fix.php?id=36436&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36436&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36436&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36436&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36436&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36436&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36436&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36436&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36436&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36436&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36436&r=mysqlcfg