php-windows Digest 12 Feb 2007 02:04:02 -0000 Issue 3138
Topics (messages 27480 through 27488):
Thank you all!
27480 by: Gustav Wiberg
PHP rendering
27481 by: Harpreet
27482 by: Phillip Terry
27483 by: Jarrett Meyer
unsc
27484 by: Gevorg Harutunyan
Question re. PHP/HTML-generated French characters.
27485 by: Trev d
27486 by: Niel Archer
27488 by: bedul
Re: SSL on Windows Server 2003
27487 by: Vandegrift, Ken
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi there!
Thanx for all responses that you see it. I hade som issues with my email, but
it seemed to be solved. Thanx all! (Now I don't need anymore responses :-))
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
I have a sql query which takes like 6 seconds to return results when run
in query analyzer but when used via a php webpage to display in a report
it take over 15 seconds.
What can be the reason for the page to take so long to return results.
Any help is appreciated.
Thanks
Harpreet Kaur
--- End Message ---
--- Begin Message ---
If the query analyzer runs directly on the server, it would probably be
faster than the extra steps required by php to query for and render out the
data through a browser, especially if its on a shared server, but 9 seconds
of difference does seem like a lot.
----- Original Message -----
From: "Harpreet" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 09, 2007 9:27 AM
Subject: [PHP-WIN] PHP rendering
I have a sql query which takes like 6 seconds to return results when run
in query analyzer but when used via a php webpage to display in a report
it take over 15 seconds.
What can be the reason for the page to take so long to return results.
Any help is appreciated.
Thanks
Harpreet Kaur
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You may want to try a few things.
(1) All queries are run inside functions. I don't do any work inside
(2) These functions are always called from a wrapper function, which includes
reporting the time to run just the query.
GetOrderNumber(MyOrderNumber, &$DS_Order)
{
global $QueryTimers;
$QueryStartTimer = microtime();
$Sql = "SELECT **** FROM orders WHERE OrderNumber = " . MyOrderNumber;
$Result = mysql_query( $Sql );
$QueryEndTimer = microtime();
$QueryTimers[] = $QueryEndTimer - $QueryStartTimer;
// check for and handle errors gracefully
// return false if there are any problems
// return true if successful
}
output code
.... $QueryTimers = array();
.... code here ....
.... GetOrderNumber(MyOrderNumber);
.... more code ....
Then, at the bottom of my pages, in a footer file, I have output along the
lines of "total query time = 0.15s (2 queries) // total page loading = 3.21s".
This helps me know efficient my pages are. This will give you an idea of what
is taking so long.
My work is all on a company intranet, so I don't have a problem with displaying
these values. Your mileage may vary.
As far as getting queries to run faster...
(a) I have found that it can be much faster to have multiple queries instead of
overly complicated joins. Although not too bad with inner joins, your left,
right, and Cartesian joins can be big resource hogs.
(b) Look at your selection criteria. You want to put the selection criteria
that will eliminate the most data first in the WHERE clause.
(c) Avoid using "SELECT *...". Your queries will be faster if you select the
specific columns that you want, even if you want all columns in a particular
table.
Thank you,
Jarrett
No trees were harmed during this transmission; however, several electrons were
terribly inconvenienced.
----- Original Message ----
From: Harpreet <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, February 9, 2007 10:27:31 AM
Subject: [PHP-WIN] PHP rendering
I have a sql query which takes like 6 seconds to return results when run
in query analyzer but when used via a php webpage to display in a report
it take over 15 seconds.
What can be the reason for the page to take so long to return results.
Any help is appreciated.
Thanks
Harpreet Kaur
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
/php-windows-/unsubscribe-/[EMAIL PROTECTED]/
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--- End Message ---
--- Begin Message ---
This is to ask a (possibly rudimentary) question re. specifying French
language characters to be displayed on an HTML page generated from PHP. In
this case, the browser does not show the Français chars. (accents etc.)
properly. Possibly one of those ultimately straightforward (yet
personally-elusive) issues to resolve.
Does anyone in the PHP community have any experience with specifying support
for extended charsets on HTML-generated pages from PHP - or can suggest a
link to a site where this is documented? If so, I would appreciate some
direction with it. Thanks very much in anticipation of your time and
response.
Have a nice day.
Regards,
Trev
_________________________________________________________________
Buy what you want when you want it on Sympatico / MSN Shopping
http://shopping.sympatico.msn.ca/content/shp/?ctId=2,ptnrid=176,ptnrdata=081805
--- End Message ---
--- Begin Message ---
Hi
> This is to ask a (possibly rudimentary) question re. specifying French
> language characters to be displayed on an HTML page generated from PHP. In
> this case, the browser does not show the Français chars. (accents etc.)
> properly. Possibly one of those ultimately straightforward (yet
> personally-elusive) issues to resolve.
>
> Does anyone in the PHP community have any experience with specifying support
> for extended charsets on HTML-generated pages from PHP - or can suggest a
> link to a site where this is documented? If so, I would appreciate some
> direction with it. Thanks very much in anticipation of your time and
> response.
This may involve several steps. Firstly, what encoding are the html
pages sent as? If that encoding is not capable of showing the
characters, then obviously they will not be shown. In general I would
use UTF-8 encoding for all pages, considering the international nature
of the web, this allows for any characters you might want to show.
Another method is to output all of your text using htmlentities() to
convert characters into their entity form (e.g. & for ampersand,
á for a with acute accent, etc.)
You can combine both methods also.
Further information on this is in the PHP documentation.
Niel
--- End Message ---
--- Begin Message ---
i'm just add the niel
don't forget for the HTML header.
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"
lang="fr"
/>
this header are self explain..
i mean here.. this tag mean to explain about the html/page u write..
there was some browser.. which can't read the entities correctly (named OLD
browser one). with this.. the browser might know the write/the font u use
sry.. for my languages
cmiiw..
----- Original Message -----
From: "Niel Archer" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, February 10, 2007 1:10 AM
Subject: Re: [PHP-WIN] Question re. PHP/HTML-generated French characters.
Hi
> This is to ask a (possibly rudimentary) question re. specifying French
> language characters to be displayed on an HTML page generated from PHP.
In
> this case, the browser does not show the Français chars. (accents etc.)
> properly. Possibly one of those ultimately straightforward (yet
> personally-elusive) issues to resolve.
>
> Does anyone in the PHP community have any experience with specifying
support
> for extended charsets on HTML-generated pages from PHP - or can suggest a
> link to a site where this is documented? If so, I would appreciate some
> direction with it. Thanks very much in anticipation of your time and
> response.
This may involve several steps. Firstly, what encoding are the html
pages sent as? If that encoding is not capable of showing the
characters, then obviously they will not be shown. In general I would
use UTF-8 encoding for all pages, considering the international nature
of the web, this allows for any characters you might want to show.
Another method is to output all of your text using htmlentities() to
convert characters into their entity form (e.g. & for ampersand,
á for a with acute accent, etc.)
You can combine both methods also.
Further information on this is in the PHP documentation.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have a better understanding of the SSL process, however, I still have
an issue communicating with the VeriSign Payflow Pro gateway.
Am I correct in the fact that I need to tell OpenSSL what certificate to
use when sending payment requests to VeriSign?
If so, what is the proper way to do this?
Below is the command being used by X-Cart shopping cart software via the
exec() function:
C:\OpenSSL\bin\openssl.exe s_client -connect
test-payflow.verisign.com:443 < C:\path\to\xct15.tmp
2>C:\path\to\xct16.tmp
I keep getting the message "no client certificate CA names sent"
Do I need to somehow associate the payflow certificate <hash>.0 with
this?
Thanks in advance for your help and time.
Ken Vandegrift
[EMAIL PROTECTED]
Web Administrator
Sharis Mgmt. Corp
-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 07, 2007 9:09 AM
To: Vandegrift, Ken
Cc: [email protected]
Subject: Re: [PHP-WIN] SSL on Windows Server 2003
> Good Day To All,
>
> System Config:
> Windows Server 2003
> PHP 5.2
>
> I'm hoping someone can help give me a high level understanding between
> the differences between an SSL certificate installed on my webserver
and
> an SSL module (e.g. OpenSSL) installed on my web server.
>
> 1. My current understanding is that the SSL certificate installed on
> my webserver will encrypt data coming from and going to a client web
> browser if the protocol is HTTPS. So, if on a checkout form at my web
> store the url begins with https, then credit card info, etc. will be
> encrypted and considered safe from sniffers, etc. Is this correct?
Correct, or at least more safe than non encrypted connections.
>
> 2. I become fuzzy then for the need or proper use of an SSL module
> (let's just go with OpenSSL). Specifically, my current webstore has
> VeriSign's Payflow Pro API installed on the webserver, and I have
> written a class that sends payment requests to VeriSign by using the
> Payflow Pro as a COM object. However, this is very slow (taking 30
> seconds per transaction). Recently my company purchased X-Cart
Shopping
> cart software and I am trying to get this configured to use our
> Payflow Pro account using XMLPay. However, I keep getting an error
> that no SSL module could be located for secure transactions. So, why
> do I need an SSL module if I am submitting transaction data to an
HTTPS url?
In this case php becomes the client and it needs to know how to encrypt
data send to the gateway (the server) and how to decrypt the data
comming back. This is where OpenSSL comes into play. If you can load the
extension called php_openssl.dll, it requires libeay32.dll and
ssleay32.dll you should be able to communicate with SSL encryptions. You
might want to take a look at the cURL extension as well. It'll do all
the encryption and decryption for you on each request.
- Frank
--- End Message ---