Page 2 of 2

Re: Webcam

Posted: Tue Mar 09, 2021 12:42 pm
by davidefa
Ok, do not forget to revert to the original updateWebcam.php script ( the last one does not check the password, so is open to everyone, and always saves the snapshot, without waiting the set delay )

Run the error checker ( via control panel ), you should have a red mark in the allow_url_fopen check
If this is the case you'll have lots of problem with blocks/plugins retrieving data from external URL.

To fix this ( permanently ) you need access to the php.ini file, adding

Code: Select all

allow_url_fopen = on
( never tried this, found searching for 'php file_get_contents not working' )


check.png
check.png (640.91 KiB) Viewed 10308 times

Re: Webcam

Posted: Wed Mar 10, 2021 5:08 am
by andyk1
I set mine to generate a new pic every 285 seconds and set my cron job to 300 seconds. The reason is to give MB time to FTP to my MT host. Most times 15 seconds is enough but now and then it will skip one.

Update: I forgot to mention... Pictures are generated by the seconds you choose. Cron Jobs by the min in the webcam block and Plugins. You'll be able to figure it out when you look. I don't remember which is which.

Re: Webcam

Posted: Wed Mar 10, 2021 8:00 am
by iatros
@davidefa
Yes, thank you for reminding me!
allow_url_fopen was on in the php settings on the server, but then set off again by en entry in the .htaccess.
My hoster found it out!

@ andyk1
Thanks both of you for your help

all the best and stay safe

Martin

Re: Webcam

Posted: Thu Apr 01, 2021 12:01 am
by dmgould
davidefa wrote: Mon Mar 08, 2021 11:38 pm Another thing you could do is trying the 'Check for problems' option in the control panel.
Maybe you have the option 'allow_url_fopen' not enabled in your server.
This could be the cause for the failure of the file_get_contents ( used to retrieve the image )
Thank you for this information! I have been beating my head against the wall for several weeks trying to figure out why my webcam images stopped saving in the database. My host forced me to upgrade my php version which created several issues. This is one of them. Thank you again.

Re: Webcam

Posted: Wed Apr 14, 2021 9:11 am
by Cavaliere
Hello everybody,
can someone help me to configure the webcam plugin that I have installed, it does not generate any timelap for me, I have already created the menu that leads to the webcam. https://www.ombarcellonapg.com/wdisplay ... /index.php

Re: Webcam

Posted: Wed Apr 14, 2021 11:42 am
by davidefa
I see that you inserted the url of the webcam as 192.168.0.... but this address won't work ( it is a local address, it can't be accessed by your server, which is not on your local net )
Another thing you should consider is that doing this way you expose the credentials of the webcam.

My advice is doing this setup by steps ( as webcam configuration has a few aspects to consider ):
- find a way to access your webcam from your server ( you may do it like you did or 'the other way round', uploading the image from the webcam to the server )
- test that everything is correct installing and configuring the webcam block
- last configure the webcam plugin ( which involves setting up a cron job... )

Re: Webcam

Posted: Wed Apr 14, 2021 9:27 pm
by Cavaliere
davidefa wrote: Wed Apr 14, 2021 11:42 am I see that you inserted the url of the webcam as 192.168.0.... but this address won't work ( it is a local address, it can't be accessed by your server, which is not on your local net )
Another thing you should consider is that doing this way you expose the credentials of the webcam.

My advice is doing this setup by steps ( as webcam configuration has a few aspects to consider ):
- find a way to access your webcam from your server ( you may do it like you did or 'the other way round', uploading the image from the webcam to the server )
- test that everything is correct installing and configuring the webcam block
- last configure the webcam plugin ( which involves setting up a cron job... )
Grazie Mille per le indicazione ti ho inviato un msg privato.