I’m trying to run some php scripts in shell. part of the script needs the dom constructor:
$dom = new DOMDocument();
this works from a browser standpoint but when running in shell you get the error:
Warning: domdocument() expects at least 1 parameter, 0 given in
reading the php documentation they use arguments so following the example provided on the documentation:
$dom = new DOMDocument(‘1.0’, ‘UTF-8’);
gives me a new error.
Warning: domdocument() expects parameter 2 to be long, string given
which makes no sense since the documentation clearly states the second one is a string.
further research says that it is a conflict between php4 and php5 being installed at the same time. since dreamhost manages all those installs and i havent done any custom install of php, is there any way to rectify this problem?