Moodle 1.8.1 PHP Issue - php

I am working with an old version of Moodle (1.8.1) using PHP 5.4 an error occurs when clicking on a link to an assignment or trying to add a new activity. I am getting the following error:
Deprecated: Assigning the return value of new by reference is deprecated in /home/myduicla/public_html/online/course/modedit.php on line 141
The following line causes the error above:
$mform=& new $mformclassname($form->instance, $cousesection, ((isset($cm))?$cm:null));
The above snippet is from the following section:
$mformclassname = 'mod_'.$module->name.'_mod_form';
$cousesection=isset($cw->section)?$cw->section:$section;
$mform=& new $mformclassname($form->instance, $cousesection, ((isset($cm))?$cm:null));
$mform->set_data($form);
I tried to fix the problem by removing the &
$mform= new $mformclassname($form->instance, $cousesection, ((isset($cm))?$cm:null));
After changing this the error turned in interal server error, when clicking on a lesson or adding an activity. The error:
https://www.example.com/online/mod/assignment/view.php?id=9657
HTTP ERROR 500 This page isn’t working www.example.com is currently unable to handle this request.

Related

Symfony Uncaught PHP Exception ErrorException at session_start()

I've been getting this error: REQUES Uncaught PHP Exception ErrorException: "Warning: Erroneous data format for unserializing 'Ramsey\Uuid\Lazy\LazyUuidFromString'" at C:\Users\Alex\Desktop\ALM\ALM-proto\vendor\symfony\http-foundation\Session\Storage\NativeSessionStorage.php line 153 whenever I run my symfony server. It prevents my localhost:8000 page from loading. I've opened the file from the error message and found out that this block of code is the culprit. By commenting it out, I no longer see the error, and the page loads. However, because I don't have access to the session, it causes other problems. So I need this block of code of code to work. How can I fix this?
if (!session_start()) {
throw new \RuntimeException('Failed to start the session');
}
Here are my Symfony project specs:
Symfony 4.3.11
PHP 7.4.16
Composer 2.0.11
OS: Windows 10

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.

Getting a 500 error when I try to login to the Magento 2 admin panel

Currently trying to login to the Magento backend panel (version 2.2.7) but whenever I try to access the admin panel, I'm getting an error reading:
This page isn’t working www.websitename.com is currently unable to
handle this request.
HTTP ERROR 500
I've looked in the logs and there seems to be the following Apache error in them.
Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a
member function getNext() on null in
/var/www/vhosts/websitename.com/httpdocs/generated/code/Magento/User/Model/User/Interceptor.php:529\nStack
trace:\n#0
/var/www/vhosts/websitename.com/httpdocs/vendor/magento/module-backend/Model/Locale/Manager.php(96):
Magento\User\Model\User\Interceptor->getInterfaceLocale()\n#1
/var/www/vhosts/websitename.com/httpdocs/vendor/magento/module-backend/Model/Locale/Resolver.php(77):
Magento\Backend\Model\Locale\Manager->getUserInterfaceLocale()\n#2
/var/www/vhosts/websitename.com/httpdocs/vendor/magento/framework/Locale/Resolver.php(65):
Magento\Backend\Model\Locale\Resolver->setLocale(NULL)\n#3
/var/www/vhosts/websitename.com/httpdocs/vendor/magento/module-backend/Model/Locale/Resolver.php(60):
Magento\Framework\Locale\Resolver->__construct(Object(Magento\Framework\App\Config\Interceptor),
'general/locale/...', 'store', NULL)\n#4
/var/www/vhosts/websitename.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Abst...\n'
Can anyone suggest a way to resolve this as I cannot currently get into the backend of My site.
It seems that this was being caused by a vendor extenion called "Moogento Pickpack". Disabling this extension seems to have caused the issue to stop for the moment.
I will get in touch with the extension vendor and try to find out exactly what was causing the problem.
Update:
We have now updated Moogento Pickpack to a new version and upgraded to Magento 2.3.2. The error here is no longer occuring.

Error when modifying some settings in Drupal 7

I tried to add a field to be generated in an XML feed of articles but I got this error:
ErrorThe website encountered an unexpected error. Please try again later
Error messagePDOException: SQLSTATE[08004] [1040] Too many connections in lock_may_be_available() (line 192 of.....
I get this error often when I modify something in Drupal 7.

Drupal Fatal error: Call to undefined function views_get_enabled_views()

I use drupal 7.22 with Apache 2.2 , mysql 5.5 and PHP 5.3.
I'm having the error of WSOD, and when I enable the error message, it shows:
Fatal error: Call to undefined function views_get_enabled_views() in
/var/www/drupal7/sites/all/modules/admin_menu/admin_menu.map.inc on
line 150
It happens when I migrate the whole drupal to another system, or when I update the core to the recent released version, WHERE I enter the username and password to access the administration page ( /drupal-address/user).
You got this error because of view does not support some function of new drupal
check last reply on this link
https://drupal.org/node/1778470
Also
https://drupal.org/node/1170192

Categories