Find the answer to your Linux question:
Results 1 to 4 of 4
I have a xubuntu server and everything is running as I need. So I have no idea what this message is or how to fix it. Date: Mon, 21 Mar ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    27

    new mail in /var/mail/root


    I have a xubuntu server and everything is running as I need. So I have no idea what this message is or how to fix it.


    Date: Mon, 21 Mar 2011 14:40:02 -0700 (PDT)
    From: Cron Daemon <root@weazol-server>
    To: root@weazol-server
    Subject: Cron <root@weazol-server> [ -d /usr/share/dtc/admin ] && cd
    /usr/share/dtc/admin && /usr/bin/php /usr/share/dtc/admin/cron.php 2>&1
    >> /var/log/dtc.log

    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 45
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 48
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 51
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 54
    PHP Deprecated: Assigning the return value of new by reference is deprecated in
    +/usr/share/php/nusoap/nusoap.php on line 7384
    Followed by

    Date: Mon, 21 Mar 2011 14:40:02 -0700 (PDT)
    From: Cron Daemon <root@weazol-server>
    To: root@weazol-server
    Subject: Cron <root@weazol-server> [ -d /usr/share/dtc/admin ] && cd
    /usr/share/dtc/admin && /usr/bin/php
    /usr/share/dtc/admin/stat_total_active_prods.php 2>&1 >>
    /var/log/dtc.log

    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 45
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 48
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 51
    PHP Deprecated: Function ereg() is deprecated in
    +/usr/share/dtc/shared/vars/global_vars.php on line 54
    PHP Deprecated: Assigning the return value of new by reference is deprecated in
    +/usr/share/php/nusoap/nusoap.php on line 7384
    I get about 1000 of these a day, any suggestions on how to stop/fix this?
    Last edited by weazol; 03-21-2011 at 09:40 PM.

  2. #2
    Linux Newbie Nagarjuna's Avatar
    Join Date
    Feb 2011
    Posts
    122
    What version of PHP are you running? The ereg() function has become deprecated in PHP-5.3.

    You can find your PHP version using the following command:

    Code:
    php -v
    It would appear that the root user has a cron-job set to run a script related to DTC. This script appears to use the ereg() function quite a bit. You can investigate these jobs in '/etc/crontab' and perhaps '/etc/cron.d/dtc' too.

    There exists another function to use in place of ereg(), which is preg(), the Perl equivalent. Here is a guide on converting the functions: Switching From 'ereg' to 'preg'.

    I hope this helps.
    Last edited by Nagarjuna; 03-21-2011 at 11:47 PM.

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    27
    PHP Version is PHP 5.3.3-1ubuntu9.3

    Edit:
    I do not think I need dtc in my setup, will it hurt if I just remove everything related?
    Last edited by weazol; 03-22-2011 at 12:45 AM.

  4. #4
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    I would not shutdown anything as that can harm functionality. The worst thing to do would be turning off the deprecation warnings.

    My advice would be to follow Nagarjuna's idea to take the deprecation warning serious and fix the code to be PHP 5.3 compliant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •