finding: php.ini, .htaccess (for editing upload max size)
I've searched around, and I've found the string I need to add to my ".htaccess" or "php.ini" file in order to circumvent the 2MB file upload limit I currently have.
HOWEVER, this presupposes that I can *find* these files!
1) I can't find a php.ini file anywhere. Where should I look?
2) There are .htaccess files in several folders. Should I use the one in my subdomain (example.com/public_html/drupal, where I have Drupal), or on my main site (example.com)?
3) Which file is better to edit? Should I do both, or just one?
4) Where in particular do I add the string (assuming there is no comparable upload_max phrase in the file already)?
Yes, this is my fourth "help me, my technology skills are below the assumed Drupal entrance threshold" topic - sorry :-/
~Ethan

(no title)
Using php.ini or .htaccess are two alternatives. One of them is enough, assuming that it works.
php.ini is a file which you must take from your server, copy to your Drupal installation directory, and modify it by adding the two lines at the end. It is not certain where on your server you can find it. It may be in /usr/local/Zend/etc/php.ini or in /usr/lib/php.ini or in /usr/bin/php/php.ini or in /usr/local/lib/php.ini or in /usr/local/bin/php/php.ini or... You may need to ask your host. If your host supports this method, it will work for sure.
.htaccess can do that as well in most cases, and it is more accessible. You can use either the one in drupal, or the one in your web root, which will affect all subdirectories including drupal, or both. It doesn't matter much where you put the two lines in the file, you could put them right on the top. The syntax is slightly different from php.ini.
About the values you need to add, the php documentation says that for upload_max_filesize to work:
- post_max_size must be bigger that upload_max_filesize
- memory_limit must be bigger than post_max_size
There is also a Drupal limitation (by design) which won't let you upload a file bigger than half your post_max_size. So, to be able to upload 8M files you could use (for example):
In php.ini, at the end:
upload_max_filesize = 8Mpost_max_size = 16M
memory_limit = 24M
Or, in .htaccess, any place.
php_value upload_max_filesize 8Mphp_value post_max_size 16M
php_value memory_limit 24M
To check if your changes with either method worked, you can upload and run a php file containing the line
<?php phpinfo();>or you can install the http://drupal.org/project/systeminfo module.If you have the upload module enabled (a core module), then you can also see what Drupal will allow in the /admin/settings/uploads page.
Also...
Thank you very much! I have two MORE questions now... :-p
1) What does the "memory limit" do?
***2) Instead of clicking "Edit File," I actually deleted the .htaccess file from my server at one point! I restored it, but it was blank, without the Drupal code and info that had been there before. It doesn't seem to be affecting anything yet (though I had to reset the password on my cpanel)... anything I should do to get that back to how it was?
Thanks,
~Ethan
=-=
increases the amount of RAM that can be used on the server. Doing so avoids blank screen apache errors.
download another drupal package and upload the .htaccess file that comes with it.
The search tool on Drupal.org really does work.
This message has been brought to you by:
the letter X , the letter Z and the number 2.
Thanks for watching! : )
(no title)
1. memory_limit sets the max php memory size that drupal can use on the server. On most servers that is set to 8M by default, which is not enough when you start installing modules, so changing to 24M or 32M or more is often necessary. See:
http://drupal.org/node/29268
2. Drupal's .htaccess file is included in the tar.gz package of your drupal version (a newer one will do as well). You can extract it from the drupal package, edit it with a plain text editor, and upload it to your drupal installation directory. Or get its content from here:
http://cvs.drupal.org/viewvc.py/drupal/drupal/.htaccess?revision=1.81.2....
--------------------------
If you want to understand better the background of all this, check this paragraph of the php manual:
http://www.php.net/manual/en/ini.core.php#ini.post-max-size
and also this handbook page about Drupal's behavior with these values:
http://drupal.org/node/97193
See uoyr php.ini and bigger upload
Hi.
make a file named: "php-test.php" and put in your drupalroot-installasion.
In this file you put this code:
<?phpphpinfo();
?>
and you will see your php.ini configurations.
----------------
In my .htaccess-file I have:
php_value upload_max_filesize 100M
php_value post_max_size 100M in the end of the file.
So now I can upload 100MB files.
Ole Martin
http://www.drupal.no
http://www.drupal1.no