Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAS Autoloader adds itself unnecessarily to the path using set_include_path #51

Closed
drysdaleb opened this issue Aug 27, 2012 · 1 comment

Comments

@drysdaleb
Copy link
Contributor

Hello,

Recently we encountered a problem when deploying phpCAS in a production environment with the include path in other parts of our application.

On investigation we found that phpCAS is calling set_include_path at the bottom of the CAS/Autoload.php if it does not find itself on the include path.

This causes includes in other files that rely on the relative path to the file they're including to fail under certain circumstances. In addition it negatively impacts on application performance as changing the include path at runtime is inefficient.

This issue is seen when you're including folders files from below the current working directory which include files in their current working directory, when the system include path is blank.

The fix for this is to remove the calls to set_include_path in Autoload.php and to update the CAS_autoload function to reference the current library location instead.

@jfritschi
Copy link
Contributor

Patch applied. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants