Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

suba_ic's avatar

Composer Timeout Error

I am new to Laravel and tried creating new project, But I am stuck with below error I could not proceed at all. Kindly help me resolving this.

D:\Learn\Laravel\Workshop\workspace>composer create-project laravel/laravel:^11.0 example-app Creating a "laravel/laravel:11.0" project at "./example-app" Installing laravel/laravel (v11.0.0)

  • Downloading laravel/laravel (v11.0.0) A connection timeout was encountered. If you intend to run Composer without connecting to the internet, run the command again prefixed with COMPOSER_DISABLE_NETWORK=1 to make Composer run in offline mode.
  • Downloading laravel/laravel (v11.0.0)
  • Downloading laravel/laravel (v11.0.0)
  • Downloading laravel/laravel (v11.0.0) Failed to download laravel/laravel from dist: curl error 28 while downloading https:/ / api. github. com/repos/laravel/laravel/zipball/c1fc3a0e69be0a453cfce6bbb105b2b839b55bdb: Resolving timed out after 10000 milliseconds Now trying to download from source

In GitDownloader.php line 82:

git was not found in your PATH, skipping source download create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [ [ []]]

0 likes
29 replies
suba_ic's avatar

@gych No Not installed. I have installed only composer. I will download and let me check. Very glad of your response. Thank you @gych

gych's avatar

@suba_ic No problem :) Download it and let me know if it works

1 like
suba_ic's avatar

@gych I have installed it now, and executed composer in GIT CMD. But still I receive this same issue. My internet connection is also good.

gych's avatar

@suba_ic When you run git --version command in the same terminal which output do you get?

1 like
gych's avatar

@suba_ic Do you also still get this error or only the timeout error?

git was not found in your PATH ...

gych's avatar

@thaiscordeirop Ok try this: go to the php.ini file and look for this line

;extension=zip

Remove the semi colon at the beginning infront of extension and save the file

extension=zip

After that restart apache or nginx depending on what you use

suba_ic's avatar

@gych That was the first thing I did.... :( in whatever way I executed, timeout error showing up.

;extension=soap ;extension=sockets ;extension=sodium ;extension=sqlite3 ;extension=tidy ;extension=xsl extension=zip

gych's avatar

@suba_ic Try to run this via the terminal php -m to confirm that the extension is successfully loaded, it will show all the loaded extensions

suba_ic's avatar

@gych tokenizer xml xmlreader xmlwriter zip zlib

Yes Its showing

gych's avatar

@suba_ic Did you restart visual studio code after making all the changes? Are you using the terminal inside of visual code?

suba_ic's avatar

@gych No I am using CMD prompt and GIT CMD as you suggested. Only after creating the project I can work in the editor right. So I have not entered into the editor side.

suba_ic's avatar

@gych I have checked and followed the forum. Git was not updated properly on the Path variable. I have updated it. Then restarted. And again tried creating Laravel Project.

I received the same error but this time I could see files got imported in the new folder which I have created and I executed thru php artisan serve. I could see the page is running.

Thanks Alot. So, becuase of this error, do u think some files would be missing?

gych's avatar

@suba_ic Ok good that it at least downloaded the files now, If you want you can upload your project to for example github then I can confirm for you if you got all the files.

suba_ic's avatar

@gych Ok. I have created a repository (Private Mode) and uploaded a Zip File. How can I share with you.

gych's avatar

@suba_ic This is my github profile https://github.com/gychem

When working with Git you can also link the remote repo to your local project. This has multiple advantages and lets you easily push updates to that repository.

suba_ic's avatar

As you directed, I tried to connect my local folder to remote repository as you can see in my git. But I pusehd the files I could not see. Also I configured GItDesktop.

gych's avatar

@suba_ic I can't see that you've added me to the repo, can you send me the link?

Also which steps did you take to push the files to the repo? Personally I don't use github desktop. I only use the terminal or vscode source control.

suba_ic's avatar

@gych I dont know how to add also I could not send link here. Just separated with spaces Suba-IC / Laravel-Level-1 /

gych's avatar

@suba_ic Hey, I've just checked your link but it doesnt work for me

enoch91's avatar

@gych Ensure you have the updated version of composer, you can run composer self-update to update.

If you suspect network restrictions are causing the issue, you can try a VPN.

1 like
me-miheer's avatar

Hi @suba_ic, If you are using windows os then it's a problem of turning on developer mode or flushing ip.

You run this command in your cmd : ipconfig /all

You should get this setting :

IPv4 Address. . . . . . . . . . . : 172.22.11.0 (Preferred) // Ip address may differ

Your system might be using IPv6.

If yes then you need to change it to IPv4 and your problem will be resolved.

Steps:

  1. Open command prompt or windows shell as administator
  2. Run the following command : netsh interface ipv6 set global disabled
  3. Restart the Computer system.
  4. Again Open Cmd and Run the following command : ipconfig /all
  5. Check if it's changed to IPv4

Note : Switching to IPv4 from IPv6 is absolutely safe and normal. If ever in life you want to switch it again to IPv6 the Run the following command : netsh interface ipv6 set global enabled

Thanks.

Please or to participate in this conversation.