Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cron broken after PHP update #36

Open
progval opened this issue Mar 1, 2016 · 1 comment
Open

cron broken after PHP update #36

progval opened this issue Mar 1, 2016 · 1 comment

Comments

@progval
Copy link
Contributor

progval commented Mar 1, 2016

After a PHP update (5.6.18), cron.php stopped updating tweets.

The console output is:

archivemytweets@Hydrogen:~$ php /home/archivemytweets/archive-my-tweets/cron.php
Importing from Twitter Archive JS Files...
No Twitter Archive JS files found.
HTTP/1.1 200 OK
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-disposition: attachment; filename=json.json
content-length: 826301
content-type: application/json;charset=utf-8
date: Tue, 01 Mar 2016 20:51:22 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Tue, 01 Mar 2016 20:51:22 GMT
pragma: no-cache
server: tsa_b
set-cookie: lang=fr; Path=/
set-cookie: guest_id=<redacted>; Domain=.twitter.com; Path=/; Expires=Thu, 01-Mar-2018 20:51:22 UTC
status: 200 OK
strict-transport-security: max-age=631138519
x-access-level: read
x-connection-hash: <redacted>
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 180
x-rate-limit-remaining: 173
x-rate-limit-reset: 1456866176
x-response-time: 366
x-transaction: <redacted>
x-twitter-response-tags: BouncerCompliant
x-xss-protection: 1; mode=block
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-disposition: attachment; filename=json.json
content-length: 826301
content-type: application/json;charset=utf-8
date: Tue, 01 Mar 2016 20:51:22 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Tue, 01 Mar 2016 20:51:22 GMT
pragma: no-cache
server: tsa_b
set-cookie: lang=fr; Path=/
set-cookie: guest_id=<redacted>; Domain=.twitter.com; Path=/; Expires=Thu, 01-Mar-2018 20:51:22 UTC
status: 200 OK
strict-transport-security: max-age=631138519
x-access-level: read
x-connection-hash: <redacted>
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 180
x-rate-limit-remaining: 173
x-rate-limit-reset: 1456866176
x-response-time: 366
x-transaction: <redacted>
x-twitter-response-tags: BouncerCompliant
x-xss-protection: 1; mode=block
@progval
Copy link
Contributor Author

progval commented Mar 1, 2016

Found: it was caused by this line of vendor/tijsverkoyen/TwitterOAuth/Twitter.php:

        $json = @json_decode($response, true);

Function json_decode was not found, and the error passed silently because of @.

(Keeping this issue open in case you want to drop the @ and use try…catch instead)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant