Question

I just started working a company that is having me build a program for them that allows them to access a database and work with the data.

They currently have a solution written in PHP, but its quite outdated, and I am not familiar with PHP. While I am building the new solution for them they asked me if I could at least just fix one issue with the current program. It is limiting the amount of records that can be uploaded and I believe it has to do with the php.ini having an upload limitation of 2M.

I understand that after changing this configuration setting that Apache would need to be restarted in order for the changes to take effect. I am concerned of other issues that may arise from a reboot. Considering that I do not know PHP very well and that this program has not been touched in over a year. Do I risk running into issues from changing this configuration and restarting Apache?

I guess I just have a fear that the program will not come back up after a reboot. Correct me if I am completely wrong for thinking this way, but I have a fear of code being loaded in RAM and if there were any changes with the code then the restart will load the new corrupted code. I would assume it would be unlikely that the code has been touched, but you never know.

I have been researching to try and understand the program. So far all I can find is that it is PHP and running Apache connecting to a Mysql DB and using something called MapServer?

Thanks ahead for your help.

Was it helpful?

Solution

It's always best to try and replicate your production environment on some other hardware or inside a virtual machine in order to test out any changes you're about to make. VirtualBox, for example, is free, as are many of the popular Linux distributions if that's what you're using.

You're right that a reboot can be trouble, but it's not for the reasons you're talking about. The biggest issues are, in order of frequency:

  • Configuration errors: apachectl -t should find these.
  • Missing directories: The httpd error.log should identify these.
  • Broken system software: Other error messages show up.

A production environment should always have the code there checked into a version control system so you can identify what changes, if any, have been made to it since the last reboot. If you don't have one of these, that's the first thing to fix. Git is the de-facto choice for this these days.

OTHER TIPS

There is no risk, in few seconds the server will be ready to serve the request.

A code change takes effect immediately, it doesn't need for the server to be restarted. So any corruption should already be there.

Just make sure you change the php.in correctly, otherwise you can break the configuration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top