Erik159 Posted October 1, 2019 Share Posted October 1, 2019 Hi, I don't know if this is even possible, but I need to copy configuration of existing server to my localhost (using XAMPP on windows). I only have full output of phpinfo() function from that server (I don't have access to php.ini), and I would like to change my localhost server to behave exactly like remote one. Is this even possible? Is there some more "automatic" solution, than just going through bunch on lines of code and trying to change them? Furthermore, remote server has much longer configure command, as well as list of additional .ini files parsed... how to change these? Quote Link to comment https://forums.phpfreaks.com/topic/309306-copy-server-configuration-from-phpinfo-output/ Share on other sites More sharing options...
mac_gyver Posted October 1, 2019 Share Posted October 1, 2019 if php can read it to load it, you can read it to make a copy - <?php $in_file = 'C:\xampp\php\php.ini'; // path to the php.ini, can be found in the phpinfo() output under - Loaded Configuration File $out_file = 'ini.org'; file_put_contents($out_file,file_get_contents($in_file)); Quote Link to comment https://forums.phpfreaks.com/topic/309306-copy-server-configuration-from-phpinfo-output/#findComment-1570143 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.