By default server environment will allow the user’s to upload maximum 2MB of file via web browser for security reason. It was controlled by Global php.ini file and it will accessible to root user. In owncloud installation they have mentioned maximum upload file size to 512MB in .htaccess file. But its not taking effect. I don’t know, why ?
I was worked on many website regarding upload file size issue with php.ini file. So i will prefer the php.ini file to do the same in owncloud installation on my site.
1) Default upload file size ?
2) php.ini file configuration
Create the php.ini file under owncloud installation directory and past the below value.
root@server [~]# nano php.ini GNU nano 2.0.9 File: php.ini upload_max_filesize = 1GB post_max_size = 1GB
3) Getting error after creating php.ini file ?
When, i’m working on this issue, i will face few more minor errors and i resolved based on that. See the below steps which i taken.
1) After putting the code into php.ini file, i will get below error message, see the screen shot.
Fatal error: Class 'PDO' not found in /home/owncloud2daygeek/public_html/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 148
root@server [~]# php -m [PHP Modules] PDO pdo_mysql pdo_sqlite [Zend Modules] Zend Guard Loader the ionCube PHP Loader
Its clearly shows, its installed and enabled in server.
3) Then i have checked the global php.ini file whether the extension is called into php.ini file or not.
root@server [~]# nano /usr/local/lib/php.ini GNU nano 2.0.9 File: /usr/local/lib/php.ini ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; ; If you wish to have an extension loaded automatically, use the following ; syntax: ; extension = "pdo.so" extension = "pdo_mysql.so" extension = "pdo_sqlite.so ; ; For example, on Windows: ; ; ; ... or under UNIX: ; ; ; Note that it should be the name of the module only; no directory information ; needs to go here. Specify the location of the extension with the ; extension_dir directive above.
Its clearly shows, the extension is called in global php.ini file.
4) Finally i have added those extension to under owncloud php.ini file and its started working.
root@server [~]# nano php.ini GNU nano 2.0.9 File: php.ini extension=pdo.so extension=pdo_mysql.so upload_max_filesize = 1GB post_max_size = 1GB
4) Upload size is increased to 1GB ?
5) Method-2 : Alternative Way
We are preparing all articles in-depth to understand by all level/stage Linux administrators. If the article is useful for you, then please spend less than a minute to share your valuable comments in our commenting section.
Please stay tune with us…Good Luck.