Jump to content


Photo

Loading PHP extensions on host server


  • Please log in to reply
3 replies to this topic

#1 HooligansInDaKitchen

HooligansInDaKitchen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 11 October 2006 - 08:05 PM

I am new to PHP and am unclear on how to implement standard PHP extensions on my website. I want to use the MCRYPT and MHASH functions to secure data before sending. My PHP script runs fine through the command line interface, producing a ciphertext and hash, but after putting it up on my site I get an error message saying I am calling an undefined function. I have read the documentation on my host's control panel; I know it supports PHP, my other scripts that don't use extensions work fine, but I don't see anything about adding support for extensions. I have also tried to dynamically load (dl()) mcrypt and mhash, but that does not seem to work either. What is the standard procedure for loading these kind of extensions on a host server?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 11 October 2006 - 08:17 PM

If you have access to the php.ini you can enable the exenstions there, either by adding
exension=php_[extension_name_here].dll
or by uncommenting the line in the php.ini

If you dot not have access to the php.ini. Then you'll want to contact your hosts about it. They may enabled it for you.

#3 HooligansInDaKitchen

HooligansInDaKitchen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 11 October 2006 - 08:35 PM

I can't find any access to php.ini, and my host company has not replied to any of my tickets, e-mails, and phone calls. Is the php.ini configuration file usually accessible? I mostly just want to know what the common practice is for implementing extensions, on a non-local server where there is not much support or access.

#4 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 11 October 2006 - 09:01 PM

On shared hosts the php.ini file is usually not accessable.  Pretty poor php host that doesn't already have the hash and encrytion functions installed!  Those are essential for lots of web apps.  I'd ditch that host if I was you and maybe try: http://www.webhostfreaks.com/
--associated with this web site
--usually have some low cost hosting packages allowing php and mysql with cpanel!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users