Web Weather > Weather Website PHP/AJAX scripting
sunposa.php error
Vasco:
Did you upload the jpgraph-4.4.2-src-only directory that comes with the sunposa distribution?
--- Quote ---+ **./jpgraph-4.4.2-src-only/** A source only for [JPGraph 4.4.2](https://jpgraph.net/download/) is included (under [QPL-1.0 license](http://www.opensource.org/licenses/qtpl.php)) for convenience. The script can be changed to use your existing JPGraph installation if desired.
--- End quote ---
Then make sure the path to it is correct in sunposa.php
saratogaWX:
Running https://vinesweather.com/sunposa.php?debug=y shows
--- Quote ---sunposa.php Version 3.70 - 14-Dec-2024
..debug=y debugging output for sunposa.php. PHP version 8.1.31
Status of needed built-in PHP functions:
function 'imagecreatefrompng()' is available
function 'imagecreatefromgif()' is available
function 'imagecreatetruecolor()' is available
function 'imagecolortransparent()' is available
function 'imagettfbbox()' is available
function 'imagettftext()' is available
function 'gregoriantojd()' is available
function 'curl_init()' is available
function 'curl_setopt()' is available
function 'curl_exec()' is available
function 'curl_error()' is available
function 'curl_getinfo()' is available
function 'curl_close()' is available
Settings used:
lat='-31.7662916', lon='116.0022814', tz='Australia/Perth'
cacheFileDir='./cache/'
moonImagePath='./moonimg/SH-moon'
legendColor='orange' maxElevation='90'
jpgraph location='./jpgraph-4.4.2-src-only/'
--Warning: JPgraph not found in jploc='./jpgraph-4.4.2-src-only/'
Using internal calculations for moon data.
moon image cache './cache/jpmoon.png exists. Updated 2025-01-01 16:28:02
sun image NASA './cache/tempImg.gif exists. Updated 2025-01-01 21:14:04
sun image cache './cache/jpsun.gif exists. Updated 2025-01-01 21:14:04
GD Library is available and has these capabilities:
GD Version: 2.3.3
FreeType Support: true
FreeType Linkage: with freetype
GIF Read Support: true
GIF Create Support: true
JPEG Support: true
PNG Support: true
WBMP Support: true
XPM Support: true
XBM Support: true
WebP Support: true
BMP Support: true
AVIF Support: true
TGA Read Support: true
JIS-mapped Japanese Font Support: false
--- End quote ---
@vasco is correct, you need to upload the entire ./jpgraph-4.4.2-src-only/* directory and subdirectory contents to your website.
saratogaWX:
If you already have jpgraph-4.4.2 installed, then you can change sunposa.php
--- Quote ---$jploc = './vw/jpgraph-4.4.2-src-only/'; // relative location of jpgraph library
--- End quote ---
to
--- Quote ---$jploc = './vw/jpgraph-4.4.2/'; // relative location of jpgraph library
--- End quote ---
assuming that your existing library is in the ./vw/ directory as jpgraph-4.4.2/
vinesweather:
Hi Ken
yup. Got it sorted now. Many thanks for the help.
Chris
Navigation
[0] Message Index
[*] Previous page
Go to full version