Warning: main(include/config.inc.php): failed to open stream Warning: main(include/config.inc.php): failed to open stream
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Warning: main(include/config.inc.php): failed to open stream

Started by IWasLucid, June 11, 2004, 12:29:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IWasLucid

I get these errors, after I installed:

"Warning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/waslucid/public_html/coppermine/include/init.inc.php on line 127

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='/usr/local/lib/php:/usr/lib/php') in /home/waslucid/public_html/coppermine/include/init.inc.php on line 127"

Any idea what I did wrong?

Joachim Müller

you should have CHMODed the include folder before running the install script as suggested in the documentation that comes with coppermine. The error message means that the config file that holds your mySQL info that was entered during install hasn't been created, because the install script didn't have write access to the include folder.

GauGau

IWasLucid

Hmph,

I re-did everything, and I still encountered the same problem.  :-\\

hyperion

"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)


hyperion

Please post the contents of your config.inc.php file, but be sure to replace the sensitive information with asterisks. I'm insterested in the integrity of the file, not the data itself.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

IWasLucid

<?php
// Coppermine configuration file

// MySQL configuration
$CONFIG['dbserver'] =                         "localhost";        // Your database server
$CONFIG['dbuser'] =                         "**";        // Your mysql username
$CONFIG['dbpass'] =                         "c**";                // Your mysql password
$CONFIG['dbname'] =                         "**";        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                "cpg130_";
?>

omniscientdeveloper

#7
QuoteI get these errors, after I installed:

"Warning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/waslucid/public_html/coppermine/include/init.inc.php on line 127

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='/usr/local/lib/php:/usr/lib/php') in /home/waslucid/public_html/coppermine/include/init.inc.php on line 127"

Any idea what I did wrong?


Line 127?

That should be lines 199 and 200! (of the stable release) Try replacing your init.inc.php file.

If that doesn't work and since you said that everything is CHMODed properly, you can try removing "include/" from "include/config.inc.php" in your init.inc.php file. Which version of PHP are you running?

But something definitely is funky with your init.inc.php file.

-omni

IWasLucid

I re-installed, and am now getting the message with 200.


QuoteWarning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/waslucid/public_html/coppermine/include/init.inc.php on line 200

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='/usr/local/lib/php:/usr/lib/php') in /home/waslucid/public_html/coppermine/include/init.inc.php on line 200
init.inc.php file:

<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.0                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //
// $Id: init.inc.php,v 1.33 2004/06/04 17:16:34 datajack Exp $
// ------------------------------------------------------------------------- //

define('COPPERMINE_VERSION''1.3.0');
// User database integration
// Uncomment the applicable line if you want to use it
// define('UDB_INTEGRATION', 'phpbb');
// define('UDB_INTEGRATION', 'invisionboard');
// define('UDB_INTEGRATION', 'vbulletin23');
// define('UDB_INTEGRATION', 'vbulletin30');
// define('UDB_INTEGRATION', 'yabbse');
// define('UDB_INTEGRATION', 'smf');
// define('UDB_INTEGRATION', 'woltlab21');
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Start output buffering
ob_start();
// Report all errors except E_NOTICE
// This is the default value set in php.ini
// error_reporting (E_ALL ^ E_NOTICE);
error_reporting(E_ALL);

set_magic_quotes_runtime(0);
// used for timing purpose
$query_stats = array();
$queries = array();

// Perform database queries to calculate user's privileges based on group membership
function cpgGetUserData($pri_group$groups$default_group_id 3)
{

        
//Parameters :
        //                $pri_group (scalar) :         Group ID number of the user's 'main' group. This is the group that will be
        //                                                                                        the user's profile display. ($USER_DATA['group_id'])
        //
        //                $groups (array) :                        List of group ids of all the groups that the user is a member of. IF this list
        //                                                                                        does not include the $pri_group, it will be added.
        //
        //                $default_group_id (scalar) :         The group used as a fall-back if no valid group ids are specified.
        //                                                                                                        If this group also does not exist then CPG will abort with a critical
        //                                                                                                        error.
        //
        // Returns an array containing most of the data to put into in $USER_DATA.

        
global $CONFIG;

        foreach (
$groups as $key => $val)
                if (!
is_numeric($val))
                        unset (
$groups[$key]);
        if (!
in_array($pri_group$groups)) array_push($groups$pri_group);

        
$result db_query("SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, " .
                        
"MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, " .
                        
"MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, " .
                        
"MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, " .
                        
"MAX(num_URI_upload) as num_URI_upload, " .
                        
"MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, " .
                        
"MAX(can_create_albums) as can_create_albums, " .
                        
"MAX(has_admin_access) as has_admin_access, " .
                        
"MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval ".
                        
"FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id in (" .  implode(","$groups). ")");

        if (
mysql_num_rows($result)) {
                
$USER_DATA mysql_fetch_assoc($result);
                
$result db_query("SELECT group_name FROM  {$CONFIG['TABLE_USERGROUPS']} WHERE group_id= " $pri_group);
                
$temp_arr mysql_fetch_assoc($result);
                
$USER_DATA["group_name"] = $temp_arr["group_name"];
        } else {
                
$result db_query("SELECT * FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id = $default_group_id");
               if (!
mysql_num_rows($resultt)) die('<b>Coppermine critical error</b>:<br />The group table does not contain the Anonymous group !');
                       
$USER_DATA mysql_fetch_assoc($result);
                }
        
mysql_free_result($result);

        if ( 
$USER_DATA['ufc_max'] == $USER_DATA['ufc_min'] ) {
                
$USER_DATA["upload_form_config"] = $USER_DATA['ufc_min'];
        } elseif (
$USER_DATA['ufc_min'] == 0) {
                
$USER_DATA["upload_form_config"] = $USER_DATA['ufc_max'];
        } elseif (((
$USER_DATA['ufc_max'] == 2) or ($USER_DATA['ufc_max'] == 3)) and ($USER_DATA['ufc_min'] == 1)) {
                
$USER_DATA["upload_form_config"] = 3;
        } elseif ((
$USER_DATA['ufc_max'] == 3) and ($USER_DATA['ufc_min'] == 2)) {
                
$USER_DATA["upload_form_config"] = 3;
        } else {
                
$USER_DATA["upload_form_config"] = 0;
        }
        
$USER_DATA["group_quota"] = ($USER_DATA["disk_min"])?$USER_DATA["disk_max"]:0;

        
$USER_DATA['can_see_all_albums'] = $USER_DATA['has_admin_access'];

        
$USER_DATA["group_id"] = $pri_group;
        
$USER_DATA['groups'] = $groups;

        if (
get_magic_quotes_gpc() == 0)
                        
$USER_DATA['group_name'] = mysql_escape_string($USER_DATA['group_name']);

        return(
$USER_DATA);
}


function 
cpgGetMicroTime()
{
    list(
$usec$sec) = explode(" "microtime());
    return ((float)
$usec + (float)$sec);
}
$time_start cpgGetMicroTime();
// Do some cleanup in GET, POST and cookie data and un-register global vars
$HTML_SUBST = array('"' => '&quot;''<' => '&lt;''>' => '&gt;');
if (
get_magic_quotes_gpc()) {
    if (
is_array($HTTP_POST_VARS)) {
        foreach (
$HTTP_POST_VARS as $key => $value) {
            if (!
is_array($value))
                
$HTTP_POST_VARS[$key] = strtr(stripslashes($value), $HTML_SUBST);
            if (isset($
$key)) unset($$key);
        }
    }

    if (
is_array($HTTP_GET_VARS)) {
        foreach (
$HTTP_GET_VARS as $key => $value) {
            
$HTTP_GET_VARS[$key] = strtr(stripslashes($value), $HTML_SUBST);
            if (isset($
$key)) unset($$key);
        }
    }

    if (
is_array($HTTP_COOKIE_VARS)) {
        foreach (
$HTTP_COOKIE_VARS as $key => $value) {
            if (!
is_array($value))
                
$HTTP_COOKIE_VARS[$key] = stripslashes($value);
            if (isset($
$key)) unset($$key);
        }
    }
} else {
    if (
is_array($HTTP_POST_VARS)) {
        foreach (
$HTTP_POST_VARS as $key => $value) {
            if (!
is_array($value))
                
$HTTP_POST_VARS[$key] = strtr($value$HTML_SUBST);
            if (isset($
$key)) unset($$key);
        }
    }

    if (
is_array($HTTP_GET_VARS)) {
        foreach (
$HTTP_GET_VARS as $key => $value) {
            
$HTTP_GET_VARS[$key] = strtr($value$HTML_SUBST);
            if (isset($
$key)) unset($$key);
        }
    }

    if (
is_array($HTTP_COOKIE_VARS)) {
        foreach (
$HTTP_COOKIE_VARS as $key => $value) {
            if (isset($
$key)) unset($$key);
        }
    }
}
// Initialise the $CONFIG array and some other variables
$CONFIG = array();
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
$REFERER urlencode($PHP_SELF . (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING'] ? '?' $HTTP_SERVER_VARS['QUERY_STRING'] : ''));
$ALBUM_SET '';
$FORBIDDEN_SET '';
$CURRENT_CAT_NAME '';
$CAT_LIST '';
// Record User's IP address
$raw_ip stripslashes($HTTP_SERVER_VARS['REMOTE_ADDR']);

if (isset(
$HTTP_SERVER_VARS['HTTP_CLIENT_IP'])) {
    
$hdr_ip stripslashes($HTTP_SERVER_VARS['HTTP_CLIENT_IP']);
} else {
    if (isset(
$HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'])) {
        
$hdr_ip stripslashes($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']);
    } else {
        
$hdr_ip $raw_ip;
    }
}
// Define some constants
define('USER_GAL_CAT'1);
define('FIRST_USER_CAT'10000);
define('RANDPOS_MAX_PIC'200);
define('TEMPLATE_FILE''template.html');
// Constants used by the cpg_die function
define('INFORMATION'1);
define('ERROR'2);
define('CRITICAL_ERROR'3);

// Include config and functions files
if(file_exists('include/config.inc.php')){
  require 
'include/config.inc.php';
} else {
  
// error handling: if the config file doesn't exist go to install
  
print <<< EOT
<html>
    <head>
      <title>Coppermine not installed yet</title>
      <meta http-equiv="refresh" content="100;url=install.php">
      <style type="text/css">
      <!--
      body { font-size: 12px; background: #FFFFFF; margin: 20%; color: black; font-family: verdana, arial, helvetica, sans-serif;}
      -->
      </style>
    </head>
    <body>
      <img src="images/coppermine_logo.png" alt="Coppermine Photo Gallery - Your Online Photo Gallery" /><br />
      Coppermine Photo Gallery seems not to be installed correctly, or you're running coppermine for the first time. You'll be redirected to the installer. If your browser doesn't support redirect, click <a href="install.php">here</a>.
    </body>
</html>
EOT;
  die();
}
require 
'include/functions.inc.php';

$CONFIG['TABLE_PICTURES']        = $CONFIG['TABLE_PREFIX']."pictures";
$CONFIG['TABLE_ALBUMS']                = $CONFIG['TABLE_PREFIX']."albums";
$CONFIG['TABLE_COMMENTS']        = $CONFIG['TABLE_PREFIX']."comments";
$CONFIG['TABLE_CATEGORIES']        = $CONFIG['TABLE_PREFIX']."categories";
$CONFIG['TABLE_CONFIG']                = $CONFIG['TABLE_PREFIX']."config";
$CONFIG['TABLE_USERGROUPS']        = $CONFIG['TABLE_PREFIX']."usergroups";
$CONFIG['TABLE_VOTES']                = $CONFIG['TABLE_PREFIX']."votes";
$CONFIG['TABLE_USERS']                = $CONFIG['TABLE_PREFIX']."users";
$CONFIG['TABLE_BANNED']                = $CONFIG['TABLE_PREFIX']."banned";
$CONFIG['TABLE_EXIF']                = $CONFIG['TABLE_PREFIX']."exif";
$CONFIG['TABLE_FILETYPES']          = $CONFIG['TABLE_PREFIX']."filetypes";
$CONFIG['TABLE_ECARDS']          = $CONFIG['TABLE_PREFIX']."ecards";
$CONFIG['TABLE_TEMPDATA']        = $CONFIG['TABLE_PREFIX']."temp_data";

// User DB system
if (defined('UDB_INTEGRATION')) require 'bridge/' UDB_INTEGRATION '.inc.php';
// Connect to database
cpg_db_connect() || die("<b>Coppermine critical error</b>:<br />Unable to connect to database !<br /><br />MySQL said: <b>" mysql_error() . "</b>");
// Retrieve DB stored configuration
$results db_query("SELECT * FROM {$CONFIG['TABLE_CONFIG']}");
while (
$row mysql_fetch_array($results)) {
    
$CONFIG[$row['name']] = $row['value'];
// while
mysql_free_result($results);

require 
'include/media.functions.inc.php';

// Parse cookie stored user profile
user_get_profile();
// Authenticate
if (defined('UDB_INTEGRATION')) {
    
udb_authenticate();
} else {
    if (!isset(
$HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_uid']) || !isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_pass'])) {
        
$cookie_uid 0;
        
$cookie_pass '*';
    } else {
        
$cookie_uid = (int)$HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_uid'];
        
$cookie_pass substr(addslashes($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_pass']), 032);
    }

    
$sql "SELECT * " "FROM {$CONFIG['TABLE_USERS']} WHERE user_id='$cookie_uid'" "AND user_active = 'YES' " "AND user_password != '' " "AND BINARY MD5(user_password) = '$cookie_pass'";
    
$results db_query($sql);

    if (
mysql_num_rows($results)) {
        
$USER_DATA mysql_fetch_assoc($results);
        
//unset($USER_DATA['user_password']);
        
$USER_DATA['user_password'] = '********';

                
$USER_DATA $USER_DATA cpgGetUserData($USER_DATA['user_group'], explode(','$USER_DATA['user_group_list']));

        
define('USER_ID', (int)$USER_DATA['user_id']);
        
define('USER_NAME'$USER_DATA['user_name']);
        
define('USER_GROUP'$USER_DATA['group_name']);
        
define('USER_GROUP_SET''(' implode(','$USER_DATA['groups']) . ')');
        
define('USER_IS_ADMIN', (int)$USER_DATA['has_admin_access']);
        
define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']);
        
define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']);
        
define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']);
        
define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']);
        
define('USER_CAN_CREATE_ALBUMS', (int)$USER_DATA['can_create_albums']);
        
define('USER_UPLOAD_FORM', (int)$USER_DATA['upload_form_config']);
        
define('CUSTOMIZE_UPLOAD_FORM', (int)$USER_DATA['custom_user_upload']);
        
define('NUM_FILE_BOXES', (int)$USER_DATA['num_file_upload']);
        
define('NUM_URI_BOXES', (int)$USER_DATA['num_URI_upload']);
        
mysql_free_result($results);
    } else {
        
$USER_DATA cpgGetUserData(3, array(3));
        
define('USER_ID'0);
        
define('USER_NAME''Anonymous');
        
define('USER_GROUP'$USER_DATA['group_name']);
        
define('USER_GROUP_SET''(' $USER_DATA['group_id'] . ')');
        
define('USER_IS_ADMIN'0);
        
define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']);
        
define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']);
        
define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']);
        
define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']);
        
define('USER_CAN_CREATE_ALBUMS'0);
        
define('USER_UPLOAD_FORM', (int)$USER_DATA['upload_form_config']);
        
define('CUSTOMIZE_UPLOAD_FORM', (int)$USER_DATA['custom_user_upload']);
        
define('NUM_FILE_BOXES', (int)$USER_DATA['num_file_upload']);
        
define('NUM_URI_BOXES', (int)$USER_DATA['num_URI_upload']);
        
mysql_free_result($results);
    }
}
// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
define('GALLERY_ADMIN_MODE'USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE'USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);
// Set error logging level
if ($CONFIG['debug_notice']==&& ($CONFIG['debug_mode']==|| ($CONFIG['debug_mode']==&& GALLERY_ADMIN_MODE ))) {
    
error_reporting (E_ALL);
} else {
    
error_reporting (E_ALL E_NOTICE);
}


// Process theme selection if present in URI or in user profile
if (!empty($HTTP_GET_VARS['theme'])) {
    
$USER['theme'] = $HTTP_GET_VARS['theme'];
}
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' $USER['theme'])) {
    
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`''____________');
} else {
    unset(
$USER['theme']);
}

if (!
file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'default';
require 
"themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR "themes/{$CONFIG['theme']}/";
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if (!empty($HTTP_GET_VARS['lang'])) {
    
$USER['lang'] = $HTTP_GET_VARS['lang'];
}

if (isset(
$USER['lang']) && !strstr($USER['lang'], '/') && file_exists('lang/' $USER['lang'] . '.php')) {
    
$CONFIG['default_lang'] = $CONFIG['lang'];          // Save default language
    
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>|`''____________');
} elseif (
$CONFIG['charset'] == 'utf-8') {
    include(
'include/select_lang.inc.php');
    if (
file_exists('lang/' $USER['lang'] . '.php')) {
        
$CONFIG['default_lang'] = $CONFIG['lang'];      // Save default language
        
$CONFIG['lang'] = $USER['lang'];
    }
} else {
    unset(
$USER['lang']);
}

if (!
file_exists("lang/{$CONFIG['lang']}.php")) $CONFIG['lang'] = 'english';
require 
"lang/{$CONFIG['lang']}.php";
// See if the fav cookie is set else set it
if (isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_fav'])) {
    
$FAVPICS = @unserialize(@base64_decode($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_fav']));
} else {
    
$FAVPICS = array();
}
// load the main template
load_template();
// Remove expired bans
$now time();
db_query("DELETE FROM {$CONFIG['TABLE_BANNED']} WHERE expiry < $now");
// Check if the user is banned
$user_id USER_ID;
$result db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id=$user_id");
if (
mysql_num_rows($result)) {
    
pageheader($lang_error);
    
msg_box($lang_info$lang_errors['banned']);
    
pagefooter();
    exit;
}
mysql_free_result($result);
// Retrieve the "private" album set
if (!GALLERY_ADMIN_MODE && $CONFIG['allow_private_albums']) get_private_album_set();

if (!
USER_IS_ADMIN && $CONFIG['offline'] && !strstr($_SERVER["SCRIPT_NAME"],'login')) {
pageheader($lang_errors['offline_title']);
msg_box($lang_errors['offline_title'], $lang_errors['offline_text']);
pagefooter();
exit;
}


?>

Joachim Müller

posting init.inc.php is irrelevant in this case, as the error says that: while it was running init.inc.php (which, since it has been running, must be there), it wasn't able to find inculde/config.inc.php.
The said file is being created during install and holds the connection data for mySQL. It can only be created if the include folder is writable for the script during install. It appears this was not the case, so you'll just have to CHMOD your include folder (and while you're at it, don't forget to CHMOD the albums folder as well, or you'll run into similar problems later). While you're connected with FTP, take a look if the file config.inc.php exists in the include folder (probably not); look for a file called install.lock as well.
If both don't exist, run the installer again.

GauGau

P.S. For details on CHMOD, refer to the documentation that comes with coppermine

Scay

I'm having the exact same problem. I've used the cvs versions without problems. Have been on holiday and when I came home I this kind of problem (can't really recall) but I suspected it to beacuse of various server-problems. So I removed that version (including directories and database) and made a fresh install. I've CHMOD'ed everything, the install works fine (database is created correctly and the two files are created as well). But when I start coppermine it says:

Warning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/tokbra4/public_html/galleri/include/init.inc.php on line 200

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='/usr/local/lib/php:/usr/lib/php') in /home/tokbra4/public_html/galleri/include/init.inc.php on line 200

Could this be because of a problem server-side? (Forgot to mention, this is a fresh install of the latest 1.3.1 version, nothing modified, and I've tried removing the "include", but that causes an even stranger error)

Joachim Müller


Scay

Sure: www.tokbra.se/galleri/ <put what you want to check>

This is another FRESH install... Did it just an hour ago. Database was removed and recreated.

(Hey, I was just about to modify the link when I saw you had already done so ;)

Joachim Müller

your server seems to be configured "exotically" ;)
Is http://www.tokbra.se/galleri/include/config.inc.php actually there and is it readable for the script?
Also, edit your php.ini file and fix the include path.

GauGau

Scay

config.inc.php is there (I've checked and double-checked). I can't really tell if it's readable by the script, it has the same permissions as the rest of the files. I've also noticed that even phpinfo.php won't work. I'm gonna check to see whether I can find a php.ini file or not.

Scay

As far as I can see I haven't got any file called php.ini. This must be a host problem, just tell me what should be fixed in it and I will gladly send them an e-mail to fix this. It's seems they had some problems with their servers a couple of weeks ago (during my holiday).

Just an additional note: I have phpBB 2 installed and working properly, haven't had any problems with it, the address is: www.tokbra.se/forum/ if you want to check it out.

tickle

Hi,

I got version 1.3.1 yesterday and had the same problem as you guys are having.  The error does say what the problem is.

It says it cannot find the file because it is looking for your include folder (specified in the php info file) i.e. mine was pointing to my public html folder, but obviously where the include folder was located in my copper directory. Changing where init.inc.php locates the include files will not help as the install writes to this folder.

I solved this by installing coppermine into my publichtml folder i.e. so that the include folder was in my root. This means that on installation the config is written to the correct location and now everything works fine.

I could have changed my default include directory on the php setup my my provider is uncontactable at the moment.

Hope this helps.   ps.  If you want to have coppermine in a different directory, you could try editing the init.inc.php BEFORE you upload it. i.e. changing the include from ../include   to the full path i.e. for me it would be include ('http://tom.drumandbass.ru/clubpictures/copper/include')

Hope this helps i couldn't find a solution anywhere.

Tom

Joachim Müller

Thanks for posting your solution, but for most users who experience this problem you solution won't help, as the include path variable in php.ini could point anywhere, it's pure coincidence that it was pointing to you webroot.

My recommendation to all who experience similar problems: check your include path by creating a phpinfo file (a file that is named phpinfo.php and has this content: <?php phpinfo(); ?>, upload it to your webserver and run it in your browser). If it's set and you're sure the file that php tries to include is there on your server, contact your webhost and ask them to fix this for you. They have to, as most php scripts use include or require - if you're actually paying for webhosting. If you're not paying for webhosting, or you have a bad webhost (one that can't be contacted :-\\), you could try what tickle suggested and hard-code the include.

GauGau