-1

I need to access a function from a php class in the the ckfinder config file but when I try to include the file or set up a new object of that class in the config.php file, ckfinder just throws up an invalid request error.

In my chrome console I get a 500 error for the connector.php only when I have the include for new object lines in my config.php. Does anyone know why this is happening or how I can get around it?

The code that I have tried is:

require dirname($_SERVER['DOCUMENT_ROOT']).'/web/libs/tbl/clients-lib.php';
$clients = new clients();

These both throw up the invalid request error in the ckfinder widget. I've also tried using include instead of require but this made no difference. I noticed when the file path is wrong it doesn't give me an error but when it is correct it does. As for creating a new object I have try lots of different class but all give me the same error.

  • 1
    Does people have to guess what you already tried and how you code it? Do you think everybody can read your code on your computer? No. You have to put your code in your question... – Al Foиce ѫ Oct 13 '16 at 07:35
  • probably there's a syntax or logical error in the code you've added. HTTP 500 means "internal server error" which usually means something has gone wrong with the logic in the script. But without seeing it, we just have to guess. – ADyson Oct 13 '16 at 07:57

1 Answers1

0

Turns out it wasn't anything to do with ckfinder, just like people said. The file I was trying to include was extended by another file that it couldn't find. I included all the file it was extended by and it worked.