|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a php upload script that would occasionally be handy, I have used it in the past but it isn't able to write files to the upload directory
The directory is writeable and the file should have permission to write there, but I seem to recall having to change or add some setting in php itself to allow php to write to disk ... and I can't remember what that was I'm hoping someone here might have an idea as to what I need to change Also phpinfo shows an upload limit of 2M, how can I change that? |
|
|||
|
I found these in /etc/php5/cli/php.ini
; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = "/tmp" ; Maximum allowed size for uploaded files. upload_max_filesize = 2M So changing the upload limit seems a snip, but I'm sure it was something other than file_uploads = On that I had to set before |
|
|||
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Keep in mind that /etc/php5/cli is not for a web server's version of PHP.... not sure if that was clear. You should also have /etc/php5/apache2/php.ini for the web server's version. The 'cli' version is for the command-line interface version of PHP that you can run and probably doesn't make much sense on the 'upload' front. Good luck. Ecky wrote: > I found these in /etc/php5/cli/php.ini > > ; Whether to allow HTTP file uploads. > file_uploads = On > > ; Temporary directory for HTTP uploaded files (will use system default > if not > ; specified). > upload_tmp_dir = "/tmp" > > ; Maximum allowed size for uploaded files. > upload_max_filesize = 2M > > > So changing the upload limit seems a snip, but I'm sure it was > something other than file_uploads = On that I had to set before > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI25Bv3s42bA80+9kRAikcAJoCCWiEsOqZhK+EK9LlRp p2N9mZtwCeIYq6 KuJ3E3IfXaU2ltIWmejnYhM= =zE65 -----END PGP SIGNATURE----- |
|
|||
|
Can't believe I was that thick!
Must've been half asleep Though I also had to change the post_max_size = directive to match the upload_max_filesize = one I don't know whether it's normal to have to do that or not ... but it works ![]() Ecky |
|
||||
|
Write it down somewhere for the next time.
__________________
Henk van Velden |
|
|||
|
But half the fun is in figuring it out!
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|