• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Help for config.php

Status
Not open for further replies.

coquinenet

Chevereto Member
Hello

I just sincerely offer cheveretto and I suck in php after installation is the message that shows me

There is a problem regarding your config setup. This means that Chevereto won't run because the config is not valid:
  • You haven't changed the default admin password. Please set this value in $config['admin_password']
Please double-check your settings in the includes/config.php file.

I have yet to change and nothing happens it makes me desperate

someone could you help me?
 
Hi, you have to set the config values on the includes/config.php file. The UTF-8 error is because you are editing the config.php file and when you save the file your editor is actually adding, at the very beginning of the file, a thing called "BOM" (which is some kind of signature that tells that the file has certain encoding).

Problem comes with PHP because, when this file is loaded, PHP read those chars and the result is that PHP can't understand it because of is lack of unicode support.

The workaround for this is that you have to download a editor like notepad++ (free) and then use "Encode in UTF-8 without BOM" option.

1t7JQ.jpg


That will remove the BOM and the file will be OK. You must do the same editing for the definitions.php file.
 
i have a new message :

There is a problem regarding the admin folder and Chevereto won't run because the admin folder doesn't exists.
Please double-check $config['admin_folder'] in the includes/config.php file.
 
i change this with natepad++

/**
* Admin password
* This will be the password to enter the admin area (file manager)
* This MUST not be the same as 'user_password'
*/
$config['admin_pass'] = 'test';

but i have always this error

There is a problem regarding your config setup. This means that Chevereto won't run because the config is not valid:
  • You need to set the admin password in $config['admin_password']
Please double-check your settings in the includes/config.php file.
 
There is a problem regarding the admin folder and Chevereto won't run because the admin folder doesn't exists.

That message says that the admin folder doesn't exists. You have to upload it.

and what change in definitions.php file ?

PHP:
/**
* __CHV_CRYPT_SALT__
* This is the crypt salt used for generate and convert all the image ids
* Please, don't you ever change this at least you want to reset the whole system
* Set this only once and stick to it.
*/
define("__CHV_CRYPT_SALT__", "changeme");

i change this with natepad++

/**
* Admin password
* This will be the password to enter the admin area (file manager)
* This MUST not be the same as 'user_password'
*/
$config['admin_pass'] = 'test';

but i have always this error

There is a problem regarding your config setup. This means that Chevereto won't run because the config is not valid:
  • You need to set the admin password in $config['admin_password']
Please double-check your settings in the includes/config.php file.

The configurable value is $config['admin_password'] not $config['admin_pass']
 
If you need more help you can send me the FTP details and I will tune the site for you ;)
 
Great

thx for ur help Rodolfo

i have new error message...

PDOException: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

can i send my ftp details ?(and what do u want ?
 
PDOException: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

That is saying that the database config is not accurate and the user : password combo that you have indicated is invalid. You must indicate a valid database configuration.

If you send me the FTP I will need that you review all your config values and then indicate me where are you having trouble. For instance in this last error you should send me database details.
 
this error comes it will config.php or the configuration of my server?
config.php, because the script is trying to access to the db using a invalid user access. You must set valid config values on the config.php file
 
Can i send my config.php ? i do'nt see the problem
The problem is that the database details provided by you in config.php are invalid. This means that I cant do anything because the database, database user and database user pass must be VALID in your server. The database server is a different thing and is not the same as FTP. I cant fix it if the database details are invalid. Please double check this in your hosting service.
 
Sorry but I do not understand I need to create a database on my server? a database 'mysql'
Yes, you need to create a mysql database and grant permissions to that database to a database user. Are you using cPanel in your current hosting?
 
i have only this pb

PDOException: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

my config.php is :

Code:
<?php
/* --------------------------------------------------------------------
 
  Chevereto
  http://chevereto.com/
 
  @version    2.4
  @author    Rodolfo Berríos A. <http://rodolfoberrios.com/>
            <inbox@rodolfoberrios.com>
 
  Copyright (C) 2012 Rodolfo Berríos A. All rights reserved.
 
  BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
  http://chevereto.com/license
 
  --------------------------------------------------------------------- */
 
/**
* Theme
* http://chevereto.com/themes/
*/
$config['theme'] = 'Peafowl';  // Place the case-sensitive folder name of your theme located in /includes/themes/
 
 
/**
* Default language display
* If you need to add a new language just create a new xx.php file under includes/lang/ then change 'en' to 'xx'
*/
$config['lang'] = 'fr'; // en - English | es - Spanish | etc...
 
 
/**
* Auto language
* If is set to true, the script will set the language according to the visitor language.
* default: true
*/
$config['auto_lang'] = true; // Values: true | false
 
 
/**
* Site details
*/
$config['site_name']        = 'Chevereto';
$config['doctitle']            = 'Chevereto image hosting script';
$config['meta_description'] = 'Chevereto is a free image hosting service powered by Chevereto';
$config['meta_keywords']    = 'images, photos, image hosting, photo hosting, free image hosting';
 
 
/**
* Database details (MySQL)
*/
$config['db_host'] = 'localhost'; // localhost is mostly the default on all servers. Do not indicate port here!
$config['db_port'] = ''; // Some servers needs to indicate the port of the database hostname - default: don't set it
$config['db_name'] = 'chevereto'; // Database must exists
$config['db_user'] = 'root'; // Database user with access to the above database name
$config['db_pass'] = '';
 
 
/**
* Minify files (JS/CSS)
* Set on/off the minify mode. If you turn on minify_files (true) the system will use the minified version of the
* JS and CSS files. If the minify file doesn't exist the system will try to create it for you.
* @Since 2.4
* Default: true
*/
$config['minify'] = true; // Values: true | false
 
 
/**
* Private mode
* Set on/off the private mode. If you turn on the private_mode (true) only the admin and the people with the
* user password will have access to upload images
* @Since 2.2
* Default: false
*/
$config['private_mode'] = false; // Values: true | false
 
 
/**
* User password
* If you set this value and the private_mode is true, only the people with this password can upload images
* This MUST not be the same as 'admin_password'
* Note 1: This users can't enter the admin area (file manager)
* Note 2: Admin can always upload images using their own password
* @Since 2.2
*/
$config['user_password'] = 'test';
 
 
/**
* Admin folder
* This will be the folder of the admin area (file manager)
* @Since 2.4
* Default: 'admin'
*/
$config['admin_folder'] = 'admin';
 
/**
* Admin password
* This will be the password to enter the admin area (file manager)
* This MUST not be the same as 'user_password'
*/
$config['admin_password'] = 'test1';
 
 
/**
* API settings
* Sets the API configurable values
*/
$config['api_key']    = 'my_api_key'; // Whatever you want. Default: my_api_key
$config['api_mode'] = 'private'; // Values: public | private - Public: No restrictions, Private: Need to parse the API key.
 
 
/**
* Storage
* Select where do you want to store the uploads. This don't affect the actual files, just the new uploads.
* Default: datefolders
* @Since 2.2
*/
$config['storage'] = 'datefolders'; // Values: datefolders | direct -> datefolders (example: /YYYY-MM-DD/file.ext) | direct (/image/file.ext)
 
 
/**
* Folders set-up
* This are the main folders used by the script.
* -> If you change this you also must change the folders name.
*/
$config['folder_images'] = 'images';
$config['folder_thumbs'] = 'images/thumbs'; // Just for legacy concerns, this is actually not used anymore since 2.1
 
 
/**
* Virtual folders set-up
* This are the virtual folders used by the scripts, they MUST be setted.
* -> This folders are used by PHP, they aren't real folders but they may conflic with real folders. Try to don't have this folders as real folders.
*/
$config['virtual_folder_image']        = 'image'; // used on image viewer ie: (http://mysite.com/image/<ID>)
$config['virtual_folder_uploaded']    = 'uploaded'; // used on multiupload image process ie:(http://mysite.com/uploaded)
 
 
/**
* Allowed Minimum-Maximum values
* This values are globally afected by PHP configuration located in php.ini.
* This limits have a maximum setted by yout hosting company, Chevereto can't override them.
*/
$config['max_filesize'] = "2 MB"; // Allowed maximum image size to be uploaded - default: 2 MB
 
$config['thumb_width']    = 100; // Thumb width in pixels - default: 100
$config['thumb_height'] = 90; // Thumb height in pixels - default: 90
 
$config['min_resize_size'] = 16; // Min. resize value (pixels)
$config['max_resize_size'] = 1280; // Max. resize value (pixels) - 0: No limit
 
 
/**
* multiupload
* Multiupload feature for local file uploads.
*/
$config['multiupload'] = true;
$config['multiupload_limit'] = 10; // Maximun number images on multiupload queue values. No-limit: 0
 
 
/**
* over_resize
* Chevereto can resize images but you can limit if it can over resize images like turning a 100x100 into 1280x1280
* default: false
*/
$config['over_resize'] = false; // Values: true | false
 
 
/**
* flood_protection
* Switch for enable/disable the flood protection based on IP
* default: true
*/
$config['flood_protection'] = true; // Values: true | false
 
/**
* flood_report_email
* Enter a email address if you want to recieve flood reports.
* The email will be sent using the php mail() function
* Note: This could mean a lot of emails, it depends on how many people use your website.
*/
$config['flood_report_email'] = ''; // Values: '' | somemail@mail.com
 
/**
* Flood limits
* This are the limits for the uploads / time period
* Admin user will always bypass this limits
* no limit: 0
*/
$config['max_uploads_per_minute'] = 15; // Default: 15
$config['max_uploads_per_hour']  = 30; // Default: 30
$config['max_uploads_per_day']      = 50; // Default: 50
$config['max_uploads_per_week']  = 200; // Default: 200
$config['max_uploads_per_month']  = 500; // Default: 500
 
 
/**
* error_reporting
* Switch for enable/disable the PHP error reporting
* -> When this is on TRUE the upload process won't trigger the redirect and the debug will be output
* default: false
*/
$config['error_reporting'] = false; // Values: true | false
 
 
/**
* short_url
* Short URL allows the ability of shrink the long image URL to something like
* http://tinyurl.com/c9a8pc using a short_url_service.
* default: true
*/
$config['short_url'] = true; // Values: true | false
 
 
/**
* short_url_service
* Remember $config['short_url'] There we set up wich service we want to use.
* default: tinyurl
*/
$config['short_url_service'] = 'tinyurl'; // Values: tinyurl | google | isgd | bitly | custom
 
 
/**
* custom_short_url_api
* If you set short_url_service to custom you need to specify the API url for your custom service
* including user login, output format (raw text) and at the end the empty url param (see the example)
* Note: Your service must have raw text output via GET.
*/
$config['custom_short_url_api'] = ''; // Example: http://yoursite.com/yourls-api.php?format=simple&action=shorturl&username=<USERNAME>&password=<PASSWORD>&url=
 
 
/**
* custom_short_url_service
* The name of your custom short url service
*/
$config['custom_short_url_service'] = 'MyService';
 
 
/**
* short_url_user & short_url_keypass
* In case that the cut URL service API needs user:pass or id:key
* Note: This is not valid for custom short_url_service
*/
$config['short_url_user'] = ''; // user/id  example: $config['short_url_user'] = 'bitlyuser'
$config['short_url_keypass'] = ''; // pass/key example: $config['short_url_keypass'] = '123456789'
 
 
/**
* short_url_image
* What image resource will be the shorted url in bitly, tinyurl, etc?
* default: shorturl
*/
$config['short_url_image'] = 'shorturl'; // Values: shorturl | direct | viewer
 
 
/**
* facebook_app_id
* The id of your facebook app id (useful to place facebook social plugins all over the site)
* default: none
*/
$config['facebook_app_id'] = '263511280400003'; // Get your app id on http://developers.facebook.com/apps
 
 
/**
* facebook_comments
* Enable (true) or disable (false) facebook comments on your theme
* default: none
*/
$config['facebook_comments'] = true; // Values: true | false
 
 
/**
* watermark_enable
* Enable (true) or disable (false) watermark image.
* default: false
*/
$config['watermark_enable'] = false; // Values: true | false
 
/**
* watermark_image
* Location of the watermark PNG file relative to the Chevereto directory
* Note: It must be a PNG file!
*/
$config['watermark_image'] = 'content/system/watermark.png'; // Example content/system/watermark.png
 
/**
* watermark_position
* Relative position of the watermark image
* First word sets the horizontal position and second word sets the vertical position
* default: right bottom
*/
$config['watermark_position'] = 'right bottom'; // Values: (right,center,bottom) (top,center,bottom)
 
/**
* watermark_margin
* Marging from the border of the image to the watermark image
* default: 10
*/
$config['watermark_margin'] = 10; // Values: numeric
 
/**
* watermark_opacity
* Opacity of the watermak on the watermarked image
* default: 30
*/
$config['watermark_opacity'] = 30; // Values: 0 -> 100
 
 
///////////////////////////////////////////////////////////////////////////////////
//////////////  EDIT BELOW THIS ONLY IF YOU KNOW WHAT YOU'RE DOING    ////////////
///////////////////////////////////////////////////////////////////////////////////
 
/*** CloudFlare IP workaround ***/
// Uncomment this line if you are using CloudFlare
//$_SERVER['REMOTE_ADDR'] = (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];
 
/**
* We get this value with $_SERVER. If your server doesn't resolve this value,
* the script will not work and you must manually set this value.
*/
define('HTTP_HOST', $_SERVER['HTTP_HOST']);
define('SERVER_PROTOCOL', (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://');
 
/**
* Sets the Paths and Base URL for the script
* If you find weird issues this may be caused by your server who doesn't
* handle the $_SERVER vars properly, so you must enter this paths manually.
*/
define('__CHV_ROOT_DIR__', str_replace('\\','/',dirname(dirname(__FILE__))).'/'); // /home/user/public_html/chevereto/
define('__CHV_RELATIVE_ROOT__', str_replace(dirname(__CHV_ROOT_DIR__), '', __CHV_ROOT_DIR__));
define('__CHV_BASE_URL__', SERVER_PROTOCOL.HTTP_HOST.__CHV_RELATIVE_ROOT__); // http(s)://www.mysite.com/chevereto/
 
?>
 
Status
Not open for further replies.
Back
Top