Author Topic: move_uploaded_file(): Unable to move...  (Read 63885 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
move_uploaded_file(): Unable to move...
« on: March 17, 2005, 03:41:54 AM »
When trying to upload a file using your web browser, you get an error like this:
Quote
Warning: move_uploaded_file(./data/media/1/sample.jpg): failed to open stream: No such file or directory in /local/home/sites/example.com/4images/includes/upload.php on line 114

Warning: move_uploaded_file(): Unable to move '/tmp/php5zVufY' to './data/media/1/sample.jpg' in /local/home/sites/example.com/4images/includes/upload.php on line 114

If after correctly setting directory permissions as instructed in docs/Installation.txt and following the suggestion in this FAQ post you still get this error, then you may have encountered a limitation due to PHP Safe Mode being turned on by your host.

You can ask your host if safe mode is turned on and, if it is, ask them to turn it off (be sure to explain why!). Or you might try the installing the mod for bypassing Safe Mode in the published mods forum.

You can check if SAFE MODE is set by creating a file named phpinfo.php and placing this inside it:
Code: [Select]
<?php
phpinfo
();
?>

Upload it to the top-level of your web site and load http://www.example.com/phpinfo.php in your browser.

Under the
Quote
Configuration
PHP Core
section, look for a table row that says:
Code: [Select]
Directive          Local Value          Master Value
safe_mode          Off                  Off

If either value is set to On, then you have safe_mode enabled in PHP for your web site.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: move_uploaded_file(): Unable to move...
« Reply #1 on: March 17, 2005, 03:48:14 AM »
Another forum user was kind enough to translate this into German
===============================================

Beim Upload-Versuch mit dem Browser, bekommt der User ein Fehler wie diesen:
Quote
Warning: move_uploaded_file(./data/media/1/sample.jpg): failed to open stream: No such file or directory in /local/home/sites/example.com/4images/includes/upload.php on line 114

Warning: move_uploaded_file(): Unable to move '/tmp/php5zVufY' to './data/media/1/sample.jpg' in /local/home/sites/example.com/4images/includes/upload.php on line 114
Falls nach korrektem Setzen von Rechten - wie in docs/Installation.txt beschrieben - und nach dem folgenden Ratschlag in diesem FAQ immer noch dieser Fehler aufkommt, kann es sein, dass SAFE MODE beim Anbieter deines Web-Spaces eingeschaltet ist.

Du kannst den Anbieter fragen SAFE MODE abzuschalten (und erkläre auch warum!). Oder Du kannst versuchen das MOD zu installieren um SAFE MODE zu umgehen.

Du kannst überprüfen, ob SAFE MODE eingeschaltet ist: erstelle eine neue Datei mit dem Namen phpinfo.php und schreib dies rein:
Code: [Select]
<?php
phpinfo
();
?>
Lade diese Datei dann auf dene Seite hoch und öffne dann diese Datei in deinem Browser z.B. http://www.example.com/phpinfo.php

Unter
Code: [Select]
Configuration
PHP Core

suche nach einer Zeile mit folgenem Inhalt:
Code: [Select]
Directive          Local Value          Master Value
safe_mode          Off                  Off
Falls "value" auf On gesetzt ist, dann ist safe_mode auf Deiner Seite eingeschaltet.