Jump to content
Sign in to follow this  
Followers 0

php upload limit

21 posts in this topic

Posted

ok so I have spent hours on this and am clearly a noobie missing something...

 

I want to change the php upload limit currently i can't upload a 6mb file.

 

I have read around and have played with all these values in the php.ini file

  • file_uploads
  • upload_max_filesize
  • max_input_time
  • memory_limit
  • max_execution_time
  • post_max_size

no luck... I am using ajaxplorer5 and in it's settings it correctly shows the upload max that I put into the php.ini file. but when i try to upload a tiny 6mb document. it says it's too big. kinda stuck and can't find a guide that talks about anything but those values

 

running ubuntu 13.04 and havent' really changed anything from default. (apache2.xxxx restarted it a few times, no luck)

 

thanks in advance

Share this post


Link to post
Share on other sites

Posted

OK, so you have attempted to change it for PHP.  How about your web server config?

Share this post


Link to post
Share on other sites

Posted

Are you changing it in the correct location?

Have you created a phpinfo file to view what the actual config is showing?  This will also show the correct location.

Share this post


Link to post
Share on other sites

Posted

create a php.ini file on the root (public_html) folder and add the following code to it.

 

php_value upload_max_filesize ??M (M = MB) (?? = Number you want)

Share this post


Link to post
Share on other sites

Posted

OK, so you have attempted to change it for PHP.  How about your web server config?

not sure what you mean... do i need to change something in apache config files? I quickly googled and couldn't find what you mean

 

 

Are you changing it in the correct location?

Have you created a phpinfo file to view what the actual config is showing?  This will also show the correct location.

location is /etc/php5/cli/php.ini

I realized that there it one also located in /etc/php5/apache2/php.ini

I edited both, no luck. searched 

 

I tried doign a phpinfo file. basically made a file with .php and put this code in it

< ?php
echo phpinfo();
?>

 

don't REALLY know what to do after this... :(

Share this post


Link to post
Share on other sites

Posted

Try what illage3 said.. I think this would work

Share this post


Link to post
Share on other sites

Posted

What folders do you have in  /etc/php5?

Share this post


Link to post
Share on other sites

Posted

What folders do you have in  /etc/php5?

apache2, cli, conf.d, mods-available

 

 

Try what illage3 said.. I think this would work

trying, the directions aren't noob friendly so struggling a bit. .

 

I made a phpinfo.txt file it's 300 lines. looking in it, I am finding these lines that seem important

 

Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
...
Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \>  => \b \> 
...
post_max_size => 2000M => 2000M
....
upload_max_filesize => 2000M => 2000M

Share this post


Link to post
Share on other sites

Posted

not sure what you mean... do i need to change something in apache config files? I quickly googled and couldn't find what you mean

 

 

location is /etc/php5/cli/php.ini

I realized that there it one also located in /etc/php5/apache2/php.ini

I edited both, no luck. searched 

 

I tried doign a phpinfo file. basically made a file with .php and put this code in it

< ?php
echo phpinfo();
?>

 

don't REALLY know what to do after this... :(

 

You should see a lines like this:

 

Loaded Configuration File	/usr/local/lib/php.ini
max_file_uploads	20	20
upload_max_filesize	40M	40M

That shows what file you need to change, and what two values.

Share this post


Link to post
Share on other sites

Posted

Try what illage3 said.. I think this would work

 

create a php.ini file on the root (public_html) folder and add the following code to it.

 

php_value upload_max_filesize ??M (M = MB) (?? = Number you want)

 

I have tried this many times over the years, and not once with the software I was using at the time did it work.

Share this post


Link to post
Share on other sites

Posted

I have tried this many times over the years, and not once with the software I was using at the time did it work.

 

Hmm not sure then, It definitely works for me and clients on my server.

 

Maybe the setting to allow user php.ini files is disabled on yours?

Share this post


Link to post
Share on other sites

Posted

I'm running CENTOS 6.4 x86_64 standard though so not sure if settings are the same

Share this post


Link to post
Share on other sites

Posted

Before doing anything in the php.ini file you need to ask the webhost to see if its okay to edit it.

Share this post


Link to post
Share on other sites

Posted

You should see a lines like this:

 

Loaded Configuration File	/usr/local/lib/php.ini
max_file_uploads	20	20
upload_max_filesize	40M	40M

That shows what file you need to change, and what two values.

my loaded file is different... path is /etc/php5/cli/php.ini

I have the other two lines, file uploads is how many files I upload at the same time, i left it at 20. upload max is set to 2000M which is where i want it. 

 

I looked in the usr directory and found php.ini-production, php.ini-development, php.ini-production.cli, and php.ini-production-dist

 

they are located under /usr/share/php5/

 

 

Before doing anything in the php.ini file you need to ask the webhost to see if its okay to edit it.

 

this is just a tiny ubuntu VM that I am running myself. so I can change whatever I want.

Share this post


Link to post
Share on other sites

Posted

Is this a home coded PHP script that you are using for the upload?

Share this post


Link to post
Share on other sites

Posted

http://ajaxplorer.info/f/topic/2m-file-upload-limit-editing-php-ini-not-working/

 

Is there an option in the conf.php to change this?

I don't know where that file is... I read that it's how you changed settings in the older versions and I am supposed to use the admin portal in version 5. 

[url=http://postimg.org/image/sbg9wirpp/]ajaxplorer.jpg[/url]

 

notice in the image the file size is 2000. this is the same number i used in the php.ini files

 

per the documentation I am supposed to put in zero and save and the next time i open it it should give me the correct number from the php.ini file

 

this is what i actually get when i do that.... 

 

[url=http://postimg.org/image/cvjunjs2r/]ajaxplorer.jpg[/url]

 

where is -1149239296 coming from!! 

Share this post


Link to post
Share on other sites

Posted

OMG i got it to work... i am so ashamed. it's using the php notation and i wasn't putting in the letter so 2000 wasn't 2G or 2000M...... Told you this was a noob error... Ajaxplorer settings let you lower the value below php.ini but not make it higher so it didn't matter how high i was setting the values in php.ini, aja was setting the size to a tiny tiny number. 

 

Nashy, thanks very much for helping me through this. I was initially updating the php.ini file located in /etc/php5/cli/ folder and you helped me realize there is another one.

 

I am sure I will be back with more issues. thanks a lot to everyone

1 person likes this

Share this post


Link to post
Share on other sites

Posted

Can you give a screen shot of the error you get when attempting to upload?

Share this post


Link to post
Share on other sites

Posted

OMG i got it to work... i am so ashamed. it's using the php notation and i wasn't putting in the letter so 2000 wasn't 2G or 2000M...... Told you this was a noob error... Ajaxplorer settings let you lower the value below php.ini but not make it higher so it didn't matter how high i was setting the values in php.ini, aja was setting the size to a tiny tiny number. 

 

Nashy, thanks very much for helping me through this. I was initially updating the php.ini file located in /etc/php5/cli/ folder and you helped me realize there is another one.

 

I am sure I will be back with more issues. thanks a lot to everyone

 

Glad you got it sorted!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.