Erreur xajax_server.php(2531)

Post Reply
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Erreur xajax_server.php(2531)

Post by guillaume.guerin »

Je rencontre une erreur sur l'ajout d'une ressource par exemple :

Code: Select all

Error: the XML response that was returned from the server is invalid.
Received:
<br />
<b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function modifRessource(), 0 passed in /var/www/html/includes/xajax.inc on line 994 and exactly 1 expected in /var/www/html/www/process/xajax_server.php:2357
Stack trace:
#0 /var/www/html/includes/xajax.inc(994): modifRessource()
#1 /var/www/html/includes/xajax.inc(652): xajax->_callFunction('modifRessource', Array)
#2 /var/www/html/www/process/xajax_server.php(2531): xajax->processRequests()
#3 {main}
  thrown in <b>/var/www/html/www/process/xajax_server.php</b> on line <b>2357</b><br />

You have whitespace in your response.
J'ai un VPS OVH sur Docker version 1.11.2, build b9f10c9
J'utilise une image docker personnalisée avec php7 et apache pour faire fonctionner soplanning.Je pense qu'il y a soit un bug soit un prérequis manquant. J'ai mis ci dessous comment le reproduire (qui pourra servir de tuto une fois que ce sera résolu ou maitrisé):

Code: Select all

docker run -ti --name soplanning-mysql -e MYSQL_ROOT_PASSWORD=XXXXX-d mysql
docker run -ti --name soplanning-phpmyadmin --link soplanning-mysql:db -p 6002:80 -d phpmyadmin/phpmyadmin
docker run -ti --name soplanning-app --link soplanning-mysql:db -p 6001:80 -v /data/soplanning:/var/www/html -d alterway/php:7.1-apach
Je rentre dans mon conteneur car il manque un certains nombres de prérequis

Code: Select all

docker exec -i -t soplanning-app /bin/bash
J'installe quelques outils

Code: Select all

apt-get update && apt-get install -y software-properties-common zip unzip cron nano
Je télécharge la dernière version de SoPlanning

Code: Select all

curl https://freefr.dl.sourceforge.net/project/soplanning/soplanning/v1.41/soplanning-1-41.zip -o soplanning.zip
Je dézippe

Code: Select all

unzip soplanning.zip -d /var/www/html
Je déplace les fichiers pour les mettre à la racine du dossier html

Code: Select all

mv /var/www/html/soplanning/* /var/www/html/
J'ajoute des extension prérequises

Code: Select all

docker-php-ext-install mysqli 
docker-php-ext-install gd
apachectl restart
je modifie la chaine de connexion à la base de données

Code: Select all

<?php

// Database Parameters
$cfgHostname = 'db';
$cfgDatabase = 'soplanning';
$cfgUsername = 'root';
$cfgPassword = 'XXXXX';
$cfgSqlType = 'mysql';
$cfgPrefix = 'planning_';
?>
Merci de vos retours
soplanning
Site Admin
Posts: 388
Joined: 31 Aug 2017, 15:58

Re: Erreur xajax_server.php(2531)

Post by soplanning »

Bonjour
c'est très étrange, impossible de reproduire le pb.
De quand date votre téléchargement de soplanning ?
Pouvez-vous le telecharger à nouveau pour en avoir le coeur net ?
nous avons fait quelques corrections, il se peut que ça règle le souci.
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Re: Erreur xajax_server.php(2531)

Post by guillaume.guerin »

J'ai téléchargé la version hier en version 1.41
soplanning
Site Admin
Posts: 388
Joined: 31 Aug 2017, 15:58

Re: Erreur xajax_server.php(2531)

Post by soplanning »

il semble que votre install soit plus "exigeante" au niveau du code.
Dans le fichier /soplanning/www/process/xajax_server.php
ligne 2339, mettez ceci : function modifRessource($ressource_id = '') {

Si ça corrige votre problème, nous le publierons dans la prochaine version.
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Re: Erreur xajax_server.php(2531)

Post by guillaume.guerin »

Problème corrigé.
Merci pour la réactivité
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Re: Erreur xajax_server.php(2531)

Post by guillaume.guerin »

une erreur similaire apparait aussi sur la création d'équipe

Code: Select all

Error: the XML response that was returned from the server is invalid.
Received:
<br />
<b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function modifUserGroupe(), 0 passed in /var/www/html/includes/xajax.inc on line 994 and exactly 1 expected in /var/www/html/www/process/xajax_server.php:1988
Stack trace:
#0 /var/www/html/includes/xajax.inc(994): modifUserGroupe()
#1 /var/www/html/includes/xajax.inc(652): xajax->_callFunction('modifUserGroupe', Array)
#2 /var/www/html/www/process/xajax_server.php(2531): xajax->processRequests()
#3 {main}
  thrown in <b>/var/www/html/www/process/xajax_server.php</b> on line <b>1988</b><br />
soplanning
Site Admin
Posts: 388
Joined: 31 Aug 2017, 15:58

Re: Erreur xajax_server.php(2531)

Post by soplanning »

Ligne 1970 : function modifUserGroupe($user_groupe_id= '') {
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Re: Erreur xajax_server.php(2531)

Post by guillaume.guerin »

Code: Select all

Error: the XML response that was returned from the server is invalid.
Received:
<br />
<b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function modifProjet(), 1 passed in /var/www/html/includes/xajax.inc on line 994 and exactly 2 expected in /var/www/html/www/process/xajax_server.php:82
Stack trace:
#0 /var/www/html/includes/xajax.inc(994): modifProjet('ArretVax_3')
#1 /var/www/html/includes/xajax.inc(652): xajax->_callFunction('modifProjet', Array)
#2 /var/www/html/www/process/xajax_server.php(2531): xajax->processRequests()
#3 {main}
  thrown in <b>/var/www/html/www/process/xajax_server.php</b> on line <b>82</b><br />

You have whitespace in your response.
guillaume.guerin
Posts: 18
Joined: 03 Feb 2018, 10:43

Re: Erreur xajax_server.php(2531)

Post by guillaume.guerin »

Code: Select all

Error: the XML response that was returned from the server is invalid.
Received:
<br />
<b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function Periode::updateOcurrences(), 0 passed in /var/www/html/www/process/xajax_server.php on line 1897 and exactly 1 expected in /var/www/html/includes/class_periode.inc:430
Stack trace:
#0 /var/www/html/www/process/xajax_server.php(1897): Periode->updateOcurrences()
#1 /var/www/html/includes/xajax.inc(994): supprimerPeriode('24', 'false', 'true')
#2 /var/www/html/includes/xajax.inc(652): xajax->_callFunction('supprimerPeriod...', Array)
#3 /var/www/html/www/process/xajax_server.php(2531): xajax->processRequests()
#4 {main}
  thrown in <b>/var/www/html/includes/class_periode.inc</b> on line <b>430</b><br />

You have whitespace in your response.
User avatar
bluespirit79
Posts: 27
Joined: 08 Oct 2017, 21:04

Re: Erreur xajax_server.php(2531)

Post by bluespirit79 »

Les joies du php 7.x :)
L'ensemble est corrigé dans la prochaine version.
Post Reply