473,804 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php.ini file entries in .htaccess file

pradeepjain
563 Contributor
Since we are hosting websites on different hosting sites, we wont have the access to php.ini file .

so where do i need to add the entries like

php_value upload_max_file size 20M
php_value post_max_size 20M
php_value max_execution_t ime 200
php_value max_input_time 200

in the .htaccess file.

ini_set(upload_ max_filesize,30 000) does not work . cant we change the value of upload_max_file size using ini_set ?
Mar 12 '10 #1
2 1838
Dormilich
8,658 Recognized Expert Moderator Expert
anywhere in the .htaccess should be fine
Mar 12 '10 #2
philipwayne
50 New Member
You can't change the value for max_upload_size in a PHP script it automatically rejects any files above the file size limit before your script runs. But yes you can use it in the .htaccess files
Mar 12 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
11059
by: JW | last post by:
I have a directory protected with .htaccess / .htpasswd. After I'm validated, I run a php script which bombs out when trying to write a file to that directory. If I chmod 777 on the directory (default was 755) then everything works ok. So apparently, the script is running under a different security context even though it's being run via my http session validated via .htaccess. 1) Do I have to be concerned about access to a protected...
4
42796
by: Phester | last post by:
If a file has a .inc extension, or if it has a .inc.php extension, is it treated differently by the php interpreter? Or is it just a convention? I've been calling my included files filename.php and it doesn't seem to hurt anything. Is it wrong to do that? E
8
50627
by: Joshua Beall | last post by:
Hi All, How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value are still "on") <IfModule mod_php4.c> php_value upload_max_filesize 8M
4
8921
by: dspohn | last post by:
I am designing a document management system (DMS). The files are stored in a directory on the webserver. The filenames for the documents are stored in a MySQL database. The DMS will track revisions from the initial version through the updates. We must have strict permissions set so only authorized personnel can access some documents. All of the documents when uploaded are given totally random names such as "114723fb5422c6bd5ed18f6.doc"....
6
5466
by: Els | last post by:
If I use <? include "file.html"; ?> in the html of my document, do I _have_ to change the extension of that document to .php, or would it still work and be valid if I let it remain .html? -- Els Mente humana é como pára-quedas; funciona melhor aberta.
5
2798
by: George | last post by:
So I have a file, which is a zip file I want to let people download. But I don't want to let other sites link to my zip file -- I only want people to be able to download the file by going through my site. I know there are ways to prevent a file from being linked to if it's a php page, but this isn't a php page, it's a zip file. Any help would be tremendously appreciated. My apologies if this isn't the appropriate newsgroup for this...
0
1693
by: Jörg Braun | last post by:
Hello NG, i have a problem With WebRequest! i want to download a htaccess saved file over a proxyconnetion with authentication. Download a file what is not saved with htaccess is no problem, download a htaccess saved file with out a proxy with authentication i also no problem, but download this file with htaccess and the auth proxy is a prob!
4
2814
by: Stefan Bellon | last post by:
Hi all! I want to parse the contents of an .htaccess file from within PHP. The contents of the .htaccess file looks like this: <Files foobar.tar.gz> AuthType Basic AuthUserFile /foobar AuthName "Foobar" <Limit GET>
17
1699
by: Paul | last post by:
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the source file references off and it does not work properly. My references are like: require_once($_SERVER."/utility/top.php");
0
2138
by: deco12 | last post by:
Hi, I am new to web design and Apache, but have managed to password protect my site by putting a .htaccess file in the sites root directory. I have set it up so that a number of members have access to the site. Now, within the site I have a link to a "document" folder which I only want 2 or 3 members to have access to. I have created a second .htaccess & .ht passwd file, with the path to the new folder and a different password. This was...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.