php-windows Digest 6 Feb 2003 10:26:59 -0000 Issue 1574

Topics (messages 18362 through 18372):

copy() for file upload
        18362 by: thomash.gmx.co.za
        18363 by: J.Veenhuijsen

Re: code change in new version?
        18364 by: Jill.Ramonsky.Aculab.com
        18365 by: Jill.Ramonsky.Aculab.com

upload file
        18366 by: Lemberger
        18367 by: fran.thomas.barclays.co.uk

Include virtual?
        18368 by: Charles P. Killmer
        18369 by: fran.thomas.barclays.co.uk
        18370 by: Charles P. Killmer

Mail()
        18371 by: Dominic

Extra encodings in Iconv
        18372 by: Juraj Hasko

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 guys,

I realize that this might be rather a question for the general list, but i
will try it here anyway (still have to subscribe to general).
I am using the copy() method to upload pictures to my site. However, i am
experiencing all sorts of problems. The most common one is that it does not
find the 'on-the-fly' variable called $File_name. This var gets created with the
filename of the upload picture.
Here are the two error messages i encounter:

1. Running Linux:

Warning: Unable to open 'C:\\Documents and Settings\\Thomash\\My
Documents\\My Pictures\\ieeelogo2.gif' for reading: No such file or directory in
/usr/www/users/thomasd/members/mypictures.php on line 37

Warning: unlink() failed (No such file or directory) in
/usr/www/users/thomasd/members/mypictures.php on line
38

-----------------------------------------------------------------------------------------------------------

2. Windows 2000:

Notice: Undefined variable: File_name in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37

Warning: copy(../images/mypictures/_general/uploads/) [function.copy]:
failed to create stream: Permission denied in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37

Notice: Undefined variable: File_name in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 43

--------------

Both times Apache is used.

Thomas Hochstetter

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!

--- End Message ---
--- Begin Message ---
Try move_uploaded_file and check rights for destination directory.

Jochem

[EMAIL PROTECTED] wrote:
Hi guys,

I realize that this might be rather a question for the general list, but i
will try it here anyway (still have to subscribe to general).
I am using the copy() method to upload pictures to my site. However, i am
experiencing all sorts of problems. The most common one is that it does not
find the 'on-the-fly' variable called $File_name. This var gets created with the
filename of the upload picture.
Here are the two error messages i encounter:

1. Running Linux:

Warning: Unable to open 'C:\\Documents and Settings\\Thomash\\My
Documents\\My Pictures\\ieeelogo2.gif' for reading: No such file or directory in
/usr/www/users/thomasd/members/mypictures.php on line 37

Warning: unlink() failed (No such file or directory) in
/usr/www/users/thomasd/members/mypictures.php on line
38

-----------------------------------------------------------------------------------------------------------

2. Windows 2000:

Notice: Undefined variable: File_name in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37

Warning: copy(../images/mypictures/_general/uploads/) [function.copy]:
failed to create stream: Permission denied in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37

Notice: Undefined variable: File_name in
c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 43

--------------

Both times Apache is used.

Thomas Hochstetter


--- End Message ---
--- Begin Message ---
actually it's just
$POST["tireqty"] + $_POST["oilqty"] + POST["sparkqty"];  (new way)

Of course, you can improve readability by doing
$tireqty = $POST["tireqty"];
$oilqty = $_POST["oilqty"];
$sparkqty = POST["sparkqty"];

and then you can subsequently use the expression...
$tireqty + $oilqty + $sparkqty

Jill



-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] code change in new version?

$HTTP_POST_VARS["tireqty"] + $HTTP_POST_VAR["oilqty"] +
HTTP_POST_VARS["sparkqty"];  (new way)
--- End Message ---
--- Begin Message ---
Typos aside, that should have read:


actually it's just
$_POST["tireqty"] + $_POST["oilqty"] + $_POST["sparkqty"];  (new way)

Of course, you can improve readability by doing
$tireqty = $_POST["tireqty"];
$oilqty = $_POST["oilqty"];
$sparkqty = $_POST["sparkqty"];

and then you can subsequently use the expression...
$tireqty + $oilqty + $sparkqty

Jill

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 12:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] code change in new version?



actually it's just
$POST["tireqty"] + $_POST["oilqty"] + POST["sparkqty"];  (new way)

Of course, you can improve readability by doing
$tireqty = $POST["tireqty"];
$oilqty = $_POST["oilqty"];
$sparkqty = POST["sparkqty"];

and then you can subsequently use the expression...
$tireqty + $oilqty + $sparkqty

Jill



-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] code change in new version?

$HTTP_POST_VARS["tireqty"] + $HTTP_POST_VAR["oilqty"] +
HTTP_POST_VARS["sparkqty"];  (new way)

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I cannot upload file bigger than 20 KB on my Appache Server(Windows 2000
Professional).

On my php.ini, the variable :

memory_limit = 50M
post_max_size  = 50M
upload_max_filesize = 50M

So, any Idea how to solve the problem ?


Jonathan


--- End Message ---
--- Begin Message ---
Have you checked it isnt your apache server timing out?

-----Original Message-----
From: Lemberger [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 14:11
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] upload file


Hi,
I cannot upload file bigger than 20 KB on my Appache Server(Windows 2000
Professional).

On my php.ini, the variable :

memory_limit = 50M
post_max_size  = 50M
upload_max_filesize = 50M

So, any Idea how to solve the problem ?


Jonathan



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

Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

--- End Message ---
--- Begin Message ---
For those familiar with asp does php have something similar to the
include virtual?

 

I don't want to have to use the full system path to include a template
that is at the doc_root of the site.

 

Include_virtual("/template.php"); ??

 

This would include the template.php at the root of the site instead of
the root of the drive.

 

Thanks

Charles Killmer

Windows 2000 Server IIS 5.0 PHP 4.2.3

--- End Message ---
--- Begin Message ---
I've wondered this before also but currently use;

include($_SERVER["DOCUMENT_ROOT"].'/'.'template.php')

Be interested if there is an easier way!

.:Fran

-----Original Message-----
From: Charles P. Killmer [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 14:46
To: php-windows
Subject: [PHP-WIN] Include virtual?


For those familiar with asp does php have something similar to the
include virtual?

 

I don't want to have to use the full system path to include a template
that is at the doc_root of the site.

 

Include_virtual("/template.php"); ??

 

This would include the template.php at the root of the site instead of
the root of the drive.

 

Thanks

Charles Killmer

Windows 2000 Server IIS 5.0 PHP 4.2.3


Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

--- End Message ---
--- Begin Message ---
That way wontt work in my situation so I made a function that does.
Thanks for the idea.


function include_virtual($FileToInclude) {
   if (substr($FileToInclude,0,1) != "/") {
      $FileToInclude = "/".$FileToInclude;
   }
   $FileToInclude = str_replace("/","\\",$FileToInclude);

   $ScriptName = str_replace("/","\\",$_SERVER["SCRIPT_NAME"]);
   $DocRoot = str_replace($ScriptName,"",$_SERVER["PATH_TRANSLATED"]);
   include($DocRoot.$FileToInclude);
}


Charles

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 8:50 AM
To: Charles P. Killmer; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Include virtual?

I've wondered this before also but currently use;

include($_SERVER["DOCUMENT_ROOT"].'/'.'template.php')

Be interested if there is an easier way!

.:Fran

-----Original Message-----
From: Charles P. Killmer [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 14:46
To: php-windows
Subject: [PHP-WIN] Include virtual?


For those familiar with asp does php have something similar to the
include virtual?

 

I don't want to have to use the full system path to include a template
that is at the doc_root of the site.

 

Include_virtual("/template.php"); ??

 

This would include the template.php at the root of the site instead of
the root of the drive.

 

Thanks

Charles Killmer

Windows 2000 Server IIS 5.0 PHP 4.2.3


Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

--- End Message ---
--- Begin Message ---
I am trying to use PHP to email:

The simple code to test in the web page is :
mail("[EMAIL PROTECTED]", "My Subject", "Line \nLine 2\nLine 3");

I have the php.ini configured using an email address within the domain of
the SMTP server ([EMAIL PROTECTED]).  I have this domain (fcny.org) setup on
SMTP to allow for relaying email.  If I leave the code as trying to email to
someone outside the domain (as seen above), it gives this:


      Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
Unable to relay for [EMAIL PROTECTED] in
c:\inetpub\wwwroot\classes\html\Mail.php on line 8


Any thoughts would be greatly appreciated.


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

I would like to ask, is it possible to use extra encodings(i.e. CP852)
for Iconv in php_iconv.dll from PHP 4.3.0(Win32)?
Do you know where can I download php_iconv.dll with all extra encodings
compiled in ?

TIA,

Juraj Hasko


--- End Message ---

Reply via email to