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

Update on OVH cron #146

Closed
tontof opened this Issue Apr 2, 2013 · 13 comments

Comments

Projects
None yet
3 participants
@ArthurHoaro

This comment has been minimized.

Show comment
Hide comment
@ArthurHoaro

ArthurHoaro Apr 2, 2013

Not the best solution, but a very simple workaround instead of OVH's specific code:

http://bit.ly/XVfYrU => http://kriss.domain.tld/?update&cron=xxx

ArthurHoaro commented Apr 2, 2013

Not the best solution, but a very simple workaround instead of OVH's specific code:

http://bit.ly/XVfYrU => http://kriss.domain.tld/?update&cron=xxx
@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 2, 2013

Owner

You're right, but what I think is not specific to OVH.
It will do the same as yours except that it will not rely on an external service.
Moreover, the problem is that the cron (on OVH) can not be set up with external link.

Owner

tontof commented Apr 2, 2013

You're right, but what I think is not specific to OVH.
It will do the same as yours except that it will not rely on an external service.
Moreover, the problem is that the cron (on OVH) can not be set up with external link.

@tolima

This comment has been minimized.

Show comment
Hide comment
@tolima

tolima Apr 17, 2013

what kind of script ? i tried

#!/usr/local/bin/php
<?php php -f /homez.383/kriss.domain/www/z/index.php update xxx > /tmp/kf.cron; ?>

or

#!/usr/local/bin/php
<?php exec("http://kriss.domain.tld/z/index.php?update&cron=xxx");    ?>

but that don't work

tolima commented Apr 17, 2013

what kind of script ? i tried

#!/usr/local/bin/php
<?php php -f /homez.383/kriss.domain/www/z/index.php update xxx > /tmp/kf.cron; ?>

or

#!/usr/local/bin/php
<?php exec("http://kriss.domain.tld/z/index.php?update&cron=xxx");    ?>

but that don't work

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 17, 2013

Owner

Arf did not think about that, but can you try with an update file in data, let say update.php :

<?php
$url = http://kriss.domain.tld/z/index.php?update&cron=xxx
$options = array('http'=>array('method'=>'GET','timeout' => 4));
$context = stream_context_create($options);
$data=file_get_contents($url,false,$context);
print($data);

And in your cron, just call /homez.383/kriss.domain/www/z/data/update.php

?

Owner

tontof commented Apr 17, 2013

Arf did not think about that, but can you try with an update file in data, let say update.php :

<?php
$url = http://kriss.domain.tld/z/index.php?update&cron=xxx
$options = array('http'=>array('method'=>'GET','timeout' => 4));
$context = stream_context_create($options);
$data=file_get_contents($url,false,$context);
print($data);

And in your cron, just call /homez.383/kriss.domain/www/z/data/update.php

?

@tolima

This comment has been minimized.

Show comment
Hide comment
@tolima

tolima Apr 18, 2013

i tried with a "update.php" in the data folder (chomd 704 and php vers.5.3) on mutualised ovh.

#!/usr/local/bin/php
<?php
$url = "http://kriss.domain.tld/z/index.php?update&cron=xxx";
$options = array('http'=>array('method'=>'GET','timeout' => 4));
$context = stream_context_create($options);
$data=file_get_contents($url,false,$context);
print($data);
?>

the log :

X-Powered-By: PHP/5.3.16
Content-type: text/html

0.000 seconds (1/187): Updating: Geekscottes




0.398 seconds: Updated: 0 new item(s)




0.398 seconds (2/187): Updating: X/2006B1




0.650 seconds: Updated: 0 new item(s)




0.651 seconds (3/187): Updating: gimmick




0.882 seconds: Updated: 0 new item(s)




0.882 seconds (4/187): Updating: Galactik restauroute




1.821 seconds: Updated: 0 new item(s)




1.821 seconds (5/187): Updating: le blog de did et dead




2.144 seconds: Updated: 0 new item(s)




2.144 seconds (6/187): Updating: Donatien marybrizar




2.438 seconds: Updated: 0 new item(s)




2.439 seconds (7/187): Updating: Drawing class hero

------ Cut by OVH. Output is too big (700506 Bytes) ---

So all look ok BUT it don't work, i don't know why...

tolima commented Apr 18, 2013

i tried with a "update.php" in the data folder (chomd 704 and php vers.5.3) on mutualised ovh.

#!/usr/local/bin/php
<?php
$url = "http://kriss.domain.tld/z/index.php?update&cron=xxx";
$options = array('http'=>array('method'=>'GET','timeout' => 4));
$context = stream_context_create($options);
$data=file_get_contents($url,false,$context);
print($data);
?>

the log :

X-Powered-By: PHP/5.3.16
Content-type: text/html

0.000 seconds (1/187): Updating: Geekscottes




0.398 seconds: Updated: 0 new item(s)




0.398 seconds (2/187): Updating: X/2006B1




0.650 seconds: Updated: 0 new item(s)




0.651 seconds (3/187): Updating: gimmick




0.882 seconds: Updated: 0 new item(s)




0.882 seconds (4/187): Updating: Galactik restauroute




1.821 seconds: Updated: 0 new item(s)




1.821 seconds (5/187): Updating: le blog de did et dead




2.144 seconds: Updated: 0 new item(s)




2.144 seconds (6/187): Updating: Donatien marybrizar




2.438 seconds: Updated: 0 new item(s)




2.439 seconds (7/187): Updating: Drawing class hero

------ Cut by OVH. Output is too big (700506 Bytes) ---

So all look ok BUT it don't work, i don't know why...

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 18, 2013

Owner

Strange...
Did the update work if you go on http://kriss.domain.tld/z/index.php?update&cron=xxx
with a browser ?

By the way there is a problem with update save using cron. I will correct this first to see if it really works as maybe just your first feeds as no new items.

Owner

tontof commented Apr 18, 2013

Strange...
Did the update work if you go on http://kriss.domain.tld/z/index.php?update&cron=xxx
with a browser ?

By the way there is a problem with update save using cron. I will correct this first to see if it really works as maybe just your first feeds as no new items.

@tolima

This comment has been minimized.

Show comment
Hide comment
@tolima

tolima Apr 18, 2013

yes, it works on http://kriss.domain.tld/z/index.php?update&cron=xxx with my browser.
I would rather use cron instead of javascript update because i use kriss feed often on a smartphone and cron is "lighter" for my phone :)
ps : i use the version 6, do i need to use the source version ?

tolima commented Apr 18, 2013

yes, it works on http://kriss.domain.tld/z/index.php?update&cron=xxx with my browser.
I would rather use cron instead of javascript update because i use kriss feed often on a smartphone and cron is "lighter" for my phone :)
ps : i use the version 6, do i need to use the source version ?

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 18, 2013

Owner

Well I guess it seems working on your browser because you were connected.
But if you logout and use the link http://kriss.domain.tld/z/index.php?update&cron=xxx, update should not be saved as I forgot to allow write data when it's a cron :-)

For the version, wait few hours, I will release version 7 today

Owner

tontof commented Apr 18, 2013

Well I guess it seems working on your browser because you were connected.
But if you logout and use the link http://kriss.domain.tld/z/index.php?update&cron=xxx, update should not be saved as I forgot to allow write data when it's a cron :-)

For the version, wait few hours, I will release version 7 today

@tolima

This comment has been minimized.

Show comment
Hide comment
@tolima

tolima Apr 18, 2013

ok.
yeah version 7 ! great news !
By the way, thank you for the very good job you did with kriss !

tolima commented Apr 18, 2013

ok.
yeah version 7 ! great news !
By the way, thank you for the very good job you did with kriss !

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 18, 2013

Owner

Thanks !

I did a mistake, it should save update with cron when using it with url...
I was not working when using with php -f

So your problem is not solved as I thought :-(

Can you try to move your update.php file into parent directory and access it directly into your browser ?
http://kriss.domain.tld/z/update.php

To see if it save changes...

Owner

tontof commented Apr 18, 2013

Thanks !

I did a mistake, it should save update with cron when using it with url...
I was not working when using with php -f

So your problem is not solved as I thought :-(

Can you try to move your update.php file into parent directory and access it directly into your browser ?
http://kriss.domain.tld/z/update.php

To see if it save changes...

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 18, 2013

Owner

That's it I've corrected it, it should works now !
Could you try with this version :
https://github.com/tontof/kriss_feed/raw/master/src/index.php

Owner

tontof commented Apr 18, 2013

That's it I've corrected it, it should works now !
Could you try with this version :
https://github.com/tontof/kriss_feed/raw/master/src/index.php

@tolima

This comment has been minimized.

Show comment
Hide comment
@tolima

tolima Apr 18, 2013

Yes, it work !!!
i left the update.php in data.
I will tell you if i see other problem.
Thanks !

tolima commented Apr 18, 2013

Yes, it work !!!
i left the update.php in data.
I will tell you if i see other problem.
Thanks !

@tontof

This comment has been minimized.

Show comment
Hide comment
@tontof

tontof Apr 18, 2013

Owner

Great !

Owner

tontof commented Apr 18, 2013

Great !

@tontof tontof closed this Apr 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment