PHP include error

Discussion in 'Installation/Configuration' started by PsiTrax, Feb 15, 2006.

  1. PsiTrax

    PsiTrax New Member

    Hi,
    ive a fresh install of ISPconf and if i klick any menubutton i get

    PHP:
    Warningmain(/go_info.inc.php) [function.main]: failed to open streamNo such file or directory in /home/admispconfig/ispconfig/lib/session.inc.php on line 220

    Warning
    main() [function.include]: Failed opening '/go_info.inc.php' for inclusion (include_path='.:/root/ispconfig/php/lib/php'in /home/admispconfig/ispconfig/lib/session.inc.php on line 220

    Warning
    main(/web//lib/module.inc.php) [function.main]: failed to open stream: No such file or directory in /home/admispconfig/ispconfig/lib/session.inc.php on line 241

    Warningmain() [function.include]: Failed opening '/web//lib/module.inc.php' for inclusion (include_path='.:/root/ispconfig/php/lib/php'in /home/admispconfig/ispconfig/lib/session.inc.php on line 241
    ive installed it after the debian 3.1 howto and everything worked fine - no errors anywhere

    does anyone have any idea?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    Code:
    ls -la /home/admispconfig/ispconfig/lib
     
  3. PsiTrax

    PsiTrax New Member

    here it is

    Code:
    psiroot:~# ls -la /home/admispconfig/ispconfig/lib
    insgesamt 76
    drwxr-xr-x  6 admispconfig admispconfig  4096 2006-02-15 19:32 .
    drwxr-xr-x  8 admispconfig admispconfig  4096 2006-02-15 18:17 ..
    -rwxr-xr-x  1 admispconfig admispconfig  6275 2006-02-15 18:17 app.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig  1768 2006-02-15 18:17 banner.inc.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-02-15 18:17 classes
    -rw-------  1 admispconfig admispconfig  5785 2006-02-15 18:17 config.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig   354 2006-02-15 18:17 copyright.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig  7438 2006-02-15 18:17 go_info.inc.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-02-15 18:17 help
    -rwxr-xr-x  1 admispconfig admispconfig   324 2006-02-15 18:17 index.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-02-15 18:17 lang
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-02-15 18:17 plugins
    -rwxr-xr-x  1 admispconfig admispconfig     5 2006-02-15 18:17 preload.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig 12045 2006-02-15 19:37 session.inc.php
    
    it seems that the vars with the path are empty "/go_info.inc.php"
     
    Last edited: Feb 15, 2006
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you post your /home/admispconfig/ispconfig/lib/config.inc.php here? (But make sure to remove your MySQL login details! ;) )
     
  5. PsiTrax

    PsiTrax New Member

    shure, here it comes :)

    Code:
    <?
    /*
    Copyright (c) 2005, projektfarm Gmbh, Till Brehm, Falko Timme
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:
    
        * Redistributions of source code must retain the above copyright notice,
          this list of conditions and the following disclaimer.
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        * Neither the name of ISPConfig nor the names of its contributors
          may be used to endorse or promote products derived from this software without
          specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    // Register Globals emulieren, falls notwendig
    if(get_cfg_var('register_globals') != 'On') {
    
        foreach($HTTP_GET_VARS as $getkey => $getval) {
            $$getkey = $getval;
        }
        unset($getkey);
        unset($getval);
    
        foreach($HTTP_POST_VARS as $postkey => $postval) {
            $$postkey = $postval;
        }
        unset($postkey);
        unset($postval);
    
        foreach($HTTP_COOKIE_VARS as $cookiekey => $cookieval) {
            $$cookiekey = $cookieval;
        }
        unset($cookiekey);
        unset($cookieval);
    }
    
    $go_info = array();
    
    $s = $HTTP_GET_VARS["s"];
    if(isset($HTTP_POST_VARS["s"])) $s = $HTTP_POST_VARS["s"];
    $s = addslashes($s);
    $session = "s=$s";
    $set_header = 1;
    @session_start();
    
    /**********************************************
    * System Settings
    **********************************************/
    
    $go_info["server"]["dir_trenner"] = "/";
    $go_info["server"]["server_root"] = "/home/admispconfig/ispconfig";
    $go_info["server"]["server_url"] = "https://ssl.psitrax.de:81";
    $go_info["server"]["include_root"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."lib";
    $go_info["server"]["classes_root"] = $go_info["server"]["include_root"] . $go_info["server"]["dir_trenner"] ."classes";
    $go_info["server"]["temp_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."temp";
    $go_info["server"]["files_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."files";
    $go_info["server"]["backup_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."backup";
    $go_info["server"]["version"] = "2.1.2";
    $go_info["server"]["os"] = "linux";
    $go_info["server"]["ort"] = "local";
    $go_info["server"]["banner"] = "0";
    $go_info["server"]["db_host"] = "localhost";
    $go_info["server"]["db_name"] = "ispconf";
    $go_info["server"]["db_user"] = "root";
    $go_info["server"]["db_password"] = "";
    $go_info["server"]["db_type"] = "mysql";
    $go_info["server"]["mail_server"] = "";
    $go_info["server"]["mail_user"] = "";
    $go_info["server"]["mail_password"] = "";
    $go_info["server"]["smtp_server"] = "localhost";
    $go_info["server"]["mode"] = "";
    $go_info["server"]["lang"] = "de";
    
    $go_info["server"]["postfix_config"] = 1; // 1 = SENDMAIL-STYLE, 2 = POSTFIX-STYLE
    $go_info["server"]["smtp_restart"] = 1; // 1 = stop/start, 2 = restart
    $go_info["server"]["network_config"] = 0; // 0 = none, 1 = automatic
    
    /**********************************************
    * Tools Settings
    **********************************************/
    
    $go_info["tools"]["zip"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."tools".$go_info["server"]["dir_trenner"]."zip".$go_info["server"]["dir_trenner"]."zip"; // nicht gzip !!
    $go_info["tools"]["unzip"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."tools".$go_info["server"]["dir_trenner"]."unzip".$go_info["server"]["dir_trenner"]."unzip";
    $go_info["tools"]["imagemagick"]["mogrify"] = "mogrify.exe";
    
    /**********************************************
    * Themes Settings
    **********************************************/
    
    // Themes Section
    $go_info["theme"]["sitename"] = "ISPConfig";
    $go_info["theme"]["page"]["box_color"] = "E4E4E4"; // z.B. E4E4E4 , angaben ohne #
    $go_info["theme"]["page"]["nav_color"] = "E0E0E0"; // z.B. 025CCA , angaben ohne #
    // Die Logo-Datei muss im Verzeichnis /home/admispconfig/ispconfig/web/design/default liegen!
    $go_info["theme"]["page"]["logo"] = ""; // z.B. meinlogo.gif
    
    /**********************************************
    * Logging
    **********************************************/
    
    $go_info["server"]["log_level"] = 0; // 0 = Debug, 1 = Info, 2 = Warning, 3 = Failure
    $go_info["server"]["log_file"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."ispconfig.log"; // Logdatei
    if(is_file("/home/admispconfig/ispconfig/adminmail.txt")){
      $go_info["server"]["log_mail"] = trim(shell_exec("cat /home/admispconfig/ispconfig/adminmail.txt")); // Log Emailadresse
    } else {
      $go_info["server"]["log_mail"] = "root@localhost";
    }
    $go_info["server"]["log_device"] = "FILE"; // FILE, SYSTEM, MAIL
    
    /**********************************************
    * Demo Mode Settings
    **********************************************/
    
    $go_info["demo"]["web_path"] = "";
    

    hours later ... and it wouldn run :(

    The Config is saved in the session in the DB(sessions)
    Code:
    a:8:{s:6:"server";a:30:{s:11:"dir_trenner";s:1:"/";s:11:"server_root";s:28:"/home/admispconfig/ispconfig";s:10:"server_url";s:19:"http://localhost:81";s:12:"include_root";s:32:"/home/admispconfig/ispconfig/lib";s:12:"classes_root";s:40:"/home/admispconfig/ispconfig/lib/classes";s:8:"temp_dir";s:33:"/home/admispconfig/ispconfig/temp";s:9:"files_dir";s:34:"/home/admispconfig/ispconfig/files";s:10:"backup_dir";s:35:"/home/admispconfig/ispconfig/backup";s:7:"version";s:5:"2.1.2";s:2:"os";s:5:"linux";s:3:"ort";s:5:"local";s:6:"banner";s:1:"0";s:7:"db_host";s:9:"localhost";s:7:"db_name";s:7:"ispconf";s:7:"db_user";s:4:"root";s:11:"db_password";s:0:"";s:7:"db_type";s:5:"mysql";s:11:"mail_server";s:0:"";s:9:"mail_user";s:0:"";s:13:"mail_password";s:0:"";s:11:"smtp_server";s:9:"localhost";s:4:"mode";s:0:"";s:4:"lang";s:2:"de";s:14:"postfix_config";i:1;s:12:"smtp_restart";i:1;s:14:"network_config";i:0;s:9:"log_level";i:0;s:8:"log_file";s:42:"/home/admispconfig/ispconfig/ispconfig.log";s:8:"log_mail";s:14:"root@localhost";s:10:"log_device";s:4:"FILE";}s:5:"tools";a:3:{s:3:"zip";s:42:"/home/admispconfig/ispconfig/tools/zip/zip";s:5:"unzip";s:46:"/home/admispconfig/ispconfig/tools/unzip/unzip";s:11:"imagemagick";a:1:{s:7:"mogrify";s:11:"mogrify.exe";}}s:5:"theme";a:8:{s:8:"sitename";s:9:"ISPConfig";s:4:"page";a:4:{s:9:"box_color";s:6:"E4E4E4";s:9:"nav_color";s:6:"E0E0E0";s:4:"logo";s:0:"";s:8:"bg_color";s:6:"FFFFFF";}s:5:"title";s:4:"blau";s:4:"path";s:14:"design/default";s:10:"style_path";s:19:"design/blau_100x100";s:5:"width";s:4:"100%";s:5:"modus";s:4:"full";s:7:"buttons";s:7:"default";}s:4:"demo";a:1:{s:8:"web_path";s:0:"";}s:4:"user";a:14:{s:6:"userid";s:1:"1";s:8:"username";s:5:"admin";s:11:"private_dir";s:0:"";s:9:"firstname";s:0:"";s:8:"lastname";s:0:"";s:6:"groups";s:0:"";s:6:"status";s:2:"ok";s:5:"perms";s:3:"rwa";s:8:"language";s:2:"en";s:5:"email";s:18:"[email protected]";s:10:"email_home";s:0:"";s:11:"mail_server";s:0:"";s:9:"mail_user";s:0:"";s:13:"mail_password";s:0:"";}s:5:"group";a:7:{s:7:"groupid";s:0:"";s:5:"perms";s:0:"";s:6:"status";s:0:"";s:5:"title";s:0:"";s:7:"members";s:0:"";s:11:"description";s:0:"";s:9:"group_dir";s:0:"";}s:7:"session";a:8:{s:2:"id";s:32:"011ae6870c273e15602896fb684191f3";s:8:"approved";b:1;s:4:"site";s:9:"ISPConfig";s:6:"domain";s:12:"ispconfig.de";s:13:"screen_height";i:100;s:12:"screen_width";i:100;s:7:"timeout";i:1800;s:7:"modules";a:7:{i:0;a:4:{s:4:"name";s:3:"sys";s:5:"title";s:14:"Administration";s:4:"path";s:5:"admin";s:4:"type";s:1:"p";}i:1;a:4:{s:4:"name";s:3:"isp";s:5:"title";s:11:"ISP Manager";s:4:"path";s:11:"isp_manager";s:4:"type";s:1:"p";}i:2;a:4:{s:4:"name";s:3:"dns";s:5:"title";s:11:"DNS Manager";s:4:"path";s:7:"isp_dns";s:4:"type";s:1:"p";}i:3;a:4:{s:4:"name";s:8:"isp_file";s:5:"title";s:7:"Web-FTP";s:4:"path";s:8:"isp_file";s:4:"type";s:1:"p";}i:4;a:4:{s:4:"name";s:8:"isp_fakt";s:5:"title";s:11:"ISP Faktura";s:4:"path";s:8:"isp_fakt";s:4:"type";s:1:"p";}i:5;a:4:{s:4:"name";s:5:"tools";s:5:"title";s:5:"Tools";s:4:"path";s:5:"tools";s:4:"type";s:1:"p";}i:6;a:4:{s:4:"name";s:4:"help";s:5:"title";s:5:"Hilfe";s:4:"path";s:4:"help";s:4:"type";s:1:"p";}}}s:5:"modul";a:8:{s:4:"name";s:3:"isp";s:5:"title";s:11:"ISP Manager";s:4:"path";s:11:"isp_manager";s:10:"table_name";s:3:"isp";s:11:"include_dir";s:32:"/home/admispconfig/ispconfig/lib";s:12:"template_dir";N;s:10:"item_order";s:1:"1";s:4:"news";s:1:"1";}}
    
    in lib/session.inc.php
    PHP:
    /**********************************************************/
    /* Füllen des info arrays, wenn neue Session              */
    /**********************************************************/

    if($go_info["session"]["id"] == "")
    {
    require(
    $go_info["server"]["include_root"] . $go_info["server"]["dir_trenner"] ."go_info.inc.php");
    $go_api->session->save();
    }
    the $go_info array seems empty
     
    Last edited: Feb 16, 2006
  6. PsiTrax

    PsiTrax New Member

    now ive tried out the latest svn version - the same .... :mad:

    fresh debian 3.1 install with no errors
    ispconf setup with no errors
    why does it work??? ive finished with my knowlage
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    And you are shure vthat you dont edit anything manually in the ISPConfig php.ini? I installed ISPConfig a few days back on DEBIAN 3.1 and everything was working. Did you follow one of the perfect setup howtos?
     
  8. PsiTrax

    PsiTrax New Member

    yes i did :(
    im perplex
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Did you change something in /home/admispconfig/ispconfig/lib/session.inc.php?
     
  10. PsiTrax

    PsiTrax New Member

    no i didnt :\
    a fresh clean install without any changes

    the only thing that was not done as described in the howto,
    i compiled a new 2.6er kernel and mysql 5, php 5.1.2 but ISPconf comes with its own apache so it could be a problem right?

    and sorry for my bad english ^^
     
  11. falko

    falko Super Moderator Howtoforge Staff

    It doesn't matter how you compile your main Apache. The Apache coming with ISPConfig is running on port 81 and therefore totally independent from your main Apache - it serves just the ISPConfig web interface.
     
  12. PsiTrax

    PsiTrax New Member

    i know ...

    but now im knowing a little bit more :rolleyes:
    the bug is anywhere in serializing the go_info array

    In the SessionTbl the datas ends with:
    Code:
    ...k";s:11:"doubleField";s:12:"W
    but s:12 stands for String with 12 Chars
    thiswhile the unserialisation fails and the $go_info array is empty

    but i dont know why the serialisation fails :confused:
     
  13. PsiTrax

    PsiTrax New Member

    Haaaa i got it!

    It was caused by different Character Sets php<->mysql
    MySQL cuts the Serialized string at special chars ("Währung")

    Ive added in the ispconfig_db_mysql.lib.php
    PHP:
    mysql_query("SET character_set_client = 'latin1'");
    mysql_query("SET character_set_results = latin1");
    mysql_query("SET character_set_connection = utf8");
    after the mysql_connect to tell mysqld the right character sets and now ... its running like a charm :cool:
     
  14. danf.1979

    danf.1979 Member

    I'm having the same issue here. I changed mysql to utf-8 from latin1, and now ispconfig is quite dead. I checked some of the tables, and there are some strange characters in them. What should I do? I messed it up badly I guess...
     
  15. danf.1979

    danf.1979 Member

    I'm getting this 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
    
    I tried uploading an sql dump I had from yesterday, and the strange characters are gone... but still ispconfig is dead.

    EDIT: Is utf-8 not supported?
     
    Last edited: Mar 30, 2006
  16. PsiTrax

    PsiTrax New Member

    how do you import the sql dump?
    with phpmyadmin or with mysql cmdline tool?

    if you use the cmdline tool you have to set the character set to latin1.

    and remember, if you set the values in my.cnf - the root account of mysqld DON'T use it cause he have the "super" flag.
     
  17. danf.1979

    danf.1979 Member

    I imported it from SQL option in phpmyadmin. It's working now. I added the lines you proposed in the constructor:

    Code:
                    // constructor
    
                    function db_mysql()
    
                    {
    
    
    
                            global $go_info;
    
                            $this->dbHost = $go_info["server"]["db_host"];
    
                            $this->dbName = $go_info["server"]["db_name"];
    
                            $this->dbUser = $go_info["server"]["db_user"];
    
                            $this->dbPass = $go_info["server"]["db_password"];
    
                            $this->connect();
    			mysql_query("SET character_set_client = 'latin1'");
    			mysql_query("SET character_set_results = latin1");
    			mysql_query("SET character_set_connection = utf8"); 
                    }
    
    It works ok...
     
  18. nenad

    nenad Member

    same issue here:
    (after changing character set to utf-8; strange enough it was not happening on FedoraCore4, it's happening on Debian Sarge, probably because older version of MySql used in default instalation of Debian Sarge)

    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

    @PsiTrax

    Where did you exactly added those lines?
    In
    /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php

    or

    /root/ispconfig/scripts/lib/classes/ispconfig_db_mysql.lib.php

    and exactly where in ispconfig_db_mysql.lib.php file?
     
  19. nenad

    nenad Member

    I changed in both files and it works now.

    I really think that "Pefect Debian Install" should include mysql 4.1 (as many programs needs various character set encoding) as well as this hack to enable different character set encoding
     
  20. dimitar

    dimitar New Member

    same probleme here

    i have the same problem on 1 of my older servers running on debian sarge. Just for the record - the workaround described above doesnt work for me!

    Regards
     

Share This Page