I am trying to install SF2 2.7 version and when I follow the steps here to install Symfony Installer:
php -r "readfile('http://symfony.com/installer');" > symfony
It does not install SF2 and gives the errors:
G:\>symfony new alfa
'symfony' is not recognized as an internal or external command,
operable program or batch file.
When I try this command:
G:\>php symfony
Warning: readfile(): php_network_getaddresses: getaddrinfo failed: This is
usually a temporary error during hostname resolution and means that the
local server did not receive a response from an authoritative server. in
Command line code on line 1
Warning: readfile(http://symfony.com/installer): failed to open stream:
php_network_getaddresses: getaddrinfo failed: This is usually a temporary
error during hostname resolution and means that the local server did not
receive a response from an authoritative server. in Command line code on
line 1
I could not find any help on Symfony website about alternative installation method.
Found the solution. The problem was with PHP Version (was using old Xampp).
After running the command:
php -r "readfile('http://symfony.com/installer');" > symfony
I have to run the symfony application like:
php symfony
It works perfectly now. Thanks all for the support.
Related
After Laravel released new version (5.7) of this framework, i cant create new project and its commands not work
i did this works:
1) use laravel new MyProject with this error :
[GuzzleHttp\Exception\RequestException] Error creating resource: [message]
fopen(http://cabinet.laravel.com/latest.zip): failed to open stream: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.[file]
C:\Users\Saeid\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\
Handler\StreamHandler.php[line] 324
2) use composer create-project --prefer-dist laravel/laravel MyProject with this error :
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
3) update composer by composer selfupdate with this error :
[Composer\Downloader\TransportException] The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
4) update laravel instller by composer global require "laravel/installer"
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
Notice: in all of steps all links work on google chrome!!!! but it said "No connection could be made because the target machine actively refused it."
Notice: my composer version (1.7.2)
Notice: my Laravel installer version is (2.0.1)
Finally I found the problem ...
that's "Composer Proxy Setting"
because damned Filtering in Iran we must use proxy based programs for bypass the filtering.
last time i installed the composer the proxy based anti filter app (freegate) was running and composer get the local proxy address "127.0.0.1:8580" and all of the problems started...
today when the freegate was running i saw everything is OK!!!
some body know how to change the composer proxy setting???
i removed the composer and install it again but the installer automatically use this proxy address and disable the checkbox that use to select the proxy setting.
that means i cant disable proxy setting or change it.... :(
first download the composer the open your IDE the execute composer create-project "laravel/laravel" project-name
I'm developping an app under windows 10 + wamp + php 7 + Symfony 3.3
I'm trying to use the built-in server :
php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000
// Quit the server with CONTROL-C.
And when I go to http://localhost:8000/app_dev.php/ or http://127.0.0.1:8000/app_dev.php
I get this error :
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\wamp\www\myproject\vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php' (include_path='.;C:\php\pear') in Unknown on line 0
Same error under every routes. My routes are correct and works fine outside of the built-in server...
Can you help me with this issue please ?
I had same problem,
Solved by :
Delete symfony folder in vendor
composer update
If you have antivirus (like Avast) disable it before launching web
server
php bin/console server:run
I got the same error, even when installing via composer.
It turns out that for whatever reason when composer downloaded the project, the required file listed in the error you get (vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php) was not included...
To fix this, I manually added it from https://github.com/symfony/web-server-bundle/blob/master/Resources/router.php and then my symfony app worked as expected.
I had to restart my computer in order to actually add the file because somehow I was locked out of adding it even as admin in Windows after launching the php server.
UPDATE:
Even better than manually adding the file, I just deleted the symfony folder from the vendor folder in the project and reran composer update. the router.php file is indeed downloaded. Sometimes when running bin/console server:run it gets deleted. Not sure why.
It happened to me when upgrading from Symfony 3.1 to Symfony 3.4.
The reason was that I had left the development server running when I executed the command:
composer update
The solution:
Delete the contents of vendor folder
Execute composer update
Install the new Symfony development server bundle (follow the instructions)
Execute the server for development in a new port
php bin/console server:start localhost:3421
I had this problem too : it was AVAST that blocked the "router.php" file.
I went into avast -> protection -> quarantine, and put an exception of the router.php file
And then everything worked again
I get the same error and I solve this issue by installing the project with composer
composer create-project symfony/framework-standard-edition my_project_name
I am new in Laravel and I have the following problem.
I developed a Laravel 5 project on an old computer, and I put the code on a GIT repository. I retrieved my source code on my new laptop from the repository.
But I am facing problems while running the Laravel project on Apache and I am obtaining this error message on my Laravel website instead:
Warning: require(C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
The C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php is present in my project
Why am I facing this issue? What is the problem? What am I missing? How can I fix this issue? How can I try to solve this issue?
You need to run
composer install
command to install packages. By default vendor directory is ignored when committing to GIT (this is good) so if you pull data from repository you need to install all packages running above command.
The only thing I remember doing different was canceling a composer update command before it started updating any dependencies.
I get this error if I try composer self-update:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded:
php_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or
service not known
I'm guessing it's an issue with composer itself.
EDIT: composer diag fails on 3 things: http connectivity to packagist, github.com oauth access, and checking composer version.
I restarted the computer and it fixed it...The app is running on a Docker container so maybe just restarting the container itself would have helped, but I wanted to go all the way.
I am attempting to install the symfony php framework on windows
i have ran the command
c:\>php -r "readfile('http://symfony.com/installer');" > symfony
and copied the file to my projects directory
copy symfony c:\developmentStack\www\knoxville_programmers
and yet upon executing the installation file
c:\developmentStack\www\knoxville_programmers> php symfony
i receive the following error message
Warning: readfile(http://symfony.com/installer): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in Command line code on line 1
anyone know a solution to this i have searched sensio labs dry looking for community help and it doesn't seem many others have had the problem