• Hi all,

    localhost install on a VM(guest)

    Host – Ubuntu12.04 desktop 64bit
    VM(guest) – Ubuntu12.04 desktop 64bit
    VirtualBox, Oracle.

    Upload file warning:
    Error aaa.flv
    aaa.flv exceeds the maximum upload size for this site.

    Maximum upload file size: 8MB.

    The video file size=12M

    Performed following steps without result;

    1)
    Apache2
    $ sudo gedit /etc/php5/apache2/php.ini
    change;
    upload_max_filesize = 2M
    to;
    upload_max_filesize = 50M

    $ sudo service apache2 restart
    * Restarting web server apache2
    … waiting …done.

    2)
    Created a php.ini file on /home/satimis/www/wordpress/wp-admin/php.ini
    memory_limit = 32M
    upload_max_filesize = 32M
    post_max_size = 32M
    file_uploads = On

    $ sudo chmod +x /home/satimis/www/wordpress/wp-admin/php.ini

    Reboot VM

    I have tried more than 3 hours without a solution. Please help. Thanks

    B.R.
    satimis

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    aaa.flv exceeds the maximum upload size for this site.

    I am pretty sure you are editing the wrong php.ini file but there is an easy way to check.

    Create a phpinfo.php file in your WordPress root directory with this one line

    <?php phpinfo() ?>

    Then visit that URL in your browser.

    https://your-vm-url-here/phpinfo.php

    Look for this line

    Loaded Configuration File	/etc/php5/apache2/php.ini

    That’s from my install (I use Ubuntu LTS). That will confirm which file you have to update for increasing the upload_max_filesize.

    Thread Starter satimis

    (@satimis)

    Hi,

    Performed following steps:-

    $ sudo gedit /home/satimis/www/wordpress/phpinfo.php
    put following line on the file;
    <?php phpinfo() ?>

    save and exit.

    $ ls -al /home/satimis/www/wordpress/phpinfo.php
    -rw-r–r– 1 root root 19 Mar 2 21:14 /home/satimis/www/wordpress/phpinfo.php

    On browser;
    https://localhost/wordpress/phpinfo.php

    Following line is there
    Loaded Configuration File /etc/php5/apache2/php.ini

    upload_max_filesize 50M

    I can’t resolve why it fails to work? Would it be permission problem? satimis:satimis is necessary?

    $ ls -al /etc/php5/apache2/php.ini
    -rw-r–r– 1 root root 68429 Mar 2 16:46 /etc/php5/apache2/php.ini

    Thanks

    B.R.
    satimis

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    After you made the change to /etc/php5/apache2/php.ini did you restart Apache2? That’s need for the change to go into effect.

    I can’t resolve why it fails to work? Would it be permission problem? satimis:satimis is necessary?

    It could be but I think if that were the case then you’d get a “unable to write to directory” error message.

    Thread Starter satimis

    (@satimis)

    Hi Jan,

    Nothing related. I have restarted apache2 after having changed php.ini including reboot.

    Problem has been now solved by editing /etc/php5/apach2/php.ini

    change following line;
    post_max_size = 8M

    to;
    post_max_size = 50M

    then ran;
    $ sudo service apache2 restart

    Regards
    satimis

    They are many lines in php.ini.

    In resume what lines must be modified in php.ini ?

    upload_max_filesize
    post_max_size
    others ?

    @chara729: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem – despite any similarity in symptoms – is likely to be completely different.

    In the meantime, try asking your hosts about this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to upload file’ is closed to new replies.