SitePoint Sponsor

User Tag List

Results 1 to 16 of 16

Thread: PHP Extensions

  1. #1
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    PHP Extensions

    PHP 4.3.3 - Dynamic Module using php4apache.dll
    Apache 1.3.27
    Windows XP Pro SP1 all hotfixes applied.

    I am trying to install some extensions namely curl. pdf, IIS_Funcs, and WIN32API. I have the DLL's in c:/phpdev/php/extensions. In my php.ini file it has:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "c:\phpdev\php\extensions"

    When the extensions are uncommented, Apache won't restart saying it can't find the DLL files in the above directory.

    How do I fix this?
    Wayne Luke
    ------------


  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ..do any other extensions work ?

    if so then you are probably missing dll's required by those extensions ... eg apache can find the php extension but not its required libraries

    eg curl requires ssleay.dll,libeay.dll,winmm.dll which should all come with the curl executable , pdf requires gdi32.dll

    strange about win32api as it requires nothing but kernell32.dll and msvcrt.dll which should be available on most windows boxes

  3. #3
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't you have to use forward slash's in that file?

    extension_dir = "c:/phpdev/php/extensions"
    So hold me when I'm here
    Right me when I'm wrong
    Hold me when I'm scared
    Love me when I'm gone.

  4. #4
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Maybe copy the DLLs to C:\WINDOWS\SYSTEM32\

  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by firepages
    ..do any other extensions work ?

    if so then you are probably missing dll's required by those extensions ... eg apache can find the php extension but not its required libraries

    eg curl requires ssleay.dll,libeay.dll,winmm.dll which should all come with the curl executable , pdf requires gdi32.dll

    strange about win32api as it requires nothing but kernell32.dll and msvcrt.dll which should be available on most windows boxes
    Firepages:
    Nope, none of the extensions work.

    CeleronXL:
    Not according to the examples in the php.ini comments. Forward slashes would be for Unix based OSes.

    DJ P@aCkMaN
    Hope not. I would rather keep stuff out of the Windows Directory if I can avoid it. If Apache requires those in the System directory to load properly then it is Bye Bye Apache.
    Wayne Luke
    ------------


  6. #6
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apache doesn't require it.. but in the folder called 'dlls' (I actually forget) there are some dlls that are needed for various extensions.. they do need to go into windows/system32 for your extensions to work properly..

    It won't matter if it is Apache or IIS...

    -Eric
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Actually, I got every extension I needed loaded now and didn't copy anything to the Windows/System or System32 directory.

    For some reason it all worked after rebooting the PC. Now to get PHP installed in IIS and to synchonize the web directories so I can start playing.
    Wayne Luke
    ------------


  8. #8
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by W. Luke
    CeleronXL:
    Not according to the examples in the php.ini comments. Forward slashes would be for Unix based OSes.
    As far as I understand (from the comment in php.ini), under Windows, forward and backward slashes both work the same.

    Quote Originally Posted by W. Luke
    DJ P@CkMaN
    Hope not. I would rather keep stuff out of the Windows Directory if I can avoid it. If Apache requires those in the System directory to load properly then it is Bye Bye Apache.
    I get where you're coming from, I'm not entirely sure myself, it was just a suggestion that hadn't been mentioned yet

  9. #9
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Ahhh, you have it working, good stuff

  10. #10
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wayne.. would you mind emailing me your HTTPD.CONF and PHP.INI files?

    Im interested in knowing how you loaded your extensions that require external dlls (assuming you said you didn't move them to the system32 directory like you are supposed to be)

    My email is eric(dot)coleman@sitemod(dot)net
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  11. #11
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I had 3 files installed to Windows/System which are:

    ssleay32.dll
    libeay32.dll
    libmcrypt.dll

    These files were installed there before I had problems though. And there are only 28 files in the Windows/System directory.

    Every other DLL is in the extension directory listed above unless it is installed by Windows such as GDI32.dll which is in the System32 directory. I didn't have to make any changes to the HTTPD.CONF file to get this to work and the only changes I made to the php.ini file, starting from php.ini-recommended that is in the php zip file, are:

    Code:
    ;Windows Extensions
    ;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
    ;
    ;extension=php_bz2.dll
    ;extension=php_cpdf.dll
    ;extension=php_crack.dll
    extension=php_curl.dll
    ;extension=php_db.dll
    ;extension=php_dba.dll
    ;extension=php_dbase.dll
    ;extension=php_dbx.dll
    ;extension=php_domxml.dll
    ;extension=php_exif.dll
    ;extension=php_fdf.dll
    ;extension=php_filepro.dll
    extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_hyperwave.dll
    ;extension=php_iconv.dll
    ;extension=php_ifx.dll
    extension=php_iisfunc.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_java.dll
    ;extension=php_ldap.dll
    ;extension=php_mbstring.dll
    extension=php_mcrypt.dll
    ;extension=php_mhash.dll
    ;extension=php_mime_magic.dll
    ;extension=php_ming.dll
    ;extension=php_mssql.dll
    ;extension=php_msql.dll
    ;extension=php_oci8.dll
    extension=php_openssl.dll
    ;extension=php_oracle.dll
    extension=php_pdf.dll
    ;extension=php_pgsql.dll
    extension=php_printer.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    extension=php_sockets.dll
    ;extension=php_sybase_ct.dll
    extension=php_w32api.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xslt.dll
    ;extension=php_yaz.dll
    ;extension=php_zip.dll
    Wayne Luke
    ------------


  12. #12
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting..

    I wonder how I can get php_zip.dll to work in php5 ;P
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  13. #13
    SitePoint Evangelist Daijoubu's Avatar
    Join Date
    Oct 2002
    Location
    Canada QC
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Next time, get FILEMON over www.sysinternals.com
    And monitor what's happening when Apache start/exit
    Easy to find out which DLLs Apache was unable to find and load
    Speed & scalability in mind...
    If you find my reply helpful, fell free to give me a point

  14. #14
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DJ P@CkMaN
    As far as I understand (from the comment in php.ini), under Windows, forward and backward slashes both work the same.
    Ahh.. I was sure it said somewhere to use forward slashes. Maybe that was the Apache config.
    So hold me when I'm here
    Right me when I'm wrong
    Hold me when I'm scared
    Love me when I'm gone.

  15. #15
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have the same problems with some DLLs. When I uncomment php_gd2.dll everything is ok but when I uncomment php_curl.dll I get that message.

  16. #16
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the php curl extension relies on you having curl installed , you can get the curl executables from http://curl.haxx.se/


    If Apache requires those in the System directory to load properly then it is Bye Bye Apache.
    well thats a bit unfair on Apache , blame windows ok !

    some extensions require dll's in a system directory , Interbase is another , but sometimes sticking dll's in the /apache/bin directory works as well.

    Good link Daijoubu , thats a nice tool ( & they do a few , just a shame their liscensing department is so unfriendly (another story ))


Bookmarks

Posting Permissions

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