ID:               35416
 User updated by:  pehewa at a1 dot net
 Reported By:      pehewa at a1 dot net
-Status:           Feedback
+Status:           Closed
 Bug Type:         DOM XML related
 Operating System: Windows (W2K, XP)
 PHP Version:      4.4.1
 New Comment:

Thank you. I have tried your proposal - and it is running. So I have
written a workaround for this problem - using the same code for Windows
and Linux with Apache:

function docpath () {  
   // Get some information about the server software
  $software = $_SERVER['SERVER_SOFTWARE'];
  $win = strpos ($software, "Win32");
  
  // Decides, running on a Windows system or not
  if ( $win > 0 ) {
    // Adds the absolute path
    $filename = $_SERVER['SCRIPT_FILENAME'];
    $pos = strrpos($filename, "/") + 1;
    $filepath = substr( $filename, 0, $pos );
  } else {
    $filepath = "";
  }
  return ($filepath);
}


Previous Comments:
------------------------------------------------------------------------

[2005-11-27 19:25:10] [EMAIL PROTECTED]

What if you try to use absolute path for nav.xml?

------------------------------------------------------------------------

[2005-11-27 19:17:05] pehewa at a1 dot net

Sorry for making this essential mistake in my first bugreport. The line
code should be:

$navdoc = domxml_open_file("nav.xml");

------------------------------------------------------------------------

[2005-11-27 18:46:41] [EMAIL PROTECTED]

$navdoc = domxml_open_file("nav_xml");
"nav_xml" looks obviously wrong, as the file is called "nav.xml".

------------------------------------------------------------------------

[2005-11-27 01:37:27] pehewa at a1 dot net

Description:
------------
System: Windows W2K or XP with Apache 2.0.54

My PHP-program exists for one year minimum without changes and runs at
a provider (Version 4.4.1 - not under Windows) without errors.

A valid XML-file "nav.xml" should be read.

The error messages are after execution are:

Warning: domxml_open_file(): I/O in C:\pathtophpfile on line x
Warning: domxml_open_file(): warning in C:\pathtophpfile on line x
Warning: domxml_open_file(): failed to load external entity "nav.xml"
in C:\pathtophpfile on line x

php.ini changes:
precision = 14
output_buffering = 4096
allow_call_time_pass_reference = Off
log_errors = On
error_log = C:\php_error.log
variables_order = "GPCS"
register_argc_argv = Off
magic_quotes_gpc = Off
extension_dir = "./extensions"
extension=php_domxml.dll
extension=php_xslt.dll
dbx.colnames_case = "lowercase"
session.gc_divisor = 1000
session.bug_compat_42 = 0
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"


Loaded Modules out of the phpinfo():
core mod_win32 mpm_winnt http_core mod_so mod_access mod_actions
mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dav mod_dir
mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime
mod_negotiation mod_setenvif mod_userdir mod_dav_svn mod_authz_svn
sapi_apache2

Reproduce code:
---------------
$navdoc = domxml_open_file("nav_xml");

File nav.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<navigation>
<items>
<item parent="00">
<change>15.10.2005</change>
</item>
</items>
</navigation>

Expected result:
----------------
Getting the correct result (XML-Document Object) as on other Systems
with PHP 4.4.1 or on Windows-Systems with PHP 4.3.2.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35416&edit=1

Reply via email to