Tuesday, November 4, 2014

sendmail: Authorization failed

sendmail: Authorization failed (535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 wr9sm385093wjb.42 - gsmtp)

sendmail: Authorization failed (534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 dw9sm955443wib.0 - gsmtp)

If were trying to send email from your host using SSMTP and your gmail account and you got this error, don't pannic it's easy to resolve...

Go to https://www.google.com/settings/security/lesssecureapps and enable "Less secure apps" mode.

Friday, May 16, 2014

3074455752:error:27069065:OCSP routines:OCSP_basic_verify:certificate verify error:ocsp_vfy.c:125:Verify error:self signed certificate
If you are dealing with OCSP server you will get this error if you don't specify the path of CA certificate file in your query, so just add the -CA param followed by the relative/absolute path as follow

openssl ocsp -CA <PUT CA CERT PATH HERE> ...

Wednesday, April 30, 2014

ldap_bind(): Unable to bind to server: Protocol error
You have to specify the protocol version prior before making a call to ldap_bind(), when the server is expecting LDAP protocol version 3. else you will receive the above error

In order to avoid this, make this call:

<?php
ldap_set_option($ldapConnResult, LDAP_OPT_PROTOCOL_VERSION, 3);
?>

Where $ldapConnResult  is the result returned by ldap_connect() function.

Call to undefined function ldap_connect()

Call to undefined function ldap_connect()
Just go to php.ini file and un-comment php_ldap extension line

Thursday, April 24, 2014

PEM routines:PEM_read_bio:no start line

PEM routines:PEM_read_bio:no start line
 I got this error when I tried to convert a private key to PKCS12 format using openssl_pkcs12_export() function under PHP, after 48 hours of trying many solutions I finally found the wright one, it's soo simple just change the format of the private key (PEM encoded) from

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,25E7BB5EB27D828C

<--- Private key here ----->
-----END RSA PRIVATE KEY-----

to

-----BEGIN RSA PRIVATE KEY-----
<--- Private key here ----->
-----END RSA PRIVATE KEY-----
 
That's all !

I reported this error to PHP and it's published on function manual http://www.php.net/manual/en/function.openssl-pkcs12-export.php#114908

Wednesday, April 23, 2014

error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt error:0906A065:PEM routines:PEM_do_header:bad decrypt
I got this error while working with OpenSSL library  on PHP, this happen when you try to export the private key of a certificate using bad passphrase, just make sure taht you are using the wright one.

Thursday, March 13, 2014

Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0
  The web server can't load an external php file, to patch it, go to php.ini file, find allow_url_include=off  and set it to on, restart all apache services and it's done !

Note: it's insecure to allow external files to be included in your web page (see why) so use it on your own risk.