0

I can easly change and custom all php.ini-s for each domain, however, i don't know how to customize the core one?

I want to be able to limit some settings globally but i don't know which php.ini is the core one?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
mariotanenbaum
  • 382
  • 5
  • 14
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Feb 26 '15 at 09:40

1 Answers1

1

Create a simple document in a web root (for example, named test.php and put the following in it:

<?php
phpinfo();
?>

Then access that page with a web browser. For example http://mydomain.com/test.php. You will be shown, among a lot of other information, where your master php.ini file is.

According to Plesk's own documentation:

Usually the php.ini location is /etc/php.ini. PHP modules *.ini files are placed in /etc/php.d. Also, you can find which configuration files are used by PHP by using a script with the phpinfo() function:

From Plesk's support forums:

PHP loads additional configuration files from /etc/php.d folder. As example, /etc/php.d/00-ioncube-loader.ini. These ini files are configs for PHP extensions.

Wesley
  • 32,690
  • 9
  • 82
  • 117
  • Unfortunately i can't see that http://data.ba/php.info.php – mariotanenbaum Apr 10 '13 at 18:20
  • @mariotanenbaum You can't? I can: http://i.imgur.com/9wGbdPL.png – Wesley Apr 10 '13 at 18:36
  • First one is jsut set of ini-s for verious modules and sedond one is domain specific one. – mariotanenbaum Apr 10 '13 at 19:01
  • @mariotanenbaum Right. Do you have an `/etc/php.ini` file? Plesk says that's where the main one is that is honored by the control panel. – Wesley Apr 10 '13 at 19:24
  • No i don't. I know for CP but i have plesk on this server. – mariotanenbaum Apr 10 '13 at 19:25
  • run `updatedb` then `locate php.ini` to find all php.ini files. Note that you should never modify the one at `"/usr/local/psa/admin/conf/php.ini` – Wesley Apr 10 '13 at 19:27
  • I did that & i just decided to go to each and every and place some hooks to identify it :D – mariotanenbaum Apr 10 '13 at 19:32
  • Main php.ini that is being used if the one at ../domain.ltd/etc/php.ini is missing is at /etc/php5/cgi/php.ini. Also, if i change some settings at "/usr/share/php5/php.ini-production", that is being replicated on every newly created domain. I'm thinking of making cron which will erase all default php.ini-s. I REALLY DON'T UNDERSTAND HOW IS THIS POSSIBLE. Some dickhad in Parallels decided to do this leaving users without any article about it and forcing them not to be able to have global php.ini... – mariotanenbaum Apr 11 '13 at 06:05