Let`s check current settings set in the profile:
- Code: Select all
# grep -i curl /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Cpanel::Easy::PHP4::Curl: 0
Cpanel::Easy::PHP4::CurlSSL: 1
Cpanel::Easy::PHP5::Curl: 0
Cpanel::Easy::PHP5::CurlSSL: 1
Cpanel::Easy::PHP5::Curlwrappers: 0
Modify profile for your needs (in this particular case enable Curl/CurlSSL):
- Code: Select all
perl -i -pe 's/Cpanel::Easy::PHP4::Curl: 0/Cpanel::Easy::PHP4::Curl: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl -i -pe 's/Cpanel::Easy::PHP4::CurlSSL: 0/Cpanel::Easy::PHP4::CurlSSL: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl -i -pe 's/Cpanel::Easy::PHP5::Curl: 0/Cpanel::Easy::PHP5::Curl: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl -i -pe 's/Cpanel::Easy::PHP5::CurlSSL: 0/Cpanel::Easy::PHP5::CurlSSL: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl -i -pe 's/Cpanel::Easy::PHP5::Curlwrappers: 0/Cpanel::Easy::PHP5::Curlwrappers: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Or one-line magic (thanks to Vlad):
- Code: Select all
perl -i -pe 's/Cpanel::Easy::PHP(\d*)::Curl(\S*): 0/Cpanel::Easy::PHP$1::Curl$2: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Verify changes:
- Code: Select all
# grep -i curl /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Cpanel::Easy::PHP4::Curl: 1
Cpanel::Easy::PHP4::CurlSSL: 1
Cpanel::Easy::PHP5::Curl: 1
Cpanel::Easy::PHP5::CurlSSL: 1
Cpanel::Easy::PHP5::Curlwrappers: 1
And finally execute script to rebuild cPanel's internal PHP installation:
- Code: Select all
/scripts/makecpphp