Install Laravel behind proxy - laravel

Im trying to install Laravel on a windows machine.
I followed this guide up to point 11.
http://www.wikihow.com/Install-Laravel-Framework-in-Windows
I also ran two commands already (which I got from https://stackoverflow.com/a/18852026/2240163)
set http_proxy=<your_http_proxy:proxy_port>
set https_proxy=<your_https_proxy:proxy_port>
But on running composer install i am met with a message
C:\wamp\www\LARAVEL>composer install
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL
: The specified procedure could not be found.
failed to open stream: Cannot connect to HTTPS server through proxy
How can I get past the proxy to install Laravel 4.
.
.
Here in lay the solution
C:\wamp\www\LARAVEL>set http_proxy=http://mnel:******#192.168.20.4:8080
C:\wamp\www\LARAVEL>set https_proxy=https://mnel:******#192.168.20.4:8080
I then ran the install composer command again and presto!
https://stackoverflow.com/a/24958700/2240163
Thanks #mneute

Here in lay the solution
C:\wamp\www\LARAVEL>set http_proxy=http://mnel:******#192.168.20.4:8080
C:\wamp\www\LARAVEL>set https_proxy=https://mnel:******#192.168.20.4:8080
I then ran the install composer command again and presto!
https://stackoverflow.com/a/24958700/2240163
Thanks #mneute

I got this same issue when I ran composer -vvv install. I did it in windows7 computer behind a company firewall. I search and tried every possible answer but didn't work. Then I tried following and it did work
https://www.calazan.com/how-to-set-the-proxy-settings-in-windows-via-command-line/

Related

How to fix "https://repo.packagist.org/packages.json does not contain valid Json"?

I've an issue with composer running on a vagrantbox (Centos 7), which started to just suddenly happen.
I've already tried manually running the command/solution mentioned on the link below but to no avail.
(To clarify, i'm using vagrant not docker, but it was the closest question i found to my situation. Most of the information i found are related to composer.json not being valid, but here is packagist.org/packages.json which, is currently valid)
Composer not working in docker container: "https://packagist.org/packages.json" does not contain valid JSON
Here are the details of the issue.
While running composer update on terminal i get:
composer update
[Seld\JsonLint\ParsingException]
"https://repo.packagist.org/packages.json" does not contain valid JSON
Parse error on line 1:
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
And when running composer install also on terminal every package returns this:
Failed to download psr/cache from dist: "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8"
appears broken, and returned an empty 200 response
Now trying to download from source
When running composer config --global repo.packagist composer packagist.org
the results are now
composer update
Loading composer repositories with package information
[Composer\Downloader\TransportException]
Your configuration does not allow connections to http://repo.packagist.org/packages.json. See https://getcomposer.o
rg/doc/06-config.md#secure-http for details.
Any ideas why this started to happen, how can i fix it?
Could also be IPv6 related, if your provider/system is configured for IPv6 but has no valid IPv6 route out to the internet.
This happened to me, and doing
sysctl -w net.ipv6.conf.all.disable_ipv6=1 (as root), then trying composer again fixed the issue.
To permanently apply it, add the rule to /etc/sysctl.conf (or wherever your OS preferred is)
same problem here, since php updated to 7.2.17.
On a centos 7 with php 7.2.16 composer run just fine...
Rollback to 7.2.16 is for now the only solution found...
Edit :
Seems to be a symfony flex issue : https://github.com/symfony/flex/issues/484
I had the same problem. After days of searching, I found a solution. It seems a PHP problem. Try to comment a line of curl extension on php.ini. I am using php version 5.6.
extension=php_curl.dll
Type ; before the extension name, at least it will be like this:
;extension=php_curl.dll
I had the same issue try to install symfony twig bundle. I ran :
set http_proxy=
set https_proxy=
composer require symfony/twig-bundle
and it worked
I ran a composer global require laravel/installer simply upgrading laravel/installer according to Laravel https://laravel.com/docs/9.x/installation#the-laravel-installer and the error was resolved.
Simply Just check out your internet and it well be ok
in the XAMP i have done follwing changes
comment the follwing line
;extension=php_curl.dll
and it worked properly
My solution: connect to a vpn before running the command!
For me basically the problem was because my IP was from Iran. Connected to a vpn and it worked perfectly.
it will works when we run this command in console
composer config disable-tls true
I bypassed the problem by redirecting the output to /dev/null.
composer require symfony/orm-pack > /dev/null

error occurred on running composer playground

I had installed my business network and then successfully started it. Then I opened my composer playground from the command line. After opening it is showing the below message what should I do?
This looks like you have installed composer-playground as root or using sudo or su.
The composer install instructions state that you should not use su/sudo.
There is additional information about installing composer in the Knowledge wiki, but if you are having permissions problems trying to install without root/su/sudo please see this link from the npm site.

how to fix error laravel 5.2 "failed to open stream: No such file or directory" without composer

I've got this error in my laravel 5.2 project who hosted in debian linux
Warning: require_once(/home/u706561288/public_html/sap/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
Fatal error: require_once(): Failed opening required '/home/u706561288/public_html/sap/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php70/usr/share/pear') in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
so many forum like stackoverflow tell me to using php artisan "composer update" but
unfortunately my hosting package not available to composer instalation
please tell me how to fix this problem
I suggest that you test these steps
On the Localhost, run these two commands (composer update and composer dump-autoload)
Re-upload the entire project on the server
Also, if the problem is not resolved, you can delete the ‍Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again.
When the hosting service or some PC does not allow to install Composer and appears error like in my case, follow these steps:
Delete all laravel project in hosting service. I recommend to use smartftp for good speed file access and tracked action.
Back to our localhost project and run composer install --no-scripts command and then composer clearcache.
Reupload all laravel project.
Don't forget to configure .env file.
I hope this can help with the same problem in future.
I had the same error while back, what I did to solve it was. I delete all the vendor folder from the root project then install it back by executing composer install
delete the ‍Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again
this helped me
If anyone still facing the issue after deleting the vendor directory and did composer install try to update your composer by composer selfupdate then do the same install process.

Laravel install package without composer

I'm just wandering if I can ask this here. I'm trying to install a package called Laravel Page Speed from my site that has already been hosted. My question is how can i install this package / any kind of package without composer into my hosted site. Or if i can install this with composer, how can i do this ?
I use Filezilla for ftp.
I've tried using the cmd's ftp command but its not working. Anyone have manage to do this ? Any answers will be helpful. Thanks
I guess it is shared hosting. Please setup the project on local machine and then install the required package. After installing just replace the hosted site’s vendor directory with your local vendor directory through any ftp client and it should be installed there too.
you need to have ssh access to server and then just run this :
composer require PACKAGE_NAME

Composer - It is downloading packages but not installing

I am trying to install one of my on going work (github-repository) into my server. I successfully downloaded my work into my server using Git. This work is a laravel based work.
After I did basic composer configurations, I tried to execute the command
composer install -vvv
It seems that, it downloading and cacheing packages but not installing them. After downloading and cacheing, the process get KILLED. I cant trace what is the exact problem here ?
Is anyone face this issue before ? If anyone know why composer behave like this,then please let me know.

Resources