You are here:  » MagicParser and PHP

Support Forum



MagicParser and PHP

Submitted by CHRISworks on Mon, 2006-05-01 13:40 in

Hi!

I bought today MagicParser and

I have a little problem:

I would like to run on my domains PHP 5.1.2 instead of 4.4.1 (I can switch between the versions).

It works fine with PHP 4.4.1
http://smartlineserver.com/ressourcen/test/temp.php

but no way with PHP 5.1.2
http://smartline.biz/php.temp

Is something wrong with my php.ini or is MagicParser not yet compatible with PHP 5.1.2?

Thank you for your help!

Submitted by support on Tue, 2006-05-02 08:16

Hi Chris,

Apologies for any inconvenience. The script should work across all versions of PHP but I will re-test against 5.1.2.

In the mean time;

Are you getting a specific error message?

Does MagicParser_getErrorMessage() return anything?

Thanks,
David.

Submitted by CHRISworks on Tue, 2006-05-02 21:06

Hi David!

I get no error message.

I can see the complete static part of the website but I don't see anything from the parsed txt-file.

with PHP 4.4.1: http://www.wetter.smartlineserver.com/wetter_en.php

and with 5.1.2: http://www.wetter.smartline.biz/wetter_en.php

(Same server and same Apache configuration)

Here is a link to the parsed textfile: http://www.wetter.smartline.biz/wttsinfonet.txt

Here is the code from the PHP file:

<?php
 
// MagicParser
  
require("MagicParser.php");
  function 
myRecordHandler($WETTER)
  {
  global 
$WEAT_DATE;
  global 
$WEAT_TODAY_D;
  global 
$WEAT_TODAY_I;
  global 
$WEAT_TODAY_E;
  
// ecc.
  
$WEAT_DATE $WETTER["WEAT_DATE"];
  
$WEAT_TODAY_D $WETTER["WEAT_TODAY_D"];
  
$WEAT_TODAY_I $WETTER["WEAT_TODAY_I"];
  
$WEAT_TODAY_E $WETTER["WEAT_TODAY_E"];
  
// ecc.
  
}
  
MagicParser_parse("http://wetter.smartline.biz/wttsinfonet.txt","myRecordHandler","xml|WETTER/");
?>

I place the results on the different places in the page with:

<?php
 
print $WEAT_TODAY_E
?>

Informations about the server config see in my first comment.

Thanks

Chris