Welcome Guest, Not a member yet? Register   Sign In
Parse error including vendor/autoload.php
#9

Just going back and looking at this, then checking against the CI repo, it looks like the default index.php for 2.2.1 is currently ~205 lines, so really line 241 doesn't tell us much about the state of the application when you attempt to load Composer.

If you use APPPATH or FCPATH, you need to make sure they're defined, first. In the default index.php, APPPATH is defined right before the call to CodeIgniter.php, so we're really talking about loading Composer between the definition of APPATH and the require_once for CodeIgniter.php. My index.php is more or less the one included with Bonfire, and it's a bit of a mix between 2.2.1 and 3.0. In Bonfire's case line 241 is before APPPATH is defined.

If you put it into a library, it's going to depend on where you load the library.

Another thing to consider is that an error like "syntax error, unexpected ';'" may indicate some error on a previous line, like an unterminated string (mismatched quotation marks, perhaps?) or an unmatched brace on an if/else, switch, or loop.
Reply


Messages In This Thread
RE: Parse error including vendor/autoload.php - by mwhitney - 04-08-2015, 11:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB