Tides Processor Script

Unfortunately the link to your icons is broke. #-o

Returned this for me:

Not Found
The requested URL /icons/tide_moonlastQ.gif was not found on this server.

George

Thanks George,

Just tried the link also and it is broken for me also. Back to the “hunt” for the answer.

Thanks again, had not tried the “SIMPLE” way of just checking the URL.

Tom

I realize this topic has been silent for a LONG time, but we have decided to try and make this script work on our site. After following the posted fixes, we have failed to get the processor script to work. I am more than sure it is a mistake on our part but we can’t seem to find it.
So we are hoping against hope that some one on the forums can come to our aid!
Thank you kindly!

Matt

What path are you using for the tideprediction.html in the tides_processor.php around line 33

This is the most recent path we have tried…
$tidefile = “./data/52/2/45/85/2534411/user/2777119/htdocs/tideprediction.html”

That is the path returned from our webhosting server.

In the past we have used ./htdocs/tideprediction.html and some variations of that path.

-Matt

We need to know where (url) tides_processor.php is installed to determine the relative path.

Sorry about that, I misunderstood what you were asking…

Here is the website: http://www.southturnermaineweather.com/tides_processor.php
Here is the page the tide script is running on: http://www.southturnermaineweather.com/wxtides.php
Here is the path to the processor script: http://www.southturnermaineweather.com/tides_processor.php
Here is the path to the data html file: http://www.southturnermaineweather.com/tideprediction.html

So the tideprediction.html is in the same directory as tides_processor.php ?

If that’s so try:

$tidefile = “./tideprediction.html”;

Yes…that is correct,
I will try that again, maybe this time it will work :slight_smile:

Made the suggested change, now I get empty cells instead of the red font warning that the tide data is being updated.
:slight_smile:

Try changing

error_reporting(0);

to

error_reporting(E_ALL);

in tides_processor.php

Then hopefully we should see some errors when running http://www.southturnermaineweather.com/tides_processor.php

Changed the error reporting and now it comes back with multiple errors in the tide table

Could you possibly post your ‘tides_processor.php’ script here - just rename the script as ‘tides_processor.php.txt’ so it can be attached to your reply.

You have obviously place the (Niko) recommended ‘error_reporting(E_ALL);’ at the wrong place as the script displays nothing and seems to have no source. :?

Curiously it does show errors when called from http://www.southturnermaineweather.com/wxtides.php, but I agree, let’s see the script :slight_smile:

here is the script


tides_processor.php.txt (15.1 KB)

Assuming this line 39 refers to the dates in tideprediction.html I think you need to change $yearDate to “no”, or whatever it was originally, since your dates do not have the year:


//   If your tide dates include years (Monday 2008-09-10) change this to "yes"  //
$yearDate = "yes";                                                               //
Wednesday 01-10 Sunrise 0713, Sunset 1623 Moonrise 0113, Moonset 1221 High Tide: 0559 9.3 Low Tide: 1217 0.6 High Tide: 1829 8.5

got part of the tides back now still showing issues with sun and moon

Try changing line 43 to “yes”

$convertRF = "no"; 

did not fix it

Matthew, I am working on the script you have posted a few days ago.

There are many variables that have not been ‘declared’ (such as, for example, setting the default value of the variable $moon to null). So, when an ‘if’ statement only check if the variable within (the ‘if’ statement) is ‘yes’ and does not provide an option in case the variable within (the ‘if’ statement) is ‘no’, then errors are produced and they prevent the script from continuing and producing the expected results…