Questions tagged [php-7]
Use this tag when you have problems very specific to PHP7 because of for example BC breaks
491
questions
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 ...
0
votes
2
answers
1k
views
PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found
How to solve this issue? DOM extension enabled in cPanel.
PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /home/freshvcf/public_html/test/vendor/magento/framework/Config/Dom.php:...
0
votes
3
answers
2k
views
Magento2: Re- trigger total in checkout page
I have to init js and corresponding template in checkout_index_index.
In that template, I have added checkout after the payment methods.
If I checked the checkbox, I have added a customs fee.
In page ...
0
votes
1
answer
2k
views
Magento 2 installation says var directory is not writable
I have a strange problem with my Magento 2 installation. The readiness check says my var-directory is not writable although it clearly is. I even set it to 777. The other directories (app/etc, pub/...
0
votes
1
answer
5k
views
Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object
I am trying to zip the files in a folder. Example: In a path localhost/magento/var/log, there are two files system.log, debug.log. Following is the code which I tried to zip the files. Am developing ...
2
votes
2
answers
4k
views
Programmatically updating quote items in Magento2
I'm trying to update quote programmatically.
In controller file:
public function execute()
{
$id = 298;
$params['id'] = 298;
$params['product'] = 6765;
$params['...
0
votes
1
answer
6k
views
My NGINX configuration is now throwing 404 Not Found nginx/1.10.0 (Ubuntu) EE. 1.14
I'm going to try and make this as detailed as possible because I feel like I've tried everything and at this point just need another set of eyes on everything.
I'm running a cloud server and I've ...
0
votes
4
answers
1k
views
Magento 2.0 Static Content Deploy PHP Fatal Error
INSTALLED MAGENTO 2.0 IN FOLDER on UBUNTU 16.10
SAME CSS ISSUE AGAIN...
cd /var/www/html/store
sudo php bin/magento setup:static-content:deploy
PHP Fatal error: Uncaught Error: Call to undefined ...
1
vote
1
answer
2k
views
Magento 2. change customer custom attribute value from plugin
Here first question of mine.
Now i added custom attribute to my customer following this code
InstallData.php
<?php
namespace Kt\AddBonus\Setup;
use Magento\Customer\Model\Customer;
use ...
1
vote
4
answers
4k
views
Magento 2 setup hangs on 89%
Magento 2 installation page (step 6) freezes on 89% where in console log it stops on:
Module 'Magento_ConfigurableSampleData':
Installing data..
in my /etc/php/7.0/cli/php.ini file I have the ...
0
votes
1
answer
2k
views
Warning: session_start(): Failed to read session data: memcache
I just patched magento 1.9.3.6 to support php7.2. Now we are not able to login.
Here's the error:
Warning: session_start(): Failed to read session data: memcache (path: unix:///var/run/memcached-...
0
votes
1
answer
2k
views
Restore quote in magento2
I have canceled the current order like
use Magento\Sales\Model\OrderFactory;
$order = $this->orderFactory->create()->loadByIncrementId($order->getIncrementId());
$order->cancel()->...
0
votes
1
answer
1k
views
Magento 2 is giving me Fatal error: Allowed memory size of 1073741824 bytes exhausted when i am trying to save product
I am getting following errros
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 73400328 bytes) in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/...
2
votes
1
answer
1k
views
Error installing Magento 2.3.2: An abstract factory could not create an instance of magentoframeworkencryptionencryptor
I am installing magento 2 via a docker image :
quay.io/alexcheng1982/apache2-php7:7.2.12
I keep getting this message:
An abstract factory could not create an instance of
...
0
votes
2
answers
2k
views
how to move fotoroma navigation thumbnail vertical to horizontal in magento 2
how to move fotoroma navigation thumbnail vertical to horizontal to the bottom of the main image in magento 2
0
votes
2
answers
2k
views
I want to update order status using magento's rest api
I want to use Magento Api for Updating Status of order in Magento 2.3.5 so anyone can guide me from scratch how can i use api. I also want to know in Magento how many default api is there and how to ...
0
votes
1
answer
74
views
Magento SQL unknown query
We are seeing this SQL query in our DB and are unsure what is generating this, we have flat catalog index enabled so it should not be asking for this
select `e`.*, if(at_visibility.value_id > 0, ...
0
votes
0
answers
34
views
Magento 2 : How to programatically apply a condition on a coupon for specific product?
I want to apply a condition on a brand Product if the condition is true the coupon should not be applied.
Please Revert Asap!
THANK YOU!
1
vote
2
answers
3k
views
How to save order comment programmatically in magento2?
1)I'm creating custom order comment text box in sales->order->create new order .
2) Created order_comment column in sales_ order grid/quote.
3) I need to save order comment text box value into db....
0
votes
1
answer
1k
views
PHP 7.0.9/NGINX 1.11.3/Magento 2.0 Setup gives blank page
This is my first time posting here and I am hoping someone can help me out, I am a little stumped.
We have a Linux CentOS 7 server with PHP 7.0.9 and NGINX 1.11.3 installed.
We are trying to install ...
0
votes
2
answers
5k
views
Cron causing high CPU
Our /var/log/messages is flooded with these records:
Jan 25 13:17:04 885589-DB1 systemd: Starting Session 570175 of user apache.
Which causes high CPU process:
1858 root 20 0 345084 315516 ...
1
vote
2
answers
3k
views
How to upgrade friendsofphp/php-cs-fixer?
Server: CentOS 7
PHP: 7.3.13
Litespeed: Enabled
Magento: 2.3.3
I was attempting to run some updates via composer when I received an error about my PHP being too high.
I attempted to upgrade php-cs-...
1
vote
1
answer
2k
views
How to increase max upload image size to 16M in Magento 2?
I modify the field values upload_max_filesize = 20M ,post_max_size = 20M and memory_limit = 2048Min the PHP.ini file of the server.
I have to upload the banner images up to 16MB on the website but it ...
1
vote
4
answers
1k
views
Magento 2 - I'm upgrading magento 2.1 to 2.3.5 but compile command returning error
I'm trying to upgrade magento 2 version to the latest version by following commands
php bin/magento maintenance:enable
composer require magento/product-community-edition 2.3.5 --no-update
composer ...
1
vote
1
answer
1k
views
Changed PHP 5.6 to PHP 7 with Magento 1.9
I changed the version of PHP [5.6.30] to PHP [7.0.17]. But now Magento 1.9.2.1 returns the following error:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
I ...
1
vote
1
answer
143
views
How to Solve 404 error on frontend?
Getting 404 error on frontend page backend Admin panel is perfectly working frontend page only through error what is the reason behind that
0
votes
1
answer
4k
views
How to get local storage in magento controller to use as available?
I writing a plugin to add condition into beforeLoad function of product collection. I set local storage example js to set local storage:
if (typeof(Storage) !== "undefined") {
// Store
...
2
votes
2
answers
3k
views
How to filter product with salable filter in magento2
In magento 1 ,
$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToFilter('status', 1); // enabled
$products->addAttributeToFilter('type_id', 'simple');
...
0
votes
1
answer
43
views
Segmentation error when getting product from repository
I have a test script which should update products:
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
error_reporting(E_ERROR | E_PARSE);
$bootstrap = Bootstrap::create(BP, $...
1
vote
2
answers
592
views
Global Payments Realex 511 Redirect Issue Magento 2.2.2 HPP
I am using this module for Global Payments / Realex Payments for Magento 2.2.2 store form Magento Marketplace
"name" : "realexpayments/hpp",
"description" : "A ...
0
votes
1
answer
53
views
Magento2 admin page keeps loading during the execution of the function used in a controller
Basically. I've created a button in M2 admin. Clicking on that button runs my custom-created indexer.
The indexer is fetching all the products and sends them to a third-party service with a POST ...
0
votes
2
answers
43
views
Exception: Deprecated Functionality: Method ReflectionParameter::getClass() is deprecated in
As per the Adobe Magento 2 Official documentation.
System requirements for Magento 2.4.5 is PHP 8.1
I am getting following error.
Exception: Deprecated Functionality: Method ReflectionParameter::...
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 ...
0
votes
1
answer
34
views
What are the security risks associated with a Magento 2
What are the security risks associated with a Magento 2 website, and how can you mitigate them?
2
votes
1
answer
123
views
Magento 2 community edition
What are the key differences between Magento 2 Community Edition and Magento 2 Enterprise Edition, and which one is the best fit for your business needs?
1
vote
1
answer
42
views
INSTALLATION ENCOUNTER "WHITE SCREEN OF DEATH"
Why do some Magento 2 installations encounter "white screen of death" errors, where the site appears blank with no error messages displayed?strong text
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 ...
0
votes
1
answer
44
views
Class BuyRequestBuilder does not exist after upgrade 2.3.5 to 2.3.7
working on an upgrade from 2.3.5 to 2.3.7 and suddenly got this error when compiling, does anybody know how to fix this?
Looks like it had to do with me changing to "minimum-stability": ...
0
votes
1
answer
131
views
How to add add to cart with ajax to custom phtml
I have to add add to cart button on homepage. I have custom phtml in my own module. I would like this button to work with ajax. Could someone please suggest something?
1
vote
1
answer
380
views
Magento 2 Not Removing Product Special Price by importing CSV
I am trying to remove the special price of my product by the import CSV. Tried Several Ways.
By adding "0" in the column. Also tried to import with Empty Column. But nothing happened.
2
votes
2
answers
3k
views
Create docker image for nginx, php 7, mysql and magento2
I want to create a docker image which has nginx, php7 (and required modules), mysql and magento2. Also, want to create docker-compose scripts.
Any help will be appreciated.
2
votes
5
answers
1k
views
How to get recently viewed product collection in magento2?
I want to get the recently viewed product collection directly from model without using block function.
Thanks.
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 ...
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?
2
votes
2
answers
341
views
How to Calculate dates between a given rage?
I want to calculate dates between current date and given range
for example last 30 days date with the gap of 5 days
the array should be in this formate.
Formate:
2022-8-18 00:00:00
2022-8-13 00:00:...
0
votes
1
answer
1k
views
billing.save(); shipping.save(); functions override in Magento
I need to override billing.save(); & shipping.save(); functions but I don't know in which files they have their declarations in Magento.
I am new in Magento directory.
Can you please help me?
2
votes
1
answer
455
views
Adding a BCC and CC (sales person) to the welcome email Magento 2
I've edited this function below and i'm overriding this method in app/code/FF/Customer/Model/EmailNotification.php
natively this file exists in vendor/magento/module-customer/Model/EmailNotification....
0
votes
0
answers
18
views
Is autherize.net payment gateway secure with Magento 2.4.2?
I want to use a one time subscription extension. My Magento store version is 2.4.2 . Most of the extensions do not support Authrize.net payment gateway.
Is autherize.net payment gateway not secure ...
0
votes
1
answer
361
views
Rewrite GuzzleHttp\Client in Magento2 not working
Though it is very basic or I suppose to have this working straight but after spending hours am looking for community experts insight/support.
Have to add monitoring of all outgoing requests from ...
0
votes
1
answer
446
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.