Questions tagged [php-7]
Use this tag when you have problems very specific to PHP7 because of for example BC breaks
491
questions
72
votes
13
answers
29k
views
Is Magento ready for PHP 7?
PHP 7 is reaching beta status and lots of testing is going on at the moment. Given that Magento caught up within the last year from "runs only on PHP 5.3" to "fully compatible with PHP 5.6", I would ...
24
votes
2
answers
38k
views
How can solve error Magento 1.xx on PHP 7? [duplicate]
Magento 1.9.4 not run with PHP 7, it showing error as below:
Fatal error: Uncaught Error: Function name must be a string in
app\code\core\Mage\Core\Model\Layout.php:555 Stack trace: #0
app\code\...
17
votes
3
answers
11k
views
Magento Grand Total without taxes in 1.9 with PHP7
We're working in a 1.9 & php7; detected this issue with paypal suspect fraud (due the difference amount).
All correct in frontend (apply taxes); but in checkout and calculation, magento uses the ...
15
votes
7
answers
24k
views
Magento 2.1.1 not compatibile with PHP 7.1.0
I've a new server with PHP v7.1.0RC3 installed. According to DevDocs Magento 2 is compatible with 7.0.2 up to 7.1.0, except for 7.0.5 which makes PHP 7.1.0 compatible with M2 however when tried to ...
12
votes
5
answers
66k
views
Magento 2 PHP extensions missing
I am trying to setup a new vagrant box for Magento 2 development, however when running composer install, I receive the following errors:
Problem 1
- The requested PHP extension ext-gd * is ...
10
votes
2
answers
11k
views
Magento 1.9.2 and php7 - image upload error
I'm just testing Magento 1.9.2 with Php 7. All seemed to work, but suddenly I tried to upload image for the product. I got error like below:
Fatal error</b>: Uncaught Error: Function name must ...
10
votes
3
answers
38k
views
How to switch between PHP versions on Ubuntu Nginx [closed]
I have PHP 7.0 and 7.2 installed.
For now, I use PHP 7.0.
How can I switch to PHP 7.2?
10
votes
3
answers
3k
views
Magento 2.3 - Topmenu tabs with wrong (cached) 'active' class
I have a small menu problem. The active tabs do not match the active class. If I disable the static_block cache it works again, so it actually looks like the menu is cached and continues to display ...
9
votes
4
answers
5k
views
Classnames 'Void' inside vendor/magento/
I'm trying to re-compile using
php bin/magento setup:di:compile
But when I run this command, I get:
Fatal error: Cannot use 'Void' as class name as it is reserved in /var/www/html/magento/...
9
votes
3
answers
25k
views
Magento 1.9.x php 7 support
I run Magento 1.9.2.2 and I want to switch to php 7.0.
Is it possible and save to switch to 7.0 with this Magento install?
9
votes
2
answers
6k
views
Why doesn't Magento 2.1 support PHP 7.0.3 to 7.0.5?
As you may know Magento 2.1.0 is out.
According to the release notes, only PHP 7.0.2 AND PHP 7.0.6 are supported
Why aren't PHP 7.0.3 / 7.0.4 / 7.0.5 supported ?
Edit: 2.1.2 now supports PHP 7.0.4
8
votes
5
answers
33k
views
The each() function is deprecated. Magento 2 , php 7.2
I have been getting this error since I changed to PHP-7.2
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/vedic/vendor/...
8
votes
2
answers
12k
views
How to display Yes/No values in admin grid (Magento2)?
I have created a InStock column in admin grid and table.
In table, Instock column values are 0 (or) 1 based on productstock.
In admin grid, the Instock column values are dispalyed 0 (or)1 .
But i ...
7
votes
1
answer
6k
views
Return bool gives error "Invalid return type" for Ajax Controller
I want to call this controller through Ajax and have it return true or false. the methods all work correctly, however I get the error
Invalid return type
C:\Sites\retracted\wwwroot\vendor\magento\...
6
votes
1
answer
1k
views
Error when mass updating Attributes
Trying to mass update some attributes of products but when I try to open the update attributes form I get an error..
any ideas of the cause?
1 exception(s): Exception #0 (Exception): Notice: ...
6
votes
3
answers
10k
views
Magento 2.4 - Composer php 7.4 error magento/magento2-functional-testing-framework
We run Magento 2.4 with php7.4, that should be supported. But we get the following error when we try to update a module using composer:
magento/magento2-functional-testing-framework 2.6.5 requires php ...
6
votes
2
answers
2k
views
Which php.ini is used on my system?
I'm using Magento 2.3.0 with PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS ), and I'm not sure which is the php.ini file that I should modify. I am currently modifying these ...
6
votes
2
answers
2k
views
After Returning to Magento with Paypal Express Purchase. Error: The totals of the cart item amounts do not match order amounts (#10413)
So here's what I initially started with:
You would go to pay via PayPal, and it would flat error out with
Paypal error # 10413: The totals of the cart item amounts do not match order amounts
I have ...
6
votes
1
answer
2k
views
How can I install Magento on Ubuntu 16.04 XAMPP with PHP version 7.1.1?
I'm totally new to Magento. I'm trying to install Magento 2 Community Edition on my XAMPP on Ubuntu 16.04 that having PHP version 7.1.1.
It gives an error :
PHP Version Check Your PHP version is 7....
5
votes
4
answers
21k
views
How we can install magento 2.2.0 via command line comand?
How we can install magento 2.2.0 via command line command(CLI) using Ubuntu ?
Could you please some share command?
5
votes
3
answers
7k
views
Magento 2 - How do I programmatically remove payment method?
I've followed the guide on the selected answer here:
Payment method only admin Magento 2?
But still no luck.
What I want is to be able to show the Cash On Delivery method only to certain customers. ...
5
votes
1
answer
10k
views
Problem with magento 2.0.2 CE after upgrading to php7.0
I had a perfectly good and running magento 2.0.2 CE but after I updated the php version from php5.6 to php7.0 everything stopped working and i get the fallowing output in the var/report/...
5
votes
3
answers
12k
views
Undefined class constant 'PDO::MYSQL_ATTR_SSL_KEY' in/magento/setup/src/Magento/Setup/Model/ConfigOptionsList.php:179 in magento localhost
Ater execute any command getting this error
Operating system :- Mint ubuntu
Php version :- 7.2
Magento :- 2.3.4
5
votes
3
answers
2k
views
Error browsing simple products 2.3.1
I can't open simple products.. keep getting error as below,
tried disabling Temando_shipping..
no joy.. any ideas to resolve?
1 exception(s):
Exception #0 (ReflectionException): Class Temando\...
5
votes
2
answers
20k
views
Enable php extension for installation Magento2 on Xampp
I am trying to install Magento2 on Xampp and got some php extensions errors that are not enables. Please help me to enable these enable following php extensions.
PHP Extension xsl.
PHP Extension intl....
5
votes
4
answers
8k
views
Magento 2 : How to get the best seller product collection?
I'm trying to get Best Seller Product collection using below code, but it will not display any data
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $...
5
votes
1
answer
2k
views
What is PSR in php ? Please explain with example [duplicate]
How PSR is useful in Magento 2 .
I learned
PSR-0 – Autoloader Standard
PSR-1 – Basic Coding Standard
PSR-2 – Coding Style Guide
PSR-3 – Logger Interface
PSR-4- Autoloader Standard
but I want to ...
5
votes
6
answers
17k
views
Error Magento 2.3.0 upgrade ( php requirement )
I'm upgrading Magento from 2.2.7 to 2.3.0 from composer.
Running in sequence
php bin/magento maintenance:enable
composer require magento/product-community-edition 2.3.0 --no-update
composer update
...
4
votes
3
answers
10k
views
How to update magento 2.3.0 to 2.3.1?
Magento just released new versions of Magento Commerce and Open Source to increase product security, performance, and functionality.
One of it is the Magento Commerce and Open Source 2.3.1.
My ...
4
votes
3
answers
687
views
What type of redirect is this?
While I'm studying a line of code in magento vendor file I found this code:
$resultRedirect->setPath('*/*/');
What does this '*/*/' means and where does this redirects.
Hope I will get more ...
4
votes
3
answers
5k
views
How to add custom block in admin order create form in magento 2.2.5
I need to add custom block after order comment section in admin order create form using version(magento2.2.5)
4
votes
1
answer
5k
views
magento install gets to a 500 error
I am facing a issue while trying to install magento.
I am getting the following error:
Fatal error: Uncaught Error: Function name must be a string in /var/www/html/magento/app/code/core/Mage/Core/...
4
votes
1
answer
8k
views
Magento 2: installation stuck at 65% "installing user configuration"
So I recently installed Ubuntu 16.04 on an old laptop.
Running PHP 7:
PHP 7.0.4-7ubuntu2.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend ...
4
votes
3
answers
6k
views
How do I install Magento 2 on Mac OSX with Laravel Valet?
Question
How do I install and setup Magento with sample data to run locally?
Background
I'm using Laravel Valet to manage my local development on Mac OS Sierra and want to do some work on a Magento ...
4
votes
1
answer
712
views
Magento2 php7.0-memcached Ubuntu 16.04
Need help configuring Magento2 to use memcached for session storage on Ubuntu 16.04 running PHP7.0.4 FPM with php7.0-memcached build from php-memcached-dev github. I wonder what went wrong this time. :...
4
votes
1
answer
566
views
Magento 2 What is Alternative of Zend\Form\Annotation\Object in php 7.2
i was using PHP 7.0 i used to use Zend\Form\Annotation\Object Now i have upgraded my system to 7.2 and Now i am getting an error that
PHP Fatal error: Cannot use Zend\Form\Annotation\Object as ...
4
votes
3
answers
2k
views
How to convert Magento 2 Sort By Dropdown to Horizontal List
I was trying to Convert Magento 2 Drop down to Horizontal list.
Code Path:
/app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/list/toolbar/sorter.phtml
Actual Code:
<div ...
4
votes
4
answers
10k
views
Magento 2 not working on apache2, php7 and ubuntu
We are working on a magento 2 project. Since Windows lack cron job, magento 2 refused work full fledged. We decided to install ubuntu.
After striving hard I was able to make PHP7, apach2, mySQL and ...
4
votes
0
answers
1k
views
Magento 2 First Name is a required field Error While Placing Order
When I try to place an order after the customer registration/Login. Magento 2.2.5 shows "First Name is a required Field Error".
A Sample error message is attached.
This is the response I am getting:
4
votes
1
answer
992
views
After upgrade 2.1.2 to 2.1.7, Redis cache ends up in bad state intermittently, then all requests return 503
This site was stable on Magento CE 2.1.2. After upgrading to 2.1.7, we have encountered some issues in production.
There are 2 recurring errors with an interval of hours to days between occurrences. ...
3
votes
5
answers
8k
views
Notice: Undefined offset: 0 in /vendor/magento/module-customer/Ui/Component/DataProvider/Document.php
I am having this error when trying to export csv file with customer fields from Magento 2.2.5 admin:
1 exception(s):
Exception #0 (Exception): Notice: Undefined offset: 0 in /var/www/html/vendor/...
3
votes
1
answer
1k
views
Magento 1 : each() function is deprecated
In Magento 1, I have been getting this error:
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/test/app/code/core/Mage/Eav/Model/...
3
votes
3
answers
9k
views
Magento 2.3 installation PHP requirement
I'm trying to update Magento 2.2 to version 2.3 using this command:
composer require magento/product-community-edition=2.3.0
When doing so, I receive the following error:
Loading composer ...
3
votes
4
answers
2k
views
overriding model in magento2?
I want to override
vendor/magento/module-customer/Address/AbstractAddress.php
for remove lastname validation.How to override this?
di.xml
<preference for="Magento\Customer\Model\Address\...
3
votes
2
answers
9k
views
After upgrading to php 7 bin/magento CLI commands not working Magento 2.0.2 CE
I've upgraded the php version of the apache2.4 server from 5.6 to 7.0.
OS version Ubuntu 14.04 LTS.
After this update, despite the fact that I've installed php7.0-cli, when i try to run
php7.0 bin/...
3
votes
1
answer
257
views
Magento 2 : How to set $_FILES = $file in Magento 2.3.0 with Magento Coding Standard?
I had develop one module and it works currectly
But When I have check Coding standard using phpcs
it will provide me Error in php coding standard
--standard=MEQP2
Error is
i have get result of $...
3
votes
2
answers
176
views
Magento 1 & PHP 7.0
We are currently using PHP 5.6 which is nearing end of life. Are Magento 1.9.2.3 and Magento 1.9.2.4 compatible with PHP 7.0? If not, what changes are necessary?
3
votes
1
answer
3k
views
Uncaught TypeError: Argument 3 passed to Mage_Catalog_Model_Resource_Abstract::_canUpdateAttribute() must be of the type array, null given
I'm getting the following error:
[15-Apr-2018 04:10:22 UTC] PHP Fatal error: Uncaught TypeError: Argument 3 passed to Mage_Catalog_Model_Resource_Abstract::_canUpdateAttribute() must be of the type ...
3
votes
1
answer
297
views
Controller in magento2?
I have created a custom module.
and I want on Save
<form action="<?php echo $block->getBaseUrl() . 'sales/order/view'; ?> " method="post" enctype="multipart/form-data">
On button ...
3
votes
1
answer
1k
views
How to change a qty text in Minicart?
How to change qty text box into dropdown in minicart place view/frontend/web/template/minicart/item/default.html file ?