Laravel autoloader - php

First I had my project running in Ubuntu, but I didn't have enough diskspace. So I made a new environment with more diskspace and I tried to transfer my project to the new environment.
I use virtualbox with Xubuntu 16.04.
PHP version 7.2.3
Composer update or install doesn't work. vendor directory is missing.
What am I doing wrong? screenshot of website.

Related

laravel installation error with composer

I have faced the following problem during the installation of laravel php framework.
following errors appeared when I run the command composer global require "laravel/ installer".
NB: I already have installed xampp, composer and add these to environment variable.
the following picture will clear the problem. enter image description here
I have used php version 5.6 and tried to install laravel having this version.
Later I have uninstalled xampp and install the latest version of xampp and things are working now

How to switch between two different php version with composer

I've got a lot of research about it but I found nothing that can help my problem. I'm developing a project for now using laravel5.1 and I'm using PHP5.6 version, however I also want to install the new laravel version which is L5.5 but the minimum PHP requirement is PHP7.0 and I chose the 5.6 version of PHP in my installed composer.
How can I switch this two versions of PHP without reinstalling the composer again and again? So if I work with Laravel5.1 I can use the composer with PHP5.6, otherwise I use Laravel5.5 with PHP7 version.
Note:
I'm using WAMP Server that has PHP5.6 & PHP7 available to use.
Create a Windows batch file that calls the composer.phar file using the php7 binary. Let's call the file composer7.bat:
#echo OFF
:: in case DelayedExpansion is on and a path contains !
setlocal DISABLEDELAYEDEXPANSION
c:\path\to\php7\directory\php.exe "%~dp0composer.phar" %*
Save the file along with the originally installed composer.bat file, mine is located in C:\ProgramData\ComposerSetup\bin\ directory.
Now call the php7 composer with the new command:
composer7 require ...

Laravel 5: blank page

I installed fresh copy of "Laravel 5" on my local machine via Laravel Installer, and it just working fine, but when I upload this copy to server, I get blank page, (using git)
system info:
1. server: ubuntu 12.04
2. php: PHP Version 5.6.11-1+deb.sury.org~precise+1
3. laravel: version 5.1.7
4. my local machine OS: OSX yosemite 10.10.4
notes:
1. "/storage" has read/write permissions (777)
2. another installation of Laravel (v 4.2) installed on the server & working fine
any help?
Make sure you set proper permissions on storage and bootstrap/cache folders - check them directly on remote.
Try run composer install.
We usually don't put the vendor (framework) folder inside git/svn, so you probably forget to "install" laravel.
Sometimes you may get the error while you didn't configure your database through .env file.
first check php version in live server
server: ubuntu 12.04
php: PHP Version 5.6.11-1+deb.sury.org~precise+1
laravel: version 5.1.7
my local machine OS: OSX yosemite 10.10.4
Laravel require 5.5 and greater version
so compare both server and laravel require version then it definately works.

Installing Composer on Windows 7 using windows installer

I've been trying to install Composer for a while now and still I could not figure out what I am doing wrong. First I installed WAMP Server 2.5(Windows 7 64-bit), then downloaded and run Composer-Setup.exe, installed shell Menus .
I chose this path
C:\wamp\bin\php\php5.5.12\php.exe
But once I clicked next I bumped into this:
Please review this settings PHP version 5.5.12
C:\wamp\bin\php\php5.5.12\php.exe.
Which settings should I use instead? When I try to run composer it does start but then shuts down immediately.

How to install Symfony 2.6 with wamp server in windows 8 successfully?

I am new to web development and I tried to install Symfony to my Laptop.. I have already installed fallowing softwares.
Windows 8 ( 64x )
wamp Server 2.4 (includes php5.4.12 & mysql5.6.12)
MySql Server 5.6 (This is not useless but I have installed)
I added C:\wamp\bin to path in System Variable
When I was trying to install Symfony I had to download Composer first So I downloaded Composer-Setup.exe from here
Then I run the wamp Server and went to PHP Extensions then Enabled php_curl and php_openssl also.
I did run Composer-Setup.exe file and selected Do not install shell menus and continued.
set C:\wamp\bin\php\php5.4.12\php.exe as the path to php.exe file
Finally I got following Composer Download error message
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Have I done wrong steps ? How can I solve this issue. Please help me to solve this and install Symfony 2.6 with wamp server 2.4 in Windows 8.
Note: This method does not use the composer but is equally effective
First ensure that PHP is available to your Path environment/system variable, if not add it.
Once you have added php to your environment variable restart your computer and open cmd and cd to your web root directory (project directory)
In cmd run the following:
$php -r "readfile('https://symfony.com/installer');" > symfony
This will download a file named symfony into your project directory (i.e. directory from where cmd is run)
Install the latest version of symfony as follows:
$php symfony new my_project_name
OR
Install/use the most recent version in a specific branch say 2.8
$php symfony new my_project_name 2.8
OR
Install/use specific version version within a specific branch
$php symfony new my_project_name 2.8.3
Note: steps 4, 5, or 6 will take some time, depending on your Internet speed to download Symfony
Is there a specific reason you want to install a WAMP stack? In my experience it's much easier and flexible to use Vagrant to provision a virtual machine with the right specs
Portable: just run vagrant up on another machine, wait a few minutes, and you're done
Allows you to keep the configuration of your developer's machines and the target server the same
Fixing a broken package just requires you to run vagrant up --provision later
Many packages like composer are written more with *Unix-systems in mind and will be easier to maintain and install.
Simply put, configuring an entire server directly on your machine is tedious work and isn't longer necessary. The Vaprobash project is a good example of how to get started

Categories