473,574 Members | 3,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\my site\public_htm l; 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_pat h(); every time I use
an include function...

Thanks in advance,

Paul
Relative newbie
Jul 17 '05 #1
3 3505
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\my site\public_htm l; 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_pat h(); 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\my site\public_htm l; 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_pat h(); 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
1874
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
1907
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
5336
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 /site/html/Sigma.php /site/html/Common.php /site/html/Quickform.php /site/html/Quickform/
10
2595
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 goes. The actual path of the root dir of my account with hosting provider (H.P.) is: /usr/local/psa/home/vhosts/mydomain.com/ The webroot is a...
0
1875
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 SimpleTest plugin page and it worked fine http://simpletest.org/en/extension_eclipse.html
9
2399
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 the log file, I found a lots and lots of entries where an "include_path" parameter was included in the URL of the PHP page, as shown below: ...
2
1723
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 is the include path. I have a "core" include_path set in php.ini, but most projects will require an include path of their own _in addition to_ the...
1
2515
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 = ".:/usr/local/include:/usr/share/pear" Inside /usr/local/include there's a file lib/html/html.php which does some templating for me.
4
3809
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 directory and it's subdirectories from a .htaccess file, but I don't want to have to encode the entire current value of it and append my own path as that...
0
7764
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8273
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5336
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3775
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3794
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1375
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1102
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.