php-general Digest 2 Jan 2007 08:40:58 -0000 Issue 4546
php-general Digest 2 Jan 2007 08:40:58 - Issue 4546 Topics (messages 246321 through 246331): Javascript detection 246321 by: tedd 246322 by: Paul Waring 246323 by: Peter Lauri 246325 by: Jürgen Wind 246326 by: Robert Cummings Re: Writing Binary 246324 by: Roman Neuhauser Re: Basic question - Starting a background task without waiting for its end. 246327 by: Martin Alterisio Re: Javascript detection , working version 246328 by: Jürgen Wind 246329 by: tedd Re: php-general Digest 1 Jan 2007 20:15:42 - Issue 4545 246330 by: Fahad Pervaiz Help me about detect client screen resolution!!! 246331 by: Le Phuoc Canh 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: php-general@lists.php.net -- ---BeginMessage--- Hi gang: I've asked this request on a couple of other list, but considering that I've done this with a mixture of php and javascript, perhaps some of you might check this out for me. Try this: http://sperling.com/js_detect Does this technique work to detect your browser's javascript setting? Also, if you change your browser's javascript setting, please restart your browser before rechecking the link. If this works well enough, I'll post the code. Thanks. tedd PS: I wrote this simply because I couldn't find an acceptable PHP Javascript detection solution. If anyone knows of something better, please let me know. -- --- http://sperling.com http://ancientstones.com http://earthstones.com ---End Message--- ---BeginMessage--- On Mon, 1 Jan 2007 16:14:06 -0500, tedd [EMAIL PROTECTED] wrote: Does this technique work to detect your browser's javascript setting? Not for me, it says Javascript has not been detected on the client. when in fact I've got JavaScript enabled (Firefox 1.5.0.8 on Ubuntu Linux). Paul ---End Message--- ---BeginMessage--- I do have javascript enabled, but it does not detect it... Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Monday, January 01, 2007 11:14 PM To: php-general@lists.php.net Subject: [PHP] Javascript detection Hi gang: I've asked this request on a couple of other list, but considering that I've done this with a mixture of php and javascript, perhaps some of you might check this out for me. Try this: http://sperling.com/js_detect Does this technique work to detect your browser's javascript setting? Also, if you change your browser's javascript setting, please restart your browser before rechecking the link. If this works well enough, I'll post the code. Thanks. tedd PS: I wrote this simply because I couldn't find an acceptable PHP Javascript detection solution. If anyone knows of something better, please let me know. -- --- 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 ---End Message--- ---BeginMessage--- does not work on SeaMonkey and Opera (IE not tested). -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8117266 Sent from the PHP - General mailing list archive at Nabble.com. ---End Message--- ---BeginMessage--- On Mon, 2007-01-01 at 16:14 -0500, tedd wrote: Hi gang: I've asked this request on a couple of other list, but considering that I've done this with a mixture of php and javascript, perhaps some of you might check this out for me. Try this: http://sperling.com/js_detect Does this technique work to detect your browser's javascript setting? Also, if you change your browser's javascript setting, please restart your browser before rechecking the link. If this works well enough, I'll post the code. It doesn't seem to be working for anyone (me neither btw)... why not use a simpler approach? Here's an example that doesn't use a redirect. Due to using the onload mechanism we can be certain that the order of the updates to the session occurs in expected order (if javascript is enabled) which is as we want. Feel free to use as you please... html head script type=text/javascript language=javascript !-- // function onLoadStuff() { if( !document.getElementById ) { // // Screwit... yucky old browser! // return; } var ePhoneHome = document.getElementById( 'phoneHomeForJs' ); if( ePhoneHome ) { ePhoneHome.innerHTML = 'img
[PHP] Help me about detect client screen resolution!!!
Can we use php to detect client screen resolution? Please help me ? Best Regard.
Re: [PHP] Help me about detect client screen resolution!!!
Le Phuoc Canh wrote: Can we use php to detect client screen resolution? Please help me ? No we can't. You need Javascript or another client-side technology for that. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please help me
When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this.
RE: [PHP] Please help me
-- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php HTH Jervin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help me
I am doing that but still not getting any fruitful results. On 1/2/07, zoticaic [EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php HTH Jervin
Re: [PHP] Please help me
Anju Prasad wrote: I am doing that but still not getting any fruitful results. Show us exactly what you're doing. If your mail client is not displaying the email as HTML one of two things is happening. 1) You're not telling it it's an HTML email, or 2) your mail client is ignoring the headers and displaying the raw message. I'm gonna go with the former since hopefully you'd remember if you'd told your mail client to do the latter. -Stut On 1/2/07, zoticaic [EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php HTH Jervin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please help me
1. Try displaying the message first on the browser and see if it renders properly. 2. Try viewing the headers of the actual sent message and check if they are properly transmitted. Sometimes spaces/punctuations or typo errors on header generation wholly disregards our intent on sending HTML type emails. -- Outsource Now | GetAFreelancer http://www.getafreelancer.com/affiliates/shockx/ _ From: Anju Prasad [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:26 PM To: zoticaic Cc: php-general@lists.php.net Subject: Re: [PHP] Please help me I am doing that but still not getting any fruitful results. On 1/2/07, zoticaic [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto: [EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php HTH Jervin
Re: [PHP] Please help me
actually this problem i am getting only when sending mail in gmail, otherwise everywhere its coming correctly and fine On 1/2/07, Anju Prasad [EMAIL PROTECTED] wrote: Headers i am using: $headers = MIME-Version: 1.0*\r\n* Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit *\r\n\r\n*From:$sitename*\r\n* return-path: $from; Message body: $message = 'htmlbodyHi '.$_POST[name1 ].' br'.$message.'pRegards/pp ' . $sitename.' /p/body/html' ; Now tell is there any wrong in this syntax On 1/2/07, Stut [EMAIL PROTECTED] wrote: Anju Prasad wrote: I am doing that but still not getting any fruitful results. Show us exactly what you're doing. If your mail client is not displaying the email as HTML one of two things is happening. 1) You're not telling it it's an HTML email, or 2) your mail client is ignoring the headers and displaying the raw message. I'm gonna go with the former since hopefully you'd remember if you'd told your mail client to do the latter. -Stut On 1/2/07, zoticaic [EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php HTH Jervin
Re: [PHP] Please help me
Please don't reply to me directly. Always include the list in replies. Anju Prasad wrote: Headers i am using: $headers = MIME-Version: 1.0*\r\n* Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit *\r\n\r\n*From:$sitename*\r\n*return-path: $from; Message body: $message = 'htmlbodyHi '.$_POST[name1 ].' br'.$message.'pRegards/pp '. $sitename.' /p/body/html' ; Now tell is there any wrong in this syntax There's something wrong with that syntax. Assuming it's not your mail client wrapping the line above, you have two newlines between the MIME-Version header and the Content-Type header. This will cause the headers after MIME-Version to be ignored. -Stut On 1/2/07, *Stut* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Anju Prasad wrote: I am doing that but still not getting any fruitful results. Show us exactly what you're doing. If your mail client is not displaying the email as HTML one of two things is happening. 1) You're not telling it it's an HTML email, or 2) your mail client is ignoring the headers and displaying the raw message. I'm gonna go with the former since hopefully you'd remember if you'd told your mail client to do the latter. -Stut On 1/2/07, zoticaic [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net mailto:php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php http://www.php.net/manual/en/function.mail.php HTH Jervin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help me
my problem got solved in gmail, but now i am not getting mails any where else... headers now i am using is: $headers = 'MIME-Version: 1.0'.*\n*.'Content-type: text/html;charset=iso-8859-1'.*\n*.'Content-Transfer-Encoding: 8bit'.*\n*.'From:'.$sitename.*\n*.'return-path:'.$from; On 1/2/07, Stut [EMAIL PROTECTED] wrote: Please don't reply to me directly. Always include the list in replies. Anju Prasad wrote: Headers i am using: $headers = MIME-Version: 1.0*\r\n* Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit *\r\n\r\n*From:$sitename*\r\n*return-path: $from; Message body: $message = 'htmlbodyHi '.$_POST[name1 ].' br'.$message.'pRegards/pp '. $sitename.' /p/body/html' ; Now tell is there any wrong in this syntax There's something wrong with that syntax. Assuming it's not your mail client wrapping the line above, you have two newlines between the MIME-Version header and the Content-Type header. This will cause the headers after MIME-Version to be ignored. -Stut On 1/2/07, *Stut* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Anju Prasad wrote: I am doing that but still not getting any fruitful results. Show us exactly what you're doing. If your mail client is not displaying the email as HTML one of two things is happening. 1) You're not telling it it's an HTML email, or 2) your mail client is ignoring the headers and displaying the raw message. I'm gonna go with the former since hopefully you'd remember if you'd told your mail client to do the latter. -Stut On 1/2/07, zoticaic [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net mailto:php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php http://www.php.net/manual/en/function.mail.php HTH Jervin
Re: [PHP] Please help me
use and/or study this nice bit of code (well I like it anyway, Manuel Lemos probably diagrees :-) http://phpmailer.sourceforge.net/ Anju Prasad wrote: my problem got solved in gmail, but now i am not getting mails any where else... headers now i am using is: $headers = 'MIME-Version: 1.0'.*\n*.'Content-type: text/html;charset=iso-8859-1'.*\n*.'Content-Transfer-Encoding: 8bit'.*\n*.'From:'.$sitename.*\n*.'return-path:'.$from; On 1/2/07, Stut [EMAIL PROTECTED] wrote: Please don't reply to me directly. Always include the list in replies. Anju Prasad wrote: Headers i am using: $headers = MIME-Version: 1.0*\r\n* Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit *\r\n\r\n*From:$sitename*\r\n*return-path: $from; Message body: $message = 'htmlbodyHi '.$_POST[name1 ].' br'.$message.'pRegards/pp '. $sitename.' /p/body/html' ; Now tell is there any wrong in this syntax There's something wrong with that syntax. Assuming it's not your mail client wrapping the line above, you have two newlines between the MIME-Version header and the Content-Type header. This will cause the headers after MIME-Version to be ignored. -Stut On 1/2/07, *Stut* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Anju Prasad wrote: I am doing that but still not getting any fruitful results. Show us exactly what you're doing. If your mail client is not displaying the email as HTML one of two things is happening. 1) You're not telling it it's an HTML email, or 2) your mail client is ignoring the headers and displaying the raw message. I'm gonna go with the former since hopefully you'd remember if you'd told your mail client to do the latter. -Stut On 1/2/07, zoticaic [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: -- My Seeding Blog | http://bytes.nullp0inter.com Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/ -Original Message- From: Anju Prasad [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 02, 2007 5:13 PM To: php-general@lists.php.net mailto:php-general@lists.php.net Subject: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. You need to add some headers that should indicate that the type of mail you are sending is an HTML email. Take this link from our friendly manual and see through Example 4 : Sending HTML Emails http://www.php.net/manual/en/function.mail.php http://www.php.net/manual/en/function.mail.php HTH Jervin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help me
# [EMAIL PROTECTED] / 2007-01-02 15:35:26 +0530: my problem got solved in gmail, but now i am not getting mails any where else... headers now i am using is: $headers = 'MIME-Version: 1.0'.*\n*.'Content-type: text/html;charset=iso-8859-1'.*\n*.'Content-Transfer-Encoding: 8bit'.*\n*.'From:'.$sitename.*\n*.'return-path:'.$from; If and when you're interested in doing your job right instead of blindly trying whatever shmuck your /dev/random can generate, read about the email message format at ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Formatting time :/
Hi all, I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? Kind Regards, Steven Macintyre http://steven.macintyre.name -- http://www.friends4friends.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please help me
When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. I use phpmailer for all my email sending ... Never had a problem with it S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Formatting time :/
By this way you´ll display in 24 hours format echo date($date,Hhi); By this way you´ll display in 12 hours format echo date($date,hhi); Hope help. Steven Macintyre [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi all, I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? Kind Regards, Steven Macintyre http://steven.macintyre.name -- http://www.friends4friends.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Formatting time :/
By this way you´ll display in 24 hours format echo date($date,Hhi); By this way you´ll display in 12 hours format echo date($date,hhi); Hope help. Steven Macintyre [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi all, I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? Kind Regards, Steven Macintyre http://steven.macintyre.name -- http://www.friends4friends.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting time :/
Steven Macintyre wrote: I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? http://php.net/date $time = date('H\hi', strtotime('00:00:00')); Or, if the input format is always the same, you could do it like so... $time = str_replace(':', 'h', substr('00:00:00', 0, 5)); -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting time :/
Thanks Stut, Perfect! Kind Regards, Steven Macintyre http://steven.macintyre.name -- http://www.friends4friends.co.za -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: 02 January 2007 02:59 PM To: Steven Macintyre Cc: php-general@lists.php.net Subject: Re: [PHP] Formatting time :/ Steven Macintyre wrote: I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? http://php.net/date $time = date('H\hi', strtotime('00:00:00')); Or, if the input format is always the same, you could do it like so... $time = str_replace(':', 'h', substr('00:00:00', 0, 5)); -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to read cookies set by php?
I'm trying to debug some scripts, and I see that the contents of cookies seems to be encoded (in Firefox2 on Kubuntu, at least). How can one read the cookies stored on his machine? Dotan Cohen http://what-is-what.com/what_is/gmail.html http://datip.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help me about detect client screen resolution!!!
On 1/2/07, Stut [EMAIL PROTECTED] wrote: Le Phuoc Canh wrote: Can we use php to detect client screen resolution? Please help me ? No we can't. You need Javascript or another client-side technology for that. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php script type=text/javascript var thisSize; function showStats() { thisSize = 'Screen resolution is ' + screen.width + ' x ' + screen.height; if (thisSize) { document.getElementById(output).innerHTML = thisSize; } } /script html a href=javascript:showStats();Screen Resolution/a p id=output/p /html I think this should work. David
[PHP] [JOB] Seeking PHP/Perl programmer willing to learn mod_perl - Charlotte, NC
Hello everyone, We are expanding our search to Junior/Senior Perl and PHP programmers that would like to learn mod_perl and enterprise Perl programming. Here is the original posting on jobs.perl.org: Mod_perl Web Developer for publishing company- bizjournals.com, bizjournals.com http://jobs.perl.org/job/5100 Please direct any replies to [EMAIL PROTECTED] Thanks, -- Kevin Old [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Concerning SSL
Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help me about detect client screen resolution!!!
At 1/2/2007 12:24 AM, Le Phuoc Canh wrote: Can we use php to detect client screen resolution? Please help me ? Do you really want screen resolution or do you want browser window size? Not every PC user keeps their windows maximized, and I have yet to meet a Mac user who attempts to do so. For cross-browser javascript that measures the viewport, see Peter-Paul Koch's page: Viewport properties http://www.quirksmode.org/viewport/compatibility.html PHP and javascript can act in concert. If PHP doesn't yet know the monitor size, it can download a javascript-only page that will talk back, e.g.: document.location.href = '?width=' . x . 'height=' . y which PHP can receive as $_GET['x'] and $_GET['y'] and then use to download the desired page. Keep in mind that the user can change window size at any time and many people do so from one page to the next to accommodate varying content and their other desktop activities at the time. Therefore you can't really rely on intial measurements; if the proper rendering of your page DEPENDS on knowing the window size, you'll need to re-measure it for every pageview. Downloading a measuring script in advance of each web page would make the browsing experience a bit sluggish. If possible, try to make your page layouts more robust. There are many techniques for engineering pages to tolerate a wide spectrum of window widths; see the CSS-D wiki for links: http://css-discuss.incutio.com/ Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Concerning SSL
R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Concerning SSL
How do you correct the image URLs? That's what I'm asking. I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Concerning SSL
R. Van Tassel wrote: How do you correct the image URLs? That's what I'm asking. how I am supposed to know how to correct your URLs without being able to see your code or the source of your pages??? PS - you domain name is not mywebsite.com AFAICT I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Concerning SSL
Jochem Maas wrote: R. Van Tassel wrote: How do you correct the image URLs? That's what I'm asking. how I am supposed to know how to correct your URLs without being able to see your code or the source of your pages??? PS - you domain name is not mywebsite.com AFAICT Or, to put it another way, give us the real URL to your site and we may be able to help. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Concerning SSL
Thanks. http://www.loudmerch.com/clientservices/ user: php pass: list -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:52 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: How do you correct the image URLs? That's what I'm asking. how I am supposed to know how to correct your URLs without being able to see your code or the source of your pages??? PS - you domain name is not mywebsite.com AFAICT I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to read cookies set by php?
At 4:16 PM +0200 1/2/07, Dotan Cohen wrote: I'm trying to debug some scripts, and I see that the contents of cookies seems to be encoded (in Firefox2 on Kubuntu, at least). How can one read the cookies stored on his machine? Dotan Cohen Dotan: Just a guess, are the cookies serialized? http://us2.php.net/serialize 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] Concerning SSL
At 5:27 PM +0100 1/2/07, Jochem Maas wrote: we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. I was wondering why I didn't know that. :-) 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] Concerning SSL
Am $date schrieb $from: Thanks. http://www.loudmerch.com/clientservices/ user: php pass: list -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:52 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: How do you correct the image URLs? That's what I'm asking. how I am supposed to know how to correct your URLs without being able to see your code or the source of your pages??? PS - you domain name is not mywebsite.com AFAICT I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Björn Bartels -Development/IT-Services- -- dbusiness.de gmbh digital business printing gmbh Greifswalder Str. 152 D-10409 Berlin Fon: [0.30] 4.21.19.95 Fax: [0.30] 4.21.19.74 www.dbusiness.de [EMAIL PROTECTED] ftp://dbusiness.dyndns.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR installation error
Hi! I am keen to install PEAR and start using it, but encounter the same error on two different XP machines and would be extremely grateful for any help you can offer. Please see below for an account of the error. Best Regards and thanks in advance, Alistair -- Are you installing a system-wide PEAR or a local copy? (system|local) [system] : local Please confirm local copy by typing 'yes' : yes Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : C:\server\PHP 2. Binaries directory: C:\server\PHP 3. PHP code directory ($php_dir) : C:\server\PHP\pear 4. Documentation directory : C:\server\PHP\pear\docs 5. Data directory: C:\server\PHP\pear\data 6. Tests directory : C:\server\PHP\pear\tests 7. Name of configuration file: C:\server\PHP\pear.ini 8. Path to CLI php.exe : C:\server\PHP\. 1-8, 'all' or Enter to continue: Beginning install... Configuration written to C:\server\PHP\pear.ini... Initialized registry... PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 Preparing to install... installing phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar- 1.3.1.tar... installing phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt- 1.2.tar... installing phar://go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.4.11.tar... PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar- 1.3.1. ar', invalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt- 1.2 tar', invalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar /PEAR/go-pear-tarballs/PEAR- 1.4.11.tar', nvalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /PEAR Command/Install.php on line 429 install failed Press any key to continue . . .
RE: [PHP] Concerning SSL
sorry, just wanted so say: ...seems to work (I can see images) so which images do disappear? bb Am $date schrieb $from: Thanks. http://www.loudmerch.com/clientservices/ user: php pass: list -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:52 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: How do you correct the image URLs? That's what I'm asking. how I am supposed to know how to correct your URLs without being able to see your code or the source of your pages??? PS - you domain name is not mywebsite.com AFAICT I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Björn Bartels -Development/IT-Services- -- dbusiness.de gmbh digital business printing gmbh Greifswalder Str. 152 D-10409 Berlin Fon: [0.30] 4.21.19.95 Fax: [0.30] 4.21.19.74 www.dbusiness.de [EMAIL PROTECTED] ftp://dbusiness.dyndns.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0
Hi, We are preparing the upgrade of PHP for our customers, but, after some tests, we have a migration problem caused by the news E_RECOVERABLE_ERROR. So, even if the upgrade guide (http://www.php.net/UPDATE_5_2.txt) talk about the method to handle this new errors (by using try/catch), they don't talk about a way to permit users to upgrade to PHP 5.2.0 without modify all theirs scripts. In fact, many users had just installed open sources scripts (forums, cms, ...), which make somes E_RECOVERABLE_ERROR. So, we can hide them by adding E_RECOVERABLE_ERROR to the errors mask of the php.ini but it's not solving the real problem. Is there a way ? a temporary method ? which permit to use php 5.2 without forcing customers to accept the new E_RECOVERABLE_ERROR. so a way providing a two time upgrade (option in php.ini ?) Thanks. Best regards, -- David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
tedd, plz no personal mail, i like better to discuss things in the forum and thus hear other meanings and experiences. Your solution was very simple and worked very well. tx, i always try to keep things logical and as simple as possible ;) this is just a quick example to show how to bring info gathered by js back to the php application (and possibly store it in a session for later use). Using the query string is just one way and can also be used in combination with loading some css.php or some such. Setting a cookie may be another option. Happy coding ;) -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8127911 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PEAR installation error
Hi Alistair, There was a snafu in the PHP release process, PHP 5.2.0 shipped with an outdated go-pear.phar for some reason, you can fix this by downloading http://pear.php.net/go-pear.phar and saving it as PEAR/go-pear.phar in the unzipped windows distribution. Then, when you run go-pear.bat it will install properly. The [EMAIL PROTECTED] mailing list is a great resource for installation questions, and also general PEAR questions once you get it successfully installed. Good luck, Greg Alistair Tweed wrote: Hi! I am keen to install PEAR and start using it, but encounter the same error on two different XP machines and would be extremely grateful for any help you can offer. Please see below for an account of the error. Best Regards and thanks in advance, Alistair -- Are you installing a system-wide PEAR or a local copy? (system|local) [system] : local Please confirm local copy by typing 'yes' : yes Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : C:\server\PHP 2. Binaries directory: C:\server\PHP 3. PHP code directory ($php_dir) : C:\server\PHP\pear 4. Documentation directory : C:\server\PHP\pear\docs 5. Data directory: C:\server\PHP\pear\data 6. Tests directory : C:\server\PHP\pear\tests 7. Name of configuration file: C:\server\PHP\pear.ini 8. Path to CLI php.exe : C:\server\PHP\. 1-8, 'all' or Enter to continue: Beginning install... Configuration written to C:\server\PHP\pear.ini... Initialized registry... PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR Command.php on line 268 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command.php on line 268 Preparing to install... installing phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar- 1.3.1.tar... installing phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt- 1.2.tar... installing phar://go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.4.11.tar... PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar- 1.3.1. ar', invalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt- 1.2 tar', invalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2334 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /Arch ve/Tar.php on line 2338 Could not get contents of package . Invalid tgz file. Cannot initialize 'phar://go-pear.phar /PEAR/go-pear-tarballs/PEAR- 1.4.11.tar', nvalid or missing package file PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar /PEAR Command/Install.php on line 427 PHP Warning: Cannot use a scalar value as an array in phar://go- pear.phar /PEAR Command/Install.php on line 429 install failed Press any key to continue . . . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
On Tue, 2007-01-02 at 10:06 -0800, Jürgen Wind wrote: tedd, plz no personal mail, i like better to discuss things in the forum and thus hear other meanings and experiences. Your solution was very simple and worked very well. tx, i always try to keep things logical and as simple as possible ;) this is just a quick example to show how to bring info gathered by js back to the php application (and possibly store it in a session for later use). Using the query string is just one way and can also be used in combination with loading some css.php or some such. Setting a cookie may be another option. Happy coding ;) Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. 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. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8129234 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with SSL
I know it's wrong place to post apache based question, but it's kind of urgent and I'm not on any apache list. If anyone can please help me. we (firm aI work for) purchased SSL certificate for our domain name with w's (www.vernoncompany.biz). but, when try to get https://vernoncompany.biz will get (of course) certificate error. now, I'm trying somehow to every request for https://vernoncompany.biz forward to https://www.vernoncomapny.biz. I'm assuming it's something to do with apache config file (Apache 2.2). Could somebody point me to the right direction? I checked the apache.org but didn't find the answer. Thanks. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote: Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? No, you always want the javascript to run first. The question is whether a meta redirect could ever occur before the javascript redirect. If it can then occasionally you may get javascript not detected since the meta redirect would occur when in fact javascript is enabled. 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. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Concerning SSL
tedd wrote: At 5:27 PM +0100 1/2/07, Jochem Maas wrote: we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. I was wondering why I didn't know that. :-) our mind-reading modules were switched off remotely via the subconscious ghost-channel uplink on 31/12 24:00 UTC ... but you didn't hear it from me :- tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0
David CHANIAL wrote: Hi, We are preparing the upgrade of PHP for our customers, but, after some tests, we have a migration problem caused by the news E_RECOVERABLE_ERROR. So, even if the upgrade guide (http://www.php.net/UPDATE_5_2.txt) talk about the method to handle this new errors (by using try/catch), they don't talk there is no mention of try/catch - it seems that the rather unfortunate word 'catchable' was used to describe the act of setting up a user defined error handler (see: http://php.net/manual/en/function.set-error-handler.php) to handle errors that are triggered by the php core. [errors != exceptions] about a way to permit users to upgrade to PHP 5.2.0 without modify all theirs scripts. In fact, many users had just installed open sources scripts (forums, cms, ...), which make somes E_RECOVERABLE_ERROR. So, we can hide them by adding E_RECOVERABLE_ERROR to the errors mask of the php.ini but it's not solving the real problem. masking the errors might be short term solution - better to not mask them but also setup php to log errors rather than display them (see the display_errors ini setting) and point your users to the error log. it may be possible to merrily ignore the E_RECOVERABLE_ERRORs but chances are they point to real problems in the code and they should be corrected. Is there a way ? a temporary method ? which permit to use php 5.2 without forcing customers to accept the new E_RECOVERABLE_ERROR. so a way providing a two time upgrade (option in php.ini ?) no there is not. sorry for the bad news. Thanks. Best regards, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to read cookies set by php?
On 02/01/07, tedd [EMAIL PROTECTED] wrote: At 4:16 PM +0200 1/2/07, Dotan Cohen wrote: I'm trying to debug some scripts, and I see that the contents of cookies seems to be encoded (in Firefox2 on Kubuntu, at least). How can one read the cookies stored on his machine? Dotan Cohen Dotan: Just a guess, are the cookies serialized? http://us2.php.net/serialize tedd No, the cookies are not serialized. Dotan Cohen http://lyricslist.com/lyrics/artist_albums/106/cantrell_jerry.html http://fiifke.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
At 2:06 PM -0500 1/2/07, Robert Cummings wrote: On Tue, 2007-01-02 at 10:06 -0800, Jürgen Wind wrote: tedd, plz no personal mail, i like better to discuss things in the forum and thus hear other meanings and experiences. Your solution was very simple and worked very well. tx, i always try to keep things logical and as simple as possible ;) this is just a quick example to show how to bring info gathered by js back to the php application (and possibly store it in a session for later use). Using the query string is just one way and can also be used in combination with loading some css.php or some such. Setting a cookie may be another option. Happy coding ;) Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. Rob: That's a good point -- even if a delay was added it's not certain that it wouldn't experience a race issue. And the longer the delay, the more problems you have with the user experience. Perhaps a token scheme, like prohibiting duplicate from submissions, might work. 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] Javascript detection , working version
On Tue, 2007-01-02 at 15:24 -0500, tedd wrote: Rob: That's a good point -- even if a delay was added it's not certain that it wouldn't experience a race issue. And the longer the delay, the more problems you have with the user experience. Perhaps a token scheme, like prohibiting duplicate from submissions, might work. Well I don't know if there is a race condition. I don't know enough about meta redirects and javascript execution to know if a race condition exists at all. That was why I did my solution the way I did it, I know for a fact there is no race condition in it :) 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. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
- Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Jürgen Wind [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, January 02, 2007 8:57 PM Subject: Re: [PHP] Javascript detection , working version On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote: Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? No, you always want the javascript to run first. The question is whether a meta redirect could ever occur before the javascript redirect. If it can then occasionally you may get javascript not detected since the meta redirect would occur when in fact javascript is enabled. Cheers, Rob. -- What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Satyam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Converting C# Hashing Routines to PHP
Hey there, I'm currently working on converting an ASP.NET, C# site/application to PHP, and I've run into a small snag. The login algorithm hashes the user passwords like so: MD5 md1 = new MD5CryptoServiceProvider(); byte[] buffer1 = new ASCIIEncoding().GetBytes(stringToHash); byte[] buffer2 = md1.ComputeHash(buffer1); md1.Clear(); return Convert.ToBase64String(buffer2); The challenge here is that in this conversion, I'm also migrating the users over to a different system which uses a completely different hashing mechanism. So, really, I need to be able to un-hash these values, if that's even possible. Thoughts? Options? I'm afraid this is one way hash, that I'm not going to be able to do anything about, unfortunately. TIA, -Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
On Tue, 2007-01-02 at 21:55 +0100, Satyam wrote: - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Jürgen Wind [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, January 02, 2007 8:57 PM Subject: Re: [PHP] Javascript detection , working version On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote: Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? No, you always want the javascript to run first. The question is whether a meta redirect could ever occur before the javascript redirect. If it can then occasionally you may get javascript not detected since the meta redirect would occur when in fact javascript is enabled. Cheers, Rob. -- What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Yeah, that was what I did :) 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. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
At 3:39 PM -0500 1/2/07, Robert Cummings wrote: On Tue, 2007-01-02 at 15:24 -0500, tedd wrote: Rob: That's a good point -- even if a delay was added it's not certain that it wouldn't experience a race issue. And the longer the delay, the more problems you have with the user experience. Perhaps a token scheme, like prohibiting duplicate from submissions, might work. Well I don't know if there is a race condition. I don't know enough about meta redirects and javascript execution to know if a race condition exists at all. That was why I did my solution the way I did it, I know for a fact there is no race condition in it :) Cheers, Rob. Rob: I haven't had a chance to check out your solution, but I will. Many thanks. 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
[PHP] I need help with PHP, cURL, and POST
I am an experienced programmer who is just learning php and curl. I have tried for several days to figure out how to use curl with POST to get history information from e-gold. The following script, which I guess uses GET works when have appropriate stuff in them. But no matter what I have tried, and whose examples I have followed I cannot get this to work with CURLOPT_POST set to true with what I think is the appropriate information supplied. I am testing this from XAMPP 1.5.5 on a Windows XP system, and the SSL stuff and everything I think I need is present and seems to be working fine. The commented out form also works, so I guess e-gold will accept POSTed data. I just do not know how to get curl to send it for me or what options I need to make it work. Would someone be interested in showing me exactly what I need to modify this script to work with POST? ?php session_start(); /* form action=https://www.e-gold.com/acct/historycsv.asp; method=post input type=hidden name=AccountID value=XX input type=hidden name=PassPhrase value=YYY input type=hidden name=startmonth value=12 input type=hidden name=startday value=1 input type=hidden name=startyear value=2006 input type=hidden name=endmonth value=12 input type=hidden name=endday value=31 input type=hidden name=endyear value=2006 input type=hidden name=paymentsreceived value=1 input type=hidden name=fees value=1 input type=submit value=Submit */ $pf = AccountID=XX; $pf .= PassPhrase=YYY; $pf .= startmonth=12; $pf .= startday=1; $pf .= startyear=2006; $pf .= endmonth=12; $pf .= endday=31; $pf .= endyear=2006; $pf .= paymentsreceived=1; $pf .= fees=1; $pf .= paymentidfilter=; $ch = curl_init(); // Follow any Location headers curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $url='https://www.e-gold.com/acct/historycsv.asp?' . $pf; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HEADER, FALSE); $data=curl_exec($ch); $info=curl_getinfo($ch); echo pcurlerror= . curl_error($ch); curl_close($ch); echo pdata=; var_dump($data); echo pinfo=; var_dump($info); ?
Re: [PHP] Javascript detection , working version
- Original Message - From: Robert Cummings [EMAIL PROTECTED] What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Yeah, that was what I did :) Cheers, Rob. -- Sorry, it seems I missed it. Satyam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Satyam wrote: What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Satyam yes, that's the best solution, updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132106 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. yes, you where right (i noticed some problems with opera) updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132150 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting C# Hashing Routines to PHP
Jason Alexander wrote: Hey there, I'm currently working on converting an ASP.NET, C# site/application to PHP, and I've run into a small snag. The login algorithm hashes the welcome to the other side, did you get a refund for the red lightsabre? ;-) [go on keep reading, you'll to the useful bit of the reply eventually...] user passwords like so: MD5 md1 = new MD5CryptoServiceProvider(); byte[] buffer1 = new ASCIIEncoding().GetBytes(stringToHash); byte[] buffer2 = md1.ComputeHash(buffer1); md1.Clear(); return Convert.ToBase64String(buffer2); holy smoke - all those line to do what seems to ammount to (in php): function myHash($s) { return base64_encode(md5($s)); } The challenge here is that in this conversion, I'm also migrating the users over to a different system which uses a completely different hashing mechanism. So, really, I need to be able to un-hash these values, if that's even possible. Thoughts? Options? I'm afraid this is one way hash, that I'm not going to be able to do anything about, unfortunately. well you out of luck regarding simply converting the md5 hashes to another encryption form (e.g. sha1). obviously php does have a way to gen md5 hashes using the function md5() you might consider writing a login routine that makes use of 2 password fields, one for the md5 hash and one for the new hash. if the a user attempts a login and the 'new hash' field is empty an md5 hash of the given password is checked against the 'md5 hash' field - if it matches then a hash is made of the given password using the new hashing mechanism and that is stored in the 'new hash' field (after which the 'md5 hash' field can be cleared and the future logins will be checked against the 'new hash' field) ... some time in the future it may be possible to recode the login and remove the 'md5 hash' field completely. the use of base64 encoding in your sample code might complicate the solution a tiny bit but hopefully you get the idea. TIA, -Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
that's why i prefer discussing here in the forum, we benefit from the experiences of each other :) updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132203 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need help with PHP, cURL, and POST
Charley wrote: I am an experienced programmer who is just learning php and curl. ... Would someone be interested in showing me exactly what I need to modify this script to work with POST? the interest is 10%/week ;-) ... read on ... ?php session_start(); /* form action=https://www.e-gold.com/acct/historycsv.asp; method=post input type=hidden name=AccountID value=XX input type=hidden name=PassPhrase value=YYY input type=hidden name=startmonth value=12 input type=hidden name=startday value=1 input type=hidden name=startyear value=2006 input type=hidden name=endmonth value=12 input type=hidden name=endday value=31 input type=hidden name=endyear value=2006 input type=hidden name=paymentsreceived value=1 input type=hidden name=fees value=1 input type=submit value=Submit */ $pf = AccountID=XX; $pf .= PassPhrase=YYY; $pf .= startmonth=12; $pf .= startday=1; $pf .= startyear=2006; $pf .= endmonth=12; $pf .= endday=31; $pf .= endyear=2006; $pf .= paymentsreceived=1; $pf .= fees=1; $pf .= paymentidfilter=; you don't want/need the GET query in $pf ... instead something like this needs to be used (AFAIK): curl_setopt($ch, CURLOPT_POSTFIELDS, array( 'AccountID' = 'X', 'PassPhrase' = 'XX', /* etc, etc */ )); refer to http://php.net/curl for more info. this assumes that e-gold does accept POST as a request method (which you test form seems to indicate it does) $ch = curl_init(); // Follow any Location headers curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $url='https://www.e-gold.com/acct/historycsv.asp?' . $pf; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HEADER, FALSE); $data=curl_exec($ch); $info=curl_getinfo($ch); echo pcurlerror= . curl_error($ch); curl_close($ch); echo pdata=; var_dump($data); echo pinfo=; var_dump($info); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I need help with PHP, cURL, and POST
Have you looked at this tutorial - http://devzone.zend.com/node/view/id/1081 It has an example specifically for how to use curl with POST Respectfully, Ligaya Turmelle -Original Message- From: Charley [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 1:24 AM To: php-general@lists.php.net Subject: [PHP] I need help with PHP, cURL, and POST I am an experienced programmer who is just learning php and curl. I have tried for several days to figure out how to use curl with POST to get history information from e-gold. The following script, which I guess uses GET works when have appropriate stuff in them. But no matter what I have tried, and whose examples I have followed I cannot get this to work with CURLOPT_POST set to true with what I think is the appropriate information supplied. I am testing this from XAMPP 1.5.5 on a Windows XP system, and the SSL stuff and everything I think I need is present and seems to be working fine. The commented out form also works, so I guess e-gold will accept POSTed data. I just do not know how to get curl to send it for me or what options I need to make it work. Would someone be interested in showing me exactly what I need to modify this script to work with POST? ?php session_start(); /* form action=https://www.e-gold.com/acct/historycsv.asp; method=post input type=hidden name=AccountID value=XX input type=hidden name=PassPhrase value=YYY input type=hidden name=startmonth value=12 input type=hidden name=startday value=1 input type=hidden name=startyear value=2006 input type=hidden name=endmonth value=12 input type=hidden name=endday value=31 input type=hidden name=endyear value=2006 input type=hidden name=paymentsreceived value=1 input type=hidden name=fees value=1 input type=submit value=Submit */ $pf = AccountID=XX; $pf .= PassPhrase=YYY; $pf .= startmonth=12; $pf .= startday=1; $pf .= startyear=2006; $pf .= endmonth=12; $pf .= endday=31; $pf .= endyear=2006; $pf .= paymentsreceived=1; $pf .= fees=1; $pf .= paymentidfilter=; $ch = curl_init(); // Follow any Location headers curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $url='https://www.e-gold.com/acct/historycsv.asp?' . $pf; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HEADER, FALSE); $data=curl_exec($ch); $info=curl_getinfo($ch); echo pcurlerror= . curl_error($ch); curl_close($ch); echo pdata=; var_dump($data); echo pinfo=; var_dump($info); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please help me
I also use PHPmailer to send emails. However it is good to do it the 'hard' way once to learn about mailing headers etc. Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Steven Macintyre [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 2:44 PM To: php-general@lists.php.net Subject: RE: [PHP] Please help me When I send a mail using php using mail(), and using html tags in message body , these tags are being displayed as it is. Please let me know if there's any way of how to tackle with this. I use phpmailer for all my email sending ... Never had a problem with it S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to read cookies set by php?
Are you trying to read cookies that are not set by your host? If that is the case you will probably be disappointed. The purpose with cookies is that they should only be table to be read by the one who is setting the cookie. If you want to read cookies on the machine that you are able to view just: echo pre; print_r($_COOKIE); echo /pre; Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Dotan Cohen [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 4:17 PM To: php php Subject: [PHP] How to read cookies set by php? I'm trying to debug some scripts, and I see that the contents of cookies seems to be encoded (in Firefox2 on Kubuntu, at least). How can one read the cookies stored on his machine? Dotan Cohen http://what-is-what.com/what_is/gmail.html http://datip.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Concerning SSL
Make the src ABSOULUTE and it will work. When you are using relative links as you are right now the web server will look in the https://www.mywebsite.com/images Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: R. Van Tassel [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 6:33 PM To: php-general@lists.php.net Subject: RE: [PHP] Concerning SSL How do you correct the image URLs? That's what I'm asking. I have a website that is secure. When you change the URL from http://www.mywebsite.com to https://www.mywebsite.com the images disappear. The images are codes as relative links: http://www.mywebsite.com/images/myimage.jpg is coded as img src=images/myimage.jpg / if a root file is coded as img src=../images/myimage.jpg / if in a directory -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 11:27 AM To: R. Van Tassel Cc: php-general@lists.php.net Subject: Re: [PHP] Concerning SSL R. Van Tassel wrote: Hello everyone, I hope you all had a great new year. I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? correct the image URLs? clear your cache? we gave up mind-reading on the list last year, please provide us with some actual info otherwise we can't help you. Thanks, -Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting C# Hashing Routines to PHP
Thanks Jochem, Yeah, I'm one of those types that wields whatever lightsabre is given to him. ;-) Perfect, thanks for the heads up on how that translates in PHP. Yeah, good idea on the dual column. I was thinking the same thing, and it seems to be the most non-intrusive way to add it into the new data model. Thanks for the help! Greatly appreciated! -Jason On 1/2/07, Jochem Maas [EMAIL PROTECTED] wrote: Jason Alexander wrote: Hey there, I'm currently working on converting an ASP.NET, C# site/application to PHP, and I've run into a small snag. The login algorithm hashes the welcome to the other side, did you get a refund for the red lightsabre? ;-) [go on keep reading, you'll to the useful bit of the reply eventually...] user passwords like so: MD5 md1 = new MD5CryptoServiceProvider(); byte[] buffer1 = new ASCIIEncoding().GetBytes(stringToHash); byte[] buffer2 = md1.ComputeHash(buffer1); md1.Clear(); return Convert.ToBase64String(buffer2); holy smoke - all those line to do what seems to ammount to (in php): function myHash($s) { return base64_encode(md5($s)); } The challenge here is that in this conversion, I'm also migrating the users over to a different system which uses a completely different hashing mechanism. So, really, I need to be able to un-hash these values, if that's even possible. Thoughts? Options? I'm afraid this is one way hash, that I'm not going to be able to do anything about, unfortunately. well you out of luck regarding simply converting the md5 hashes to another encryption form (e.g. sha1). obviously php does have a way to gen md5 hashes using the function md5() you might consider writing a login routine that makes use of 2 password fields, one for the md5 hash and one for the new hash. if the a user attempts a login and the 'new hash' field is empty an md5 hash of the given password is checked against the 'md5 hash' field - if it matches then a hash is made of the given password using the new hashing mechanism and that is stored in the 'new hash' field (after which the 'md5 hash' field can be cleared and the future logins will be checked against the 'new hash' field) ... some time in the future it may be possible to recode the login and remove the 'md5 hash' field completely. the use of base64 encoding in your sample code might complicate the solution a tiny bit but hopefully you get the idea. TIA, -Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need help with PHP, cURL, and POST
To Ligaya and Jochm, Thanks for your answers. I have read and tried what several tutorials say to do. I have used both arrays and query strings to specify the post fields. I had not seen the tutorial Ligaya mentioned, but it was not essentially different from the others I have seen. And the PHP cURL documentation assumes that I know a lot more about what each option means than I do. I have been reading and re-reading that for days now. I have the feeling that there is a CURLOPT_something or other that I should be using and am not, but I have no idea what it could be. I thought it might have to do with cookies or verification or something, but I think I have tried all possible relevant combinations of those things. I guess I will let it go for a while -- I was hoping someone would tell me that they had thus and such problem and did this and that to fix it and that that would work for me. (OK, so I'm an optimist (optomist??)) Thanks again, guys.
Re: [PHP] Converting C# Hashing Routines to PHP
You can reverse the base64 easily enough. You ain't gonna reverse md5 in this lifetime. The dual-column could work, or you could just accept the password if it matches either routine in a single column. The odds of your new algorithm coincidentally matching the base64(md5()) of another user and giving access to a Bad Guy is effectively nil. On Tue, January 2, 2007 3:20 pm, Jason Alexander wrote: Hey there, I'm currently working on converting an ASP.NET, C# site/application to PHP, and I've run into a small snag. The login algorithm hashes the user passwords like so: MD5 md1 = new MD5CryptoServiceProvider(); byte[] buffer1 = new ASCIIEncoding().GetBytes(stringToHash); byte[] buffer2 = md1.ComputeHash(buffer1); md1.Clear(); return Convert.ToBase64String(buffer2); The challenge here is that in this conversion, I'm also migrating the users over to a different system which uses a completely different hashing mechanism. So, really, I need to be able to un-hash these values, if that's even possible. Thoughts? Options? I'm afraid this is one way hash, that I'm not going to be able to do anything about, unfortunately. TIA, -Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need help with PHP, cURL, and POST
I apologize for the previous message. This one should wrap better. To Ligaya and Jochm, Thanks for your answers. I have read and tried what several tutorials say to do. I have used both arrays and query strings to specify the post fields. I had not seen the tutorial Ligaya mentioned, but it was not essentially different from the others I have seen. And the PHP cURL documentation assumes that I know a lot more about what each option means than I do. I have been reading and re-reading that for days now. I have the feeling that there is a CURLOPT_something or other that I should be using and am not, but I have no idea what it could be. I thought it might have to do with cookies or verification or something, but I think I have tried all possible relevant combinations of those things. I guess I will let it go for a while -- I was hoping someone would tell me that they had thus and such problem and did this and that to fix it and that that would work for me. (OK, so I'm an optimist (optomist??)) Thanks again, guys. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Concerning SSL
On Tue, January 2, 2007 10:19 am, R. Van Tassel wrote: I'm having an issue with a website where changing the URL from http:// to https:// makes the images disappear. The images are all relative and not absolute. How can I fix this? Right-click on the image and see what its properties or location is. See what you're trying to use as an image URL. Then figure out why that URL doesn't work. You may also get useful info if you try to surf to that image direct with view image from the right-click. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need help with PHP, cURL, and POST
On Tue, January 2, 2007 9:23 am, Charley wrote: input type=hidden name=AccountID value=XX ... input type=submit value=Submit */ $pf = AccountID=XX; ... $pf .= paymentidfilter=; You are missing the Submit input, and ASP being ASP, it probably was programmed to expect it, and will puke without it. You also have added a paymentidfilter parameter that was not in the original. You may not be allowed to have that in the POST, perhaps. $ch = curl_init(); ... echo pcurlerror= . curl_error($ch); Based on the rest of your excellent post, you probably have no error output here, but to be pedantic... Are there any error messages here? You may also want to turn off the FOLLOWLOCATION and dump out whatever responses as the come, and then build up another query to follow the re-directs by hand. This will sometimes lead you to find out that there are, for example, cookies flying back and forth that you need to track (CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE) or something similar. You may also want to provide some extra headers to make curl look more like a real browser to fool any anti-web-scraping features in their ASP script. Compare output with Firefox LiveHTTPHeaders (?) and what curl is giving you to find clues/differences that might indicate what to try next. Keep in mind that your goal is to make your curl script indistinguishable to e-gold from a real user. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to read cookies set by php?
Configure the browser to prompt you before saving cookies, and then surf there again? Turn on LiveHTTPHeaders and see what the browser sends when you surf back to that site? Hack your /etc/hosts or \WINDOWS\system32\drivers\etc\hosts to have the other guy's domain re-directed to your localhost, and set up PHP to var_dump($_COOKIES) might work? Seems like an awful lot of work, but it might make you feel like a real hacker :-) :-) :-) On Tue, January 2, 2007 8:16 am, Dotan Cohen wrote: I'm trying to debug some scripts, and I see that the contents of cookies seems to be encoded (in Firefox2 on Kubuntu, at least). How can one read the cookies stored on his machine? Dotan Cohen http://what-is-what.com/what_is/gmail.html http://datip.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting time :/
If it is stored in a database, you may want to convert within your query: MySQL: date_format Postgresql: to_char If it's just in a text file, PHP's date() function should do it: http://php.net/date I dunno if there's a nifty constant for the format you want, but you could always mess with mktime and date to get what you want. http://php.net/mktime On Tue, January 2, 2007 6:39 am, Steven Macintyre wrote: Hi all, I am unable to find out how to do this ... or what the format is called bar zulu format I have standard 00:00:00 time stored ... and wish to display it as 00h00 ... has anyone done this with php ... can you point me to right page etc ... What is that format called? Kind Regards, Steven Macintyre http://steven.macintyre.name -- http://www.friends4friends.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Temporary Emails - Your Recommendations - An Appeal to the PHP Community
On Mon, January 1, 2007 4:26 am, Jason Paschal wrote: i realize this isn't the appropriate mailing list and i risk being black-listed (flame, defamed, ignored, etc.). i occasionally use temporary emails when registering for forums or to get some shareware (we've all done it, don't give me that look, i have given what i could, when i could) and while i like the way mytrashmail.com works, i don't like having mytrashmail.com as part of the temp addy. does anyone know of a similar service that uses a more enticing domain? Yahoo.com? Hotmail.com? Or, since you control your own domain name, presumably, use something like: [EMAIL PROTECTED] when you give your email to jpaschal.com and use [EMAIL PROTECTED] when you give your email to example.com and... You can set up your email with catchall, or you can just set up the email alias for as long as you need it to exist, and nuke it later or... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble compiling in mysqli under PHP5 -- mysql_config not found
I'm trying to build a CLI/CGI binary of PHP5 with MySQLi under Mac OS X. When I invoke configure, I get the following error message: checking whether to enable embedded MySQLi support... no mysql_config not found configure: error: Please reinstall the mysql distribution Now, mysql (4.1.22) is in fact installed, and it looks to me like the headers are in fact there (and mysql_config seems to be under ./bin), and I did give it the path with the config option (--with-mysqli=/usr/local/mysql -- yes, I know this isn't the conventional Mac OS X path, but I like these things under /usr/local, so). Curiously, I note that a build using --with-mysql=/usr/local/mysql works just fine. Any ideas what I'm doing wrong here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Request of php5
On Mon, January 1, 2007 12:40 am, [EMAIL PROTECTED] wrote: Dear All, Happy New Year, How much mem ( Ram ) does the php5 need ? Yes. :-) Depends on what extension you add, what you do with those extensions, and what sort of performance you expect to get. Depends if you run as a Module, as CGI, as Fast CGI, and if you are on Windows, Linux, FreeBSD, or Other. Probably a little more than PHP5, and not quite as much as PHP6. Does that help at all? I'd like to give a better answer, if you asked a better question. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Basic question - Starting a background task without waiting for its end.
You can try tacking a at the end to fork the Notepad opening... It may or may not work depending on a bunch of factors. Don't be surprised if it works and makes your Windows box even more unstable than it already way, and you get random crashes from this. Thread-safety within PHP extensions is not guaranteed, and don't even ask about Notepad and thread safety... Note that it could work fine for YEARS and then you un-comment an un-threadsafe extension in php.ini and Bam! the whole thing starts crashing at random points for no obvious reason. On Sun, December 31, 2006 10:18 am, Michel wrote: I (very simply) try to open a notepad on a simple text file in a simplistic PHP script, and would like to go on and display the next page without waiting for this notepad to be shut. After various attempts, I have used an : exec ('bash -c cmd /C start /MAX notepad my_file NUL'); ... but it still wait for the shutting of the notepad ..! Could anybody help me ? For clarification : 1) I use this script on a machine which is in the same time server and client, which gives meaning to this operation. 2) I use bash -c because I have the cygwin platform which can easily initiate tasks in background, but it could be suppressed, because it de facto changes nothing... Thank's for help. Michel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to manage open slots for download
I think you want $bytes_out = $size, actually... I'm not sure what you are sending out for that last extra byte... :-) You could consider just timing out any zombies. You could use ignore_user_abort and hope to finish most of the downloads, as far as PHP is concerned, but I don't think ignore_user_abort is 100% guaranteed, and there's always the chance of a PHP or Apache connection crashing... You could also re-think the problem to check, say, load on the server, or some sort of bandwidth meter that you could manage, rather than N slots. So somebody on a dog-slow dialup downloading would not count as much as somebody sucking down your entire bandwidth on a T-1. By shaping it by the bytes/sec being spewed out by PHP, zombie connections will naturally stop updating the meter, so won't count. On Sun, December 31, 2006 9:12 am, Aras wrote: First of all, Happy New Year for everyone in the list. I wish 2007 brings all us happiness, health and peace. I want to read your advises at a point i am stuck within, i have an application that serves downloads to clients. For some reason i am limiting total open slot for some group of users (not related to my technical question). Example; // CHECKS SLOT HERE else { // IF THERE ANY AVAILABLE SLOTS SEND THE FILE // INCREMENT SLOT NUMBER BY 1 $fp = fopen($pathside,r); if ($fp) { while (!feof($fp)) { echo fread($fp, 334); $bytes_out += 334; ob_flush(); if ($bytes_out $size) { // DECREASE SLOT NUMBER BY 1, BECAUSE THIS DOWNLOAD IS FINISHED } } } } Slots are recorded and checked from a simple mysql table. Everything works in this scenario. There is no problem if a person starts a download and finishes it, his slots get empty upon doing so. Yet if he cancelles the transfer, he will never reach my control structure to empty the slot. And slots will be full of zombies. I have thought of updating a mysql field for alive-connections in the while loop, but it will definitely add some load on my server. Updating a system file is not secure and good way. What other ways can you recommend to me for the situtation? Aras Koktas [EMAIL PROTECTED] Business Excellence Development Phi.dot Internet Systems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and register_globals=off gives lotsa errors
It's NOT register_globals being off. It's E_NOTICE being on. You could turn E_NOTICE off and *ignore* these errors -- They are still there, you are just ignoring them. Or you could fix the script: $action = isset($_GET['action']) ? $_GET['action'] : ''; would be the replacement line for your first example. On Sat, December 30, 2006 7:21 pm, Wikus Moller wrote: Hi to all. I am having huge problems running my script, which worked fine on a server with php 4 and register_globals turned on, on a server with php 5 and register_globals turned off. I get errors around the area in my script where I use $_GET (not the only error). For example the following code on my index.php file which like many other sites I know, handles quite a large amount if(action==main); etc etc. : ? $action = $_GET[action]; //line 55 $sid = $_GET[sid]; //line 56 $page = $_GET[page]; //line 57 $who = $_GET[who]; //line 58 ? When I go to http://chillinglounge.net (where the error is located) I get the following error message(s): Notice: Undefined index: action in C:\websites\chillinglounge.net\public_html\index.php on line 55 Notice: Undefined index: sid in C:\websites\chillinglounge.net\public_html\index.php on line 56 Notice: Undefined index: page in C:\websites\chillinglounge.net\public_html\index.php on line 57 Notice: Undefined index: who in C:\websites\chillinglounge.net\public_html\index.php on line 58 Now if you would look at exactly the same script at http://ranterswap.net you'd see absolutely no errors. That's where I need your help. I know what is causing this error. I believe it's the fact that register_globals is turned off. But what I really want to know is: How do I fix it without trying to turn register_globals on via .htaccess (because it doesn't work)? Is there a function or some magic script that would to the trick? Or do I have to recode my entire script and how? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to static link openssl libs into php binary
Hi, I need to build my own php binary to use on a remote server that I do not have full control over. The latest php needs a newer openssl than the server has. How can I compile php such that it will link in the openssl libs statically so that I can run it on the remote server which does not have the newest openssl libs? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/ajax question
Mixing Location and Cookie headers has always been hit and miss... I think you could fix it with session_write_close() or you could just replace the Location: with: require 'b.php'; since you are just wasting HTTP connections the way you have it now... On Sat, December 30, 2006 12:56 pm, tedd wrote: Hi gang: I have a small php script that behaves differently depending upon who's calling it. The code is: ?php session_start(); /* a.php */ ob_start(); $_SESSION['var'] = test; ob_clean(); header(Location: http://www.example.com/b.php;); /* Redirect browser */ exit; ? If the code is called directly, namely http://www.example.com/a.php, then the $_SESSION var is filled with text and the redirect is realized. However, if the php script is called via ajax: -snip- preceding ajax function sndReq(action) { http.open('get', 'a.php'); http.send(null); } Then the $_SESSION var is filled with test, but the redirect is not realized. Why can't the php script redirect the browser when called via ajax ? Thanks. 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 -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble compiling in mysqli under PHP5 -- mysql_config not found
# [EMAIL PROTECTED] / 2007-01-02 18:23:33 -0700: I'm trying to build a CLI/CGI binary of PHP5 with MySQLi under Mac OS X. When I invoke configure, I get the following error message: checking whether to enable embedded MySQLi support... no mysql_config not found configure: error: Please reinstall the mysql distribution Now, mysql (4.1.22) is in fact installed, and it looks to me like the headers are in fact there (and mysql_config seems to be under ./bin), and I did give it the path with the config option (--with-mysqli=/usr/local/mysql -- yes, I know this isn't the conventional Mac OS X path, but I like these things under /usr/local, so). Curiously, I note that a build using --with-mysql=/usr/local/mysql works just fine. Any ideas what I'm doing wrong here? It wants --with-mysql=/usr/local/mysql/mysql_config, see http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?revision=1.25view=markup -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble compiling in mysqli under PHP5 -- mysql_config not found
# [EMAIL PROTECTED] / 2007-01-03 02:55:11 +: # [EMAIL PROTECTED] / 2007-01-02 18:23:33 -0700: I'm trying to build a CLI/CGI binary of PHP5 with MySQLi under Mac OS X. When I invoke configure, I get the following error message: checking whether to enable embedded MySQLi support... no mysql_config not found configure: error: Please reinstall the mysql distribution Now, mysql (4.1.22) is in fact installed, and it looks to me like the headers are in fact there (and mysql_config seems to be under ./bin), and I did give it the path with the config option (--with-mysqli=/usr/local/mysql -- yes, I know this isn't the conventional Mac OS X path, but I like these things under /usr/local, so). Curiously, I note that a build using --with-mysql=/usr/local/mysql works just fine. Any ideas what I'm doing wrong here? It wants --with-mysql=/usr/local/mysql/mysql_config, see --sith-mysqli, of course, sorry for the noise http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?revision=1.25view=markup -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pushing a file to the browser
Hello, I have a script I've created which takes a file upload, monkeys with the data in it, and needs to push the new file out to the browser. Everything is coded and working up to that last point, but I've never pushed out a file to the browser before. Does anyone have the code for this laying around that I can see (and modify)? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need help with PHP, cURL, and POST
Richard, Thanks for your answer. What do you mean about the submit input? I thought that was just a text link to cause the form to be submitted when clicked. I didn't know that it sent anything to the server. (As you can tell, I don't know anything about asp except what it stands for.) The paymentidfilter is a legitimate field, and works in the form and in the GET version of the cURL stuff. You're right that I get no curl error, and the curl info didn't seem to have anything interesting in it. It seems that e-gold has as its error response to send the login page for whatever one is asking for. This is not very helpful (at least to me). I'll see if I can get this LiveHTTPheaders thing for firefox, since firefox is my main browser. From what I read, the cookie jar and file options take the name of the same file as their arguments. Is there any path information that is required? Can I just use something like mycookies.txt or must it have a specific extension? Thanks again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pushing a file to the browser
What do you mean by `pushing`? On 9/15/06, Mike Mannakee [EMAIL PROTECTED] wrote: Hello, I have a script I've created which takes a file upload, monkeys with the data in it, and needs to push the new file out to the browser. Everything is coded and working up to that last point, but I've never pushed out a file to the browser before. Does anyone have the code for this laying around that I can see (and modify)? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need help with PHP, cURL, and POST
It works! All I did was comment out the curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1) and set up the post and post fields options. I used the query string format. I may try the array later, but since this works, I'm going to use it for now. Thanks everybody! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] http request problem
hi all, I got problem in getting file content. the file is located at another server (tomcat) and it is a jsp file. i don't know why i keep getting the same error message file accessing that file but while i am trying to access to another file, from another server it run perfect. this is the error message i get: PHP Warning: file_get_contents(http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 take note that the text in bold is part of the page contents. i don't understand why i cant get the whole content and keep getting this error. I hope somebody can help me out. Thank you Regards, Kencana -- View this message in context: http://www.nabble.com/http-request-problem-tf2911952.html#a8136255 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http request problem
hi all, by the way, the page that i am trying to get, i can open the page without any problem in IE 7 browser. Thanks Regards, Kencana -- View this message in context: http://www.nabble.com/http-request-problem-tf2911952.html#a8136297 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http request problem
On 1/2/07, Kencana [EMAIL PROTECTED] wrote: hi all, I got problem in getting file content. the file is located at another server (tomcat) and it is a jsp file. i don't know why i keep getting the same error message file accessing that file but while i am trying to access to another file, from another server it run perfect. this is the error message i get: PHP Warning: file_get_contents(http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 Sounds like you need to make that 'right turn', the only people that could answer this are the people that wrote V3JRoute Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http request problem
===ORINGIAL=== hi all, I got problem in getting file content. the file is located at another server (tomcat) and it is a jsp file. i don't know why i keep getting the same error message file accessing that file but while i am trying to access to another file, from another server it run perfect. this is the error message i get: PHP Warning: file_get_contents( http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 take note that the text in bold is part of the page contents. i don't understand why i cant get the whole content and keep getting this error. I hope somebody can help me out. Thank you Regards, Kencana ===END ORIGINAL=== I tried following code but it gives the same error $link= http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ; $handle2= fopen($link,r); $contents = ''; while (!feof($handle2)) { $contents = fread($handle, 819200); echo $contents; } I tried opening the given URL directly, but this url seems to be a broken link. If you try any other link, it will work -- Regards Fahad Pervaiz www.ecommerce-xperts.com (Shopping Cart, Web Design, SEO)
[PHP] software recommendation: ServiceCapture
I've recently discovered a tool that I recommend for web work: ServiceCapture by Kevin Langdon http://kevinlangdon.com/serviceCapture/ It acts as an HTTP proxy, inserting itself between browser and the net, and logs the details of http requests and responses. It's been a great help to me lately while working on a PHP-Flash dialog via AMF-PHP, and will undoubtedly save time on future projects when I need to debug cookies and posts. (This is a spontaneous, unsolicited, uninvested recommendation. I just really like the software and thought you might find it useful.) Regards, Paul __ Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pushing a file to the browser
# [EMAIL PROTECTED] / 2006-09-15 20:39:16 -0400: I have a script I've created which takes a file upload, monkeys with the data in it, and needs to push the new file out to the browser. Everything is coded and working up to that last point, but I've never pushed out a file to the browser before. Each time any of your PHP web scripts is run to display a page, it pushes a file to the browser: the page is the file. Does anyone have the code for this laying around that I can see (and modify)? There's no code, there's only comprehension. The fishing manual is at: ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: http request problem
# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500: ===ORINGIAL=== hi all, I got problem in getting file content. the file is located at another server (tomcat) and it is a jsp file. i don't know why i keep getting the same error message file accessing that file but while i am trying to access to another file, from another server it run perfect. this is the error message i get: PHP Warning: file_get_contents( http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 take note that the text in bold is part of the page contents. The text/plain version of your multipart/mixed email omits terminal escape sequences (tags) so there's no bold. But that error message is somehow garbled anyway. Now, what happens if you try to display that same url in a normal browser on the same network where it fails in the PHP script? If it works, what's the difference between the two requests? Use a packet capture and analysis tool like Wireshark (formerly Ethereal) to tell. If it doesn't work, fix that first. If it works from a normal browser, you can't see anything wrong with the request made by PHP, *and* you know your requests actually hit the server, ask its admin to cooperate. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: http request problem
On 1/2/07, Fahad Pervaiz [EMAIL PROTECTED] wrote: this is the error message i get: PHP Warning: file_get_contents( http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 ===END ORIGINAL=== I tried following code but it gives the same error Same error? $link= http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ; $handle2= fopen($link,r); $contents = ''; while (!feof($handle2)) { I get invalid handle with this code right at the above line. And... telnet 123.123.1.2 8008; never responds if $link doesn't have carriage returns or line feeds, it waits for a long time and repeats about an invalid handle as well. I tried opening the given URL directly, but this url seems to be a broken link. If you try any other link, it will work i'm suspect at the actual ip used, the ip in question seems odd. Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: http request problem
# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500: ===ORINGIAL=== [...] ===END ORIGINAL=== Gah, early morning! Ok, I wasted my time thanks to your quoting style. Would you please use something more conventional, like prefixing each line of the quoted material with ? Thank you! I tried following code but it gives the same error $link= http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ; $handle2= fopen($link,r); $contents = ''; while (!feof($handle2)) { $contents = fread($handle, 819200); echo $contents; } I tried opening the given URL directly, but this url seems to be a broken link. If you try any other link, it will work Thank you for the information. Seriosly: does that mean that your original question is answered, or do you still expect advice on getting it to work? I really can't tell, there's neither a question nor a solved statement in your email. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 ---BeginMessage--- # [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500: ===ORINGIAL=== hi all, I got problem in getting file content. the file is located at another server (tomcat) and it is a jsp file. i don't know why i keep getting the same error message file accessing that file but while i am trying to access to another file, from another server it run perfect. this is the error message i get: PHP Warning: file_get_contents( http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2 ) [function.file-get-contents]: failed to open stream: HTTP request failed! $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart on,Turn sharp left onto,Continue on,Turn right onto in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php on line 5 take note that the text in bold is part of the page contents. The text/plain version of your multipart/mixed email omits terminal escape sequences (tags) so there's no bold. But that error message is somehow garbled anyway. Now, what happens if you try to display that same url in a normal browser on the same network where it fails in the PHP script? If it works, what's the difference between the two requests? Use a packet capture and analysis tool like Wireshark (formerly Ethereal) to tell. If it doesn't work, fix that first. If it works from a normal browser, you can't see anything wrong with the request made by PHP, *and* you know your requests actually hit the server, ask its admin to cooperate. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php