2

I am new to magento and trying to set up a new project locally. After cloning the repo from remote to local, I run composer install and then I try to run bin/magento s:up which runs initially but eventually I get this error.

In Gd2Rewrite.php line 57:
                           
File "" does not exist.  

Tried to find Gd2Rewrite.php but it does not exist in project. Below is the stack trace

[2022-12-07T20:11:07.506861+00:00] main.CRITICAL: No cache server(s) could be purged Cache host: star-register-m2.localnet:80resulted in error message: Unable to connect to star-register-m2.localnet:80 . Error #0: stream_socket_client(): Unable to connect to star-register-m2.localnet:80 (php_network_getaddresses: getaddrinfo for star-register-m2.localnet failed: Name or service not known) {"method":"GET","url":"http:/","invalidateInfo":{"servers":[{"Laminas\\Uri\\Http":"http://star-register-m2.localnet/"}],"formattedTagsChunk":".*"}} []
[2022-12-07T20:11:07.535551+00:00] main.CRITICAL: No cache server(s) could be purged Cache host: star-register-m2.localnet:80resulted in error message: Unable to connect to star-register-m2.localnet:80 . Error #0: stream_socket_client(): Unable to connect to star-register-m2.localnet:80 (php_network_getaddresses: getaddrinfo for star-register-m2.localnet failed: Name or service not known) {"method":"GET","url":"http:/","invalidateInfo":{"servers":[{"Laminas\\Uri\\Http":"http://star-register-m2.localnet/"}],"formattedTagsChunk":".*"}} []
[2022-12-07T20:11:18.536728+00:00] main.CRITICAL: No cache server(s) could be purged Cache host: star-register-m2.localnet:80resulted in error message: Unable to connect to star-register-m2.localnet:80 . Error #0: stream_socket_client(): Unable to connect to star-register-m2.localnet:80 (php_network_getaddresses: getaddrinfo for star-register-m2.localnet failed: Name or service not known) {"method":"GET","url":"http:/","invalidateInfo":{"servers":[{"Laminas\\Uri\\Http":"http://star-register-m2.localnet/"}],"formattedTagsChunk":".*"}} []
[2022-12-07T20:11:28.852641+00:00] main.CRITICAL: No cache server(s) could be purged Cache host: star-register-m2.localnet:80resulted in error message: Unable to connect to star-register-m2.localnet:80 . Error #0: stream_socket_client(): Unable to connect to star-register-m2.localnet:80 (php_network_getaddresses: getaddrinfo for star-register-m2.localnet failed: Name or service not known) {"method":"GET","url":"http:/","invalidateInfo":{"servers":[{"Laminas\\Uri\\Http":"http://star-register-m2.localnet/"}],"formattedTagsChunk":".*"}} []
[2022-12-07T20:11:28.853614+00:00] main.ERROR: File "" does not exist.
#0 /var/www/star-register-m2/vendor/magento/framework/Interception/Interceptor.php(58): MagestyApps\WebImages\Model\Image\Adapter\Gd2Rewrite->open()
#1 /var/www/star-register-m2/vendor/magento/framework/Interception/Interceptor.php(138): MagestyApps\WebImages\Model\Image\Adapter\Gd2Rewrite\Interceptor->___callParent()
#2 /var/www/star-register-m2/vendor/magento/framework/Interception/Interceptor.php(153): MagestyApps\WebImages\Model\Image\Adapter\Gd2Rewrite\Interceptor->Magento\Framework\Interception\{closure}()
#3 /var/www/star-register-m2/generated/code/MagestyApps/WebImages/Model/Image/Adapter/Gd2Rewrite/Interceptor.php(23): MagestyApps\WebImages\Model\Image\Adapter\Gd2Rewrite\Interceptor->___callPlugins()
#4 /var/www/star-register-m2/vendor/magento/framework/Image.php(51): MagestyApps\WebImages\Model\Image\Adapter\Gd2Rewrite\Interceptor->open()
#5 /var/www/star-register-m2/generated/code/Magento/Framework/Image/Interceptor.php(23): Magento\Framework\Image->open()
#6 /var/www/star-register-m2/vendor/magento/framework/Image.php(36): Magento\Framework\Image\Interceptor->open()
#7 /var/www/star-register-m2/generated/code/Magento/Framework/Image/Interceptor.php(14): Magento\Framework\Image->__construct()
#8 /var/www/star-register-m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Image\Interceptor->__construct()
#9 /var/www/star-register-m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#10 /var/www/star-register-m2/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create()
#11 /var/www/star-register-m2/vendor/magento/framework/Image/Factory.php(50): Magento\Framework\ObjectManager\ObjectManager->create()
#12 /var/www/star-register-m2/vendor/magento/framework/View/Design/Theme/Image.php(127): Magento\Framework\Image\Factory->create()
#13 /var/www/star-register-m2/vendor/magento/module-theme/Model/Theme/Registration.php(135): Magento\Framework\View\Design\Theme\Image->createPreviewImage()
#14 /var/www/star-register-m2/vendor/magento/module-theme/Model/Theme/Registration.php(114): Magento\Theme\Model\Theme\Registration->_savePreviewImage()
#15 /var/www/star-register-m2/vendor/magento/module-theme/Model/Theme/Registration.php(73): Magento\Theme\Model\Theme\Registration->_registerThemeRecursively()
#16 /var/www/star-register-m2/vendor/magento/module-theme/Setup/RecurringData.php(52): Magento\Theme\Model\Theme\Registration->register()
#17 /var/www/star-register-m2/setup/src/Magento/Setup/Model/Installer.php(1117): Magento\Theme\Setup\RecurringData->install()
#18 /var/www/star-register-m2/setup/src/Magento/Setup/Model/Installer.php(960): Magento\Setup\Model\Installer->handleDBSchemaData()
#19 /var/www/star-register-m2/setup/src/Magento/Setup/Console/Command/DbDataUpgradeCommand.php(69): Magento\Setup\Model\Installer->installDataFixtures()
#20 /var/www/star-register-m2/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DbDataUpgradeCommand->execute()
#21 /var/www/star-register-m2/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#22 /var/www/star-register-m2/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#23 /var/www/star-register-m2/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#24 /var/www/star-register-m2/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#25 /var/www/star-register-m2/bin/magento(23): Symfony\Component\Console\Application->run()
#26 {main} [] []

Not sure what the issue is. Thought it could be related to local db. But, mysql is running fine locally and also I have correct credentials for database and correct database name in env.php. How can I solve this issue?

3
  • Did you check my answer on this topic?
    – Tu Van
    Commented Jan 8, 2023 at 13:56
  • 1
    Yes, it did the job. Just had to tweek a bit accordingly. Did not work before but, tried again yesterday. turned out I was doing it the wrong way.
    – LosMos
    Commented Jan 9, 2023 at 8:27
  • well done. Cheers!
    – Tu Van
    Commented Jan 9, 2023 at 9:00

1 Answer 1

1

Gd2Rewrite.php is located in:

  • vendor/magestyapps/module-web-images/Model/Image/Adapter/Gd2Rewrite.php in case you install MagestyApps_WebImages module via composer.
  • app/code/MagestyApps/WebImages/Model/Image/Adapter/Gd2Rewrite.php in case you install MagestyApps_WebImages module manually in app/code.

Once you found where is it located, run the below command to debug and maybe you are able to resolve the issue immediately:

  • grep -r open vendor/magestyapps/module-web-images in case you install MagestyApps_WebImages module via composer.
  • grep -r open app/code/MagestyApps/WebImages in case you install MagestyApps_WebImages module manually in app/code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.