A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearInstalling PHP extensions on shared hosting - page 1
User InfoPosts
Installing PHP extensions on shared hosting#1
I need to enable the mcrypt functions on my website, except I'm on a shared host (running linux) and obviously don't have access to the php.ini file. There does seem to be options for installing PEAR modules but a search told me mcrypt wasn't available. Is there any way I can do this, short of begging technical support to help me?

Update: Looking around a bit more, it looks like I might be able to use the dl() function to dynamically load a library at run time. Since I'm only using the mcrypt functions in one spot, I could probably get away with doing this since the performance hit (I assume there is a hit) should be minimal. The only problem now is how to get the libmcrypt.so file?

Another update: I've downloaded the libmcrypt.tar.bz2 file from Sourceforge and run ./configure, make, and then copied the libmcrypt.so.4.4.8 file into my home directory (as libmcrypt.so), but now I can't find where to put it so that the dl() function will find it.

posted date: 2008-12-28 21:29:00

Re: Installing PHP extensions on shared hosting#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-28 21:29:01

Re: Installing PHP extensions on shared hosting#3
The MCrypt Sourceforge page should have it http://mcrypt.sourceforge.net/To compile it just:wget http://superb-east.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gztar -xzvf libmcrypt-2.5.8.tar.gzcd libmcrypt-2.5.8./configuremakesudo make installEDIT:Can you reference it with a direct path?What have you tried?Edit2: It seems that you can only load moduals from the extensions directory set in the php.ini and you cannot override extensions_dir with ini_set so you will either have to convince your host to install it or if they allow you to have your own php.ini (many do usually in [username]/php.ini) then you could set the extensions_dir in there and load the modual with that.

posted date: 2008-12-28 21:49:00

Re: Installing PHP extensions on shared hosting#4
Really the best way is to tell your ISP to include mcrypt support. Even if you bundle your own PHP extension and load it with dl(), there is no guarantee it is going to work after a PHP upgrade, as PHP is sometimes very version-number picky.

posted date: 2008-12-28 21:58:00

Re: Installing PHP extensions on shared hosting#5
ah well that sudo part isn't going to work, since I'm on a shared host.

posted date: 2008-12-28 21:59:00

Re: Installing PHP extensions on shared hosting#6
well you would have to build it first, I'll build one now and post a link.

posted date: 2008-12-28 22:00:00

Re: Installing PHP extensions on shared hosting#7
thanks for the offer(!), but i've been able to build it (see my latest edit)

posted date: 2008-12-28 22:01:00

Re: Installing PHP extensions on shared hosting#8
OK, no problem...

posted date: 2008-12-28 22:06:00

Re: Installing PHP extensions on shared hosting#9
dl doesn't accept any path information - only the file name.

posted date: 2008-12-28 22:10:00

Re: Installing PHP extensions on shared hosting#10
dl() will not help you either, since it only loads libraries from certain paths, and those paths are usually only writable by the system administrators for security reasons.I very much doubt that there is a way to use binary libraries without the consent of the hoster.

posted date: 2008-12-28 22:19:00

Re: Installing PHP extensions on shared hosting#11
PHP in versions before 5.2.5 allowed you to use a path in the dl() function so that you could easily load libraries in a shared environment.This changed for 'security' reasons with 5.2.5 and as far as I am aware your only option is to get your system administrator to add the module to the extensions_dir.This issue is described at bugs.PHP.net

posted date: 2009-09-30 15:02:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.