Giter VIP home page Giter VIP logo

Comments (10)

daxgames avatar daxgames commented on June 14, 2024 1

Last I checked, Laragon was easily updateable to current Cmder simply by replacing the Cmder folder it includes with a newer version. I did some of the work to make that possible.

from cmder.

daxgames avatar daxgames commented on June 14, 2024

If running Cmder - Full.

Curl - yes
Php - no

from cmder.

gdplay avatar gdplay commented on June 14, 2024

If running Cmder - Full.

Curl - yes Php - no

so how do i add php to cmder

from cmder.

DRSDavidSoft avatar DRSDavidSoft commented on June 14, 2024

@gdplay Note that curl.exe comes with Windows 10 and 11 pre-installed, so that works even with Cmder Mini.

Regarding PHP, first you can take a look at Laragon which comes bundled with PHP and an earlier version of Cmder: https://github.com/leokhoa/laragon

Due to the outdated version, Laragon doesn't satisfy me, so you can install PHP separately if you want.
It's super easy to add, but I have written all the info you might want below.

  1. Download the latest version of php here: https://windows.php.net/download/
    The best one at the time of writing this is VS16 x64 Non Thread Safe, firstly because it's for 64-bit and also because the NTS version is prefered in command-line apps rather than ZTS, which stands for Zend Thead Safe or simply TS (Thread-Safe).
  2. Extract the zip file to somewhere, for example:
    • You want PHP inside Cmder only: [cmder_root]\opt
    • You want PHP system-wide (globally): C:\development\php or C:\tools\php or just C:\PHP
  3. Add the PHP's directory to the path
    • (Optionally) If you have extracted to [cmder_root]\opt, read this Readme.md on how to configure Cmder to use your PHP,
      For example open %cmder_root%\config\user_profile.cmd and add %lib_path% enhance_path "%cmder_root%\opt\php"
      If you go this route, @daxgames can help with using the opt dir.
    • OR, personally I want to be able to use php.exe globally, even outside Cmder, so I added the php root directory to path, you can read our guide here: https://github.com/cmderdev/cmder/wiki/Setting-up-Environment-Variables
      Important: In the guide above, you may skip defining the %cmder_root%, you only need to add the php root dir to '%PATH%'
  4. Now add your php.ini configuration file based on your needs. If you don't have one, there is a file called php.ini-development that I recommend copying and pasting as php.ini because the development one is more suited for desktop computers than the production one.
    If you are curious, here is my own php.ini file that is suited for PHP 8.2: 📄php.ini
    I have applied some useful tweaks, such as disabling the output buffer, increased max_execution_time and memory_limit and post_max_size, enabled startup errors, disabled html-style errors, etc. You shouldn't use it directly since I have enabled extensions that you might not have installed, such as the Xdebug php debugger. Rather compare it with the php.ini-development file that I mentioned to see what values you personally might want to use. Use either VS Code, WinMerge or some other tool to compare files.

After that, you can run php -v to ensure it is installed correctly:

PHP 8.1.13 (cli) (built: Nov 22 2022 15:49:14) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies

If something didn't work or you needed help don't hesitate to ask, if I have time, I'll be happy to help.

from cmder.

DRSDavidSoft avatar DRSDavidSoft commented on June 14, 2024

@daxgames Good to hear, @gdplay you can test this out to see if our recent changes in Cmder would break anything. If it works, awesome! If not, you'll need to open an issue in the laragon repo.

@daxgames I don't support putting binary blobs in git. Maybe they shoud've used a build system to pull the latest (or a specific) version of Cmder and build in with CI, like we do with the vendored dependencies. It's weird to me to include .exe files in a git repo. We don't do it for Clink and ConEmu.

from cmder.

daxgames avatar daxgames commented on June 14, 2024

@DRSDavidSoft I don't know what you are referring to when you say 'binary blobs'.

from cmder.

DRSDavidSoft avatar DRSDavidSoft commented on June 14, 2024

To clarify, laragon is including the built .exe files in the source codebase repository. For example, it does that with Clink:
https://github.com/leokhoa/laragon/tree/master/bin/cmder/vendor/clink

I'd prefer it if the repo wouldn't contain .exe files, like what the Cmder repo does.

from cmder.

gdplay avatar gdplay commented on June 14, 2024

ok so if i download laragon and run the cmder in it it has php installed with it?

from cmder.

DRSDavidSoft avatar DRSDavidSoft commented on June 14, 2024

@gdplay True, Laragon is a complete development environment which has PHP and Cmder inside it.

from cmder.

gdplay avatar gdplay commented on June 14, 2024

alright thanks

from cmder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.