• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Directive 'safe_mode' is deprecated in PHP 5.3

P

PierrickL

Guest
Hello,

I wrote a cron task in my crontab as root.
And when this task starts, i got this message :

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/allzedeals.com/httpdocs/wp-content/plugins/rss-feeder/rss-importer.php on line 13
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /var/www/vhosts/allzedeals.com/httpdocs/wp-includes/pomo/mo.php on line 212

What does that mean ?
This task worked before in my last server (but the last one was an mutualised server, and now it's a dedicated one).
Thanks for your help.
RegardS.

P.
 
Thanks for this answer.

Which PHP.ini should i modify ??
When i make find "php.ini",
Here are the results
/opt/psa/admin/conf/php.ini
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini

And how to correct the line 1 inf /etc/php5/cli/conf.d/imap.ini.

Here is the content of this file :
# configuration for php Imap module
extension=imap.so

Thanks for your help.
 
Ok. it works.
Here are the answers of my questions :
The php.ini is the file located here :
/etc/php5/cli/php.ini

To correct the first line i substitute # by //

And everything works great !

Thanks for your help.
 
Fix

In the upgrade from 10.2 to 10.3 the php.ini (etc/php.ini) file was changed to turn safe_mode On again. I had turned it off in here last upgrade which upgraded the php version where this all first started.

My cron jobs now don't give this error.

Something we will need to keep an eye on when upgrading again, unless someone clicks????

Grant
 
Back
Top