473,320 Members | 1,846 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,320 software developers and data experts.

include_path and doc_root

Dear all,

I have a website hosted on Apache, where phpinfo gives DOCUMENT_ROOT as
/home/mysite/public_html, and include_path as
..:/usr/lib/php:/usr/local/lib/php; I have no control over these. For
development, work, however, I use IIS, but here I do have access to php.ini
file.

Basically I'm after a way to tweak (fudge) my local configuration such that
I can use include("/home/mysite/public_html/includes/public.php"); (for
instance), as well as <link rel="stylesheet" type="text/css"
href="/stylesheets/public.css" /> (for instance) on my development
workstation as well as on the live server.

I'm using IIS 5.1 on Windows XP, where my default web site's home directory
points to D:\My Documents\My Website\home\mysite\public_html; my first
instinct was to set my local doc_root to D:\My Documents\My Website (and
every imagineable combination of trailing slashes/forwardslashes/quotes) in
php.ini, but doing so results in IIS returning a 404 error whenever it tries
to process a PHP page, presumably because it's outside this root directory
of IIS's default web site.

Any ideas? I don't particulalry want to install Apache locally (most of the
time I'm developing in ASP.NET), or use set_include_path(); every time I use
an include function...

Thanks in advance,

Paul
Relative newbie
Jul 17 '05 #1
3 3489
Paul wrote:
Dear all,

I have a website hosted on Apache, where phpinfo gives DOCUMENT_ROOT as
/home/mysite/public_html, and include_path as
.:/usr/lib/php:/usr/local/lib/php; I have no control over these. For
development, work, however, I use IIS, but here I do have access to php.ini
file.

Basically I'm after a way to tweak (fudge) my local configuration such that
I can use include("/home/mysite/public_html/includes/public.php"); (for
instance), as well as <link rel="stylesheet" type="text/css"
href="/stylesheets/public.css" /> (for instance) on my development
workstation as well as on the live server.

I'm using IIS 5.1 on Windows XP, where my default web site's home directory
points to D:\My Documents\My Website\home\mysite\public_html; my first
instinct was to set my local doc_root to D:\My Documents\My Website (and
every imagineable combination of trailing slashes/forwardslashes/quotes) in
php.ini, but doing so results in IIS returning a 404 error whenever it tries
to process a PHP page, presumably because it's outside this root directory
of IIS's default web site.

Any ideas? I don't particulalry want to install Apache locally (most of the
time I'm developing in ASP.NET), or use set_include_path(); every time I use
an include function...

Thanks in advance,

Paul
Relative newbie

Use relative paths
Jul 17 '05 #2
Paul wrote:
Dear all,

I have a website hosted on Apache, where phpinfo gives DOCUMENT_ROOT as
/home/mysite/public_html, and include_path as
.:/usr/lib/php:/usr/local/lib/php; I have no control over these. For
development, work, however, I use IIS, but here I do have access to php.ini
file.

Basically I'm after a way to tweak (fudge) my local configuration such that
I can use include("/home/mysite/public_html/includes/public.php"); (for
instance), as well as <link rel="stylesheet" type="text/css"
href="/stylesheets/public.css" /> (for instance) on my development
workstation as well as on the live server.

I'm using IIS 5.1 on Windows XP, where my default web site's home directory
points to D:\My Documents\My Website\home\mysite\public_html; my first
instinct was to set my local doc_root to D:\My Documents\My Website (and
every imagineable combination of trailing slashes/forwardslashes/quotes) in
php.ini, but doing so results in IIS returning a 404 error whenever it tries
to process a PHP page, presumably because it's outside this root directory
of IIS's default web site.

Any ideas? I don't particulalry want to install Apache locally (most of the
time I'm developing in ASP.NET), or use set_include_path(); every time I use
an include function...

Thanks in advance,

Paul
Relative newbie

who said linux is stable - thunderbird just wen down with a seg fault,
use relative paths based on the webroot directory
Jul 17 '05 #3
.oO(NSpam)
who said linux is stable - thunderbird just wen down with a seg fault,


Linux is just the kernel, nothing more.

Micha
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ramprasad A Padmanabhan | last post by:
I know it is a dummies question, But I am not able to find it on the php manual. Can anyone tell me How to set the include_path in php thanks Ram
3
by: mirko | last post by:
Hello, I have a problem with my include_path and I don't know why... Can anybody see the mistake? my configuration: PHP Version 4.3.11 System: Windows NT 5.0 build 2195
24
by: Paul | last post by:
I am taking over an existing app and having trouble understanding their references. They have encapsulated Pear packages in the directory structure like: /site /site/html/Pear.php...
10
by: Schraalhans Keukenmeester | last post by:
I suspect the following problem IS hosting provider specific, but they haven't been able to help me out so far. Perhaps I am doing something wrong and someone is able to spot the issue... Here...
0
by: Bastien Continsouzas | last post by:
I am trying to set the include path for SimpleTest under Eclipse I have the following config : Eclipse : 3.2.0 PHPEclipse 1.1.8 SimpleTest plugin : 0.2.1 I ran a test I found on the...
9
by: Charles Crume | last post by:
Hello Everyone; My site was hacked the other day -- someone was able to rename my index.shtml file and put their own index.html file on my server. Not sure how it was done, but looking through...
2
by: Rob Wilkerson | last post by:
Hey all - I'm trying to create a developer-friendly environment on my production server. By that, I mean an environment where developers don't need to worry about certain things. Among those...
1
by: hoobert | last post by:
Hi all -- I have an include_path question. Just setting up a new server, and I'm running into a really stupid issue. I have the following line in php.ini: include_path =...
4
by: Gordon | last post by:
Is it possible in, say, a .htaccess file, to append additional paths to the php include_path without knowing what the value of include_path is beforehand? I want to add an absolute path to a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.