Installing Silverstripe with puppet - vagrant

I'm trying to use puppet to create a default installation of Silverstripe for testing new projects. Is there a way to install silverstripe using just the commandline?

You can create a _ss_environment.php file, then run php framework/cli-script.php dev/build. The default mysite/_config.php is set up for this already.
You can read more on the _ss_environment.php file in the docs.

If your hosting environment either has composer or allows you to install software, using composer to install from the command line is an option. Refer: Installing and Upgrading with Composer

Related

How to install composer globally for laravel app in windows?

I have a question related to composer and laravel. My question is whenever I install the fresh laravel app using command :
composer create-project laravel/laravel blog
Inside my C://xampp/htdocs/ directory and then change path to C://xampp/htdocs/blog/, here I am unable to run the composer command but I had already installed composer from its official website globally in C://xampp/htdocs/ directory. So is there any way to use composer command globally whenever I install fresh laravel app, so that I don't want to install composer in the laravel app directory everytime.
Now I guess they provide direct setting up global installation,
Check here
I did it like this a lot earlier,
Change to the path (or you can add that directory to your path later), and run the installer as mentioned on composer download site to download composer.phar.
Create a new composer.bat file alongside composer.phar.
Using cmd.exe:
run
echo #php "%~dp0composer.phar" %*>composer.bat
Then set it to path environment variable(see this)
Test with a new terminal:
composer -V
Will return
Composer version 1.10.6 2020-05-06 10:28:10
go to composer website and download the exe file, you should have it gloablly if you install it that way.
Good luck ^_^

Laravel Installer method

Normally I do install Laravel 5.1 by following this command regarding to documentation:
composer create-project laravel/laravel --prefer-dist
It works fine.
But I read in the documentation under "Via Laravel Installer" also it is possible to install via Laravel Installer, which is much faster than installing via Composer:
laravel new blog
But to use this method I need to run following command once:
composer global require "laravel/installer=~1.1"
When I do run it I get following errors many times
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks
is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks()
instead in
phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226
after many line of same error ./composer.json has been updated appears and it continues with the same line of errors, it ends with following
Loading composer repositories with package information Updating
dependencies (including require-dev) Nothing to install or update
Generating autoload files
What is wrong with it? Any idea or solution.
My environment: Windows 10, GitBash and cmder console.
Update of composer, I did ran composer self-update also
Snapshot of console
EDIT:
Note, I can confirm after solving the issue that the installation via Laravel Installer method is faster than composer.
The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.
If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.
In addition to #WouterJ answer.
Worst case if the steps provided by #WouterJ did not work, you could manage to uninstall and reinstall composer for windows.
When done, run composer global update to be sure to get latest updates, if there was.
Then run composer global require "laravel/installer=~1.1" and it should works.
Remember to update your windows environment path C:\Users\UserName\AppData\Roaming\Composer\vendor\bin

Manually install Parse PHP SDK without Composer

I've got a client on a shared hosting environment (which I can't change) and I'm needing to install the Parse PHP SDK, but the host won't allow me to install the Composer package manager. Does anyone else know of a manual install method?
If you have wget/unzip available, just download latest release zip (bellow the release, this file).
Use unzip to unpack package and load it with PSR-4 autoloading (the composer's approach).
Composer isn't meant to be an installer, so you are not expected to run Composer on the production machine. What would happen if during your update process Github would be down? No new website version! And maybe also no old version.
Run Composer somewhere else, and then upload the result to the server, after you verified that everything went well.

How to install Laravel via installer?

In Laravel documentation, it explained one short paragraph on how to use installer to install Laravel.
First, download the Laravel installer PHAR archive. For convenience, rename the file to laravel and move it to /usr/local/bin. Once installed, the simple laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new blog would create a directory named blog containing a fresh Laravel installation with all dependencies installed. This method of installation is much faster than installing via Composer.
I am a Windows 7 user. After download the laravel.phar file, where should I store the file? I don't think there is any /usr/local/bin directory on Windows 7. How can I get the laravel command to be able to use in command window?
Install laravel 5.2 via Laravel Installer in windows 7
Steps:
Please make sure you have installed composer into your computer
Open command prompt
$ composer global require “laravel/installer”
C:\xampp\htdocs> laravel new mylaravel
Youtube video guide:
http://www.pranms.com/how-to-install-laravel-5-2-via-laravel-installer-in-windows-7/
The laravel installer needs to be in your PATH (no matter which Operating system).
In Unix based systems, /usr/local/bin is in your PATH by default.
On Windows, you can add a folder to your PATH by doing like this:
Start the System Control Panel applet (Start - Settings - Control Panel - System).
Select the Advanced tab.
Click the Environment Variables button.
Under System Variables, select Path, then click Edit.
From http://windowsitpro.com/systems-management/how-can-i-add-new-folder-my-system-path
It's a lot easier to install using Composer. Download the Windows Composer installer from the Composer Website and run it. Once it's installed you can run from the command line:
composer create-project laravel/laravel your-project-name
This will create the folder your-project-name and install Laravel in it. The advantage of using Composer it that it makes adding other packages to Laravel really easy.

Cant' get MongoDB PHP Extension to work

I've been following this tutorial to try to install the PHP MongoDB extension but unfortunately haven't been able to get it working.
http://www.marcwitteveen.com/tech/mac/installing-mongodb-on-a-mac-so-you-can-access-it-with-php/
I can access the collections in the terminal, the database is properly installed but I didn't manage to get the extension working.
I have the following problem:
Sinan-MBP:mongo-php-driver-master Sinan$ cd
Sinan-MBP:~ Sinan$ sudo pecl install mongo
pecl/mongo is already installed and is the same as the released version 1.4.1
install failed
I've been trying several times so that's probably why I get this message. However, even after adding "extension=mongo.so" to the php.ini, I can't use MongoDB in my PHP code.
Thank you for your help.
This is likely a case of modifying the wrong php.ini for the environment, or PHP not being able to find the mongo.so in its directory. If you have separate php.ini files for CLI and web environments, PECL might have installed the compiled extension to a different directory.
If you run through the installation docs, there are instructions for grepping extension_dir from php -i and ensuring that mongo.so is present in that directory. If your web environment has a separate php.ini file, then grepping output from php -i likely won't help. You may need to view phpinfo(); output through your web server and check for the extension directory there.
One additional test that PECL installation succeeded would be attempting to view reflection information for one of the driver classes from the CLI environment. You can do so with php --rc MongoClient, which should print info on the methods of the MongoClient class.
I don't know why it was not working but I found a workaround late last night.
I uninstalled the php extension and then installed it again and made sure the extension was loaded in the php.ini
sudo pecl uninstall mongo
sudo pecl install mongo

Resources