Help with modules loading on PHP startup

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pavkb
Forum Newbie
Posts: 4
Joined: Mon Aug 05, 2002 11:48 am
Contact:

Help with modules loading on PHP startup

Post by pavkb »

Hi,
I have the following list of modules in the php.ini file.
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tokenizer.dll
;extension=php_w32api.dll
extension=php_xslt.dll
;extension=php_yaz.dll
;extension=php_zlib.dll

As you see i want to enable php_xslt.dll. I have the dll with the same name in the extentions directory under php.
my extension_dir = ./
When i load a .php file in the browser i get an error that php_xslt.dll is not found.
Please help how to set this up & in future for other modules as well.

Thanks
Pavan
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

extension_dir = <whatever> in php.ini points to the right directory?
edit: sorry. read the post only to the half :oops:
although relative paths are sometimes wonderful I never trust and use them in .ini-files if there's a chance to use absolute paths.

Try to set extension_dir to the absolute path of the modules but remember it when you install a second version of php (if!) ;)
Last edited by volka on Mon Aug 05, 2002 12:07 pm, edited 1 time in total.
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

did you restart the server after you made the change?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If you've got the files in an extensions folder within the PHP folder then you should edit extension_dir to be:

Code: Select all

extension_dir = ./extensions/
Mac
pavkb
Forum Newbie
Posts: 4
Joined: Mon Aug 05, 2002 11:48 am
Contact:

Tried it ..

Post by pavkb »

Hi,
Well, i tried setting extension_dir = ./extensions/
It now gives me dll sablot.dll is not found along with the one above.

I am trying to do this on Win2k. All i am doing is the following.
Change the php.ini file in system directory, then reload a php page in a web browser from the Apache server i am running locally.

I have configured Apache properly to execute php.exe for .php files.

So if i don't enable the extension modules i am able to process .php files from the web server properly.

Also, i downloaded the zip version of php binary distribution which contains all the modules & lots of files.

I looked through php configuration doc's. All it says is set the extension_dir to the path & uncomment the dll in the Dynamic Extensions section.
Help appreciated
Pavan
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you tried putting the absolute path in and/or removing the trailing slash in the extension_dir directive? Having checked my php.ini (running PHP on Win2K also) mine looks like this:

Code: Select all

extension_dir = ./extensions
so I was wrong about the trailing slash being needed, sorry, hope this helps a bit more.

Mac
pavkb
Forum Newbie
Posts: 4
Joined: Mon Aug 05, 2002 11:48 am
Contact:

OK. This is what worked

Post by pavkb »

Copy all the dll files from php/dlls directory to system32. Then put ./extensions in the proper location.

Now phpinfo() tells me that xslt is enables.

Guess putting the dlls dir in path might have worked as well instead of copying the dlls in to system32 dir.
Pavan
Post Reply