PDA

View Full Version : How to get to my php.ini file?


christian8a
04 Aug 2008, 08:15
I know where is located, but how do I get to it?
like where do I put the url or what :confused:

Marco van Herwaarden
04 Aug 2008, 09:03
What do you want to do with it?

If you want to edit it, you will need to go to the command shell and edit the file with an editor like 'vi'.

nexialys
04 Aug 2008, 12:48
the best place to ask is the Support Ticket from your Host actually.... some hosts locate their ini in specific places, and usually they give permissions to use custom ones only to few of their clients, for obvious security.

SEOvB
04 Aug 2008, 20:09
if you're on vps or whatever and have SSH access

updatedb
locate php.ini

toonysnn
05 Aug 2008, 11:18
Are you on your own box or VPS?

Linux right...?
If so, these commands **SHOULD** work for you.
# updatedb
# locate

If Windows: C:\Program Files\PHP\php.ini :p

Marco van Herwaarden
05 Aug 2008, 12:13
I know where is located....
Guys he already stated in his first post the he does know where it is located.

christian8a
05 Aug 2008, 20:41
Yea, thanx for the replies ;) I know in my case would be /etc/php.ini
is a vps but I was looking for the SSH login but I dont have my password so I would ask for it and go from there.

The reason I need it was to change the memory limit to generate a xml map for my site, and is not letting me because it gets cut on half way.

Marco van Herwaarden
06 Aug 2008, 08:01
You might also be able to override some of the memory settings using a .htaccess file on your forum directory.

christian8a
08 Aug 2008, 19:23
You might also be able to override some of the memory settings using a .htaccess file on your forum directory.

really? can you help me how to do that :)
like what code to add to it

Marco van Herwaarden
08 Aug 2008, 19:52
You can create a .htaccess with lines like the following to override some php settings (if host has set to allow this):
php_value memory_limit 32M
Alternative might be to include a line like the following in your config.php (should do the same):
ini_set('memory_limit', 32 * 1024 * 1024);

nexialys
08 Aug 2008, 20:55
ini_set() in php files will not be active only if PHP is set with command_override ... some stupid hosts deactive that capability to avoid being pirated... (another urban legend!) so you can check your phpinfo(); to see if this "command_override" is present... if it is, you may not be able to use ini_set!

i think PHP 5 do not have this setting because of some new structure.

toadtje
08 Aug 2008, 23:31
Can one also set a string in config.php that overrides the 10mb attachments limit as well?

SEOvB
09 Aug 2008, 16:41
Can one also set a string in config.php that overrides the 10mb attachments limit as well?

Yes, add the php code from marco's post above