post_max_size and upload_max_filesize error

16 posts / 0 new
Last post
#1 Wed, 11/04/2009 - 11:46
wazburn

post_max_size and upload_max_filesize error

hi,

I have downloaded installed for what I believe the latest version for now Virtual GPL in my CENTOS 5.3

the installation finished smoothly without any error, actually I managed to run a video sharing website in my Testing server without any problem.

But the problem is this: post_max_size and upload_max_filesize error

I cannot upload larger file, I have Edited php.ini (etc/php.ini) and set the values to 1000M for both post and upload.-------No Luck

Checked htaccess if it has lines prior to post_max_size and upload_max_filesize but it does not have.

Is this a problem with virtualmin or was there just any way around to get this working?

I appreciate any help,

thanks

Wed, 11/04/2009 - 22:22
Joe
Joe's picture

Is this a problem with virtualmin

I'm not sure how it would be. You're talking about a PHP configuration issue. ;-)

Have you restarted Apache after making changes to your php.ini?

Are you sure you're modifying the php.ini that is being loaded? If you have PHP setup to run under CGI or fcgi, it would be a user-specific php.ini, found somewhere in the users home (probably).

You haven't provided the actual error message from the error_log, so I can't really provide any more than wild guessing, so proceeding from here will definitely require more information.

--

Check out the forum guidelines!

Thu, 11/05/2009 - 03:44
wazburn

[Tue Nov 03 16:20:27 2009] [error] [client 192.168.11.4] PHP Fatal error: Call to a member function getrows() on a non-object in /home/tester/public_html/include/config.php on line 91 [Tue Nov 03 16:21:05 2009] [error] [client 192.168.11.4] PHP Fatal error: Call to a member function getrows() on a non-object in /home/tester/public_html/include/config.php on line 91 [Tue Nov 03 16:21:26 2009] [error] [client 192.168.11.4] PHP Fatal error: Call to a member function getrows() on a non-object in /home/tester/public_html/include/config.php on line 91 [Tue Nov 03 16:26:18 2009] [error] [client 192.168.11.4] PHP Fatal error: Call to a member function getrows() on a non-object in /home/tester/public_html/include/config.php on line 91 [Tue Nov 03 16:47:12 2009] [error] [client 192.168.11.4] PHP Warning: fopen(/home/tester/public_html//include/config.local.php) [function.fopen]: failed to open stream: Permission denied in /home/tester/public_html/include/function_admin.php on line 360, referer: http://192.168.11.12/siteadmin/index.php?m=main [Tue Nov 03 16:55:09 2009] [error] [client 192.168.11.4] PHP Warning: POST Content-Length of 10171477 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: http://192.168.11.12/upload/video error log

[Tue Nov 03 17:36:28 2009] [error] [client 192.168.11.4] PHP Warning: POST Content-Length of 8526647 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: http://192.168.11.12/upload/video [Tue Nov 03 17:48:33 2009] [error] [client 192.168.11.4] PHP Notice: Undefined variable: ext in /home/tester/public_html/include/function_global.php on line 234, referer: http://192.168.11.12/upload/photo [Tue Nov 03 17:48:33 2009] [error] [client 192.168.11.4] PHP Notice: Undefined variable: ext in /home/tester/public_html/include/function_global.php on line 236, referer: http://192.168.11.12/upload/photo [Tue Nov 03 17:48:33 2009] [error] [client 192.168.11.4] PHP Notice: Undefined variable: ext in /home/tester/public_html/include/function_global.php on line 238, referer: http://192.168.11.12/upload/photo [Tue Nov 03 17:53:39 2009] [error] [client 192.168.11.4] PHP Notice: Undefined index: 1 in /home/tester/public_html/include/function_notice.php on line 24, referer: http://192.168.11.12/ [Tue Nov 03 17:53:39 2009] [error] [client 192.168.11.4] PHP Notice: Undefined index: 1 in /home/tester/public_html/include/function_notice.php on line 30, referer: http://192.168.11.12/

im pretty sure that im editing the right php.ini from what i pulled from running phpinfo.php which is /etc/php.ini

im not sure if it run under CGI or fcgi i just installed virtualmin as it is and i havent configure anything except making a database which have no problem.

thanks.

Thu, 11/05/2009 - 09:27
andreychek

Are you using Virtualmin GPL or Pro?

If you're using Pro, there would be individual php.ini files for each Virtual Server in the $HOME/etc/ directory.

It sounds like you're saying that phpinfo() shows your php.ini file as being in /etc though.

Also, if you're using mod_php, after making changes to /etc/php.ini, you may need to restart Apache (with /etc/init.d/httpd restart).

-Eric

Thu, 11/05/2009 - 09:40
wazburn

Using Virtualmin GPL

Tried restarting apache and even the whole system but still got the same error

Thu, 11/05/2009 - 09:45
andreychek

Can you attach the following two items to this thread:

  1. The output of phpinfo()

  2. The contents of your php.ini file

Perhaps we'll be able to see what's going on from within those.

Also, though, if you're using mod_php, the value of the max post size can be changed within the PHP application itself. So another option is that you'll need to review the settings of the application you're uploading through, and make sure you can't change it in there.

-Eric

Thu, 11/05/2009 - 10:07
wazburn

thanks. sorry i dont know if im using mod_php, just installed virtualmin GPL and thats all.

regarding the config of the site i have change config.php to max upload 1000, but when on the site and test for an upload the same error appears, the site still detects the upload and post_max to 8 and 4 the default.

I attach file for the phpinfo and phpini (hosting is in the virtualpc so cant point out the ip address for phpinfo view so i just copy paste the 2 in seperate notepad)

Fri, 11/06/2009 - 02:28
ronald
ronald's picture

You are running mod_php, you can tell by:

Server API Apache 2.0 Handler

your phpinfo still discovers only 2mb upload size. Perhaps you can take a look in /etc/php.d/zip.ini if you were uploading zips

Fri, 11/06/2009 - 09:31
wazburn

----your phpinfo still discovers only 2mb upload size. Perhaps you can take a look in /etc/php.d/zip.ini if you were uploading zips

I dont getit, but my site for the test focus on videos and photos thats more of 2M size uploads, I have check zip.ini what will I do next?

Sat, 11/07/2009 - 02:15
ronald
ronald's picture

this is from your phpinfo
upload_max_filesize 2M

your max postsize is 8mb

So your script isn't listening to your php.ini or your script has a different setting somewhere overuling your php.ini or there is a setting in some other file limiting your uploads.

if you were uploading zip files then rules inside /etc/php.d/zip will become effective, and you can check that file to see if indeed there is such limit present.
If not, you can ignore.

What script are we talking about anyway? And is there a .htaccess in your uploadfolder?

Sat, 11/07/2009 - 04:49
wazburn

inside the project script is a htaccess file which has below:

Comment the 2 lines below if the server returns 500 errors!

Options -Indexes Options +FollowSymLinks

Uncomment following lines if you want to use image caching! ExpiresActive On ExpiresDefault A1209600 ExpiresByType text/html A1 Uncomment following lines if Apache doesnt support MultiViews!

RewriteEngine On

# Uncomment the 2 lines below if you are using www.domain.com
# as the baseurl for the site and users access your site 
# via domain.com (THIS IS REQUIRED FOR JQUERY TO WORK)
#RewriteCond %{HTTP_HOST} ^domain.com [NC]
#RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* loader.php [L,QSA]

Edit below lines and set to ErrorDocument CODE /RELATIVE/error.php If the script is installed in the default document root then relative is null. ErrorDocument 401 /error.php ErrorDocument 403 /error.php ErrorDocument 404 /error.php

The script in concern is the adultvideoscript a video file sharing.

thanks for helping ronald

Sun, 11/08/2009 - 11:45
ronald
ronald's picture

is that the .htaccess file in your upload directory, not the root directory?

looking at their website it says: in your administration panel
media settings (configure maximum upload size allowed and video formats allowed)

so I would look at those settings again..

Mon, 11/09/2009 - 02:53
wazburn

htaccess is in this directory /home/tester/public_html (tester is the name of the site im doing the this test) its not in root directory, and I dont see htaccess file i root directory.

looking at their website it says: in your administration panel

media settings (configure maximum upload size allowed and video formats allowed)

Thats what the problem is, inside admin panel media settings, im changing the values for the upload and post max but error appear that i must change the settings from php.ini, which it doesnt work even its already changed.

Mon, 11/09/2009 - 11:01
ronald
ronald's picture

the .htaccess is in your /public_html so its in the (domains) root directory (just symantics), you should have a upload directory of some sort that the script uses. Is there a .htaccess file in there?

Since the setting in the admin panel doesn't seem to be doing what it is supposed to, I would submit a support ticket with the developer. You bought the software so you are entitled to get support from them.

Tue, 11/10/2009 - 14:02
wazburn

thanks.

the script runs fine in cpanel/whm. i can upload with larger file with no problem, edited php.ini with no problem.

now im prepairing to make a home server operated by "virtualmin GPL" centos5.3 I have installed the script/software fine no error no problem at all, I can upload file I can watch , but the problem is I cannot upload files larger than 2M.

The progarammers of the script and the comments here and other forum has done and tried many times, So I would think the problem is within Virtualmin GPL itself.Would it be some bug or glitch in the program or GPL and PRO version would have something to do with it?

I hope some admin or programmers of virtualmuan review this.

Tue, 11/10/2009 - 15:29
ronald
ronald's picture

this could then be a misconfiguration or possibly a bug...
you can post a bug here http://www.virtualmin.com/project/issues
it may be handy to post also a link to this thread.

Topic locked