Welcome to WebmasterWorld Guest from 107.20.54.98

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Php Cron job and results

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

Junior Member

10+ Year Member

joined:July 23, 2005
posts: 72
votes: 0


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)

Senior Member

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

joined:Nov 28, 2004
posts:7999
votes: 0


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)

Junior Member

10+ Year Member

joined:July 23, 2005
posts: 72
votes: 0


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)

Administrator

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

joined:July 31, 2003
posts:12533
votes: 0


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)

Junior Member

10+ Year Member

joined:July 23, 2005
posts: 72
votes: 0


Thanks,

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