php-windows Digest 2 Apr 2002 05:34:52 -0000 Issue 1073

Topics (messages 12860 through 12883):

Re: Passing an array into a COM function
        12860 by: Jeff Bendixsen

Re: Configuring securely in IIS5
        12861 by: Robin Bolton
        12862 by: Eric Gentry

Delphi & PHP
        12863 by: Quique

Security using Apache & Windows
        12864 by: Tim Mackenzie

Apache, PHP, Windows, and Security
        12865 by: Tim Mackenzie

Same Problem
        12866 by: martinahingis

How to add more domains on apache w2k
        12867 by: martinahingis
        12870 by: Shrock, Court
        12871 by: martinahingis
        12877 by: Vail, Warren
        12878 by: Vail, Warren
        12879 by: Jason Bouwmeester
        12880 by: martinahingis

Re: strings with $ sign
        12868 by: martinahingis

Re: Error - (include_path='c:\php4\pear') in Unknown on line 0
        12869 by: Ryan Grove

COM Question
        12872 by: Aron Pilhofer

Doesn't work
        12873 by: martinahingis
        12874 by: martinahingis

mail();
        12875 by: martinahingis

Thanks everyone i solved it
        12876 by: martinahingis

Re: Configuring securely in IIS5 under Windows 2000 Server
        12881 by: Bruce Barnes

global variables headache
        12882 by: Jon Lauridsen

XSLTransformation via Sablotron
        12883 by: Jan Walter

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 ---
So let me answer my question.. 

You idiot, RTFM!!!

There is documentation on the use of Variants in the COM section. Lots
of good support even for passing ByRef.

An example of using a COM array is like this:

      $PSearchCriteria[0] = "THIS";
      $PSearchCriteria[1] = "THAT";
      $SearchCriteria = new Variant($PSearchCriteria, VT_ARRAY);

Here is a result array passed by reference:

      $PResult = array();
      $Result = new Variant($PResult, VT_ARRAY | VT_BYREF);

There is no support for multi dimensioanl arrays

Jeff

On Thu, 28 Mar 2002 13:56:13 GMT, [EMAIL PROTECTED] (Jeff Bendixsen)
wrote:

>Hi
>
>I have an example in ASP calling a COM objectr that looks like this:
>
>...
>redim vArray(1,1)
>vArray(0,0)="Name1"
>vArray(1,0)="Value1"
>vArray(0,1)="Name2"
>vArray(1,1)="Value2"
>res=obj.SomeFunction(vArray,arrRes,CInt(100))
>...
>
>So far the authors will only tell me that they use Variant arrays. 
>
>ofcousre it all starts off like:
>$obj = new com("SynWeb.Application") or die("Error");
> if (is_object($obj)) {
>  $res = $obj->ConnectToRep($repository, $server);
>  ...
>
>Thats all fine and works. The problem comes with invoking this
>function that takes 2 arrays, Variant array to be more precise.
>I tried this:
>
>$SearchCriteria[0][0] = "Name1";
>$SearchCriteria[0][1] = "Value1";
>$SearchCriteria[1][0] = "Name2";
>$SearchCriteria[1][1] = "Value2";
>$Result = array();
>$res = $obj->SomeFunction($SearchCriteria, $Result, 10);
>
>or:
>
>$SearchCriteria[0][0] = "Name1";
>$SearchCriteria[1][0] = "Value1";
>$SearchCriteria[0][1] = "Name2";
>$SearchCriteria[1][1] = "Value2";
>$Result = array();
>$res = $obj->SomeFunction($SearchCriteria, $Result, 10);
>
>or:
>
>$SearchCriteria[0] = array("Name1" => "Value1");
>$Result = array();
>$res = $obj->SomeFunction($SearchCriteria, $Result, 10);
>
>I get:
>
>Warning:  Invoke() failed: Exception occurred.
> Source: SynWeb Description: Subscript out of range in
>c:\apache\htdocs\myscript.php on line 22
>
>plus about 50 other things I coulkd think of. Does anyone know if this
>is possible with PHP and how?
>
>BTW the ASP code does work I have had it running.
>
>Jeff

--- End Message ---
--- Begin Message ---
A good place to start may be the IIS Lockdown Tool:

http://www.microsoft.com/WINDOWS2000/downloads/recommended/iislockdown/defau
lt.asp


-----Original Message-----
From: Eric Gentry [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 8:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Configuring securely in IIS5


I have been able to install php and get it running on our test server
running IIS5. Everything is going fine, but now I am beginning to ponder
the question, how do I secure this when it goes live?

I have read through the installation documentation, and read the
security
chapter of the php manual that I downloaded from the php.net website.

Various queries to Google have been unproductive, so I thought I may
check
here.

Now, I am not talking about script internals security (that will be
handled
more by our development team), just mainly how to configure php on the
server so that I don't have people tearing the darn thing down when this
site goes live. We are using the ISAPI module.

I have seen numerous tidbits on Apache, but we are going to be using
IIS.

Can anyone point me to a book, FAQ, examples, anything to set me on the
way?

Thanks a ton



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I have looked at the tool already, and it doesn't reference security for
any issues with php.

I know what to do to the IIS server to secure it, my concern is over the
addition of the php module and how it effects the security of the
system.

-----Original Message-----
From: Robin Bolton [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 01, 2002 10:52 AM
To: Eric Gentry; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Configuring securely in IIS5


A good place to start may be the IIS Lockdown Tool:

http://www.microsoft.com/WINDOWS2000/downloads/recommended/iislockdown/d
efau
lt.asp


-----Original Message-----
From: Eric Gentry [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 8:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Configuring securely in IIS5


I have been able to install php and get it running on our test server
running IIS5. Everything is going fine, but now I am beginning to ponder
the question, how do I secure this when it goes live?

I have read through the installation documentation, and read the
security chapter of the php manual that I downloaded from the php.net
website.

Various queries to Google have been unproductive, so I thought I may
check here.

Now, I am not talking about script internals security (that will be
handled more by our development team), just mainly how to configure php
on the server so that I don't have people tearing the darn thing down
when this site goes live. We are using the ISAPI module.

I have seen numerous tidbits on Apache, but we are going to be using
IIS.

Can anyone point me to a book, FAQ, examples, anything to set me on the
way?

Thanks a ton



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I need someone who knows about Indy Components (delphi) and PHP 
programming.
I use a TidTCPServer which is active at port 4250 listening 4 
connections.
When i connect from another machine in my LAN, using PHP, the TCPServer 
tells me, that's right...
The problem is when i want to read a text from the client (PHP). 
TCPServer tells me that a message came, but it doesn't shw it to me.

Following is the code i use.

procedure TMainForm.TCPServerConnect(AThread: TIdPeerThread);
begin
  MessageDlg('User has connected from web', mtInformation, [mbOK], 0);
end;

...

procedure TMainForm.TCPServerExecute(AThread: TIdPeerThread);
Var
  Msg:String;
begin
  { Get the text sent from the client }
  Msg := AThread.Connection.ReadLn;
  MessageDlg('Message received: '+Msg, mtInformation, [mbOK], 0);
end;

...

This is PHP code (connect.php)
----------------

<?php
//try to connect to the TCPServer on 10.0.0.8
$fp = fsockopen("10.0.0.8",4250,&$errno,&$errstr,30);
//if can't connect, show error
if(!$fp) {
        echo "Error connecting. Try later.";
        echo "<br>$errstr ($errno)<br>\n";
}
else {
        if (empty($field_msg)) {
                echo "<form name=\"formsend\" method=\"post\" action=
\"connect.php\">Message: ";
                echo "<input type=\"text\" name=\"field_msg\" size=\"30\" 
maxlength=\"150\"><br>";
                echo "<input type=\"submit\" name=\"submit\" value=\"Send 
message\"></form>";
        }
        else {  
                echo "Message sent to Server!";
                fputs($fp,$field_msg);
                fclose($fp);
        }
}
?>

...

Does anyone what may be wrong with this?
When user sends message from web i see the Server @ 10.0.0.8 showing me
a message dialog
---------------------
| Message received: |
---------------------

BUT I CAN'T SEE THE MESSAGE...
Sorry 4 long post. Thanks in advance. 

----------------------------------
Henry - Argentina
http://www.quiquesistemas.com.ar
[EMAIL PROTECTED]
ICQ: 18048153
--- End Message ---
--- Begin Message ---
I'm running W2K with Apache and PHP4.  I'm going to be hosting a number of
websites that I would like to provide PHP support for.  What I don't want is
them to be able to access my entire file system.  They should, at most, be
only allowed read/write access to their site folder.  How do I go about
doing this?  I've looked around, but I haven't found something that
addresses this.  I know there's the basedir value (I think that's it), but I
don't understand how to use it.  Could somebody (several people) please post
any tips they have for securing the file system of a web server.  Thanks!


--- End Message ---
--- Begin Message ---
I'm running W2K with Apache and PHP4.  I'm going to be hosting a number of
websites that I would like to provide PHP support for.  What I don't want is
them to be able to access my entire file system.  They should, at most, be
only allowed read/write access to their site folder.  How do I go about
doing this?  I've looked around, but I haven't found something that
addresses this.  I know there's the basedir value (I think that's it), but I
don't understand how to use it.  Could somebody (several people) please post
any tips they have for securing the file system of a web server.  Thanks!


--- End Message ---
--- Begin Message ---
I got the same problem today. I upgraded my php 4.1.1 to 4.1.2 a couple days
ago. But the error message come out today and only one of several apps. on
my server! I don't use the folder c:\php4. But it seems that some setting
changed the include dir? How can this occur! There's no explanation in my
mind.

Hope solving it a.s.a.p

"Aleem" <[EMAIL PROTECTED]> wrote in message
000401c1d980$2ca4e590$886c6518@Raptor">news:000401c1d980$2ca4e590$886c6518@Raptor...
I am getting the wierdest PHP error. I couldn't find anything on the web
regarding this error. The exact error is as follows:

[01-Apr-2002 02:45:41] PHP Warning:  Failed opening
'/apache/htdocs/php.php' for inclusion (include_path='c:\php4\pear') in
Unknown on line 0

I have put up online copies of my httpd.conf and php.ini files up at:

http://one.com.pk/tmp/httpd.conf.txt
http://one.com.pk/tmp/php.ini

I'm on a Win2K machine, running PHP v4.1.2. I was running 4.0.6 and then
ran the windows installer version of 4.1.2 but when that failed I got
the zipped version, and installed fresh in c:\php

I'm running Apache 1.3.42 and even installed the latest MDA Components
(2.7 RTM)

The error occurs even on a simple php page with the following: <?
phpinfo() ?> ( http://one.com.pk/php.php )

The page appears blank and logs an error to the log file as pasted on
top of this mail. I have thus far tried all variations in the install
guide, copied php4ts and others from php/dll into the system32 folder,
copied the php.ini in system32, etc. I don't understand why it's giving
me the same error even after a fresh install (I had the Zend Scripting
Engine installed before installing 4.1.2 but that shouldn't have left
any legacy files either because I complete remoed the php folder and
installed over... my guess is it has something to do with apache)

tia,
Aleem



--- End Message ---
--- Begin Message ---
I have added a domain at my W2K machine in my network neighborhood, LAN ->
DNS Settings. And when i write my ip or the domain name i specified, on ie,
it goes my htdocs folder as it must do.

My question is that how can i add another domain name. If I add it to DNS
settings, where will its htdocs directory? A different htdocs or a folder
under it? Is it about the httpd.conf file? I don't know dealing with more
than one domains apache at all.

thanks for help

martina.


--- End Message ---
--- Begin Message ---
You can add another domain by creating a <VirtualHost></VirtualHost> section
in your httpd.conf file for each domain you want to add.  Inside this
section, you specify the document root directory to serve files from.

a sample follows (More information can be found at
http://www.apache.org/docs/vhosts/):

# this directive tells apache to use the Host header from the http request
NameVirtualHost *

# the actual virtual host container for domain1
<VirtualHost *>
  ServerName www.domain1.com
  ServerAlias www.domain1.com *.domain1.com
  DocumentRoot c:\path\to\domain1\files
</VirtualHost>

# the actual virtual host container for domain2
<VirtualHost *>
  ServerName www.domain2.com
  ServerAlias www.domain2.com *.domain2.com
  DocumentRoot c:\path\to\domain2\files
</VirtualHost>


> -----Original Message-----
> From: martinahingis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 01, 2002 1:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] How to add more domains on apache w2k
> 
> 
> I have added a domain at my W2K machine in my network 
> neighborhood, LAN ->
> DNS Settings. And when i write my ip or the domain name i 
> specified, on ie,
> it goes my htdocs folder as it must do.
> 
> My question is that how can i add another domain name. If I 
> add it to DNS
> settings, where will its htdocs directory? A different htdocs 
> or a folder
> under it? Is it about the httpd.conf file? I don't know 
> dealing with more
> than one domains apache at all.
> 
> thanks for help
> 
> martina.
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
thanks for lots of replies.
please send your replies also to gropu so that people can see your replies
and can comment on them and also people may see your replies and don't wory
about writing a new one possibly telling similar things..
--
---------------------------
martina.
"Martinahingis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have added a domain at my W2K machine in my network neighborhood, LAN ->
> DNS Settings. And when i write my ip or the domain name i specified, on
ie,
> it goes my htdocs folder as it must do.
>
> My question is that how can i add another domain name. If I add it to DNS
> settings, where will its htdocs directory? A different htdocs or a folder
> under it? Is it about the httpd.conf file? I don't know dealing with more
> than one domains apache at all.
>
> thanks for help
>
> martina.
>
>


--- End Message ---
--- Begin Message ---
OK, I sent a reply which included what I thought were valid questions on
this subject, and have not seen that yet, perhaps the black hole ate them.


Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-----Original Message-----
From: martinahingis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: How to add more domains on apache w2k


thanks for lots of replies.
please send your replies also to gropu so that people can see your replies
and can comment on them and also people may see your replies and don't wory
about writing a new one possibly telling similar things..
--
---------------------------
martina.
"Martinahingis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have added a domain at my W2K machine in my network neighborhood, LAN ->
> DNS Settings. And when i write my ip or the domain name i specified, on
ie,
> it goes my htdocs folder as it must do.
>
> My question is that how can i add another domain name. If I add it to DNS
> settings, where will its htdocs directory? A different htdocs or a folder
> under it? Is it about the httpd.conf file? I don't know dealing with more
> than one domains apache at all.
>
> thanks for help
>
> martina.
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---

Don't you also need to do something to cause DNS to resolved to the IP of
the same server for both domains?

Any idea what's required to do this using NT DNS? / BIND?

thanks,

Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-----Original Message-----
From: Shrock, Court [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:10 PM
To: 'martinahingis'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] How to add more domains on apache w2k


You can add another domain by creating a <VirtualHost></VirtualHost> section
in your httpd.conf file for each domain you want to add.  Inside this
section, you specify the document root directory to serve files from.

a sample follows (More information can be found at
http://www.apache.org/docs/vhosts/):

# this directive tells apache to use the Host header from the http request
NameVirtualHost *

# the actual virtual host container for domain1
<VirtualHost *>
  ServerName www.domain1.com
  ServerAlias www.domain1.com *.domain1.com
  DocumentRoot c:\path\to\domain1\files
</VirtualHost>

# the actual virtual host container for domain2
<VirtualHost *>
  ServerName www.domain2.com
  ServerAlias www.domain2.com *.domain2.com
  DocumentRoot c:\path\to\domain2\files
</VirtualHost>


> -----Original Message-----
> From: martinahingis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 01, 2002 1:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] How to add more domains on apache w2k
> 
> 
> I have added a domain at my W2K machine in my network 
> neighborhood, LAN ->
> DNS Settings. And when i write my ip or the domain name i 
> specified, on ie,
> it goes my htdocs folder as it must do.
> 
> My question is that how can i add another domain name. If I 
> add it to DNS
> settings, where will its htdocs directory? A different htdocs 
> or a folder
> under it? Is it about the httpd.conf file? I don't know 
> dealing with more
> than one domains apache at all.
> 
> thanks for help
> 
> martina.
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
If you hit reply it only goes to the person that sent it, you have to
reply to all to get to the list... Figures!

~j

-----Original Message-----
From: Vail, Warren [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 01, 2002 5:57 PM
To: 'martinahingis'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: How to add more domains on apache w2k


OK, I sent a reply which included what I thought were valid questions on
this subject, and have not seen that yet, perhaps the black hole ate
them.


Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-----Original Message-----
From: martinahingis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: How to add more domains on apache w2k


thanks for lots of replies.
please send your replies also to gropu so that people can see your
replies and can comment on them and also people may see your replies and
don't wory about writing a new one possibly telling similar things..
--
---------------------------
martina.
"Martinahingis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have added a domain at my W2K machine in my network neighborhood, 
> LAN -> DNS Settings. And when i write my ip or the domain name i 
> specified, on
ie,
> it goes my htdocs folder as it must do.
>
> My question is that how can i add another domain name. If I add it to 
> DNS settings, where will its htdocs directory? A different htdocs or a

> folder under it? Is it about the httpd.conf file? I don't know dealing

> with more than one domains apache at all.
>
> thanks for help
>
> martina.
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
I actually dont know how DNS works.

I have a domain which my university gave me and make its settings properly.
I set my machine for the DNS address they gave me and the domain name to the
DNS settings of the TCP/IP settings window.

This domain works perfect. But now I registered another domain name and I
can directly change my new domains name server or DNS (or smthing like that
i can't remember) via a web based sistem.

Is it enough for me to set my server to the second domain or do I have to
say my university computer center to resolve my ip for the second domain
name or smth?

And also I dont know what BIND is. Actually i dont like protocols. But love
PHP.

thanks for advices. If you know ansers to my question i'll be happy.

martina.
----- Original Message -----
From: "Vail, Warren" <[EMAIL PROTECTED]>
To: "'Shrock, Court'" <[EMAIL PROTECTED]>; "'martinahingis'"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 2:10 AM
Subject: RE: [PHP-WIN] How to add more domains on apache w2k


>
> Don't you also need to do something to cause DNS to resolved to the IP of
> the same server for both domains?
>
> Any idea what's required to do this using NT DNS? / BIND?
>
> thanks,
>
> Warren Vail
> Tools, Metrics & Quality Processes
> (415) 667-7814
> Pager (877) 774-9891
> 215 Fremont 02-658
>
>
> -----Original Message-----
> From: Shrock, Court [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 01, 2002 2:10 PM
> To: 'martinahingis'; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] How to add more domains on apache w2k
>
>
> You can add another domain by creating a <VirtualHost></VirtualHost>
section
> in your httpd.conf file for each domain you want to add.  Inside this
> section, you specify the document root directory to serve files from.
>
> a sample follows (More information can be found at
> http://www.apache.org/docs/vhosts/):
>
> # this directive tells apache to use the Host header from the http request
> NameVirtualHost *
>
> # the actual virtual host container for domain1
> <VirtualHost *>
>   ServerName www.domain1.com
>   ServerAlias www.domain1.com *.domain1.com
>   DocumentRoot c:\path\to\domain1\files
> </VirtualHost>
>
> # the actual virtual host container for domain2
> <VirtualHost *>
>   ServerName www.domain2.com
>   ServerAlias www.domain2.com *.domain2.com
>   DocumentRoot c:\path\to\domain2\files
> </VirtualHost>
>
>
> > -----Original Message-----
> > From: martinahingis [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 01, 2002 1:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] How to add more domains on apache w2k
> >
> >
> > I have added a domain at my W2K machine in my network
> > neighborhood, LAN ->
> > DNS Settings. And when i write my ip or the domain name i
> > specified, on ie,
> > it goes my htdocs folder as it must do.
> >
> > My question is that how can i add another domain name. If I
> > add it to DNS
> > settings, where will its htdocs directory? A different htdocs
> > or a folder
> > under it? Is it about the httpd.conf file? I don't know
> > dealing with more
> > than one domains apache at all.
> >
> > thanks for help
> >
> > martina.
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>




--- End Message ---
--- Begin Message ---
use this

$result_html = " ... html code....<-- \" FOOTER CENTER \$LOGOIMAGE
footer.jpg \" !--> ... more html code";
---------------
martina.

"Sviss Cobazor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The thing is that the result html code is to be parsed by HTMLDOC (pdf
> generator) to create pdf from the webpage. By inserting <-- "some string"
> !--> into the html, HTMLDOC can catch these strings and act from them.
>
> example:
>
> $result_html = " ... html code....<-- " FOOTER CENTER $LOGOIMAGE
footer.jpg
> " !--> ... more html code";
>
> result_html is the page contens for HTMLDOC to parse and through that
catch
> the footer code and insert footer.jpg as the footer on the pdf pages.
>
> the problem is that php converts $LOGOIMAGE to a php variable. \$LOGOIMAGE
> doesn't seem to work.
>
> "Robert Janeczek" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I just wanted to know how to use strings with $ sign.
> > >
> > > If a word starts with a dollar sign php will think it's a variable,
how
> > can
> > > I make
> > > " $bla bla  and bla $bla " to stay that way?
> > > Will this work? " \$bla bla  and bla \$bla "
> >
> > don`t use "" - use ''. php doesn`t parse variables in such kind of
> strings.
> > ' $bla bla  and bla $bla '
> >
> > " \$bla bla  and bla \$bla " - this should work too, but i haven`t
> checked.
> >
> > rash
> >
> >
>
>


--- End Message ---
--- Begin Message ---
On Mon, 1 Apr 2002, Aleem wrote:

> I am getting the wierdest PHP error. I couldn't find anything on the web
> regarding this error. The exact error is as follows:
>
> [01-Apr-2002 02:45:41] PHP Warning:  Failed opening
> '/apache/htdocs/php.php' for inclusion (include_path='c:\php4\pear') in
> Unknown on line 0
*snip*

I had the same problem when I upgraded to 4.1.2. You just need to change
the setting of "include_path" to search the current directory first. So,
for example:

include_path="."

Or, if you need to use the PEAR repository:

include_path=".;c:\php\pear"

(replace c:\php with your PHP path)

-- 
Ryan Grove
[EMAIL PROTECTED]
http://wonko.com/

--- End Message ---
--- Begin Message ---
Can anyone suggest a good tutorial, or website, where I can find information
about creating COM objects through PHP? I want to, for example, give users
the ability to save result sets to their local computers in excel, or even
access - if that's even possible. I've found a couple places with some info,
but it's pretty thin. Thanks in advance.


--- End Message ---
--- Begin Message ---
I tried to change my php.ini
with
include_path="."

copy php.ini to winnt\system32 and restart apache

but no change i still gett the error message that include path is php4/pear
and the included file doesn't exits

can anyone help?


--

martina.
"Ryan Grove" <[EMAIL PROTECTED]> wrote in message
Pine.WNT.4.44.0204011318230.1668-100000@nooch">news:Pine.WNT.4.44.0204011318230.1668-100000@nooch...
> On Mon, 1 Apr 2002, Aleem wrote:
>
> > I am getting the wierdest PHP error. I couldn't find anything on the web
> > regarding this error. The exact error is as follows:
> >
> > [01-Apr-2002 02:45:41] PHP Warning:  Failed opening
> > '/apache/htdocs/php.php' for inclusion (include_path='c:\php4\pear') in
> > Unknown on line 0
> *snip*
>
> I had the same problem when I upgraded to 4.1.2. You just need to change
> the setting of "include_path" to search the current directory first. So,
> for example:
>
> include_path="."
>
> Or, if you need to use the PEAR repository:
>
> include_path=".;c:\php\pear"
>
> (replace c:\php with your PHP path)
>
> --
> Ryan Grove
> [EMAIL PROTECTED]
> http://wonko.com/
>


--- End Message ---
--- Begin Message ---
one says me that
---------
for me, my php.ini has to be in winnt\ directory, not winnt\system32.

can you successfully run a "<?php phpinfo() ?>" file?  in the results, it
will tell you were it is expecting your php.ini file.
---------

I actually copy php.ini to winnt, winnt/system and winnt/system32 always.
it seems winnt in phpinfo

but problem still exists.

but the interesting thing is that the inclue_path problem exists in only one
work in my server. I mean there are several web appz. at my server but only
of them gives the error. although most of them uses the include(""); none of
them generates error besides one.

--

martina.
"Martinahingis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I tried to change my php.ini
> with
> include_path="."
>
> copy php.ini to winnt\system32 and restart apache
>
> but no change i still gett the error message that include path is
php4/pear
> and the included file doesn't exits
>
> can anyone help?
>
>
> --
>
> martina.
> "Ryan Grove" <[EMAIL PROTECTED]> wrote in message
> Pine.WNT.4.44.0204011318230.1668-100000@nooch">news:Pine.WNT.4.44.0204011318230.1668-100000@nooch...
> > On Mon, 1 Apr 2002, Aleem wrote:
> >
> > > I am getting the wierdest PHP error. I couldn't find anything on the
web
> > > regarding this error. The exact error is as follows:
> > >
> > > [01-Apr-2002 02:45:41] PHP Warning:  Failed opening
> > > '/apache/htdocs/php.php' for inclusion (include_path='c:\php4\pear')
in
> > > Unknown on line 0
> > *snip*
> >
> > I had the same problem when I upgraded to 4.1.2. You just need to change
> > the setting of "include_path" to search the current directory first. So,
> > for example:
> >
> > include_path="."
> >
> > Or, if you need to use the PEAR repository:
> >
> > include_path=".;c:\php\pear"
> >
> > (replace c:\php with your PHP path)
> >
> > --
> > Ryan Grove
> > [EMAIL PROTECTED]
> > http://wonko.com/
> >
>
>


--- End Message ---
--- Begin Message ---
I can't send mails using mail() on w2k

I know that there's no support to mail() but is there a way to make it
support

--

martina.


--- End Message ---
--- Begin Message ---
I solved the problem jus looking properly to phpinfo for each time i changed
something and try to see if it's changed

thanks.

--

martina.
"Aleem" <[EMAIL PROTECTED]> wrote in message
000401c1d980$2ca4e590$886c6518@Raptor">news:000401c1d980$2ca4e590$886c6518@Raptor...
I am getting the wierdest PHP error. I couldn't find anything on the web
regarding this error. The exact error is as follows:

[01-Apr-2002 02:45:41] PHP Warning:  Failed opening
'/apache/htdocs/php.php' for inclusion (include_path='c:\php4\pear') in
Unknown on line 0

I have put up online copies of my httpd.conf and php.ini files up at:

http://one.com.pk/tmp/httpd.conf.txt
http://one.com.pk/tmp/php.ini

I'm on a Win2K machine, running PHP v4.1.2. I was running 4.0.6 and then
ran the windows installer version of 4.1.2 but when that failed I got
the zipped version, and installed fresh in c:\php

I'm running Apache 1.3.42 and even installed the latest MDA Components
(2.7 RTM)

The error occurs even on a simple php page with the following: <?
phpinfo() ?> ( http://one.com.pk/php.php )

The page appears blank and logs an error to the log file as pasted on
top of this mail. I have thus far tried all variations in the install
guide, copied php4ts and others from php/dll into the system32 folder,
copied the php.ini in system32, etc. I don't understand why it's giving
me the same error even after a fresh install (I had the Zend Scripting
Engine installed before installing 4.1.2 but that shouldn't have left
any legacy files either because I complete remoed the php folder and
installed over... my guess is it has something to do with apache)

tia,
Aleem



--- End Message ---
--- Begin Message ---
Eric et al;

START BY MAKING A FULL AND COMPLETE BACKUP OF YOUR MACHINE!  IF you make an
error with USERS, GROUPS and PERMISSIONS, you might lock yourself completely
out of the machine and not be able to regain access to your drives and
directories without a complete reinstall of the Windows 2000 Operating
System.

The first thing that anyone who is running Windows 2000 should do is to
format the logical drives using NTFS - this allows for MUCH greater file
security than other file systems.

The next thing to do is to DELETE the permissions for the GROUP "EVERYONE"
from all of your logical drives.  To DELETE the permissions for the GROUP
"EVERYONE" from the directory that is going to contain the actual files for
the web site.  If we assume that the name of the site is
"WWW.PHPHEADACHES.COM and the directory in which the files are located is
"PHPHEADACHES", then we would highlight the directory "PHPHEADACHES", right
click on the directory, goto the SECURITY TAB and /UNCHECK the box that is
at the bottom of the SECURITY WINDOW that states: "Allow Inheritable
Permissions from Parent to Propagate to this Object."

At that point you should receive an option window that will allow you to:
        COPY
        REMOVE or
        CANCEL

You want to select COPY.  This will COPY all of the users and groups
permissions to the local directory

Next, HIGHLIGHT the GROUP named "EVERYONE" and press the DELETE key.  The
"EVERYONE" GROUP has now been deleted from the directory and has no
permissions and you have now locked out anyone except the users and groups
to which you specifically give permissions.

For the purposes of PHP, the "everyone" user, as referenced in the
installation instructions, can be replaced with the GROUP of "USERS" (no
quotes) from the LOCAL MACHINE on which IIS and PHP are installed, and that
use can be given the "write" permissions where the "EVERYONE" user used to
be required to have them.

If you are running on a network with a DOMAIN SERVER, do NOT use the group
"your_network_domain_name\DOMAIN USERS" as they will not have any
permissions on the local machine unless the "DOMAIN USERS" group has been
specifically added to the "local_machine_name\USERS" group.

Next, REMOVE the "USERS" group from each of your IIS web site directories.
The only users who should have permissions in those sites are:

1. "IUSER_local_machine_name" where "local_machine_name" is the actual name
of the local machine WITHOUT the name of the domain appended to it.  ie: if
the fully qualified domain name is "foo.bar.com", then the
"local_machine_name" will be "foo" and the username added to the directory
will be "IUSER_foo" with permissions set to READ & EXECUTE, LIST and READ -
there should be NO other permissions set for this user.

2. The username of the person who is responsible for sending the files to
the site via FTP.  Remember, that user must be a user on the LOCAL machine -
in this case the "FOO" machine.  If the name of the web site directory for
the hosted site is "PHPHEADACHES" and the site is named
"www.phpheadaches.com", on the machine named "FOO" and the username of the
person responsible for maintaining the web site www.phpheadaches.com named
"KONG" and "KONG" is using FTP to send the files up to the site hosted on
"FOO", then "KONG", a user on the "FOO" machine will have permissions to the
directory "PHPHEADACHES" with the permissions of MODIFY, READ & EXECUTE,
LIST, READ, and WRITE.

The user "KONG" should NOT have the FULL CONTROLL permissions as this will
allow him to "take ownership" of the various files and system files that
might be created in the directory.  If you do not want "KONG" to be able to
execute scripts or other files in the "PHPHEADACHES" directory, then you
should UNCHECK the READ & EXECUTE setting for the user "KONG" as well.

As the "ADMINISTRATOR" of the machine on which the web site is hosted, you
will want the local machine administrator account, in this case
"FOO\ADMINISTRATOR" to have FULL CONTROL of the web site directory
"PHPHEADACHES".  If the web site machine "FOO" is part of a domain and your
administrative account get's it's administrative permissions from a domain
controller, you will also want to add the ADMINISTRATOR(S)" account for the
domain to the directory "PHPHEADACHES" and give that account FULL CONTROLL
as well.  In this case, the addition of the domain administrator(s) account
would look like this
"BAR.COM\ADMINISTRATOR(S)".  The "BAR.COM\ADMINISTRATOR(S)" account should
have FULL CONTROLL in the directory PHPHEADACHES.

If you have users on the domain bar.com who are responsible for maintaining
the web site and they are not part of the administrators group of
"BAR.COM\ADMINISTRATORS" and you want them to have access in the directory
"PHPHEADACHES", then you need to also add those users to the directory
"PHPHEADACHES" with the appropriate level of permissions.

Next you should have the "SYSTEM" account for the "LOCAL MACHINE", in this
case "FOO", added to the directory with FULL access to the directory.

When you APPLY the permissions, you should make sure you check the box that
applies the users and permissions to the SUB-DIRECTORIES as well.

If the web site is running Front Page Server Extensions, then it will also
contain three additional groups.  Those groups will be specific to the web
site name.  In the case of www.phpheadaches.com the groups will be:

        "www.phpheadaches.com Admins"
        "www.phpheadaches.com Authors"
        "www.phpheadaches.com Browsers"

You will need to add the appropriate users from the LOCAL MACHINE or from
the DOMAIN to each of these GROUPS on the LOCAL MACHINE.

To complete the installation, follow the instructions supplied with PHP for
Windows 2000 Server and you should have no problems.  If you have any
problems, just remember to run PHPINFO() from within a script and check the
results against what you think they should be.

If you are setting up a new server, you should remove the EVERYONE group
from all logical drives IMMEDIATELY - before allowing any user other than
the ADMINISTRATOR to have access to the system for the first time.  If you
have already installed software on the system and have users with
established rights to specific directories and files, this may cause some
problems for you and you will have to create new groups with permissions to
access those specific directories.

Remember, SECURITY is the MOST IMPORTANT item in the installation of any
Windows 2000 Server and IIS installation. KEEP IT ON THE BASIS OF ONLY THOSE
USERS AND GROUPS WHO NEED ACCESS HAVE ACCESS - NO ONE ELSE!

Making certain that only those users and groups who absolutely must have
permissions to any given directory on the machine, and that they have the
APPROPRIATE permissions in those directories where they have been granted
access, will save you from countless headaches, attempted server break-ins
and lots of lost revenue from downtime.

For more information on Windows 2000 Security, do a search at the Microsoft
Technet location of
"http://www.microsoft.com/technet/treeview/default.asp?url=/technet/itsoluti
ons/howto/admhow.asp"  (You may be asked to establish an account on the
site, a rather lengthy process, but well worth the work for anyone who works
with Windows 2000 or any other Windows product.)  Microsoft Technet provides
lots of good information and lots of other server geeks who can assist you
in locating the information if you can't find it on your own.

Bruce Barnes
======================================================
Now Providing High-Speed Internet Access from DSL.NET!
from xDSL to a full T-1 - need some?  Call or visit
our web site at http://www.ChicagoNetTech.com/dsl.html
======================================================
ChicagoNetTech
3401 W Beach Ave
Chicago IL  60651-2332
mailto:[EMAIL PROTECTED]
http://www.ChicagoNetTech.com
773.365.0105 Office
773.365.0108 Fax
773.491.9019 Cell
======================================================
Secure & Encrypted Remote Data Backup
Server Co-Location Services
Computer Network Design, Installation & Maintenance
Telecomm Network Design, Installation & Maintenance
Web Site Design & Hosting
======================================================
It ALWAYS costs less to do it right the FIRST time!
======================================================

-----Original Message-----
From: Eric Gentry [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 09:15
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Configuring securely in IIS5


I have been able to install php and get it running on our test server
running IIS5. Everything is going fine, but now I am beginning to ponder the
question, how do I secure this when it goes live?

I have read through the installation documentation, and read the security
chapter of the php manual that I downloaded from the php.net website.

Various queries to Google have been unproductive, so I thought I may check
here.

Now, I am not talking about script internals security (that will be handled
more by our development team), just mainly how to configure php on the
server so that I don't have people tearing the darn thing down when this
site goes live. We are using the ISAPI module.

I have seen numerous tidbits on Apache, but we are going to be using IIS.

Can anyone point me to a book, FAQ, examples, anything to set me on the way?

Thanks a ton



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hey all,

I'm fairly new to PHP (heck, to programming heh), so my hopes is that this problem of 
mine is an easy one to solve.
I also don't know how classic this question is, but I think it must be something that 
most come across at some point. I'm caught in the trap that is PHPs local variables. I 
have failed to globalize anything thus far, despite looking in the manual, google, and 
talking to a codemonkey-friend. I think an example will show what wall I'm hitting:

<?
require( "include.inc" );
echo( $var );
?>

and the include.inc file has:

<?
$var = "whatever";
?>

So I'm not defining the variable within a function, in which the scope apparently 
keeps everything localized (a good thing as far as I can tell). I just thought 
variables defined outside a function were in the safe, but I guess not..

Kinda obviously this is not a copy-paste of my actual project :), but if I can just 
get that to work I'll be able to move all of my color-definitions to a seperate file 
and control things from there. I do, though, have a history full of odd routes I've 
taken to get things working, forgetting the valuable KISS rule in the process heh.
If this is the case here I welcome advise on how else to deal with defining colors 
from a central page.


With regards
 
Jon Lauridsen
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello,

I've used this sample code as well as the installation described at
http://shanx.com/php/xsl/getXsl.htm (using W2K, Apache 1.3.20, PHP
4.1.2.).

<?php
  // Create an XSLT processor
  $xsltHandle = xslt_create();

  // Perform the transformation
  $out = xslt_process($xsltHandle, getcwd().'test.xml',
getcwd().'test.xsl');

  // Detect errors
  if(!$out) die(xslt_error($xsltHandle));

  // Destroy the XSLT processor
  xslt_free($xsltHandle);
?>

The result is that Sablotron itself (command line) works fine but this
code produces
following error "XML parser error 4: not well-formed (invalid token)".

I would appreciate any hint. Thanx alot.
-- 
=================================
[NAME] jan walter [ALIAS] john
[COMPANY] lerach s.r.o.
[GSM] (+420)(777)31 99 31
[SMS] john.sms(at)mujoskar.cz
[EMAIL] john(at)lerach.cz
[ICQ] 28353428
=================================
--- End Message ---

Reply via email to