php-general Digest 31 Mar 2013 04:54:24 -0000 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
----------------------------------------------------------------------
--- Begin Message ---
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 ---
--- Begin Message ---
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 ---
--- Begin Message ---
> 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 ---
--- Begin Message ---
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...
>
> ( 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');
> }
I don't seem to have the DateTime object. We are running 5.1.6 and
that was added in 5.2.0. We are getting the Date module from an
external extension. I'll have to see about upgrading.
--- End Message ---
--- Begin Message ---
On 28-3-2013 22:40, Larry Martell wrote:
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...
( 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');
}
I don't seem to have the DateTime object. We are running 5.1.6 and
that was added in 5.2.0. We are getting the Date module from an
external extension. I'll have to see about upgrading.
Well, if you're getting the Date class from a custom extension, then we
can't help you. Simply because we have no clue what the extension's code
is.
Also, please ask your host to upgrade, 5.1.6 is hopelessly outdated (and
unsupported!). The current version is 5.4 with 5.5 coming out very very
soon.
--- End Message ---
--- Begin Message ---
On Thu, Mar 28, 2013 at 4:55 PM, Maciek Sokolewicz
<maciek.sokolew...@gmail.com> wrote:
> On 28-3-2013 22:40, Larry Martell wrote:
>>
>> 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...
>>>
>>> ( 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');
>>> }
>>
>>
>> I don't seem to have the DateTime object. We are running 5.1.6 and
>> that was added in 5.2.0. We are getting the Date module from an
>> external extension. I'll have to see about upgrading.
>>
> Well, if you're getting the Date class from a custom extension, then we
> can't help you. Simply because we have no clue what the extension's code is.
>
> Also, please ask your host to upgrade, 5.1.6 is hopelessly outdated (and
> unsupported!). The current version is 5.4 with 5.5 coming out very very
> soon.
>
The extension is this:
http://pear.php.net/package/Date/docs/latest/Date/Date.html - but that
is also a very old version. I am working on getting the upgrade done.
--- End Message ---
--- Begin Message ---
I am using a php oauth library which is trying to make secure
connections to the oauth server and failing I think because the
oauth server uses a self signed cert. How do get php/openssl to
trust the cert... where do I import the cert. The cert store is
obvious in the openssl implementation I compiled php to use, but
where is the cert store when using php/openssl?
Any help appreciated please.
--- End Message ---
--- Begin Message ---
Turned out that this was due to cafeFS in cloudlinux, and i had to copy
the php.ini file inside cafeFS skeleton, so not any php issue in this case
I thank you all for your inputs
On Thu, Mar 28, 2013 at 7:52 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:
> On 3/27/2013 8:43 PM, Daniel Fenn wrote:
>
>> I think ";magic_quotes_gpc = Off" should be "magic_quotes_gpc = Off"
>>
>> Then restart apache/php or whatever it is your running
>>
>> Regards,
>> Daniel Fenn
>>
>>
>>
>>
>>
>>
>> On Thu, Mar 28, 2013 at 11:39 AM, Madan Thapa <madan.feedb...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I installed php 5.3.23 recently on a CentOS sever and magic_quotes_gpc
>>> stays on even when disabled in php.ini
>>>
>>>
>>> root@server [~]# grep magic_quo /usr/local/php5.3/lib/php.ini
>>> ; magic_quotes_gpc
>>> ;magic_quotes_gpc = Off
>>> magic_quotes_runtime = Off
>>> magic_quotes_sybase = Off
>>> root@server [~]#
>>>
>>>
>>>
>>>
>>> php info results:
>>>
>>> magic_quotes_gpcOnOnmagic_**quotes_runtimeOffOffmagic_**
>>> quotes_sybaseOffOff
>>>
>>>
>>>
>>> Is anyone aware of such issues for php 5.3.23 ? or any where i might
>>> look
>>> at in troubleshooting this?
>>>
>>>
>>> Please advise.
>>>
>>> Thank you
>>>
>> could also be that there is another ini file conflicting with your
> settings. That happened to me.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
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
--- End Message ---