Jump to content

Recommended Posts

Hello,

I am in the process of creating a PHP/MySQL forum-based website. This is my first time working with PHP and MySQL; I have a few questions.

I want users to be able to upload .pdf files along with their posts. How is this done? How does the system handle such uploads? Is there a maximum allowable size for an attached file to be posted?

Any advice would be very much appreciated.

aeroboy
In principle, if it's your forum, there are no such limits; however, PHP usually has a maximum execution time for each script, which limits upload size from a practical sense. Also, MySQL has a maximum query size as well, meaning you can't upload a 10MB PDF file all at once. As far as the PHP side goes, you can change this maximum timeout; on the MySQL side, it's not so simple. IMHO, the best way to go is simply to store the file on the server OUTSIDE the DB, and simply have a DB table that stores the path, filename and filesize of each upload.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.