OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 10 Dec 2003 17:44:55 -0000 Issue 2465

php-general-digest-helplists.php.net
Date: Wed Dec 10 2003 - 11:44:55 CST


php-general Digest 10 Dec 2003 17:44:55 -0000 Issue 2465

Topics (messages 172319 through 172364):

Re: problem with INSERT query
        172319 by: irinchiang.justeducation.com

Re: treu type fonts
        172320 by: Tom Rogers

Re: Write on image in faint color
        172321 by: Galen
        172335 by: Ryan A
        172337 by: Marek Kilimajer
        172345 by: Ryan A
        172351 by: David T-G
        172355 by: David O'Brien

Display Query Result As Editable Form
        172322 by: irinchiang.justeducation.com
        172323 by: Sophie Mattoug
        172327 by: Sven
        172344 by: Justin Patrin

Re: failure notice]
        172324 by: Sophie Mattoug
        172330 by: Adam i Agnieszka Gasiorowski FNORD

Re: failure notice][Scanned]
        172325 by: Michael Egan

Re: [ERR] [PHP] [Fwd: failure notice]]
        172326 by: Sophie Mattoug

Re: Constraint Violation when INSERT
        172328 by: Sven
        172329 by: Sophie Mattoug

PEAR - Auth
        172331 by: Alessandro Vitale

Re: goto label
        172332 by: Bogdan Stancescu

Writing a native PHP extension - versions?
        172333 by: Alex Hunsley

session with output compression?
        172334 by: Matthias Nothhaft
        172343 by: Chris Shiflett
        172348 by: Jason Wong

mail() issue
        172336 by: Tom Ray [List]
        172364 by: Manuel Lemos

header, also stumped
        172338 by: Bart
        172347 by: Richard Davey

how can I fix axps script?
        172339 by: Alex Hunsley

Image Functions
        172340 by: David O'Brien

Re: ftc and spam (was "Re: [PHP] Re: spambothoney: ...")
        172341 by: David T-G

Images in MySQL vs directory/file?
        172342 by: Derrick Fogle
        172346 by: Richard Davey

removing ?> tag from include files
        172349 by: Priit Kaasik
        172356 by: Justin Patrin

$_POST var name char conversion "." to "_"
        172350 by: ROBERT MCPEAK
        172352 by: Ford, Mike [LSS]
        172353 by: Chris Shiflett
        172354 by: ROBERT MCPEAK

Undefined variable using hyperlink
        172357 by: PHP
        172358 by: Richard Davey

HTML Form with method="POST" and enctype="multipart/form-data" is not working for passing data to the web server.
        172359 by: prashant
        172361 by: Richard Davey

Different php.ini with php - cgi
        172360 by: Bc. Radek Krejča

Re: fopen url
        172362 by: prashant

PHP and Apache MultiViews
        172363 by: Styx

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

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

attached mail follows:


irinchiangjusteducation.com schrieb:
>
> Thanks alot for your help!!!
> It was only a spacing mistake...
> There should have no spacing in between each variables:
>
> VALUES ($tutor_name,$tutor_contact,$tutor_email,$tutor_profile)";

hi,

a space after a comma shouldn't be a problem. your problem were probably
your single quotes. it's a different between

" ... VALUES ('$tutor_name', ...)";

and

" ... VALUES ($tutor_name, ...)";

hth SVEN
-------------------------------------------------------------------------------
-
So what was actually the difference between having "single quotes" for my
string and without single quotes ???

Irin.

attached mail follows:


Hi,

Wednesday, December 10, 2003, 11:53:27 AM, you wrote:
c> G'day all
c> I was wandering I have php installed with GD with freetype fonts compiled in
c> I ran this php script
c> <?php
c> header("Content-type: image/gif");
c> $im = imagecreate(400,30);
c> $white = imagecolorallocate($im, 255,255,255);
c> $black = imagecolorallocate($im, 0,0,0);
c> // Replace path by your own font path
c> imagettftext($im, 20, 0, 10, 20, $black, "./arial", "Testing... Omega:
c> &amp;#937;");
c> imagegif($im);
c> imagedestroy($im);
?>>

c> and nothing gets displayed on the screen.
c> Also if i right click in the top right hand corner and click properties the
c> type is gif image.
c> Can any one tell me what I should double check and what to look for.
c> As I am getting no errors messages, I guess that means that free type fonts
c> support is installed correctly? or please correct me if im wrong.

Depending on where gd came from you may not be able to create gif files only
read them. Try generating a png or jpeg

--
regards,
Tom

attached mail follows:


It's not that hard, no imagemagick functions required! Use imagecopy
(part of image functions, built into PHP GD stuff) and a nice 32 bit
PNG image with the opacity exactly the way you like. Browse the PHP
manual for more docs on the exact code, there are lots of examples. I
found it didn't like to work until I specifically saved my file as a 32
bit PNG and specified opacity values for various elements I want to
appear on top of the image. The opacity value (alpha channel) is fully
respected by imagecopy under these circumstances, so it composites the
two images just like it would in any good graphics app, leaving you
with a single image.

Similarly, you can use imagecopyresampled, also part PHP, to create
smaller files. Using imagejpeg you can output the resized jpegs. It's
not terribly hard, either.

I use all this on my site. It works like a charm for watermarking my
images on my photo website I'm developing. I do it on the fly and let
registered users select their level of compression (jpeg low to high,
even png) and compress images on the fly. I can even let certain users
view my preview-sized (640x480) photos without a watermark, and I can
do this because I add the watermark in real time. For a not terribly
busy website and when not overused, it works great. Beware it can get a
bit slow and/or memory intensive if you are working with it a lot or
with large files in a real-world site environment. However, my host's
lightly loaded, dual 3 GHz linux boxes with 1.5 GB of RAM make this
almost a moot issue. :)

-Galen

On Dec 9, 2003, at 5:14 PM, Al wrote:

> There's a command line, open-source utility called ImageMagick
> (http://www.imagemagick.org/) available for all major platforms that
> allows
> you to do lots of powerful image manipulation on one file, or one
> thousand.
> You crop, scale, rotate, colour, draw on, place text over, compose,
> transform and create montages of images using this program.
>
> It has quite a steep learning curve, but the results are worth it!
>
> You can run this using PHP shell_exec() function if you want to
> execute the
> program from a web page, although be careful of the obvious security
> consideration involved in doing this.
>
> Hope it helps,
>
> Al
>
>
> "Ryan A" <ryancoinpass.com> wrote in message
> news:008301c3be8d$dc72c0c0$f081aa51l2zcaxu7emppqh...
>> Hi,
>> This was asked some time ago but cant find it in the archive, anybody
>> remember how it was solved please write and tell me.
>>
>> Requirment:
>> Write domain name in faint color on picture (a kind of "watermark")
>>
>> Reason:
>> I have 3 directories full of images that are original to our site and
>> I
>> spent a crapload of time scanning them and putting them up, I dont
>> want
>> others to just "borrow" the images and use them without giving us some
> type
>> of credit...
>>
>> I found a package on google after searching that you just throw all
>> the
>> images in a folder and it generates the thumbs for you in a folder
>> called
>> "thumbs", can i do the same for this too?
>> ie.
>> throw all the images in a folder, run the program and get
>> www.sitename.com
>> written on all the images?
>>
>> Any help and reminders appreciated.
>>
>> Cheers,
>> -Ryan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


Hey,
Thanks for the heads up but I have a heck of a lot of images and the site
has pretty good traffic so I cant afford to do this on the fly, I was
looking for something where you just drop all the images into a folder, run
the script and pick it up in the output folder all ready for the web.
I did a little looking around and found some good photoshop tips, which I
converted into an action so now I am gettting some very decient professional
quality watermarks in the center of the image which works with all
colors....

Thanks anyway.

On another note, I dont know if you know this but in swedish "Galen" means
crazy :-D
You must have been a real bad boy as a kid for your parents to have named
you that...

hehee

(No offense meant.)

Cheers,
-Ryan

> It's not that hard, no imagemagick functions required! Use imagecopy
> (part of image functions, built into PHP GD stuff) and a nice 32 bit
> PNG image with the opacity exactly the way you like. Browse the PHP
> manual for more docs on the exact code, there are lots of examples. I
> found it didn't like to work until I specifically saved my file as a 32
> bit PNG and specified opacity values for various elements I want to
> appear on top of the image. The opacity value (alpha channel) is fully
> respected by imagecopy under these circumstances, so it composites the
> two images just like it would in any good graphics app, leaving you
> with a single image.
>
> Similarly, you can use imagecopyresampled, also part PHP, to create
> smaller files. Using imagejpeg you can output the resized jpegs. It's
> not terribly hard, either.
>
> I use all this on my site. It works like a charm for watermarking my
> images on my photo website I'm developing. I do it on the fly and let
> registered users select their level of compression (jpeg low to high,
> even png) and compress images on the fly. I can even let certain users
> view my preview-sized (640x480) photos without a watermark, and I can
> do this because I add the watermark in real time. For a not terribly
> busy website and when not overused, it works great. Beware it can get a
> bit slow and/or memory intensive if you are working with it a lot or
> with large files in a real-world site environment. However, my host's
> lightly loaded, dual 3 GHz linux boxes with 1.5 GB of RAM make this
> almost a moot issue. :)
>
> -Galen
>
>
> On Dec 9, 2003, at 5:14 PM, Al wrote:
>
> > There's a command line, open-source utility called ImageMagick
> > (http://www.imagemagick.org/) available for all major platforms that
> > allows
> > you to do lots of powerful image manipulation on one file, or one
> > thousand.
> > You crop, scale, rotate, colour, draw on, place text over, compose,
> > transform and create montages of images using this program.
> >
> > It has quite a steep learning curve, but the results are worth it!
> >
> > You can run this using PHP shell_exec() function if you want to
> > execute the
> > program from a web page, although be careful of the obvious security
> > consideration involved in doing this.
> >
> > Hope it helps,
> >
> > Al
> >
> >
> > "Ryan A" <ryancoinpass.com> wrote in message
> > news:008301c3be8d$dc72c0c0$f081aa51l2zcaxu7emppqh...
> >> Hi,
> >> This was asked some time ago but cant find it in the archive, anybody
> >> remember how it was solved please write and tell me.
> >>
> >> Requirment:
> >> Write domain name in faint color on picture (a kind of "watermark")
> >>
> >> Reason:
> >> I have 3 directories full of images that are original to our site and
> >> I
> >> spent a crapload of time scanning them and putting them up, I dont
> >> want
> >> others to just "borrow" the images and use them without giving us some
> > type
> >> of credit...
> >>
> >> I found a package on google after searching that you just throw all
> >> the
> >> images in a folder and it generates the thumbs for you in a folder
> >> called
> >> "thumbs", can i do the same for this too?
> >> ie.
> >> throw all the images in a folder, run the program and get
> >> www.sitename.com
> >> written on all the images?
> >>
> >> Any help and reminders appreciated.
> >>
> >> Cheers,
> >> -Ryan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


Ryan A wrote:

> Hey,
> Thanks for the heads up but I have a heck of a lot of images and the site
> has pretty good traffic so I cant afford to do this on the fly, I was
> looking for something where you just drop all the images into a folder, run
> the script and pick it up in the output folder all ready for the web.
> I did a little looking around and found some good photoshop tips, which I
> converted into an action so now I am gettting some very decient professional
> quality watermarks in the center of the image which works with all
> colors....

Read Al's message about imagemagic once again. It is exactly what you need.

attached mail follows:


Hey,
Thanks for writing.

I did want to check out what Al wrote but got scared as he mentioned "steep
learning curve"

Cheers,
-Ryan

http://Bestwebhosters.com

----- Original Message -----
From: "Marek Kilimajer" <kilimajerwebglobe.sk>
To: "Ryan A" <ryancoinpass.com>
Cc: "Galen" <phplistzinkconsulting.com>; <php-generallists.php.net>
Sent: Wednesday, December 10, 2003 4:18 PM
Subject: Re: [PHP] Re: Write on image in faint color

> Ryan A wrote:
>
> > Hey,
> > Thanks for the heads up but I have a heck of a lot of images and the
site
> > has pretty good traffic so I cant afford to do this on the fly, I was
> > looking for something where you just drop all the images into a folder,
run
> > the script and pick it up in the output folder all ready for the web.
> > I did a little looking around and found some good photoshop tips, which
I
> > converted into an action so now I am gettting some very decient
professional
> > quality watermarks in the center of the image which works with all
> > colors....
>
> Read Al's message about imagemagic once again. It is exactly what you
need.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

attached mail follows:


Ryan, et al --

...and then Ryan A said...
%
% I did want to check out what Al wrote but got scared as he mentioned "steep
% learning curve"

1) He actually meant shallow; there is, indeed, a lot to learn with IM.

2) IM is truly fantastic, and we use it for our gallery application; we
generate thumbnails as needed but cache them for future use. Our load
isn't too bad as a result.

3) I'm going to soon be adding watermarking (some sort of copyright or
other text, either large and transparent or small and opaque) and
splashing (like "SOLD!" or such, large and fairly or completely opaque)
to my app, and I'll either mogrify the original image (and so thumbs
won't need any extra attention) or add the text to the thumb at gen time
(and so the "view original" will actually look at a full-sized splashed
'thumbnail'), respectively. It should be quite straightforward but I'd
also love to see anyone's examples :-)

4) I'd love to see a PEAR IM module a la PerlMagick (but I haven't even
looked yet, so please don't flame me for missing something obvious). One
of these days I'll have The Great Rewrite and that will go in then. I'd
love to be rid of the system() calls to convert and mogrify.

%
% Cheers,
% -Ryan
%
% http://Bestwebhosters.com

HTH & HAND

:-D
--
David T-G * There is too much animal courage in
(play) davidtgjustpickone.org * society and not sufficient moral courage.
(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/10gxGb7uCXufRwARAq1nAJ9Ru8zcfMSm9hrePK+ktU3f0tEIDgCePAie
MBMJWwLz4UwuhhLCN4+xPeg=
=ZAxS
-----END PGP SIGNATURE-----

attached mail follows:


I just did something similar to what you are asking to do
I created a mask.png in photoshop with white text at 50% opacity saying
what I wanted
Then I used the ImageMagick composite command line program thru a system call
"composite mask.png image.png image.png" to make the new watermarked images.

http://www.naccrraware.net/cluster/totals.php

Really not that hard to do

-Dave

At 11:22 AM 12/10/2003, David T-G wrote:
>Ryan, et al --
>
>...and then Ryan A said...
>%
>% I did want to check out what Al wrote but got scared as he mentioned "steep
>% learning curve"
>
>1) He actually meant shallow; there is, indeed, a lot to learn with IM.
>
>2) IM is truly fantastic, and we use it for our gallery application; we
>generate thumbnails as needed but cache them for future use. Our load
>isn't too bad as a result.
>
>3) I'm going to soon be adding watermarking (some sort of copyright or
>other text, either large and transparent or small and opaque) and
>splashing (like "SOLD!" or such, large and fairly or completely opaque)
>to my app, and I'll either mogrify the original image (and so thumbs
>won't need any extra attention) or add the text to the thumb at gen time
>(and so the "view original" will actually look at a full-sized splashed
>'thumbnail'), respectively. It should be quite straightforward but I'd
>also love to see anyone's examples :-)
>
>4) I'd love to see a PEAR IM module a la PerlMagick (but I haven't even
>looked yet, so please don't flame me for missing something obvious). One
>of these days I'll have The Great Rewrite and that will go in then. I'd
>love to be rid of the system() calls to convert and mogrify.
>
>
>%
>% Cheers,
>% -Ryan
>%
>% http://Bestwebhosters.com
>
>
>HTH & HAND
>
>:-D
>--
>David T-G * There is too much animal courage in
>(play) davidtgjustpickone.org * society and not sufficient moral courage.
>(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
>http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
>

David G. O'Brien
Web Services Coordinator / Systems Administrator

NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax

attached mail follows:


Hi all,

I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
and of course "DELETE" for the form. Right now I am trying to create a form
whereby when user choose to update their info, they wil be directed to a form
where the fields region are EDITABLE , before that, the fields should contain
their "old" info...so can i know how should i go about creating this
kinda "Editable" fields using php scripting ???Fields should contain old info
retrieved from the DB.....Anyone have any idea??

Realli need some help here.
Thanks in advance =)

Irin.

attached mail follows:


<input type="text" name="name" value="<?=$value?>">

irinchiangjusteducation.com wrote:

>Hi all,
>
>I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
>and of course "DELETE" for the form. Right now I am trying to create a form
>whereby when user choose to update their info, they wil be directed to a form
>where the fields region are EDITABLE , before that, the fields should contain
>their "old" info...so can i know how should i go about creating this
>kinda "Editable" fields using php scripting ???Fields should contain old info
>retrieved from the DB.....Anyone have any idea??
>
>Realli need some help here.
>Thanks in advance =)
>
>Irin.
>
>
>

attached mail follows:


Sophie Mattoug schrieb:
> <input type="text" name="name" value="<?=$value?>">
>
> irinchiangjusteducation.com wrote:
>
>> Hi all,
>> I am creating a user form whereby I will do an "INSERT" , "SELECT" ,
>> "UPDATE" and of course "DELETE" for the form. Right now I am trying to
>> create a form whereby when user choose to update their info, they wil
>> be directed to a form where the fields region are EDITABLE , before
>> that, the fields should contain their "old" info...so can i know how
>> should i go about creating this kinda "Editable" fields using php
>> scripting ???Fields should contain old info retrieved from the
>> DB.....Anyone have any idea??
>>
>> Realli need some help here. Thanks in advance =)
>>
>> Irin.

... or the long version, if you work with other namespaces or your
webserver doesn't support these short tags:

<input type="text" name="name" value="<?php echo $value; ?>">

attached mail follows:


irinchiangjusteducation.com wrote:

>
> Hi all,
>
> I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
> and of course "DELETE" for the form. Right now I am trying to create a form
> whereby when user choose to update their info, they wil be directed to a form
> where the fields region are EDITABLE , before that, the fields should contain
> their "old" info...so can i know how should i go about creating this
> kinda "Editable" fields using php scripting ???Fields should contain old info
> retrieved from the DB.....Anyone have any idea??
>
> Realli need some help here.
> Thanks in advance =)
>
> Irin.

Or instead of doing it yourself, you could use PEAR's
DB_DataObject_Formbuilder, which will create forms for you from records
in the database. Or, if that's going to far, you could just use
DB_DataObject to get/insert/update/delete your data and use
HTML_QuickForm to create the form yourself.

http://pear.php.net/package/DB_DataObject
http://pear.php.net/package/HTML_QuickForm
http://pear.php.net/package/DB_DataObject_FormBuilder

--
paperCrane <Justin Patrin>

attached mail follows:


Does someone know why do I receive such messages each time I post to the
list ?!?

-------- Original Message --------
Subject: failure notice
Date: 10 Dec 2003 09:42:41 -0000
From: MAILER-DAEMONpb1.pair.com
To: sophiesitadelle.com

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<php-generallists.php.net>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--- Below this line is a copy of the message.

Return-Path: <sophiesitadelle.com>
Received: (qmail 55196 invoked from network); 10 Dec 2003 09:42:41 -0000
Received: from unknown (HELO c2bapps17.btconnect.com) (193.113.154.33)
  by pb1.pair.com with SMTP; 10 Dec 2003 09:42:41 -0000
Received: from gateway.btopenworld.com (actually host 185.136.40.217.in-addr.arpa) by dswu194 with SMTP-CUST (XT-PP) with ESMTP; Wed, 10 Dec 2003 09:42:27 +0000
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail 1.3.167) for php-generallists.php.net; 10 Dec 2003 09:51:26 +0000
Delivery-Date: Wed, 10 Dec 2003 09:37:46 +0000
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by dswu231 with SMTP (XT-PP); Wed, 10 Dec 2003 09:37:44 +0000
Received: (qmail 44080 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Mailing-List: contact php-general-helplists.php.net; run by ezmlm
Precedence: bulk
list-help: <mailto:php-general-helplists.php.net>
list-unsubscribe: <mailto:php-general-unsubscribelists.php.net>
list-post: <mailto:php-generallists.php.net>
Delivered-To: mailing list php-generallists.php.net
Received: (qmail 44067 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Delivered-To: ezmlm-scan-php-generallists.php.net
Delivered-To: ezmlm-php-generallists.php.net
Message-ID: <3FD6E946.6000307sitadelle.com>
Date: Wed, 10 Dec 2003 10:37:10 +0100
From: Sophie Mattoug <sophiesitadelle.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3
X-Accept-Language: fr-fr
MIME-Version: 1.0
To: php-generallists.php.net
References: <1071048834.3fd6e882cdc68www.justeducation.com>
In-Reply-To: <1071048834.3fd6e882cdc68www.justeducation.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Display Query Result As Editable Form

<input type="text" name="name" value="<?=$value?>">

irinchiangjusteducation.com wrote:

>Hi all,
>
>I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
>and of course "DELETE" for the form. Right now I am trying to create a form
>whereby when user choose to update their info, they wil be directed to a form
>where the fields region are EDITABLE , before that, the fields should contain
>their "old" info...so can i know how should i go about creating this
>kinda "Editable" fields using php scripting ???Fields should contain old info
>retrieved from the DB.....Anyone have any idea??
>
>Realli need some help here.
>Thanks in advance =)
>
>Irin.
>
>
>

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

attached mail follows:


Sophie Mattoug wrote:
 
> Does someone know why do I receive such messages each time I post to the
> list ?!?

        [snipped]

        Is a Illuminati conspiracy! Argh!

--
Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info { iWanToDie } WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl foReVeR( * )
Poznaj jej zwiewne kształty... http://www.opera.com 007

attached mail follows:


Sophie,

Just to add weight to your comment - I've been receiving identical notices though I don't know what causes this.

Regards,

Michael Egan

-----Original Message-----
From: Sophie Mattoug [mailto:sophiesitadelle.com]
Sent: 10 December 2003 09:45
To: php-generallists.php.net
Subject: [PHP] [Fwd: failure notice][Scanned]

Does someone know why do I receive such messages each time I post to the
list ?!?

-------- Original Message --------
Subject: failure notice
Date: 10 Dec 2003 09:42:41 -0000
From: MAILER-DAEMONpb1.pair.com
To: sophiesitadelle.com

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<php-generallists.php.net>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--- Below this line is a copy of the message.

Return-Path: <sophiesitadelle.com>
Received: (qmail 55196 invoked from network); 10 Dec 2003 09:42:41 -0000
Received: from unknown (HELO c2bapps17.btconnect.com) (193.113.154.33)
  by pb1.pair.com with SMTP; 10 Dec 2003 09:42:41 -0000
Received: from gateway.btopenworld.com (actually host 185.136.40.217.in-addr.arpa) by dswu194 with SMTP-CUST (XT-PP) with ESMTP; Wed, 10 Dec 2003 09:42:27 +0000
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail 1.3.167) for php-generallists.php.net; 10 Dec 2003 09:51:26 +0000
Delivery-Date: Wed, 10 Dec 2003 09:37:46 +0000
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by dswu231 with SMTP (XT-PP); Wed, 10 Dec 2003 09:37:44 +0000
Received: (qmail 44080 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Mailing-List: contact php-general-helplists.php.net; run by ezmlm
Precedence: bulk
list-help: <mailto:php-general-helplists.php.net>
list-unsubscribe: <mailto:php-general-unsubscribelists.php.net>
list-post: <mailto:php-generallists.php.net>
Delivered-To: mailing list php-generallists.php.net
Received: (qmail 44067 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Delivered-To: ezmlm-scan-php-generallists.php.net
Delivered-To: ezmlm-php-generallists.php.net
Message-ID: <3FD6E946.6000307sitadelle.com>
Date: Wed, 10 Dec 2003 10:37:10 +0100
From: Sophie Mattoug <sophiesitadelle.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3
X-Accept-Language: fr-fr
MIME-Version: 1.0
To: php-generallists.php.net
References: <1071048834.3fd6e882cdc68www.justeducation.com>
In-Reply-To: <1071048834.3fd6e882cdc68www.justeducation.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Display Query Result As Editable Form

<input type="text" name="name" value="<?=$value?>">

irinchiangjusteducation.com wrote:

>Hi all,
>
>I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
>and of course "DELETE" for the form. Right now I am trying to create a form
>whereby when user choose to update their info, they wil be directed to a form
>where the fields region are EDITABLE , before that, the fields should contain
>their "old" info...so can i know how should i go about creating this
>kinda "Editable" fields using php scripting ???Fields should contain old info
>retrieved from the DB.....Anyone have any idea??
>
>Realli need some help here.
>Thanks in advance =)
>
>Irin.
>
>
>

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

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

attached mail follows:


Even worse ! Admin of the list, please take some action !

-------- Original Message --------
Subject: [ERR] [PHP] [Fwd: failure notice]
Date: Wed, 10 Dec 2003 18:45:17 +0900
From: postmasterhanmir.com
To: sophiesitadelle.com

Transmit Report:

 To: webprmhanmir.com, 402 Local User Inbox Full (webprmhanmir.com)

attached mail follows:


Does someone know why do I receive such messages each time I post to the
list ?!?

-------- Original Message --------
Subject: failure notice
Date: 10 Dec 2003 09:42:41 -0000
From: MAILER-DAEMONpb1.pair.com
To: sophiesitadelle.com

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<php-generallists.php.net>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--- Below this line is a copy of the message.

Return-Path: <sophiesitadelle.com>
Received: (qmail 55196 invoked from network); 10 Dec 2003 09:42:41 -0000
Received: from unknown (HELO c2bapps17.btconnect.com) (193.113.154.33)
  by pb1.pair.com with SMTP; 10 Dec 2003 09:42:41 -0000
Received: from gateway.btopenworld.com (actually host 185.136.40.217.in-addr.arpa) by dswu194 with SMTP-CUST (XT-PP) with ESMTP; Wed, 10 Dec 2003 09:42:27 +0000
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail 1.3.167) for php-generallists.php.net; 10 Dec 2003 09:51:26 +0000
Delivery-Date: Wed, 10 Dec 2003 09:37:46 +0000
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by dswu231 with SMTP (XT-PP); Wed, 10 Dec 2003 09:37:44 +0000
Received: (qmail 44080 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Mailing-List: contact php-general-helplists.php.net; run by ezmlm
Precedence: bulk
list-help: <mailto:php-general-helplists.php.net>
list-unsubscribe: <mailto:php-general-unsubscribelists.php.net>
list-post: <mailto:php-generallists.php.net>
Delivered-To: mailing list php-generallists.php.net
Received: (qmail 44067 invoked by uid 1010); 10 Dec 2003 09:36:43 -0000
Delivered-To: ezmlm-scan-php-generallists.php.net
Delivered-To: ezmlm-php-generallists.php.net
Message-ID: <3FD6E946.6000307sitadelle.com>
Date: Wed, 10 Dec 2003 10:37:10 +0100
From: Sophie Mattoug <sophiesitadelle.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3
X-Accept-Language: fr-fr
MIME-Version: 1.0
To: php-generallists.php.net
References: <1071048834.3fd6e882cdc68www.justeducation.com>
In-Reply-To: <1071048834.3fd6e882cdc68www.justeducation.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Display Query Result As Editable Form

<input type="text" name="name" value="<?=$value?>">

irinchiangjusteducation.com wrote:

>Hi all,
>
>I am creating a user form whereby I will do an "INSERT" , "SELECT" , "UPDATE"
>and of course "DELETE" for the form. Right now I am trying to create a form
>whereby when user choose to update their info, they wil be directed to a form
>where the fields region are EDITABLE , before that, the fields should contain
>their "old" info...so can i know how should i go about creating this
>kinda "Editable" fields using php scripting ???Fields should contain old info
>retrieved from the DB.....Anyone have any idea??
>
>Realli need some help here.
>Thanks in advance =)
>
>Irin.
>
>
>

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

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

attached mail follows:


irinchiangjusteducation.com schrieb:

>
>>Hi all,
>>
>>I got the error " Constraint Violation " when I did an "INSERT" .
>>Gone thru the code umpteen times but to no avail..Wondering
>>where my error
>>was??...Below is a snip of the block of code:
>>
>>----------------------------------------------------
>><?
>>$dsn = "mysql://root:**********localhost/tablename";
>>
>>$db = DB::connect ($dsn);
>> if (DB::isError ($db))
>> die ($db->getMessage());
>>
>>
>>//create variables ready to go into DB
>>
>>$tutor_name = $db->quote($_POST["tutor_name"]);
>>$tutor_contact = $db->quote($_POST["tutor_contact"]);
>>$tutor_email = $db->quote($_POST["tutor_email"]);
>>$tutor_profile = $db->quote($_POST["tutor_profile"]);
>>
>>
>>$sql = "INSERT INTO tutor (tutor_name, tutor_contact, tutor_email,
>>tutor_profile)
>> VALUES
>>($tutor_name,$tutor_contact,$tutor_email,$tutor_profile)";
>>
>>
>>$result = $db->query($sql);
>>if( DB::isError($result) ) {
>> die ($result->getMessage());
>>}
>>?>
>>
>>--------------------------------------------------------------
>>---------
>>Everything was fine and the "INSERT" works, user input was
>>insert into the
>>database successful using the same block of code but the next
>>thing i know I
>>got this error ....anyone know watz the proz here???
>>Hope to get some help soon. Thanks in advance=)
>>
>>Irin.
>
>
>
> Don't you need to quote your strings?
>
> $sql = "INSERT INTO tutor (tutor_name, tutor_contact, tutor_email,
> tutor_profile)
> VALUES
> ('$tutor_name','$tutor_contact','$tutor_email','$tutor_profile')";
>
> Martin
>
> ------------------------------------------------------------------------------
>
> Yes, I actually quoted my string at the beginning but whenever i do
> an "INSERT" it actually insert a "NULL" value into the fields...why is this
> so???So I try not to quote the strings but I got a "Contraints Violation"
> error....What could be the problem>>??
>
>
> ------------------------------------------------------------------------------
> Hope to get some help soon. All help are greatly appreciated.
>
>
>
> Irin.

hi,

i don't know this db-class, but it seems that $db->quote() already
quotes your values. so first take a look what comes from your form:

<?php
var_export($_POST);
?>

then, take a look what this quote-method does with your vals. eg:

<?php
var_export($tutor_name);
?>

if these vars constist of your information try to setup qour query
according to mysql manual, depending on the values in your vars.

attached mail follows:


>>> Hi all,
>>> I got the error " Constraint Violation " when I did an "INSERT" .
>>> Gone thru the code umpteen times but to no avail..Wondering where my
>>> error was??...Below is a snip of the block of code:
>>> ---------------------------------------------------- <? $dsn =
>>> "mysql://root:**********localhost/tablename";
>>> $db = DB::connect ($dsn); if (DB::isError ($db)) die
>>> ($db->getMessage());
>>>
>>> //create variables ready to go into DB
>>> $tutor_name = $db->quote($_POST["tutor_name"]); $tutor_contact =
>>> $db->quote($_POST["tutor_contact"]); $tutor_email =
>>> $db->quote($_POST["tutor_email"]); $tutor_profile =
>>> $db->quote($_POST["tutor_profile"]);
>>>
>>> $sql = "INSERT INTO tutor (tutor_name, tutor_contact, tutor_email,
>>> tutor_profile) VALUES
>>> ($tutor_name,$tutor_contact,$tutor_email,$tutor_profile)";
>>>
>>> $result = $db->query($sql); if( DB::isError($result) ) { die
>>> ($result->getMessage()); } ?>
>>> --------------------------------------------------------------
>>> --------- Everything was fine and the "INSERT" works, user input was
>>> insert into the database successful using the same block of code but
>>> the next thing i know I got this error ....anyone know watz the proz
>>> here??? Hope to get some help soon. Thanks in advance=)
>>> Irin.
>>

It looks like you have a constraint in your table, ie some of the values
must correspond to another receord of another table for example... Could
you post a MySQL description of your table ?

attached mail follows:


Hi guys,

I'd like to use one of the auth classes from pear.
Any suggestion for the best one?

cheers

alessandro

attached mail follows:


Robert Cummings wrote:
> On Tue, 2003-12-09 at 08:14, Bogdan Stancescu wrote:
>
>>Sorry if my message sounded melodramatic or something, I remembered the
>>frustration feeling so strongly from your message that I wanted to
>>reinforce the other people's messages with a personal "testimonial" if
>>you wish.
>
> Ummmm, I rarely use the goto statement, and I do not advocate it for
> regular everyday coding. I do know the difference between well
> structured code and otherwise. What I did say, is that goto <label> has
> it's uses, and sometimes it IS the best solution. Just because someone
> tells you something is bad, doesn't mean to say it is always bad. It's
> like someone saying salt is bad for you, and so you never take salt
> again and die from salt deficiency. People really need to change their
> mindset about being sheeple (yes sheep people) and blindly following
> preached dogma.

My message was in reply to the one in which you said you were
disappointed PHP doesn't feature goto. *That* is what I was replying to.
And the understatement in my reply was that PHP does good by not
allowing goto statements because that way it coerces even unexperienced
programmers into sane code. And there are quite a few unexperienced
programmers using PHP out there, trust you me. Your reply's quite
transparent understatement is calling me and everybody who doesn't agree
with you sheep people. That's a tad curious, if not offensive.

> I don't mind your message sounding melodramatic, but it doesn't explain
> in any way why goto shouldn't be used. It just asserts that you found

May I point you to the last few lines in my message you're replying to,
quoted at the top of this message for your convenience. I will highlight
the key words in there for you here, so it's easier to follow: "I wanted
to reinforce the other people's messages with a personal "testimonial"".

Cheers,
Bogdan

attached mail follows:


I'm writing a PHP extension for a client. (Written in C as it has to
access native code.)
I'm developing the extension on my own server before deployment.
The question is: how closely do my server's versions of apache and PHP
have to match the clients? Do they have to match exactly, or does it not
matter?

thanks
alex

p.s. does anyone have any handy links to webpages about writing PHP
extensions in C or C++?

attached mail follows:


Hi List,

I wanna use PHP's session management with output compression,
but I have the following problem:

Session-IDs are not automatically appended to URLs. :-(

The compression works fine and makes the page nice for slow internet
connections.

The session management works also fine, but only with cookies :-(

I guess the problem is that PHP can not append SID in (g)ziped output!?...

But is there a way to get this work with output compression?

Any hints would be great!

Regards,
Matthias

attached mail follows:


Hi Matthias,

--- Matthias Nothhaft <phpmahono.de> wrote:
> I wanna use PHP's session management with output compression,
> but I have the following problem:
>
> Session-IDs are not automatically appended to URLs. :-(

[snip]

> I guess the problem is that PHP can not append SID in (g)ziped
> output!?...

I don't think this is the problem, but I might be wrong. Are you saying
that if you disable compression, everything works fine?

What is the value of session.use_trans_sid?

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/

attached mail follows:


On Wednesday 10 December 2003 23:56, Chris Shiflett wrote:

> --- Matthias Nothhaft <phpmahono.de> wrote:
> > I wanna use PHP's session management with output compression,
> > but I have the following problem:
> >
> > Session-IDs are not automatically appended to URLs. :-(
>
> [snip]
>
> > I guess the problem is that PHP can not append SID in (g)ziped
> > output!?...
>
> I don't think this is the problem, but I might be wrong. Are you saying
> that if you disable compression, everything works fine?

This was definitely an issue in the 4.0.6 days, that is transparent sessions
do not work when using compression. But IIRC this was fixed in some later
version.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Anarchy may not be a better form of government, but it's better than no
government at all.
*/

attached mail follows:


I have an odd issue with mail(). I was working on a project at my office for some time and we did everything with php
and mysql. I stepped away from the project for a bit but when I left all my scripts, such as password retrieval and a
few others that used the mail() function were working. Now when you run any PHP script using mail(), the script executes
perfectly, however I do not see any activity in my maillog and the mail is never delivered. PHP does not return an error
or any warnings.

Can anyone give me some pointers on where to start looking to see why PHP and Exim aren't talking with each other
anymore? I've been looking since the beginning of the week and I can't find it.

Box= SuSE8.2/Apache1.3/Exim 4.2
TIA

Tom

attached mail follows:


Hello,

On 12/10/2003 01:14 PM, Tom Ray wrote:
> I have an odd issue with mail(). I was working on a project at my office for some time and we did everything with php
> and mysql. I stepped away from the project for a bit but when I left all my scripts, such as password retrieval and a
> few others that used the mail() function were working. Now when you run any PHP script using mail(), the script executes
> perfectly, however I do not see any activity in my maillog and the mail is never delivered. PHP does not return an error
> or any warnings.
>
> Can anyone give me some pointers on where to start looking to see why PHP and Exim aren't talking with each other
> anymore? I've been looking since the beginning of the week and I can't find it.
>
> Box= SuSE8.2/Apache1.3/Exim 4.2
> TIA

Without code or more information on how you are composing and sending
your messages is hard to tell what is the problem.

It could be any of the bugs of the mail() function. In that case you may
want to try this PHP class that comes with subclasses than can either
send the messages via the sendmail program (in your case exim wrapper)
or via SMTP. In case of error, these classes provide error messages that
in general are more helpful.

If you do not want to change your programs much to try the class, you
can use wrapper functions named sendmail_mail() or smtp_mail() that
emulate the mail function, so you just need to rename the mail() calls
where you use it:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


Hello,

I've got the following header-problems. How can I get this to work:

header("Location: h--p://user:passurl.redirect/securedir/");

I have a directory with password-protection to wich I want to redirect
without the login-popup showing...

I've tried a lot but the popup keeps showing.

Does anyone have any ideas?

Regards,

Bart
----!>

-----Oorspronkelijk bericht-----
Van: Jon Kriek [mailto:kriekphpfreaks.com]
Verzonden: woensdag 10 december 2003 1:15
Aan: php-generallists.php.net
Onderwerp: Re: [PHP] header function, I'm stumped

<?php
    ob_start();
    $dom = $_SERVER['SERVER_NAME'];
    writeMessage($id) or die('cannot write' . $id);
    header('Location: http://' . $dom . '/cp/ad/ad_details.php?id=' . $id);
    exit();
    ob_end_flush();
?>

--
Jon Kriek
www.phpfreaks.com
www.jonkriek.com

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

attached mail follows:


Hello Bart,

Wednesday, December 10, 2003, 3:34:31 PM, you wrote:

B> I've got the following header-problems. How can I get this to work:
B> header("Location: h--p://user:passurl.redirect/securedir/");

B> I have a directory with password-protection to wich I want to redirect
B> without the login-popup showing...

B> I've tried a lot but the popup keeps showing.

Test this - copy and paste that URL you use in the Header function
(well, a correct version of it) into a browser. Does that also pop-up
the password window? If it does (and my guess is that it will) then
the issue is with your servers configuration, not your code.

--
Best regards,
 Richard mailto:richlaunchcode.co.uk

attached mail follows:


I'm doing a build of php 4.3.1. It gave me the error about "your axps
script may be broken", and I've checked the net, and sure enough, my
axps script has some of the bogus value in it. Thing is, I can't find a
complete example of the that section anywhere - I can find some of the
correct values that should be there, but does anyone have a complete
example, or a way to fix the axps script?
(it's apache 1.3.20 I'm using)

thanks
alex

attached mail follows:


Is there an equivalent way of doing a ImageMagick

"composite file1.png file2.png file3.png"

using the builtin GD functions?

-Dave

David G. O'Brien
Web Services Coordinator / Systems Administrator

NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax

attached mail follows:


Manuel, Leif, et al --

...and then Manuel Lemos said...
%
% Hello,
%
% On 12/09/2003 09:42 AM, Leif K-Brooks wrote:
% >
% >My strategy against spam is giving invalid addresses at my domain name,
% >all of which redirect to abuseftc.gov. No innocent servers besides my
% >own are harmed, and the spam is given to an authority who will (in
% >theory) do something about it.
%
% Are you sure that will not get yourself into problems with FTC for
% forwarding SPAM? Even if that nothing happens, I am afraid that soon
% nobody will be listening to messages sent to that abuseftc.gov address.

I thought that the correct address was uceftc.gov but, yes, there is an
address to which you can forward spam and other suspicious email.

HTH & HAND

:-D
--
David T-G * There is too much animal courage in
(play) davidtgjustpickone.org * society and not sufficient moral courage.
(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/10EoGb7uCXufRwARAtCZAKC4oRNpd8fmrzDsUvpCk4leosmS2ACfaBeY
8UIYextEjIcH9fsZQwjNsz4=
=obAS
-----END PGP SIGNATURE-----

attached mail follows:


Slightly OT, but I'm hoping for a few opinions about handling JPG/MOV
files with PHP/MySQL.

I've read that, given the choice, you should never store images in a
database because it makes the database dog slow. But I've got some
parameters and issues that might make a difference:

1. The only way I can store the files in a directory on the server is
to make that directory "wide open" as in chmod 777. I don't have quite
enough control of the server to make that a better situation.

2. The images will only be stored temporarily - I'm looking at a
maximum of 100Mb worth of JPG and MOV files (up to 80 1Mb JPG, up to 10
2Mb MOV files) being stored at any one time.

So, am I going to run into performance issues with that amount of blob
data in the database? The probability of a hack on my images directory
is extremely low, but it *does* exist of course.

Comments?

Thanks,

-Derrick

attached mail follows:


Hello Derrick,

Wednesday, December 10, 2003, 3:56:32 PM, you wrote:

DF> 1. The only way I can store the files in a directory on the server is
DF> to make that directory "wide open" as in chmod 777. I don't have quite
DF> enough control of the server to make that a better situation.

Why is this? More to the point.. is there somewhere else you could
store them (i.e. a directory outside of the web root from which you
could fread the files).

DF> 2. The images will only be stored temporarily - I'm looking at a
DF> maximum of 100Mb worth of JPG and MOV files (up to 80 1Mb JPG, up to 10
DF> 2Mb MOV files) being stored at any one time.

DF> So, am I going to run into performance issues with that amount of blob
DF> data in the database? The probability of a hack on my images directory
DF> is extremely low, but it *does* exist of course.

"Performance" is a very subjective term - are you putting this site on
an overloaded shared box that might frown at such hammering of its
MySQL server. Or are you hosting on a dedicated machine that has
enough processing power to start the next cold war?

You will of course hit performance issues, but the scale of them
depends on factors outside of PHP/MySQL. I personally would
investigate an alternative location to store them.

--
Best regards,
 Richard mailto:richlaunchcode.co.uk

attached mail follows:


hi,
    im interested in specific information about removing php end-tags from
include files (which contain php code). it woun't give any warning or error
but will remove all annoying spaces and line breaks before you send your own
header data... how does include function work in these cases? are there any
'bad effects' involved? or should i use output buffering instead since its a
standard solution?

--
pk

attached mail follows:


Priit Kaasik wrote:

> hi,
> im interested in specific information about removing php end-tags from
> include files (which contain php code). it woun't give any warning or error
> but will remove all annoying spaces and line breaks before you send your own
> header data... how does include function work in these cases? are there any
> 'bad effects' involved? or should i use output buffering instead since its a
> standard solution?
>
> --
> pk

The short answer is that you can just leave them off and nothing bad
will happen.

The long answer is that you should include it, as it is good coding
practice, but make sure that there is no extra whitespace after it.

--
paperCrane <Justin Patrin>

attached mail follows:


Has anybody seen the seemingly automatic and unexplained conversion of the character "." to "_" in $_POST var names? I've tested several ways, with and without PHP, and I've dug around in the HTML specs and can't find a good explanation. Can anybody shed some light on this? Can this be overridden?

attached mail follows:


On 10 December 2003 16:19, ROBERT MCPEAK contributed these pearls of wisdom:

> Has anybody seen the seemingly automatic and unexplained
> conversion of the character "." to "_" in $_POST var names?

Yes. It's PHP automagic by PHP.

> I've tested several ways, with and without PHP, and I've dug
> around in the HTML specs and can't find a good explanation.
> Can anybody shed some light on this? Can this be overridden?

It's explained at
http://uk2.php.net/manual/en/language.variables.external.php#language.variab
les.external.dot-in-names, and no, it can't be overridden.

Cheers!

Mike

--
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


--- ROBERT MCPEAK <RMCPEAKjhuccp.org> wrote:
> Has anybody seen the seemingly automatic and unexplained conversion of
> the character "." to "_" in $_POST var names?

This is intentional. The "." character is not allowed in a variable name,
so PHP has to translate your HTML form's variable name to a PHP one
somehow, and this is what it does.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/

attached mail follows:


Thanks all. I guessed that it was something built in to PHP, although I was surprised when I couldn't find a good explanation in the usually excellent docs. -Bob Mc

>>> "Ford, Mike [LSS]" <M.Fordlmu.ac.uk> 12/10/03 11:29AM >>>
On 10 December 2003 16:19, ROBERT MCPEAK contributed these pearls of wisdom:

> Has anybody seen the seemingly automatic and unexplained
> conversion of the character "." to "_" in $_POST var names?

Yes. It's PHP automagic by PHP.

> I've tested several ways, with and without PHP, and I've dug
> around in the HTML specs and can't find a good explanation.
> Can anybody shed some light on this? Can this be overridden?

It's explained at
http://uk2.php.net/manual/en/language.variables.external.php#language.variab
les.external.dot-in-names, and no, it can't be overridden.

Cheers!

Mike

--
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

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

attached mail follows:


I'm having some basic problems with the following pages, index.php (frames
base), email.php, and body.php.

 

I can retrieve email from the email account, but when I click on a link in
the email.php to open the email in body.php, $msgid is not defined in
body.php. It's got to be something basic, but right now, it escapes me.
Right now this is running on my Windows 2000 Pro machine.

 

Any help would be appreciated. Thank you in advance.

 

Chuck

 

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

 

Index.php

 

<!-- frames -->

<frameset rows="5%,30%,*" frameborder="NO" border="0" framespacing="0">

    <frame name="nav" src="nav.php" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="0">

    <frame name="inbox" src="email.php" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="0">

    <frame name="mail" id="mail" src"" frameborder="0" scrolling="Auto"
marginwidth="0" marginheight="0">

</frameset>

 

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

 

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

 

Email.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html>

<head>

            <title>Email Test</title>

  <style type="text/css">

    Body, TR, TD, Table {

      color : Black;

      font : 11px Arial, Helvetica, sans-serif;

    }

  </style>

</head>

 

<body>

<table border="0" width="100%" cellspacing="0" cellpadding="5">

            <tr bgcolor="#FF9900">

                        <th>From</th>

                        <th>Subject</th>

                        <th>Date</th>

            </tr>

<?php

  set_time_limit(360);

            $mbox = imap_open ("{172.16.1.23:143}INBOX", "user",
"password");

            

  $mcheck = imap_check($mbox);

  $mnum = $mcheck->Nmsgs;

  $overview = imap_fetch_overview($mbox, "1:$mnum", 0);

 

            $headers = imap_headers ($mbox);

 

  // Data Table

            $nbm = sizeof($overview);

  for($x= $nbm-1; $x >= 0; $x--) {

    $val=$overview[$x];

                        $nb = $val->msgno;

    $sFrom =$val->from;

    $sSubject = $val->subject;

    if($sSubject == '') {

                                    $sSubject = "<em>No Subject
Included</em>";

                        }

    $dDate=$val->date;

    // Inbox Output

    print "

                        <tr>

                                    <td>$sFrom</td>

                                    <td><A HREF=\"body.php?msgid=$nb\"
target=\"mail\">$sSubject</A></td>

                                    <td>$dDate</td>

                        </tr>";

            }

 

            imap_close($mbox);

?>

 

</table>

 

</body>

</html>

 

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

 

 

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

 

Body.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<TITLE> New Document </TITLE>

</HEAD>

 

<BODY>

 

<?php

            $mbox = imap_open ("{172.16.1.23:143}INBOX",
"USHQ\ysgcbr\cbrockman", "l3tm31n");

            

            $mailheader=imap_header($mbox,$msgid);

            $rawsubject = imap_mime_header_decode($mailheader->subject);

            $msubject=$rawsubject[0]->text;

            
$mfrom=htmlspecialchars(str_replace("\"","",$mailheader->fromaddress));

            
$mto=htmlspecialchars(str_replace("\"","",$mailheader->toaddress));

            
$mcc=htmlspecialchars(str_replace("\"","",$mailheader->ccaddress));

            $mreply=$mailheader->reply_toaddress;

            $mdate=$mailheader->Date;

 

            $mailcheck = imap_check($mbox);

            $mailnumber = $mailcheck->Nmsgs;

 

            // Get the structure of the email

            $structure = imap_fetchstructure($mbox,$msgid);

            

            /*

  if (isset($msgid)) {

    //$msgid = "$msgid";

  }

  

  if (empty($msgid)) {

    //$mnum = $mcheck->Nmsgs;

    //$msgid = "$mnum";

  }

 */

 

            imap_close($mbox);

?>

 

 

</BODY>

</HTML>

 

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

 

 

------ End of Forwarded Message

------ End of Forwarded Message

attached mail follows:


Hello,

Wednesday, December 10, 2003, 4:53:18 PM, you wrote:

P> I can retrieve email from the email account, but when I click on a link in
P> the email.php to open the email in body.php, $msgid is not defined in
P> body.php. It's got to be something basic, but right now, it escapes me.
P> Right now this is running on my Windows 2000 Pro machine.

At the start of body.php try adding this:

$msgid = $_GET['msgid'];

--
Best regards,
 Richard mailto:richlaunchcode.co.uk

attached mail follows:


Dear Friends

These is my sample code

test1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<form name="frm1" method="POST" action="test1.php3" enctype="multipart/form-data">
<input type="text" name=text1 value="">
<input type=file name=file1>
<input type=submit name=btnsubmit value="Submit">
</form>

</BODY>
</HTML>

test1.php3

<html>
<head><title>Test Page</title></head>
<body>

<form>

<?
echo $text1;
echo $file1;
echo $file1_name;
copy($file1,"d:\prashant\$file1");
?>

</form>
</body>
</html>

I am Facing the problem that if i use enctype="multipart/form-data" in form object
then i am unable to retrieve the values passed from .html form.

So if i am using a File Upload control in my form without the enctype attribute,then i get a warning message

Unable to open '' for reading: No such file or directory in /home/httpd/html/fai/test1.php3 on line 12

i.e My HTML Form with Post Method and enctype attribute="multipart/form-data" is not working for passing data to the web server.

The problem can be solved without the enctype attribute in the Form Tag where i can send the Data to the
Web Server and the values getting retrieved in another Php Page, but what about if i have to upload
a File using the File Upload control <input type=file name=file1> in my HTML Form.

It Fails in this case where i get the warning message.

Can somebody help me in this regard as soon as possible ???

Thanks,
Prashant S Akerkar

attached mail follows:


Hello prashant,

Wednesday, December 10, 2003, 5:20:18 PM, you wrote:

p> <form name="frm1" method="POST" action="test1.php3" enctype="multipart/form-data">
p> <input type="text" name=text1 value="">
p> <input type=file name=file1>
p> <input type=submit name=btnsubmit value="Submit">
p> </form>

You should have set the max_file_size here, but it's not included.

<input type="hidden" name="MAX_FILE_SIZE" value="1000">

This must come BEFORE the input type=file and remember the value is in
bytes (not KB), so the above will only let you upload a file of
approx. 1KB.

p> <?
p> echo $text1;
p> echo $file1;
p> echo $file1_name;
p> copy($file1,"d:\prashant\$file1");
?>>

I don't know how your register globals are set, but you *really* ought to
be getting these values from the $_FILES array:

$file1_name = $_FILES['file1']['name']

etc

See Chapter 18 of the PHP manual.

p> Unable to open '' for reading: No such file or directory in
p> /home/httpd/html/fai/test1.php3 on line 12

Yeah, you can't copy "nothing" :)

--
Best regards,
 Richard mailto:richlaunchcode.co.uk

attached mail follows:


Hello,

  I have PHP as Apache so and I wand to use it in the command line as
  CGI. As apache module I have running with safe mode in the command
  line I want to use PHP without SAFE MODE. My PHP is compiled with so
  modules.

  If I use this construction:

  #!/usr/local/bin/php -c /root/ -q
  <?
    //Set_Time_Limit(0);
    $spojeni = MySQL_Connect("localhost", "user", "pass");

  i got:

Fatal error: Call to undefined function: mysql_connect() in /root/pokus.php on line 5

  What is wrong?

  Thanks
  Radek

--
Regards,
 Bc. Radek Krejča
 Starnet, s. r. o.
 radekceskedomeny.cz
 +420 608 470980
 http://www.ceskedomeny.cz
 http://www.skdomeny.com
 http://www.starnet.cz
 ICQ: 65895541

attached mail follows:


Dear Friends

These is my sample code

test1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<form name="frm1" method="POST" action="test1.php3"
enctype="multipart/form-data">
<input type="text" name=text1 value="">
<input type=file name=file1>
<input type=submit name=btnsubmit value="Submit">
</form>

</BODY>
</HTML>

test1.php3

<html>
<head><title>Test Page</title></head>
<body>

<form>

<?
echo $text1;
echo $file1;
echo $file1_name;
copy($file1,"d:\prashant\$file1");
?>

</form>
</body>
</html>

I am Facing the problem that if i use enctype="multipart/form-data" in form
object
then i am unable to retrieve the values passed from .html form.

So if i am using a File Upload control in my form without the enctype
attribute,then i get a warning message

Unable to open '' for reading: No such file or directory in
/home/httpd/html/fai/test1.php3 on line 12

i.e My HTML Form with Post Method and enctype
attribute="multipart/form-data" is not working for passing data to the web
server.

The problem can be solved without the enctype attribute in the Form Tag
where i can send the Data to the
Web Server and the values getting retrieved in another Php Page, but what
about if i have to upload
a File using the File Upload control <input type=file name=file1> in my HTML
Form.

It Fails in this case where i get the warning message.

Can somebody help me in this regard as soon as possible ???

Thanks,
Prashant S Akerkar

----- Original Message -----
From: "Jason Wong" <php-generalgremlins.biz>
To: <php-generallists.php.net>
Sent: Saturday, November 08, 2003 3:37 PM
Subject: Re: [PHP] fopen url

> On Saturday 08 November 2003 08:21, John Hagstrand wrote:
>
> > Thanks for your snot.
>
> They were surplus to requirements so you're welcome to them.
>
> > The code you wrote below,
> >
> > > echo fopen("http://www.google.com", 'r');
> > > echo fopen("http://news.google.com", 'r');
> >
> > I've implmented at this url.
> > http://www.globalscoop.com/gs/feeds/testUrl.php
> >
> > You can see the error I'm getting. Would you take a look?
>
> No. Would you mind posting the error you're getting so that everyone can
see?
> And please confirm that whatever error you're getting is in response to
the
> exact code as above.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> Caution: Keep out of reach of children.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi all!

I've got a problem when using this combination. Everything works fine for
browsers that send
Accept: */*
requests, but some web spiders say
Accept: text/*
and get 406 error since the actual type is application/...

I worked this around by using type-map and creating .var files for each
document... But maybe someone knows a better solution?

Thanx in advance,
Styx