php-windows Digest 31 Dec 2002 23:37:44 -0000 Issue 1512

Topics (messages 17598 through 17606):

Re: email attachment blues
        17598 by: peterschen
        17601 by: Jerry

V4.3
        17599 by: Peter Hawkins

is_dir() question regarding windows authentication
        17600 by: Paul Menard
        17605 by: Brian Weil

Forwarding POST info from a PHP script
        17602 by: David Barrett

Addendum
        17603 by: David Barrett

Bundled GD - Gif support?
        17604 by: Brian Weil

Re: PHP 4.3.0
        17606 by: Dan Phiffer

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 ---
Hello Jerry,

I think to solve your problem you should copy the tempfile to a new
directory
        copy($attachment, "/path/to/".$attachment_name);

And now you can open it with fopen.

But you should risk a look at this:
http://www.php.net/manual/en/features.file-upload.php

Try it.

--- End Message ---
--- Begin Message ---
I got it working. With the following line: enctype="multipart/form-data" in
the form the $_POST method doesn't work. You have to use the $_FILES method.

I got it to work with the following code:

$userfile = $_FILES['attachment']['tmp_name'];
$filename = $_FILES['attachment']['name'];
copy ($userfile, $filename);
$userfile = $filename;

Thanks for the help,

Jerry

"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> On 12/30/2002 01:08 PM, Jerry wrote:
> > I'm a newbie trying to create a form that will allow the user send an
> > attachment. I got everything working when I run it from the web server
but
> > not from any other pc. I looked at a lot of examples but I am obviously
> > missing something. It seems like the attachment has to be uploaded to
the
> > server first before sending the attachment.
>
> There may be other problems, but I think the MIME part boundary may not
> be correct.
>
> Anyway, you may want to try this class that lets you compose and send
> complex messages that may include attachments, alternative text and HTML
> parts, embedded images, etc..
>
> http://www.phpclasses.org/mimemessage
>
>
> --
>
> Regards,
> Manuel Lemos
>


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

I too was eager to try the pear default install with the new windows binary
but even now it's downloading a file that doesn't have it. Can we perhaps
have a direct URL to the fixed file or a new link to it from the php site?

Thanks,
Peter
--- End Message ---
--- Begin Message ---
Happy New Year all!

I have a PHP script (or a set of them really) that I
have developed since the summer. One of the script
will read a database and display to the user the
contents of the directory. the directory by the way is
store absolute full pathname. I even worked out the
REGEX routine to convert the DOS file pattern to only
show those files that match. Just so you know this all
works.

Here is my problem. I am currently running this under
W2K Server, IIS PHP 4.3.0RC2 CGI version.

I am using NT or IIS Authentication and the script
works. I start converting my authentication process to
simply present the use with a login HTML form and once
posted the user is authenticated against a database. I
sure this has something to do with IIS not allowing
the directory access or something. 

Basically the call to 'is_dir($pathName)' where
$pathName is something like
'd:\\ftproot\\FTPAccounts\\'. is_dir() returns FALSE.

Any ideas how to get arround this?



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
Try using  :

file_exists($pathName)

http://www.php.net/manual/en/function.file-exists.php
it works for me with almost the exact same configuration.

Happy New Year!

Brian Weil


"Paul Menard" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Happy New Year all!
>
> I have a PHP script (or a set of them really) that I
> have developed since the summer. One of the script
> will read a database and display to the user the
> contents of the directory. the directory by the way is
> store absolute full pathname. I even worked out the
> REGEX routine to convert the DOS file pattern to only
> show those files that match. Just so you know this all
> works.
>
> Here is my problem. I am currently running this under
> W2K Server, IIS PHP 4.3.0RC2 CGI version.
>
> I am using NT or IIS Authentication and the script
> works. I start converting my authentication process to
> simply present the use with a login HTML form and once
> posted the user is authenticated against a database. I
> sure this has something to do with IIS not allowing
> the directory access or something.
>
> Basically the call to 'is_dir($pathName)' where
> $pathName is something like
> 'd:\\ftproot\\FTPAccounts\\'. is_dir() returns FALSE.
>
> Any ideas how to get arround this?
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com


--- End Message ---
--- Begin Message ---
I want to be able to retrieve POST variable in one PHP script (which is
straight-forward) and then send these from the script to another one
returning the processed input.

I have written a script that will parse a frames-based page and render it as
a flat page (i.e. all frames displayed as a table in one HTML file) - this
is so that I can create a website using frames, and still let browsers that
don't support frames to access it without my having to create a separate
version of the site.

e.g.:
http://www.redradish.co.uk/rr/index.htm (frames based site)
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1 (the same site
rendered as single page).

The problem is that if in the frames-based site one of the frames is a form
submission, I need to be able to send this data to the original form and
retrieve the output to display in the rendered page.

e.g.
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con
tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug
=1
(this is a page that has a contact form).

I can't find any information on how to forward such a request.

Does anyone have any ideas on this?

Thanks.

Dave


--- End Message ---
--- Begin Message ---
Sorry about the split links in the previous post.

The script in question is located at:
http://www.redradish.co.uk/php/framesprocessor.php

It uses these variables:
  $Frameset   frameset page.  This needs to be parsed and a static HTML page
created.
  $Target   (optional) full URL of page to be displayed in frmae named
$TargetName.
  $TargetName  (optional) name of the frame that $Target should appear in.
  $MainFrame   (optional) is the frame from which header info, etc. is
taken.
      Default is first frame.
  $AllHead  (optional) If set (is 1 or more), copies <HEAD> content from all
frames.
  $RenderMethod  (optional) defines how the frameset is to be represented:
        1 - All frames dumped into new page in order they appear in
frameset.
        2 - tables are used to attempt to recreate original format
      Default is 1.
  $LinkSearch  (optional) how links are replaced:
       1 - Only specific tags are replaced
       2 - Anything within quotes (' or ") that contains document path is
replaced
      Default is 1.
  $Debug   If set (greater than 0), debug info is added in comments.

It works to a good degree on most frames-based sites, but does have a couple
of failings (such as the one mentioned) that I would like to overcome.

The other problem is handling JavaScript in e.g. <frame
src="JavaScript:openpage(xx)">.  There is no way to process JavaScript in
PHP that I am aware of - does anyone have a workaround for this?  i.e. so
that my script can process the JavaScript function and retrieve the relevant
page for inclusion in the rendered page.

Thanks again.


--- End Message ---
--- Begin Message ---
I'm trying to use imagecreatefromgif() on WIN 2000 / php4.3 / php_gd2.dll,
but I get the error:
Fatal error: Call to undefined function: imagecreatefromgif()

The docs say that readonly gif support is bundled with this PHP version. Any
ideas on which gif functions are available or config options that will make
them available?

thanks
Brian Weil


--- End Message ---
--- Begin Message ---
I'm also having problems with that setup, except my error messages are
different. The Apache error log is empty, but the Event Viewer lists the
following:

(Source: Apache Service)
The Apache service named Apache.exe reported the following error:
>>> [Tue Dec 31 13:12:41 2002] [warn] module mod_php4.c is already added,
skipping <<<
 before the error.log file could be opened.
 More information may be available in the error.log file.   .

and

(Source: Application Error)
Faulting application Apache.exe version 0.0.0.0, faulting module php4ts.dll,
version 4.3.0.0, fault address 0x000af8ee.



"Rafael Fernandez" <[EMAIL PROTECTED]> wrote in message
000001c2af94$9f741240$6a383242@Family">news:000001c2af94$9f741240$6a383242@Family...
> Hello, I just tried to install PHP 4.3.0 with Apache 1.3.27 on my Win XP
> computer exactly as it is told in the installation file that is online
> and included in the zip file and I get the following error:
>
>
>
> [warn] Loaded DSO c:/php/sapi/php4apache.dll uses plain Apache 1.3 API,
> this module might crash under EAPI! (please recompile it with -DEAPI)
>
>


--- End Message ---

Reply via email to