I am user CodeIgniter 3 and Doctrine2. Now, when I tried to find record it works on my local server but its not woking on my web server; here is my find code
$user = $this->em->getRepository('entities\AdminAuth')->findBy(
array(
'username' => $data['username'], 'password' => $pwd
)
);
Its showed me following error on my web server,
An uncaught Exception was encountered
Type: Error
Message: Access to undeclared static property: Modules::$loader
Filename:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/Common/ClassLoader.php
Line Number: 228
Backtrace:
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Line: 904 Function: classExists
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Line: 189 Function: validateAssocations
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Line: 171 Function: validateRuntimeMetadata
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
Line: 302 Function: doLoadMetadata
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
Line: 205 Function: loadMetadata
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/ORM/EntityManager.php
Line: 268 Function: getMetadataFor
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/third_party/Doctrine/ORM/EntityManager.php
Line: 682 Function: getClassMetadata
File:
/home/tiffintom/public_html/mgt/Master_Panel/application/modules/admin/controllers/Authentication.php
Line: 21 Function: getRepository
File: /home/tiffintom/public_html/mgt/Master_Panel/index.php Line: 322
Function: require_once**
Please help me
It was happening for the version of the doctrine classLoader. I used old version classLoader from my previous project thats why it was showing error.
Related
Actually, my project is not working on the server, I have Linux based server and I got this error and one more this project working on local properly without any error.
set_error_handler
An uncaught Exception was encountered
Type: Error
Message: Class 'CI_Controller' not found
Filename: /home/madan16393/public_html/recallhotel/system/core/CodeIgniter.php
Line Number: 366
Backtrace:
File: /home/madan16393/public_html/recallhotel/application/config/routes.php
Line: 62
Function: get
File: /home/madan16393/public_html/recallhotel/index.php
Line: 629
Function: require_once
For the first time I see this message error after I put https in my codeigniter website.
Message: Call to undefined function iconv()
Filename: /home/admedica/public_html/admedicall_v1/application/views/admin/billing/bill/centro/bill.php
Line Number: 45
Backtrace:
File: /home/admedica/public_html/admedicall_v1/application/controllers/Admin.php
Line: 3981
Function: view
File: /home/admedica/public_html/admedicall_v1/index.php
Line: 315
Function: require_once
Before without https it works.
How can i solve this problem ?
I'm trying to build a script that will write data to an excel file before sending an email. I'm using PHPSpreadsheet for this, but the initial example is throwing an error. Can someone please let me know where I'm going wrong and how I can fix it.
A PHP Error was encountered
Severity: Warning
Message: ZipArchive::close(): Failure to create temporary file: Permission denied
Filename: Writer/Xlsx.php
Line Number: 374
Backtrace:
File: /Library/WebServer/Documents/Projects/app/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php
Line: 374
Function: close
File: /Library/WebServer/Documents/Projects/app/application/controllers/Login.php
Line: 52
Function: save
File: /Library/WebServer/Documents/Projects/app/index.php
Line: 323
Function: require_once
An uncaught Exception was encountered
Type: PhpOffice\PhpSpreadsheet\Writer\Exception
Message: Could not close zip file helloworld.xlsx.
Filename: /Library/WebServer/Documents/Projects/app/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php
Line Number: 375
Backtrace:
File: /Library/WebServer/Documents/Projects/app/application/controllers/Login.php
Line: 52
Function: save
File: /Library/WebServer/Documents/Projects/app/index.php
Line: 323
Function: require_once
P.S. I'm using Codeigniter and my dev machine is a macbook and server is Ubuntu16.04 on AWS.
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function mysql_connect()
Filename: C:\xampp\htdocs\Salab\system\database\drivers\mysql\mysql_driver.php
Line Number: 136
Backtrace:
File: C:\xampp\htdocs\Salab\application\third_party\MX\Loader.php
Line: 109 Function: DB
File: C:\xampp\htdocs\Salab\application\third_party\MX\Loader.php
Line: 65 Function: initialize
File: C:\xampp\htdocs\Salab\application\third_party\MX\Base.php Line:
55 Function: __construct
File: C:\xampp\htdocs\Salab\application\third_party\MX\Base.php Line:
60 Function: __construct
File: C:\xampp\htdocs\Salab\application\third_party\MX\Controller.php
Line: 4 Function: require
File: C:\xampp\htdocs\Salab\application\third_party\MX\Modules.php
Line: 123 Function: include_once
File:
C:\xampp\htdocs\Salab\application\modules\acesso\controllers\Acesso.php
Line: 3 Function: spl_autoload_call
File: C:\xampp\htdocs\Salab\index.php Line: 315 Function: require_once
Could you Send the method you using to connect to the database
you could try this
<?php
//Create Connection
$con=mysql_connect("localhost","root","");
//Create Database
$CreateDb="Create database db2";
mysql_query($CreateDb,$con);
//Select Database
mysql_Select_db("db2",$con);
?>
If you are using php7 you should move to mysqli as mysql was deprecated
If you are using an earlier version then it seems that the mysql extension is not installed or enabled (note that looking forward you'd better move to mysqli anyway)
Check in your php.ini file if you have the line and it's not commented:
extension=php_mysql.dll
Hy, I have a site based on codeigniter 3.0.6 which I am going to upgrade to 3.1.0,
I downloaded the codeigniter 3.1.0 and copy my files (view, model. controller). I changed my routes.php, database.php and config.php.
I am facing an error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Travels::$db
Filename: core/Model.php
Line Number: 77
Backtrace:
File: D:\xamp\htdocs\update\application\models\Travel.php
Line: 95
Function: __get
File: D:\xamp\htdocs\update\application\controllers\Travels.php
Line: 29
Function: all_des
File: D:\xamp\htdocs\update\application\controllers\Travels.php
Line: 41
Function: main_header
File: D:\xamp\htdocs\update\index.php
Line: 315
Function: require_once
what should I do ??
Try just replace the system folder with the new one.
Please refer to: Upgrading from 3.0.6 to 3.1.0