Page 1 of 1

Error in update.php & update_daemon2.php CRON

Posted: 17 Jan 2013, 12:44
by cristoj
Hi, my cron in order to update all the feeds not work, in the error log file i can see the error:

When i cron the update.php file:
PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/gktxllqs/public_html/feeds/update.php on line 100
this is de line 100 = $pluginhost->run_hooks($pluginhost::HOOK_UPDATE_TASK, "hook_update_task", $op);

When i cron the update.php file:
PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/gktxllqs/public_html/feeds/update.php on line 210
this is de line 210 = $pluginhost->run_hooks($pluginhost::HOOK_UPDATE_TASK, "hook_update_task", $op);

My host: APACHE 2.2.14, PHP 5.3.8, linux - ubuntu, Arquitectura x86_64.

Whow con i solved this error??, THANKS

Re: Error in update.php & update_daemon2.php CRON

Posted: 17 Jan 2013, 13:17
by fox
T_PAAMAYIM_NEKUDOTAYIM


Could you translate that? :shock:

Edit: ok, nvm. http://johnlamansky.com/tech/t_paamayim_nekudotayim/ WTF, php people, WTF.

Does this happen if you run update.php from command line in tt-rss directory?

Re: Error in update.php & update_daemon2.php CRON

Posted: 18 Mar 2013, 21:09
by kenboldt
for me, the short answer is yes. I get the error.

Re: Error in update.php & update_daemon2.php CRON

Posted: 18 Mar 2013, 21:41
by fox
For you, the short answer is read the FAQ.

Re: Error in update.php & update_daemon2.php CRON

Posted: 19 Mar 2013, 00:40
by kenboldt
According to the cPanel on my host page I have version 5.3.20

Re: Error in update.php & update_daemon2.php CRON

Posted: 19 Mar 2013, 22:20
by erikbennett
I ran into the same problem. Make sure you're pointing to the proper place for PHP 5.3 within your CRON call. For me, my host has both 5.2 and 5.3, and when I used the CRON call as listed in the FAQ, it ran it through 5.2 and I got the same errors above. As soon as I changed the call to where 5.3 was installed for my host, it worked.

Re: Error in update.php & update_daemon2.php CRON

Posted: 20 Mar 2013, 08:35
by Hermit
I had to do what Erik mentioned but I also had to point PHP 5.3 at my php.ini instead of the host server's ini. GoDaddy uses fastcgi to provide PHP 5.3 and that doesn't help you when you're using cron/ssh. It can be a bit confusing.

GoDaddy's PHP 5.3 has magic quotes turned on which can be a bit annoying so I edited my php5.ini to properly terminate the lines with semi-colons and added these:

Code: Select all

magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;


Then it was simply a matter of adding -c <path to ini> to the cron command to have the php initialized using my ini instead of the system's ini.

Here's my cron command for GoDaddy shared hosting, where "rss" is the path to my Tiny-rss install.

Code: Select all

cd $HOME/html/rss && /usr/local/php5_3/bin/php -c $HOME/html/php5.ini $HOME/html/rss/update.php -feeds >/dev/null 2>&1


Hope that helps someone.

Re: Error in update.php & update_daemon2.php CRON

Posted: 20 Mar 2013, 17:20
by pahles
My cronjob keeps insisting that there is an unexpected T_PAAMAYIM_NEKUDOTAYIM in update.php on line 100. I'm on PHP 5.3.5, and tried everything mentioned above (this includes reading the FAQ!). I'm at a loss right now.

Re: Error in update.php & update_daemon2.php CRON

Posted: 22 Mar 2013, 09:59
by nimmul
I have the same problem with php 5.3.20

Re: Error in update.php & update_daemon2.php CRON

Posted: 22 Mar 2013, 19:36
by Latimer
pahles wrote:My cronjob keeps insisting that there is an unexpected T_PAAMAYIM_NEKUDOTAYIM in update.php on line 100. I'm on PHP 5.3.5...

nimmul wrote:I have the same problem with php 5.3.20

I did have the same problem for a while. Regardless of what your hoster says about PHP version, please make sure the version referenced in your cronjob is actually 5.*. As in, /usr/bin/php, or whatever you put into your cronjob, actually returns "PHP 5.3.*" when you run a command "/usr/bin/php -v"

Re: Error in update.php & update_daemon2.php CRON

Posted: 28 Jun 2013, 17:53
by Monfreid
I had the same issue with 1and1, by default it is using php 4 but you need to force the script to use php5
to find the path to php5 use:

which php5

and then update the cron job accordingly with the path given

Re: Error in update.php & update_daemon2.php CRON

Posted: 01 Jul 2013, 08:25
by reepicheep
Hermit wrote:I had to do what Erik mentioned but I also had to point PHP 5.3 at my php.ini instead of the host server's ini. GoDaddy uses fastcgi to provide PHP 5.3 and that doesn't help you when you're using cron/ssh. It can be a bit confusing.

GoDaddy's PHP 5.3 has magic quotes turned on which can be a bit annoying so I edited my php5.ini to properly terminate the lines with semi-colons and added these:

Code: Select all

magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;


Then it was simply a matter of adding -c <path to ini> to the cron command to have the php initialized using my ini instead of the system's ini.

Here's my cron command for GoDaddy shared hosting, where "rss" is the path to my Tiny-rss install.

Code: Select all

cd $HOME/html/rss && /usr/local/php5_3/bin/php -c $HOME/html/php5.ini $HOME/html/rss/update.php -feeds >/dev/null 2>&1


Hope that helps someone.


This did help me alot.
There was one typo in your cron command though.
The option -feeds should be --feeds.

Code: Select all

cd $HOME/html/rss && /usr/local/php5_3/bin/php -c $HOME/html/php5.ini $HOME/html/rss/update.php --feeds >/dev/null 2>&1

I had to remove the redirect to null to figure that one out.

reepicheep

Re: Error in update.php & update_daemon2.php CRON

Posted: 01 Jul 2013, 17:05
by reepicheep
sleeper_service wrote:
in a rare case of my being helpful, I offer this:

"PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM" is a *PHP ERROR* not a ttrss error.

roughly translated, it means "you are using a too old version of php, get a newer one". the T_PAAMAYIM_NEKUDOTAYIM (or ::) is a php construct introduced in php 5.3, so if you're getting that error, you're not using php 5.3+ no matter what checkbox you've clicked somewhere.


Actually, it can be even more roughly translated 'an error has occurred'.
I got this error while working with getting cron to work and it was when I accidentally forgot to close a value that was in quotes.
So it could be 'syntax error', 'wrong php version', etc.....but nearly 99.9% not a ttrss error (unless you edited the code yourself).



Checked today and cronjob working great on Godaddy now for me.
I also wanted to comment that might be best to not redirect output to null so you will get an email if there are errors in your cronjob.
You will need to add the --quiet option for the update.php so you wont get an email every time ran with the output of tt-rss updating your feeds.

Re: Error in update.php & update_daemon2.php CRON

Posted: 04 Jul 2013, 00:01
by sleeper_service
in a rare case of my being helpful, I offer this:

"PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM" is a *PHP ERROR* not a ttrss error.

roughly translated, in this context, it means "you are using a too old version of php, get a newer one". the way T_PAAMAYIM_NEKUDOTAYIM (or ::) is being used where the error happens was introduced in php 5.3, so if you're getting that error, you're not using php 5.3+ no matter what checkbox you've clicked somewhere.