php-general Digest 31 Mar 2013 04:54:24 -0000 Issue 8178

2013-03-30 Thread php-general-digest-help

php-general Digest 31 Mar 2013 04:54:24 - Issue 8178

Topics (messages 320710 through 320718):

Problem with soap - Error Fetching http headers
320710 by: Radek Krejèa

Date weirdness
320711 by: Larry Martell
320712 by: Steven Staples
320715 by: Larry Martell
320716 by: Maciek Sokolewicz
320717 by: Larry Martell

openssl and self signed ssl certs
320713 by: Sean Laval

Re: magic_quotes_gpc stays on even when disabled in php.ini
320714 by: Madan Thapa

isset empty or ...?
320718 by: John Taylor-Johnston

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
Hello,

I am starting to make my first soap server/client. I found nice tutorial 
(manual pages on PHP is not detailed) and I have this server script:

http://codeviewer.org/view/code:3131


boxing.wsdl looks:

http://codeviewer.org/view/code:3132

and client script looks 

http://codeviewer.org/view/code:3133 (I am trying to experiment with user_agent 
without success)

After running this I got 

http://codeviewer.org/view/code:3134 (full view)

message - Error Fetching http headers

What I have wrong? I am using lighttp with php-cgi and this test is possible to 
try on cutter.starnet.cz/soap.php (server) and 
cutter.starnet.cz/soap_client.php (client).

Thank you
Radek


---End Message---
---BeginMessage---
I think I am losing my mind. I have some time zone converting code,
and I just don't understand what I am seeing. Also my system seems to
return the wrong time after I do some date operations on unrelated
objects.

This is from a machine that is in eastern time. I want to convert to,
for example central time:


$ndate = new Date(date(Y-m-d H:i:s));
echo $ndate-format(%Y-%m-%d %H:%M:%S);
2013-03-28 15:35:07  - this is the correct time

$ndate-setTZbyID(EDT);
echo $ndate-format(%Y-%m-%d %H:%M:%S);
2013-03-28 15:35:07 - still correct

$ndate-convertTZbyID(US/Central);
echo $ndate-format(%Y-%m-%d %H:%M:%S);
2013-03-28 10:35:07 - this is wrong it should be 14:35:07

$xdate = new Date(date(Y-m-d H:i:s));
echo $xdate-format(%Y-%m-%d %H:%M:%S);
2013-03-28 19:35:07 - HUH? This is wrong - should be 15:35:07

What in the world is going on here?
---End Message---
---BeginMessage---
 I think I am losing my mind. I have some time zone converting code, and I
 just don't understand what I am seeing. Also my system seems to return the
 wrong time after I do some date operations on unrelated objects.
 
 This is from a machine that is in eastern time. I want to convert to, for
 example central time:
 
 $ndate = new Date(date(Y-m-d H:i:s));
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 15:35:07  - this is the correct time
 
 $ndate-setTZbyID(EDT);
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 15:35:07 - still correct
 
 $ndate-convertTZbyID(US/Central);
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 10:35:07 - this is wrong it should be 14:35:07
 
 $xdate = new Date(date(Y-m-d H:i:s));
 echo $xdate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 19:35:07 - HUH? This is wrong - should be 15:35:07
 
 What in the world is going on here?
 

I found this function a while back when I was converting UTC to EST... simple 
task I know, but still...

( I am sorry to whomever wrote this, I didn't keep the source where I found it )

function convert_time_zone($date_time, $from_tz = 'UTC', $to_tz = 
'America/Toronto')
{
$time_object = new DateTime($date_time, new DateTimeZone($from_tz));
$time_object-setTimezone(new DateTimeZone($to_tz));
return $time_object-format('Y-m-d H:i:s');
}

Maybe this can help you?

Steve 

---End Message---
---BeginMessage---
On Thu, Mar 28, 2013 at 2:44 PM, Steven Staples sstap...@mnsi.net wrote:
 I think I am losing my mind. I have some time zone converting code, and I
 just don't understand what I am seeing. Also my system seems to return the
 wrong time after I do some date operations on unrelated objects.

 This is from a machine that is in eastern time. I want to convert to, for
 example central time:

 $ndate = new Date(date(Y-m-d H:i:s));
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 15:35:07  - this is the correct time

 $ndate-setTZbyID(EDT);
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 15:35:07 - still correct

 $ndate-convertTZbyID(US/Central);
 echo $ndate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 10:35:07 - this is wrong it should be 14:35:07

 $xdate = new Date(date(Y-m-d H:i:s));
 echo $xdate-format(%Y-%m-%d %H:%M:%S);
 2013-03-28 19:35:07 - HUH? This is wrong - should be 15:35:07

 What in the world is going on here?


 I found this function a while back when I was converting UTC to EST... simple 
 task I know, but still...

 

[PHP] isset empty or ...?

2013-03-30 Thread John Taylor-Johnston

I'm using

if($mydata-DPRresponselocationaddress1 != )

is this the same as

if (!isset($mydata-DPRresponselocationaddress))
http://php.net/manual/en/function.isset.php

or

if (!empty($mydata-DPRresponselocationaddress))
http://php.net/manual/en/function.empty.php

or is there another function I have not learned yet? I don't really get 
the difference between isset and empty.


John

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