The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Moving Languages to Database - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Moving Languages to Database (/showthread.php?tid=368) |
Moving Languages to Database - firestorm - 07-19-2017 wouldnt you do: <pre> Code: $lang = array_merge($lang, array($row->content1 => $row->content2)); basicly check the contents of the foreach Moving Languages to Database - Brandin - 07-19-2017 Yes - I definitely would and have changed this - but I still cannot get it to get to this point because it can't find the DB class... Moving Languages to Database - karsen - 07-21-2017 I tried to figure this out and the only thing I could think of is that maybe it's having an issue finding the class file because you're in the helpers folder and not users? But if that were the case then all the Code: require_once' Moving Languages to Database - firestorm - 07-21-2017 maybe have a go at using my autoload class and see if it works as db class and all other classes will autoload. just require_once before session_start in init.php nothing to lose Moving Languages to Database - Brandin - 07-22-2017 @Firestorm Unfortunately migrating to the Auto Loader did this and we die: <pre> Code: Warning: require_once(/classes/class.autoloader.php): failed to open stream: No such file or directory in /home/aircentralized/public_html/mydash/users/init.php on line 2 Code: Fatal error: require_once(): Failed opening required '/classes/class.autoloader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aircentralized/public_html/mydash/users/init.php on line 2 Definitely want to migrate to this though if I can get it working. I put this file in classes...that is right, correct? And @karen that's what I am thinking!!! I do not get why it cannot find the DB class...it has NO problem in every other script and this is formatted JUST like the rest of them...I call init and that is it...I don't get it. I am calling init...I am immediately trying to go to Code: $db = DB::getInstance(); Anyone have any ideas? Moving Languages to Database - karsen - 07-22-2017 Until you get the autoloader working, try creating a language.php file in /usersc and then Code: require_once Moving Languages to Database - Brandin - 07-23-2017 It's not the directory... Fatal error: Class 'DB' not found in /home/aircentralized/public_html/mydash/usersc/language.php on line 4 I don't get why this isn't working...it doesn't make any sense to me...I'm calling the init which should initialize the DB class... Moving Languages to Database - firestorm - 07-23-2017 try removing the backslash from start of the path, it should look like this: require_once 'classes/class.autoloader.php'; Moving Languages to Database - Brandin - 07-24-2017 So I feel a LITTTTTTLE bit stupid... Helpers (which calls language) is called BEFORE the DB class............. Yeah I'm stupid lol The autoloader would have fixed this if I was able to get it deployed, but unfortunately I couldn't Thank you guys for all your help - you guys are awesome! |