ksduded Posted October 9, 2008 Share Posted October 9, 2008 So my host (iweb.ca) does not provide a unified php.ini file for my webspace instead they said that I have to create seperate php.ini files and put them in the directory that requires it. I need to increase the upload file size to 5MB. Thus I created a php.ini file with only this code post_max_size = 5M upload_max_filesize = 5M and put it in the folder where the uploaded files are stored. I tried it, but it didn't work. Am I missing something here. Thanks in advance for any help Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted October 9, 2008 Share Posted October 9, 2008 You put it in the directory where your scripts are run from. Ken Quote Link to comment Share on other sites More sharing options...
Chicken Little Posted October 9, 2008 Share Posted October 9, 2008 You could add a .htaccess file in the directory with the following php_value upload_max_filesize 5M Quote Link to comment Share on other sites More sharing options...
ksduded Posted October 9, 2008 Author Share Posted October 9, 2008 You put it in the directory where your scripts are run from. Ken there is a _mmServerScripts directory in the subdomain where i will be uploading the. the structure is like this www.subdomain.com www.subdomain.com/_mmServerScripts www.subdomain.com/uploads/user_directory the images are uploaded in the user_directory and I placed a php.ini there and also placed it in the _mmServerScripts, but I again got the same error message. You could add a .htaccess file in the directory with the following php_value upload_max_filesize 5M I tried this as well, but it didn't work. I wanted to add that the folder where the images are uploaded is created dynamically once the user enters his email address. So what I am doing is that after the user folder is created, I log in through the ftp and add the php.ini/.htaccess file there manually and then use the website to upload the images. From my understanding, this should work, but please state otherwise, if there is another way of getting this to work. Thanks Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted October 9, 2008 Share Posted October 9, 2008 but I again got the same error message. If you are getting an error message, post it. That is the only way we can help. For all we know your local php.ini worked but the error is being caused by something else. Quote Link to comment Share on other sites More sharing options...
ksduded Posted October 9, 2008 Author Share Posted October 9, 2008 but I again got the same error message. If you are getting an error message, post it. That is the only way we can help. For all we know your local php.ini worked but the error is being caused by something else. Sorry I should have cleared that up. that error message is from the upload utility that i am using, swfupload, which i have incorporated in my . So its program specific. In other terms, nothing uploads if the file is larger than 2MB. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted October 9, 2008 Share Posted October 9, 2008 Make sure you can even use a local php.ini to change those settings. Start by putting your php.ini file in the document root folder and create a .php script in that folder that contains the following - <?php phpinfo(); ?> Browse to this script and check what those two settings actually are. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted October 9, 2008 Share Posted October 9, 2008 place this in your .htaccess file (website root): Options +ExecCGI AddHandler php-cgi .php Action php-cgi /cgi-bin/php5.cgi then place the php.ini file in the root of the domain in a directory called "cgi-bin" you will also have to place your "php5.cgi" file in that directory as well. You will then be able to edit your file as you wish. Note: You should make your "post_max_size" larger than your "upload_max_filesize" Quote Link to comment Share on other sites More sharing options...
ksduded Posted October 10, 2008 Author Share Posted October 10, 2008 thank you for the answers. Actually the problem was from my end. I was uploading the php.ini file in the directory where the images were being uploaded. I copied it to the directory where the html php file is, and it worked out. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted October 10, 2008 Share Posted October 10, 2008 You put it in the directory where your scripts are run from. Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.