0

I have a VPS with linux CentOS with root access and DirectAdmin control panel. I have restored a website on it and it shows some warnings like:

Warning: file_put_contents(/home/site/domains/mysite.com/public_html/news/art/wp-content/themes/aggregator/cache//6d6888104966bb46e070bdf21b1efd2c.spc) [function.file-put-contents]: failed to open stream: Permission denied in /home/site/domains/mysite.com/public_html/news/art/wp-content/themes/aggregator/php/simplepie.inc on line 8670

so I tried to turn off all warnings via editing the php.ini file:

error_reporting = E_ALL & ~E_WARNING

and I rebooted the system. but it does not work. I also realized that there are two php.ini files on my system:

/usr/local/etc/php5/cgi/php.ini

/usr/local/lib/php.ini

I don't know what to do. Any help?!

Thanks

Baba
  • 852
  • 1
  • 17
  • 31
Saeed Vrz
  • 147
  • 1
  • 3
  • 10
  • what is the output of `phpinfo()`? you can get which php.ini is used from phpinfo output. – bansi Jun 21 '14 at 06:50
  • 1
    Is it a production (or "live") server? Also, why are you trying to hide the warning instead of fixing it? If you have root access then it is just a matter of setting the right permissions, so that WP can use the cache folder. – Sverri M. Olsen Jun 21 '14 at 06:57
  • Although, you shouldn't hide warnings instead of fixing them, you should check your code, it may change the error_reporting level. And also, ini_set('display_errors', 'Off') may help. – Denis V Jun 21 '14 at 07:14

1 Answers1

0

Try to remove the

/home/site/domains/mysite.com/public_html/news/art/wp-content/themes/aggregator/cache/

folder. Make sure, you have right permissions to write in the cache folder. DON'T fight with the warning - fix the permissions problem.

Anton Bessonov
  • 9,208
  • 3
  • 35
  • 38