views:

21

answers:

1

Hi everyone,

i want to load the content of different html-files (all on the same server/in the same directory) for further processing. For this i want to use the loadHTMLfile method, but it seems i'm not able to create a DOMDocument object on the external Server.

Testcode:

<?php
if(!class_exists('DOMDocument')){
echo 'No DOM! ';
}
if(class_exists('DOMDocument')){
echo "DOM! ";
}
echo "test1 ";
$doc = new DOMDocument();
echo "test2 ";
?>

Output on local MAMP:

DOM! test1 test2

Output with script on external server:

DOM! test1

libxml seems to be installed on the external server (checked via phpinfo), server runs php 5.2.12, MAMP has php 5.2.13.

Any ideas what i'm doing wrong or where else i could look for solutions?

tia!

reiber

p.s. i'm a total php-newbie, so don't be hard on me :)

+1  A: 

Check your PHP error log (it'll be either logging into the web server's error log, or a seperate file), and/or enable display_errors in your .ini file or via ini_set. You can get the log's location with phpinfo() (web-based) or php -i (command line).

There should be more details in the log or via the displayed errors as to what's causing the script to die.

Marc B
Hey, thanks for the reply! i'll check the logfiles and post what i've accomplished...
reiber