I am using glassfish4 server and codeigniter php framework.
I am new to glassfish server. I followed the oracle documentation for installing and configuring glassfish4 with quercus-4.0.1 and simple php scripts running well.
But when come to codeigniter framework, I got the following error:
Message: Method call 'item' is not allowed for a null value.Filename:
libraries/Session.php
I am getting this error even after modified the session.php file. If I not invoke the session class, then this error will not show, but the whole frame will not work. Any solution?
Related
I have few controllers in my zf2 project which work perfectly in the browser using apache and via command line.
However, I recently installed MongoDb so I can store some data using the driver found in (http://php.net/manual/en/set.mongodb.php)
My issue is, when I try to access the driver via controller + browser, I get the following message error in my apache logs :
PHP Fatal error: Class 'MongoDb\Driver\Manager' not found.
'MongoDb\Driver\Manager' is the namespace for this Driver.
If I execute some other controllers via command line, MongoDb works correctly.
Does anyone know why is this happening? I cannot see the issue :(
Thank you
I found that my php.ini was pointing to mongo.so instead of mongodb.so
That fixed the issue
http://php.net/manual/en/mongodb.installation.manual.php
Thank you for your help
I am using the phpmailer api to send mails in a joomla site with the RSForm! Pro 1.52.9 component.
All was working ok but today I start to getting the following error when summiting a form build with the RSForm component:
PHP Fatal error: Only variables can be passed by reference in .../libraries/vendor/phpmailer/phpmailer/class.phpmailer.php on line 1182
I am using joomla 3.6 and my php version is php 5.3
The problem was resolved by changing the php version to 5.6.
I attempting to setup Phalcon PHP using a Mongo database connection. I have configured my bootstrap (index.php) file using the following:
// Mongo database connection
$di->set('mongo', function(){
$mongo = new Mongo();
return $mongo->selectDb("phalcon");
}, true);
// Collection Manager
$di->set('collectionManager', function(){
return new \Phalcon\Mvc\Collection\Manager();
});
Whenever I attempt execute an insert fucntion in using this connection, I receive a 500 Internal server error. Now, I have checked my apache server error logs and it states "PHP Fatal error: Class 'Mongo' not found in /var/www/phalcon-mongo/public/index.php on line 17".
I don't know why this request is not processing, according to the documentation given from Phalcon, the connection to mongo DB is setup up as I have displayed above.
If anyone has any advice, please let me know.
i think it's because your installation of Mongo is not valid.
try printing phpinfo() and check if mongo is loaded at all, if not - install it, add to ini files (if you use cli, don't forget to add to cli ini too) and reach the moment, when mongo is fully loaded.
try mongo w/o phalcon. any simple connection/insertation. you can see here: Fatal Error - 'Mongo' class not found that there are problems with apache module version for some people. Try reinstalling different mongo version.
if you can print this out:
echo Phalcon\Version::get();
there should be no problems with phalcon instalation
to validate mongo installation, try any of examples from php.net:
http://www.php.net/manual/en/mongo.tutorial.php
if both installations are valid, then there are problems with your custom code, but before doing anything you have to validate both installations.
I am running PHP 5.3 on my local Windows 7 Laptop (have tried this all on our development server with no success, so I tried to see if I could get it to work on my laptop successfully first). When I call the following script:
$objAltovaXML = new COM('AltovaXML.Application');
I get the error:
Uncaught exception 'com_exception' with message 'Failed to create COM object `AltovaXML.Application': Access is denied.
I have checked using a PowerShell script I have found elsewhere on StackOverflow and have confirmed tht AltovaXML.Application is properly registered.
But how do I give my PHP script access to it?
While it should work I would just wrap a script around COM object and invoke that script via exec. Saves you a lot of trouble and is easy to debug separately and understand what exactly is going on.
Has anyone else out there had this problem and found a possible solution. Im not getting any error msg's, simply that no data is been returned from the command line when the database class is either loaded automatically or from the controller.
(This is for CodeIgniter Reactor version.)
Update:
Reported this as a bug:
https://bitbucket.org/ellislab/codeigniter-reactor/issue/85/
Im using cURL to run the script for now and not direct php,
so this:
curl http://localhost/~derrick/mywebsite/index.php/task/run
instead of this:
php Users/derrick/sites/mywebsite/index.php task run
for now until the problem has been resolved.