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 7941075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:33:26+00:00 2026-06-03T23:33:26+00:00

I have a cron task setup to run the following: php /var/www/vhosts/examplesite.com/index.php cron processCategoryItemCount

  • 0

I have a cron task setup to run the following:

php /var/www/vhosts/examplesite.com/index.php cron processCategoryItemCount

When i run this on my production server (hosted via MediaTemple dv4) the following error flashes on the ssh window:

Your system folder path does not appear to be set correctly. Please
open the following file and correct this: index.php

When i run the php CLI command on my development mac, i dont get any errors at all.

As far as i can tell my system_path is set properly.. here is the snippet.

/*
 *---------------------------------------------------------------
 * SYSTEM FOLDER NAME
 *---------------------------------------------------------------
 *
 * This variable must contain the name of your "system" folder.
 * Include the path if the folder is not in the same  directory
 * as this file.
 *
 */
    $system_path = 'system';

Manual Testing

I did some testing to go through the code that CI uses to determine system_path and application_path. From what i can tell its working properly..

CodeIgniter Uses The Following Code For path validation

// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
    chdir(dirname(__FILE__));
}

if (realpath($system_path) !== FALSE)
{
    $system_path = realpath($system_path).'/';
}

// ensure there's a trailing slash
$system_path = rtrim($system_path, '/').'/';

// Is the system path correct?
if ( ! is_dir($system_path))
{
    exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}

As a result I made a test.php file and stuck it in my httproot..

<?php
$system_path = 'system';
echo "index.php dir is: ".dirname(__FILE__)."\n";
chdir(dirname(__FILE__));
echo "System Dir is: ".realpath($system_path)."\n";
if ( ! is_dir($system_path)){
        exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}else{
    echo "System Path Set Properly\n";
}
sleep(30);

I ran this via command line with this command:

/usr/bin/php /var/www/vhosts/examplesite.com/client/stage/test.php`

This is what i get back:

index.php dir is: /var/www/vhosts/examplesite.com/client/stage
System Dir is: /var/www/vhosts/examplesite.com/client/stage/system
System Path Set Properly

So, a bit more testing and i discover the problem is in this part:

if ( ! is_dir($system_path))
{
    exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}
  • 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-06-03T23:33:28+00:00Added an answer on June 3, 2026 at 11:33 pm

    The problem was permissions related. I never thought of this, but when pulling from github if im logged in as root obviously the ownership is root. As a result php cannot execute properly.

    i ran: chown exampleuser:psacln index.php and alls good now!

    So as a lesson to others running into this issue.. if you’re getting the same problem make sure ownership and file permissions are right!

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

Sidebar

Related Questions

I have managed to get a cron job to run a rake task by
I have a PHP page that I run every minute through a CRON job.
I was trying to setup a cron to run a php script on my
I have an update query being run by a cron task that's timing out.
How do I run the task reklamer:runall every 15 minutes in cron.rake? I have
I have a cron job to run a Ruby script, which runs fine on
I have a CRON job php script that I just set up not too
If I have a cron job that run every 10 minutes and for some
This is more of an general architecture problem. If you have a cron job
I have following Scenario: PHP(Server, Writer) ----> MySQL Database <------ PHP(Client, Reader/ Writer); PHPS

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.