Support Center > Knowledgebase > phpMyAdmin > Server > I cannot insert a text file in a table, and I get an error about safe mode being in effect.
I cannot insert a text file in a table, and I get an error about safe mode being in effect.
Your uploaded file is saved by PHP in the "upload dir", as defined in php.ini by the variable upload_tmp_dir (usually the system default is /tmp). We recommend the following setup for Apache servers running with PHP in safe mode, to enable uploads of files while being reasonably secure:
- create a separate directory for uploads: mkdir /tmp/php
- give ownership to the Apache server's user.group: chown apache.apache /tmp/php
- give proper permission: chmod 600 /tmp/php
- put upload_tmp_dir = /tmp/php in php.ini
- restart Apache
Also Read