OS: Microsoft Windows Server 2003 SP2
Apache: 2.2.19 vc9 win32
php: 5.3.6
phpexpress: 5.3
Our company plans to move away from Zend due to the lack of thread safe supported software and therefore we had a look at your PHPexpress to go with our software. Unfortunatelly we did encounter a major problem concerning the loading procedure of the phpexpress extension.
There are in fact two different behaviours on our testserver that gave us some headaches.
The following code is used in a testfile (test.php):
<?php
print_r(get_loaded_extensions());
phpexpress();
?> |
When I execute php via command line using 'php test.php' it all works the way it's supposed to, giving me the list of all loaded extensions (including nusphere phpexpress) and the html-code of phpexpress(). This is the list of loaded extensions I get:
Array
(
[0] => Core
[1] => bcmath
[2] => calendar
[3] => com_dotnet
[4] => ctype
[5] => date
[6] => ereg
[7] => filter
[8] => ftp
[9] => hash
[10] => iconv
[11] => json
[12] => mcrypt
[13] => SPL
[14] => odbc
[15] => pcre
[16] => Reflection
[17] => session
[18] => standard
[19] => mysqlnd
[20] => tokenizer
[21] => zip
[22] => zlib
[23] => libxml
[24] => dom
[25] => PDO
[26] => Phar
[27] => SimpleXML
[28] => wddx
[29] => xml
[30] => xmlreader
[31] => xmlwriter
[32] => gd
[33] => gmp
[34] => mbstring
[35] => mysql
[36] => mysqli
[37] => NuSphere PhpExpress
[38] => mhash
)
... output phpexpress() |
But if I copy this same file to htdocs and try to call it via webbrowser, the output is as followed:
Array
(
[0] => Core
[1] => bcmath
[2] => calendar
[3] => com_dotnet
[4] => ctype
[5] => date
[6] => ereg
[7] => filter
[8] => ftp
[9] => hash
[10] => iconv
[11] => json
[12] => mcrypt
[13] => SPL
[14] => odbc
[15] => pcre
[16] => Reflection
[17] => session
[18] => standard
[19] => mysqlnd
[20] => tokenizer
[21] => zip
[22] => zlib
[23] => libxml
[24] => dom
[25] => PDO
[26] => Phar
[27] => SimpleXML
[28] => wddx
[29] => xml
[30] => xmlreader
[31] => xmlwriter
[32] => apache2handler
[33] => gd
[34] => gmp
[35] => mbstring
[36] => mysql
[37] => mysqli
[38] => mhash
)
Fatal error: Call to undefined function phpexpress() in C:\Programme\Apache Software Foundation\Apache2.2\htdocs\test.php on line 3 |
As you can see, the phpexpress extension is not being loaded when using apache to call php. This wouldn't be a problem if dl() would still work in php 5.3 but it doesn't. As a matter of fact, the error.log kindly tells me that this phpexpress-php-5.3.dll does not exist where it is supposed to be.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Programme\\PHP\\ext\\phpexpress-php-5.3.dll' - Das angegebene Modul wurde nicht gefunden.\r\n in Unknown on line 0 |
If I rename any loaded extension and restart apache, the same error occurs for this one, which sounds good to me (This proves the path is correct and php is looking in the proper directory). One might think I should make sure if this file exists and I did. The file is sitting there in C:/Programme/PHP/ext/ ready for action. I even double checked its rights and there is no difference to the other extensions.
My best guess is that I did the php.ini wrong. I tried three different extension includes:
extension=phpexpress-php-5.3.dll
zend_extension=phpexpress-php-5.3.dll
zend_extension_ts=phpexpress-php-5.3.dll |
The last one does not work at all (no surprise since it's not supposed to anyway).
The results of the other two lines are perfectly the same. In both versions, phpexpress will work via command line but not via webbrowser.
If anyone has stumbled upon such a thing before or even knows how to fix it, please be my guest lead me to the sunny uplands of knowledge.
This is literally killing me!
cheers