php-general Digest 5 Feb 2012 14:54:42 -0000 Issue 7675
Topics (messages 316459 through 316463):
Re: Function links on error and warningmessages
316459 by: Ford, Mike
316461 by: Matijn Woudt
Typecasting question
316460 by: jas
316462 by: Marco Behnke
316463 by: Shawn McKenzie
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 ---
> -----Original Message-----
> From: Florian Müller [mailto:florip...@hotmail.com]
> Sent: 03 February 2012 14:36
>
> Hi guys,
>
> I was wondering some time ago, why the links which are shown on
> error or warning (E_WARNING etc.) show relative links to an usually
> non-existing file.
Because you haven't set the docref_root configuration option?
(See http://php.net/errorfunc.configuration.php#ini.docref-root).
Cheers!
Mike
--
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Portland PD507, City Campus, Leeds Metropolitan University,
Portland Way, LEEDS, LS1 3HE, United Kingdom
E: m.f...@leedsmet.ac.uk T: +44 113 812 4730
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--- End Message ---
--- Begin Message ---
On Fri, Feb 3, 2012 at 4:35 PM, Ford, Mike <m.f...@leedsmet.ac.uk> wrote:
>> -----Original Message-----
>> From: Florian Müller [mailto:florip...@hotmail.com]
>> Sent: 03 February 2012 14:36
>>
>> Hi guys,
>>
>> I was wondering some time ago, why the links which are shown on
>> error or warning (E_WARNING etc.) show relative links to an usually
>> non-existing file.
>
> Because you haven't set the docref_root configuration option?
> (See http://php.net/errorfunc.configuration.php#ini.docref-root).
>
>
> Cheers!
>
> Mike
>
While that's indeed correct, I wonder why the docref_root isn't set by
default (eg. www.php.net)?
- Matijn
--- End Message ---
--- Begin Message ---
I am familiar with typecasting. Booleans, ints, strings, etc.
However while using an extension, more specifically the OpenSSL
extension I have come across a problem I am not entirely familiar with.
I have an array that looks like...
array('config' => 'config/openssl.cnf',
'encrypt_key' => true,
'private_key_type' => 'OPENSSL_KEYTYPE_RSA',
'digest_algorithm' => 'sha256',
'private_key_bits' => 512,
'x509_extensions' => 'usr_cert',
'encrypt_key_cipher' => 'OPENSSL_CIPHER_3DES');
And according to the current OpenSSL documentation regarding the
configuration constants
(http://www.php.net/manual/en/openssl.ciphers.php) the array needs to
have the 'private_key_type' and 'encrypt_key_cipher' elements as an INT
value vs the string they are currently. Like so.
array('private_key_type' => OPENSSL_KEYTYPE_RSA,
'encrypt_key_cipher' => OPENSSL_CIPHER_3DES);
I have tried to perform typecasting these two elements as an int but
because they are specific to the extension I am not certain how I should
go about doing this.
According to the source for php (the openssl.c) file is an internal
attribute that I cannot find an integer value for to set it manually vs.
using the pre-defined constant values mentioned in the docs.
--- End Message ---
--- Begin Message ---
Am 03.02.12 17:11, schrieb jas:
> I am familiar with typecasting. Booleans, ints, strings, etc.
>
> However while using an extension, more specifically the OpenSSL
> extension I have come across a problem I am not entirely familiar with.
>
> I have an array that looks like...
>
> array('config' => 'config/openssl.cnf',
> 'encrypt_key' => true,
> 'private_key_type' => 'OPENSSL_KEYTYPE_RSA',
remove the quotes around the constant, it must be
'private_key_type' => OPENSSL_KEYTYPE_RSA,
> 'digest_algorithm' => 'sha256',
> 'private_key_bits' => 512,
> 'x509_extensions' => 'usr_cert',
> 'encrypt_key_cipher' => 'OPENSSL_CIPHER_3DES');
same here
--
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3
Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz
Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal
http://www.behnke.biz
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
On 02/03/2012 10:11 AM, jas wrote:
> array('private_key_type' => OPENSSL_KEYTYPE_RSA,
> 'encrypt_key_cipher' => OPENSSL_CIPHER_3DES);
Look like ints to me: var_dump():
array(2) {
["private_key_type"]=>
int(0)
["encrypt_key_cipher"]=>
int(4)
}
--
Thanks!
-Shawn
http://www.spidean.com
--- End Message ---