Can't install or update plug-ins - resolved

I had a problem with plug ins in wordpress. The plug ins were not being updated.
I got cURL errors while updating any plug in. The site was hosted with 1and1 server.
I was getting these errors:

Warning: curl_init(): Cannot initialize a new cURL handle in /some/path/wp-includes/class-http.php on line 1307
Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /some/path/wp-includes/class-http.php on line 1343
Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in some/path/wp-includes/class-http.php on line 1344
Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in some/path/wp-includes/class-http.php on line 1346
... ... ....

I added below lines on top of .htaccess file and the problem was solved.

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
 
Adding those lines also solved my another problem of getting 
some pages blank in wordpress admin.

No comments:

Post a Comment