homepage Welcome to WebmasterWorld Guest from 54.227.215.140
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Php Cron job and results
lappert2001

5+ Year Member



 
Msg#: 4417190 posted 12:51 am on Feb 14, 2012 (gmt 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.

 

rocknbil

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



 
Msg#: 4417190 posted 4:54 pm on Feb 14, 2012 (gmt 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 //.

lappert2001

5+ Year Member



 
Msg#: 4417190 posted 5:14 pm on Feb 14, 2012 (gmt 0)

Thanks,

I made the changes, and I'll see in about 30 minutes if it works or not.

coopster

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



 
Msg#: 4417190 posted 3:50 am on Feb 15, 2012 (gmt 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...]

lappert2001

5+ Year Member



 
Msg#: 4417190 posted 5:59 am on Feb 15, 2012 (gmt 0)

Thanks,

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved