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 acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard netgear network printer problem ram registry repair router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
php include/require path

Reply  
Thread Tools
twmprys's Avatar
Computer Specs
Member with 106 posts.
 
Join Date: Jun 2009
Experience: Beginner
28-Oct-2009, 04: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 677 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
29-Oct-2009, 11: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://unixsysadmin.org
twmprys's Avatar
Computer Specs
Member with 106 posts.
 
Join Date: Jun 2009
Experience: Beginner
29-Oct-2009, 12:04 PM #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 106 posts.
 
Join Date: Jun 2009
Experience: Beginner
30-Oct-2009, 09:41 AM #4
The tell me it's nothing to do with .htaccess

Oh dear!
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,637 posts.
 
Join Date: Oct 2006
30-Oct-2009, 05:02 PM #5
might wanna echo getcwd()
Eriksrocks's Avatar
Computer Specs
Distinguished Member with 2,198 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 at 01:38 AM..
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:06 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.