I want to use the php configuration settings of my localhost on my server. How can i do that?
-
Can you elaborate a bit? You mean, you want to configure PHP on your server exactly the same way it's configured on your local machine? What kind of server do you have, and what exactly do you want to configure?deceze– deceze ♦2011-02-23 07:45:26 +00:00Commented Feb 23, 2011 at 7:45
-
Does your server allows you to change the PHP configuration?Starx– Starx2011-02-23 07:49:42 +00:00Commented Feb 23, 2011 at 7:49
-
its apache and i don't know i am allowed or not?Sanket Raut– Sanket Raut2011-02-23 07:55:10 +00:00Commented Feb 23, 2011 at 7:55
2 Answers
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.
2 Comments
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.)