Zitat:
Zitat von meikel
Poste doch bitte erst mal das Script (OHNE ZUGANGSDATEN) und
die komplette Fehlermeldung.
Ebenfalls von Interesse:
welche PHP Version und welche ServerAPI (apache2handler oder fastCGI) werden eingesetzt? Diese Angaben findest Du mit dem Miniscript:
|
Oke, hier das Original-Script, an das ich über ein Formular mehrere Empfänger übergeben möchte:
PHP-Code:
<?php
include "WebSmsCom_Toolkit.inc";
# Modify these values to your needs
$username = 'your_username';
$pass = 'your_password';
$gateway_url = 'https://api.websms.com';
$recipientAddressList = array("4367612345678");
$utf8_message_text = "Testnachricht";
$maxSmsPerMessage = 1;
$test = false; // true: do not send sms for real, just test interface
try {
// 1.) -- create sms client (once) ------
$smsClient = new WebSmsCom_Client($username, $pass, $gateway_url);
$smsClient->setVerbose(true);
// 2.) -- create text message ----------------
$message = new WebSmsCom_TextMessage($recipientAddressList, $utf8_message_text);
// 3.) -- send message ------------------
$Response = $smsClient->send($message, $maxSmsPerMessage, $test);
// show success
print_r(array(
"Status : ".$Response->getStatusCode(),
"StatusMessage: ".$Response->getStatusMessage(),
"TransferId : ".$Response->getTransferId(),
));
// catch everything that's not a successfully sent message
} catch (WebSmsCom_AuthorizationFailedException $e) {
exit("AuthorizationFailedException caught: ".$e->getMessage()."\n");
} catch (WebSmsCom_ApiException $e) {
echo $e; // possibility to handle API status codes $e->getCode()
exit("ApiException Exception\n");
} catch (WebSmsCom_HttpConnectionException $e) {
exit("HttpConnectionException caught: ".$e->getMessage()."HTTP Status: ".$e->getCode()."\n");
} catch (WebSmsCom_UnknownResponseException $e) {
exit("UnknownResponseException caught: ".$e->getMessage()."\n");
} catch (Exception $e) {
exit("Exception caught: ".$e->getMessage()."\n");
}
?>
Und hier die vorher eingebettete Datei WebSmsCom_Toolkit.inc als Zip (da Meldung kam, es sei zu lang zum Posten).
In Zeile 615 geht's um die Fehlermeldung must be numeric.
Auch die komplette phpinfo hab ich gleich dortrein kopiert.
Kurz:
PHP 5.2.17 ist auf Linux x86_64bit, mit der Server API: Apache 2.0 Handler