Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
September 02, 2010, 07:42:47 AM

Pages: [1]   Go Down
  Print  
Author Topic: I keep getting the following error when uploading a video..  (Read 965 times)
earnj0
Spacescooter Operator
*****
Offline Offline

Posts: 44



« on: January 04, 2009, 12:47:46 AM »

I keep getting this error when uploading a 4MB video in Wordpress:

"The uploaded file exceeds the upload_max_filesize directive in php.ini."

How can I fix this, I'm hardly using any disk space in my account. Confused
Logged
wektech
Jedi
*****
Offline Offline

Posts: 943



WWW
« Reply #1 on: January 04, 2009, 04:14:11 AM »

try adding:
upload_max_filesize =5M
post_max_size = 6M
to your php.ini file
Logged

MrPhil
Professor in Nanotechnology
*****
Online Online

Posts: 4800



« Reply #2 on: January 04, 2009, 06:45:03 AM »

1. If your php.ini file does not already exist, you will have to create a new one.

2. Add a line to your .htaccess file:
Code:
suPHP_ConfigPath  /home/ACCOUNTNAME/public_html
(or pointing to wherever you placed your php.ini file). This tells the server that there is a php.ini file and where to find it.

3. Check that you've done everything properly, and that PHP is obeying its new directives, by running this script:
Code:
<?php phpinfo(); ?>
Logged

earnj0
Spacescooter Operator
*****
Offline Offline

Posts: 44



« Reply #3 on: January 04, 2009, 02:59:41 PM »

1. If your php.ini file does not already exist, you will have to create a new one.

2. Add a line to your .htaccess file:
Code:
suPHP_ConfigPath  /home/ACCOUNTNAME/public_html
(or pointing to wherever you placed your php.ini file). This tells the server that there is a php.ini file and where to find it.

3. Check that you've done everything properly, and that PHP is obeying its new directives, by running this script:
Code:
<?php phpinfo(); ?>

I couldn't find the PHP.INI file so I read a bit and ran the script, eventho it show the path, there's no way for my to find it under the "File Manager section"


Configuration File (php.ini) Path    /usr/local/etc/php5/cgi
Loaded Configuration File    /usr/local/etc/php5/cgi/php.ini

I don't find the directory at all anywhere. Confused


Update: I just read somewhere that if I have a shared server I can't change the value on the php.ini because it would affect everyone else, but here is what the phpinfo returned as far as memory:

post_max_size   8M
memory_limit   32M

So If I should not be having problems uploading a 4M video correct?

Should I contact lunar and ask them?
« Last Edit: January 04, 2009, 03:14:16 PM by earnj0 » Logged
MrPhil
Professor in Nanotechnology
*****
Online Online

Posts: 4800



« Reply #4 on: January 05, 2009, 05:37:27 AM »

/usr/local is not available for you to write to. You have to create your own php.ini file, in a place like /home/ACCOUNTNAME/public_html/ (you can put it elsewhere, or take steps to hide it via .htaccess, but that's for the advanced course). And yes, you CAN create your own php.ini.
Logged

Mitch
Berserker Poster
*****
Offline Offline

Posts: 12840


WWW
« Reply #5 on: January 05, 2009, 05:42:32 AM »

Here are two wiki posts that should help you out:

How to create a php.ini file
http://wiki.lunarpages.com/Create_php.ini

How to increase your php.ini upload limit
http://wiki.lunarpages.com/Increase_php.ini_Upload_Limit

Hope that helps!
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
kaethy
Pong! (the videogame) Master
*****
Offline Offline

Posts: 24


« Reply #6 on: February 22, 2009, 04:57:15 PM »

I followed these instructions, and it still isn't working  Sad

Here are two wiki posts that should help you out:

How to create a php.ini file
http://wiki.lunarpages.com/Create_php.ini

How to increase your php.ini upload limit
http://wiki.lunarpages.com/Increase_php.ini_Upload_Limit

Hope that helps!
Logged
firefoxonline
Trekkie
**
Offline Offline

Posts: 12


« Reply #7 on: March 19, 2009, 10:35:24 PM »

try adding:
upload_max_filesize =5M
post_max_size = 6M
to your php.ini file

Even higher IMO
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: