Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: asduskun on March 20, 2011, 01:28:30 PM

Title: repair_settings.php help
Post by: asduskun on March 20, 2011, 01:28:30 PM
hi all

i moved my hosting to x10hosting and i knew that i have to run repair settings for that but when i run that i get the following errors what is wrong?

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/export/www/vhosts/funnetwork/hosting/asduskun/Sources) is not within the allowed path(s): (/home/:/tmp) in /home/asduskun/public_html/Settings.php on line 63

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/export/www/vhosts/funnetwork/hosting/asduskun/cache) is not within the allowed path(s): (/home/:/tmp) in /home/asduskun/public_html/Settings.php on line 65
Title: Re: repair_settings.php help
Post by: redone on March 20, 2011, 01:31:37 PM
I would suggest opening a support ticket with your host first.

~RedOne
Title: Re: repair_settings.php help
Post by: asduskun on March 20, 2011, 01:35:33 PM
is this related to my host?
Title: Re: repair_settings.php help
Post by: asduskun on March 20, 2011, 01:43:23 PM
no one can help here?
Title: Re: repair_settings.php help
Post by: Arantor on March 20, 2011, 01:44:57 PM
Not really, no, it's a configuration issue - but in any case most people aren't here to sit and wait for new posts, so expecting a reply within 10 minutes from a volunteer-run community is a bit much...
Title: Re: repair_settings.php help
Post by: asduskun on March 20, 2011, 01:55:19 PM
i saw that i have forgotten to upload sources folder into my new host now i have done so and i just get this error below, is there something wrong with the cache file?

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/export/www/vhosts/funnetwork/hosting/asduskun/cache) is not within the allowed path(s): (/home/:/tmp) in /home/asduskun/public_html/Settings.php on line 65
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 10:50:58 AM
I asked about this problem to my hosting support and thEY suggested me to ask this on smf support, so can anybody help?
Title: Re: repair_settings.php help
Post by: Arantor on March 21, 2011, 10:53:03 AM
OK, so did you use repair-settings.php to fix all the paths? The error seems to suggest it's trying to access files outside your user area.
Title: Re: repair_settings.php help
Post by: MrPhil on March 21, 2011, 11:53:46 AM
Since your SMF installation is under /home/asduskun/public_html/, what are you doing messing in /usr/export/www/vhosts/funnetwork/hosting/asduskun/? Was that where your previous installation was? Look in Settings.php to see if for some reason you have $boarddir hardcoded to that path, rather than

$boarddir = dirname(__FILE__); # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = dirname(__FILE__) . '/Sources'; # Path to the Sources directory.

(This is SMF 1.1.12; I don't know if SMF 2.0 is different). Could you have been hacked at some point?
Title: Re: repair_settings.php help
Post by: CapadY on March 21, 2011, 03:23:42 PM
The last errormessage is about the path to the cache diretory.
Repair_settings don't affect that path, so you have to edit it manually in settings.php
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 03:56:11 PM
Quote from: capady on March 21, 2011, 03:23:42 PM
The last errormessage is about the path to the cache diretory.
Repair_settings don't affect that path, so you have to edit it manually in settings.php

yes but how?i don t know how to do that! by the way i haven t install my forum firstly on this hosting, x10hosting, it was installed on byethost at first then i moved my hosting to funpic.de and lastly i moved all my forum files to my current host from funpic and uploaded all the stuff into public_html... and my cache folder is also there, but how comes the repair_settings.php doesn t see that, if it doesn t see cache folder it can t see the other folders as well but it doesn t give an error for other folders, by the way there are two more folders  within public_html, they are asduskun and cgi-bin and i don t have any idea about what they are for.... and following is my settings folder please help me

<?php
/**********************************************************************************
* Settings.php                                                                    *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel ([email protected])                    *
* =============================================================================== *
* Software Version:           SMF 2.0 RC2                                         *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/

########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$maintenance '0'; # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
$mtitle ''; # Title for the Maintenance Mode message.
$mmessage ''; # Description of why the forum is in maintenance mode.

########## Forum Info ##########
$mbname 'JUST COMMUNICATE!'; # The name of your forum.
$language 'english'; # The default language file set for the forum.
$boardurl 'http://asduskun.x10.mx'; # URL to your forum's folder. (without the trailing /!)
$webmaster_email '*********'; # Email address to send emails from. (like [email protected])
$cookiename 'SMFCookie11'; # Name of the cookie to set for authentication.

########## Database Info ##########
$db_type 'mysql';
$db_server 'localhost';
$db_name '********';
$db_user '*******';
$db_passwd '******';
$ssi_db_user '';
$ssi_db_passwd '';
$db_prefix 'smf_';
$db_persist '0';
$db_error_send 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir '/home/asduskun/public_html'; # The absolute path to the forum's folder. (not just '.'!)
$sourcedir '/home/asduskun/public_html/Sources'; # Path to the Sources directory.
$cachedir '/usr/export/www/vhosts/funnetwork/hosting/asduskun/cache'; # Path to the cache directory.

########## Error-Catching ##########
# Note: You shouldn't touch these settings.
$db_last_error 1299960347;

# Make sure the paths are correct... at least try to fix them.
if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
$boarddir dirname(__FILE__);
if (!
file_exists($sourcedir) && file_exists($boarddir '/Sources'))
$sourcedir $boarddir '/Sources';
if (!
file_exists($cachedir) && file_exists($boarddir '/cache'))
$cachedir $boarddir '/cache';

$db_character_set 'utf8';
?>
Title: Re: repair_settings.php help
Post by: Illori on March 21, 2011, 04:15:42 PM
this line needs to be changed
$cachedir = '/usr/export/www/vhosts/funnetwork/hosting/asduskun/cache'; # Path to the cache directory.

that is pointing to your old host.
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 04:50:37 PM
Quote from: Illori on March 21, 2011, 04:15:42 PM
this line needs to be changed
$cachedir = '/usr/export/www/vhosts/funnetwork/hosting/asduskun/cache'; # Path to the cache directory.

that is pointing to your old host.

will i change it to the folder directory to public_html directory of my current host or where else?
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 05:07:23 PM
thanks for all the replies it s ok now but why i see my forum like this now, what is missing with the files or folders? here s the link

http://asduskun.x10.mx/
Title: Re: repair_settings.php help
Post by: Illori on March 21, 2011, 05:25:18 PM
looks like your theme files are missing or your path to your theme is incorrect.
Title: Re: repair_settings.php help
Post by: CapadY on March 21, 2011, 05:39:45 PM
Path to theme files aren't affected by repair_settings either.

You'll have to edit them manualy via the forums OP-panel.
Title: Re: repair_settings.php help
Post by: Illori on March 21, 2011, 05:43:19 PM
well the source looks correct from what i can see.... yet the theme is not loading which makes me think the files are missing or in the wrong spot.

<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "http://asduskun.x10.mx/Themes/default";
var smf_default_theme_url = "http://asduskun.x10.mx/Themes/default";
var smf_images_url = "http://asduskun.x10.mx/Themes/default/images";
var smf_scripturl = "http://asduskun.x10.mx/index.php";
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 06:49:40 PM
i just upgraded my forum to rc 5 if i run upgrade again would that solve the problem?

by the way i changed the theme and the result is the same, i just see an outline
Title: Re: repair_settings.php help
Post by: Illori on March 21, 2011, 07:17:42 PM
running the upgrade again will not fix the issue, repair settings will attempt to repair the paths but if the files are missing that will not fix it. verify the files are in place for the default theme in the location quoted above.
Title: Re: repair_settings.php help
Post by: asduskun on March 21, 2011, 07:34:47 PM
all the files are there but  i think the problem is i got my database from byethost that is my first database of smf forum and it was rc 2 then i move that database to funpic.de and then i upgraded to rc5 and lastly i moved my hosting to x10hosting and i tried to import the database of funpic into my new host but i could it gives error that includes CREATE TABLE statement and i decided to use my old database from byethost....so is this the problem causing this ?

by the way i asked my hosting why i can t import the databse and they told it musn t include create table command but i can t delete all create table commands in the database there are lots of.... so what do you think the problem is:?
Title: Re: repair_settings.php help
Post by: Illori on March 21, 2011, 07:50:08 PM
if you can not issue a create table command then i dont know what type of server you are hosted on. if you cant create a table you cant really use a database as a database is full of tables that need to be created. at this point without seeing your files and server i am not sure what can be done to help you.
Title: Re: repair_settings.php help
Post by: asduskun on March 22, 2011, 07:36:54 AM
ok the answer i got from my hosting is below so what should i do?

You have to create a database using cPanel-->MySQL Databases and then go to cPanel-->phpMyAdmin and use that to import the table structure and data into the new database.

"What errors did you get when you tried?
This has to be an SQL dump, not the physical database.
If the dump included the 'CREATE DATABASE' command, it will not work. You have to make a copy of the dump (always keep a backup if you are editing) and edit out the database creation instructions. "

and the error i got from database import is below


SQL sorgusu:
--
-- Veritabanı: `asduskun`
--
CREATE DATABASE `asduskun` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci;


MySQL çıktısı: 
#1007 - Can't create database 'asduskun'; database exists

and how can i edit it to make it work?
Title: Re: repair_settings.php help
Post by: Illori on March 22, 2011, 07:41:45 AM
remove that line starting with create database from your dump file.
Title: Re: repair_settings.php help
Post by: asduskun on March 22, 2011, 09:52:23 AM
Shall i attach my database here? Because when i remove that line i get different errors
Title: Re: repair_settings.php help
Post by: Illori on March 22, 2011, 09:58:04 AM
please do NOT attach your database here, as it contains information about your users. what errors do you get after removing that line?
Title: Re: repair_settings.php help
Post by: MrPhil on March 22, 2011, 09:36:37 PM
Some hosts permit you to create a database using SQL statements, while others require you to use tools such as phpMyAdmin. Ask your host. Are you sure you need to create a database? It sounds like you already have one. You may or may not need to empty it out first.

You need to understand what's in your backup (.sql) file, and what it's trying to do. Then you can look at what you already have and decide what manual actions you need to take before you can import that backup. For example, if the backup does not include any CREATE TABLE commands, you would have to set up the tables first.
Title: Re: repair_settings.php help
Post by: asduskun on March 23, 2011, 01:12:04 PM
i already have a database but i imported it from my first hosting account then i changed two hosting, and when i was using funpic as my host i upgraded to rc5 and then i again moved my hosting to x10hosting and i couldn t import my rc5 databse to my current host so i decided to use my old host, but now as you see http://asduskun.x10.mx there s something missing when i remove CREATE DATABASE `asduskun` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci; line i get this error below

-- Tablo için tablo yapısı `backup_smf_admin_info_files`
--
CREATE TABLE `backup_smf_admin_info_files` (
`id_file` tinyint( 4 ) unsigned NOT NULL AUTO_INCREMENT ,
`filename` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`path` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`parameters` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`data` text COLLATE latin1_german2_ci NOT NULL ,
`filetype` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
PRIMARY KEY ( `id_file` ) ,
KEY `filename` ( `filename` ( 30 ) )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci AUTO_INCREMENT =8;
MySQL çıktısı: Belgeler
#1050 - Table 'backup_smf_admin_info_files' already exists


and i see this error at the bottom of my database

the additional feature working with related tables have been disabled. click here to see why.

And when i click there i see this page

$cfg['Servers'][$i]['pmadb'] ... Not ok [ documents ]
$cfg['Servers'][$i]['relation'] ... Not ok [ documents]
General relation specs: inactive

$cfg['Servers'][$i]['table_info'] ... Not ok [ documents]
show specs: inactive

$cfg['Servers'][$i]['table_coords'] ... Not ok [ documents]
$cfg['Servers'][$i]['pdf_pages'] ... Not ok [ documents]
creating pdf s: inactive

$cfg['Servers'][$i]['column_info'] ... Not ok [ documents]
showing column comments: inactive
SQL query signed: inactive
Browser mappings: inactive

$cfg['Servers'][$i]['history'] ... Not ok [ documents]
SQL history: inactive

$cfg['Servers'][$i]['designer_coords'] ... Not ok [ documents]
designer: Etkisiz
Title: Re: repair_settings.php help
Post by: Illori on March 23, 2011, 03:24:18 PM
please do NOT pm anyone to get them to reply to your thread/issue, if and when anyone knows the answer they will reply we are all volunteers around here.
Title: Re: repair_settings.php help
Post by: MrPhil on March 23, 2011, 09:58:13 PM
If this is to be a "live" forum, you want to restore to "smf_admin_info_files" (and similarly for other tables). You'll have to change the name in the CREATE TABLE statement (and likely, the INSERT INTO statements too). The error message is quite obvious -- you already created a backup_smf_admin_info_files table at some point, and you're trying to CREATE it again, without first destroying (DROPping) the current copy, or renaming either the existing copy or what the new one will be named.
Title: Re: repair_settings.php help
Post by: asduskun on March 24, 2011, 01:32:27 PM
so ok but how can i do that exactly? can you tell step by step, what do you mean "dropping" how will i do that or what will i rename, i just exported database and wanted to import it, i didn t know this would cause these problems

additionaly after i removed all create table commands i was able to import the database but this time my databse didn t see any tables
Title: Re: repair_settings.php help
Post by: asduskun on March 24, 2011, 04:49:00 PM
ok then now i m asking on here i could successfully added 75 tables of my database but i also got this error below what should i do?

when i wanted to import my database into my new host i got this error what should i do?

SQL sorgusu:

--
-- Tablo döküm verisi `backup_smf_openid_assoc`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `backup_smf_package_servers`
--
CREATE TABLE IF NOT EXISTS `backup_smf_package_servers` (
`id_server` smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
`name` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`url` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULTT '',
PRIMARY KEY ( `id_server` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci AUTO_INCREMENT =3;

MySQL çıktısı: Belgeler
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'T '',
  PRIMARY KEY (`id_server`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLAT' at line 15
Title: Re: repair_settings.php help
Post by: MrPhil on March 24, 2011, 09:53:24 PM
Quote from: asduskun on March 24, 2011, 01:32:27 PM
so ok but how can i do that exactly? can you tell step by step, what do you mean "dropping" how will i do that or what will i rename, i just exported database and wanted to import it, i didn t know this would cause these problems

additionaly after i removed all create table commands i was able to import the database but this time my databse didn t see any tables
You don't touch the .sql file. You go into phpMyAdmin (your database administration tool) and go to each 'backup' table and click on the DROP tab.

If your backup file (.sql) just CREATEs each table without first DROPping the old one, you will need to manually DROP the duplicated tables (in phpMyAdmin) before importing the .sql, which will CREATE new tables.  Note that a database with "backup_" in the table names is useless for SMF -- if you want to use that backup, you either need to edit the .sql file to remove all "backup_" from names (it will then create tables "smf_whatever...", or I think that phpMyAdmin has a function to rename existing tables (since you've obviously already read in the backup once, why do it again?). Anyway, you want to end up with just tables "smf_whatever..." rather than "backup_smf_whatever...".
Title: Re: repair_settings.php help
Post by: MrPhil on March 24, 2011, 09:56:24 PM
Quote from: asduskun on March 24, 2011, 04:49:00 PM
`url` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULTT '',
I can't figure out what language this is (it doesn't translate as German), but I do see DEFAULT misspelled as DEFAULTT. That is what the error message seems to be complaining about. Change DEFAULTT to DEFAULT.