开发者

Unable to load custom PHP extension in PHP 5.3.5

开发者 https://www.devze.com 2023-02-05 04:40 出处:网络
I\'m attempting to load a custom PHP extension on a Windows XP/IIS 5.1 development machine but I\'m failing miserably.

I'm attempting to load a custom PHP extension on a Windows XP/IIS 5.1 development machine but I'm failing miserably.

I have...

  • placed the PHP extension (php_fortranwrapper.dll) in the "ext" subfolder of my PHP 5.3.5 installation
  • been editing the correct php.ini file (i.e. the one corresponding to the "Loaded Configuration File" entry listed in the phpinfo() output)
  • set extension_dir in php.ini to point to the aforementioned "ext" subfolder
  • added an extension=php_fortranwrapper.dll entry in php.ini to load the PHP extension
  • restarted IIS (via iisreset)

On running a phpinfo() script, it tries to load the page until FastCGI times out with the following error: The FastCGI process exceeded configured request timeout

If I rename the PHP extension to say php_fortranwrapper1.dll, I logically see the following error:

PHP Startup: Unable to load dynamic library 'C:...\php-5.3.5\ext\php_fortranwrapper.dll' - The specified module could not be found.

For information, I generated the PHP ext开发者_JAVA百科ension using PHP 5.3.5 and PHP4Delphi, a tool which compiles a PHP extension from Delphi source code. My Delphi code loads a Fortran DLL and passes an integer to a function in that Fortran DLL and expects an integer result back.


Have you made any of your own custom PHP external extensions before?

Can you post some of your Delphi code so people can peer into what the inner workings are?

Here is an example by Igal Raizman using C++ that may have some usable ideas on how to test: http://www.devarticles.com/c/a/Cplusplus/Developing-Custom-PHP-Extensions-Part-1/

If you haven't had any success before, maybe this idea would be a start?

0

精彩评论

暂无评论...
验证码 换一张
取 消