hell,
I have this problem in instalation:
[ERROR] InvalidArgumentException: Wrong file in C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Image\Adapter\Gd2.php:64 Stack trace: #0 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Image.php(55): Magento\Framework\Image\Adapter\Gd2->open('C:/Users/admin/...') #1 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Image.php(36): Magento\Framework\Image->open() #2 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(121): Magento\Framework\Image->__construct(Object(Magento\Framework\Image\Adapter\Gd2), 'C:/Users/admin/...') #3 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array) #4 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array) #5 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Image\Factory.php(47): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array) #6 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\View\Design\Theme\Image.php(127): Magento\Framework\Image\Factory->create('C:/Users/admin/...') #7 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\module-theme\Model\Theme\Registration.php(135): Magento\Framework\View\Design\Theme\Image->createPreviewImage('C:/Users/admin/...') #8 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\module-theme\Model\Theme\Registration.php(114): Magento\Theme\Model\Theme\Registration->_savePreviewImage(Object(Magento\Theme\Model\Theme\Data)) #9 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\module-theme\Model\Theme\Registration.php(73): Magento\Theme\Model\Theme\Registration->_registerThemeRecursively(Object(Magento\Theme\Model\Theme\Data)) #10 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\module-theme\Setup\Patch\Data\RegisterThemes.php(47): Magento\Theme\Model\Theme\Registration->register() #11 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Setup\Patch\PatchApplier.php(162): Magento\Theme\Setup\Patch\Data\RegisterThemes->apply() #12 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(1023): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Theme') #13 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(890): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array) #14 [internal function]: Magento\Setup\Model\Installer->installDataFixtures(Array) #15 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(371): call_user_func_array(Array, Array) #16 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Controller\Install.php(109): Magento\Setup\Model\Installer->install(Array) #17 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Controller\AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction() #18 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent)) #19 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #20 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Controller\AbstractController.php(117): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #21 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\DispatchListener.php(117): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response)) #22 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent)) #23 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #24 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Application.php(339): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #25 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\index.php(39): Laminas\Mvc\Application->run() #26 {main} Next Magento\Framework\Setup\Exception: Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file in C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\magento\framework\Setup\Patch\PatchApplier.php:170 Stack trace: #0 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(1023): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Theme') #1 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(890): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array) #2 [internal function]: Magento\Setup\Model\Installer->installDataFixtures(Array) #3 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Model\Installer.php(371): call_user_func_array(Array, Array) #4 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\src\Magento\Setup\Controller\Install.php(109): Magento\Setup\Model\Installer->install(Array) #5 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Controller\AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction() #6 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent)) #7 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #8 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Controller\AbstractController.php(117): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #9 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\DispatchListener.php(117): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response)) #10 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent)) #11 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-eventmanager\src\EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #12 C:\Users\admin\Desktop\demo\htdocs\magento2\vendor\laminas\laminas-mvc\src\Application.php(339): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #13 C:\Users\admin\Desktop\demo\htdocs\magento2\setup\index.php(39): Laminas\Mvc\Application->run() #14 {main}
Hi @mac
I understand the issue you are facing !
I suggest you to do following changes in your php.ini file !
In your php.ini file increase values of below parameters.
Note : Make sure you increase max_input_time value to at least 1800 and it will works !!
Hope it helps !
Thanks but still doesn't work
@Manthan Dave I am facing same type issue.
when i open index.php file. my index.php file start <? php but not close "?>" mark is it usual.
Hello @mac
You Are facing this issue because something surely missing in configurations !
Please check following extensions are enable from php.ini file !
bc-math ctype curl dom gd, ImageMagick 6.3.7 (or later) or both intl mbstring mcrypt hash openssl PDO/MySQL SimpleXML soap spl libxml xsl zip json iconv
Specifically GD extension for image library , you can enable this by removing ; (Semicolon) from the php.ini file
then restart your xampp server and check
Hello @sayurpatel3eb8
Yes that is the coding structure of Magento. !
not only index.php file but almost all the Php files have no ending/closing tag is there and it is not required as well !
so it is as usual as per standard ! You are facing issue then you have some other bug on the same !
hope it helps
extension=bz2
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp
extension=soap
extension=sockets
;extension=sqlite3
;extension=tidy
;extension=xmlrpc
extension=xsl
I have this in php
@Manthan Dave you mention GD extension but in my file i have gd2 is it good?
and already removed ";"
Yes GD2 is good - make sure it is enabled in your environment!