Fatal error: Uncaught exception ‘Zend_Gdata_App_HttpException’ with message ‘Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?’ in

今日朋友幫我寫了一個sample page..用來取Google Spreadsheet的資料的..
當我嘗試在我電腦上的xampp上執行時.. 出現了以下的錯誤信息:
Fatal error: Uncaught exception ‘Zend_Gdata_App_HttpException’ with message ‘Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?’ in

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport 'ssl'

因為錯誤信息指是和SSL 有關的.. 所以我便用 phpino() 來檢查一下Apache/PHP Server的設定
看到Apache 是支援SSL 的 “Apache2Handler – DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
Apache SSL Handler
但是找不到PHP 有啟用了SSL 的設定..
所以我便開啟了 php.ini 找出 “extension php_openssl.dll” 之後除去前面的”;” 便可以了
php.ini enable php_openssl.dll
儲存後 重新啟動Apache 之後再次執行 phpinfo() 便會看了 OpenSSL 啟用了
php.ini OpenSSL Enabled

當我再次執行朋友幫我寫的Sample page 也沒有再出再問題了

Hope you find it useful

Leave a Reply