dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [Bug #819] new install crash


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #819] new install crash
Date: Wed, 17 Apr 2013 17:33:02 +0200

Doliforge
Ce message ne s'affiche pas correctement?
mettez à jour vos préférences utilisateur.

new install crash

Dernières modifications

17/04/2013 17:33 (Europe/Paris)
Changements :
  • Resolution: 
AucunFixed
  • Status: 
Need more infoClosed

Répondre

État

 Détails
Submitted by:  Nicolas LESCURE (solariane) Submitted on:  13/04/2013 15:47
Last Modified On:  17/04/2013 17:25 Dolibarr version:  3.3.1
PHP version:  5.3 Database type and version:  
OS Type/Version:  Debian / Squeeze Category:  Other
Severity:  5 - Major 
Summary:  new install crash
Description:  Doing a source install of dolibarr on a debian server with NGINX as web front, I kept getting a broken page on the second step of the install.

looking at the log I've got :


PHP message: PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class DoliDB._pgsql does not exist' in /var/www/dev/dolibarr/htdocs/core/lib/functions.lib.php:51
Stack trace:
#0 /var/www/dev/dolibarr/htdocs/core/lib/functions.lib.php(51): ReflectionClass->__construct('DoliDB._pgsql')
#1 /var/www/dev/dolibarr/htdocs/install/fileconf.php(311): getStaticMember('DoliDB._pgsql', 'versionmin')
#2 {main}
thrown in /var/www/dev/dolibarr/htdocs/core/lib/functions.lib.php on line 51

I've look neither @the rule of coding / pushing a patch nor @the impact it might have elsewhere => I've done a quick an dirty patch as follow

Old Code -
$classObj = new ReflectionClass($class);
$result = null;

New Code -
$result = null;
try {
$classObj = new ReflectionClass($class);
} catch (Exception $e) {
return $result;
}


Step to reproduce bug:  try a new install :-)
 Etat
Resolution:  Fixed Assigned to:  HENRY Florian (fhenry)
Status:  Closed 

Commentaires

Nicolas LESCURE 17/04/2013 17:25
Understood - Maxima mea culpa.

it's all boil down I was unable to directly fetch dolibarr from the repository and had to first download it to my OS X...and instead of untarring from the command line, I've done it via the Finder => it has populate the folder with "dot + underscore" files, hence the DoliDB._pgsql instead of the DoliDBpgsql


BTW, for anybody who might google on this, to clean the mess, on linux do : cd to_dolibarr_directory && find . -type f -name ".*" -exec rm "{}" \;
HENRY Florian 17/04/2013 17:12
Complete alorithm is
preg_match('/^(.*)\.class\.php$/i',$file,$reg);
$type=$reg[1];
$class='DoliDB'.ucfirst($type);

May be PHP-FPM have another way to interpret regexp or ucfirst, with only file in standard dolibarr (mssql.class.php,mysql.class.php,mysqli.class.php,pgsql.class.php,sqlite.calss.php) you cannot have the calling of getStaticMember function with this value :'DoliDB._pgsql'
HENRY Florian 17/04/2013 17:07
I can't reproduce on my platform. Unbuntu 12.04/mysql or pgsql.
The problem is more here : /var/www/dev/dolibarr/htdocs/install/fileconf.php(311): getStaticMember('DoliDB._pgsql', 'versionmin')
the correct way should be getStaticMember('DoliDBPgsql', 'versionmin');
the 'DoliDBPgsql' sould be constrcut by $class='DoliDB'.ucfirst($type); and $type come from the file name into htdocs/core/db/
So it's really strange you get this error, except if you have renamed files inside this directory.
Nicolas LESCURE 17/04/2013 16:47
at first only MySQL, without driver for pgSQL ( no php5-pgsql module )

then installed php5-pgsql module ( but not the postgreSQL server itself )

in both case it crashed


the patch make it work.


[ a small addition : I'm using PHP-FPM ]
HENRY Florian 17/04/2013 16:39
Could you specified your database engine (Mysql/pgSQL) ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]