Error in update.php & update_daemon2.php CRON

Howtos, instructions and links to related software. Do not ask questions here.
cristoj
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 17 Jan 2013, 12:26

Error in update.php & update_daemon2.php CRON

Postby cristoj » 17 Jan 2013, 12:44

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

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

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

Postby fox » 17 Jan 2013, 13:17

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?

kenboldt
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 18 Mar 2013, 21:06

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

Postby kenboldt » 18 Mar 2013, 21:09

for me, the short answer is yes. I get the error.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

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

Postby fox » 18 Mar 2013, 21:41

For you, the short answer is read the FAQ.

kenboldt
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 18 Mar 2013, 21:06

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

Postby kenboldt » 19 Mar 2013, 00:40

According to the cPanel on my host page I have version 5.3.20

User avatar
erikbennett
Bear Rating Trainee
Bear Rating Trainee
Posts: 20
Joined: 17 Mar 2013, 03:08
Location: Seattle, WA

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

Postby erikbennett » 19 Mar 2013, 22:20

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.

Hermit
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 20 Mar 2013, 08:27

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

Postby Hermit » 20 Mar 2013, 08:35

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.

User avatar
pahles
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 20 Mar 2013, 17:02

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

Postby pahles » 20 Mar 2013, 17:20

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.

nimmul
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 22 Mar 2013, 09:57

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

Postby nimmul » 22 Mar 2013, 09:59

I have the same problem with php 5.3.20

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

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

Postby Latimer » 22 Mar 2013, 19:36

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"

User avatar
Monfreid
Bear Rating Trainee
Bear Rating Trainee
Posts: 23
Joined: 04 Apr 2013, 18:16

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

Postby Monfreid » 28 Jun 2013, 17:53

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

reepicheep
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 01 Jul 2013, 08:20

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

Postby reepicheep » 01 Jul 2013, 08:25

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

reepicheep
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 01 Jul 2013, 08:20

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

Postby reepicheep » 01 Jul 2013, 17:05

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.
Last edited by reepicheep on 04 Jul 2013, 18:23, edited 1 time in total.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

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

Postby sleeper_service » 04 Jul 2013, 00:01

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.


Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest