Sanket Raut
Sanket Raut

Reputation: 87

PHP configuration

I want to use the php configuration settings of my localhost on my server. How can i do that?

Upvotes: 0

Views: 158

Answers (2)

giraff
giraff

Reputation: 4711

You can compare the current settings by looking at the current output of phpinfo() or, alternatively, var_dump(ini_get_all(null, false)).

Then, depending on the server you're using, you will add the values to change in a php.ini, or .htaccess, that you upload to the webroot folder of the server. (The production server may limit the capabilities, this is very common for example for the maximum memory directive.)

Upvotes: 0

Elzo Valugi
Elzo Valugi

Reputation: 27866

Usually you do it the other way around. You configure your local machine to resemble the server. That because the server usually are the production machines and have other limitations in terms of security. You can take a look at phpinfo() output and compile in the server exactly the same things.

Upvotes: 3

Related Questions