Installation of valitron with composer on windows 7 - windows

I am trying to install valitron (https://github.com/vlucas/valitron) on Windows 8 but it doesn´t seems to work. It uses Composer (http://getcomposer.org) for installation, but documentation is quite poor.

open the php shell console, than enter "cd path/to/your/htdocs/project". then you only have to enter the following: "php path/to/your/composer.phar require vlucas/valitron *". This should work, I have tested it with Xampp Local Server.

Related

Vscode PHP Server extension not working after brew upgrade to php 7.4 in OSX?

After upgrading from 7.3 to 7.4 using brew in OSX Catalina, the PHP Server extension in VS Code no longer works. Selecting "PHP SERVER: Serve Project' just shows the php code in the browser as a text file. It no longer starts the PHP server.
I followed these instructions:
brew install php#7.4
brew link --force --overwrite php#7.4
brew services start php#7.4
export PATH="/usr/local/opt/php#7.4/bin:$PATH"
export PATH="/usr/local/opt/php#7.4/sbin:$PATH"
Upon completion, the command "php -v" in the terminal gave the correct version, 7.4. I don't know how to set PHP Server to use the upgrade? Adding the following paths (determined from running "which php" and "php -ini" in the terminal) to vscode's settings.json didn't fix the situation:
"phpserver.phpConfigPath": "/usr/local/etc/php/7.4/php.ini",
"phpserver.phpPath": "/usr/local/opt/php#7.4/bin/php",
Once I uninstalled running "brew uninstall php#7.4", the PHP Server worked again. I would like to be able to use PHP 7.4. Any suggestions are appreciated.
To remedy the situation, I switched to using XAMPP as my php server, with my Vscode workspace moved to XAMPP's htdocs folder.
I also switched from using the Vscode "PHP Server" extension to the "Open PHP/HTML/JS in Browser" extension, setting the extension's "Document Root Folder" setting to "/Applications/XAMPP/xamppfiles/htdocs" (without quotes), so I can just right-click on an php page in Vscode and open it in the browser, as I did with PHP Server.
So that my php pages autoload on change, I am using the browser "Live Server" plugin (requires the vscode Live Server extension) with the Actual Server Address set to "http://localhost", and VS Code's Live Server Address set to the default "http://127.0.0.1:5500/" (found by clicking on "Go Live' in the lower right of Vscode).
In conclusion for php with Vscode, I am now using XAMPP, "Open PHP/HTML/JS in Browser" extension, and the browser "Live Server" plugin.

CMD Laravel clear Cache code not working - How can i make this work

I formatted my system and after that i noticed that my laravel clear code on CMD is no longer working rather each time i try to clear my cache on CMD, i get this error message 'php is not recognized as an internal or external command, operable program or batch file'. Please i need help as this has really been tormenting my laravel project. This is the code i have been using for the clearing C:\xam\htdocs\ib>php artisan cache:clear. I want to understand if am doing something wrong. And this started after i reinstalled my window 8.1 to window 10.
Actually it has nothing to do with cache or artisan. Everything you need to know to fix this is to understand this error.
php is not recognized as an internal or external command
Is is error directly from Windows command line, and not Laravel. You are trying to use "php" command that Windows does not understand because it is not build-it functionality.
You need to have installed PHP on your system and set alias that will point to php executable file (where you installed PHP).
If you already have PHP somewhere installed then you need to just set alias (system variable): How to access PHP with the Command Line on Windows?
But I guess previously you had some all-in-one server solution that will include PHP, Apache/Nginx, Mysql/Mariadb etc, and there ale many ways to do that on Windows:
XAMPP It will install Apache, Mysql, PHP etc.
Laragon Similar to XAMPP but it is more focused on Laravel.
Laradock Pack of Docker images with all software needed.
Laravel Homestand Ready to use environment on virtual machine.
Or just manually install PHP standalone ;)

How to run laravel artisan command on server?

How to run laravel artisan command on server? I have to run this this command:
composer require realrashid/sweet-alert
If you have access for ssh, login through it.
Check if you have composer by typing composer in terminal else install it.
to Install composer use composer install command in terminal.
go to the root folder in which laravel is installed using cd command.
In the root folder, run the command php artisan in terminal.
It should work fine now.
What if you have Shared hosting?
Just look for terminal in cpanel. See image for ref..
Open it and try for the steps given above.
Thank you!

Drupal Drush master-branch in Windows 10 home requires composer - What and why?

After I installed Drush (master-branch for Drupal 8) at my Windows 10 home and set PATH EV with all it's needed values, I ran drush cc all... And then I got that error:
C:\wamp\www\benia>drush cc all Failed loading c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.4.0rc1-7.0-vc14-x86_64.dll
Unable to load autoload.php.
Drush now requires Composer in order to install its dependencies and autoload classes. Please see README.md.
I am not yet a programmer, and have no idea why would Drush need the Composer software, and how to install it on Windows 10 home for using Drush. Can someone please write a detailed, stepped answer, for laymen like me, how to solve it?
Running the Windows installer for Composer should take care of everything you need. You can find it here. If you prefer to use the command line the Composer site also has instructions for that.
Examples, Using cUrl:
curl -sS https://getcomposer.org/installer | php
Using PHP:
php -r "readfile('https://getcomposer.org/installer');" | php

Laravel 5 - "laravel new" command

Help guys in installing Laravel 5,
I'm using Windows 7 Home premium
I'm using the Git bash as my terminal
I run the command
composer global require "laravel/installer=~1.1"
And it successfully installed
But when I ran
laravel new blog
It shows the message below:
Crafting application...
'composer' is not recognized as an internal or external command, operable program or batch file.
Application ready! Build something amazing.
There's an error message "'composer' is not recognized....".
Why is this happening to me?
The composer command is working fine. :(
I've already added the path ";C:\Users\username\AppData\Roaming\Composer\vendor\bin" to my system variables
Run command install Laravel:
composer create-project laravel/laravel --prefer-dist
http://laravel.com/docs/5.0/installation
Solved! Tried to reinstall it at my office.
It seems that my internet connection at home blocks some websites and running this command
composer global require "laravel/installer=~1.1"
installed incomplete laravel installer.

Resources