change php.ini location
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
change php.ini location
Hi,
I need to change the location of the php.ini file that is loaded by joomla. Any idea how I can tell joomla where the new location is?
Thanks!!
I need to change the location of the php.ini file that is loaded by joomla. Any idea how I can tell joomla where the new location is?
Thanks!!
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: change php.ini location
Why bother changing the location ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
Because joomla is not detecting the correct location. I have a server with multiple IPs and Joomla is using the one at the root of the server instead of using the one at the root of the IP.
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
It is not a cache problem.
When I go in the --> "system" --> "system information" --> "PHP information" the location written under the --> "Configuration File (php.ini) Path" or "Loaded Configuration File" is wrong. It gives the php.ini at the root of the server but it should be the php.ini at the base of the IP.
I need to change this.
I don't see what the template or favicon has to do with this. (?)
EDIT: just to add more info. I have a component that uses the php.ini file config to do things. When I change the config of the PHP.ini at the root of the server it works. When I change the config of the PHP.ini of the IP, it doesn't. Why? because joomla is using the php.ini at the root of the server but it should be using the one at the root of the IP.
so... How do I tell joomla what php.ini to use? (or change the location of the php.ini)
When I go in the --> "system" --> "system information" --> "PHP information" the location written under the --> "Configuration File (php.ini) Path" or "Loaded Configuration File" is wrong. It gives the php.ini at the root of the server but it should be the php.ini at the base of the IP.
I need to change this.
I don't see what the template or favicon has to do with this. (?)
EDIT: just to add more info. I have a component that uses the php.ini file config to do things. When I change the config of the PHP.ini at the root of the server it works. When I change the config of the PHP.ini of the IP, it doesn't. Why? because joomla is using the php.ini at the root of the server but it should be using the one at the root of the IP.
so... How do I tell joomla what php.ini to use? (or change the location of the php.ini)
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: change php.ini location
My bad I misread the post. OK the main php.ini file is server root. That location is set but you can use local php.ini files ... however those files are often not recursive. You can change many php settings in a .htaccess files and that is recursive.
If you look at the 'Loaded Configuration File' you will see the location of main php.ini file. If you look further down you will see two headings ... one is the Local value the other is the Master value. The former will show differently if you have a local php.ini file (or changed settings in the .htaccess).
If you look at the 'Loaded Configuration File' you will see the location of main php.ini file. If you look further down you will see two headings ... one is the Local value the other is the Master value. The former will show differently if you have a local php.ini file (or changed settings in the .htaccess).
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- Per Yngve Berg
- Joomla! Master
- Posts: 30937
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: change php.ini location
Joomla does not use any php.ini file. It's used by php and Joomla runs of top of that with the configuration that php have on the server.AlohaYoga wrote:so... How do I tell joomla what php.ini to use? (or change the location of the php.ini)
- AMurray
- Joomla! Exemplar
- Posts: 9744
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: change php.ini location
Interested in knowing which component has to use specific settings in the PHP.ini and why....what settings specifically is it needing to use?
Regards - A Murray
General Support Moderator
General Support Moderator
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
In the system, joomla is choosing a php (as described above) In this case it is choosing the root php.iniPer Yngve Berg wrote:Joomla does not use any php.ini file. It's used by php and Joomla runs of top of that with the configuration that php have on the server.AlohaYoga wrote:so... How do I tell joomla what php.ini to use? (or change the location of the php.ini)
I am guessing that to have a server with multiple IPs and joomla on it is rare. But, in this case, Joomla is choosing the one located at the root of the server instead of the php.ini file located at the root of the IP.
Anyway, I'm guetting from the responses that joomla can't change the location of the php.ini file since it was probably not built for multiple IPs on a server. So, instead, I'll tell you want I need IN the php.ini.
One component needs "allow_url_fopen" to be "on". I wanted to avoid the htaccess option and get a truly clean choice of turning on "allow_url_fopen". I also, don't necessairly want it to be "on" for the whole server. As you probably know, servers with multiple IPs, which have WHM and cpanel, can adjust the php.ini settings for each IP. It would be a pain to only have a global file, you can imagine.
Nevertheless, joomla is not using the local php.ini (the one on the dedicated IP where the joomla is located) but the root php.ini of the server.
So, I'm looking for ideas
Thanks everyone for your input.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: change php.ini location
Also see http://www.webhostinghub.com/help/learn ... -recursiveAlohaYoga wrote:Joomla is not choosing the php.ini. Also as I said before local php.ini files are not always recursive. To check if the values in the local php.ini are being honoured look at their values in "system" --> "system information" --> "PHP information"Per Yngve Berg wrote:... But, in this case, Joomla is choosing the one located at the root of the server instead of the php.ini file located at the root of the IP.....Webdongle wrote:If you look at the 'Loaded Configuration File' you will see the location of main php.ini file. If you look further down you will see two headings ... one is the Local value the other is the Master value. The former will show differently if you have a local php.ini file (or changed settings in the .htaccess).
search google for
php.ini recursive
and
allow_url_fopen htaccess
Is the reseller Hosting package that you have managed by the Host or are you trying to manage it yourself ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
Thanks I will look up php.ini recursive and yes it is a server managed by a Host.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: change php.ini location
Then you will need to ask them about what they allow with local php.ini files.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- leolam
- Joomla! Master
- Posts: 20652
- Joined: Mon Aug 29, 2005 10:17 am
- Location: Netherlands/ Germany/ S'pore/Bogor/ North America
- Contact:
Re: change php.ini location
Joomla does not chooses the php.ini. Joomla uses the directives as given in your php.ini so simply the php.ini as loaded by your host is wrong. Connect with your hosting provider
Leo
Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -
- Per Yngve Berg
- Joomla! Master
- Posts: 30937
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: change php.ini location
Sorry, did not understood what you meant by "multiple IP". The term you are looking for is "Virtual Hosts", where each site have it's own Web Root.
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
Thanks everyone. I contacted my host.
Yes, I should have said VPS.Per Yngve Berg wrote:Sorry, did not understood what you meant by "multiple IP". The term you are looking for is "Virtual Hosts", where each site have it's own Web Root.
- Per Yngve Berg
- Joomla! Master
- Posts: 30937
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: change php.ini location
Virtual Hosts is a feature of the Apache Web Server. It's configured in the apache.conf file. It's not the same as VPS.
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Sat Jul 23, 2016 4:03 pm
Re: change php.ini location
So... just to give the end result. it is currently not possible. Here is the message from my host:
Thanks for eveyone's contribution.https://forums.cpanel.net/threads/user- ... ng.605191/
"This was brought up as a part of internal case CPANEL-12426. The issue here is that" allow_url_fopen "is considered a global PHP configuration value, and thus enabling it on a per-domain basis is not allowed when it is disabled in the global PHP configuration file. "
therefore we believe that this is a problem directly with cPanel and in this case with suPHP.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: change php.ini location
Change Hosts
https://docs.joomla.org/Security_Checkl ... _url_fopenEnable and use allow_url_fopen to allow Joomla's One-Click-Update to work properly
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".