Can't load sparks in CodeIgniter - php

I installed sparks for CodeIgniter(v2.1.2) via command line. no errors. But I can't load sparks.
my code is
$this->load->spark('redis/0.4.1');
$this->redis->set("foo", "bar");
$this->load->spark('redis/0.4.1'); returns true, so it should be loaded, but I get the error
[CIUnit] PHP Error: Notice - Undefined property: <myController>::$redis
also tried it with another spark, same error. Any help?

Related

Fatal error: Uncaught Error: Call to undefined function PDFNet_Initialize

I am trying to run PDFTron for php following the instructions.
However, when called: PDFNet::Initialize(); i'm getting an error
Fatal error: Uncaught Error: Call to undefined function PDFNet_Initialize() in .../PDFNetPHP_core.php
I assume that PDFNet_Initialize is part of extension because i can't see declaration in PDFNetPHP_core.php file
I setup exenstion PDFNetPHP.so and enable_dl = on in php.ini. Also when i run test in PDFNetWrappers/Samples/AddImageTest/PHP then it's looks ok:
PDFNet is running in demo mode.
Permission: write
Done. Result saved in addimage.pdf...<br />
when i run php -m module PDFNetPHP is on list
what am I doing wrong?
If the sample code is working on your end, it's likely that your project is unable to find the libPDFNetC.soshared library. The RunTest.sh in the AddImageTest sample sets the following environment variable:
export LD_LIBRARY_PATH=../../../PDFNetC/Lib
You might need to add the .so explicitly, or at least put the .so in a folder that PHP will load .so files from. See your PHP documentation. Please also see the following post:
https://stackoverflow.com/a/35442777/3761687

PHP Fatal Error with Userfrosting now server always shows Error 500

I was managing my server and after a composer update I receive this message:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to UserFrosting\System\Facade::setFacadeContainer() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /home/arteller/www/userfrosting/app/system/UserFrosting.php on line 53 and defined in /home/arteller/www/userfrosting/app/system/Facade.php:210
After this, I receive only 500 Internal Error from my server.
The error persists every time I also try to use the command "php bakery bake" or something related to bakery.
Anyone can help?
You need to update to UserFrosting 4.3.3 or later, and run composer update again. This issue was introduced by Slim, which introduced a breaking change recently.

Ion Auth - "sess_destroy()" Fatal Error when logging out

I have downloaded the very latest version of IonAuth for Codeigniter on GitHub. It is a very good library however when I try to logout after logging in I get the following error (which I've had in previous builds) - I know I can just comment the lines out but is there a reason for the errors?
Fatal error: Call to undefined method CI_Session::sess_destroy() ....\Ion_auth.php on line 381
I just kept them commented out.. seems to wrk

Fatal error: Call to undefined method SplFileInfo::getRealPath()

I've got a client who has just set up a new VPN and is attempting to install my plugin.
He's getting the following error:
Fatal error: Call to undefined method SplFileInfo::getRealPath() on the commented line below. This appears to have something to do with the ZEND libraries. Any ideas what I should tell him to do?
If you are getting the undefined error means you have lower version of PHP.
The function is supported after PHP 5.2.2
SplFileInfo::getRealPath
(PHP 5 >= 5.2.2)
SplFileInfo::getRealPath — Gets
absolute path to file
http://php.net/manual/en/splfileinfo.getrealpath.php

UAgent CodeIgniter Library Installation Errors

The codeigniter library, UAgent, is giving me errors on installation. Here is the error:
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for Shared_Framework::__construct(),
called in /system/libraries/Loader.php on line 928 and defined
Filename: libraries/Shared_Framework.php
This happens when I execute the following code:
$this->load->library('Shared_Framework');
$this->load->library('Uagent');
This is what the manual says to do but I can't figure out how to fix the error. Here is the link to the library just in case: http://www.vvvlad.com/resources/uagent
The constructor requires that you pass a parameter, just load the library like this instead:
$this->load->library('Shared_Framework',$params);

Categories