×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    24

    Dynamic extension loading in PHP (PAMP)

    Hej,

    I have been working for a while with MWS and Python, but now I wanted to jump to PAMP to use PHP and to try to add SOAP extension over it.
    I have been unsuccessful.
    I have created a forder por php extensions (c:/php/ext) and I have copied php_soap.dll in it.
    I modified the php.ini file to include the extension=php_soap.dll loading and modifying the extension_dir definition.

    Even PHP is loading, as phpinfo() give me results, SOAP class is not loaded, as I can see in phpinfo() results and also in my php calling for SoapClient class.

    Maybe is not possible to call extension dynamically in PHP for Symbian. Is it? And if so, is there limitations and how should I define the path for the extensions to be loaded?
    I guess that MySQL extension is integrated in PHP, as the extension line is commented, but MySQL calls are accepted.
    If I need to integrate SOAP in PHP to run in Symbian v9, do you have a reference I could check?

    Maybe to basic questions, but I'm still learning, but having expectations

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Dynamic extension loading in PHP (PAMP)

    Quote Originally Posted by didacgil9 View Post
    I have created a forder por php extensions (c:/php/ext) and I have copied php_soap.dll in it.
    Where did you get the php_soap.dll from?

    Maybe is not possible to call extension dynamically in PHP for Symbian. Is it?
    Unfortunately it is not. I worked on dynamic extension loading last fall, but did not get it into a shape that I could have released.

    Typically when you port software to Symbian a cause for problems is the fact that on Symbian you cannot export data from a DLL. That can usually be worked around by turning the direct use of the data into a dereferenced function call, and then by the use of macros hide it so that no changes are needed at source code level.

    However, the libraries of PHP not only use variables residing in other libraries, but put the addresses of them into statically allocated structures. That cannot be transparently worked around, but you need to modify the code so that those statically allocated structures are initialized at runtime => source code changes. And the required changes were quite numerous and made everything quite fragile.

    As long as the dynamic loading of extensions is not supported, PHP's libraries can be statically linked and only the final module loaded into Apache is made into a DLL. In that case there are no problems because all symbols are available at linktime.

    And if so, is there limitations and how should I define the path for the extensions to be loaded?
    If dynamic loading were supported, then you would not need to define the load-path, because on Symbian binaries can only be loaded from /sys/bin.

    I guess that MySQL extension is integrated in PHP, as the extension line is commented, but MySQL calls are accepted.
    Yes, all extensions have been built in.
    If I need to integrate SOAP in PHP to run in Symbian v9, do you have a reference I could check?
    The only way to do that currently, is to build mod_php and include the extension. In the thread PAMP + SQLite there are some details.

    Johan

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    24

    Re: Dynamic extension loading in PHP (PAMP)

    Quote Originally Posted by jhnwkmn View Post
    Where did you get the php_soap.dll from?

    ...
    In the thread PAMP + SQLite there are some details.
    Well, as you already said, I'm now following this thread to build in SOAP module.

    The php_soap.dll that I used was just the one located in PHP zip file for Windows versions
    As I read that nearly all modules were usable in PHP port to Symbian, I just tried.

    I will also try not to load some modules that I will not need for my purposes.

    Thank you very much again.

    BTW, this PAMP building thread gives is designed for Windows users, as files are in .exe extension. Some suggestions for Mac users?

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Dynamic extension loading in PHP (PAMP)

    Quote Originally Posted by didacgil9 View Post
    The php_soap.dll that I used was just the one located in PHP zip file for Windows versions
    As I read that nearly all modules were usable in PHP port to Symbian, I just tried.
    Well, there's compatibility and there's compatibility
    You cannot load an extension built for Windows into PHP built for Symbian, even if the support for dynamic loading were there.

    But, chances are that you with no or very minor source modifications can include any extension into mod_php that then is built for Symbian.

    BTW, this PAMP building thread gives is designed for Windows users, as files are in .exe extension. Some suggestions for Mac users?
    Unfortunately, I have no Mac experience...

    Br,
    Johan

Similar Threads

  1. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41
  2. PAMP with php and postgres
    By tftd in forum Mobile Web Server
    Replies: 4
    Last Post: 2008-10-23, 21:50
  3. Compilation series 60 3rd edition
    By asmobease in forum Symbian Tools & SDKs
    Replies: 32
    Last Post: 2006-09-13, 09:46
  4. Dynamic DRM wrapper in PHP
    By hermancremer in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2006-09-11, 22:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×