Author Topic: I need help with the script. How To PHP Upload Your Web Cam Image to Weatherund  (Read 680 times)

0 Members and 1 Guest are viewing this topic.

Offline Unit-53

  • Member
  • *
  • Posts: 28
    • Heart of Texas Weather
I need help with the script.  How To PHP Upload Your Web Cam Image to Weatherunderground.
I don't use the Software Weather-Display.

When I run the script php-cam-image-upload.php. I get a Fatal error: Call to undefined function ftp_close() in /xxx/xxx/www/hotwx.org/weather/php-cam-image-upload.php on line 161.


160  //close the FTP connection
161  ftp_close($conn_id);
162  echo ' ... disconnected .... good bye';
« Last Edit: July 26, 2015, 08:50:32 AM by Unit-53 »
Bill

www.hotwx.org
Davis - Vantage Vue / Cumulus - Version b3036
Weather Underground - KTXROBIN4 / CWOP - EW6308 / PWS - KTXROBIN53 / WOW - 897696001

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Your hoster may have disallowed the builtin ftp_* functions or your PHP is less than V 4.0.2

Can't really tell from just the description of the error, but I suspect the first cause (hoster disabled the function).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Unit-53

  • Member
  • *
  • Posts: 28
    • Heart of Texas Weather
Ken,

My PHP is v 5.6.10

I asked my host if they allow the builtin ftp_* functions?

Here is what they said: 

Thank you for contacting us.

I've enabled the builtin FTP functions for FTP by enabling the FTP library for PHP via the PHP.ini file for your account in the PHP Settings section of your Hosting Control Panel. The following string was added:

extension=ftp.so

As of now you should be experiencing no issues with PHP's FTP functions.

I tried to run the php script again and got a new error message:

Warning: ftp_close() expects parameter 1 to be resource, null given in /xxx/xxxx/xxxxxx/www/hotwx.org/weather/php-cam-image-upload.php on line 161
... disconnected .... good bye


Bill

www.hotwx.org
Davis - Vantage Vue / Cumulus - Version b3036
Weather Underground - KTXROBIN4 / CWOP - EW6308 / PWS - KTXROBIN53 / WOW - 897696001

 

anything