Problème d\'encodage à l\'installation

Recoupe toutes les discussions à propos de Noalyss
Répondre
ripat
Messages : 60
Enregistré le : mar. nov. 14, 2017 10:35 pm

Problème d\'encodage à l\'installation

Message par ripat » mar. nov. 14, 2017 10:35 pm

Bonjour,

J\'essaye d\'installer phpcompta sur un nouveau serveur. Nouveaux problèmes:

Vesrion: phpcompta-4.2-build-2311
postgresql: 8.1
OS: linux debian

Tuto suivi: http://doc.ubuntu-fr.org/phpcompta

Message su setup.php:

Code : Tout sélectionner

Info
Vous utilisez le domaine
Php setting
magic_quotes_gpc: Ok
magic_quotes_runtime: Ok
include_path : ok (.:../../include:../include:addon)

php.ini est bien configuré
Database version
string(6) \"8.1.15\"

...

# Patching (BE) Basique from the version 50 to 51
# Patching (BE) Basique from the version 51 to 52
# Patching (BE) Basique from the version 52 to 53
# Patching (BE) Basique from the version 53 to 54
# Patching (BE) Basique from the version 54 to 55
begin;
create or replace function fiche_attribut_synchro (p_fd_id fiche_def.fd_id%TYPE) returns void as
found a function$BODY$
declare
-- this sql gives the f_id and the missing attribute (ad_id)
list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id);
rec record;
-- value of the last insert
jnt jnt_fic_att_value%ROWTYPE;
begin
open list_missing;
loop

fetch list_missing into rec;
IF NOT FOUND then
exit;
end if;
-- insert a value into jnt_fic_att_value
insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt;

-- now we insert into attr_value
insert into attr_value values (jnt.jft_id,\'\');
end loop;
close list_missing;
end;
$BODY$ language plpgsql;

Fatal error: Uncaught exception \'Exception\' with message \' SQL ERROR create or replace function fiche_attribut_synchro (p_fd_id fiche_def.fd_id%TYPE) returns void as $BODY$ declare -- this sql gives the f_id and the missing attribute (ad_id) list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); rec record; -- value of the last insert jnt jnt_fic_att_value%ROWTYPE; begin open list_missing; loop fetch list_missing into rec; IF NOT FOUND then exit; end if; -- insert a value into jnt_fic_att_value insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt; -- now we insert into attr_value insert into attr_value values (jnt.jft_id,\'\'); end loop; close list_missing; end; $BODY$ language plpgsql; \' in /home/web/phpcompta/include/postgres.php:143 Stack trace: #0 /home/web/phpcom in /home/web/phpcompta/include/postgres.php on line 143

Dany
Messages : 2181
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par Dany » mar. nov. 14, 2017 10:35 pm

Je pense que c\'est du à postgresql 8.1 (c\'est assez vieux en fait).

8.1 n\'aime pas ceci

Code : Tout sélectionner

insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt;

http://www.postgresql.org/docs/8.1/inte ... nsert.html
et
http://www.postgresql.org/docs/8.2/inte ... nsert.html

Remplace dans phpcompta/html/admin/sql/patch le fichier upgrade54.sql par celui en attach (dans le zip) ;)



@+

.D. [file name=upgrade54_new.zip size=706]http://www.phpcompta.be/images/fbfiles/ ... 54_new.zip[/file]

Dany
Messages : 2181
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par Dany » mar. nov. 14, 2017 10:35 pm


ripat
Messages : 60
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par ripat » mar. nov. 14, 2017 10:35 pm

Dany,

Pour PG 8-1, je n\'ai pas trop le choix. C\'est la version la plus récente dispo en stable sous Debian. Je pourrais peut-être négocier pour installer un binaire plus récent mais c\'est pas gagné.


J\'ai appliqué le nouveau patch 54 et j\'ai cette erreur maintenant:

Code : Tout sélectionner

# Patching (BE) Basique from the version 54 to 55
begin;
create or replace function fiche_attribut_synchro (p_fd_id fiche_def.fd_id%TYPE) returns void as
found a function$BODY$
declare
-- this sql gives the f_id and the missing attribute (ad_id)
list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id);
rec record;
begin
open list_missing;
loop

fetch list_missing into rec;
IF NOT FOUND then
exit;
end if;
-- insert a value into jnt_fic_att_value
insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) ;

-- now we insert into attr_value
insert into attr_value values (rec.f_id,\'\');
end loop;
close list_missing;
end;
$BODY$ language plpgsql;

create or replace function attribute_correct_order () returns void as
found a function$BODY$
declare
crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id;
rec record;
begin
open crs_correct;
loop
fetch crs_correct into rec;
if NOT FOUND then
close crs_correct;
return;
end if;
update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id;
end loop;
close crs_correct;
perform attribute_correct_order ();
end;
$BODY$ language plpgsql;

select fiche_attribut_synchro(fd_id) from fiche_def;

Fatal error: Uncaught exception \'Exception\' with message \' SQL ERROR select fiche_attribut_synchro(fd_id) from fiche_def \' in /home/web/phpcompta/include/postgres.php:143 Stack trace: #0 /home/web/phpcompta/include/postgres.php(576): ExecSql(Resource id #23, \'?select fiche_a...\') #1 /home/web/phpcompta/include/postgres.php(607): execute_script(Resource id #23, \'sql/patch/upgra...\') #2 /home/web/phpcompta/html/admin/setup.php(380): apply_patch(Resource id #23, \'(BE) Basique\') #3 {main} thrown in /home/web/phpcompta/include/postgres.php on line 143

Dany
Messages : 2181
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par Dany » mar. nov. 14, 2017 10:35 pm

Je ne pourrais pas réparer ça avant lundi : j\'ai besoin d\'installer une 8.1 pour tester, désolé. Sinon Ubuntu-server 8.04, c\'est bien :)

Dany
Messages : 2181
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par Dany » mar. nov. 14, 2017 10:35 pm

De toute façon, si le patch n\'a pas pu s\'appliquer tous de ce patch a été annulé, il n\'y aura pas de conséquence

Dany
Messages : 2181
Enregistré le : mar. nov. 14, 2017 10:35 pm

Re:Problème d\'encodage à l\'installation

Message par Dany » mar. nov. 14, 2017 10:35 pm

Après réflexion: la version 4.3 va sortir d\'ici une semaine (ou deux) on est en phase de test et documentation.

Je pense qu\'il est préférable soit de voir pour un hébergement, et ce genre de problème serait notre problème, soit d\'upgrader vers 8.2 minimum( 2006), si possible passer à 8.3




@+

D.

Répondre