Phalcon PHP - Controller handler class cannot be loaded - php

I have an application written in Phalcon 2. This application runs locally normally, everything works. My problem is to make it run on an Amazon Ec2 Linux server. Some controllers work normally, the routes are OK.
My problem is with some controller inside the admin area. Not all controllers give me errors, some work. This is the error I get:
AdminproductController handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('AdminproductCon...', 2)
#1 [internal function]: Phalcon\Dispatcher->_dispatch()
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 /var/www/html/public/index.php(31): Phalcon\Mvc\Application->handle()
#4 {main}
I've been reading about this error on Phalcon's forum and so far none of the answers solve my issue yet. What I'm trying to do is check if it is a case sensitive problem. But no matter what I do, the controller never loads and the error messages are always the same.
Would you have some tips, like steps or a checklist, for me to follow to try to fix this issue?

Maybe AdminproductController must be called AdminProductController or a class file was renamed and you have to change the usage of the class. Also read #Timothy's comments.

Related

Wordpress wp-admin fatal error

I have just switched my website's hosting and it is giving me error in opening the wordpress admin panel page. Can any body help me out. Thankyou
Fatal error: Uncaught Error: Call to undefined function eregi() in
/home/atifchat/public_html/pakistanivoicechat.com/wp-content/plugins/google-bot-bling/google-bot-bling.php:59
Stack trace: #0
/home/atifchat/public_html/pakistanivoicechat.com/wp-includes/class-wp-hook.php(298):
thisismyurl_google_bot_bling_init_code('') #1
/home/atifchat/public_html/pakistanivoicechat.com/wp-includes/class-wp-hook.php(323):
WP_Hook->apply_filters(NULL, Array) #2
/home/atifchat/public_html/pakistanivoicechat.com/wp-includes/plugin.php(453):
WP_Hook->do_action(Array) #3
/home/atifchat/public_html/pakistanivoicechat.com/wp-settings.php(448):
do_action('init') #4
/home/atifchat/public_html/pakistanivoicechat.com/wp-config.php(104):
require_once('/home/atifchat/...') #5
/home/atifchat/public_html/pakistanivoicechat.com/wp-load.php(37):
require_once('/home/atifchat/...') #6
/home/atifchat/public_html/pakistanivoicechat.com/wp-admin/admin.php(31):
require_once('/home/atifchat/...') #7
/home/atifchat/public_html/pakistanivoicechat.com/wp-admin/in in
/home/atifchat/public_html/pakistanivoicechat.com/wp-content/plugins/google-bot-bling/google-bot-bling.php
on line 59
What hosting did you switch from as well as what hosting did you switch it to? A lot of hosts for WordPress will give you support for this kind of thing especially if you just switched to their services so I would probably call support and give them the URL so that they can see the error and it is likely that they will give you some help. If they don't, try this article: http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
I remember migrating a site and having to FTP in to rename the plugins folder to plugins.hold or something and then I could login then I went back and renamed it again. But just to be safe I would follow the article and not my words.
The eregi() function, actually, the entire ereg_* family of functions was removed entirely in PHP 7.x. According to your error log, you have a voice chat plugin still using those functions.
Stack trace: #0 /home/atifchat/public_html/pakistanivoicechat.com/wp-includes/class-wp-hook.php
Suggestion: Contact plugin developer and ask them to update.

How do I stop the "Class log cannot be found" error from occurring in laravel?

I just moved my website to a separate server in an attempt to make sure that when I push the site to the production server everything transitions smoothly. Unfortunately, the site appears blank when I visit the link unless I add something like "echo 'hello';" to the index.php page, nothing is being logged in the laravel storage files (even though the permissions are recursively set to 777), and I get this error:
nickstaging#ubuntuStaging:/var/www/html/almost_acceptable$ php artisan config:cache
PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var
/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('log')
#4 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/html/almost_acceptable/vendor/laravel/framework/src/I in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741
PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('log')
#4 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/html/almost_acceptable/vendor/laravel/framework/src/I in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741
I cannot, for the life of me, figure out why it's occurring. It is recorded in the apache log file on the server. The site still runs correctly on my local homestead vm that I have running for general testing, and I tried reuploading all of the files to the server but nothing has worked.
If anyone has any idea why this is occurring, that would be great and I would very much appreciate it! Thanks in advance!
Edit
Installing php-mysql did not fix the problem and there was no difference in the error afterwards.
The most common problem is either you have spaces in your .env file or a wrong value in one of your config files.
More info here:
https://laracasts.com/discuss/channels/general-discussion/class-log-does-not-exist

error in file "mysql4-upgrade-1.6.0.0-1.6.0.1.php" in magento 1.9.2.0 installation with sample data

I am trying to install Magento version 1.9.2.0 with the sample data in my local Apache server.
I have stumbled upon a problem that is tearing my heart appart and I need some help or guidance in this obscure path, for I get this error message:
Error in file: "/opt/lampp/htdocs/magento/app/code/core/Mage/Sendfriend
/sql/sendfriend_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php" - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_magento_sample.sendfriend_log' doesn't exist, query was: DESCRIBE `sendfriend_log`
Trace:
#0 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0', '1.6.0.1')
#2 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.1')
#3 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /opt/lampp/htdocs/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /opt/lampp/htdocs/magento/index.php(83): Mage::run('', 'store')
#8 {main}
I have tried changing the directories permissions, I have already uploaded the sql sample data script to my local DB using PHPMyAdmin, erasing and reinstalling again, and restarting the process for more than 3 times but I got blocked here, I have searched for solutions in forums but haven't found none
Does anyone know how to proceed? I thank you for reading.
Best regards,
D.

Apigility v1.0.4 REST API GET methods no longer get valid parameter array

I used Apigility to generate code-connected REST API wrappers for my ZF2 project - it all worked nicely (apart from a few file permissions issues which were easily resolved on the command line). Yesterday I ran a composer update and it updated Apigility to 1.0.4 and now my collection GET methods (with signatures fetchAll($params = array()) are getting called with an empty parameter array. I can see from Firebug console that these are still being called with the correct parameters browser side so it appears that something has changed with the Apigility wrapper processing that has broken this. Does anyone have any knowledge or can shed any light on why this might have changed / broken?
I also discovered that since the update I can't access the Apigility Admin UI that was used to generate the API wrappers, since it fails to load with a ZF2 routing error:
Fatal error: Uncaught exception 'Zend\Mvc\Router\Exception\RuntimeException' with message 'Part route may not terminate' in /private/var/www/vhosts/hamster.local/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Part.php:202 Stack trace:
#0 /private/var/www/vhosts/hamster.local/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php(351): Zend\Mvc\Router\Http\Part->assemble(Array, Array)
#1 /private/var/www/vhosts/hamster.local/vendor/zendframework/zendframework/library/Zend/View/Helper/Url.php(100): Zend\Mvc\Router\Http\TreeRouteStack->assemble(Array, Array)
#2 [internal function]: Zend\View\Helper\Url->__invoke('zf-apigility')
#3 /private/var/www/vhosts/hamster.local/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php(399): call_user_func_array(Object(Zend\View\Helper\Url), Array)
#4 /private/var/www/vhosts/hamster.local/vendor/zfcampus/zf-apigility-admin-ui/view/zf-apigility-ui.phtml(6): Zend\View\Renderer\PhpRenderer->__call('url', Array)
#5 /private/v in /private/var/www/vhosts/hamster.local/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Part.php on line 202
Again I have no clue what might have caused this other than a borked update of Apigility. Regressing to v1.0.3 fixes both of these issues, but I'd like to have some of the updated features in 1.0.4.
Any help greatly appreciated!
In order to access to apigility admin, go to the file:
vendor/zfcampus/zf-apigility-admin-ui/view/zf-apigility-ui.phtml
and commet the line 6 and 14.
Maybe there are some problems with the routes.

dmcloud (daily motion) CloudKey_RPCException being thrown on prod environment on upload

The error below only occurs when I upload my code to the server. When I'm on my local development environment works perfectly. My local is Windows and my Production is Linux.
What does this mean? What should I do to solve it?
Fatal error: Uncaught exception 'CloudKey_RPCException' with message 'You must provide an url for mp4_h264_aac' in /var/www/application/libraries/CloudKey.php:336 Stack trace: #0 /var/www/application/libraries/VideoUploader.php(56): CloudKey_Api->__call('create', Array) #1 /var/www/application/libraries/VideoUploader.php(56): CloudKey_Media->create(Array) #2 /var/www/application/controllers/Admin.php(519): VideoUploader->upload(Array, Array, '06d88cc1721cbe1...') #3 [internal function]: Admin->videos('upload') #4 /var/www/system/core/CodeIgniter.php(356): call_user_func_array(Array, Array) #5 /var/www/public/index.php(274): require_once('/var/www/system...') #6 {main} thrown in /var/www/application/libraries/CloudKey.php on line 336
Ok, in case anyone ever needs this. The problem is that, I was using the $_FILES['file']['tmp_name'] directly into DMCloud method. Turns out that on Windows, it's something like C:\temp\file.tmp and on linux is something like /tmp/file. DMCloud api requires that the file used for upload must have an extension.
So, it failed to upload the file, and when I tried to use the URL of the failed upload, it gaveme this exception.
I hope someone fin this hopeful in the future =)

Categories