Reputation: 7341
I have Magento 2.3 installed in Windows 10 using xampp. I'm trying to set up my cron jobs by running
php bin\magento setup:cron:run
I get the error
setup-cron: Please check var/log/update.log for execution summary
.
When I look at update.log, I see the following two errors
[2018-12-06 15:44:37] setup-cron.ERROR: Your current PHP memory limit is 2048M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php --ini tells you where it is located.) After that, restart your web server and try again. [] []
[2018-12-06 15:44:37] setup-cron.ERROR: Could not locate magento/magento2-base/composer.json file. [] []
For the first error, why am I getting an error even though my memory limit is higher than the required memory limit?
For the second error, am I supposed to do something in order to create the magento2-base
directory? I don't have that directory in my main Magento directory (which is named magento23
)?
Here is an abbreviated output of php -i
which contains the memory_limit
Core
PHP Version => 7.2.12
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => C:\xampp\php\extras\browscap.ini => C:\xampp\php\extras\browscap.ini
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => On => On
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => C:\xampp\php\logs\php_error_log => C:\xampp\php\logs\php_error_log
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => C:\xampp\php\ext => C:\xampp\php\ext
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => C:\xampp\php\PEAR => C:\xampp\php\PEAR
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 2048M => 2048M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => no value => no value
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => C:\xampp\tmp => C:\xampp\tmp
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
windows.show_crt_warning => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => 1 => 1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
Upvotes: 0
Views: 1106
Reputation: 166106
That's a pretty strange error.
The error message itself comes from here
#File: setup/src/Magento/Setup/Model/PhpReadinessCheck.php
if ($currentMemoryInteger > 0
&& $this->dataSize->convertSizeToBytes($currentMemoryLimit)
< $this->dataSize->convertSizeToBytes($minimumRequiredMemoryLimit)
) {
$error = true;
$message = sprintf(
'Your current PHP memory limit is %s.
Magento 2 requires it to be set to %s or more.
As a user with root privileges, edit your php.ini file to increase memory_limit.
(The command php --ini tells you where it is located.)
After that, restart your web server and try again.',
$currentMemoryLimit,
$minimumRequiredMemoryLimit
);
} elseif ($currentMemoryInteger > 0
&& $this->dataSize->convertSizeToBytes($currentMemoryLimit)
< $this->dataSize->convertSizeToBytes($recommendedForUpgradeMemoryLimit)
) {
$warning = true;
$message = sprintf(
'Your current PHP memory limit is %s.
We recommend it to be set to %s or more to use Setup Wizard.
As a user with root privileges, edit your php.ini file to increase memory_limit.
(The command php --ini tells you where it is located.)
After that, restart your web server and try again.',
$currentMemoryLimit,
$recommendedForUpgradeMemoryLimit
);
}
with convertSizeToBytes
living here
#File: vendor/magento/framework/Convert/DataSize.php
public function convertSizeToBytes($size)
{
if (!is_numeric($size)) {
$type = strtoupper(substr($size, -1));
$size = (int)$size;
switch ($type) {
case 'K':
$size *= 1024;
break;
case 'M':
$size *= 1024 * 1024;
break;
case 'G':
$size *= 1024 * 1024 * 1024;
break;
default:
break;
}
}
return (int)$size;
}
My best/first guess would that -- somehow -- there's some extra characters (spaces, invisible, non-ASCII numbers) in your memory_limit
value that don't play nice with the logic in this method.
Update: Per the comments -- it's integer overflow with a 32 bit version of PHP.
Upvotes: 2