An uncaught Exception was encountered - Require once function - Codeigniter - php

I moved my codeigniter project from a microsoft azure server on to a new dedicated server. However I am getting nothing but issues. The site worked absolutely perfect on the azure server, none of the files have been changed or anything - but it just don't seem to work.
I first started getting errors saying that the Model can't be found, (i am still trying to fix this)
https://stackoverflow.com/posts/comments/103619729?noredirect=1
and now the latest error i get when going to a different page on my site i get
An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected ''
File: public_html/index.php
Line: 319
Function: require_once
I then looked at index.php and the line in question is :
require_once BASEPATH.'core/CodeIgniter.php';
any ideas what I can do to fix this? is it something to do with how my server is setup? do i need to change something in Apache?
Please help!

Related

Shopware 6 Installation error: Identifier dbal not initialized yet

In setting up the database installation on localhost, When I get to the database Installation section I have this error
Error
Received an error message.
URL: importDatabase
Message: Internal Server Error
Please try to fix this error and restart the update.
Response
Slim Application Error
The application could not run because of the following error:
Details
Type: RuntimeException
Message: Identifier dbal not initialized yet
File: /var/www/html/vendor/shopware/recovery/Install/src/ContainerProvider.php
Line: 196
I have tried several solutions to no avail, especially this solution here a somewhat similar question here
Any help will be much appreciated

Fatal error: Uncaught Error: Class 'Route' not found in C:\xampp\htdocs\code\project\routes\web.php:18

I have a basic Laravel project, didn't do anything to it, I just did laravel new project. I started Xampp and turned on MYSQL and APACHE, and when I try to access localhost/{path}/project I get this:
Fatal error: Uncaught Error: Class 'Route' not found in
C:\xampp\htdocs\code\project\routes\web.php:18 Stack trace: #0 {main} thrown in
C:\xampp\htdocs\code\project\routes\web.php on line 18
I don't know if this is dumb, but I looked into web.php, and i don't even have 18 lines... it only has 16... Why is this happening, what should I do?
Laravel expects that it is sitting at the root directory of your nginx/apache configuration. If it sits in a subfolder, you need to configure a rewrite to handle the route accordingly. See this link or this link for details on how to appropriately set this up.
I did manage to figure this out. The problem was that i was trying to open the wrong file... I didn't really understand what everything does, but I'm getting there. Anyway, if there is anyone that has the same problem as me, HERE is the YouTube video that helped me. Hope it is useful for someone!

fixing Zend2 Framework 404 error has now given me fatal error: ModuleEvent::setModuleName expects a string as an argument; integer provided'

Fatal error: Uncaught exception '`Zend\ModuleManager\Exception\InvalidArgumentException' with message 'Zend\ModuleManager\ModuleEvent::setModuleName expects a string as an argument; integer provided' in C:\wamp\www\zf2-tutorial\vendor\zendframework\zend-modulemanager\src\ModuleEvent.php on line 64***
I'm new to Zend and trying the Skeleton application exercise
On attempting to load http://zf2-tutorial.localhost/album I was getting error
404 -"The requested URL could not be matched by routing".***
So I then followed some suggestions on Stackoverflow and it seems to have messed things up altogether for me.
One suggestion was to put die('here'); in the indexAction to see what error shows up. So I tried it, got the above error and then deleted the same line again from indexAction.
However the same error persists and I am unable to resolve it. I'm using WAMP on Windows 8.
To try to resolve it I cleared the DNS cache, cleared browser history and cookies, restarted all services, rebooted, refreshed WAMP...but still the same. Any Ideas please?

How to troubleshoot Magento when Developer mode errors out.

I'm attempting to troubleshoot a custom module I'm working on. The website seems to work fine with no noticeable or logged errors. When I enable Magento developer mode I get a white screen. This points towards PHP errors.
When I check my server error logs I'm getting the following error:
PHP Fatal error: Class 'Mage' not found in /var/www/index.php on line 41
I'm not exactly sure what to do? Googling hasn't seemed to help much. I'm only getting this error in developer mode.
What version of Magento that you are using? It seems your index.php has been changed.
The best way to debug this, you can:
Compare your files to the freshly downloaded Magento code.
Check index.php on line 41, if there's code calling 'Mage' class
Just FYI, if the code exists and you need it. You can move the code after this code (line 68 on Community 1.8.1)
require_once $mageFilename;
Hope this help.
Try by adding the following line inside index.php at the beginning file.
$_SERVER['MAGE_MODE'] = 'developer';
Hope you will see the error message.

Fatal error: Class 'CI_Controller' not found in H:\php2\htdocs\property\system\core\CodeIgniter.php on line 233

In codeigniter i have started one property related project for my client.
I am getting an error
Fatal error: Class 'CI_Controller' not found in H:\php2\htdocs\property\system\core\CodeIgniter.php on line 233 after i have complete some development.
I have really search it for many time in google and in stackoverflow but still didn't get solved.
Thanks in advance,
Well, m not sure but i guess it can happen because of changes in database settings.
codeigniter sometimes show this very weird behaviour that giving this fatal error "CI_Controller" not found even there's nothing wrong with the core files.
so- try debugging like this-
1)check your database seetings located at config/database.php
2)If it does'nt works, re-uploading the system files.
I hope this helps.
Check your database config in application/config/database.php it's one of the major time consuming error message I faced with CI. Because the error message was simply misleading. So, check the database config first.

Categories