Results 1 to 4 of 4

Thread: Undefined variable: timestamp

  1. #1
    rob_sugarcrm is offline Junior Member
    Join Date
    Sep 2010
    Posts
    1

    Default Undefined variable: timestamp

    Hi Guys,

    Sorry if this is an obvious one, i am a newbie with PHP / Sugar.

    Im trying to get email running into a customers SugarCRM.

    Almost there now, i think, all the accounts are in and the tests all pass. We are using IMAP and we can select the folders to get mail from, so i assume that means all the authentication is at least correct.

    What is troubling me is the cron job.

    I have a bat file written to call the php-cgi.exe from our php install, and the php.ini file from our WAMP install.

    I am pointing to the full path of our cron.php file.

    the output from a command line reads:

    PHP Notice: Undefined variable: timestamp in cron.php on line 95

    What do we need to do, to define the variable correctly?


    Line 95 looks like this:
    if($timestamp[0] < strtotime(date('H:i'))) {

    Any help you can offer would be great, cheers.

  2. #2
    layman99's Avatar
    layman99 is offline Senior Member
    Join Date
    Jan 2011
    Location
    Shimla
    Posts
    82

    Question Re: Undefined variable: timestamp

    Quote Originally Posted by rob_sugarcrm View Post
    Hi Guys,

    Sorry if this is an obvious one, i am a newbie with PHP / Sugar.

    Im trying to get email running into a customers SugarCRM.

    Almost there now, i think, all the accounts are in and the tests all pass. We are using IMAP and we can select the folders to get mail from, so i assume that means all the authentication is at least correct.

    What is troubling me is the cron job.

    I have a bat file written to call the php-cgi.exe from our php install, and the php.ini file from our WAMP install.

    I am pointing to the full path of our cron.php file.

    the output from a command line reads:

    PHP Notice: Undefined variable: timestamp in cron.php on line 95

    What do we need to do, to define the variable correctly?


    Line 95 looks like this:
    if($timestamp[0] < strtotime(date('H:i'))) {

    Any help you can offer would be great, cheers.
    Hello dear....
    i get struck somewhat similar to u . When i tried to run cron job in sugarcrm it stops working when it comes to these above mentioned lines of yours.... As i tried to echo all the points where i am getting error ...
    As this cron file reads it just don't able to read out the schedulers object mainly build to run the pending jobs() in scheduler.phps....Any help in this regards..............
    Dinesh Joshi
    sugarcrm CE 6.1.0
    joshishimla99@gmail.com

  3. #3
    jet2230 Guest

    Default Re: Undefined variable: timestamp

    Quote Originally Posted by layman99 View Post
    Hello dear....
    i get struck somewhat similar to u . When i tried to run cron job in sugarcrm it stops working when it comes to these above mentioned lines of yours.... As i tried to echo all the points where i am getting error ...
    As this cron file reads it just don't able to read out the schedulers object mainly build to run the pending jobs() in scheduler.phps....Any help in this regards..............
    no one managed to answer this?

    I am using SugerCRM 6.4 and I get this issue, I am using a windows setup so I had to setup a schedule task.

    The sugerCRM schedule page page tells me to:

    To Setup Windows Scheduler
    Note: In order to run the Sugar schedulers, create a batch file to run using Windows Scheduled Tasks. The batch file should include the following commands:
    cd C:\Program Files (x86)\sugarcrm-6.4.3\apps\sugarcrm\htdocs
    php.exe -f cron.php


    i did that exacly but does not work, i get:

    C:\Program Files (x86)\sugarcrm-6.4.3\apps\sugarcrm\htdocs>php.exe -f cron.php
    PHP Notice: Undefined variable: timestamp in C:\Program Files (x86)\sugarcrm-6.4.3\apps\sugarcrm\htdocs\cron.php on line 98


    please help and advise.

    thanks

  4. #4
    jet2230 Guest

    Default Re: Undefined variable: timestamp

    Quote Originally Posted by layman99 View Post
    Hello dear....
    i get struck somewhat similar to u . When i tried to run cron job in sugarcrm it stops working when it comes to these above mentioned lines of yours.... As i tried to echo all the points where i am getting error ...
    As this cron file reads it just don't able to read out the schedulers object mainly build to run the pending jobs() in scheduler.phps....Any help in this regards..............
    ok guys, Ive worked out what the issue is - something to do with write permissions on the schedular folder. So to resolve just make the folder writable and the cron jobs will start running.

    I had to make everything under 'C:\Program Files (x86)\sugarcrm-6.4.3\apps\sugarcrm\htdocs' writeable and give it the correct user permissions in windows server 2008 SBS.

    Altho I am now able to run the cron job usuing windows task schedular, the 'inbound email' cron job status is always in 'In progress...' and never finishes. I would like some help on this please.

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2008-12-11, 05:24 PM
  2. Undefined variable: db_name in
    By ajugrover in forum Developer Help
    Replies: 2
    Last Post: 2006-04-16, 05:14 AM
  3. Undefined variable: db_name in
    By ajugrover in forum Help
    Replies: 0
    Last Post: 2006-04-15, 05:05 AM
  4. Replies: 2
    Last Post: 2004-11-10, 02:44 PM
  5. Undefined variable: doc_root
    By arne2 in forum Help
    Replies: 4
    Last Post: 2004-11-02, 06:06 PM

Bookmarks

Posting Permissions

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