Forum Moderators: coopster

Message Too Old, No Replies

Trouble Installing An Extension/Module

Sablotron module for PHP/Apache on Windows

         

cabbagehead

4:06 am on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've waisted 1/2 my Saturday today trying to figure out how to install an extension/module for PHP today. I've never done this before but am pretty sure I've follwed the instructions. Still Apache is telling me that it "Call to undefined function: xslt_create()". Please tell me if you can see what I am doing wrong.

Here's what I've done:

1. Downloaded and installed Sablotron (and expat, the XML component it depends upon).

2. I've copied the php_sablot.dll to every place I could think of including the Apache2/modules directory. Note, I found some instructions stating to place this in the 'extensions' directory but one does not exist.

3. I have added a line in the php.ini file to load the module: extension=php_sablot.dll

4. So that the extension can be loaded per the above php.ini file, I have added the path info to my PATH environment variable. Moreover, I have copied this dll to every place I thought it might be looking just in case, including the windows/System32 dir, the root of my Apache2 dir and I even created an 'extension' directory and placed it there.

Still no dice. I can't get this darned this to recognize the xslt_create() call in my php page. Anyone have any ideas or can anyone see where I've gone wrong? Documentation on this is quite lacking.

Thanks in advance.

henry0

11:25 am on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have a look at
Tutorial [protonicdesign.com]

It might help

Regards

Henry

ergophobe

6:11 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is extension_dir pointing to the right place? Run phpinfo() and have a look.

Tom

cabbagehead

7:39 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HenryO - Thanks for the link but it ultimately leads to the same Gingerall manual which I looked at and found to be of no help. It only addresses building php/sablotron for Unix ... I'm trying to get the pre-built binaries working for Windows. I have found almost no documentation on that. :-\

ergophobe - I looked at the info as you suggested. My extension_dir variable is pointing to "./". I have no idea what that is relative to though I am guessing it is relative to my c:/dev/apache/Apache2/ directory. Just in case, I put a copy of the dlls in my ./modules, ./extensions (which I created), ./[root] .. I even put a copy in the root of the php directory, my windows/System32 directory, and even put the path to one of these in my System PATH variable. NOTHING! Still isn't finding anything. :(

Any thoughts?

Thanks.
Neal

ergophobe

8:05 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That was my problem trying to get the tidy extension going. The extension_dir was declared as ./ and when I set it to point to the actual extensions_dir, everything was sorted out.

Tom

cabbagehead

10:14 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hmm ... interesting.

So, what is the proper path for the extensions directory? I mean, I assume the path first off is relative to the root apache directory (e.g. c:/dev/apache/Apache2)....is this correct? So, assuming I create an 'extensions' directory, since one doesn't exist ... would the proper path be './extensions'? I've tried this and variations on this but still no luck. :-\

cabbagehead

10:41 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ha! Ok ... I specified an absolute path and it seems to have found the dll but now there is ANOTHER problem:

unknown(): Unable to loand dynamic library: 'c"\dev\apache\apache2\extensions\php_sablot.dll'- The specific procedure could not be found.

Aaaargh! Why is this so hard? Why does everyone like Apache so much? Its making me want to cry!

:(

cabbagehead

10:46 pm on Oct 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One more note ... the following is the directive I put into the php.ini for invoking the Sablotron dll....this is what causes that problem but per the documentation I have read, is correct.

extension=php_sablot.dll

cabbagehead

5:15 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Going once ... going twice ... (I just posted this because it looks like the message is about to fall off the first page of the board). :)

coopster

5:18 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Did you copy that dll into your extensions directory?

cabbagehead

7:03 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yup. And everywhere else I could think of. I have a copy of all 5 related dlls in probably 10 different locations onmy computer as I tried everything I could think of. :-\

btw - my Apache did not have an 'extensions' directory by default. I had to create it. Is this any sort of tip off to anyone?

coopster

7:20 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Installing PHP extensions really isn't too difficult. You just need to follow a few specific steps. There is a message in the PHP Library [webmasterworld.com] that describes Installing PHP5 Under Windows XP and Apache [webmasterworld.com], particularly message #2 in regards to the extensions.
  1. Make sure PHP can find the extensions (you copy the extensions into the correct folder) This is step 3 in the link provided.
  2. Edit your
    php.ini
    file by updating the
    extension_dir
    directive.
  3. Uncomment any extensions you are going to use.
Stop and restart Apache and you should be off and running with the ability to use the functions included in the new extension.

cabbagehead

8:30 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Coopster, though I've done both of these steps. I guess I'll look more deeply at the links you provided to see if I can find any clues. The problem seems to be that PHP just isn't finding the module, though I've tried everything I can think of. Grumble.

Well, thanks for the links.
Neal

cabbagehead

7:24 am on Oct 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok - I think I know what is WRONG!

I am trying to install Sablotron for XSLT support. I've installed GingerAll's Sablotron correctly I think. The problem appears to be when I uncomment (per the instructions) the following line from the php.ini file:

;extension=php_xslt.dll (I remove the ';').

The problem is quite simple ... where is the php_xslt.dll? Was this suppose to come with PHP? Sablotron? I did a search of my drive and it doesn't exist! Where can I get this library?

Grumble Grumble.