Current time: 11-27-2024, 03:40 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[gelöst] Cannot open the ispcp.conf config file !
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #11
RE: Cannot open the ispcp.conf config file !
@morpheus:
wenn man so den Code in gui/include/ispcp-config.php liest, dann wird klar: die Fehlermeldung bedeutet nicht einfach, dass kein Zugriff besteht, es kann auch ein Fehler beim Lsen/interpretieren der Datei auftauchen.

Kannst du mal den Inhalt der Datei posten (Passwörter u.a. ggf. unkenntlich machen).

Gruss Joximu
09-26-2007 08:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
morpheus Offline
Junior Member
*

Posts: 36
Joined: Sep 2007
Reputation: 0
Post: #12
RE: Cannot open the ispcp.conf config file !
ah nein ich idi, sorry hab eben nochmal nachgeschaut war nur die 2b, sorry
und wo würde ich das 3er finden ?

/edit
Quote:<?php

$cfg_obj = new Config("/etc/ispcp/ispcp.conf");

if ($cfg_obj->status == "err") {

/* cannot open ispcp.conf file - we must show warning */

print "<center><b><font color=red>Cannot open the ispcp.conf config file !<br><br>Please contact your system administrator</font></b></center>";
die();
}
$cfg = $cfg_obj->getValues();
class Config {
/*
his class will parse config file and get all variables avaible in PHP
v. 0.1
*/
var $config_file; /* config filename */
var $cfg_values; /* array with options and values that you can get and user Tongue Smile */
var $status;
function Config($cfg = "/etc/ispcp/ispcp.conf"){
$this -> config_file = $cfg;
$this -> status = "ok";
if ($this->parseFile() == FALSE) {
$this->status = "err";
return FALSE;
}
else {
return TRUE;
}
}
function parseFile(){
/* open file ... parse it and put it in $cfg_values */
@@$fd = fopen($this->config_file,'r');
if ($fd == FALSE) {
/* ooops error */
$this->status = "err";
return FALSE;
}
while(!feof($fd)){
$buffer = fgets($fd,4096);
/* remove spaces */
$buffer = ltrim($buffer);
if (strlen($buffer) < 3) {
/* empty */
}
else if ($buffer[0] == '#' || $buffer[0] == ';') {
/* this is comment */
}
else if (strpos($buffer,'=') === false) {
/* have no = Sad */
}
else {
$pair = explode('=',$buffer,2);
$pair[0] = ltrim($pair[0]);
$pair[0] = rtrim($pair[0]);
$pair[1] = ltrim($pair[1]);
$pair[1] = rtrim($pair[1]);
/* ok we have it Smile */
$this->cfg_values[$pair[0]]=$pair[1];
}
}
fclose($fd);
return TRUE;
}
function getValues(){
return $this->cfg_values;
}
}
function decrypt_db_password ($db_pass) {
global $ispcp_db_pass_key, $ispcp_db_pass_iv;
if ($db_pass == '') return '';
if (extension_loaded('mcrypt')) {
$text = @base64_decode("$db_pass\n");
/* Open the cipher */
$td = @mcrypt_module_open ('blowfish', '', 'cbc', '');
/* Create key */
$key = $ispcp_db_pass_key;
/* Create the IV and determine the keysize length */
$iv = $ispcp_db_pass_iv;
/* Intialize encryption */
@mcrypt_generic_init ($td, $key, $iv);
/* Decrypt encrypted string */
$decrypted = @mdecrypt_generic ($td, $text);
@mcrypt_module_close ($td);
/* Show string */
return trim($decrypted);
} else {
system_message("ERROR: The php-extension 'mcrypt' not loaded !");
die();
}
}
?>

Habe ein paar leer zeilen entfernt und konnte nichts finden was ich verbergen müsste
(This post was last modified: 09-26-2007 08:13 AM by morpheus.)
09-26-2007 08:02 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #13
RE: Cannot open the ispcp.conf config file !
rc3 sollte Ende April rausgekommen sein - ich weiss auch nicht, wo sie ist...

ok, das war sarkastisch - wir sind etwas dem Zeitplan hinterher...
09-26-2007 08:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
morpheus Offline
Junior Member
*

Posts: 36
Joined: Sep 2007
Reputation: 0
Post: #14
RE: Cannot open the ispcp.conf config file !
so habe nun das aktuelle R2c installiert, leider noch immer die gleiche meldung =( ich muss dazu sagen das vorher ISPConfig installiert war aber das war mir zu buggy und habe es wieder sauber entfernt.
hm was mach ich nun ?
09-27-2007 06:52 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #15
RE: Cannot open the ispcp.conf config file !
morpheus Wrote:so habe nun das aktuelle R2c installiert, leider noch immer die gleiche meldung =( ich muss dazu sagen das vorher ISPConfig installiert war aber das war mir zu buggy und habe es wieder sauber entfernt.
hm was mach ich nun ?

kannst du mal die ispcp.conf posten - ohne passwörter...
ich meinte eigentlich die /etc/ispcp/ispcp.conf...

Joximu
09-27-2007 07:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
morpheus Offline
Junior Member
*

Posts: 36
Joined: Sep 2007
Reputation: 0
Post: #16
RE: Cannot open the ispcp.conf config file !
soo dann hier meine ispcp.conf:
Code:
#
# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (c) 2006-2007 by isp Control Panel
# http://isp-control.net
#

#
# Misc config variables
#

BuildDate = 20070418

Version = 1.0.0 RC2 OMEGA

VersionH = 1.0 Priamos

DEFAULT_ADMIN_ADDRESS = admin@domain.de

SERVER_HOSTNAME = debianroot.domain.de

BASE_SERVER_IP = 81.9x.x.xxx

BASE_SERVER_VHOST = admin.debianroot.domain.de

MR_LOCK_FILE = /tmp/ispcp.lock

#
# File system variables
#

CMD_AWK = /usr/bin/awk

CMD_BZIP = /bin/bzip2

CMD_CHOWN = /bin/chown

CMD_CAT = /bin/cat

CMD_CP = /bin/cp

CMD_DIFF = /usr/bin/diff

CMD_DU = /usr/bin/du

CMD_ECHO = /bin/echo

CMD_HOSTNAME = /bin/hostname

CMD_IFCONFIG = /sbin/ifconfig

CMD_IPTABLES = /sbin/iptables

CMD_GREP = /bin/grep

CMD_GROUPADD = /usr/sbin/groupadd

CMD_GROUPDEL = /usr/sbin/groupdel

CMD_LN = /bin/ln

CMD_MYSQL = /usr/bin/mysql

CMD_MV = /bin/mv

CMD_PS = /bin/ps

CMD_RM = /bin/rm

CMD_TAR = /bin/tar

CMD_USERADD = /usr/sbin/useradd

CMD_USERDEL = /usr/sbin/userdel

CMD_WC = /usr/bin/wc

PEAR_DIR = /usr/share/php

#
# SQL backend variables
#

DATABASE_TYPE = mysql

DATABASE_HOST = localhost

DATABASE_NAME = ispcp

DATABASE_PASSWORD = PASS

DATABASE_USER = root

DATABASE_DIR = /var/lib/mysql

#
# Main variables
#

CONF_DIR = /etc/ispcp

LOG_DIR = /var/log/ispcp

PHP_STARTER_DIR = /var/www/fcgi

ROOT_DIR = /var/www/ispcp

GUI_ROOT_DIR = /var/www/ispcp/gui

APACHE_WWW_DIR = /var/www/virtual

#
# PHP FastCGI data
#

PHP4_FASTCGI_BIN = /usr/bin/php4-cgi

PHP5_FASTCGI_BIN = /usr/bin/php5-cgi

#
# ProFTPd data
#

FTPD_CONF_FILE = /etc/proftpd/proftpd.conf

#
# BIND data
#

BIND_CONF_FILE = /etc/bind/named.conf

BIND_DB_DIR = /var/cache/bind

SECONDARY_DNS =

#
# AWSTATS data
#
# Either no or path to the awstats configs dir (mostly: /etc/awstats)
AWSTATS_DIR = no

AWSTSTS_ROOT_DIR = /var/www/ispcp/engine/awstats

AWSTATS_WEB_DIR = /var/www/awstats

#
# APACHE data
#


APACHE_NAME = apache2

APACHE_RESTART_TRY = 3

APACHE_CONF_DIR = /etc/apache2

APACHE_CMD = /usr/sbin/apache2

APACHE_LOG_DIR = /var/log/apache2

APACHE_BACKUP_LOG_DIR = /var/log/apache2/backup

APACHE_USERS_LOG_DIR = /var/log/apache2/users

APACHE_MODS_DIR = /etc/apache2/mods-available

APACHE_SITES_DIR = /etc/apache2/sites-available

APACHE_SUEXEC_USER_PREF = vu

APACHE_SUEXEC_MIN_GID = 2000

APACHE_SUEXEC_MIN_UID = 2000

APACHE_USER = www-data

APACHE_GROUP = www-data

#
# Postfix MTA Data
#

POSTFIX_CONF_FILE = /etc/postfix/main.cf

POSTFIX_MASTER_CONF_FILE = /etc/postfix/master.cf

MTA_LOCAL_MAIL_DIR = /var/mail

MTA_VIRTUAL_MAIL_DIR = /var/mail/virtual

MTA_LOCAL_ALIAS_HASH = /etc/aliases

MTA_VIRTUAL_CONF_DIR = /etc/postfix/ispcp

MTA_VIRTUAL_ALIAS_HASH = /etc/postfix/ispcp/aliases

MTA_VIRTUAL_DMN_HASH = /etc/postfix/ispcp/domains

MTA_VIRTUAL_MAILBOX_HASH = /etc/postfix/ispcp/mailboxes

MTA_TRANSPORT_HASH = /etc/postfix/ispcp/transport

MTA_SENDER_ACCESS_HASH = /etc/postfix/ispcp/sender-access

MTA_MAILBOX_MIN_UID = 10020

MTA_MAILBOX_UID = 10020

MTA_MAILBOX_UID_NAME = vmail

MTA_MAILBOX_GID = 8

MTA_MAILBOX_GID_NAME = mail

MTA_SASLDB_LOCAL_DOMAIN = isp-control.net

MTA_SASLDB_FILE = /var/spool/postfix/etc/sasldb2

ETC_SASLDB_FILE = /etc/sasldb2

CMD_SASLDB_LISTUSERS2 = /usr/sbin/sasldblistusers2

CMD_SASLDB_PASSWD2 = /usr/sbin/saslpasswd2

CMD_POSTMAP = /usr/sbin/postmap

CMD_NEWALIASES = /usr/bin/newaliases

#
# Courier IMAP/POP3 data
#

COURIER_CONF_DIR = /etc/courier

AUTHLIB_CONF_DIR = /etc/courier

CMD_MAKEUSERDB = /usr/sbin/makeuserdb

#
# Crontab delayed tasks
#

BACKUP_HOUR = 23

BACKUP_MINUTE = 40

BACKUP_ROOT_DIR = /var/www/ispcp/engine/backup

CMD_CRONTAB = /usr/bin/crontab

#
# Service manager
#

# Either no or path to the amavis-daemon (mostly: /etc/init.d/amavis)
CMD_AMAVIS = no

CMD_AUTHD = /etc/init.d/courier-authdaemon

CMD_FTPD = /etc/init.d/proftpd

CMD_HTTPD = /usr/sbin/apache2ctl

CMD_IMAP = /etc/init.d/courier-imap

CMD_IMAP_SSL = /etc/init.d/courier-imap-ssl

CMD_MTA = /etc/init.d/postfix

CMD_NAMED = /etc/init.d/bind9

CMD_POP = /etc/init.d/courier-pop

CMD_POP_SSL = /etc/init.d/courier-pop-ssl

CMD_ISPCPD = /etc/init.d/ispcp_daemon

CMD_ISPCPN = /etc/init.d/ispcp_network

#
# Virtual traffic manager
#

CMD_PFLOGSUM = /usr/sbin/maillogconvert.pl

TRAFF_LOG_DIR = /var/log

FTP_TRAFF_LOG = ftp_traff.log

MAIL_TRAFF_LOG = mail.log

PREV_TRAFF_LOG_MAX_SIZE = 10485760

TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic

TOOLS_ROOT_DIR = /var/www/ispcp/engine/tools

QUOTA_ROOT_DIR = /var/www/ispcp/engine/quota

#
# AMaViS data
#

MAIL_LOG_INC_AMAVIS = 0

#
# GUI config
#

USER_INITIAL_THEME = omega_original

ISPCP_LICENSE = ispCP 1.0rc2 OMEGA<br />build: 2007-04-18<br />Priamos

FTP_USERNAME_SEPARATOR = @

FTP_HOMEDIR = /var/www/virtual

FTP_SHELL = /bin/bash

IPS_LOGO_PATH = ../themes/user_logos

ISPCP_SUPPORT_SYSTEM_PATH = support_system.php

ISPCP_SUPPORT_SYSTEM_TARGET =

MYSQL_PREFIX = no

# '' for MYSQL_PREFIX = no,
# 'infront' or 'behind' for MYSQL_PREFIX = yes
MYSQL_PREFIX_TYPE =

WEBMAIL_PATH = ../tools/webmail/

WEBMAIL_TARGET = _blank

PMA_PATH = ../tools/pma/

PMA_TARGET = _blank

FILEMANAGER_PATH = ../tools/filemanager/

FILEMANAGER_TARGET = _blank

DATE_FORMAT = d.m.Y

#
# htaccess management
#

HTACCESS_USERS_FILE_NAME = .htpasswd

HTACCESS_GROUPS_FILE_NAME = .htgroup

HTPASSWD_CMD = /usr/bin/htpasswd2

#
# backup management
#

BACKUP_FILE_DIR = /var/www/ispcp/backups

### Deprecated ###
## ToDo: Config it by MySQL via Interface!
###

# Whitelist some IP numbers here (WARNING! DO NOT WHITELIST SO MUCH!!)
# e.g. 1.2.3.4,4.3.2.1
SEC_IP_WHITELIST =

# Do not send emails when these IP numbers are accessing
# e.g. 1.2.3.4,4.3.2.1
SEC_IP_NO_EMAIL =

# Ignore these non-existing sub-domains. This reduces the amount of mails
# e.g. when you have created lots of sub domains, the spiders came around
# and you have deleted them after a while.
SEC_DOMAIN_NO_EMAIL =

# Allow direct accesses on your IP number? (true/false)
SEC_ALLOW_IP_ACCESS = false

# Allow direct accesses on your hostname? (true/false)
SEC_ALLOW_HOSTNAME_ACCESS = false

# Allowed request methods? (the default are mostly fine)
# e.g. GET,POST,HEAD
SEC_REQUEST_METHODS = GET,POST,HEAD

# Allowed server protocols? (the default are in 99.999% cases fine)
# e.g. HTTP/1.0,HTTP/1.1
SEC_SERVER_PROTOCOLS = HTTP/1.0,HTTP/1.1

# Check these entries in _SERVER for correct IP numbers or hostnames
# Please leave this alone!
SEC_VALIDATE_IP_HOSTNAME = SERVER_NAME,HTTP_HOST

# Filter more things on bad tags in _SERVER
# Please leave this alone!
SEC_FILTER_TAGS = HTTP_VIA,HTTP_X_FORWARDED_FOR

Hoffe ihr könnt was finden Smile
mfg Morph
(This post was last modified: 09-27-2007 09:26 PM by morpheus.)
09-27-2007 09:26 PM
Find all posts by this user Quote this message in a reply
Lemy Offline
Junior Member
*

Posts: 10
Joined: Aug 2007
Reputation: 1
Post: #17
RE: Cannot open the ispcp.conf config file !
Ich würde mal in die Datei /var/www/ispcp/gui/include/ispcp-config.php ein paar echo 's reinschreiben, um genau zu schauen wann und wo der Fehler auftritt.
Ich hoffe mal Du kannst ein wenig php?
Z.B. hier :

Quote: function parseFile(){
/* open file ... parse it and put it in $cfg_values */
@$fd = fopen($this->config_file,'r');
if ($fd == FALSE) {
/* ooops error */
$this->status = "err";
echo "Kann Datei nicht öffnen";
return FALSE;
}
echo "Problem taucht wohl beim parsen auf!";
while(!feof($fd)){
$buffer = fgets($fd,4096);
/* remove spaces */
$buffer = ltrim($buffer);
if (strlen($buffer) < 3) {
/* empty */
}
else if ($buffer[0] == '#' || $buffer[0] == ';') {
/* this is comment */
}
else if (strpos($buffer,'=') === false) {
/* have no = Sad */
}
else {
$pair = explode('=',$buffer,2);

$pair[0] = ltrim($pair[0]);
$pair[0] = rtrim($pair[0]);

$pair[1] = ltrim($pair[1]);
$pair[1] = rtrim($pair[1]);

/* ok we have it Smile */
$this->cfg_values[$pair[0]]=$pair[1];
}
}

fclose($fd);
return TRUE;
}
Ich denk mal der Fehler tritt beim fopen auf . Bei php.net steht folgendes :
Quote:Ist PHP zu dem Schluss gekommen, dass filename eine lokale Datei spezifiziert, wird es versuchen, einen Stream an dieser Datei zu öffnen. Die Datei muss für PHP verfügbar sein, weshalb Sie sicherstellen müssen, dass die Dateirechte diesen Zugriff ermöglichen. Wenn Sie Safe Mode oder open_basedir aktiviert haben, können weitere Einschränkungen zutreffen.

Hoffe mal das hilft bei der Suche.
09-27-2007 11:38 PM
Find all posts by this user Quote this message in a reply
morpheus Offline
Junior Member
*

Posts: 36
Joined: Sep 2007
Reputation: 0
Post: #18
RE: Cannot open the ispcp.conf config file !
hi,

also habe die echos eingefügt und es kommt "Kann Datei nicht öffnen" und sooo gut kenn ich mich da nun auch nicht aus kann mit deinem letzten quote nicht viel anfangen =|
09-28-2007 03:24 AM
Find all posts by this user Quote this message in a reply
Lemy Offline
Junior Member
*

Posts: 10
Joined: Aug 2007
Reputation: 1
Post: #19
RE: Cannot open the ispcp.conf config file !
Das heisst nix anderes, als das dein Skript nicht auf die Datei ispcp.conf zugreifen kann. Da sie ja offensichtlich vorhanden ist, muss es an den Rechten liegen.
Lösch die eingefügten Zeilen und gib in der Konsole ein :
Quote:chown root.vu2000 /etc/ispcp/ispcp.conf
Und dann probiers noch mal.
09-28-2007 04:22 AM
Find all posts by this user Quote this message in a reply
morpheus Offline
Junior Member
*

Posts: 36
Joined: Sep 2007
Reputation: 0
Post: #20
RE: Cannot open the ispcp.conf config file !
jo habs eben geändert auch das geht leider noch nich, das kann doch nur eine kleinigkeit sein. hmmm noch wer eine idee? Smile
09-28-2007 05:56 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)