The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving Languages to Database
#21
wouldnt you do:

<pre>
Code:
$lang = array_merge($lang, array($row->content1 => $row->content2));
</pre>

basicly check the contents of the foreach
  Reply
#22
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...
  Reply
#23
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'
lines in init.php should break too.
  Reply
#24
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
  Reply
#25
@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
</pre>


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();
but it for some reason doesn't know what "DB" is!!! Grr!

Anyone have any ideas? Sad
  Reply
#26
Until you get the autoloader working, try creating a language.php file in /usersc and then
Code:
require_once
your language.php and other files and see if you get the same problem. If not, then the problem has to do with working out of the helpers directory.
  Reply
#27
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...
  Reply
#28
try removing the backslash from start of the path, it should look like this:

require_once 'classes/class.autoloader.php';

  Reply
#29
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 Sad

Thank you guys for all your help - you guys are awesome!
  Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)