Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

path names, cannot locate namespaces

Started by albert drent -   in Getting Started

I tried to create the sample application in my development environment. Took some effort to understand what is happening, but eventually, I got it working. Then I deployed to an external host and I got all kind of namespace issues. Some classes could not be found. Tracing it down I discovered that the separator in the file names that were passed to the autoloader differs. In the sample, a backslash is used, but in the autoloader a forward slash causing a file name containing both type of slashes. If you type that into the web browser then all will be changed in a forward slash. However, if you use a PHP function like file_exists then on windows the file will be found, but on Linux, it will not. I had to make sure that the separator was consistent with a forward slash to make it work. Might be my misunderstanding, but I hope this will be helpful to someone.