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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:23:31+00:00 2026-06-08T01:23:31+00:00

I have set up a php file to run that just echos hello. <?php

  • 0

I have set up a php file to run that just echos hello.

<?php
echo hello;
?>

My cron job looks like this:

/usr/local/bin/php -f “/home/username/public_html/mls/test.php”

when my script runs i get a confirmation email that says:

Could not open input file: /home/username/public_html/mls/test.php 

I don’t know what is causing this. I am using godaddy’s virtual private server with cpanel x installed. I have used the ssh to set permissions 777 on folder and file and still can not get it to run.

Any advice would be helpful. 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-06-08T01:23:32+00:00Added an answer on June 8, 2026 at 1:23 am

    For some reason PHP cannot open the file. Try replacing /usr/local/bin/php -f with “ls -la” to try to crib some more information. Remember to NOT quote the file name in the crontab: php -f filename.php, not php -f “filename.php”, unless it contains spaces — and then it’s better to use single quotes.

    Possibly, try “ls -la /home”, “ls -la /home/username”, “ls -la ~/public_html” and so on.

    Also try appending

    2>&1
    

    to the command line, in case only stdout is mailed to you (I don’t really think so, but being sure costs little).

    One other possibility

    The crontab as it is refers /home/username/public_html/mls/test.php – that is, a public HTML directory inside username‘s commonest value for a home directory.

    It is possible that the cron job is either not running with the appropriate user and privileges, or that the user it “sees” is actually a virtual user – there is no “/home/username” at all – and the “home directory” is elsewhere, possibly even existing just as long as the cron job runs. In this case the solution might be to refer to

    ~/public_html/mls/test.php
    

    or, as described above, to first run a command such as pwd or ls -la to determine exactly where the cron job’s current working directory is.

    If this, too, fails, then another workaround could be to invoke the PHP HTTP handler via curl or lynx:

    /usr/bin/curl http://www.thishostname.com/mls/test.php
    

    Possibly using either some environment variable or curl header or _GET option to authenticate to the script as the cron job, and avoid it being accessible from the outside.

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

Sidebar

Related Questions

I currently have a .htaccess file set up with this rule: RewriteRule ^([a-zA-Z0-9_-]+)$ user\.php?user=$1
I have set up a php script to receive url data like this: http://giffgaff.liamwli.co.uk/?name=liamwli
im trying to set up a cronjob to run a PHP file. i just
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
Hi i have a set of words that's retrieved by php and displayed on
I'm setting up my cron job controller that will only run within the CLI,
When I have this PHP script. <?php exec('/usr/local/bin/mate hello.txt'); ?> It doesn't work on
I have set all of my PHP settings in the php.ini file to allow
I am developing w php web site. Here I have set a php cookie
I have a set of .php files in a folder, I want to add

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.