faq safe mode
This commit is contained in:
@@ -7,6 +7,7 @@ $Source$
|
|||||||
|
|
||||||
2001-12-05 Marc Delisle <lem9@users.sourceforge.net>
|
2001-12-05 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/norwegian.inc.php3 updates thanks to Sven-Erik Andersen
|
* lang/norwegian.inc.php3 updates thanks to Sven-Erik Andersen
|
||||||
|
* Documentation.html: faq entry about safe mode and uploads
|
||||||
|
|
||||||
2001-12-04 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-12-04 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* config.inc.php3; Documentation.html; left.php3;
|
* config.inc.php3; Documentation.html; left.php3;
|
||||||
|
@@ -867,20 +867,25 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>I try to insert a text file in a table, and I get: <br />
|
<b>I cannot insert a text file in a table, and I get an error
|
||||||
Error MySQL said: The file '/tmp/phpkvpp60' must be in the database
|
about safe mode being in effect.</b>
|
||||||
directory or be readable by all</b>
|
|
||||||
<br />
|
<br />
|
||||||
Your uploaded file is saved by PHP in the "upload dir", as
|
Your uploaded file is saved by PHP in the "upload dir", as
|
||||||
defined in <i>php.ini</i> by the variable <tt>upload_tmp_dir</tt> (usually
|
defined in <i>php.ini</i> by the variable <tt>upload_tmp_dir</tt> (usually
|
||||||
the system default is <i>/tmp</i>).
|
the system default is <i>/tmp</i>).
|
||||||
If this directory is not readable by all, the MySQL server (which must be
|
|
||||||
running on the same machine) cannot open the file (except if running as
|
|
||||||
root, which is not recommended).
|
|
||||||
<br />
|
<br />
|
||||||
The system administrator can do a "<tt>chmod 777 /tmp</tt>": then
|
We recommend the following setup for Apache servers running in
|
||||||
the MySQL server will accept to read it. Also, the user must have
|
safe mode, to enable uploads of files while being reasonably secure:
|
||||||
<tt>File</tt> privilege.
|
<br />
|
||||||
|
<ul>
|
||||||
|
<li>create a separate directory for uploads:
|
||||||
|
<tt>mkdir /tmp/php</tt> </li>
|
||||||
|
<li>give ownership to the Apache server's user.group:
|
||||||
|
<tt>chown apache.apache /tmp/php</tt> </li>
|
||||||
|
<li>give proper permission: <tt>chmod 600 /tmp/php </tt> </li>
|
||||||
|
<li>put <tt>upload_tmp_dir = /tmp/php</tt> in php.ini </li>
|
||||||
|
<li>restart Apache</li>
|
||||||
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Reference in New Issue
Block a user