View Single Post
Old 03-28-2015, 06:45 AM  
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
1. Download the ct.txt and see if it has a number.
If it does, then the .sh and its cron is working
Check the ownership of the file it should be username:group (root?)

I tested it here on a site directory at the command line, the .sh(bash) command and the php <file> they worked.

$cat ct =>110
cat is open and read out a file in LINUX terminal. $tac is reverse the file read from the end Trivia

If there are contents in the file then it is a PHP issue.
PHP may need the full path ?
Or, there is a fopen, or fread issue -- maybe the chown (ownership of the file -- the PHP user www-data usually needs to be the file's group, i.e.; $chown username:www-data but PHP shouldn't need that permission to read just to write to a file.
Full path looks sort of like this:
/home/username/docroot/ ..../.../wp-content/uploads/

*** I just tried it in a browser and it worked =>712
That was the count from that directory but the path was relative all in the same directory. Put the image count readout *displayct.php* in the same directory as the ct.txt if that file has contents to read. Wordpess file location problem?

I sort of like the idea because it could wc -l (count lines in a file or a find (like shown | (pipe the output))) of a link file or a videos found count.
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote