0

I have a new account on a Plesk managed server with PHP FastCGI. The main php.ini for all the accounts has many functions disabled via disable_functions.

In particular mail() and socket related functions are disabled.

I am able to set values via .htaccess but I am unclear on how to re-enable the functions I need and so far I have not succeeded in Googling an answer.

Can someone give an example or direct me to documentation on re-enabling PHP mail() in this situation?

2
  • 1
    last I encountered this, I had to ask the provider to change it in a per-virtualhost php.ini file - I don't think these are editable via htaccess or that would kinda defeat the purpose of it (maybe I'm wrong) Commented Oct 11, 2013 at 15:43
  • Zathrus you are correct but this host declines to allow a per domain or per vhost specific ini so we moved site. Commented Oct 12, 2013 at 16:32

2 Answers 2

2

You can't do it in htaccess. Only in php.ini: https://www.php.net/manual/en/ini.core.php#ini.disable-functions

This directive must be set in php.ini For example, you cannot set this in httpd.conf.

Sign up to request clarification or add additional context in comments.

Comments

1

More over you can do it directly in Plesk GUI as per domain option starting with version 11.0. Just find for "PHP settings" in domain's hosting settings.

3 Comments

This host has deliberately disabled that interface in our accounts.
but which functions you actually need? If only mail() you can create mail account on domain and send mail throw this account.
I appreciate the reply but the project has already moved servers. It's a moot question now. And socket functionality was also required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.