skip to Main Content

I have a php file that authenticate with ldap, it was working fine on localhost but when i uploaded it to cpanel(softaculous), i got this error Fatal error: Uncaught Error: Call to undefined function ldap_connect(), i know that i have to uncomment extension=php_ldap.dll in php.ini,but i can not find this file,where can i find the php.ini file in cpanel?Also i want to know from where i can restart the apache on cpanel?

// Active Directory server
$ldap_host = "CRAMSDCR01V.cloud4rain.local";

// connect to active directory
$ldap = ldap_connect($ldap_host);

2

Answers


  1. You can find it under File Manager on cPanel

    at the Top Right corner on your FIle Manager Page >> Klik Settings Button >> check the Show Hidden Files (dotfiles) option

    you can add the the new file, if there’s doesn’t exist yet.

    Login or Signup to reply.
  2. Go to root directory of your website’s cPanel. There are a number of directories and files in root directory. Among them there is php.ini file. Edit that. That’s your required file.

    If you are working in Ubuntu, just run this command

    sudo service apache2 restart

    Or if in xampp in windows : then go to its panel click on stop and then start again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search