Report any technical problems you discover and discuss solutions.

When publishing i get "error" alert

More
10 years 2 weeks ago #3905 by tom
Replied by tom on topic When publishing i get "error" alert
Is dom_import_simplexml disabled? Sometimes that happens, but I can't find if that is the case in debian.

Could you please check whether dom_import_simplexml is disabled in php.ini? (See whther it is listed in 'disable_functions')

Please Log in or Create an account to join the conversation.

  • hvangeffen
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 weeks ago #3906 by hvangeffen
Replied by hvangeffen on topic When publishing i get "error" alert
php.ini:

disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,


phpinfo.php

SimpleXML

Revision $Id: 07fc6546e896094aed794aea4691f0151774d955 $
Schema support enabled


dom

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.9.1
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

Please Log in or Create an account to join the conversation.

  • hvangeffen
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 weeks ago #3907 by hvangeffen
Replied by hvangeffen on topic When publishing i get "error" alert
Tryed the next 2 scripts to test the module.
Code:
<?php $sxe = simplexml_load_string('<books><book><title>blah</title></book></books>'); if ($sxe === false) { echo 'Error while parsing the document'; exit; } $dom_sxe = dom_import_simplexml($sxe); if (!$dom_sxe) { echo 'Error while converting XML'; exit; } $dom = new DOMDocument('1.0'); $dom_sxe = $dom->importNode($dom_sxe, true); $dom_sxe = $dom->appendChild($dom_sxe); echo $dom->saveXML(); ?>
No error meaning it worked. --> No error.
Code:
<?php $dom = new DOMDocument; $dom->loadXML('<books><book><title>blah</title></book></books>'); if (!$dom) { echo 'Error while parsing the document'; exit; } $s = simplexml_import_dom($dom); echo $s->book[0]->title; ?>
echo should be blah and it was! So i think the module is running and working.

Please Log in or Create an account to join the conversation.

More
10 years 2 weeks ago #3908 by tom
Replied by tom on topic When publishing i get "error" alert
Can you please try this one as well (from a browser, not commandline, the php commandline environment is not necessarilly the same as the apache2 php environment on Debian)

File Attachment:

File Name: diagnose.zip
File Size:0 KB
Attachments:

Please Log in or Create an account to join the conversation.

  • hvangeffen
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 weeks ago #3909 by hvangeffen
Replied by hvangeffen on topic When publishing i get "error" alert
output in browser:

simpleXML functions are available.
dom_import_simplexml function is available.

Please Log in or Create an account to join the conversation.

More
10 years 2 weeks ago #3910 by tom
This was a weird one.

I needed to move the definition of ExSimpleXMLElement to the top of upload.php, and everything seems to work now.
The following user(s) said Thank You: diwi, hvangeffen

Please Log in or Create an account to join the conversation.

Moderators: ronmjultenJohnSmith
Time to create page: 0.149 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo