I have noticed that in Wampstack-5.6.28-1, under ..\php, there is php.ini-development and php.ini-production. How do I tell the system which one to use, please ? I assume that there must be some sort of config file but I cannot find it.
[RESOLVED] PHP.INI FILES CONFUSION
I believe the two basic choices would be to either copy the desired ini file and overwrite the file currently being used, or else change the Apache config to use one of them via the PHPINIDir directive.
php.ini isn't distributed under that name because you're likely to customise it for your own circumstances, and you wouldn't want your customisations to be overwritten when you upgrade.
And, typically, the production one contains settings that are more apt for production servers (more secure, sanity resource limits, etc.). The development version might have display_errors set true, etc.
davidmorley;11058761 wrote:I have noticed that in Wampstack-5.6.28-1, under ..\php, there is php.ini-development and php.ini-production. How do I tell the system which one to use, please ? I assume that there must be some sort of config file but I cannot find it.
Just wondering if wampstack bothered to create its own PHP.ini when you installed. If so, don't worry about it?
But, as others have described here, those are two sample INI files which reflect the different possible types of install you might want. If you are talking about your development workstation where you write all your code, then you probably want the development one (more error reporting and informative messages). If you are talking about your live server that is exposed to the entire world, then you should use the production one.
It gets worse. I have a shocking blind spot. I think that I have missed the train completely. You seem to say that I have to take one of theses files and put it somewhere else. Put it where ?
I just want to tell you what I've been doing so we are on the same page. I have selected a package from Packagist, call it smith/jones. Then, using the W 10 command prompt I have gone into \wampstack...\php> and entered the composer instruction ..>composer require smith/jones or what ever the Packagist instructions told me to write. After this, I have noted that \PHP now has a folder called vendor and that it has a sensible looking .json file in it. I then copied this folder vendor into apache2\htdocs and I have then added a suitable index.php to apache2\htdocs. Finally I call up the application by writing http://htdocs/index.php. I assumed that at this point apache2\htdocs had all the information needed and that if everything worked I would then use my FTP tool to move index.php and \vendor to the external server.
I have not copied any files like php.ini-production to any other folder.
davidmorley;11058831 wrote:It gets worse. I have a shocking blind spot. I think that I have missed the train completely. You seem to say that I have to take one of theses files and put it somewhere else. Put it where ?
PHP is compiled to assume certain default values for all of its configuration. These can be overridden with a php.ini file. You can see which ini file is being used on your system by running the command phpinfo and looking for Loaded Configuration File. This should tell you which php.ini (if any) has been loaded. You can either edit this file (and restart apache) or you can make a backup of it and replace it with another file of the exact same name -- you could try copying either your dev or production ini files, for example.
davidmorley;11058831 wrote:I have selected a package from Packagist...
I'm not especially familiar with packagist or composer. If you have specific problems you are encountering, you'll need to be very specific.