PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > open_basedir problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
open_basedir problem

Réponse
 
LinkBack Outils de la discussion
Vieux 27/03/2008, 16h55   #1
rdlowrey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut open_basedir problem

Okay, I've tried a bunch of things on this one and can't figure it
out.

The line in my phpinfo:
open_basedir /var/www/vhosts/mysite.com/subdomains/intranet/httpdocs:/
tmp no value

Why would I get a "Warning: move_uploaded_file(): open_basedir
restriction in effect." error message if I've used SSH to set the
Master open_basedir value to "no value" (as evidenced by phpinfo)?
I've tried using an .htaccess file to do a php_admin_value
open_basedir "" to set the Local value as well but that always yields
an Internal Server Error (probably my lack of knowledge on .htaccess)
and I believe the Master value should override that anyway.

I've also tried setting the Master value to be all inclusive (i.e. "/
var") and still get the same open_basedir restriction error. Any
would be greatly appreciated as I'm at wits end.

I'm running I'm running PHP Version 4.3.9 if that makes a difference.
  Réponse avec citation
Vieux 27/03/2008, 19h23   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: open_basedir problem

rdlowrey wrote:
> Okay, I've tried a bunch of things on this one and can't figure it
> out.
>
> The line in my phpinfo:
> open_basedir /var/www/vhosts/mysite.com/subdomains/intranet/httpdocs:/
> tmp no value
>


It should be

open_basedir=/var/www/vhosts/mysite.com/subdomains/intranet/httpdocs:/tmp/

And where did the "no value" come from? If that's in the line, then PHP
may be taking the last directory as "/tmp no value".

> Why would I get a "Warning: move_uploaded_file(): open_basedir
> restriction in effect." error message if I've used SSH to set the
> Master open_basedir value to "no value" (as evidenced by phpinfo)?
> I've tried using an .htaccess file to do a php_admin_value
> open_basedir "" to set the Local value as well but that always yields
> an Internal Server Error (probably my lack of knowledge on .htaccess)
> and I believe the Master value should override that anyway.
>


How did you change it with SSH? And after changing it, did you
stop/restart Apache?

And open_basedir cannot be set in .htaccess. This is a security
precaution to prevent users on shared hosting from changing it and
accessing things they shouldn't.


> I've also tried setting the Master value to be all inclusive (i.e. "/
> var") and still get the same open_basedir restriction error. Any
> would be greatly appreciated as I'm at wits end.
>
> I'm running I'm running PHP Version 4.3.9 if that makes a difference.
>


You also need /tmp/ in your list to be able to access the /tmp/ directory.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 27/03/2008, 19h35   #3
rdlowrey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: open_basedir problem

> And where did the "no value" come from? If that's in the line, then PHP
> may be taking the last directory as "/tmp no value".


Foiled by text formatting. Let me clarify ... the master value in my
phpinfo is empty so that when i call phpinfo() in a browser it just
shows "no value" in the master column. I've also tried and currently
have the master value for open_basedir as:

/var/www/vhosts/mysite.com:/tmp

BECAUSE ...
I've got files in subdomain A (/var/www/vhosts/mysite.com/subdomains/
intranet/httpdocs)

And I need to access these with a file_exists() from pages in
subdomain B (/var/www/vhosts/mysite.com/subdomains/clients/httpdocs)

SO ... /var/www/vhosts/mysite.com:/tmp should allow me to access
file_exists() calls between the two subdomains, right?


> How did you change it with SSH? And after changing it, did you
> stop/restart Apache?


I changed the open_basedir value in my php.ini file from the shell:
vi /etc/php.ini
Yes, I restarted apache.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h12.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11138 seconds with 11 queries