Welcome to WebmasterWorld Guest from 54.167.174.11

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Php Cron job and results

   
12:51 am on Feb 14, 2012 (gmt 0)

5+ Year Member



We recently moved to a new machine running Debian Squeeze. Phpinfo.php reveals PHP Version 5.3.3-7+squeeze3.

The following is a cron job that came with the machine:
[ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete


and the output gets mailed to the admin:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mhash.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mhash.ini on line 2 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ps.ini on line 1 in Unknown on line 0


What would the purpose of this Cron job? It gets mailed to admin every 30 minutes, and is a tad aggravating.

Are the conditions serious? Can they be ignored? Is there a way to fix whatever the problem is?

Thank you.
4:54 pm on Feb 14, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm not sure what it's used for, but am EXTREMELY surprised # is no longer going to be a comment!

The fix: modify this script to replace all instances of # with //.
5:14 pm on Feb 14, 2012 (gmt 0)

5+ Year Member



Thanks,

I made the changes, and I'll see in about 30 minutes if it works or not.
3:50 am on Feb 15, 2012 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm guessing you are attempting to parse an ini file. I use this quite often and in PHP >= 3 ...

From the changelog:

5.3.0
Added optional scanner_mode parameter. Single quotes may now be used around variable assignments. Hash marks (#) may no longer be used as comments and will throw a deprecation warning if used.


[php.net...]
5:59 am on Feb 15, 2012 (gmt 0)

5+ Year Member



Thanks,

The fix suggested by rocknbil seems to be working. No more warnings.