Bonjour a tous,
Voici mon script PHP pour telecharger une image jpeg :
Ce script fonctionne tres bien en local (windows PHP4), mais sur le serveur du client (linux, PHP Version 5.1.2), il me renvoi l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <?php $nom_fichier = $_GET['f']; $taille_fichier = filesize($nom_fichier); header("content-type: application/octet-stream"); header("Content-Length: $taille_fichier"); header("Content-Disposition: attachment; filename=bailly_lapierre_".$nom_fichier); readfile($nom_fichier); ?>
Dans les logs d'erreurs, voici ce que j'ai :Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at cgi01-ch.uk.clara.net Port 80
wrapper: /web/sites/vhbu/14/6/69742/public/www/images/phototheque/telecharger_photo.php: Enclosing directory is writable by others
J'ai donc essayé divers chmod a l'aveuglette, ne comprenant pas reellement, mais rien n'y fait.
Quelqu'un peut il m'aider SVP?
Partager