Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.

TOPIC:

When publishing i get "error" alert 8 years 3 months ago #3905

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1275
  • Thank you received: 320
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 Connexion or Create an account to join the conversation.

When publishing i get "error" alert 8 years 3 months ago #3906

  • hvangeffen
  • hvangeffen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
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 Connexion or Create an account to join the conversation.

When publishing i get "error" alert 8 years 3 months ago #3907

  • hvangeffen
  • hvangeffen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Tryed the next 2 scripts to test the module.
<?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.
<?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 Connexion or Create an account to join the conversation.

When publishing i get "error" alert 8 years 3 months ago #3908

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1275
  • Thank you received: 320
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 Connexion or Create an account to join the conversation.

When publishing i get "error" alert 8 years 3 months ago #3909

  • hvangeffen
  • hvangeffen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
output in browser:

simpleXML functions are available.
dom_import_simplexml function is available.

Please Connexion or Create an account to join the conversation.

[SOLVED] When publishing i get "error" alert 8 years 3 months ago #3910

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1275
  • Thank you received: 320
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 Connexion or Create an account to join the conversation.

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

Search