473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Include shows on my computer but not when uploaded

3
Hello, I have been trying to learn PHP and have been spending all day trying to solve this "simple" problem. I am using Mac OS X 10.4. I am trying to create a site for myself that gets me out of always having to update main navigation links on every page by learning how to use a server side include.

I created a index page with the following include:

[PHP] <?php include("includes/header.php"); ?> [/PHP]

The header is just a simple nav bar with html text links. This works fine the header is displayed properly on top of the index page.

Within this header I am trying to have another include in a table cell for another set of links. This is what is not working. I have tried this code in a table cell as follows:

[PHP] <?php include("includes/mainLinks.php"); ?> [/PHP]

so basically I have an index page that brings in a header with links and a header that brings in another set of links. So one index file and two includes.

Everything works fine on my computer but when uploaded I get this error:

Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear//mainLinks.php) is not within the allowed path(s):

Any help would be appreciated

Thanks
Feb 15 '07 #1
5 1305
jauiek
3
I have been trying to figure this out more and have been getting this error:

Call to undefined function include_path()

thanks
Feb 15 '07 #2
cassbiz
202 100+
Try re-writing your include statement

Expand|Select|Wrap|Line Numbers
  1. <?php include "includes/mainLinks.php"; ?> 
  2.  
Good Luck
Feb 15 '07 #3
d3vkit
35
Try re-writing your include statement

Expand|Select|Wrap|Line Numbers
  1. <?php include "includes/mainLinks.php"; ?> 
  2.  
Good Luck
Is there any difference? All I see is the parenthesis removed. Is that different in how it includes?
Feb 16 '07 #4
Atli
5,058 Expert 4TB
Hi

Try changing the line like this

[php]
// From
<?php include("includes/mainLinks.php"); ?>
// To
<?php include("./includes/mainLinks.php"); ?>
[/php]

It wouldn't matter on Windows, but I dont know about Linux or Mac.
Feb 16 '07 #5
jauiek
3
Thanks everyone and sorry for the super late reply... got it!!
Apr 12 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Zaan | last post by:
www.entropy.ch release for Mac OS X.] Hello, My issue is the following: to promote consistency on a site I'm building, I decided to go for a php scheme where some recurring elements...
23
by: Big Bill | last post by:
http://www.promcars.co.uk/pages/bonnie.php I don't believe they should be there, can I take them out without stopping the includes from functioning? I'm the (hapless) optimiser on this one... I...
3
by: =?Utf-8?B?c3Jpbml2YXM=?= | last post by:
Hi All, My ASP.net application has to fetch data from Excel sheet. I'm using HTML File Control to select an excel file. I'm using Microsoft.Jet.OLEDB.4.0 provider to fetch the data from excel....
1
by: =?Utf-8?B?QnJhbmRvbg==?= | last post by:
Hi, I have an aspx page that contains an include section which calls an html page for text to be displayed on the aspx page. I also have an upload page that allows users to upload a simple html...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.