Hot answers tagged

15

$assign_to_config is an EE-native array used in the index.php file. Here's part of the comments EllisLab left for us to provide context: The $assign_to_config array below will be passed dynamically to the config class. This allows you to set custom config items or override any default config values found in the config.php file. This can be handy ...


11

It's not that using admin.php is a security benefit in itself, it's that it allows you to move your entire /system folder outside of the web root. If you don't take that step then you will see no benefits whatsoever. In fact, if you leave both admin.php and /system in your public_html folder (or equivalent) that's arguably detrimental to security, as you've ...


7

That would be the save templates as files feature. Once you've configured a template path you can save individual templates as files or you can sync all of your templates to file via the Templates > Synchronize Templates page. Once you've done that any changes you make to the template files will take effect immediately, without you needing to manually sync ...


7

Take a look at your main index.php file, you should see this line: // $assign_to_config['global_vars'] = array(); // This array must be associative Once that's uncommented and populated the variables should be available in your templates. For example: $assign_to_config['global_vars'] = array('analytics_key' => 'UA-XXXXXXX-XX'); That should be ...


6

As of 2.8 it's changed slightly... So if you want to disable "secure forms" you'll need to use this in config.php instead of what is posted elsewhere. $config['disable_csrf_protection'] = "y"; More info here: http://ellislab.com/blog/entry/sessions-login-modals-and-secure-forms-in-expressionengine-2.8


5

I believe the main and immediate advantage to using admin.php, wether you move the system folder above root or not, is that it hides the name of the system directory from http request logs. So if you have renamed your system folder (for security reasons), your browser is only making requests to admin.php, not secret_system_folder/index.php. It's the same ...


5

Rick, I poked around and found what I think are the allowable settings for those first two in /system/expressionengine/models/admin_model.php. It looks like 'y/n' are the only allowable values for redirect_submitted_links or banish_masked_ips. I found the values for req_mbr_activation in /system/expressionengine/controllers/cp/members.php at line 1674 (...


5

I'm still not certain what your overall question is, but I can explain $env_config['disable_all_tracking'] = 'y';. $env_config['disable_all_tracking'] = 'y'; Is part of ExpressionEngine's option for Handling Extreme Traffic. If you disable_all_tracking then you do not have to individually set the options for: $env_config['...


5

This error may caused if EE couldn't make database connection. Check your hostname, username, password within "/system/expressionengine/config/database.php". Also could you check "exp_sites" database table if its having at least one record (multiple records for MSM site) if not, import this table properly.


5

I was almost certain that Custom System Messages was causing this problem. The template offline message could be set in the preferences, but it was not. As Custom System Message has a greater priority over EE offline template, and no template was set, it was not working. The template was set inside Custom System Message The problem is solved.


4

You can still use the Global Variables Array, that formerly existed in the path.php file, but now exists in your primary index.php file for the site. I've include an example of the formatting: $assign_to_config['global_vars'] = array( 'subsite_id' => 'subsite01', 'subsite_no' => '259', 'domain' => 'http://mydomain.org', 'https' =&...


4

I found the solution: global $assign_to_config; if( ! isset($assign_to_config['global_vars'])) { $assign_to_config['global_vars'] = array(); } $main_global = array( 'global:env' => ENV, 'global:env_full' => ENV_FULL ); $assign_to_config['global_vars'] = array_merge($assign_to_config['global_vars'], $...


4

Can you copy/paste a code snippet? Basically, what you have to do is search for theme_folder_url and replace it with url_third_themes - plus you also have to remember to drop the third_party on the path. so: $this->EE->config->item('theme_folder_url').'third_party/field_editor/css/field_editor.css becomes: $this->EE->config->item('...


4

I make a few changes to the Master Config in my Base EE install. I made some pull requests to the core, but I am not sure if they were approved. I actually change my environment to the follow, it makes life much simpler with domains. Basically the following code strips the WWW from the URL and ensure you only have to define the domain once. Real simple ...


4

is not possible that some add-on can be affected on this. You need to be sure, that you are not login as SuperAdmin. Because Super Admin can see site even in offline.


4

You shouldn't see the site in online mode if you have set $config['is_system_on'] = 'n'; in your config.php file. If you are seeing the site, I'd guess one of the following is true: You are editing the wrong config.php file You are still logged into the control panel as a SuperAdmin. Clear browser cookies to be sure and confirm that you see the login ...


4

You are correct. The only thing that you will need to do is open up system/expressionengine/config/database.php and change the hostname username password and database and change the settings to match your new MySQL server credentials.


4

A coworker had this same problem earlier this week and added 'application/octet-stream' to the mime types to solve this.


3

You need to use admin.php when using MSM (Multi Site Manager). The system folder is only present in one of the sites so if you want to access the Control Panel from one of the other sites you have to use admin.php. First site in MSM looks like: / index.php admin.php -System -Templates etc Each subsequent site just has: / index.php admin.php -Templates ...


3

First thought was we'd add a config var for the MySQL port as per the CodeIngiter docs $db['default']['port'] = 5432 but that didn't work instead we had to change the hostname to $db['expressionengine']['hostname'] = "mysqldbinstance.hostname.com:4703";


3

I had trouble like this with ed_image when I first starting using 2.x. I found CE Image to be far better and easier to work with. It's fairly easy to convert to CE Image too.


3

I would recommend setting the save template as text files (as suggested by Dom) option in you config file. There is a good tutorial about putting your config file to better use here. In a nutshell though it's this: $config['save_tmpl_files'] = "y"; $config['tmpl_file_basepath'] = "/path/to/your/templates/";


3

Try using the protocol neutral implementation, so /* File Upload Preferences -------------------------------------------------------------------*/ $config['upload_preferences'] = array( 1 => array( 'name' => "Uploads", 'server_path' => "${_SERVER['DOCUMENT_ROOT']}/uploads/", 'url' => "//${_SERVER['HTTP_HOST']}/...


3

Add the following into the EE config.php file to disable "secure forms": $config['secure_forms'] = "n";


3

Take the standard method and add in your subfolder name before index.php in the RewriteRule. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /SUBFOLDER/index.php/$1 [L] </IfModule>


3

Sorry for the trouble. This is an issue in EE 2.9 and will be fixed in the next release. For now, you can get around it by specifying the cache driver in your config.php: $config['cache_driver'] = 'memcached';


3

You are probably not going to get the answer you are looking for and I have no idea why EllisLab chose to do what they did when building EE as I am not part of their team. Having said that I recommend you email them and ask them personally. But to answer your main issue of changing paths and urls easily. EllisLab has setup EE to handle a bunch of ...


3

If by config variables, you mean the ones on config.php, it's pretty easy to do. On your config.php add the following code: global $assign_to_config; if(!isset($assign_to_config['global_vars'])) $assign_to_config['global_vars'] = array(); Now, you can create early parsed template variables. Let's say you set the mail protocol used by a System Config ...


3

The correct array key for the database user is username not user $config['database'] = array ( 'expressionengine' => array ( 'hostname' => 'localhost', 'username' => 'username', 'password' => 'root', 'database' => 'dennis', ) );


2

For Field Editor you can add this: $this->theme_url = defined('URL_THIRD_THEMES') ? URL_THIRD_THEMES . '/field_editor/' : $this->EE->config->item('theme_folder_url') . 'third_party/field_editor/'; inside the public function __construct() method. And then swap out the instances of: $this->EE->config->item('theme_folder_url') and $this-...


Only top voted, non community-wiki answers of a minimum length are eligible