PHP 4.0 Bug #4562 Updated: Can't load library with dl()
| From: | Bug Database | Date: | Mon, 04 Sep 2000 23:33:13 +0000 |
| Subject: | PHP 4.0 Bug #4562 Updated: Can't load library with dl() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-31997@lists.php.net to get a copy of this message | ||
ID: 4562
Updated by: sniper
Reported By: konon@relex.ru
Status: Closed
Bug Type: Dynamic loading related
Assigned To:
Comments:
No feedback. Please try php4.0.2 or latest CVS or snapshot from
http://snaps.php.net/ and reopen this bug report if problem
still exists.
--Jani
Previous Comments:
[2000-08-20 03:38:53] sniper@php.net
Does this problem still persist with more recent version of php (from CVS or http://snaps.php.net) ??
--Jani
---------------------------------------------------------------------------
[2000-05-23 13:39:41] konon@relex.ru
When I call a simple script
<?
dl("mylib.dll");
?>
I received:
----
Warning: PHP Linter SQL Server extension: Unable to initialize module
Module compiled with debug=46, thread-safety=49 module API=0
PHP compiled with debug=0, thread-safety=1 module API=20000401 These options need to match in
Unknown on line 0
----
My library has been built with new php header files(php 4.0.0) and 1-byte struct alignment
As I think the problem is with alignment
The tail of zend_module_entry is :
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
and if php4ts.dll is compiled with 4-byte alignment we'll have this problem
May be better to use such tail:
int module_number;
unsigned short zend_debug;
unsigned short zts;
unsigned int zend_api;
or
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned char rez[2];
unsigned int zend_api;
??
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=4562