• Home
  • Forum
  • Fare Web
  • PHP

Problema con php?

  • Creatore Discussione Creatore Discussione danyx2003
  • Data di inizio Data di inizio 12 Mar 2005
D

danyx2003

Nuovo Utente
12 Mar 2005
1
0
0
  • 12 Mar 2005
  • #1
Salve a tutti
Ho un sistema Linux Fedora core 3 con Apache 2 (httpd-2.0.52-.1) e php4
(php-4.3.10-3.2)
Nella stessa macchina in directory /usr/local/bin/ ho installato un
programma di nome fetch2300 (acquisisce i dati da una stazione meteo)
il programma se lanciato da shell funziona correttamente.
Ora il problema e il seguente nella pagina
http://127.0.0.1/weatherstation.php mi vengono visualizzati solo questi
errori

Notice: Undefined offset: 1 in /var/www/html/weatherstation.php on line 14

Notice: Undefined index: Forecast in /var/www/html/weatherstation.php on
line 17

Notice: Undefined index: Tendency in /var/www/html/weatherstation.php on
line 18


Notice: Undefined index: Time in /var/www/html/weatherstation.php on line 44

Notice: Undefined index: Date in /var/www/html/weatherstation.php on line 44

chiaramente non riesce a importare i dati sulla pagina php
e non ho idea di cosa significhino i vari errori

Allego anche il codice della pagina

<?
/* weatherstation.php* - part of the open2300 package
**
** Version 1.3
**
** Control WS2300 weather station
**
** Copyright 2003,2004, Kenneth Lavrsen
** This program is published under the GNU Public license
**/
exec("/usr/local/bin/fetch2300",$fetcharray);
foreach ($fetcharray as $value)
{
*list($parameter,$parvalue)=explode(" ", $value);
*$ws["$parameter"]=$parvalue;
}
$forecastpic= strtolower($ws["Forecast"]) . ".jpg";
$tendencypic= strtolower($ws["Tendency"]) . ".png";

?>

<html>

<head>
<title>Kenneth's Weather Station, Glostrup, Denmark</title>
<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="60">
</head>

<body bgcolor="honeydew" text="black" link="blue" vlink="purple"
alink="red">

<h1 align="center">Kenneth's Weather Station, Glostrup, Denmark</h1>
<table border="3" width="700" align="center" bgcolor="ivory">
* <tr>
*** <td width="100%">
***** <table border="0" cellpadding="0" cellspacing="0" width=100%">
******* <tr>

*********** <td width="55%" valign="top">
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="50%" height="170" valign="top">

<center><b><?=$ws["Time"]?>&nbsp;&nbsp;<?=$ws["Date"]?></b></center><br>
*************************** <img src="<?=$forecastpic?>" align="left">
*************************** <br>Forecast: <?=$ws["Forecast"]?><br><br>
*************************** Tendency: <?=$ws["Tendency"]?> <img
src="<?=$tendencypic?>" align="middle">
*********************** </td>
************************ </td>
*********************** <td width="50%" height="170" valign="top">
*************************** Relative Pressure
*************************** <p align="center"><font
size="5"><?=number_format($ws["RP"],1,'.','')?> hPa</font></p>
*************************** <p><font size="2">Minimum:
<?=number_format($ws["RPmin"],1,'.','')?> hPa</font><br>
****************************** <font size="2"><center><?=$ws["TRPmin"]?>
<?=$ws["DRPmin"]?></center></font>
*************************** <p><font size="2">Maximum:
<?=number_format($ws["RPmax"],1,'.','')?> hPa</font><br>
****************************** <font size="2"><center><?=$ws["TRPmax"]?>
<?=$ws["DRPmax"]?></center></font>
*********************** </td>
******************* <tr>
*************** </table>
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Wind Speed</p>
*************************** <p align="center"><font size="5"><?=$ws["WS"]?>
m/s</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["WSmin"]?>
m/s</font><br>
****************************** <font size="2"><center><?=$ws["TWSmin"]?>
<?=$ws["DWSmin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["WSmax"]?>
m/s</font><br>
****************************** <font size="2"><center><?=$ws["TWSmax"]?>
<?=$ws["DWSmax"]?></center></font>
************************ </td>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Wind Direction</p>
*************************** <p align="center"><font
size="5"><?=$ws["DIRtext"]?></font><br><font size="5"><?=$ws["DIR0"]?>
&deg</font></p>
*************************** <p><font size="2">Last 5 directions<br>
****************************** <center><?=$ws["DIR1"]?> &deg,
<?=$ws["DIR2"]?> &deg, <?=$ws["DIR3"]?> &deg,<br>
****************************** <?=$ws["DIR4"]?> &deg, <?=$ws["DIR5"]?>
&deg</center></font>
*********************** </td>
******************* <tr>
*************** </table>
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="33%" height="190" valign="top">
*************************** <p>Rain Total</p>
*************************** <p align="center"><font
size="5"><?=number_format($ws["Rtot"],1,'.','')?> mm</font></p>
*************************** <p><br><font size="2">Since:</font><br>
********************************** <font size="2"><center><?=$ws["TRtot"]?>
<?=$ws["DRtot"]?></center></font>
************************ </td>
*********************** <td width="33%" height="190" valign="top">
*************************** <p>Rain last 24 hours</p>
*************************** <p align="center"><font
size="5"><?=number_format($ws["R24h"],1,'.','')?> mm</font></p>
*************************** <p><br><font size="2">Maximum:
<?=number_format($ws["R24hmax"],1,'.','')?> mm</font><br>
********************************** <font
size="2"><center><?=$ws["TR24hmax"]?> <?=$ws["DR24hmax"]?></center></font>
************************ </td>
************************ <td width="33%" height="190" valign="top">
*************************** <p>Rain last 1 hour</p>
*************************** <p align="center"><font
size="5"><?=number_format($ws["R1h"],1,'.','')?> mm</font></p>
*************************** <p><br><font size="2">Maximum:
<?=number_format($ws["R1hmax"],1,'.','')?> mm</font><br>
********************************** <font
size="2"><center><?=$ws["TR1hmax"]?> <?=$ws["DR1hmax"]?></center></font>
*********************** </td>
******************* <tr>
*************** </table>

*********** </td>
*********** <td width="45%" valign="top">
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Temperature, Indoor</p>
*************************** <p align="center"><font size="5"><?=$ws["Ti"]?>
&deg;C</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["Timin"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TTimin"]?>
<?=$ws["DTimin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["Timax"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TTimax"]?>
<?=$ws["DTimax"]?></center></font>
************************ </td>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Temperature, Outdoor</p>
*************************** <p align="center"><font size="5"><?=$ws["To"]?>
&deg;C</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["Tomin"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TTomin"]?>
<?=$ws["DTomin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["Tomax"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TTomax"]?>
<?=$ws["DTomax"]?></center></font>
*********************** </td>
******************* <tr>
*************** </table>
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Dewpoint</p>
*************************** <p align="center"><font size="5"><?=$ws["DP"]?>
&deg;C</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["DPmin"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TDPmin"]?>
<?=$ws["DDPmin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["DPmax"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TDPmax"]?>
<?=$ws["DDPmax"]?></center></font>
*********************** </td>
*********************** <td width="50%" height="170" valign="top">
*************************** <p>Windchill</p>
*************************** <p align="center"><font size="5"><?=$ws["WC"]?>
&deg;C</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["WCmin"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TWCmin"]?>
<?=$ws["DWCmin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["WCmax"]?>
&deg;C</font><br>
****************************** <font size="2"><center><?=$ws["TWCmax"]?>
<?=$ws["DWCmax"]?></center></font>
************************* </td>
******************* <tr>
*************** </table>
*************** <table border="1" width="100%">
******************* <tr>
*********************** <td width="50%" height="190" valign="top">
*************************** <p>Relative Humidity, Indoor</p>
*************************** <p align="center"><font size="5"><?=$ws["RHi"]?>
%</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["RHimin"]?>
%</font><br>
****************************** <font size="2"><center><?=$ws["TRHimin"]?>
<?=$ws["DRHimin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["RHimax"]?>
%</font><br>
****************************** <font size="2"><center><?=$ws["TRHimax"]?>
<?=$ws["DRHimax"]?></center></font>
************************ </td>
*********************** <td width="50%" height="190" valign="top">
*************************** <p>Relative Humidity, Outdoor</p>
*************************** <p align="center"><font size="5"><?=$ws["RHo"]?>
%</font></p>
*************************** <p><font size="2">Minimum: <?=$ws["RHomin"]?>
%</font><br>
****************************** <font size="2"><center><?=$ws["TRHomin"]?>
<?=$ws["DRHomin"]?></center></font>
*************************** <p><font size="2">Maximum: <?=$ws["RHomax"]?>
%</font><br>
****************************** <font size="2"><center><?=$ws["TRHomax"]?>
<?=$ws["DRHomax"]?></center></font>
*********************** </td>
******************* <tr>
*************** </table>
*********** </td>

******* </tr>
***** </table>
*** </td>
* </tr>
</table>
<p align="center">Weather Data are loaded directly from Weather Station
which gives a 5-30 seconds delay</p>
<p>
<p align="center"><a href="index.htm">[Weather Index]</a> <a
href="weathergraphs.php">[Weather Graphs]</a>
<a href="phpweather/index.php?icao=EKCH&language=en">[World Weather]</a> <a
href="/">[Kenneth's Homepage]</a></p>
</body>

</html>

Grazie
Daniele
 
Devi accedere o registrarti per poter rispondere.

Discussioni simili

K
[php] Problema con inner join
  • Kiko74b
  • 22 Nov 2022
  • PHP
Risposte
4
Visite
2K
PHP 23 Nov 2022
Kiko74b
K
K
[PHP] Problema con variabili concatenate.
  • Kiko74b
  • 17 Ott 2022
  • PHP
Risposte
1
Visite
1K
PHP 30 Ott 2022
thanatos
T
T
  • Bloccata
ALTRO PROBLEMA CON ARRAY PHP
  • thanatos
  • 30 Mag 2021
  • PHP
Risposte
1
Visite
1K
PHP 30 Mag 2021
Max 1
Z
Problema di sincronizzazione PAYPAL con PHP
  • z.cristiano
  • 11 Nov 2020
  • PHP
Risposte
1
Visite
1K
PHP 12 Nov 2020
Max 1
M
Problema con php per calcolo costo percentuale
  • Matteoarm99
  • 24 Mar 2020
  • PHP
Risposte
7
Visite
3K
PHP 25 Mar 2020
marino51
L
[PHP] Problema con Telegram
  • Lorenzo Poggi
  • 26 Nov 2019
  • PHP
Risposte
1
Visite
2K
PHP 26 Nov 2019
Max 1
K
Help: problema con uno script di booking in php!
  • kathe
  • 28 Ott 2019
  • PHP
Risposte
0
Visite
707
PHP 28 Ott 2019
kathe
K
N
[Apache] problema con estensione php
  • nik04
  • 9 Set 2019
  • Apache
Risposte
0
Visite
2K
Apache 9 Set 2019
nik04
N
C
[PHP] Problema con download file
  • claudiorn
  • 5 Set 2019
  • PHP
Risposte
0
Visite
1K
PHP 5 Set 2019
claudiorn
C
M
[PHP] Problema con preg_match
  • Marko97
  • 18 Ago 2019
  • PHP
Risposte
1
Visite
1K
PHP 20 Ago 2019
zorro
[PHP] problema con l'utilizzo di Header
  • gandalf1959
  • 5 Lug 2019
  • PHP
Risposte
3
Visite
3K
PHP 5 Lug 2019
gandalf1959
M
[PHP] Problema con query select
  • Max61
  • 6 Giu 2019
  • PHP
Risposte
2
Visite
2K
PHP 7 Giu 2019
Max61
M
S
[PHP] Problema con istruzione "use"
  • samurai.sette
  • 6 Apr 2019
  • PHP
  • 2
Risposte
23
Visite
4K
PHP 13 Apr 2019
macus_adi
[PHP] fwrite problema con le parole accentate
  • Cosina
  • 15 Gen 2019
  • PHP
Risposte
9
Visite
3K
PHP 19 Gen 2019
Cosina
F
  • Bloccata
[PHP] Problema con number_format
  • fortis
  • 26 Dic 2018
  • PHP
Risposte
3
Visite
1K
PHP 26 Dic 2018
Max 1
C
Apache Cordova problema con php
  • cistoverosi
  • 7 Nov 2018
  • Programmazione
Risposte
1
Visite
2K
Programmazione 22 Nov 2018
LinuxOhYeah
L
T
PHP+MYSQL: problema con quelle maledette lettere accentate...
  • theseo
  • 29 Ott 2018
  • PHP
Risposte
5
Visite
2K
PHP 1 Nov 2018
theseo
T
F
[PHP] Problema con array multidimensionale
  • Francesco Iacomino
  • 27 Set 2018
  • PHP
Risposte
4
Visite
2K
PHP 27 Set 2018
Francesco Iacomino
F
F
Problema con pagine login in PHP
  • francesco84_
  • 1 Set 2018
  • PHP
Risposte
2
Visite
2K
PHP 1 Set 2018
francesco84_
F
A
[PHP] Problema invio mail con funzione mail()
  • Alex@1983
  • 17 Ago 2018
  • PHP
Risposte
3
Visite
5K
PHP 24 Ago 2018
borgo italia
Condividi:
Facebook X (Twitter) LinkedIn WhatsApp e-mail Condividi Link
  • Home
  • Forum
  • Fare Web
  • PHP
  • Italiano
  • Termini e condizioni d'uso del sito
  • Policy Privacy
  • Aiuto
  • Home
Community platform by XenForo® © 2010-2024 XenForo Ltd. | Traduzione a cura di XenForo Italia
Menu
Accedi

Registrati

  • Home
  • Forum
    • Nuovi Messaggi
    • Cerca...
  • Novità
    • Featured content
    • Nuovi Messaggi
    • Ultime Attività
X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?

X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?