Search found 8 matches
- Wed Sep 16, 2009 2:02 pm
- Forum: PHP - Theory and Design
- Topic: Singleton question
- Replies: 6
- Views: 1040
Singleton question
Hello there! I've managed to inherit some code for a small plugin for tiny_mce. In cleaning it up, I added a logging feature and I discovered that a particular php object was created multiple times from different scripts. There was no need for a new instance of the object each time, and I thought a ...
- Fri Apr 10, 2009 7:13 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
I'm going to have to wait til monday for the change as the admin walked out the door about 10 mins ago.
- Fri Apr 10, 2009 7:08 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
Hmm...you know, we didn't do that since we made the first change to /etc/php.ini a few days ago.McInfo wrote:If you change any settings in php.ini, make sure you restart your server.
- Fri Apr 10, 2009 6:55 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
Just to be sure, what is the output of this script? get_umf.php <?php echo ini_get('upload_max_filesize'); ?> Sometimes there are multiple php.ini files. Well that seems to explain it, I'm getting 2M from within that script. Should I just do a find / -name "php.ini" or could it be under a...
- Fri Apr 10, 2009 6:41 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
You are getting error #1 for file_0. That means The uploaded file exceeds the upload_max_filesize directive in php.ini. http://us3.php.net/manual/en/features.file-upload.errors.php Your output would be easier to read if you pasted it into the code tags. Sorry about that I forgot for that one, and t...
- Fri Apr 10, 2009 6:28 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
I apologize for replying before I really understood the problem. Bad me. If you upload the same PDF to this script, what do you get? show_files.php <?php header('Content-type: text/plain'); print_r($_FILES); ?> Array ( [file_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )...
- Fri Apr 10, 2009 6:15 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
Re: A problem with large file uploads and $_FILE['file']['type']
According to your error, this is true: $file['type'] == 'Comp615BookPart1.pdf' That's correct. If I do it for a small file however, $file['type'] == 'application/pdf', it's working for small pdf files, and I'm not setting the information in $_FILES (which is where I get $file from). From what I've ...
- Fri Apr 10, 2009 5:31 pm
- Forum: PHP - Code
- Topic: A problem with large file uploads and $_FILE['file']['type']
- Replies: 6
- Views: 362
A problem with large file uploads and $_FILE['file']['type']
I'm having a problem with file upload from post. I'm setting the $_FILES variable and can successfully upload a small pdf file that is mime-type validated with following bit of code: Where... $ext is the extension $this->accept is a list of known mime-types. $this->accept[$ext] returns the mime type...