php-windows Digest 28 Jan 2002 18:46:19 -0000 Issue 973

Topics (messages 11663 through 11673):

Re: Porting from Linux to Windows!?$#
        11663 by: Alan McFarlane

how to download files by http
        11664 by: "Spychała, Wojciech"
        11669 by: Martin Lindhe

Problems using mail() it always states Failed to Receive in
        11665 by: Jan-Volkert Meuldijk
        11670 by: Martin Lindhe
        11671 by: DL Neil
        11672 by: Jan-Volkert Meuldijk

Re: Windows NT SMTP Set Up Help Needed
        11666 by: Martin Lindhe

Re: HELP! with PHP extension <<
        11667 by: Martin Lindhe

Re: calling PHP code on a different website
        11668 by: Martin Lindhe

Re: New to PHP
        11673 by: LaserJetter

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 ---
Parts of directories ~may~ be separated by / on Windows, so that alleviates
one problem (at least it works for me on NT4(SP5), Apache & PHP4).

Multiple paths are separated by ":" on *nix and ";" on Windows, an easy
check to make. For example:

$sep = strcasecmp(substr(PHP_OS, 0, 3), "win") ? ":" : ";";
$paths = array($path1, $path2);
ini_set("include_path", implode($sep, $paths));

I'm afraid I can't think of easy way of doing this throughout your code -
perhaps any *nix AWK gurus could come up with a script... :)


Andre Amaral <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I would like to ask my experienced friends here if its possible to port a
> script made for linux to run in windows IIS. I've been trying to make
linux
> scripts run on my server and some of them do and some don't. I also notice
> that the problem relies how Linux and Windows refer to firectories.
>
> Linux Ex.
> $base_dir = "/home/somescript/"
>
> Windows Ex.
> $base_dir = "C:\home\somescript"
>
> Now. My question is... Is there any way to use script made for Linux in
> Windows? If YES what have to be done in order to make it to work?
>
> Thank you,
> Andre
>
>
>
>
>


--- End Message ---
--- Begin Message ---
Hi 

I need help 
I want to to get file list o n remote http server for example:
http://heban.unx.eragsm.pl:6666/baobab/static/tmp/
If I open this adress in browser i got list of files in this folder i want
to get the list and download this files by application wrote in PHP is it
possible 
Veeeery thanks for help

Thanks,
Greetings

Wojciech
--- End Message ---
--- Begin Message ---
> I need help 
> I want to to get file list o n remote http server for 
> example: http://heban.unx.eragsm.pl:6666/baobab/static/tmp/
> If I open this adress in browser i got list of files in this 
> folder i want to get the list and download this files by 
> application wrote in PHP is it possible 
> Veeeery thanks for help

The webserver run on that server is the one responsible for listing
the content, it's not part of the HTTP protocol. Apache would do this
on a default installation for example. You can simply

$fp = fopen("http://heban.unx.eragsm.pl:6666/baobab/static/tmp/","r";);
$data="";
for(!feof($fp)) {
$data.=fgets($fp);
}
fclose($fp);

and $data would contain the html code, then up to you to parse out the
information
Good luck!

/Martin
--- End Message ---
--- Begin Message ---
I'm trying to use mail() and have read about all kinds of troubles, but i've
got another one :-)

The machine is running IIS5 configurated for smtp-mail.
I've set $email, $subject, $body and $header and try to use
   $mailsend = mail("$email", "$subject", "$body", "$header");
I always get an error stating
    Failed to Receive in
This behaviour is the same when $header is not used.

Does anyone know what this error means?

Jan-Volkert




--- End Message ---
--- Begin Message ---
> I'm trying to use mail() and have read about all kinds of 
> troubles, but i've got another one :-)
> 
> The machine is running IIS5 configurated for smtp-mail.
> I've set $email, $subject, $body and $header and try to use
>    $mailsend = mail("$email", "$subject", "$body", 
> "$header"); I always get an error stating
>     Failed to Receive in
> This behaviour is the same when $header is not used.
> 
> Does anyone know what this error means?
> 
> Jan-Volkert

Have you configured php.ini and set the SMTP and sendmail_from fields?

/Martin
--- End Message ---
--- Begin Message ---
Jan-Volkert,

> I'm trying to use mail() and have read about all kinds of troubles, but i've
> got another one :-)
> 
> The machine is running IIS5 configurated for smtp-mail.
> I've set $email, $subject, $body and $header and try to use
>    $mailsend = mail("$email", "$subject", "$body", "$header");
> I always get an error stating
>     Failed to Receive in
> This behaviour is the same when $header is not used.


=to use PHP variables, remove the quotation marks.
=dn


--- End Message ---
--- Begin Message ---
> =to use PHP variables, remove the quotation marks.
> =dn

Thanks fro replying.

Didn't work here. Tried both ways, double-quotes just evaluate to the
contents of the variable.

Jan-Volkert



--- End Message ---
--- Begin Message ---
> Hi Martin-
> 
> Separating the parameters from the function call didn't work. 
> I think the problem is with the WindowsNT SMTP server. How 
> should the WindowsNT SMTP server be set up to make mail() work?
> 
> Charlie

Just set the SMTP directive in php.ini to the mail server you wish to use

and also set
sendmail_from = [EMAIL PROTECTED] or something

/Martin

> 
> > Could you try this out:
> >
> > $address = "[EMAIL PROTECTED]";
> > $head = "From: PHP Test <[EMAIL PROTECTED]>\r\n";
> > $subject = "hello world";
> > $message = "Hello there\nTest123\n";
> > mail($address, $subject, $message, $head);
> >
> > I think the mail header is required, anyway this works for me and i 
> > suggested it to a guy here yesterday that had similar probs and it 
> > worked right out for him too
> >
> > /Martin
> 
--- End Message ---
--- Begin Message ---
> Hi all,
> 
> Here is the situation.
> 
> I have Windows 2000 SP2, IIS5 running PHP 4.1.1 using CGI.
> 
> My PHP folder is C:\php
> Extension Folder is: C:\php\extension
> PHP.INI file: extention_dir = "C:\php\extension\"

Are you sure the foldername is "extension"?
Just asking you to doublecheck since the default would be
"extensions".

/Martin
--- End Message ---
--- Begin Message ---
> Hi
> 
> Plot: how can I share data/info from a PHP based site on a 
> ASP based site ?
> 
> Site A, running PHP
> Site B , running ASP
> 
> Now on site B I would like to publish some information from 
> site A's database, is that possible ?
> 
> Thanks i advance
> 
> Steen

Scenario 1.
        Site B have direct access to Site A database, good and clean

Scenario 2.
        Site A have a special script that outputs for example sweet XML
        with the latest news or what can be of interest for Site B, that
        reads the data, parses and output. I'd recommend XML here so you
        easily can format the output for Site B

/Martin
--- End Message ---
--- Begin Message ---
RE access violations:
I've never encountered this error message with PHP but for some reason on
Win98/Apache 1.3.20/PHP 4.0.6 and also running WinVNC for remote control, I
cannot modify any files which have been used or processed by Apache. This
includes any PHP files which have been executed and the httpd.conf fileand
attempting to modify or delete these produces a dialog saying the file is in
use - trouble is that as far as I know there aren't any other programs using
the file.
Not sure if this is related to your error but there's something not right
there!!!

LJ




"Alan McFarlane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Okay, so PHP is installed correctly, but what are the details of the
access
> violation...
>
> It also looks like you are running Win2K or WinXP (?), I believe there
have
> been some problems on both platforms - keep an eye on other posts in this
> group...
>
> --
> Alan
>



--- End Message ---

Reply via email to