|
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 21 Mar 2006 10:09:09 -0000 Issue 4027
php-general-digest-help
lists.php.net
Date: Tue Mar 21 2006 - 04:09:09 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 21 Mar 2006 10:09:09 -0000 Issue 4027
Topics (messages 232248 through 232305):
Re: Accessing data posted from a different URL
232248 by: Jay Blanchard
232249 by: René Fournier
232250 by: Manuel Lemos
232251 by: Jay Blanchard
232252 by: Manuel Amador (Rudd-O)
232253 by: Manuel Amador (Rudd-O)
232254 by: Richard Lynch
232255 by: Jay Blanchard
232257 by: Manuel Amador (Rudd-O)
232258 by: Jay Blanchard
232259 by: John Nichel
232260 by: Manuel Amador (Rudd-O)
232261 by: Jay Blanchard
232262 by: Manuel Lemos
232264 by: Jay Blanchard
232265 by: Manuel Amador (Rudd-O)
232268 by: René Fournier
232271 by: Richard Lynch
232272 by: Richard Lynch
232278 by: René Fournier
232290 by: Manuel Lemos
Re: IntVal(float) Returns Different Values (Porting Delphi code to mix a block of data)
232256 by: Richard Lynch
Re: Fatal error: Call to undefined function preg_match()
232263 by: Richard Lynch
Re: array_search function bugged?
232266 by: Richard Lynch
Re: SNMP problem is TCP
232267 by: Richard Lynch
Re: Mail function problems
232269 by: Richard Lynch
Re: Get class name in static method
232270 by: Grant Young
Re: Merging two partially-transparent images results in black pixels
232273 by: Richard Lynch
Re: no newline after "?>" in the resulting HTML
232274 by: Richard Lynch
232275 by: Richard Lynch
232276 by: Richard Lynch
232298 by: Rostislav Krasny
232299 by: Andrei
232300 by: Rostislav Krasny
Re: Updating a single line in a file
232277 by: Richard Lynch
Re: Printing library in PHP ?
232279 by: robert mena
232280 by: robert mena
232282 by: robert mena
Will PHP6 have threads (yet)?
232281 by: Daevid Vincent
Security in php/ajax scripts
232283 by: robert mena
232284 by: Robert Cummings
232285 by: Philip Hallstrom
PERL Caller equivalent function
232286 by: sgsweb
232287 by: Chris
Retrieve large amounts of binary data from MySQL database in pieces
232288 by: Michael Thomsen
232301 by: Barry
dunk $25 shipped
232289 by: 2006-03-21 13:10:27
232303 by: Barry
is there a guide for pda friendly web pages
232291 by: Rick Lim
232304 by: Barry
232305 by: Matt Richards
PEAR::SOAP on Windows not working
232292 by: Peter Lauri
232293 by: T.Lensselink
SOAP PEAR/NuSOAP
232294 by: T.Lensselink
232295 by: Chris
232296 by: T.Lensselink
NuSOAP - HTTPS
232297 by: Peter Lauri
232302 by: Chris
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
[snip]
I have a script that periodically sends an email that includes form
post to a script, which is meant to do something with the posted data.
My problem is that apparently some PHP security measure is not
permitting the externally posted data to be access via $_POST. I
assume this is due to cross-site scripting issues, but in this case,
I want to do just that. Any ideas?
[/snip]
http://www.php.net/curl
attached mail follows:
Hmm, perhaps I didn't explain clearly. To put it another:
1. A script sends an email to a user with sign-in details.
2. The user clicks a [submit] button in the email message called
"Quick Sign In"
3. A web browsers opens to http://www.website.com/signin.php (from
the <form method="post" action="http://www.website.com/sign.php"> in
the email)
4. Signin.php looks for $_POST["signindetails"] and auto-fills the form.
Except the form post is not posting signindetails...
On 20-Mar-06, at 2:57 PM, Jay Blanchard wrote:
> [snip]
> I have a script that periodically sends an email that includes form
> post to a script, which is meant to do something with the posted data.
>
> My problem is that apparently some PHP security measure is not
> permitting the externally posted data to be access via $_POST. I
> assume this is due to cross-site scripting issues, but in this case,
> I want to do just that. Any ideas?
> [/snip]
>
> http://www.php.net/curl
>
>
>
attached mail follows:
Hello,
on 03/20/2006 06:52 PM René Fournier said the following:
> I have a script that periodically sends an email that includes form
> post to a script, which is meant to do something with the posted data.
>
> My problem is that apparently some PHP security measure is not
> permitting the externally posted data to be access via $_POST. I assume
> this is due to cross-site scripting issues, but in this case, I want to
> do just that. Any ideas?
I have no knowledge of such PHP restriction. I suspect the problem is
something else.
Make sure you have included tags like <form method="POST"
action="http://www.domain.com/full_form_processing_script_url.php">
</form> .
Some people insist on making everything XHTML compliant just they assume
that otherwise it would not be "Web standards" compliant. That is a
silly claim that only leads to all sorts of problems.
For instance, if you use method="post" because XHTML specification says
everything should be in lower case, you will have problems with some
browsers and e-mail programs that only accept POST in upper case and
fallback to GET when they find something else.
Also, keep in mind that you can't use Javascript in HTML e-mail messages.
These may not be your actual problems, but at least you have something
to start checking.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
[snip]
Hmm, perhaps I didn't explain clearly. To put it another:
1. A script sends an email to a user with sign-in details.
2. The user clicks a [submit] button in the email message called
"Quick Sign In"
3. A web browsers opens to http://www.website.com/signin.php (from
the <form method="post" action="http://www.website.com/sign.php"> in
the email)
4. Signin.php looks for $_POST["signindetails"] and auto-fills the form.
Except the form post is not posting signindetails...
[/snip]
Have you tried print_r($_POST) ?
attached mail follows:
Manuel Lemos wrote:
>Some people insist on making everything XHTML compliant just they assume
>that otherwise it would not be "Web standards" compliant. That is a
>silly claim that only leads to all sorts of problems.
>
>
That assertion is 100% untrue.
First of all, XHTML is an excellent idea. Having been based in XML
(which is easier to parse than SGML - the markup base for HTML), XHTML
is a much, much more interoperable standard. Second of all, the spec
has made a number of clarifications which should result in more
cross-browser predictability.
>For instance, if you use method="post" because XHTML specification says
>everything should be in lower case, you will have problems with some
>browsers and e-mail programs that only accept POST in upper case and
>fallback to GET when they find something else.
>
>
Oh, for God's sake, stop selling snake oil. I'm willing to bet $100
that you haven't even read the specification and are inventing crap as
you go.
For the record, the specification does not say that attribute values
need to be lowercase, only attribute *names*. You can put "PoST" or
"pOST" if you feel like it, and the markup validation status will not
change a bit.
>Also, keep in mind that you can't use Javascript in HTML e-mail messages.
>
>
That's evidently true, I cannot argue with that.
>These may not be your actual problems, but at least you have something
>to start checking.
>
>
The original poster's problem may be related to the fact that, perhaps,
he's checking for the value of a button in the POST variable, when it's
a very well known fact that the browser only sends the value of the
button if the user *clicks* the button, but not if the user hits ENTER
in one of the form fields.
attached mail follows:
Jay Blanchard wrote:
>[snip]
>Hmm, perhaps I didn't explain clearly. To put it another:
>
>1. A script sends an email to a user with sign-in details.
>2. The user clicks a [submit] button in the email message called
>"Quick Sign In"
>3. A web browsers opens to http://www.website.com/signin.php (from
>the <form method="post" action="http://www.website.com/sign.php"> in
>the email)
>4. Signin.php looks for $_POST["signindetails"] and auto-fills the form.
>
>Except the form post is not posting signindetails...
>
>
The e-mail client may very well be ignoring the POST request. To
diagnose this, you can use Ethereal or some other packet sniffing
software. That will also tell you the contents of fields submitted in
the POST/GET request.
Most certainly, what you want to do is not possible. I say this because
Hi5 has eschewed that technique in favor of placing a hyperlink with an
argument that contains a "validation code". Thus, when you click on the
link (which has the validation code embedded), you're directed to the
page in question and automatically logged in. To implement that, you'd
need a table that correlates validation codes with user IDs on your Web
application.
>[/snip]
>
>Have you tried print_r($_POST) ?
>
>
>
attached mail follows:
#1. Show us the FORM.
#2. Show us the email itself
#3. Show us the code that processes the POST data.
Without that, we're just guessing in the dark.
Can you make the form work on your server, WITHOUT the email involved?
Check your httpd.conf carefully. There is no inherent reason why this
shouldn't work, but it would be trivial for you to configure
httpd.conf to make it NOT work if you wanted it that way.
What version of PHP are you running? Is it so old that $_POST is
really $HTTP_POST_VARS ? Yikes. Upgrade!
Add this as the first line to your processing script:
<?php phpinfo();?>
Now use your email to POST to it.
What do you see in the output about POST and involving your INPUTs in
the form?
On Mon, March 20, 2006 4:03 pm, René Fournier wrote:
> Hmm, perhaps I didn't explain clearly. To put it another:
>
> 1. A script sends an email to a user with sign-in details.
> 2. The user clicks a [submit] button in the email message called
> "Quick Sign In"
> 3. A web browsers opens to http://www.website.com/signin.php (from
> the <form method="post" action="http://www.website.com/sign.php"> in
> the email)
> 4. Signin.php looks for $_POST["signindetails"] and auto-fills the
> form.
>
> Except the form post is not posting signindetails...
>
>
> On 20-Mar-06, at 2:57 PM, Jay Blanchard wrote:
>
>> [snip]
>> I have a script that periodically sends an email that includes form
>> post to a script, which is meant to do something with the posted
>> data.
>>
>> My problem is that apparently some PHP security measure is not
>> permitting the externally posted data to be access via $_POST. I
>> assume this is due to cross-site scripting issues, but in this case,
>> I want to do just that. Any ideas?
>> [/snip]
>>
>> http://www.php.net/curl
>>
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
[snip]
>Some people insist on making everything XHTML compliant just they
assume
>that otherwise it would not be "Web standards" compliant. That is a
>silly claim that only leads to all sorts of problems.
>
>
That assertion is 100% untrue.
First of all, XHTML is an excellent idea. Having been based in XML
(which is easier to parse than SGML - the markup base for HTML), XHTML
is a much, much more interoperable standard. Second of all, the spec
has made a number of clarifications which should result in more
cross-browser predictability.
[/snip]
All of these, XML, HTML, XHTML are subsets of SGML.
[snip]
>For instance, if you use method="post" because XHTML specification says
>everything should be in lower case, you will have problems with some
>browsers and e-mail programs that only accept POST in upper case and
>fallback to GET when they find something else.
>
>
Oh, for God's sake, stop selling snake oil. I'm willing to bet $100
that you haven't even read the specification and are inventing crap as
you go.
[/snip]
Easy there sport, no need to fling words like 'crap' around and make
assertions about posters, especially when you do not know them.
attached mail follows:
Jay Blanchard wrote:
>>
>>
>
>All of these, XML, HTML, XHTML are subsets of SGML.
>
>
Your point being? Because my point is centered around the simple fact
that XML is easier to parse than generic SGML. XML and SGML aren't
fully compatible, if you really want to spot on the differences. XML is
stricter, meaning there are fewer possible character representations of
the same document, which eases parseability and machine-to-machine
interoperability.
>Easy there sport, no need to fling words like 'crap' around and make
>assertions about posters, especially when you do not know them.
>
>
Okay, I'm sorry. Dude, you touched a soft spot. It's important, to me,
that people respect standards. The wealth of information and
communication possibilities that exist today is, in no small part,
fueled by the adoption of international standards.
attached mail follows:
[snip]
Okay, I'm sorry. Dude, you touched a soft spot. It's important, to me,
that people respect standards. The wealth of information and
communication possibilities that exist today is, in no small part,
fueled by the adoption of international standards.
[/snip]
That's cool. As far as web development is concerned there are no
'standards', only 'recommendations'. If we had standards we would have
fewer problems with differences between browsers.
attached mail follows:
Manuel Amador (Rudd-O) wrote:
<snip>
> Okay, I'm sorry. Dude, you touched a soft spot. It's important, to me,
> that people respect standards. The wealth of information and
> communication possibilities that exist today is, in no small part,
> fueled by the adoption of international standards.
>
Jay didn't touch your 'soft spot' (I never knew that about you Jay).
Jay was responding to your flame of another poster (Manuel).
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
Jay Blanchard wrote:
>[snip]
>Okay, I'm sorry. Dude, you touched a soft spot. It's important, to me,
>
>that people respect standards. The wealth of information and
>communication possibilities that exist today is, in no small part,
>fueled by the adoption of international standards.
>[/snip]
>
>That's cool. As far as web development is concerned there are no
>'standards', only 'recommendations'. If we had standards we would have
>fewer problems with differences between browsers.
>
>
Sometimes I wish we did have mandatory standards. Punishable by hanging
nonconforming implementations implementors' by their thumbs. :-) But
then I close Internet Explorer, and I suddenly feel well again.
attached mail follows:
[snip]
Jay didn't touch your 'soft spot' (I never knew that about you Jay).
Jay was responding to your flame of another poster (Manuel).
[/snip]
True dat, but I have touched.....um.....er been in touch with my
feminine side. I am comfortable with who I am, or something like that.
attached mail follows:
Hello,
on 03/20/2006 07:16 PM Manuel Amador (Rudd-O) said the following:
>> Some people insist on making everything XHTML compliant just they assume
>> that otherwise it would not be "Web standards" compliant. That is a
>> silly claim that only leads to all sorts of problems.
>>
>>
> That assertion is 100% untrue.
>
> First of all, XHTML is an excellent idea. Having been based in XML
> (which is easier to parse than SGML - the markup base for HTML), XHTML
> is a much, much more interoperable standard. Second of all, the spec
> has made a number of clarifications which should result in more
> cross-browser predictability.
That has nothing to do with what I said. Read again.
>> For instance, if you use method="post" because XHTML specification says
>> everything should be in lower case, you will have problems with some
>> browsers and e-mail programs that only accept POST in upper case and
>> fallback to GET when they find something else.
>>
>>
> Oh, for God's sake, stop selling snake oil. I'm willing to bet $100
> that you haven't even read the specification and are inventing crap as
> you go.
Put that gun down. I am not interested in flame wars. If you do not know
how to discuss something that you disagree in a civilized manner without
departing to personal insult, sorry I can not justify giving you any
further attention.
> For the record, the specification does not say that attribute values
> need to be lowercase, only attribute *names*. You can put "PoST" or
> "pOST" if you feel like it, and the markup validation status will not
> change a bit.
That is not what the W3C validator thinks. Try entering the following
HTML in the W3C markup validator page and see for yourself why people
are using post in lowercase because they think being XHTML compliant is
a good thing.
http://validator.w3.org/#validate-by-input
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Never mind</title>
</head>
<body>
<form method="POST" action="">
</form>
</body>
</html>
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
[snip]
Sometimes I wish we did have mandatory standards. Punishable by hanging
nonconforming implementations implementors' by their thumbs. :-) But
then I close Internet Explorer, and I suddenly feel well again.
[/snip]
It would make life for web developers a lot easier. BTW
[Amador]
XML and SGML aren't fully compatible, if you really want to spot on the
differences.
[/Amador]
Here is a more complete exploration of the subject, since we have
strayed so far off-course.
http://www.w3.org/TR/NOTE-sgml-xml.html
attached mail follows:
Manuel Lemos wrote:
>That is not what the W3C validator thinks. Try entering the following
>HTML in the W3C markup validator page and see for yourself why people
>are using post in lowercase because they think being XHTML compliant is
>a good thing.
>
>
The validator said:
value of attribute "method" cannot be "POST"; must be one of "get", "post".
so it means you're right. Perhaps the companion DTD to the standard
demands either get or post. Would you like to elaborate on which
browsers have trouble interpreting lowercase actions in form tags?
>http://validator.w3.org/#validate-by-input
>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
><html xmlns="http://www.w3.org/1999/xhtml">
><head>
><title>Never mind</title>
></head>
><body>
><form method="POST" action="">
></form>
></body>
></html>
>
>
>
>
>
attached mail follows:
On 20-Mar-06, at 3:05 PM, Jay Blanchard wrote:
> [snip]
> Hmm, perhaps I didn't explain clearly. To put it another:
>
> 1. A script sends an email to a user with sign-in details.
> 2. The user clicks a [submit] button in the email message called
> "Quick Sign In"
> 3. A web browsers opens to http://www.website.com/signin.php (from
> the <form method="post" action="http://www.website.com/sign.php"> in
> the email)
> 4. Signin.php looks for $_POST["signindetails"] and auto-fills the
> form.
>
> Except the form post is not posting signindetails...
> [/snip]
>
> Have you tried print_r($_POST) ?
Yes. And to answer a few other questions: The script, the email, the
server—everything is on the same computer, running on top of the
same Apache/PHP installation (v 4.3.11). The form is essentially:
<form method="POST" target="SI" action="http://
www.website.com"><input type="hidden" name="signindetails"
value="serialized and htmlentitized array values..."><input
type="submit" name="submit" value="Fill"></form>
I've narrowed it down a little farther:
1. If I copy the form from the email into the destination php page
("ProcessSignin.php"), and click Submit, it works—I get can see the
$_POST["signindetails"]
2. If I copy the form from the email into the original php page
("MakeandSendSignin.php"), and click Submit (with
action="ProcessSignIn.php"), it works—I can see the $_POST
["signindetails"]
3. ONLY if I click the Submit FROM the email—email client Mac OS X
Mail.app or Outlook Excell—does it fail. The destination php page
("ProcessSignin.php") appears, but print_r($_POST) reveals no $_POST
["signindetails"].
So, it appears that the email clients are stripping the POST data on
Submit.
...Rene
attached mail follows:
On Mon, March 20, 2006 4:16 pm, Manuel Amador (Rudd-O) wrote:
> The original poster's problem may be related to the fact that,
> perhaps,
> he's checking for the value of a button in the POST variable, when
> it's
> a very well known fact that the browser only sends the value of the
> button if the user *clicks* the button, but not if the user hits ENTER
> in one of the form fields.
That's actually browser-dependent behaviour...
I think it was Netscape that sent the name/value just as if the user
clicked the button, but IE that didn't.
Or maybe vice-versa.
There is something to be said for not trying to make your code XHTML
compliant, though...
I'm more worried about "works in all browsers" compliant, which,
unfortunately, is not a documented standard anywhere. :-v
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Mon, March 20, 2006 5:04 pm, René Fournier wrote:
> <form method="POST" target="SI" action="http://
> www.website.com"><input type="hidden" name="signindetails"
> value="serialized and htmlentitized array values..."><input
What does this value actually look like?
How long is it?
Is mail wrapping it to 72 characters with a newline, thereby breaking
the data up?
Though you would still get some POST data, just not what you thought...
> type="submit" name="submit" value="Fill"></form>
>
> I've narrowed it down a little farther:
>
> 1. If I copy the form from the email into the destination php page
> ("ProcessSignin.php"), and click Submit, it works—I get can see the
> $_POST["signindetails"]
>
> 2. If I copy the form from the email into the original php page
> ("MakeandSendSignin.php"), and click Submit (with
> action="ProcessSignIn.php"), it works—I can see the $_POST
> ["signindetails"]
>
> 3. ONLY if I click the Submit FROM the email—email client Mac OS X
> Mail.app or Outlook Excell—does it fail. The destination php page
> ("ProcessSignin.php") appears, but print_r($_POST) reveals no $_POST
> ["signindetails"].
>
> So, it appears that the email clients are stripping the POST data on
> Submit.
Possibly.
Here's an idea:
Take all that signindetail you want and cram it into a database table,
with a unique random key field to look it up.
You can then use method="GET" or even a simple link like:
http://example.com/signin?key=345kjh46kjn345984y3569078v9
For those of us who don't even READ html-enhanced (cough, cough)
email, it's better anyway. :-)
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On 20-Mar-06, at 4:40 PM, Richard Lynch wrote:
> On Mon, March 20, 2006 5:04 pm, René Fournier wrote:
>> <form method="POST" target="SI" action="http://
>> www.website.com"><input type="hidden" name="signindetails"
>> value="serialized and htmlentitized array values..."><input
>
> What does this value actually look like?
>
> How long is it?
>
> Is mail wrapping it to 72 characters with a newline, thereby breaking
> the data up?
>
> Though you would still get some POST data, just not what you
> thought...
Actually, neither the form, nor the data seems to matter. I've copied
in simple forms from elsewhere, and the only determining factor so
far is:
If the form is submitted from a web browser, the POSTed data IS
available/visible (print_r) in the new web page.
If the form--that is, any form--is submitted from an email client
(any email client), the POSTed data IS NOT available/visible in the
new web page.
So... I can think of three explanations:
1. The email client (Mail or Outlook Express) is stripping the POST
data on Submit.
2. The web browser (Safari, Firefox) is stripping incoming POST data
if it's coming from outside the application.
3. PHP somehow knows if the form data is being POSTed from inside the
web browser or not (and fails on the latter).
Weird.
...Rene
attached mail follows:
Hello,
on 03/20/2006 07:52 PM Manuel Amador (Rudd-O) said the following:
>> That is not what the W3C validator thinks. Try entering the following
>> HTML in the W3C markup validator page and see for yourself why people
>> are using post in lowercase because they think being XHTML compliant is
>> a good thing.
>>
>>
> The validator said:
>
> value of attribute "method" cannot be "POST"; must be one of "get", "post".
>
> so it means you're right. Perhaps the companion DTD to the standard
> demands either get or post. Would you like to elaborate on which
> browsers have trouble interpreting lowercase actions in form tags?
I do not recall, but I think there was a problem with some Opera versions.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
You probably want to use BC_MATH or that new-fangled thing like it if
you want to deal in INT larger than 32 bit.
Or you could buy 64-bit hardware.
On Mon, March 20, 2006 9:13 am, Bruce wrote:
> I am having trouble porting some code originally written in Borland
> Delphi
> to PHP. The Delphi code expects certain behavior on integer overflows
> that I
> can only duplicate on some PHP systems. For example:
>
> $BB = -2181087916;
> $AA = (int)$BB;
> $AA = intval($BB);
>
> On some systems, $AA will be (int)-2147483648, however, on most
> systems, $AA
> will be (int)2113879380, which is the same value truncated at 32 bits.
> It is
> this latter behavior that I need to properly port the Delphi code.
>
> Can someone suggest a way to do this that is consistent on all
> platforms?
> For reference, I am attaching the Delphi code and my PHP port.
>
> Thanks...
>
> --Bruce
>
> {quick (block) mixer routine}
> procedure MixBlock(const Matrix : T128bit; var Block; Encrypt :
> Boolean);
>
> const
> CKeyBox : array [False..True, 0..3, 0..2] of LongInt =
>
> (((0, 3, 1), (2, 1, 3), (1, 0, 2), (3, 2, 0)),
> ((3, 2, 0), (1, 0, 2), (2, 1, 3), (0, 3, 1)));
>
> var
> Blocks : array [0..1] of LongInt absolute Block;
> Work : LongInt;
> Right : LongInt;
> Left : LongInt;
>
> R : LongInt;
> AA, BB : LongInt;
> CC, DD : LongInt;
>
> begin
> Right := Blocks[0];
> Left := Blocks[1];
>
> for R := 0 to 3 do begin
> {transform the right side}
> AA := Right;
> BB := Matrix[CKeyBox[Encrypt, R, 0]];
>
> CC := Matrix[CKeyBox[Encrypt, R, 1]];
> DD := Matrix[CKeyBox[Encrypt, R, 2]];
>
> AA := AA + DD; DD := DD + AA; AA := AA xor (AA shr 7);
> BB := BB + AA; AA := AA + BB; BB := BB xor (BB shl 13);
>
> CC := CC + BB; BB := BB + CC; CC := CC xor (CC shr 17);
> DD := DD + CC; CC := CC + DD; DD := DD xor (DD shl 9);
>
> AA := AA + DD; DD := DD + AA; AA := AA xor (AA shr 3);
> BB := BB + AA; BB := BB xor (BB shl 7);
>
> CC := CC + BB;
> CC := CC xor (DD shr 15);
> DD := DD + CC;
> DD := DD xor (DD shl 11);
>
> Work := Left xor DD;
> Left := Right;
> Right := Work;
> end;
>
> Blocks[0] := Left;
>
> Blocks[1] := Right;
> end;
>
> Here is my PHP port:
>
> <?php
> function zeroFill($a, $b)
> {
> $z = hexdec(80000000);
> if ($z & $a)
> {
> $a >>= 1;
> $a &= (~ $z);
> $a |= 0x40000000;
> $a >>= ($b-1);
> }
> else
> {
> $a >>= $b;
> }
> return $a;
> }
>
> function MixBlock($AKey, &$ACode, $Encrypt)
> {
> $CKeyBox = array(array(3, 2, 0), array(1, 0, 2), array( 2, 1, 3),
> array(0 ,
> 3, 1));
>
> $Right = $ACode[0];
> $Left = $ACode[1];
>
> for ($R=0; $R<= 3; $R++)
> {
> $AA = $Right;
> if ($Encrypt)
> {
> $BB = $AKey[$CKeyBox[ $R][0]];
> $CC = $AKey[$CKeyBox[ $R][1]];
> $DD = $AKey[$CKeyBox[ $R][2]];
> }
> else
> {
> $BB = $AKey[$CKeyBox[ 3-$R][0]];
> $CC = $AKey[$CKeyBox[ 3-$R][1]];
> $DD = $AKey[$CKeyBox[ 3-$R][2]];
> }
>
> $AA = (int)$AA + (int)$DD;
> $DD = (int)$DD + (int)$AA;
> $AA = (int)$AA ^ zeroFill( $AA, 7);
> $BB = (int)$BB + (int)$AA;
> $AA = (int)$AA + (int)$BB;
>
> $BB = (int)$BB ^ ((int)$BB << 13);
> $CC = (int)$CC + (int)$BB; $BB = (int)$BB + (int)$CC;
> $CC = (int)$CC ^ zeroFill( $CC, 17);
> $DD = (int)$DD + (int)$CC; $CC = (int)$CC + (int)$DD;
> $DD = (int)$DD ^ ((int)$DD << 9);
>
> $AA = (int)$AA + (int)$DD; $DD = (int)$DD + (int)$AA;
> $AA = (int)$AA ^ zeroFill( $AA, 3);
> $BB = (int)$BB + (int)$AA;
> $BB = (int)$BB ^ (int)((int)$BB << 7);
> $CC = (int)$CC + (int)$BB;
> $CC = (int)$CC ^ zeroFill( $DD, 15);
> $DD = (int)$DD + (int)$CC;
> $DD = (int)$DD ^ (int)((int)$DD << 11);
>
> $Work = $Left ^ $DD;
> $Left = $Right;
> $Right = $Work;
> }
>
> $ACode[0] = $Left;
> $ACode[1] = $Right;
> }
> ?>
>
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Mon, March 20, 2006 4:58 am, Barry wrote:
> M. Sokolewicz wrote:
>> Since when can you "unset" functions from within php scripts??
>> (except
>> with specialized modules, which we'll just ignore for now).
> Why ignore them for now?
> Doesn't make sense for me ...
Because the number of people who have installed the RTI module, so
they can re-wire the guts of PHP on the fly, and completely screw up
their system on purpose in the process, is a very very very very small
number.
And the odds that the OP actually installed RTI, *and* managed to do
what it would take to un-define preg_match with it, and still have his
system doing anything else useful, are slim to none, and Slim's out of
town.
:-)
> >>Recently I am getting the following error on some of my PHP-enabled
> >>websites. I think it started when I went from PHP4 -> PHP5.
>
> He went from 4 to 5, do you know what 4 had compiled in? no you don't.
> Why don't just ignore he went from 4 to 5.
> So we can see this post as "i installed php 5 and got error X"
>
> Sorry, i think that's big nonsense.
What exactly is nonsense?
That installing PHP5 and messing up ./configure to not have PCRE is a
very very very common mistake?
The previous advice given is almost-for-sure 100% correct:
PCRE didn't get complied in -- it's not there -- install it
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Sun, March 19, 2006 4:46 pm, je killen wrote:
> The following code does not produce the correct results (for my
> purposes):
>
> function code($str, $match, $formula)
> {
> for($i = 0; $i < count($str); $i++)
> {
> $formula[$i] = array_search($str[$i], $str);// <<======|| no bueno
> //print $formula[$i]; not right
> if($formula[$i] < $i)
> {$str[$i] = '';}
> }
> //print'<br>'; //----- etc (lots more code)------->
>
> The code takes a string of ascii letters forming a word and is
> supposed
> to create a list of indexes
> in the proper sequence for reconstructing the word. The object of the
> code in context is to take
> any word and create an array of unique letters with no repeats so that
> gd can be used to produce
> images of each letter.
Almost for sure, this function could be used instead:
http://www.php.net/manual/en/function.count-chars.php
You'll be throwing away the information about how many of each letter.
I really don't understand, though, why you are doing things the way
you describe...
> The letters are then reassembled in the browser
> to form the word. The
> $formula above is supposed to tell the browser in what sequence to
> display each letter, including
> using the same letter image in repeat locations. For this it fails
> miserably.
>
> These are the results of test steps:
>
> dissatisfaction (the test word)
> Processed input string: dissatisfaction (code output at key step to
> verify)
> at creation of formula: 012245128410511314 (formula sampled at ' no
> bueno' line in code)
> from browser source array: 012245128410511314 (formula pasted from
> browser javascript source)
>
> The letter images spell out:
> disstfisntidfiiait which is in accordance with the formula as far as
> I
> can tell.
How do you distinguish in:
012245128410511314
between one-digit and two-digit integers?
dissatisfaction
11111
012345678901234
0->d
1->i
2->s
3->NULL (2 is 's')
4->a
5->t
6->NULL (1 is 'i')
7->NULL (2 is 's')
8->f
9->NULL (4 is 'a')
10->c
11->NULL (5 is 't')
12->NULL (1 is 'i')
13->o
14->n
Going from just the numbers, now I get:
012245128410511314
dissatisfaidtiiNULLia
So, given the input 012245128410511314, you are never going to get the
original word back from just that...
I don't think your formula makes sense in the first place...
If you just want to represent each character as a GD image, and not
duplicate, so the browser can cache images, you can just do:
<?php
for ($i = 0, $len = strlen($word); $i < $len; $i++){
$char = $string[$i];
?><img src="drawchar.php/char=<?php echo $char?>" /><?php
}
?>
You can then use $_SYSTEM['PATH_INFO'] (or whatever it's called) to
get 'char=?' and do like:
list($key, $value) = explode('=', $_SYSTEM['PATHINFO']);
$$key = $value;
> There is one other weakness I've discovered, if arrays are created in
> one code sequence and are called
> to print in loops more than once or processed in different code
> sections. The second time the same array
> is called it has significantly degraded, loosing values from index
> positions.
If you are using list/each or something like that, there is an
"internal pointer" in the array which you are mucking with, and most
likely confusing yourself with.
Try using 'foreach' which does not use that internal pointer.
> the seems to be no bug report accommodation in the php.net site so I'm
> posting here.
Posting here FIRST is good, especially since you have not encountered
an actual bug yet :-)
After that, though, there *IS* a place to search for, and ultimately
report bugs:
http://bugs.php.net
But please don't clog that with reports before checking them out
thoroughly, so you really ARE reporting bugs in PHP.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
You're not showing enough code...
What does function zamiana look like?
And is the code you gave us porty_set.php line 70?
Or is that some other code we haven't seen?
Is 'pliki' a PHP software package you got somewhere else? They may
have a more focussed forum / mailing list / whatever that can help you
faster than we can here...
On Sun, March 19, 2006 4:08 pm, wood-gd wrote:
> Hello
> //---- I sorry my english
> //----my script is control TCP protocol --------
>
> $ip=83.190.177.45; // IP
> $community=public; //community (password)
> echo $stan = '12'; // deletetcb - del connect
>
> $LocalAddress =
> snmpwalk("$ip","$community","tcp.tcpConnTable.tcpConnEntry.tcpConnLocalAddre
> ss");
> $LocalPort =
> snmpwalk("$ip","$community","tcp.tcpConnTable.tcpConnEntry.tcpConnLocalPort"
> );
> $RemAddress =
> snmpwalk("$ip","$community","tcp.tcpConnTable.tcpConnEntry.tcpConnRemAddress
> ");
> $RemPort =
> snmpwalk("$ip","$community","tcp.tcpConnTable.tcpConnEntry.tcpConnRemPort");
>
> echo
> $wynik='1.3.6.1.2.1.6.13.1.'.zamiana($LocalAddress[$id],"IpAddress:
> ").'.'.$LocalPort[$id].'.'.zamiana($RemAddress[$id], "IpAddress:
> ").'.'.$RemPort[$id];
>
> snmpset($ip, $community, $wynik, i, $stan);
>
> //-- zamiana($LocalAddress[$id],"IpAddress: ") this is function
> //-- Is error
>
> 12
> 1.3.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0
> Warning: snmpset(): Could not add variable:
> system.sysUpTime.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0 i 12 in
> e:\program
> files\apache group\apache\users\snmp\pliki\porty_set.php on line 70
>
> //-- hellp Me. My e-mail wood-gd
tlen.pl
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Windows, you need SMTP set.
If you can't set it in php.ini, you might try .htaccess, but I suspect
that is locked down and you can't...
You could try things like:
Install Pegasus email client, and use it from http://php.net/exec to
send email.
Install some kind of class from http://phpclasses.org that lets you
choose your own SMTP server, and the PHP code in that class handles
the mail protocol rather than using PHP's builtin code (which is tied
to php.ini settings)
Note that the built-in code will be "faster" but the mail() function
is never suitable for mass high-volume emails.
On Sun, March 19, 2006 3:50 pm, Paul Goepfert wrote:
> Hi all,
>
> Has anyone had this problem before? I have a web server that resides
> on a windows platform (According to phpinfo()). I used the php mail
> function to send out a test message to make sure that the mail
> function would work when needed. I sent out the test message and I
> didn't get an email sent to me. This is what I did, I created the
> following variables:
>
> $to = "Paul.Goepfert
gmail.com";
> $subject ="Test";
> $message ="This is a test"
> $headers = "From: Paul " .
> "<Paul.Goepfert
gmail.com>\r\n";
> $headers .= "X-Sender: <Paul.Goepfert
gmail.com>\r\n";
> $headers .="X-Mailer: PHP\r\n";
> $headers .="Return-Path: <Paul.Goepfert
gmail.com>\r\n";
>
> I put them in the mail function as parameters
> mail($to,$subject,$message,$headers).
>
>
> Ok now this is what is found in phpinfo():
>
> sendmail_from no value no value
> sendmail_path no value no value
> SMTP no value no value
> smtp_port 25 25
>
> Do these values need to be set? if so, how do that on a remote
> server? I don't think I have access to the httpd config file or
> php.ini file.
>
> Thanks
> Paul
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
Not sure about PHP5, but for PHP4 I found this hack solution at:
http://passivedigressive.com/archives/2005-02/php-static-class-name-solution/
There are probably all sorts of issues with this approach, but it solved
the problem at the time...
HTH. Grant
attached mail follows:
On Sat, March 18, 2006 9:16 pm, Jason Young wrote:
> I have an image that uses partial transparency for borders and such.
> At first, I tried using the whole image; creating a truecolor 'holder'
> image, then imagecopymerge-ing it, but that resulted in the outside
> transparent areas (the ones that would instead show the 'holder'
> image)
> were black, while the portions of transparency on the inside (these
> are
> rounded-squares) that had actual other images below them were white.
I think you maybe need to allocate a color in the holder image as the
background color...
> Then, I made two images. One having the outside transparency, and
> setting imagesavealpha to make it work as intended... then adding the
> needed images, then adding the 'window'-type transparent image on top.
> This gives the best result, but the 'window' image also has partial
> transparency, and is instead showing in black.
Again, try doing:
$white = imagecolorallocate($image, 255, 255, 255);
to 'set' the background color.
I think this behaviour change in different GD versions, though.
> I'm pretty much at wit's end. Everything's imagecopymerge'd, I've
> tried
> just about everything I could think of.
>
> Can you actually not have two transparent images on top of one
> another?
I'm almost certain you can, but keep in mind that any "overlap" in
them will probably come out darker than you think...
Each of the alpha blends will kick in consecutively to darken things.
At least, that was my experience with this, in my brief toying with it.
> Is there something else I can try?
> And as an offshoot question, why won't any transparent images natively
> load/import as transparent? I always seem to have to call
> imagecolortransparent on portions that are definitely transparent in
> Photoshop, etc.
Just the way it is, I think...
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote:
> <p>Hello World</p>
> </body>
> <p>Hello World</p></body>
> Why there is no newline afer " <p>Hello World</p>" ?
> Is it a PHP bug or the tutorial should be updated?
The tutorial is imprecise, and glosses over this detail.
For very good reasons, ?>[newline] ignores the trailing [newline]
character.
If you want the newline, you should do:
<?php
echo "<p>Hello World</p>\n";
?>
As for WHY the [newline] after ?> is ignored, it just turns out that
there are more times when you want it that way than the other, *AND*
it's trivial to insert a \n into your output, *AND* it would be very
hard to come up with a way to make the newline NOT appear if the
default was to have it appear, *AND* a *TON* of things would go wrong
if the extra newline appeared where you don't want it, but it's pretty
unimportant if a newline is missing at that point in the tutorial and
in most real-world cases (IE, HTML output) where you have ?>[newline]
It's not a bug ; It's a feature
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Sat, March 18, 2006 1:23 pm, Adrian wrote:
> Is there a way to circumvent this?
> My template engine compiles templates to PHP files and this "feature"
> makes the output html code look awful sometimes.
You could:
1. Add \n after all the lines of output where it matters.
2. Use TWO newlines after ?> tags
<?php echo "Test";?>
newline
I *believe* this will output:
Test
newline
PHP only "eats" *ONE* newline after ?>, not multiple newlines,
almost-for-sure.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Sat, March 18, 2006 3:32 pm, Rostislav Krasny wrote:
> On Sat, 18 Mar 2006 19:37:48 +0000
> jb
jamesbenson.co.uk (James Benson) wrote:
>
>> I get the same results, I doubt it's a bug, the person who wrote the
>> article maybe never tried what it would output since they probably
>> know
>> how the echo construct works,
>
> I think it is a bug. That part of the article could been written with
> very old version of PHP. By the way, ASP does not delete a newline
> after its "%>".
It's a documented feature, not a bug. :-)
And, honestly, what ASP (blech) does is about as relevant as the price
of tea in China.
Nobody, not even Bill Gates, has enough money to pay me to use ASP again.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Mon, 20 Mar 2006 17:51:32 -0600 (CST)
ceo
l-i-e.com ("Richard Lynch") wrote:
> On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote:
> > <p>Hello World</p>
> > </body>
>
> > <p>Hello World</p></body>
>
> > Why there is no newline afer " <p>Hello World</p>" ?
> > Is it a PHP bug or the tutorial should be updated?
>
> The tutorial is imprecise, and glosses over this detail.
>
> For very good reasons, ?>[newline] ignores the trailing [newline]
> character.
>
> If you want the newline, you should do:
>
> <?php
> echo "<p>Hello World</p>\n";
> ?>
Thanks for replying. You're suggesting an obvious but not so handy
workaround of this feature. Jim Lucas, in his reply, pointed me out to
much easier one. He suggested just to add a space after the "?>". I'm
wondering why this trivial thing isn't known to all and wasn't well
documented.
attached mail follows:
Really I think it would be loosing time documenting that you can put a
new line after ?>!
I mean it's obvious that what's outside php tags will be printed rite?
Andy
Rostislav Krasny wrote:
> On Mon, 20 Mar 2006 17:51:32 -0600 (CST)
> ceo
l-i-e.com ("Richard Lynch") wrote:
>
>> On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote:
>>> <p>Hello World</p>
>>> </body>
>>> <p>Hello World</p></body>
>>> Why there is no newline afer " <p>Hello World</p>" ?
>>> Is it a PHP bug or the tutorial should be updated?
>> The tutorial is imprecise, and glosses over this detail.
>>
>> For very good reasons, ?>[newline] ignores the trailing [newline]
>> character.
>>
>> If you want the newline, you should do:
>>
>> <?php
>> echo "<p>Hello World</p>\n";
>> ?>
>
> Thanks for replying. You're suggesting an obvious but not so handy
> workaround of this feature. Jim Lucas, in his reply, pointed me out to
> much easier one. He suggested just to add a space after the "?>". I'm
> wondering why this trivial thing isn't known to all and wasn't well
> documented.
>
attached mail follows:
On Tue, 21 Mar 2006 10:38:47 +0200
phplist
textbill.com (Andrei) wrote:
> Really I think it would be loosing time documenting that you can put a
> new line after ?>!
> I mean it's obvious that what's outside php tags will be printed rite?
>
> Andy
You can put anything after "?>" but if you put a newline, that newline
is then deleted from the resulting HTML. If you put a space and a
newline after that space, both will not be deleted. That is all.
P.S. could you not top-post, please.
> Rostislav Krasny wrote:
> > On Mon, 20 Mar 2006 17:51:32 -0600 (CST)
> > ceo
l-i-e.com ("Richard Lynch") wrote:
> >
> >> On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote:
> >>> <p>Hello World</p>
> >>> </body>
> >>> <p>Hello World</p></body>
> >>> Why there is no newline afer " <p>Hello World</p>" ?
> >>> Is it a PHP bug or the tutorial should be updated?
> >> The tutorial is imprecise, and glosses over this detail.
> >>
> >> For very good reasons, ?>[newline] ignores the trailing [newline]
> >> character.
> >>
> >> If you want the newline, you should do:
> >>
> >> <?php
> >> echo "<p>Hello World</p>\n";
> >> ?>
> >
> > Thanks for replying. You're suggesting an obvious but not so handy
> > workaround of this feature. Jim Lucas, in his reply, pointed me out to
> > much easier one. He suggested just to add a space after the "?>". I'm
> > wondering why this trivial thing isn't known to all and wasn't well
> > documented.
> >
attached mail follows:
Put it all in a database, and write out the file whenever it changes?
Only half-joking.
Virtually all your problems mentioned go away if it's in a database,
and it's not that tricky to set things up so you can write out the
file from the db when you need to.
On Sat, March 18, 2006 4:01 am, smr78 wrote:
> Hi,
> What is the best method to update a single line in a text file?
> I have a file made of identifiers, that is pointed on by a htaccess
> file and
> used by a server to give access to a web site.
> The file content is like this :
> login1:pass1\r\n
> login2:pass2\r\n
> ....
> loginn:passn\r\n
> loginn1:passn1\r\n
> ....
> lastlogin:lastpass\r\n
>
> This file can be modified in three ways
> update a single line when a user updates its profile
> delete a single line when the webmaster makes a user inactive
> append a line when the webmaster makes a user active
>
> the difficulties are :
> there is not the same number of users and lines in this file,
> we dont know at which line are the identifiers of a user,
> when updating identifiers, we must keep new line characters at the
> end.
>
> So what are the best functions to use to read and rewrite the file?
>
> file() which puts all the content in an array, including the new line
> characters? (if so, we need to use array_search() or array_keys() to
> find
> where are the identifiers
>
> fread() or file_get_contents() which puts all the content in a string?
> I
> tried this way and use eregi_replace() to find where are the
> identifiers,
> replace them by new value. But sometimes, I get errors where the new
> line
> characters are suppressed between two users identifiers or where an
> identifier is repeated like this :
>
> loginx:passx\r\n
> loginx:passx\r\n
> loginn:passnloginn1:passn1\r\n
> loginn2:passn2\r\n
>
> Here is my code :
> <? php
> //reading the actual file content
> $length=filesize($filename);
> $fp=fopen($filename,"r");
> $str=fread($fp,$length);
> fclose($fp);
>
> //in case of updating
> $str=eregi_replace($oldlogin.":".$oldpass,$newlogin.":".$newpass,$str);
> //in case of deleting
> $str=eregi_replace($oldlogin.":".$oldpass,"",$str);
>
> //rewriting the file
> $handle = fopen($filename,"w+")
> fwrite($handle,$str,strlen($str))
>
> //in case of inserting a new user
>
> $str=$newlogin.":".$newpass."\r\n";
> $handle = fopen($filename,"a")
> fwrite($handle,$str,strlen($str))
> ?>
> I know in "deleting" case, the eregi_replace pattern is so that the
> new line
> characters will not be removed, but this is not a problem
>
> I'll try to use file() function and array_keys() and let you know.
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
Boban,
I do not know what noobie is but thanks for the reply. I know that the
effect I want can be achieved using CSS but the question was "there is a
printing llibrary" so some of the trouble would be solved by this library
and not myself
On 3/14/06, Bogdan Ribic <ribicb
yahoo.com> wrote:
>
> This is more of an HTML question than it has to do with PHP, and you
> sound like a noobie :)
>
> Only useful info I can give you is to use THEAD in tables to hold
> headers, browsers put that row first on every page when breaking large
> table on several pages.
>
> Boban.
>
> robert mena wrote:
>
> > For example:
> > I have a specific report I have to add a header to each page
> > I have another one with tabular data that when the result is larger than
> a
> > page I should break the table and start at the next page so the table
> > headers can be seen again...
> >
> > In both I'd need a way to decide/find out how many pages will be
> necessary
> > (given the size of the paper sheet) so I could generate the HTML
> correctly.
> >
>
>
> --
>
> Open source PHP code generator for DB operations
> http://sourceforge.net/projects/bfrcg/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi Burhan,
Thanks. I'll try that but even tough my clients now uses windows I generally
do not like to be too commited to a single platform.
-rm
On 3/15/06, Burhan <phplist
meidomus.com> wrote:
>
> robert mena wrote:
> > Hi Manuel,
> >
> > I am trying to print from the client side. The client will be windows.
>
> Use ActiveX if you can get them to stick with IE (shouldn't be a problem).
>
> Google for 'ScriptX.cab' -- a free printing control that lets to fine
> tune printing.
>
attached mail follows:
Hi Steve,
This seems to be a good alternative. I've found pdflib($), ezPDF (dead?) e
this fpdf as different ways to generate pdf.
One drawback is that I'd have to construct all my documents 'by hand'. For
trully dynamic this is no problem but for those that only differs at the
name of the client that would represent too much work for a little gain.
After some research it seems that there is a tool called docbook that allows
me to convert it's format (a XML based?) into a lot of things, PDF included.
Well, I have two ways now:
- use a pdf library for those dynamic reports
- convert my word documents into docbook (using an editor), put some
placeholders and using PHP to replace the placeholders with actual data
(such as name, price) and call docbook to generate the pdf.
- rm
On 3/14/06, Steve Brown <sbrown25
gmail.com> wrote:
>
> > I am currently migrating an application originally written with Delphi
> to
> > PHP. Everything is going fine except the printing of the reports that
> does
> > not produce the same visual result (i.e does not look the same or has
> some
> > aligmment issues).
>
> We generate all of our printed reports using FPDF
> (http://www.fpdf.org) to generate PDF files. Its very flexible, can
> do must of what you are aksing for, and unlike some alternatives, its
> free. PDFs are going to be the easiest way to get total control of
> the output.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
It would be fantastic if PHP 6 was multi-threaded so you could spin threads
to do simultaneous tasks. Is there any plans for this?
It would also be great if you could exec() or system() a program to run
without blocking on a return. Sometimes I just want some other task to
happen independantly without waiting (for example, call a program that *IS*
threaded).
Many other languages including JAVA, Perl, Python and Ruby are all
multi-threaded, and it's a continuing source of frustration that PHP isn't.
D.Vin
attached mail follows:
Hi,
I am slowly converting my webapps to use the 'ajax' technology. I'd like to
know what 'best practices' should I use when it comes to authenticate,
identify the requests in a more restricted context.
So far I've migrated some 'open' areas where the user, without having to
identify himself can perform searches. But I need to allow/deny him to do
insert/delete/update actions.
In the traditional webapp I'd create a login page where the user. password
would be checked against a database and a session variable would be set with
a authenticate code. Further access to restricted pages are allowed/denied
based on the existance of this authenticate code.
What would be a good alternative in my ajax-enabled webapp? I cant use
session in my php scripts (those called by the XMLHttpRequest.open) right?
attached mail follows:
On Mon, 2006-03-20 at 20:24, robert mena wrote:
> Hi,
>
> I am slowly converting my webapps to use the 'ajax' technology. I'd like to
> know what 'best practices' should I use when it comes to authenticate,
> identify the requests in a more restricted context.
>
> So far I've migrated some 'open' areas where the user, without having to
> identify himself can perform searches. But I need to allow/deny him to do
> insert/delete/update actions.
>
> In the traditional webapp I'd create a login page where the user. password
> would be checked against a database and a session variable would be set with
> a authenticate code. Further access to restricted pages are allowed/denied
> based on the existance of this authenticate code.
>
> What would be a good alternative in my ajax-enabled webapp? I cant use
> session in my php scripts (those called by the XMLHttpRequest.open) right?
Sure you can.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
> I am slowly converting my webapps to use the 'ajax' technology. I'd like to
> know what 'best practices' should I use when it comes to authenticate,
> identify the requests in a more restricted context.
>
> So far I've migrated some 'open' areas where the user, without having to
> identify himself can perform searches. But I need to allow/deny him to do
> insert/delete/update actions.
>
> In the traditional webapp I'd create a login page where the user. password
> would be checked against a database and a session variable would be set with
> a authenticate code. Further access to restricted pages are allowed/denied
> based on the existance of this authenticate code.
>
> What would be a good alternative in my ajax-enabled webapp? I cant use
> session in my php scripts (those called by the XMLHttpRequest.open) right?
Why not? Not that I've tried it, but your browser is going to be making
the call and I would imagine it would send along any cookies it has just
like it normally does...
Try it and see if it sends the session cookie along...
-philip
attached mail follows:
Hi,
Perl has a function named caller with the following signature and return
values:
($package, $filename, $line, $subroutine,
$hasargs, $wantarray, $evaltext, $is_require) = caller($i);
This function returns information pertaining to the calling routine,
such as the name of the function and package that called this function.
Is there such a function for PHP?
Please let me know.
thanks,
sgs.
attached mail follows:
sgsweb wrote:
> Hi,
>
> Perl has a function named caller with the following signature and return
> values:
>
> ($package, $filename, $line, $subroutine,
> $hasargs, $wantarray, $evaltext, $is_require) = caller($i);
>
> This function returns information pertaining to the calling routine,
> such as the name of the function and package that called this function.
> Is there such a function for PHP?
debug_backtrace returns an array of how the function got called (ie the
complete path that was taken from the start to get to this function).
http://www.php.net/debug_backtrace
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
Hi, I was wondering if anyone knew how to retrieve large amounts of
binary data from a MySQL database without having it loaded all at once
into a PHP data structure. I'd like to be able to iterate over the
result, pulling out 16kb or so of data at a time and feed it to the
browser. Any suggestions?
Thanks,
Mike
attached mail follows:
Michael Thomsen wrote:
> Hi, I was wondering if anyone knew how to retrieve large amounts of
> binary data from a MySQL database without having it loaded all at once
> into a PHP data structure. I'd like to be able to iterate over the
> result, pulling out 16kb or so of data at a time and feed it to the
> browser. Any suggestions?
>
> Thanks,
>
> Mike
With the SUBSTRING function of MySQL.
This question belongs more to a MySQL mailing List.
And read the manuals!
Took me 5 secs to find that function.
Be glad that somone is in a good mood to help such a lazy guy like you.
Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
attached mail follows:
This is a kind business letter,if bothered you,pls send your email to us,we will sure cancled your email address from our email list.
www.loveinfashion.com
email and msn: loveinfashion
126.com
QQ:158336954
www.loveinfashion.com
MSN:loveinfashion
126.com
qq:158336954
Nike Dunk Shoes in Stock
size;41-46
350 pairs
attached mail follows:
2006-03-21 13:10:27 wrote:
> This is a kind business letter,if bothered you,pls send your email to us,we will sure cancled your email address from our email list.
How stupid are you?
You are Posting to a MAILING LIST, idiot ...
>
> www.loveinfashion.com
> email and msn: loveinfashion
126.com
> QQ:158336954
>
> www.loveinfashion.com
> MSN:loveinfashion
126.com
> qq:158336954
> Nike Dunk Shoes in Stock
> size;41-46
> 350 pairs
You don't give up, don't ya?
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
attached mail follows:
is there a guide for pda friendly web pages.
attached mail follows:
Rick Lim wrote:
> is there a guide for pda friendly web pages.
Yeah there is one.
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
attached mail follows:
> Rick Lim wrote:
>> is there a guide for pda friendly web pages.
> Yeah there is one.
lol, would you like to tell us where its located please?
>
> --
> Smileys rule (cX.x)C --o(^_^o)
> Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi,
I have been searching for directions of how to get PEAR::SOAP to work on my
Windows Machine, but without success. I have downloaded the package and
unzipped it to a subfolder to my main web folder.
This is my error message:
----------------------
Warning: main(HTTP/Request.php): failed to open stream: No such file or
directory in C:\Documents and Settings\Peter Lauri\My Documents\DWS
Asia\webserver\xl\SOAP\WSDL.php on line 27
Fatal error: main(): Failed opening required 'HTTP/Request.php'
(include_path='.;C:\php4\PEAR\pear') in C:\Documents and Settings\Peter
Lauri\My Documents\DWS Asia\webserver\xl\SOAP\WSDL.php on line 27
----------------------
However, when I make a search for the file Request.php in my file system, I
can not find it.
Have I missed any step in the installation procedure? Maybe some other
package that I need to install before?
Best regards,
Peter Lauri
attached mail follows:
Peter Lauri said:
> Hi,
>
> I have been searching for directions of how to get PEAR::SOAP to work on
> my
> Windows Machine, but without success. I have downloaded the package and
> unzipped it to a subfolder to my main web folder.
>
> This is my error message:
>
> ----------------------
> Warning: main(HTTP/Request.php): failed to open stream: No such file or
> directory in C:\Documents and Settings\Peter Lauri\My Documents\DWS
> Asia\webserver\xl\SOAP\WSDL.php on line 27
>
> Fatal error: main(): Failed opening required 'HTTP/Request.php'
> (include_path='.;C:\php4\PEAR\pear') in C:\Documents and Settings\Peter
> Lauri\My Documents\DWS Asia\webserver\xl\SOAP\WSDL.php on line 27
> ----------------------
>
> However, when I make a search for the file Request.php in my file system,
> I
> can not find it.
>
> Have I missed any step in the installation procedure? Maybe some other
> package that I need to install before?
>
> Best regards,
> Peter Lauri
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
For PEAR::SOAP to function properly you have to install some more PEAR
packages. PEAR::SOAP is dependend on the following packages as i remember.
HTTP
HTTP_Request
Net_Socket
Net_URL
And needs some of the following also:
Mail_Mime
Net_DIME
Hope it helps..
attached mail follows:
I'm working on a small webservice. When started this project i used the
NuSOAP library. And it does the job perfectly. But last weekend i was
playing around with the PEAR::SOAP package. This seems to be a lot more
stable. And for sure a llot faster.
Only in NuSOAP i could do the following to get to a secured page.
$client->setCredentials(USERNAME, PASSWORD, AUTHTYPE);
Now i wanna do the same in PEAR::SOAP but can't figure out a way to do it.
Main is i just want Basic HTTP authentication. Maybe somebody knows?
grtz,
Thijs
attached mail follows:
On 3/21/06, T.Lensselink <admin
ensifex.nl> wrote:
> I'm working on a small webservice. When started this project i used the
> NuSOAP library. And it does the job perfectly. But last weekend i was
> playing around with the PEAR::SOAP package. This seems to be a lot more
> stable. And for sure a llot faster.
>
> Only in NuSOAP i could do the following to get to a secured page.
>
> $client->setCredentials(USERNAME, PASSWORD, AUTHTYPE);
>
> Now i wanna do the same in PEAR::SOAP but can't figure out a way to do it.
> Main is i just want Basic HTTP authentication. Maybe somebody knows?
You might get a faster response on the pear list:
http://pear.php.net/support/lists.php
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
chris smith said:
> On 3/21/06, T.Lensselink <admin
ensifex.nl> wrote:
>> I'm working on a small webservice. When started this project i used the
>> NuSOAP library. And it does the job perfectly. But last weekend i was
>> playing around with the PEAR::SOAP package. This seems to be a lot more
>> stable. And for sure a llot faster.
>>
>> Only in NuSOAP i could do the following to get to a secured page.
>>
>> $client->setCredentials(USERNAME, PASSWORD, AUTHTYPE);
>>
>> Now i wanna do the same in PEAR::SOAP but can't figure out a way to do
>> it.
>> Main is i just want Basic HTTP authentication. Maybe somebody knows?
>
> You might get a faster response on the pear list:
>
> http://pear.php.net/support/lists.php
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
Yes after i posted was thinking the same... Still to early :)
Thnx anyway!
attached mail follows:
Hi,
I have installed the NuSoap and it works fine with small tests using HTTP.
My real application needs to connect via HTTPS, and it does not work. It
returns error that I need CURL or OpenSSL for it to work with HTTPS.
I am not an expert in configuring PHP, I always get stuck. The website
www.openssl.org just makes me more confused.
Any suggestions for someone who have very little php admin skills?
Best regards,
Peter Lauri
attached mail follows:
On 3/21/06, Peter Lauri <peter
lauri.se> wrote:
> Hi,
>
> I have installed the NuSoap and it works fine with small tests using HTTP.
> My real application needs to connect via HTTPS, and it does not work. It
> returns error that I need CURL or OpenSSL for it to work with HTTPS.
>
> I am not an expert in configuring PHP, I always get stuck. The website
> www.openssl.org just makes me more confused.
>
> Any suggestions for someone who have very little php admin skills?
What exactly is the error message?
--
Postgresql & php tutorials
http://www.designmagick.com/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]