Magento array to string conversion bug - php

When i run my Magento 1.9 CE website on new php version(7.0.4) it start giving me error
Array to string conversion in /var/www/bigliving.local/public_html/app/code/core/Mage/Core/Model/Layout.php on line 555
Previously is on php 5.4 and working fine.

Found solution for this issue, i follow the following steps and it works for me.
Go in line number on 555 of this file /var/www/bigliving.local/public_html/app/code/core/Mage/Core/Model/Layout.php change the code to
$out .= $this->getBlock($callback[0])->{$callback[1]}();
Change the magento root folder and index.php permission to 755

Try the PHP 7 compatibility extension for Magento 1
Edit: As pointed out in the comments below, the PHP 7 compatibility extension is deprecated, and PHP 7.2 support patches have been released:
https://inchoo.net/magento/magento-1-official-php-7-2-patches/

Related

Trouble with CKFinder + Laravel 8

I did everything according to points 1-5 as indicated in the Readme.MD
https://github.com/ckfinder/ckfinder-laravel-package#configuring-authentication
On site authors say: At this point you should see the connector JSON response after navigating to the <APP BASE URL>/ckfinder/connector?command=Init address. Authentication for CKFinder is not configured yet, so you will see an error response saying that CKFinder is not enabled
I opened link
http://127.0.0.1:8000/ckfinder/connector?command=Init
And have JSON error:
{"error":{"number":110,"message":"Unknown error."}}
Can someone help me? How to find reason of trouble? i google many sites and there is no desicion
Are you using PHP 8+?
For me the issue was a deprecated line in the package itself.
I fixed this error by changing vendor\ckfinder\ckfinder-laravel-package\_connector\ArgumentResolver.php line 65
from
if ($reflectionClass = $param->getClass()) {
to
if ($reflectionClass = new \ReflectionClass($param->getType()->getName())) {
because getClass() is deprecated in PHP 8.0.3, It works fine for me now.
Note: Do keep in mind that it's not good to change things inside the vendor folder!

Quickest way to get Expression Engine v 2.5.5 working with PHP7

A client’s host has recently updated their server to run PHP 7, which has broken their EE 2.5.5. site (“Call to undefined function mysql_connect()”).
I tried upgrading EE to version 2.11.9 but get errors:
Frontend: can’t find safecracker_lib
Control Panel: PATH_MOD not defined in mod_structure.php, fixing this leads down a rabbit hole starting with an error related to not being able to instantiate the pagination class somewhere.
I just need to get the site running until I build a new site, what is the quickest way I can get the site running with PHP 7?
In your config folder there is a file named database.php
change the line:
$db['expressionengine']['dbdriver'] = 'mysql';
to
$db['expressionengine']['dbdriver'] = 'mysqli';
mysql_connect() has been deprecated since PHP 5 and removed in PHP 7 so you cannot use this function or any of the old mysql functions.
You need to upgrade your codebase, or downgrade your PHP version (highly discouraged).
In regards to your missing pagination class, you may not have implemented core classes that were required when upgrading.
Try running on your command line:
php system/ee/eecms upgrade
You can also read the documentation on how to upgrade the codebase for Expression Engine here.

How to resolve this error of October CMS ?

In OctoberCMS i installed Rainlab.Forum plugin after that the CMS of October is giving me error . The error is actually in this line
if ($channel) {
$channel->setUrl($this->channelPage, $this->controller);
}
I am a newbie in PHP and Laravel , so i am facing terrible problems This Is Picture of The Error
I was alo having this issue. You have to remove a rouge bracket in
/plugins/rainlab/forum/components/Topic.php around line 172
See image:
This has been fixed in v1.0.18 by this commit https://github.com/rainlab/forum-plugin/commit/f15d16c69774eaba9aecd37629abdea5950352b2
You just need to update your OctoberCMS website via the backend interface or the command line :
php artisan october:update

Fatal error: Class 'PHPExcel_Shared_String' not found

I have used PHPExcel for my codeigniter app and it is working perfectly in localhost, but when I host this to server, I am getting following error :
Fatal error: Class 'PHPExcel_Shared_String' not found in \xx\xx\xx
third_party\PHPExcel\Autoloader.php on line 36
There was a change introduced to the autoloader in the latest version of PHPExcel that appears to have broken backward compatibility with versions of PHP < 5.3.0
If you edit the Classes/PHPExcel/Autoloader.php file and change line 58, which should read
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);
to
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));
I've already made a change to the develop branch on github to test for the PHP version and execute the appropriate line
While this was not deliberate, please note that we really are trying to get users to upgrade to at least version 5.3.0 of PHP, because we can't address any of the memory/performance issues that users working with large spreadsheets complain about until we can use some of the new features available in more recent versions of PHP. Version 5.2 of PHP is no longer supported, and even version 5.3 is end-of-life and will be unsupported before the end of this year
struggled with this issue for a long time under Linux and PHP 5.4x. In the end, in addition to the fix above, I resorted to changing the code on line 73 of the Autoloader file which sets the $pClassFilePath variable from relative (using PHPEXCEL_ROOT) to absolute following the machines file tree. This might only be a hack, but it saved my sanity after several days of trying. Hope this helps someone. Cheers
I had this issue too and i solved it by changing permissions on "Shared" directory to 655.
I Hope it helps
If your server is on Linux, it can be permission problem... Just add all permissions for PHPExcel Folder in you Vendor (on server side) and all subfolders for it. I have same problem and i have solved it by this way...
What worked for me was changing PHPExcel/Autoloader.php line 81 from
if ((file_exists($pClassFilePath) === FALSE) || (is_readable($pClassFilePath) === FALSE)) {
to
if ((stream_resolve_include_path($pClassFilePath) === FALSE)) {
I prefer this approach because it didn't require me to modify file permissions and it should work in PHP 5.3.2 and later.

How To Joomla Install in WAMP SERVER 2.2?

Hello
I am using joomla insttalation in WAMP Server 2.2 installation all are the complate, after that i RUN joomla this type of error occur in home page how to remove that.....plz help me
NOTICE:Array to string conversion in C:\wamp\www\joomlawebsite\components\com_banners\models\banners.php on line 44
Array to string conversion in C:\wamp\www\joomlawebsite\components\com_banners\models\banners.php on line 45
If you are using a 5.4 version of PHP, try downgrading to 5.3 (that should fix the issue as per this Joomla thread.)

Categories