php-windows Digest 14 Oct 2003 07:50:28 -0000 Issue 1955

Topics (messages 21772 through 21776):

Help needed on PHP+IIS+filesys
        21772 by: Michael Kochendoerfer

PHP not rendering for some reason
        21773 by: Trystano.aol.com

Re: Absolute and Relative directory
        21774 by: Michael Kochendoerfer

Running a php script as a service
        21775 by: Nicholls, David

Re: Writing to a file
        21776 by: Svensson, B.A.T. (HKG)

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

does anyone know how to handle file and directory paths on a IIS 5.0 
server? Problem is that the server has multi-domain and each domain has 
an 
associated 'root' dir below e:\webspaces.

So if one uses relative path strings, an opendir() for example will fail. 
One has to use "e:\\webspaces\\root_of_domain_1\\images\\" to access the 
/images folder of the configured domain 1.

I'm sure there are functions and env vars to accomplish this, but I'm 
quite 
new to PHP and didn't find them yet.

Problem is (I didn't describe it in my former post) that I'm unable to 
set 
a global document root that is valid for all domains and subdomains. I 
guess the webserver would assemble the path by itself, uniquely for each 
domain, to get the desired result.

Practical example: On one domain, they mix up FrontPage and PHP. Since 
FrontPage doesn't like PHP, they construct one part of the web using 
FrontPage (and its features like so-called 'designs' - which aren't more 
than stylesheets - and common borders - which are simply files in a 
hidden 
directory '_borders'), and the other part using PHP.
To combine both of them and to make them look almost the same, they could 
include a header and a footer.

Header file/section looks like:

<?php
  echo "<link rel='stylesheet' type='text/css' 
href='_themes/mytheme.css'>";
  include "./_borders/top.htm";
?>

Footer looks similar except for the filename (which is 'bottom.htm' 
here). 
When included in a .php file at their 'root' level, it works well. But if 
they use a subdir like /scripts, it won't. And changing the include file 
from ./borders/top.htm to /borders/top.htm, PHP puts the complete 
physical 
path to the left of the filename. But this is not relative to their root 
:-
(

To recall: Their root level is (physically mapped):

e:\\webspaces\\root_of_domain_1


Hope this has been clear enough to show my problem.

Thanks in advance!

- Michael

--- End Message ---
--- Begin Message ---
Hi all,

I am carrying out a PHP/MySQL tutorial and for some reason the PHP page I 
require (index.php) doesnt load into my browser. The browser window just displays 
nothing. I assume the page is being located as no error message is being 
reported.

Index.php uses some include files to execute some commands, but they seem to 
be in place etc. I have turned register globals to on, and this still doesnt 
do anything.

What I find strange is, even the basic HTML text is being printed to the 
screen.

I have included the index.php file, and the relevant include files, so if 
possible could someone please have a gander at them to see where the problem is. 
There are other include files, but I didnt feel it was relevant to include 
them.

Your help would be greatly appreciated.

Trystan Hughes
[EMAIL PROTECTED]
www.reflectivestudios.co.uk (under construction)

Attachment: index.ZIP
Description: Zip archive


--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] (Skate) wrote in news:068201c35dd0$3fe5a060
[EMAIL PROTECTED]:

> 
>> 
>> but I need relative directory, like require ("/lib/common/auth.inc"); 
>> 
> 
> try loosing the first /
> 
> "lib/common/auth.inc";

Interesting thread since I also run into problems with relative vs. 
absolute paths on IIS. My problem here is it has to run on a multihomed 
server where many domains are served and each domain has its own subdir 
below the designated 'root' dir.
Can't change it because domains are managed (and owned) by different users, 
so I can't provide a global include dir (or each user could 
modify/rename/kill modules of others).
I created a new article as of October 13, 2003 that's left unanswered. 
Maybe my problem is more descriptive there.

- Michael

--- End Message ---
--- Begin Message ---
Has anyone found a way of running a PHP script as a NT/2000 service? Would
be nice not to have to leave the console logged in all the time.

Regards
The information in this e-mail is confidential and may also be the subject of legal 
privilege. It is intended solely for the addressee. If you are not the intended 
recipient please reply to the sender. You are hereby placed on notice that any 
copying, publication or any other form of dissemination of this e-mail or its contents 
is prohibited.


--- End Message ---
--- Begin Message ---
Well, fopen() use to be a common choice here.

On Mon, 2003-10-13 at 19:58, Harpreet wrote:
> I am parsing an xml file and show the data in text boxes in a form .
> I want to edit the data and then update the file.
> 
> How can i go about editing a file using php
> 
> Help is appreciated
> 
> Regards,
> Harpreet

--- End Message ---

Reply via email to