Joomla 3.2 Increase the upload_max_filesiz - php

I am trying to download this template on Joomla 3.2 extension manger :
http://scriptmafia.org/templates/115622-yt-moustache-yootheme-for-joomla-25-32.html
but every time I upload it, it gives me this error:
There was an error uploading this file to the server.
I have read articles about "increase the upload max size in the php.ini file".
I have tried to find this file in the administrator files section in Joomla, but it is "not found".
So how can I fix this problem? It has not happened for this template only, it has happened for several. So I am almost sure it is due to the upload size.

Edit your php.ini and increase *upload_max_filesize* and *post_max_size*; then restart your web server.
If you don't know where is your php.ini, create a php file to discover: echo php_ini_loaded_file();
The returned path is where your php.ini is located.
EDIT
Well, seems like you have a permission error and not size limit. Try to change permissions of the temp Joomla folder (you can see/configure it on Global Configuration > System).

If you are using XAMPP , php.ini file will be located in c:\XAMPP\php folder. Find the file and increase file upload size there.
If you are using WAMP, You can find ini file in /wamp/bin/php directory.
The location may vary from one OS to another.
You can follow this link:
http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/

You can call in your script ini_set function and change values, which have been stored in php.ini (any changes has affected only for current script, but not for global settings)
ini_set('post_max_size', "%value in MiB for example 16M%")
ini_set('upload_max_filesize', "%value in MiB for example 16M%")
You can read more about it at php.net

If you can't resolve the PHP limitation easily, an alternative is to FTP the installation file to the /tmp folder and in Extension Manager -> Install, use the "Install from Directory" option instead.

Had the same issue for the longest time, none of the answers helped. Found that if you are using GoDaddy, and go to your CPanel, scroll down to Software, then choose PHP version, switch to PHP Options, there you can change your upload file size. Hope this helps, took me forever to find it.

Some people might be having a issue with the memory allocation portion of php.ini file "memory_limit" the default for me was 128mb and i was attempting to upload nearly 300mb and it hit that roadblock. After changing the default value to 512mb and restarting the server i was able to get past this limit.

How to change post_max_size and upload_max_filesize in a local installation of Joomla 3 in XAMPP
You can check the php setting in two places – site’s backend under system information – go to php information. Or on browser go to localhost and click on phpinfo. You’ll find the post and upload part under “Core” heading.
Go to c:\xampp\php\
Find the file php.ini
Open php.ini in notepad
Find post_max_size and change value to 20M
Find upload_max_filesize and change value to 20M
Save the file
Logout out of your site backend.
Turn off apache and mysql on xampp and quit
Restart xampp as administrator
Turn on apache and mysql
Open browser and go to localhost
Open phpinfo and search for upload_max_filesize and post_max_size.
Confirm that changes are registered.

This can also happen with the following suhosin setting:
suhosin.upload.disallow_binary = On
Setting it to off temporarily allows you to upload zip files

If you use CPanel, search for PHP version (in the Software section) and click on it, then click on 'switch to PHP Options', the options will display then look for 'upload_max_filesize' and click on the value to change it. Do the same for 'post_max_size'.

Related

Increase PHP max_input_vars via web.config in IIS

I have a simple wordpress web site under a windows hosting, I know that a Linux environment is better for wp but I need windows for another ASP.NET application. Anyway wordpress show me an error message about max_input_vars set to 1000 and this value should be 4000, I can't edit the php.ini then I would like to know if is it possible to set this value in the web.config, I know that in Apache it can be set in the .htaccess so I hope that can be done in the web.config as well.
Thanks in advice!
EDIT
I have found a solution: I create a php.ini file with max_input_vars=4000 and I added it to wp-admin folder after that the error message disappear and checking the environment setting by PHP Settings wordpress plugin the max_input_vars value is 4000, I don't know if this is a best practice, but works, if someone has a better solution please explain it.
Thanks!
I know it's been a long time but i thought to post a solution for anyone who search about this issue.
Go to IIS and then from the right side there is an option to stop the server.. click on it.
Go to you default programs folder. Probably C: drive (C:\Program Files (x86)) then search for PHP folder.. probably you will find more than a version. choose the one you're using in wordpress.
Inside that folder you will find a file (php.ini) edit that file using notepad (you must start notepad using admin privilege).
It is a big file.. so search for (max_input_vars = 1000) and it is commented. so you have to remove the semicolon before the word max and then increase it to 4000. You may also search for memory_limit and increase it to 128m or more.
Save the file and make sure it is saved properly. try to open it again and make sure your changes are saved.
Return back to IIS and start the server.
Close the browser and open it again. Check your wordpress if the issue is cleared.
Good luck.
There are four modes in which the PHP directives can be set:
PHP_INI_USER
PHP_INI_PERDIR
PHP_INI_SYSTEM
PHP_INI_ALL
Please have a look at how these are managed: http://www.php.net/manual/en/configuration.changes.modes.php
Each directive has one of these changeability modes defined and for that you could visit: http://www.php.net/manual/en/ini.list.php
As you'd see, the changeability attribute for directive max_input_vars is PHP_INI_PERDIR, meaning it can be overridden by adding a custom value in either of php.ini, .htaccess, httpd.conf (Apache) or .user.ini. Therefore, defining a new php.ini file to increase the limit of max_input_vars is just as fine as the other three workarounds.
Please remember though that, at times, some of the extensions that PHP would use might need to be re-enabled in custom ini files. For instance, I've at times run into problems with pdo and mysqli being considered as disabled, unless explicitly set in the custom file too, when using an override ini file.

Upload Size PHP

I am developing a web application which will allow the administrator to upload a file and its max size is 500M.
I have changed the post_max_size = 500M and upload_max_filesize = 500M from 32M but the funny thing is that it does not allow me to upload files greater than 32M still.
I have restarted the server and everything and still cant get to upload a large file.
Is there any other setting i should change to allow me to upload the file?
I am not going to process the file in memory but move it to the tmp folder and than process from there with move_uploaded_file so memory_limit i am assuming that is not going to be affected.
It is a simple form and as i recall if the limit is exceeded in the $_FILES superglobal array i should see something in the error element of the array but instead i get an empty array.
EDIT: I am modifying the php.ini settings but from phpinfo i am still getting the sizes of 32MB. And the php error log says that obviously i am exceeding 32MB
Can you please help me out.
Thanks
Chech phpinfo() on a web page, see which php.ini is loaded. You could be editing the wrong file.
Sometimes different ini files get loaded for command line and apache server use
I fount out what the problem is:
I am using MAMP as a developing server and MAMP has templates which override the original every time the server starts (a stupid thing IMO) so you need to change the template for it to take effect!
The template can be found under /Applications/Mamp Pro/Contents/Resources
And there many php ini files for every version will be found.
Hope this helps to the next one!

Error in wordpress export

I am using WordPress 3.5.2 version. When i try to export xml file it show me this type error.
What i have to do.
File not found
Firefox can't find the file at http://example.com/wp-admin/export.php?download=true&content=posts&cat=0&post_author=0&post_start_date=0&post_end_date=0&post_status=0&page_author=0&page_start_date=0&page_end_date=0&page_status=0&submit=Download+Export+File.
Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.
Here 's an update. Ran into the same exact problem, and..
It 's positive, it 's a memory issue. Just like what jjava00 said above, increase the memory_limit.
File to edit : php.ini
Line to edit : 232
string : memory_limit = 32MB.
If you can't find it on line 232, search for this string memory_limit, you 'll get there for sure.
Not sure if each hosting has the same default setup, but my default is 32MB. I increased it to 64MB.
Not all of us have this privilege to edit this php.ini file. Including me. I 'm on a shared hosting. So here 're what I did:
I edit the php.ini of my local apache - set the memory_limit to 64MB. (I use appserv)
Upload it to the root of my web dir (www or public_html or htdocs or whatever).
.. and That 's it.
The export.php script can then create the xml file we need to download - as now there 're enough memory resources to do so, and it can be downloaded. Problem solved.
Source: WordPress Forum
Let me know if there have also problem.

How to access the php.ini file in godaddy shared hosting linux

I have a web, and running well on my localhost.
After I Upload on my godaddy hosting, My web got a bug. the conclusions is, I MUST change the memory_limit on the php.ini file, BUT cant find php.ini on FTP manager.
I have tried to:
Find the way for change to the Classing FTP manager.
Create / upload php.ini file from local and not work.
My Questions is : How I can Fix this? I Must change php.ini file.
does anyone have experience like me?
Create php.ini file with your desired setting and upload it in your root folder of server. It will take effect with this new setting.
You can't edit the php.ini file of godaddy server, but you can upload your own copy of your php.ini with your new setting.
This new setting will be available only to you. Other websites will not be affected with this new setting.
Previously I faced the same issue, but after doing this my problem was resolved.
Procedures:
Go to your CPanel
Select PHP version
Click on the link Switch to PHP options
Edit your configuration
don't forget to click save
You can also follow this screencast
https://www.youtube.com/watch?v=tdUlIkZcOe0
As pointed out by #Jason, for most shared hosting environments, having a copy of php.ini file in your public_html directory works to override the system default settings. A great way to do this is by copying the hosting company's copy. Put this in a file, say copyini.php
<?php
system("cp /path/to/php/conf/file/php.ini /home/yourusername/public_html/php.ini");
?>
Get /path/to/php/conf/file/php.ini from the output of phpinfo(); in a file. Then in your ini file, make your amendments
Delete all files created during this process (Apart from php.ini of course :-) )
To check whether your php.ini file takes effect, open a plain text editor and create a file called phpinfo.php. Insert the following line:
<?php phpinfo(); ?>
Save this file to the root of your Web site and then browse to yourdomain.com/phpinfo.php to test the settings.
Septiyo,
You need to create your own php5.ini file and upload it to your root directory. Using GoDaddy (as I do) you do not have control over the web/conf/ folder to make any changes to their version. Be sure if you're using PHP5 to name your file php5.ini or php.ini for PHP4. Upload it to your root folder, then restart your page, then check using phpinfo() to see if the directory of your php file has changed correctly.
For more information, check this link out.
http://www.ostraining.com/blog/coding/phpini-file/
if you don't have a good copy of your php5.ini file in your home directory (a predicament that I recently found myself in), you'll need to follow a little multi-step process to make your changes.
Create a little code snippet to look at the output of the phpinfo() call. This is simple, and there are multiple web-sites that describe this process.
Examine the output of phpinfo() for the row which contains Configuration File (php.ini) Path. Mine was in /usr/local/lib, but your's may be a different path (depends on hosting level purchased).
GoDaddy will NOT simply copy this file into your home directory for you --as silly as that sounds! But, you can write a little php program to copy this php.ini file into your home directory. The guy at
https://www.jabari-holder.com/blog/how-to-get-godaddys-php5-ini-file/
has a drop-box with this code snippet, if you care to use it. Just
take care to modify two things:
a. change the path you read 'from' to match the path you uncovered in Step 2.
b. change the output file-name to something of your choosing. You're going to re-name this file in a later step anyway. Let's call our copied file Foo.ini (but it can be anything).
Rename Foo.ini to .user.ini (for most GoDaddy account types).
Create a new php.ini file with your desired settings and upload it to public_html folder of your Godaddy Hosting Account.
By default, Godaddy doesn't allow to edit it's existing php.ini file. However, you can always upload your own copy of your php.ini file with your own settings.
Below is an example of a simple php.ini file with some custom values:
max_execution_time 600
memory_limit 128M
post_max_size 32M
upload_max_filesize 32M
I had this exact problem with my GoDaddy account.
I am running the Linux hosting with cPanel
follow these steps and you should be fine if you are running the same hosting as me:
first, go to you Manage Your Hosting -> Manage
then you will see a section called Files, click on File Manager
you can select the Document Root for: yourwebsite.com then click GO
this should bring you right away in the public_html folder
in that folder, you can add a file (by clicking the +File in top left corner), call it phpinfo.php
right click that new file, and select edit :
right this in it and save changes:
<?php phpinfo(); ?>
it the same public_html folder, add another file called php.ini
edit this one too, right those lines:
max_execution_time 600
memory_limit 128M
post_max_size 32M
upload_max_filesize 32M
now, go back to your Manage Your Hosting -> Manage, look for PHP Process
click Kill Process, this will allows a refresh with your new settings. you are good to go
side note: you can see your new settings by navigating to yourwebiste.com/phpinfo.php
I found a guide to reload the php5.ini file or load a new one right away. You will need to access your Godaddy hosting panel where you will find the option "system process" do a restart there and it will load the php5.ini or php.ini file right away.
2 external guides to assist you:
http://support.godaddy.com/help/article/5980/managing-system-processes-on-linux-hosting-accounts
http://www.studio-owens.com/blog/GoDaddy-and-Your-php-ini-File.htm
For some hosting accounts, I'm on Ultimate Classic Linux, the file name you need to use is .user.ini.
It's an older question, but if anyone has a problem with setting this, their documentation is outdated. I made a copy of the php.ini file named php5.ini and now it works.
Follow below if you use godaddy shared hosting..
its very simple:
we need to access root folder of the server via ftp, create a "php5.ini" named file under public_html folder... and then add 3 stupid lines... also "php5" because I'm using php5.4 for 1 of my client. you can check your version via control panel and search php version. Adding a new file with php5.ini will not hamper anything on server end, but it will only overwrite whatever we are commanding it to do.
steps are simple:
go to file manager..
click on public_html..
a new window will appear..
Click on "+"sign and create a new file in the name: "php5.ini" ... click ok/save. Now right click on that newly created php5.ini file and click on edit... a new window will appear... copy paste these below lines & click on save and close the window.
memory_limit = 128M
upload_max_filesize = 60M
max_input_vars = 5000
Not php.ini file, but a way around it. Go to GoDaddy's
Files > Backup > Restore a MySQL Database Backup
Choose your file and click Upload. No timeouts. Rename the DB if needed, and assign a user in
Databases > MySQL Databases

Acquia Drupal 7 - php upload limit won't change

I'm working with acquia-drupal 7 (just localhost for now), inside Microsoft WebMatrix.
I can't get my php upload limit to increase from the default 2MB. Having googled around I have done the following:
added to every existing htaccess:
php_value upload_max_filesize 10M
php_value post_max_size 10M
created php.ini file in every dir that had an htaccess (no php.ini files existed anywhere) containing the following:
upload_max_filesize = 10M
post_max_size = 10M
Restarted the site (through the Webmatrix GUI)
No apparent change whatsoever after any of this - my site still has the 2MB upload limit.
Thoughts?
The reason your changes are not taking affect are because you just created a php.ini file anew, rather than finding the one that is being used.
By definition, since you just created it, it won't be the one that exists in your php directory. :-)
But don't worry! There's an easy way to find the correct php.ini file that your site is using:
Go to /admin/reports/status on your drupal site. Here you will see information about which version of php and apache you're using, etc.
The line for 'PHP' on that page should have both the version of php you're using (something like 5.3.6) and a 'more information' link
Click on that link and you should be able to see detailed information about the php installation on your machine.
Find the line called 'Configuration File (php.ini) Path' on that screen and navigate to that to update it.
Just like you already knew, make sure you restart your server after any changes. :-)
Let us know if this fixes your problem!
Have you ever ran into a problem where you needed to upload relatively large files and still want to be able to manage these from the Drupal 7 administrative interface? If so, you may run into a situation like the one below:
You will notice the 12 MB text stating that we can only upload files that are 12 MB and under. In this case I needed this number to be a little bigger.
In order to do this you will need to modify your PHP settings in your php.ini file.
Note: You should make sure you know what you are doing and understand the consequences of increasing this number. In my case this is on a site that only users that I trust will be uploading files. If you allow any user to upload files, increasing this number can add an increased load on the server and possible eat up your disk space pretty quickly.
Now that you have been warned, here is how I was able to do this. I first found the php.ini file on my system. I am on an Ubuntu server so I was able to get to edit mine using vim like so:
vim /etc/php5/apache2/php.ini
Change the upload_max_filesize setting
The first step was to find the upload_max_filesize setting from 12MB to 30MB.
Change:
To:
Change the post_max_size setting
You may also need to modify the post_max_size setting. I changed the post_max_size php.ini setting from 20MB to 30MB.
Change:
To:
Restart Apache
You should check phpinfo to make sure your php.ini which you edited is the correct one.

Categories