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?
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.
> 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