[Solved] PHP Include errors in latest ISPConfig 2.2.24

Discussion in 'Developers' Forum' started by FractalizeR, Aug 25, 2008.

  1. FractalizeR

    FractalizeR New Member

    Having successfully installed ISPConfig, I opened it's web interface, logged in and after that, if I navigated to either page, I got a bunch of include errors:

    Code:
    Warning: include(/go_info.inc.php) [function.include]: failed to open stream: No such file or directory in /home/admispconfig/ispconfig/lib/session.inc.php on line 220
    
    Warning: include() [function.include]: Failed opening '/go_info.inc.php' for inclusion (include_path='.:') in /home/admispconfig/ispconfig/lib/session.inc.php on line 220
    
    Warning: include(/web//lib/module.inc.php) [function.include]: failed to open stream: No such file or directory in /home/admispconfig/ispconfig/lib/session.inc.php on line 241
    
    Warning: include() [function.include]: Failed opening '/web//lib/module.inc.php' for inclusion (include_path='.:') in /home/admispconfig/ispconfig/lib/session.inc.php on line 241
    It looks completely like this two-year-old problem.

    I attempted to resolve a problem using the same solution:
    In both files
    • /root/ispconfig/scripts/lib/classes/ispconfig_db_mysql.lib.php
    • /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php
    to the end of the method function db_mysql() right after $this->connect() call before closing curly brace you need to add the following lines:

    PHP:
    mysql_query("SET character_set_client = 'latin1'");
    mysql_query("SET character_set_results = latin1");
    mysql_query("SET character_set_connection = utf8"); 
    And this resolves the problem.

    My server is running latest CentOS 5.2 with latest MySQL 5.0.67. In MySQL default character set for tables is utf8. Default collation is utf8_general_ci. All character sets are included in server and supported. Server is fresh (just installed everything under VMWare). Apache + MySQL + PHP are built from sources.

    I think this fix should be incorporated into source code, because such problem will happen on. BTW, why isn't it included in source already? I guess it will affect anyone with non-utf8 connection charset provided...
     
  2. FractalizeR

    FractalizeR New Member

    I will test tonigh if this problem is related to this one
     
  3. FractalizeR

    FractalizeR New Member

    I tested. Both errors has the same reason: MySQL default charset is not latin1.

    To install and use ISPConfig currently one has to have MySQL default charset set to latin1. Otherwise, installation will be corrupted.
    No need to patch anything
     

Share This Page