Jump to content

[SOLVED] Where is my php.ini???


davegfx

Recommended Posts

Hi

 

First off - apologies - i'm not a coder so this may sound very amateur.

 

I'm having an issue with files being uploaded via a submission form.  Files under 2mb are fine.  Files over 2mb are not.  I've deduced that this is being caused by a setting (upload_max_filesize) in php.ini.  I ran php.info and the information from there seems to corroborate this:

 

upload_max_filesize 2M  (local)     2M (master)

post_max_size    8M    8M

 

I assume if i want to allow files of up to 50MB to load that i need to change these settings.  Now - the problem - where do i find this ini file?

 

The php.info says its located: 

 

Configuration File (php.ini) Path /usr/lib

Loaded Configuration File /usr/local/lib/php.ini

 

So, how exactly do i access this?  And if i change those settings, do i need to modify anything else? 

 

Is max_input_time  or max_execution_time going to affect large files as well??

 

Thanks!

 

 

Link to comment
Share on other sites

you could upload a php.ini to your web root with this as the contents

 

upload_max_filesize = 50M

 

that should override only that setting from the regular php.ini

 

 

That only works on servers configured to parse php as cgi.

Link to comment
Share on other sites

So, how exactly do i access this?

 

Do you have shell access to your server or are you on shared hosting?

It's shared so does that mean I don't have access?  In cpanel, there is a setting called PHP CONFIGURATION but it says "only the server administrator can change these settings"

 

You could do:

 

In your .htaccess:

 

php_value upload_max_filesize 70M
php_value post_max_size 70M

 

I tried this but ended up with the following error when the site reloaded:

 

"he server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@collingwoodmanagement.ca and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. "

 

I will try the route suggested by taquitosensei now and see what happens. 

 

Link to comment
Share on other sites

Sorry thorpe, when i click the link i go to this.  Can you confirm thats what you meant?

 

You could do:

 

In your .htaccess:

 

php_value upload_max_filesize 70M
php_value post_max_size 70M

 

or using php's ini_set:

 

<?php
ini_set('max_upload_filesize', 73400320);
?>

 

Change the values to your needs.

Link to comment
Share on other sites

To answer your question, Log into root via SSH with Putty (If on windows), then type.

 

nano /usr/local/lib/php.ini

Nah, on Mac, any other suggestions?

 

Well you would have to find a similar program for mac that can emulate the shell login.

 

Bash is mac's default shell, point is, the op doesn't have shell access.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.