Just got this error. Will try to debug further.
Notice: Class 'BBC\Autolink' not found
- BBC\ParserWrapper->getAutolinkParser() in /sources/subs/BBC/ParserWrapper.php at line 419
- call_user_func() in /sources/subs/BBC/ParserWrapper.php at line 130
- BBC\ParserWrapper->getParsersByArea() in /sources/subs/BBC/ParserWrapper.php at line 183
- BBC\ParserWrapper->parse() in /sources/subs/BBC/ParserWrapper.php at line 224
- BBC\ParserWrapper->parseSignature() in /sources/Load.php at line 1045
- loadMemberContext() in /sources/controllers/Profile.controller.php at line 99
- Profile_Controller->action_index() in /sources/SiteDispatcher.class.php at line 304
- Site_Dispatcher->dispatch() in /index.php at line 262
- elk_main() in /index.php at line 192
http://localhost/Elkarte/index.php?action=profile;u=100
Only happens on PHP 7.1. 7.0 is fine.
Interesting ... do you know what changed in 7.1 that caused this issue?
O_o
What's the easiest way to have multiple versions of php handy?
on my vps handled by serverpilot I can choose from 5 versions of php: 5.4, 5.5, 5.6, 7.0, 7.1
on my laptop using Mint 18 (derivate of Ubuntu 16.04) which comes with php 7.0 I was able to install and switch from php5 to php7, I used this guide to do this:
http://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04/762161#762161
no.. this may help you http://php.net/manual/en/migration71.php
wamp
http://www.wampserver.com/en/
Hey if I had time to RTFM I would not have asked LOL :P
I use vagrant for my multiple php versions, so just *nix with multiple php versions installed. I then ssh into the box and point the web server at whichever version I want to run. Recently I've started to play with a multi-machine setup where the db is in one instance and the web in the other, then I can share that db across multiple web versions and simply start "up" the version I want so I don't even have to ssh in to the box.
I kinda failed in setting up multiple php in ispconfig though it is fully working if run directly under ubuntu. :D
So, normally, I just use
UniServer (https://sourceforge.net/projects/miniserver/) to test multple php in windows.
On Vagrant works fine with 7.1, I feel like it may be a windows issue, I'll install wamp and see.
The mystery deepens !
Actually, not even php 7 works.
It's windows specific, and even more the problem is stream_resolve_include_path that in 5.6 resolves properly to sources\subs\BBC\Autolink.class.php, while in php 7.x resolves to sources\Autolink.class.php
Any idea before I start reading about this function? (Hint: I would avoid having to read. LOL)
AHA!
No need to read, it doesn't like the "absolute" reference \BBC\Autolink that is added by the autoloader.
Remove it may break other things so... we have to check and think about it.
Actually, digging a bit more, the autoloader behaves in a completely different manner between windows and linux in php 7 and between windows and linux in general...
/me smells troubles
The easiest solution I found so far to the specific problem is to prefix all the namespaces of the BBC classes with ElkArte... :-\
@live627 could you try the attached patch?
It's another way to work around the issue.
I'm not sure which one to pick, though.
Fixed.
I didn't know patch files could create commits.
Neither did I... lol
namespace BBC;
interface Database
namespace ElkArte\sources\modules;
Do not you think that it is necessary to use a single namespace for the entire project?
http://www.php-fig.org/psr/psr-4/
Example:
\Elk\Sources\Database\DB;
\Elk\Sources\Subs\BBC;
\Elk\...
(I think I already wrote about this)
https://github.com/elkarte/Elkarte/issues/2809 <= best place for this discussion! :D
my include path, before error
php 7.1
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
C:\apache\php\localhost\www\elk11-fix/addons;
C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs/CacheMethod;
\BBC;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
C:\apache\php\localhost\www\elk11-fix/addons;
C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs/CacheMethod;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
C:\apache\php\localhost\www\elk11-fix/addons;
C:\apache\php\localhost\www\elk11-fix/sources;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
C:\apache\php\localhost\www\elk11-fix/addons;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
.;
.C:\apache\php\localhost\www\elk11-fix/sources;
.;
.;
C:\php\pear
next
.C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs;
C:\apache\php\localhost\www\elk11-fix/sources/controllers;
C:\apache\php\localhost\www\elk11-fix/sources/admin;
C:\apache\php\localhost\www\elk11-fix/addons;
C:\apache\php\localhost\www\elk11-fix/sources;
C:\apache\php\localhost\www\elk11-fix/sources/subs/CacheMethod;
\BBC;
C:\apache\php\localhost\www\elk11-fix/sources/subs/MentionType;
error
how to save? there is a conflict. manually like there is no errors
Okay, back a second: are you using the beta 4 or the HEAD of the repository?
I'll wait rc1
BTW, I wrote the BBC as a root namespace because I was hoping it would become its own project.
I remember, honestly the current solution is just a workaround, in 2.0 we should better fix the issue.
Also, since the idea is to have a completely separated project, the most appropriated place for the code is the ext directory. ;)