ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If I move /usr/local/etc/php.ini-dist to /usr/local/etc/php.ini it seems to break file uploads to mysql I get an fread error on uploads. If I move it back to original name all is fine.
Is this because the original name means I am not reading from it and when I move it to php.ini it is reading from it and I need to correct something within it to enable file uploads?
file_uploads = On
is set within the file.
Many thanks for any help offered.
php.ini-dist is the config file that is 'distributed' with php. php.ini is the file that is actually used, and should have all the site-specific modifications to it. To see the differences between the two, use 'diff'.
Sure I understand that, and I have moved the php.ini-dist to php.ini and my uploads work again, I am not sure why they were not working after my first filename change. If I could ask another question though. I am aware of the 2mb upload limit on php so I corrected this to be
upload_max_filesize = 6500M
I know that is large but I do video editing for a small company and sometimes our video files get to be around 6 gigs. I still cannot upload anything larger than 2mb. This is why I posted my first question, because It seems as if that my filesize is still being limited. Is MySQL limiting my database entry?
graemef,
Thank you for the reply. I am storing it in a longblob. I didnt know that a longblob limits to 4Gb but I cant even upload a pdf file thats 2.14MB. I compress it to 1.84MB and it uploads fine.
Many thanks.
post_max_size = 7000M
This did not correct it. I tried again to upload a file a little over 2MB, and recieved the same error.
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/www/apache22/data/start/minion/upload.php on line 11
I only recieve this error on files > 2MB.
Many thanks.
[edit]When I try to upload the file it actually as far as file name and the like get entered into the db just with a size of 0.
Thank you for taking the time to assist me. Yes the values are set. Thank you for pointing me to the phpinfo(), I had forgotten about that and that would have saved me my first post. However I believe now this is pointing to an MySQL issue. I have double checked and tripple checked my table. Any other guidance?
Many thanks.
All I can think of is rather than save it to you database can you save it on a local directory. As a minimum it should help to confirm that it is a MySQL problem
If that is the case then maybe you want to store it in a directory and then just hold the path to the file in the database. But maybe there is a MySQL setting... I can't think of one but maybe Mr Google knows.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.