NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Failing to load phpexpress-php-5.3.dll


Joined: 03 Jun 2011
Posts: 9
Reply with quote
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):
Code:
<?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:
Code:
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:
Code:
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.
Code:
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:
Code:
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
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
zend_extension line requires FULL path.
Regarding web server environment, make sure that appropriate permissions are set for the module file. It must be readable by the web server's user account (or php-cgi account if you use it)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2011
Posts: 9
Reply with quote
Thanks for your reply.
It's the same behaviour with a full path provided to zend_extension line (Path is correct).
In fact when I include the ionCube encoder via zend_extension=extension.dll with the extension.dll living in /ext of php it works alright both ways. Is the full path required for all zend_extension-lines (And if so, why does it work with ionCube) or is it only necessary for some extensions like for example nusphere?

cheers
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
vfesc wrote:
It's the same behaviour with a full path provided to zend_extension line

Do you mean it still returns "Unable to load dynamic library"?
What php are you using? Is it VC6 or VC9?
What phpexpress module are you trying to load? VC6 or VC9?
What web server are you using? What php sapi are you using?
Without all these details it's hard to say what's going on.
Please submit a ticket at http://www.nusphere.com/contact_us

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2011
Posts: 9
Reply with quote
Yes, that is exactly what i meant.

I am using vc9 as to be read in my first post (as well as the exact versions and the precise behaviour) Wink

cheers
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
it looks like you mean PHP is VC9. What's about Apache? Is it VC6?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2011
Posts: 9
Reply with quote
it says vc9 in my first post.
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Are you sure that your Apache is VC9?
I didn't see any VC9 official distro except Nusphere TechPlatform.
All official distros available from apache.org are VC6, including mentioned 2.2.19

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2011
Posts: 9
Reply with quote
I downloaded from apachelounge which is vc9
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
again, are you SURE that it is vc9 and not vc6? It's most probably VC6 and this explains why it fails to load vc9 php extensions.

If you for example try NuSphere Techplatform which contains VC9 Apache, everything works fine.

To make further dialog easier, could you please pack httpd.exe using ZIP or RAR and publish it somewhere for me to check?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2011
Posts: 9
Reply with quote
i am very sure it is vc9

I installed apache 2.2.19 (apachelounge_dot_com) vc9. Then I added php 5.3.6 vc9 (the installer is called php-5.3.6-Win32-VC9-x86.msi) to go with it and then I added your phpexpress.
Since php and apache work together quite well (as written in my first post) and since php is definitely vc9, apache must be vc9, otherwise it wouldn't work at all.
And further more, since phpexpress and php work together the version of phpexpress must be vc9 too.
it's the combination of all three programms that does not work as it's supposed to.

there is no point in zipping the httpd.exe and wasting webspace
View user's profileFind all posts by vfescSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
apache must be vc9


Perhaps in some theory that's true, while in practice vc6 apache has nothing against loading vc9 php...
So it wasn't clear what you were trying to load, especially taking in to account that the distributor (apache lounge) is pretty unknown and their web site is heavily used for google advertizements... Don't you agree that there were quite strong reasons to double check?

as of wasting space, I think in this case there also no reason to waste time either Smile
good luck!

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Failing to load phpexpress-php-5.3.dll
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic