Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Web Design & Development
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor network networking outlook problem processor ram recovery router safe mode slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
php include/require path

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
twmprys's Avatar
Computer Specs
Member with 69 posts.
 
Join Date: Jun 2009
Experience: Beginner
28-Oct-2009, 03:56 PM #1
php include/require path
Anyone else had this problem? I've got a CMS which creates a new page for each new member of a society. For each new member page, I want to include menu information which is sotred on a separate page. When I view the newly created pages which have a php 'include' instruction, the menu is absent. When I change the script to write the instruction 'require', I get a fatal error - Failed opening required 'menu.php' (include_path='.:/usr/share/pear') -. Trouble is, because the pages are seen as belonging to Apache, I can't get into them to find out what the script has written.
briealeida's Avatar
Computer Specs
Senior Member with 660 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
29-Oct-2009, 10:19 AM #2
Hello.

What are the contents of your .htaccess file?

Have you recently updated PHP?

I had possibly the same problem today. Adding the following to my .htaccess worked:

php_flag allow_furl_open on
php_flag allow_url_include on

Do you have root access to the web server? If not, maybe you should contact your hosting company. :-).
__________________
--
Brie Aleida
http://areyououtofyourvulcanmind.com
twmprys's Avatar
Computer Specs
Member with 69 posts.
 
Join Date: Jun 2009
Experience: Beginner
29-Oct-2009, 11:04 AM #3
Thanks very much for the hint. I'll contact my hosting company and report back if I get any joy!
twmprys's Avatar
Computer Specs
Member with 69 posts.
 
Join Date: Jun 2009
Experience: Beginner
30-Oct-2009, 08:41 AM #4
The tell me it's nothing to do with .htaccess

Oh dear!
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,519 posts.
 
Join Date: Oct 2006
30-Oct-2009, 04:02 PM #5
might wanna echo getcwd()
Eriksrocks's Avatar
Computer Specs
Distinguished Member with 2,158 posts.
 
Join Date: Aug 2005
Location: Minnesota
Experience: Advanced
01-Nov-2009, 01:32 AM #6
Quote:
Originally Posted by briealeida View Post
Adding the following to my .htaccess worked:

php_flag allow_furl_open on
php_flag allow_url_include on
These are dangerous options that could allow someone to include remote PHP code if they can find a security hole in your scripts. Make sure your scripts are 110% secure before turning these on. They should not be needed for including files on the local server, anyway.

Quote:
Originally Posted by twmprys View Post
When I change the script to write the instruction 'require', I get a fatal error - Failed opening required 'menu.php' (include_path='.:/usr/share/pear') -. Trouble is, because the pages are seen as belonging to Apache, I can't get into them to find out what the script has written.
Something is wrong with the configuration of your PHP installation. Try changing the include (or require) path to "./menu.php".
__________________
Erik - erikswan.net - Bluehost Hosting!

Last edited by Eriksrocks : 01-Nov-2009 01:38 AM.
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:06 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.