Jpeg Posted December 24, 2014 Posted December 24, 2014 constants.phpCan anyone tell me where this is located in the latest update?Thanks!
Ryan Ashbrook Posted December 24, 2014 Posted December 24, 2014 This file is not shipped with the software, but rather needs to be manually created. We don't ship with it as that would result in overwriting the file, which defeats its purpose.When creating the file, it should go in the root of your site, alongside init.php.
Jpeg Posted December 24, 2014 Author Posted December 24, 2014 Got it.....so after creating and setting up a new value....it will override the hard-coded value then.(I'm adjusting the default 5 second limit processing images to allow very large images to not cause a time-out)
Ramsesx Posted October 7, 2018 Posted October 7, 2018 On 12/24/2014 at 8:33 PM, Ryan Ashbrook said: This file is not shipped with the software, but rather needs to be manually created. We don't ship with it as that would result in overwriting the file, which defeats its purpose. When creating the file, it should go in the root of your site, alongside init.php. Why not just ship a file named like _constants.php with some often used functions, for example: <?php /* ------------ In this file you can add some special commands and configuration options which alter the normal behavior of the Suite. We added some often used commands below. If you need to make use of them please just remove the // More help and explanation of this file please visit invisioncommunity.com/constantshelp Attention, be careful and only change this file if you really know what you are doing. ------------ */ //define( 'EMAIL_DEBUG_PATH', "pathtoyourfolder" ); // this configuration prevent the board from sending emails, you have to create a directory and make it writable //define( 'USE_DEVELOPMENT_BUILDS', TRUE ); // this configuration will give you the option to receive development builds in your acp //define('RECOVERY_MODE',True); //enable this line if you can't access your acp and if you need tools to recover your community //define('UPGRADING_PAGE', 'pathtoyourupgradefile'); // Here you can add the path to a replacement of your upgrade page
AndyF Posted October 7, 2018 Posted October 7, 2018 I would suspect the risk of that is people may play with it and break something, for instance a typo or suchlike would possibly result in a broken site or more likely a blank page (php error) , no doubt ending up in a support ticket. As an example to this if "define" was accidental enteted as "dfine" that would cause it. If it was to be included I think it should not contain anything apart from the opening php tag perhaps, and be given a different file extension to prevent it overwriting those who already have one , for instance constants.php.dist
Ramsesx Posted October 7, 2018 Posted October 7, 2018 18 minutes ago, AndyF said: I would suspect the risk of that is people may play with it and break something, for instance a typo or suchlike would possibly result in a broken site or more likely a blank page (php error) , no doubt ending up in a support ticket. Don't think so, the average user doesn't opens any file, he even don't know what the constants.php file is about. So there should be no danger if there is a file _constants.php included by default. 18 minutes ago, AndyF said: If it was to be included I think it should not contain anything apart from the opening php tag perhaps, and be given a different file extension to prevent it overwriting those who already have one , for instance constants.php.dist That's what I wrote in my post: 2 hours ago, Ramsesx said: Why not just ship a file named like _constants.php If it doesn't contains (disabled) sample content (config options) and descriptions it doesn't makes any sense at all to include such a file.... The intention for the suggestion is to save more advanced users time.
Mark Posted October 7, 2018 Posted October 7, 2018 5 hours ago, Ramsesx said: Why not just ship a file named like _constants.php with some often used functions, for example: <?php /* ------------ In this file you can add some special commands and configuration options which alter the normal behavior of the Suite. We added some often used commands below. If you need to make use of them please just remove the // More help and explanation of this file please visit invisioncommunity.com/constantshelp Attention, be careful and only change this file if you really know what you are doing. ------------ */ //define( 'EMAIL_DEBUG_PATH', "pathtoyourfolder" ); // this configuration prevent the board from sending emails, you have to create a directory and make it writable //define( 'USE_DEVELOPMENT_BUILDS', TRUE ); // this configuration will give you the option to receive development builds in your acp //define('RECOVERY_MODE',True); //enable this line if you can't access your acp and if you need tools to recover your community //define('UPGRADING_PAGE', 'pathtoyourupgradefile'); // Here you can add the path to a replacement of your upgrade page Excluding the ones that need to be outside of settings for technical reasons and are generated in the AdminCP (like cache configuration), nothing in constants.php is really "often used" (otherwise they'd be a normal setting). The most common one used is USE_DEVELOPMENT_BUILDS which we're thinking of moving to a setting and even that is like less than 0.1% of communities.
bfarber Posted October 8, 2018 Posted October 8, 2018 Yeah, the moral of the story is, most of our clients don't need to use constants.php which is why we don't ship with it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.