I want to increase the limit of upload size max, but because I using shared hosting, I cannot edit php.ini. Then I try to edit my .htaccess file. I added these lines:

php_value upload_max_filesize 700M
php_value post_max_size 700M
php_value max_execution_time 600
php_value max_input_time 600

When I test it in localhost, it running succedded. But, when I upload this .htaccess file to my shared hosting, it produce 500 Internal Server Error. I also try to put that similar code in my .php files, but not affected. Any idea how to solve this problem? Thanks a lot.

Recommended Answers

All 2 Replies

Member Avatar for diafol

Are you sure you don't have access to a php.ini file through a panel? Who's your host?

Surely. When I using shared hosting, I cannot see Apache, PHP and MySQL Folder. There's a PHP section which I can edit. But, when I saved it, close it then re-opened again, it back to default setting. So, I thing I cannot edit setting of php.ini file.

Update: My problem solved! I just have to put these codes:

    php_value upload_max_filesize 700M
    php_value post_max_size 700M
    php_value max_execution_time 600
    php_value max_input_time 600

between :
<IfModule mod_php5.c>

Thanks ! :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.