View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Error: "Impossible to load class id" - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

Error: "Impossible to load class id"

More
05 Nov 2019 10:04 - 05 Nov 2019 10:20 #1 by numand
Hi,
As a local non-government organization, I am trying to evaluate how ProjeQtOr will meet our expectations. I installed ProjeQtOr version 8.2.3 to our server which runs Ubuntu 16.04.6 LTS as follows;

1. Install required packages:
sudo apt install nginx php-fpm php-mysql php7.0-gd php7.0-imap php7.0-mbstring php7.0-mysql php7.0-xml php7.0-zip mariadb-server mariadb-client
2. Configure MariaDB:
sudo mysql_secure_installation
3. Create DB user and db:
sudo mysqladmin create projeqtor
sudo mysql --user=root --password --batch --silent --execute="create user 'projeci'@'localhost' identified by 'something';"
sudo mysql --user=root --password --batch --silent --execute="grant all privileges on \`projeqtor\`.* to 'projeci'@'localhost';"
sudo mysqladmin flush-privileges
4. Configure php.ini
/etc/php/7.0/fpm/php.ini:max_input_vars = 4000
/etc/php/7.0/fpm/pool.d/www.conf:;request_terminate_timeout = 0
/etc/php/7.0/fpm/php.ini~:max_execution_time = 30
/etc/php/7.0/fpm/php.ini:memory_limit = 512M
/etc/php/7.0/fpm/php.ini:file_uploads = On
5. Configure nginx:
# Default server configuration
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name _;
        set $base /var/www;
        root $base/projeqtor;
        index index.php;
        error_log /var/www/log/projeqtor/error.log;
        access_log /var/www/log/projeqtor/access.log;
     
        location / {
                try_files $uri $uri/ index.php?$query_string;
        }

       location ~ \.php$ {
               # 404
               try_files $fastcgi_script_name =404;

               # default fastcgi_params
               include fastcgi_params;

               # fastcgi settings
               fastcgi_pass                    unix:/var/run/php/php7.0-fpm.sock;
               fastcgi_index                   index.php;
               fastcgi_buffers                 8 16k;
               fastcgi_buffer_size             32k;

               # fastcgi params
               fastcgi_param DOCUMENT_ROOT             $realpath_root;
               fastcgi_param SCRIPT_FILENAME   $realpath_root$fastcgi_script_name;
               fastcgi_param PHP_ADMIN_VALUE   "open_basedir=$base/:/usr/lib/php/:/tmp/";

        }

        # general settings
        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        # robots.txt
                location = /robots.txt {
                log_not_found off;
                access_log off;
        }

        # assets, media
                 location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
                 expires 7d;
                 access_log off;
        }

        # svg, fonts
                location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
                add_header Access-Control-Allow-Origin "*";
                expires 7d;
                access_log off;
        }

        # gzip
        gzip on;
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;

}

server {
        listen 80;
        listen [::]:80;
        server_name *._;
        return 301 http://IP$request_uri;
}
6. Make server root directory, change ownership and extract zip file:
sudo mkdir -p /var/www/log/projector
sudo touch /var/www/log/projeqtor/{access,error}.log
unzip projeqtorV8.2.3.zip -d /var/www/
sudo chown www-data:www-data -R /var/www/projeqtor
sudo chown www-data:www-data -R /var/www/log/projeqtor
7. Restart services and run installation
systemctl restart mysql.service
systemctl restart php7.0-fpm.service
systemctl restart nginx.service

After all these prerequisite steps, I start installation by typing localhost to web browser. I changed default DB user as "projeci" and default DB user password to "something". Installation went flawless but when I try to login as user "admin" with password "admin", it throws an error:
ERROR: An exception occurred at 11:09:22 on 2019-11-05.

When I inspected to problem, I found these lines in ..projeqtor/files/logs/projeqtor_20191105.log:
2019-11-05 11:09:15.589 ***** ERROR ***** [] EXCEPTION *****
2019-11-05 11:09:15.589 ***** ERROR ***** [] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (3059)
2019-11-05 11:09:15.589 ***** ERROR ***** [] cause = Class 'id' not found
2019-11-05 11:09:15.589 ***** ERROR ***** []    => #0 /var/www/projeqtor/model/persistence/SqlElement.php (3029) -> getDependantSqlElement()
2019-11-05 11:09:15.589 ***** ERROR ***** []    => #1 /var/www/projeqtor/model/persistence/SqlElement.php (674) -> getSqlElement()
2019-11-05 11:09:15.590 ***** ERROR ***** []    => #2 /var/www/projeqtor/model/Parameter.php (28) -> __construct()
2019-11-05 11:09:15.590 ***** ERROR ***** []    => #3 /var/www/projeqtor/model/Parameter.php (1171) -> __construct()
2019-11-05 11:09:15.590 ***** ERROR ***** []    => #4 /var/www/projeqtor/model/SSO.php (25) -> getGlobalParameter()
2019-11-05 11:09:15.590 ***** ERROR ***** []    => #5 /var/www/projeqtor/view/index.php (56) -> isEnabled()
2019-11-05 11:09:22.777 ***** ERROR ***** [] Impossible to load class id<br/>  => Not found in ../model/custom/id.php <br/>  => Not found in ../model/id.php <br/>  => Not found in ../model/persistence/id.php <br/>

And this function from projeqtor/model/persistence/SqlElement.php is where the error occured (the last line is 3059.nth line)
/**
   * ==========================================================================
   * retrieve single object included in an object from the Database
   *
   * @param $objClass the
   *          name of the class of the included object
   * @return an object
   */
  private function getDependantSqlElement($objClass) {
    $curId = $this->id;
    if (! trim ( $curId )) {
      $curId = null;
    }
    $obj = new $objClass ( null, true );
    $obj->refId = $this->id;
    $obj->refType = get_class ( $this );

There is no id.php file in projeqtor directory. So, why it is looking for it? Could you help me to solve this problem?

P.S.: My native language is not English.
Last edit: 05 Nov 2019 10:20 by numand. Reason: I added the function where the error occured

Please Connexion or Create an account to join the conversation.

More
05 Nov 2019 14:42 #2 by babynus
It seems your php configuration is strange.
if (ucfirst ( $key ) == $key)
retruns true for $key='id'
This is not normal, but I don't know how php config may force this behavior.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
29 Nov 2019 06:35 #3 by numand
@babynus, thank you for taking time to answer my question.

After reading your answer (while being offline) for several days ago, I tried to change PHP configuration directives in NGINX virtual host configuration, unfortunately, nothing has changed. I get same error whatever I try. Is there a recommended PHP configuration for ProjeQtOr?

Please Connexion or Create an account to join the conversation.

More
29 Nov 2019 11:46 #4 by numand
Since I could not solve the error, I asked a question on unix.stackexchange[1]. It turns out that the error stem from ProjeQtOr's not being able to handle Turkish locale. I changed server's locale to C.UTF-8 and manage to see login screen:) I am going to open a bug report for this error.

[1] unix.stackexchange.com/questions/554734/...d-class-id-projeqtor

Please Connexion or Create an account to join the conversation.

More
04 Déc 2019 11:37 #5 by babynus
Issue recorded as Ticket #4338

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.045 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.