As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [php-7.2]

Marks questions related to Magento on php 7.2

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Cant install Klarna on magento 2.3.2

I tried to install Klarna in my Magento 2.3.2 website using composer trollweb. I kept getting errors as the klarna checkout was not working. In the end, I used mage2pro klarna to set it up Is there ...
1 vote
2 answers
510 views

Magento2.3 - Fatal error: allowed memory size of 536870912 bytes

Migrate from one server to another server. I have a big problem with this because I cannot understand the logic on it. Magento 2.3.2 and php 7.2 Fatal error: Allowed memory size of 536870912 bytes ...
0 votes
1 answer
19 views

Error on constructor while saving form into the database

Here is my save.php <?php namespace Mageplaza\Menu\Controller\Adminhtml\Post; use Mageplaza\Menu\Model\PostFactory; use Magento\Backend\App\Action; use Magento\Framework\App\Action\Context; use ...
1 vote
1 answer
1k views

SoapFault: looks like we got no XML document - Magento and laravel

I am with a problem in my application Laravel, when i use the SoapClient, for example my_object_soap->login(); returned this error: Fatal error: Uncaught SoapFault exception: [Client] looks like ...
0 votes
0 answers
13 views

Magento 2 Update Cart Redirects To Homepage in magento 2.3.5

Update Shopping Cart button redirects to homepage when pressed. The quantity is updated but the customer is forced to go to the homepage instead of staying in the shopping cart.
1 vote
3 answers
5k views

We can't find products matching the selection in magento 2.3

On every listing page, I'm getting We can't find products matching the selection. I followed this also but dint helped We can't find products matching the selection. I'm attaching a screenshot for ...
0 votes
1 answer
191 views

Connection Error:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for localhost.dbname=myblog failed: No such host is known

This is my code: <?php class Database { private $host = 'localhost'; private $db_name = 'myblog'; private $username = 'root'; private $password = ''; private $conn; public ...
2 votes
2 answers
2k views

Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::setFormat() must be of the type string, null given

When i trying to install data migration tool then getting this error in SSH PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::setFormat() ...
0 votes
0 answers
27 views

Configurable products options not coming in Wishlist and Compare products Page

Configurable product options visible issue on the compare and wishlist page. I am not able to find the proper solution to get the configurable product option on the compare and wishlist page. Please ...
0 votes
2 answers
837 views

To add address edit link in existing shipping address in Magento 2 Checkout page

How to add an address edit link besides default feature,Edit link in Shipping Address in Magento 2 Checkout Page if there are multiple shipping addresses with default. That address edit link would go ...
0 votes
0 answers
454 views

Google reCaptcha V.2 implementation on one page checkout payment method flow in Magento 1.9

I have been trying to add google recaptcha on magento checkout page where payment methods are toggled, I'm trying to invoke google re-captcha when a button is clicked but it goes through without ...
0 votes
1 answer
135 views

Is there any way to show top seller product by date range in frontend in Magento 2

Is there anyway to display best seller products by date range? For example recent last 7 days or recent 30 days or recent 60 days, etc. I have got a help that thing. But it is in Magento 1.9, not 2.x ...
0 votes
0 answers
16 views

How to set free shipping based on custom action choosen in Catalog Price Rules

I have added the Custom option in the catalog price rule action part. I want on selecting a custom option from the dropdown while matching the above condition it becomes a free shipping product. Eg: ...
8 votes
6 answers
29k views

Magento 2.3.0 "A technical problem with the server created an error." When uploading the logo image

I'm using Magento 2.3.0, with php 7.2 version, on a ubuntu os. Everything looks working fine, but when I try to go into Magento backend, Content - Design/Configuration - Header, and I try to upload ...
0 votes
1 answer
322 views

Magento 2 delete one month old files or images

The below code will delete pub/media/tmp directory and sub directory all files which is older than one month.By the help of core php function.
0 votes
1 answer
369 views

How to get Top Seller Products order by qty_ordered DESC in Magento 2 programmatically

I'm trying to show the Top 4 Selling Product(s) with order by qty_ordered DESC in frontend like Admin Dashboard best seller's short view. But it will not displayed data in the exact way like Admin ...
1 vote
1 answer
7k views

Add Custom field for Category in magento2

I want to add TextArea in Admin Edit category Page. How to do this.
0 votes
1 answer
2k views

Uncaught TypeError: Argument 1 passed to Magento\Catalog\Block\Product\ImageFactory::getRatio() must be of the type integer

I have this error in product page after upgrade to magento 2.3.4 from 2.2.6 php 7.2 [20-Apr-2020 15:39:48 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Block\Product\...
0 votes
0 answers
244 views

Magento2 : How to send a request for a page and get the page status?

I want to check if the status of the page is not 200, then add it to the array along with the status and send it to the mail at the end of the script I can't finish the code, tell me how to implement ...
0 votes
1 answer
289 views

Quick search filter URL Customize

http://127.0.0.1/CavendishOnline/catalogsearch/result/?q=Sift+Stone+Graphite I want to remove Plus mark in end of the URL String How to do this in Magento 2.3 community Version
0 votes
1 answer
229 views

Eway Payment Gateway Not work in Magento 2.3.0

I am facing error {"error":"Error happened when getting access code, please try again later"} AND http://cityflowersales.com/rest/default/V1/carts/mine/payment-information 400 ...
0 votes
1 answer
50 views

Magento2 - Product Attribute Not reindex error

I can't get SKU name for the title tag because of the not index product attribute?
4 votes
2 answers
4k views

Magento 2: Failed to set ini option “session.cookie_samesite” to value “Lax” when updating to - 2.3.6-p1

We're working on updating to Magento 2.3.6-p1. Everything runs and builds properly, but we're getting an error report as well as an error logged in our System.log. The error it's throwing is in line ...
0 votes
1 answer
234 views

Generate Random numbers for multiple block call

I am trying to implement custom flash toy for website. To do this I have created custom module. In custom module, I have created a block class. Block class contain the function to generate the Random ...
0 votes
1 answer
123 views

Magento 2 get keys values in rest api response

{ "item_id": 191111111, "sku": "qqqqqqq", "qty": 1, "name":"asdasd", "price": 736.52, ...
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/...
1 vote
3 answers
1k views

M1 PHP7.2 Patch - Customer Registration - "A non-numeric value encountered"

I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch: If I choose optional DOB and register without DOB, the logfile shows an error: 2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-...
0 votes
1 answer
121 views

Upgrading php version on Magento 1

I am moving from magento 7.0.3 to 7.2.33 I have a list of functions which will be deprecated with 7.2 php version. I can see there are lots of files that use the deprecated functions. I can't make ...
0 votes
0 answers
131 views

Magento 2 moved images to S3 now getting FileSystemException

I bought https://magecomp.com/magento-2-amazon-s3.html and it moved my images over to AWS S3 without much issue, the problem now is that when new images are being uploaded to the bucket, they are not ...
6 votes
2 answers
15k views

Magento 2.2 is not working in PHP 7.2.0

I am working on Magento 2.2. Recently I updated my PHP version to 7.2.0, then i am facing the Warning like this: My file.php is : <?php /* ==New BSD License== Copyright (c) 2012, Colin ...
0 votes
1 answer
60 views

Protection of variable from concurrent access

I am writing a REST API. In this API I am using a bearer token. This token has a longer expiry time. i.e., several minutes and should be reused until it expires. My REST API may get called concurently ...
0 votes
1 answer
315 views

How to remove the footer in compare product print page in magento2

Currently, Our compare product print page showing the footer section on that. I want to remove the footer link in compare product print page. How to do that. Thanks.
1 vote
1 answer
838 views

Attachement Upload (Uncaught SyntaxError: Unexpected token < in JSON at position 0)

If I want to insert a file, into the product, I get the following error message in the console. Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) ...
0 votes
1 answer
609 views

How can I override magento 2 Model Bundle Indexer Price?

I'm trying to override magento 2's default bundle indexer price : Magento\Bundle\Model\ResourceModel\Indexer\Price I created a module Abc_Bundlecstm with the following di.xml : <?xml version="...
0 votes
1 answer
224 views

Magento 1.9.4 Session Error with PHP 7.2

I upgrade PHP from 7.0 to 7.2 for magento 1.9.4.2 using redis session storage. But it's tack much time for session connection and got below session errors in log file. 1. PHP Fatal error: Uncaught ...
2 votes
1 answer
807 views

Fatal error lib/Varien/Crypt/Mcrypt.php

When accessing payment methods menu in admin panel (Magento 1.9.2.2) I get the following fatal error. And in the frontend this: I asked my hosting company to instal mCrypt module on Server as shown ...
0 votes
0 answers
322 views

Set max execution time for a magento php command

I've implemented some custom php commands for magento 2.3 and I've found a weird issue. The scripts doesn't seem to reset the max_execution time, I've set both from inside the script ( ini_set ) and ...
0 votes
1 answer
1k views

Porto theme issue in magento2.3

I have created the local setup from the live server. After that, I have copied the theme files like Porto and porto_rtl from the live server and pasted it on the local setup. Then run all the command....
2 votes
3 answers
1k views

How to add default head block in default.xml

I want to add default head block in default.xml file. so if anyone have idea about it then please send me the solution.
3 votes
1 answer
414 views

Database schema related change reverted

I have one of my Magento 2 projects running with version 2.3.3. There are so many simple products for one single configurable product and as a result, there is an issue with the length of the SKU. To ...
0 votes
0 answers
251 views

Magento2: How to output the contents of an entire JS file into a phtml file?

I defined a function in a block class as below to return the contents of an entire custom JS file, the path of which is stored in $absolute_custom_js_file_path . What is the right PHP function to be ...
0 votes
1 answer
140 views

Restrict Compare Products for Guest

I want to restrict compare products for guest when guest compare 3 products. How can i do that ? I tried the following code but not worked for guest. It is working for registered users only. In My ...
1 vote
1 answer
326 views

Why phpseclib takes time in magento 2.3.3?

Recently we have upgraded Magento 2.2.8 to 2.3.3 and PHP 7.2.11, post that we are facing more performance issues. When we put site in maintenance mode phpseclib related changes keep takes time. ...
0 votes
1 answer
145 views

Moving from Hostgator Magento 1.9.3.3 to Digital Ocean Magento 1.9.4.4

I am trying to move away from a HostGator VPS to a Digital Ocean VPS and also upgrade my Magento version in the meantime. I have a very basic knowledge of VPS and the LAMP stack. So on Hostgator, I ...
2 votes
1 answer
3k views

Magento 2.3 Fatal error: Uncaught Error: Call to undefined function mime_content_type()

Fatal error: Uncaught Error: Call to undefined function mime_content_type() in when trying to upload image from admin blocks. Please check screenshot
0 votes
2 answers
107 views

Warning Count Magento 2.2 & PHP 7.2

I receive the warning after upgrading to PHP 7.2 while running magento still in 2.2. Warning: count(): Parameter must be an array or an object that implements Countable in /vendor/magento/module-...
1 vote
1 answer
2k views

Magento 2.3.4 custom module - Uncaught Error: Call to a member function setData() on boolean

I've got a custom Magento 2 module that is causing issues on newly created products. All of the existing ones seem to be okay. I'm running Magento 2.3.4 in my template: /app/design/frontend/MySite/...
1 vote
1 answer
78 views

Magento2 - Maintenance page

I want to show the custom page while running the Magento commands like (upgrade, di: compile, deploy). How to do that. Thanks.
1 vote
0 answers
447 views

Magento 2.3.4 magento blank and luma theme less compilation error

After updating to Magento 2.3.4 from 2.2.6 on my staging server with nginx server and php7.2 I am facing issue in compiling less and css files. The files styles-l.css and styles-m.css are missing - ...
0 votes
2 answers
3k views

AJAX IN MAGENTO2.HOW TO ADD information from form IN DATABASE?

I already have a form and controller action, that send data without using ajax.How to do it with AJAX? I would appreciate your help! view/frontend/templates/reviews.phtml <form action="<?...