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

Windows incompatibility #7

Closed
renecatharsis opened this issue Oct 9, 2011 · 0 comments
Closed

Windows incompatibility #7

renecatharsis opened this issue Oct 9, 2011 · 0 comments
Assignees
Labels

Comments

@renecatharsis
Copy link

Hi,

in /src/CliController.php the following part does not work on Windows:

if (!defined('PHPCB_ROOT_DIR')) {
    define('PHPCB_ROOT_DIR', dirname(__FILE__) . '/../');
}
if (!defined('PHPCB_TEMPLATE_DIR')) {
    define('PHPCB_TEMPLATE_DIR', dirname(__FILE__) . '/../templates');
}

Windows cannot handle "./../" for paths.
Adding a "realpath" arround the path information solves the issue.

if (!defined('PHPCB_ROOT_DIR')) {
    define('PHPCB_ROOT_DIR', realpath(dirname(__FILE__) . '/../'));
}
if (!defined('PHPCB_TEMPLATE_DIR')) {
    define('PHPCB_TEMPLATE_DIR', realpath(dirname(__FILE__) . '/../templates'));
}

Haven't tested this on *nix, though.

@ghost ghost assigned voidus Dec 5, 2011
@voidus voidus closed this as completed in 1b7e5f0 Dec 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants