[TYPO3-caretaker] Trouble creating a caretaker instance

Michiel Roos [netcreators] michiel at netcreators.com
Tue Dec 15 15:52:17 CET 2009


Op 12/14/09 4:38 PM, Francois Suter schreef:
> Hi all,
> 
> I'm trying to install caretaker_instance for a new machine to monitor. I
> took the latest version from the SVN repository (rev 27682). But I got
> the following warning and no public/private key pair was generated:
> 
> [14-Dec-2009 15:29:30] PHP Warning:  openssl_pkey_export() [<a
> href='function.openssl-pkey-export'>function.openssl-pkey-export</a>]:
> cannot get key from parameter 1 in
> /home/fim/public_html/typo3conf/ext/caretaker_instance/classes/class.tx_caretakerinstance_OpenSSLCryptoManager.php
> on line 96
> [14-Dec-2009 15:29:30] PHP Warning:  openssl_pkey_get_details() expects
> parameter 1 to be resource, boolean given in
> /home/fim/public_html/typo3conf/ext/caretaker_instance/classes/class.tx_caretakerinstance_OpenSSLCryptoManager.php
> on line 98

Hi Francois,

I have the exact same problem on multiple hosts. Some hosting providers
have a broken PHP install.

I created a bug about it here (it's realy not a bug in caretaker):

http://forge.typo3.org/issues/show/5516

I use the following solution on a server that does have a proper PHP.
Whenever I need a key-pair, I call the following script frome somewhere
on the 'sane PHP' server:

________________________________________________________________________________

<?php

    $keyPair = openssl_pkey_new();

    openssl_pkey_export($keyPair, $privateKey);

    $publicKey = openssl_pkey_get_details($keyPair);
    $publicKey = $publicKey['key'];

    $publicKey = str_replace("\n", '|', $publicKey);
    $privateKey = str_replace("\n", '|', $privateKey);


?>

<html>
	<head>
	<script type="text/javascript">
		function SelectAll(id)
		{
			document.getElementById(id).focus();
			document.getElementById(id).select();
		}
	</script>

	</head>
	<body>
		<form name="blip">
			Public: <input id="pub" onclick="SelectAll('pub');" name="pub"
value="<?php echo $publicKey ?>" size="150" /><br/>
			Private: <input id="priv" onclick="SelectAll('priv');" name="priv"
value="<?php echo $privateKey ?>" size="150" /><br/>
		</form>
	</body>
</html>
________________________________________________________________________________

-- 

Met vriendelijke groet / Warm regards,


Michiel Roos
TYPO3 Developer
Certified TYPO3 Integrator

t. 06 458 7 8 9 10
w. netcreators.com
_____________________________________________
Netcreators: Open Source, Open Minds, Open People
_____________________________________________

TYPO3 Developer gezocht, lees de vacature online:
http://www.netcreators.com/bedrijf/vacatures-typo3-developer/


More information about the TYPO3-project-caretaker mailing list