PHP Extension problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    PHP Extension problem

    I tried to search for a solution to this, but I couldn't find one.
    Maybe I didn't look in the right place, but whatever....

    Here is the problem - I have an extension "Myextensio n" created using
    SWIG from C++ code. I put this in my c:\php5\ext directory and pointed
    php.ini to load extensions from that directory. This is fine.

    However this extension depends upon some other custom DLLs I have
    coded in C++. The only way that the original extension loads is if
    these custom DLLs are in the C:\Windows\Syst em32 folder. This is not
    an ideal solution for distribution however.

    So I've tried changing my System Path to include a custom directory
    where these DLLs can be stored. That doesn't work. PHP has to know
    where to find these DLLs that the extension depends on. I just don't
    know how to give it that information. Am I missing something in
    php.ini?

    Any help appreciated, thanks...
    John
  • Andy Hassall

    #2
    Re: PHP Extension problem

    On 13 Aug 2004 09:55:44 -0700, jcubed@gmail.co m (John) wrote:
    [color=blue]
    >I tried to search for a solution to this, but I couldn't find one.
    >Maybe I didn't look in the right place, but whatever....
    >
    >Here is the problem - I have an extension "Myextensio n" created using
    >SWIG from C++ code. I put this in my c:\php5\ext directory and pointed
    >php.ini to load extensions from that directory. This is fine.
    >
    >However this extension depends upon some other custom DLLs I have
    >coded in C++. The only way that the original extension loads is if
    >these custom DLLs are in the C:\Windows\Syst em32 folder. This is not
    >an ideal solution for distribution however.
    >
    >So I've tried changing my System Path to include a custom directory
    >where these DLLs can be stored. That doesn't work. PHP has to know
    >where to find these DLLs that the extension depends on. I just don't
    >know how to give it that information. Am I missing something in
    >php.ini?[/color]

    Adding to PATH /is/ the correct way. Is your webserver seeing the environment
    you expect? e.g. check it in phpinfo().

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • John

      #3
      Re: PHP Extension problem

      I had tried adding it to my path, but it didn't work. Then I realized
      I needed to reboot after making my change, so that PHP would recognize
      the new path! Silly of me!

      Thanks Andy
      John

      Andy Hassall <andy@andyh.co. uk> wrote in message news:<8f2qh0t6i gchq18cm6uob7rh 3houthuugl@4ax. com>...[color=blue]
      > On 13 Aug 2004 09:55:44 -0700, jcubed@gmail.co m (John) wrote:
      >[color=green]
      > >I tried to search for a solution to this, but I couldn't find one.
      > >Maybe I didn't look in the right place, but whatever....
      > >
      > >Here is the problem - I have an extension "Myextensio n" created using
      > >SWIG from C++ code. I put this in my c:\php5\ext directory and pointed
      > >php.ini to load extensions from that directory. This is fine.
      > >
      > >However this extension depends upon some other custom DLLs I have
      > >coded in C++. The only way that the original extension loads is if
      > >these custom DLLs are in the C:\Windows\Syst em32 folder. This is not
      > >an ideal solution for distribution however.
      > >
      > >So I've tried changing my System Path to include a custom directory
      > >where these DLLs can be stored. That doesn't work. PHP has to know
      > >where to find these DLLs that the extension depends on. I just don't
      > >know how to give it that information. Am I missing something in
      > >php.ini?[/color]
      >
      > Adding to PATH /is/ the correct way. Is your webserver seeing the environment
      > you expect? e.g. check it in phpinfo().[/color]

      Comment

      Working...