PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 22, 2022

[FIXED] Cannot edit php.ini file in Docker

 January 22, 2022     docker, php     No comments   

Issue

I'm trying to edit the php.ini inside Docker, so I need to do docker-compose up. But every time I do docker-compose up, php.ini returns as it was before.


Solution

Better to mount the php.ini from the host, as docker-compose up will terminate the container and will launch a new container which does not container the modified php.ini.

volumes:
   - ./config/custom.php.ini:/etc/php(version)/apache2/conf.d/custom.php.ini

By default the scan directory for extra php files will look in the conf.d directory. These files will overwrite the settings of the main php.ini. I tested this with the asp_tag option turning it Off and On. It works fine as long as you do the following below.

The trick to making this work is to use docker-compose down instead of docker-compose kill

you can check further here and here



Answered By - Adiii
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing