visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

ALL :: ZONES :: can't get PHP to execute scripts outside Document Root


By: PHP newbee U.S.A.  Date: 05/02/2003 00:00:00  English  Points: 300 Status: Answered
Quality : Excellent
Yo.
I've got PHP 4.1.0 installed and running under Apache 1.3.23 on a SuSE 8.0 box. If I put a .php file anywhere under in my document root (/usr/local/httpd/htdocs/), it will run fine. but .php files WON'T run inside any user folders (/home/mike/public_html/ for example). I just get this error:

<b>Warning:</b> Failed opening '/home/mike/public_html/php/processorder.php' for inclusion (include_path='.:/usr/share/php') in <b>Unknown</b> on line <b>0</b>

Can someone tell me what I need to do to be able to execute scripts outsude of my document root???

thanks.
By: VGR Date: 06/02/2003 07:30:00 English  Type : Answer
check Directory settings in httpd.conf
By: lupuleine Date: 06/02/2003 19:12:00 English  Type : Comment
you could try setting up a virtual host for that specific directory, or you could set the documentroot to your machines root (but that's not a good ideea)


or make a linux link from /home/mike/public_html/ and put it under the documentroot it's the easiest way.
EX: you in the directory /usr/local/httpd/htdocs/ here you write ln -s /home/mike/public_html/ and it make s you a link to the home of mike
By: VGR Date: 07/02/2003 07:58:00 English  Type : Comment
well, documents are ***supposed to*** be in the DOCUMENT_ROOT tree ;-)))))

if not, you may follow the above advice, unless you ask yourself WHY you should put files anywhere else than in $DOCUMENT_ROOT/somedirectory/ having built proper /directory rules for access via httpd.conf/Deny/Allow or .htaccess
By: danutz Date: 07/02/2003 19:06:00 English  Type : Comment
Check the permissions for those files. My guess is that the web server doesn't have permission to read from them.

Do register to be able to answer

EContact
browser fav
page generated in 328.348880 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page