Skip to content

Tag: command-line

Running PHP commands gives Xdebug errors

I’m currently getting some weird error messages whenever I run which php or php –ini: I currently have 4 php versions in my /usr/local/etc/php folders: currently using php7.3 as my default php version. I’m planning to remove older php versions if that doesn’t cause much trouble. Can so…

Problems with installing composer

I am currently trying to install composer in order to install laravel. Following their website instructions, I am entering the following code into my terminal: But without success, I get the following error: This gives me the notion that I do not have permission to do this, is this the reason and why is it oc…

How can I parse command line arguments in PHP?

I call a PHP script from command line $ php my_script.php –num1=124 –first_name=don How can I get access to any key value pairs passed into this script? The keys can be arbitrary, so using getopt() with particular values will not work. Here is what I want access to in my script: If I use var_dump(…

Symfony2 generate controller inside custom folder

Symfony2 has a command for generating controllers http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_controller.html Command’s default behavior is to generate the given controller inside controller folder within the bundle. Is it possible to customize the folder where the con…