Previous Thread
Next Thread
Print Thread
Hop To
Joined: Feb 2004
Posts: 8
M
stranger
stranger
M Offline
Joined: Feb 2004
Posts: 8
Today I encountered an issue where a user tried to upload a 1.18MB powerpoint file to a post. When the user clicks the "Ok, Submit" button, the browser goes to an error "The page cannot be displayed" screen.

I've increased the attach file size to 100000000 bytes so the system should allow the file to be added. I can upload smaller PPT files so the format is accepted. Note: from some testing I did, it seems like 500K is the magic size barrier for any uploads.

I'm not sure what's going on, but if anyone has any thoughts, I'd appreciate it.

Btw, I also increased by php.ini max upload size from 2M to 100M just incase.

Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Did you restart the web server after changing php.ini? Normally the ini is read at server startup, not on the fly.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Feb 2004
Posts: 8
M
stranger
stranger
M Offline
Joined: Feb 2004
Posts: 8
For kicks, I also increased the following items in php.ini

max_execution_time now at 3000 seconds
post_max_size now at 100M
upload_max_filesize at 100M

I've also rebooted the server incase there was some service that needed restarting.

The "cannot access" error comes up within a second of pressing the "Ok, submit" button so I don't think there's a timeout happening.

I'm running 6.4.1 if that matters.

Joined: Feb 2004
Posts: 8
M
stranger
stranger
M Offline
Joined: Feb 2004
Posts: 8
[]Did you restart the web server after changing php.ini? Normally the ini is read at server startup, not on the fly. [/]

yes, the problem still continues.

Joined: Jan 2004
Posts: 31
L
newbie
newbie
L Offline
Joined: Jan 2004
Posts: 31
Did you make the change to your my.cnf (Unix) or my.ini (?Windows?). That config file has a max upload size parameter as well.

Joined: Feb 2004
Posts: 8
M
stranger
stranger
M Offline
Joined: Feb 2004
Posts: 8
Where do I set the max download parameter, all I have in my.cnf is the following:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Joined: Jan 2004
Posts: 31
L
newbie
newbie
L Offline
Joined: Jan 2004
Posts: 31
In my.cnf, you should have a parameter as follows:

# The MySQL server
[mysqld]
max_allowed_packet = 10M

After changing my.cnf, you have to stop and restart MySQL for the change to take effect.

(The 10M allows a 10MB file attachment into MySQL.)

Here is a great thread on ThreadsDev for tuning MySQL, which could help your overall forum performance as well.

#40518 05/14/2004 1:43 PM
Joined: Feb 2004
Posts: 8
M
stranger
stranger
M Offline
Joined: Feb 2004
Posts: 8
I changed the my.cnf file to include the max_allowed_packet setting as shown below, and even after rebooting the entire system nothing changed. Note: I had to do the "set-variable = " thing becasue otherwise ubbthreads could not connect with the database. Any other thoughts on things to try?

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_allowed_packet=100M

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Last edited by medic; 05/14/2004 1:47 PM.
#40519 05/17/2004 2:35 PM
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
With attachments not stored in the database I do not know why you would need to change max packets in the my.cnf. I guess it can't hurt though. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

Make sure that there is a tmp directory defined in php.ini and that apache, if that is what you are running, has write permissions to it. I can't think of anything else.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
#40520 12/01/2004 4:41 PM
Joined: Apr 2004
Posts: 4
B
stranger
stranger
B Offline
Joined: Apr 2004
Posts: 4
Working with Support, it was fixed by editing my:
php.conf file:
LimitRequestBody 524288 (default value)
Set it to something higher (the value is in bytes)
Then restart apache....all set.
That is why it is limited by default to ~500k

Thanks, -Brad


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
2 members (Ruben, 1 invisible), 883 guests, and 185 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)