php-general Digest 6 Apr 2010 14:09:59 -0000 Issue 6678
2010/4/6 Karl DeSaulniers k...@designdrumm.com Is there a way to set up a no-cache control in your php.ini file or some config file? Sorry if this is a newb question. Put it in the header: header(Cache-Control: no-cache, must-revalidate); Remember headers must be the first output you do, read more here. http://dk.php.net/manual/en/function.header.php -- Kind regards Kim Emax ---End Message--- ---BeginMessage--- Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Karl DeSaulniers wrote: Hello List, I am hoping this will be a quick and easy for someone to help me with. I am trying to create an upload form that lets a user upload a product photo to the server. In the process of this upload, I want to take the file they are uploading and create two images to put on the server. Both are specific sizes. A large image and a thumbnail. I then want to throw away the file they uploaded. My question is what is the proper way to do the uploading/resizing/ destroying? I have been toying with imagecopyresize, but it never works. I think I just have parameters out of order or something. Also, I would like to put a copyright on the side. I have been able to use imagestringup to do that, but it covers the image im placing it on with a transparent background and deletes the image. How do you duplicate an image with transparency? Or keep the transparency an image already has? Most grateful for any help, pointers, tuts. Best, Karl DeSaulniers Design Drumm http://designdrumm.com __ Information from ESET NOD32 Antivirus, version of virus signature database 5002 (20100405) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com image.upload.phpnadim.vcf Karl DeSaulniers Design Drumm http://designdrumm.com ---End Message--- ---BeginMessage--- -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Tuesday, April 06, 2010 10:39 AM To: na...@alienworkers.com Cc: php-gene...@lists.php.net Subject: [PHP] Re: imagecopyresize Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Hello Nadim, would you mind sharing this script with me / us, too? I'd love to have a look at it, if you don't mind :o) All the best Chris ---End Message--- ---BeginMessage--- Hello Chris, Here's a link: http://pages.intnet.mu/nadim/php/image.upload.txt The code is minimal. Things I would like to add: - resize transparent gifs - resize animated gifs Time doesn't permit me, unfortunately :-( Regards, Nadim Attari - Auto-Deppe C. Hänsel wrote: -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Tuesday, April 06, 2010 10:39 AM Subject: [PHP] Re: imagecopyresize Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Hello Nadim, would you mind sharing this script with me / us, too? I'd love to have a look at it, if you don't mind :o) All the best Chris __ Information from ESET NOD32 Antivirus, version of virus signature database 5003 (20100406) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ---End Message--- ---BeginMessage--- Hi: Here's my code for doing watermarks: http://webbytedd.com/b/watermark/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com
php-general Digest 7 Apr 2010 02:44:12 -0000 Issue 6679
php-general Digest 7 Apr 2010 02:44:12 - Issue 6679 Topics (messages 303858 through 303863): Re: $_SERVER['PHP_AUTH_USER'] has gone 303858 by: Satz Klauer 303862 by: Nilesh Govindarajan Re: Logical reason for strtotime('east') and strtotime('west') returning valid results? 303859 by: Colin Guthrie mysql query returning slowly 303860 by: David Murphy 303861 by: Nathan Rixham image question again 303863 by: Karl DeSaulniers Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- var_dump($_SERVER) gives me several data, the following arrayindices contain data: HTTPS, SSL_TLS_SNI, HTTP_USER_AGENT, HTTP_HOST, HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_REFERER, HTTP_COOKIE, HTTP_COOKIE2, HTTP_CONNECTION, HTTP_TE, PATH, SERVER_SIGNATURE, SERVER_SOFTWARE, SERVER_NAME, SERVER_ADDR, SERVER_PORT, REMOTE_HOST, REMOTE_ADDR, DOCUMENT_ROOT, SERVER_ADMIN, SCRIPT_FILENAME, REMOTE_PORT, GATEWAY_INTERFACE = string(7) CGI/1.1 (??? it is running as apache-module ???, SERVER_PROTOCOL, REQUEST_METHOD, QUERY_STRING, REQUEST_URI, SCRIPT_NAME, PHP_SELF, REQUEST_TIME Unfortunately not Auth-data. var_dump($_ENV) tells me (partially anonymised): [HOSTNAME]= string(24) xxx.yyy.de [TERM]= string(5) xterm [SHELL]= string(9) /bin/bash [HISTSIZE]= string(4) 1000 [QTDIR]= string(15) /usr/lib/qt-3.3 [QTINC]= string(23) /usr/lib/qt-3.3/include [USER]= string(4) root [LS_COLORS]= string(1268) rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: [MC_TMPDIR]= string(12) /tmp/mc-root [PATH]= string(29) /sbin:/usr/sbin:/bin:/usr/bin [MAIL]= string(20) /var/spool/mail/root [PWD]= string(17) /etc/xxx/yyy [LANG]= string(1) C [HISTCONTROL]= string(11) ignorespace [HOME]= string(5) /root [SHLVL]= string(1) 4 [MC_SID]= string(5) 25229 [LOGNAME]= string(4) root [CVS_RSH]= string(3) ssh [QTLIB]= string(19) /usr/lib/qt-3.3/lib [LESSOPEN]= string(24) |/usr/bin/lesspipe.sh %s [G_BROKEN_FILENAMES]= string(1) 1 [_]= string(15) /usr/sbin/httpd On Sun, Apr 4, 2010 at 10:54 PM, Daniel P. Brown daniel.br...@parasane.netwrote: Sorry for the top-post. Easter has me on the DROID instead of my PC. I second Rixham's thought. Is it a DSO, CGI, FCGI? What pops out in var_dump($_SERVER) and var_dump($_ENV)? On Apr 4, 2010 3:49 PM, Nathan Rixham nrix...@gmail.com wrote: Satz Klauer wrote: Hi, I'm running a system with Fedora 12 and Apache/PHP default installatio... just a quick sanity check; you do have the specific site/directory set up to send and receive basic auth yeah? sounds very much to me like this is an apache config issue and not php :) regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub ---End Message--- ---BeginMessage--- On 04/06/10 21:27, Satz Klauer wrote: var_dump($_SERVER) gives me several data, the following arrayindices contain data: HTTPS, SSL_TLS_SNI, HTTP_USER_AGENT, HTTP_HOST, HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_REFERER, HTTP_COOKIE, HTTP_COOKIE2, HTTP_CONNECTION, HTTP_TE, PATH, SERVER_SIGNATURE, SERVER_SOFTWARE, SERVER_NAME, SERVER_ADDR, SERVER_PORT, REMOTE_HOST, REMOTE_ADDR, DOCUMENT_ROOT, SERVER_ADMIN, SCRIPT_FILENAME, REMOTE_PORT, GATEWAY_INTERFACE = string(7) CGI/1.1 (??? it is running as apache-module ???, SERVER_PROTOCOL, REQUEST_METHOD, QUERY_STRING, REQUEST_URI, SCRIPT_NAME, PHP_SELF, REQUEST_TIME Unfortunately not
[PHP] Re: imagecopyresize
Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Karl DeSaulniers wrote: Hello List, I am hoping this will be a quick and easy for someone to help me with. I am trying to create an upload form that lets a user upload a product photo to the server. In the process of this upload, I want to take the file they are uploading and create two images to put on the server. Both are specific sizes. A large image and a thumbnail. I then want to throw away the file they uploaded. My question is what is the proper way to do the uploading/resizing/ destroying? I have been toying with imagecopyresize, but it never works. I think I just have parameters out of order or something. Also, I would like to put a copyright on the side. I have been able to use imagestringup to do that, but it covers the image im placing it on with a transparent background and deletes the image. How do you duplicate an image with transparency? Or keep the transparency an image already has? Most grateful for any help, pointers, tuts. Best, Karl DeSaulniers Design Drumm http://designdrumm.com __ Information from ESET NOD32 Antivirus, version of virus signature database 5002 (20100405) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com image.upload.phpnadim.vcf Karl DeSaulniers Design Drumm http://designdrumm.com
[PHP] Re: problems with utf-8 conversion
I found lot of poeple having matters with chars over 1 byte, so I've published that : http://www.phpcs.com/codes/ENCODAGE-UTF16_51501.aspx If you take a look, give me a feedback please (to a...@apieum.com) regards, greg Le 05/04/2010 17:08, sudhir patil a écrit : Thanks Nathan, i tried with utf8_encode, that doesn't help. Yes both content-type metatag are set to utf-8. When i try utf-8 converted csv everything shows up properly. Issue is when i try to change encoding in php, special characters are messed up. Character that i am facing problem with is ’ #8217; rsquo; right single quotation mark Thanks, Sudhir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: imagecopyresize
-Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Tuesday, April 06, 2010 10:39 AM To: na...@alienworkers.com Cc: php-general@lists.php.net Subject: [PHP] Re: imagecopyresize Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Hello Nadim, would you mind sharing this script with me / us, too? I'd love to have a look at it, if you don't mind :o) All the best Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: imagecopyresize
Hello Chris, Here's a link: http://pages.intnet.mu/nadim/php/image.upload.txt The code is minimal. Things I would like to add: - resize transparent gifs - resize animated gifs Time doesn't permit me, unfortunately :-( Regards, Nadim Attari - Auto-Deppe C. Hänsel wrote: -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Tuesday, April 06, 2010 10:39 AM Subject: [PHP] Re: imagecopyresize Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Hello Nadim, would you mind sharing this script with me / us, too? I'd love to have a look at it, if you don't mind :o) All the best Chris __ Information from ESET NOD32 Antivirus, version of virus signature database 5003 (20100406) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no-cache control
Hi Karl 2010/4/6 Karl DeSaulniers k...@designdrumm.com Is there a way to set up a no-cache control in your php.ini file or some config file? Sorry if this is a newb question. Put it in the header: header(Cache-Control: no-cache, must-revalidate); Remember headers must be the first output you do, read more here. http://dk.php.net/manual/en/function.header.php -- Kind regards Kim Emax
Re: [PHP] Re: imagecopyresize
Hi: Here's my code for doing watermarks: http://webbytedd.com/b/watermark/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Updating HTML on page
At 8:12 PM -0600 4/5/10, Ashley M. Kirchner wrote: I have a PHP script that queries a DB to get a list of image names. Then it processes each name and generate thumbnails and what not. What I want to do is have a page called (through the browser) which updates as the PHP process in the background is working. So when you first pull up the page it will say 'There are x images to process' and then dynamically update the page with a progress status. In its crudest form it should say something like 'Processing 1 of 5 images .' When that image is done, it should update the page with 2 of 5 . etc., etc. Ideally without refreshing the page each time. Is this where I need to figure out Ajax and incorporate it with PHP? Exactly. Here's an example: http://webbytedd.com/b/timed-php/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $_SERVER['PHP_AUTH_USER'] has gone
var_dump($_SERVER) gives me several data, the following arrayindices contain data: HTTPS, SSL_TLS_SNI, HTTP_USER_AGENT, HTTP_HOST, HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_REFERER, HTTP_COOKIE, HTTP_COOKIE2, HTTP_CONNECTION, HTTP_TE, PATH, SERVER_SIGNATURE, SERVER_SOFTWARE, SERVER_NAME, SERVER_ADDR, SERVER_PORT, REMOTE_HOST, REMOTE_ADDR, DOCUMENT_ROOT, SERVER_ADMIN, SCRIPT_FILENAME, REMOTE_PORT, GATEWAY_INTERFACE = string(7) CGI/1.1 (??? it is running as apache-module ???, SERVER_PROTOCOL, REQUEST_METHOD, QUERY_STRING, REQUEST_URI, SCRIPT_NAME, PHP_SELF, REQUEST_TIME Unfortunately not Auth-data. var_dump($_ENV) tells me (partially anonymised): [HOSTNAME]= string(24) xxx.yyy.de [TERM]= string(5) xterm [SHELL]= string(9) /bin/bash [HISTSIZE]= string(4) 1000 [QTDIR]= string(15) /usr/lib/qt-3.3 [QTINC]= string(23) /usr/lib/qt-3.3/include [USER]= string(4) root [LS_COLORS]= string(1268) rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: [MC_TMPDIR]= string(12) /tmp/mc-root [PATH]= string(29) /sbin:/usr/sbin:/bin:/usr/bin [MAIL]= string(20) /var/spool/mail/root [PWD]= string(17) /etc/xxx/yyy [LANG]= string(1) C [HISTCONTROL]= string(11) ignorespace [HOME]= string(5) /root [SHLVL]= string(1) 4 [MC_SID]= string(5) 25229 [LOGNAME]= string(4) root [CVS_RSH]= string(3) ssh [QTLIB]= string(19) /usr/lib/qt-3.3/lib [LESSOPEN]= string(24) |/usr/bin/lesspipe.sh %s [G_BROKEN_FILENAMES]= string(1) 1 [_]= string(15) /usr/sbin/httpd On Sun, Apr 4, 2010 at 10:54 PM, Daniel P. Brown daniel.br...@parasane.netwrote: Sorry for the top-post. Easter has me on the DROID instead of my PC. I second Rixham's thought. Is it a DSO, CGI, FCGI? What pops out in var_dump($_SERVER) and var_dump($_ENV)? On Apr 4, 2010 3:49 PM, Nathan Rixham nrix...@gmail.com wrote: Satz Klauer wrote: Hi, I'm running a system with Fedora 12 and Apache/PHP default installatio... just a quick sanity check; you do have the specific site/directory set up to send and receive basic auth yeah? sounds very much to me like this is an apache config issue and not php :) regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub
[PHP] Re: Logical reason for strtotime('east') and strtotime('west') returning valid results?
'Twas brillig, and Kevin Kinsey at 05/04/10 19:15 did gyre and gimble: Nonetheless, I'm suspecting the programmers had something like this in mind. Yeah I guess that's why it interprets these terms. Good thinking :) Isn't strtotime() based on some GNU utility? Yeah, that's why I said the relevant authorities. I couldn't remember off-hand where it came from so figured I'd not blame PHP just yet :p Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql query returning slowly
This is from our application I enabled profile in mysql to determine why an update took 20seconds. As you can see MySQL reported no where near that amount of duration took place. Is there any way I can dig into php and determine why mysql client libs are so slow (this is not using mysqlnd but mysql-client-libs on CentOS using 5.3.2) 04/06/2010 14:54:54 20.6899s UPDATE `calls` SET `Result`='Busy' WHERE `CallID`='144786' | Status | Duration | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Block_ops_in | Block_ops_out | Messages_sent | Messages_received | Page_faults_major | Page_faults_minor | Swaps | -- | starting | 0.39 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | checking permissions | 0.08 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | Opening tables | 0.10 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | System lock | 0.05 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | Table lock | 0.06 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | init | 0.36 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | Updating | 0.99 | 0.001000 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | end | 0.23 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | query end| 0.04 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | freeing items| 0.007410 | 0.00 | 0.00 | 4 | 1 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | logging slow query | 0.04 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | | cleaning up | 0.04 | 0.00 | 0.00 | 0 | 0 | 0| 0 | 0 | 0 | 0 | 0 | 0 | Thanks David Murphy
[PHP] Re: mysql query returning slowly
David Murphy wrote: This is from our application I enabled profile in mysql to determine why an update took 20seconds. As you can see MySQL reported no where near that amount of duration took place. Is there any way I can dig into php and determine why mysql client libs are so slow (this is not using mysqlnd but mysql-client-libs on CentOS using 5.3.2) 04/06/2010 14:54:54 20.6899s maybe it was waiting to acquire a lock -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $_SERVER['PHP_AUTH_USER'] has gone
On 04/06/10 21:27, Satz Klauer wrote: var_dump($_SERVER) gives me several data, the following arrayindices contain data: HTTPS, SSL_TLS_SNI, HTTP_USER_AGENT, HTTP_HOST, HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_REFERER, HTTP_COOKIE, HTTP_COOKIE2, HTTP_CONNECTION, HTTP_TE, PATH, SERVER_SIGNATURE, SERVER_SOFTWARE, SERVER_NAME, SERVER_ADDR, SERVER_PORT, REMOTE_HOST, REMOTE_ADDR, DOCUMENT_ROOT, SERVER_ADMIN, SCRIPT_FILENAME, REMOTE_PORT, GATEWAY_INTERFACE = string(7) CGI/1.1 (??? it is running as apache-module ???, SERVER_PROTOCOL, REQUEST_METHOD, QUERY_STRING, REQUEST_URI, SCRIPT_NAME, PHP_SELF, REQUEST_TIME Unfortunately not Auth-data. var_dump($_ENV) tells me (partially anonymised): [HOSTNAME]= string(24) xxx.yyy.de [TERM]= string(5) xterm [SHELL]= string(9) /bin/bash [HISTSIZE]= string(4) 1000 [QTDIR]= string(15) /usr/lib/qt-3.3 [QTINC]= string(23) /usr/lib/qt-3.3/include [USER]= string(4) root [LS_COLORS]= string(1268) rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01 ;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: [MC_TMPDIR]= string(12) /tmp/mc-root [PATH]= string(29) /sbin:/usr/sbin:/bin:/usr/bin [MAIL]= string(20) /var/spool/mail/root [PWD]= string(17) /etc/xxx/yyy [LANG]= string(1) C [HISTCONTROL]= string(11) ignorespace [HOME]= string(5) /root [SHLVL]= string(1) 4 [MC_SID]= string(5) 25229 [LOGNAME]= string(4) root [CVS_RSH]= string(3) ssh [QTLIB]= string(19) /usr/lib/qt-3.3/lib [LESSOPEN]= string(24) |/usr/bin/lesspipe.sh %s [G_BROKEN_FILENAMES]= string(1) 1 [_]= string(15) /usr/sbin/httpd On Sun, Apr 4, 2010 at 10:54 PM, Daniel P. Brown daniel.br...@parasane.netwrote: Sorry for the top-post. Easter has me on the DROID instead of my PC. I second Rixham's thought. Is it a DSO, CGI, FCGI? What pops out in var_dump($_SERVER) and var_dump($_ENV)? On Apr 4, 2010 3:49 PM, Nathan Rixhamnrix...@gmail.com wrote: Satz Klauer wrote: Hi, I'm running a system with Fedora 12 and Apache/PHP default installatio... just a quick sanity check; you do have the specific site/directory set up to send and receive basic auth yeah? sounds very much to me like this is an apache config issue and not php :) regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub This means that something is wrong with your script or server which is not sending the Auth headers properly. Do you get the auth box in the latest browser, and are you sure that you're using basic and not digest auth ? -- Nilesh Govindarajan Site Server Administrator www.itech7.com मेरा भारत महान ! मम भारत: महत्तम भवतु ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image question again
When I have an imagecreatetruecolor and I create another one and use imagecopymerge, how do I keep the backgrounds transparent even if say the width of the top image is smaller than the back image? I keep getting a black background where the top image does not cover the back. It sets the transparency to the rest of the top image as long as it is covering the bottom one. I think it has to do with the imagealphablending. Any ideas? TIA Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP] SimpleXMLElement occasionally fails to parse gb2312 or big5 feeds
On Fri, Apr 2, 2010 at 10:28 AM, Peter Pei peterpei...@hotmail.com wrote: I use the following code to get rss and parse it, but the code occasionally have issues with gb2312 or big-5 encoded feeds, and fails to parse them. However other times may appear just okay. Any thoughts? Maybe SimpleXMLElement is simply not meant for other language encodings... $page = file_get_contents($rss); try { $feed = new SimpleXMLElement($page); I've been learning a bit about SimpleXML today myself. It seems that it misses a lot of things when it comes to complex, or abnormal XML. Abnormal being what you're describing and whatnot. I don't really have a solid answer for you (Just noticed no one responded), but I think you're running into what I was... Its just built to be Simple, not expand its mind. Hope that helps! -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] Re: Logical reason for strtotime('east') and strtotime('west') returning valid results?
Colin Guthrie wrote: 'Twas brillig, and Kevin Kinsey at 05/04/10 19:15 did gyre and gimble: Nonetheless, I'm suspecting the programmers had something like this in mind. Yeah I guess that's why it interprets these terms. Good thinking :) Isn't strtotime() based on some GNU utility? Yeah, that's why I said the relevant authorities. I couldn't remember off-hand where it came from so figured I'd not blame PHP just yet :p Apparently these strings are being recognized as TZ stamps, but the underlying logic is not fully implemented: see http://www.gnu.org/s/libc/manual/html_node/Low_002dLevel-Time-String-Parsing.html Try it with some TZ stamps ... I'm pretty sure that in the previous example it was taking East to be EST, as I observed (rather by accident) earlier. Kevin Kinsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no-cache control
you can do that by using .htacess in the required directory http://www.askapache.com/htaccess/apache-speed-cache-control.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php