Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6753431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:09:36+00:00 2026-05-26T13:09:36+00:00

I am working on a PHP website, and I am moving it over to

  • 0

I am working on a PHP website, and I am moving it over to a new server. The new server I am moving to does not have CRON compatibility. To compensate for this I have devised a system using time formats and database tables and more to run my code instead.

What I am having a problem with is this bit of code:

if ($lasttime < $pretime)
{
    $newtime = strtotime("now");

    queryMysql("UPDATE time SET time=".$newtime." WHERE time=".$lasttime);

    include_once 'grabber/grabber.php';
}

Specifically it’s the include_once 'grabber/grabber.php'; which is causing the problem. When the timer comes round and this code runs, it gets to the include and then the code stops, with no error provided, so the include fails. I have tried changing it to an exec() but to be honest I don’t completely understand how exec() works and if it is the correct thing to do. This is how I used it:

if ($lasttime < $pretime)
{
    $newtime = strtotime("now");

    queryMysql("UPDATE time SET time=".$newtime." WHERE time=".$lasttime);

    $grabber = $base."grabber/grabber.php";    

    exec($grabber);
}

This does not stop the code and seems to run but it doesn’t actually work, if grabber/grabber.php runs correctly then I get an email to confirm using the PHP mail() function

If anyone could help me solve this or shed some light that would be brilliant.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:09:37+00:00Added an answer on May 26, 2026 at 1:09 pm

    This is most probably an issue with the file location or permissions. There should be some kind of error, or the code doesn’t stop, but you don’t properly check that or there is some kind of an issue with the code in grabber.php itself. Add some debugging lines – print the filename, so you can check for errors in the path/name; add error_reporting(E_ALL); ini_set('display_errors', true); somewhere above the include_once line; make sure the file is where you’re trying to open it from, taking into account relative paths, etc. Make sure you have permissions to run this file.

    exec() is not what you need in this case, at least not in the way that you’re trying to use it.

    If that doesn’t help – give some more information about how you run the scripts that you’ve shown, what’s in the grabber.php file, what errors you get, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this PHP website that I am working on that using templates.
Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL). I have multiple javascript functions
I am working on a PHP website where I have just added a switch
Following problem: Website build with PHP/HTML working We want to change this site to
I'm pretty new to PHP and I'm currently working on my first PHP website.
I have a PHP website I'm maintaining and I've confirmed that this worked at
A friend and I have been working on a moderate-sized PHP website for some
I have been working on a website with PHP + Kohana for more than
I'm in the process of moving a working apache/mod-php website to nginx/php-fpm. Under Apache/mod-php,
I was working on a rewards website in php and mysql. I have almost

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.