README 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. PHP OpenID
  2. ----------
  3. This is the PHP OpenID library by JanRain, Inc. You can visit our
  4. website for more information about this package and other OpenID
  5. implementations and tools:
  6. http://www.openidenabled.com/
  7. GETTING STARTED
  8. ===============
  9. First, run the 'examples/detect.php' script either from the command
  10. line or via the web. It will generate a report of any system
  11. configuration changes necessary to run the library.
  12. INSTALLATION
  13. ============
  14. You will need PHP 4.3.0 or greater to use this library. We have
  15. tested the library Linux on PHP 4.3.0, 4.4.1, 5.0.5, and 5.1.1. We
  16. have tested the library on Windows XP on PHP 4.4.4.
  17. Follow these steps:
  18. 1. Install dependencies.
  19. - Enable either the GMP extension or Bcmath extension. (GMP is
  20. STRONGLY recommended because it's MUCH faster!) This is
  21. required.
  22. - Enable the CURL extension.
  23. - If you plan to use SQLite, PostgreSQL, or MySQL to store OpenID
  24. data, you'll need PEAR MDB2. You can install this by running this
  25. as root:
  26. # pear install MDB2
  27. You'll also need to install and enable the appropriate PHP
  28. database extension. Alternatively, you can store OpenID data on
  29. the filesystem instead of using a relational database. Nothing
  30. special is required for using the filesystem method.
  31. - Install either the DOM or domxml PHP XML processing extension,
  32. but not both (they are incompatible).
  33. 2. Copy the Auth/ directory into your PHP include path.
  34. TESTING YOUR SETUP
  35. ==================
  36. You can use the example code to test your setup. To run the example
  37. consumer or server, follow the instructions in the examples/README
  38. file.
  39. USING THE API
  40. =============
  41. The best way to get started using the API is to take a look at the
  42. example consumer and server in the examples/ directory. See the
  43. examples/README file for more details.
  44. TROUBLESHOOTING
  45. ===============
  46. * If you're unable to use an OpenID URL with the library, you may want
  47. to try using the discover tool (examples/discover.php). This tool
  48. will perform OpenID discovery on the identifier and give a list of
  49. discovered OpenID services and their types.
  50. * On some systems, PHP basedir restrictions prevent web servers from
  51. opening a source of randomness, such as /dev/urandom. If your PHP
  52. OpenID library has trouble getting a satisfactory source of
  53. randomness, check your Apache and PHP configurations to be sure that
  54. the randomness source is in the list of allowed paths for the
  55. "open_basedir" option.
  56. * In some cases, bugs in the GMP math library will result in signature
  57. validation errors when using this library. Since GMP is preferred
  58. over bcmath (for performance), you will have to define
  59. Auth_OpenID_BUGGY_GMP in your application *before* importing any of
  60. the library code:
  61. define('Auth_OpenID_BUGGY_GMP', true);
  62. * Not all PHP installations support SSL. You can find out if yours
  63. supports SSL by reading the "HTTP Fetching" section of the output of
  64. "examples/detect.php." If your installation does not support SSL,
  65. then https:// identity URLs and server URLs will not be supported by
  66. the library. An attempt to use such an identity URL will be
  67. equivalent to using an invalid OpenID. To enable SSL support,
  68. recompile PHP with OpenSSL support or install the appropriate OpenSSL
  69. module for your platform. If you are using CURL, CURL will need to be
  70. built with OpenSSL support.
  71. GETTING HELP
  72. ============
  73. If you have any questions, recommendations, or patches, please tell
  74. us! Subscribe to our OpenID development discussion list at
  75. http://openid.net/developers/dev-mailing-lists/
  76. DOCUMENTATION
  77. =============
  78. You can view the HTML library documentation in the doc/ directory.
  79. This package's documentation is in PhpDoc format. To generate the
  80. documentation, install phpdoc and run the admin/makedoc.sh script.
  81. Phpdoc lives at:
  82. http://www.phpdoc.org/
  83. CONTRIBUTING
  84. ============
  85. If you have a bugfix or feature you'd like to contribute, don't
  86. hesitate to send it to us. Post your patch to the development list at
  87. http://openid.net/developers/dev-mailing-lists/
  88. For more detailed information on how to contribute, see
  89. http://openidenabled.com/contribute/
  90. To run the test suite included with this package, install PHPUnit 1.x
  91. and run
  92. php admin/texttest.php
  93. PHPUnit 1.x can be found at
  94. http://pear.phpunit.de/get/