I had the same problem but found out it was due to missing realm name.
in z-ocsinventory-server.conf
....
AuthType Basic
AuthName "OCS Inventory agent area"
AuthUserFile "/etc/apache2/.htpasswd"
....
and on client i had to add:
realm="OCS Inventory agent area" user=someuser password=somepassord
cheers