Install Laravel without Composer - php

I'm not allowed to install Composer on my server at work. Bureaucracy! Also, it's not connected to the internet. It's a company intranet server and I'm not a sys admin for it.
Am I going to experience high levels of difficulty installing and running Laravel without Composer? Should I use another Framework?
I'm quite a basic PHP programmer without too much command line experience to be honest. I'm used to having everything I need for a project contained in one directory - like CodeIgniter for example.
This article is suggesting that there are quite a few required dependencies. Will my Laravel project just fail to run properly without them?
-- UPDATE --
If by chance, there is a way to do it without Composer, then please tell me how I can do this. I downloaded the source files for Laravel from GitHub (like you would do with CodeIgniter) but I get errors when I try and view it on a browser;
Warning: require(/var/www/html/test/laravel/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/test/laravel/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/var/www/html/test/laravel/bootstrap/../vendor/autoload.php' (include_path='.:/php/includes:/var/www/html/php/includes:/jpa/release/jpa/includes:/usr/share/pear:/usr/share/php/phpmailer:/apache/htdocs/applications/surveys/Includes:/var/lib/ZF1/library') in /var/www/html/test/laravel/bootstrap/autoload.php on line 17

I guess one way would be to run composer on another machine(maybe at home). Then just take all the files that composer downloads and move it to your work machine.
Installing it manually is a lot of work. You have to do all the stuff that composer does in the background effectively. Following all the dependencies will be super hard.

Related

Laravel Symfony/console , installation failed because of "Invalid argument"?

Sorry if it seems like a nooby thing, but I am nooby at this composer/cmd thing.
I keep getting the same error while trying to install Laravel installer.
The composer resists to install "symfony/console", it downloads it, but cannot load it. Any ideas why?
Just today it was working fine, few hours in I tried to create a new project and that's what I keep getting :
**[ErrorException]
copy(D:\Laravel\cr\vendor/symfony/console/b9a023bcb5ec9a752e17f3
f5c1358bfc): failed to open stream: Invalid argument**
Since the error I've tried reinstalling composer, deleting all of its data from Appdata\Roaming\Composer folder, tried to delete vendor folder from laravel project itself and install composer through bash once again. None helped, can't find similar answer to the question either.
I had the same issue.
Windows Defender detected Trojan:Script/Foretype.A!ml on symfony/console (v5.1.7)
After i disabled the Virus Protection i was able to finish the install.
You have to disable windows defender or other anti-virus programs; also, check you have proper permissions to the folder.
how to disable windows defender:
search setting in windows
click windows security, below you will see virus and threat protection
turn off real time protection, then create project in laravel, it will run with zero errors

Is it possible to change cached Container folder name?

I am currently working on the project that has over 20 cron jobs. Some of them are pretty long processes. It was built on Symfony 2.8, so we decided to upgrade it to 3.4 LTS.
After the upgrade we noticed that, if there is ongoing cron job (long process) and we push some changes to Prod environment we get this error:
Fatal Compile Error: require(): Failed opening required '/.../cache/prod/
Turns out, that when we deploy the changes, cached container (in var/cache/prod/ContainerXXXXXX) changed the XXXXXX value. Or in other words, we clear the cache (during deploy) and then it generates new Container in cache directory. More about this problem: https://github.com/symfony/symfony/issues/25654 .
So, my question (and idea) is, is it possible to make cache Container directory name always the same? Maybe any ideas how?

How to use PHPMailer via Composer on FTP

i have started making my own site where i want to use PHPMailer!.First of all i installed PHPMailer via Composer(cmd) on my desktop then used localhost to run my page where the PHPMailer was running just fine.I then tried to just transfer my page files and files that were generated in there from PHPMailer (those are:vendor directory ,composer.json,composer.lock) to FTP.When i tried running it on live page it didn't work and threw Error:
Fatal error: require(): Failed opening required '/www/sites/0/site25740/public_html/vendor/composer/ClassLoader.php'
(include_path='.:/usr/share/php:/usr/local/zend/share/ZendFramework/library') in
/www/sites/0/site25740/public_html/vendor/composer/autoload_real.php on line 12
I think that my problem is that i generated those files into my desktop directory and therefore they are not working on live page.
Is there any way to maybe generate those files on my FTP server or maybe changing the structure of those files to work on live page?
You need to use SSH not FTP.
Once you SSH into your server, you can run the composer install command to install dependencies the same as you have on your desktop.
[Edit] An FYI - Yes, we can upload the vendor folder. Composer is a deployment tool. Uploading a vendor folder is NOT using a deployment tool.
If I am deploying 100 applications - and uploading 50mb of dependencies 100 times from a branch office on a cable/dsl ... how fast & efficient is that? If we offload that 50mb download to the server, how fast is that?
We have an option to do deployments wrong, or to do deployments properly.
I do not condone doing it wrong. It's clearly an option, however it is wrong.

Trouble installing Omnipay via Netbeans composer extension

I am currently trying to install Omnipay into my Codeigniter project. I am stuck on windows because I do not have ssh access to the box where this needs to run on. So far I have gotten a new directory in the project root that is named "vendor" and it contains a lot of empty directories referring to Symfony (for what reason is beyond me).
Then I get a runtime exception that I need to enable the openssl extension in my php to download the necessary files and this is where I am stuck at. I don't run WAMP on my computer and I just use the php.exe I downloaded to work with netbeans.
Isn't there an easier way to get omnipay to run? Like just download the files from somewhere and plug them into my project like normal? It seems to be an aweful lot of headache to get a simple library to run in my CI project.
Please forgive my ignorance towards composer but I currently see no benefit of using it for this particular project.
You can "just download" the files here: https://github.com/omnipay/common/archive/master.zip
The problem is, Omnipay depends on Guzzle (an HTTP library), and Guzzle depends on some Symfony components. So you will spend the rest of the day downloading dependencies and making sure you have all the necessary files. That is the problem Composer solves for you.
I don't have any experience running Composer on Windows, but I would start here:
http://getcomposer.org/doc/00-intro.md#installation-windows
Using the Installer
This is the easiest way to get Composer set up on your machine.
Download and run Composer-Setup.exe, it will install the latest
Composer version and set up your PATH so that you can just call
composer from any directory in your command line.
Once you have Composer installed, you should simply be able to make a file named composer.json in your project root, with the following contents:
{
"require": {
"omnipay/omnipay": "~2.0"
}
}
Then use the Command Prompt and cd to your project's directory, and run composer update to download the Omnipay files and all their dependencies.

Symfony2.0.15 Doctrine-Fixtures Windows Command Line Fatal Error

Recently started playing around with S2, amazing stuff! A while ago started an online Symfony2 Blog tutorial, however I got stuck on the page with Doctrine Data Fixtures generation,
Here is the message I'm getting when executing php app/console doctrine:fixtures:load in the console:
Fatal error: Class 'Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand' not found in C:\xampp\htdocs\blog-sf2\vendor\bundles\Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand.php on line 40
I am really stuck on it and I am running Windows 7, so can't really use deps file to pull dependencies from older versions (OR CAN I somehow??),
I've downloaded the newest versions of FixtureBundles and DoctrineFixtures.
Really appreciate any help on this one!
I think you need to read the installation documentation of this bundle for the 2.0 branch
You don't really "use the deps" file. The bin/vendors script uses it, and uses git. So what you need to do to "use the deps" is install git (and btw, install git-bash, you'll get a far better terminal).

Categories