Page 1 of 1

annual data summary-data summary php-need help

Posted: Wed 02 Apr 2014 9:44 pm
by mm23
Good evening...need help please

I try to produce table with annual data summary. All the time I got the error:
[02-Apr-2014 20:59:46 UTC] PHP Warning: require_once(Settings.php): failed to open stream: No such file or directory in /home/sibeniku/public_html/vrijemeusibeniku.com/weather/annual/datasummary.php on line 31
[02-Apr-2014 20:59:46 UTC] PHP Fatal error: require_once(): Failed opening required 'Settings.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/sibeniku/public_html/vrijemeusibeniku.com/weather/annual/datasummary.php on line 31

In data summary in line 31 stands: require_once("Settings.php");

What does that mean?
I try a dozens paths to dayfile.txt....... :cry:

Thanks

Re: annual data summary-data summary php-need help

Posted: Wed 02 Apr 2014 10:09 pm
by beteljuice
It means what it says !
Settings.php .....No such file ....

Re: annual data summary-data summary php-need help

Posted: Wed 02 Apr 2014 10:15 pm
by mm23
Where can I get that file?
There is no such a file in zipped Annual data folder....

Re: annual data summary-data summary php-need help

Posted: Thu 03 Apr 2014 6:07 pm
by mm23
So, does anybody here be so kind and tell me what should I do to make annual data summary php to work, please

Thanks

Re: annual data summary-data summary php-need help

Posted: Thu 03 Apr 2014 7:14 pm
by BCJKiwi
You may get a better response if you provide more information.

what website software? - requirement for Settings.php suggests Saratoga template system - is that what you run?
which data summary program?
can we get to your website to see what is happening?

Re: annual data summary-data summary php-need help

Posted: Thu 03 Apr 2014 7:52 pm
by mm23
Thank you for your response!

I do not have Web site in this moment, it is in preparation phase. I'm trying to make an data summary table (php) version for my web page using these instructions http://wiki.sandaysoft.com/a/AnnualDataSummary. I did just as wrote in wiki page but this part confuses me......
.
.
.
.
"The 'tool' relies on two files for successful operation.... datasummary.css (the style sheet) and either readDayfile.js (the JavaScript) or readDayfile.php (the PHP version). The third file, datasummary.html/php, is simply a carrier page to show the data.

If you wish to use your own page to show the data on, do the following:

for the JS version

In the <HEAD> section.....

<link rel="stylesheet" type="text/css" media="screen" href="datasummary.css" />
<script src="https://ajax.googleapis.com/ajax/libs/j ... /jquery.js" type="text/javascript"></script>
<script src="readDayfile.js" type="text/javascript"></script>

This loads the stylesheet; loads a jQuery library from Google servers (rather than having the file on your server, note later versions of jQuery are available, but not supported by old versions of Internet Explorer, amend the '1.5' used by DAJ if you want to); and loads the Javascript to build the table
Once the page is loaded it runs readDayfile.js and will look for a DIV called 'tableData'; inserting the data table within it. You can change the DIV it inserts into (see above).

for the PHP version

you still need the jQuery library as above
use the code

<?php include('readDayfile.php');?>"
.
.
.
.



and when I try to run datasummary php it does not work (see my first post). Get the error message that I miss the settings.php file. See that in datasummary.php mentioned common.php, top.php ........ the wiki pages has no word about these php's?
I do not use Saratoga template. Is it a requirement to have annual data table?
On the web server in the data directory I have formed monthly.txt and dayfile.txt files with all uploads in it and also these two database tables .
Tell me please what I did wrong? I am really stuck in this.....
I wish to have data summary web page table using php and my data base tables .

Thanks a lot

Re: annual data summary-data summary php-need help

Posted: Thu 03 Apr 2014 8:56 pm
by sfws
Hi
Although I did give BCJKiwi some hints re the script part of his PHP package, I cannot help you with the Saratoga template system he uses on his 'php carrier page', and its call for the files that you do not have. But the Wiki is suggesting you do not need to use that 'datasummary.php' carrier page, instead you can use your own.

I can perhaps help you to understand the bit of the Wiki you quote. I believe it is saying for PHP you can use 'datasummary.css' for styling and 'readDayfile.php' for the script. You can use your own carrier page (based on the PHP pages you plan to use for other parts of your Cumulus fed web pages), simply by including the
mm23 wrote: <?php include('readDayfile.php');?>"
line.

I believe the script in BCJKiwi's 'readDayfile.php' expects the dayfile.txt to be in the root directory/folder, the Wiki article explains how PHP searches from the root.

I hope that gets you a bit further. You may also wish to do a search on the forum for details of 'php version' at https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=8600 to see the exchanges as that BCJKiwi version was developed. Note there has been an alternative version discussed recently - see https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=11397 for this php based version as you might prefer the extra functionality it offers.

Re: annual data summary-data summary php-need help

Posted: Fri 04 Apr 2014 11:55 am
by mm23
Thanks (wo)man :) ,

I will try to manage that issue somehow.....

Re: annual data summary-data summary php-need help

Posted: Sat 05 Apr 2014 11:20 am
by SpaceWalker
The only lines you need from the 'datasummary.php' script are as follow:
- placed before the closing '</head>' tag:

Code: Select all

<link rel="stylesheet" type="text/css" media="screen" href="datasummary.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js" type="text/javascript"></script>
- then in your page where ever you want the data to be displayed (it must be a PHP file/template):

Code: Select all

<div id="tableData">
<?php include('readDayfile.php');?>
</div>
You do not need the 'datasummary.php' script.

As I wrote above, the 'readDayfile.php' script cannot be used (included) inside an HTML file/template.

Do not forget to edit the 'readDayfile.php' to include the relative path to your 'dayfile.txt' data file.