I have some problem when I tried to serve the application on my localhost.
When I run
C:\xampp\htdocs\BePunct>php artisan serve --host=admin.bepunct.test
I received this error
Laravel development server started: http://admin.bepunct.test:8000
[Mon Mar 11 09:37:03 2019] PHP Warning: Unknown: php_network_getaddresses: getaddrinfo failed: No such host is known. in Unknown on line 0
[Mon Mar 11 09:37:03 2019] Failed to listen on admin.bepunct.test:8000 (reason: php_network_getaddresses: getaddrinfo failed: No such host is known. )
This is the my env setting: .env file
I have set on /drivers/etc/hosts to redirect the url to the localhost.
The error simply saying that the requested host is not found.
Please make sure your given host is referring to localhost domain.
127.0.0.1 admin.bepunct.test
Related
I am working on a laravel 6 api only application so I am testing the endpoints using postman. I am getting this error when I make request to any of the endpoints
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\Elo\apiProject\server.php' (include_path='.;C:\php\pear') in Unknown on line 0
From vscode terminal I can see that the development server starts, accepts then closes as seen below
$ php artisan serve
Laravel development server started: http://127.0.0.1:8000
[Thu Apr 2 21:05:53 2020] PHP 7.4.0 Development Server (http://127.0.0.1:8000) started
[Thu Apr 2 21:05:59 2020] 127.0.0.1:53500 Accepted
[Thu Apr 2 21:05:59 2020] 127.0.0.1:53500 Closing
[Thu Apr 2 21:27:23 2020] 127.0.0.1:53668 Accepted
[Thu Apr 2 21:27:23 2020] 127.0.0.1:53668 Closing
I have no idea why it is closing and no information inside the log file. What could be responsible for throwing such error?
I had the same issue and I think it's related to the port 8000.
Maybe it's already in use or something like this because when I changed the port to 9000 (ie: php artisan server --port=9000) it solved the issue and works just fine now.
I had the same issue.In my case it was when I started to work in the project from another computer and so, I did "git clone".
I solved the problem by creating a ".env" copying the .env.example and then, I executed the command "php artisan key:generate" to generate the new API_KEY, which is mandatory for the start of the server.
Hope it helped you !
With this command
php artisan serve
when my Ubuntu 14.04 is connected with network/online. It's ok. And shows
Laravel development server started on http://localhost:8000/
But when offline. Its show......
Laravel development server started on http://localhost:8000/
[Sun Dec 27 19:54:34 2015] PHP Warning: Unknown: php_network_getaddresses: getaddrinfo failed: Name or service not known in Unknown on line 0
[Sun Dec 27 19:54:34 2015] Failed to listen on localhost:8000 (reason: php_network_getaddresses: getaddrinfo failed: Name or service not known)
This helped me:
php artisan serve --host 127.0.0.1
I'm trying to control bitcoin daemon with PHP but I am having an issue when trying to connect to it.
I've followed these steps: en.bitcoin (dot) it/wiki/PHP_developer_intro
PHP code:
<?php
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://user:password#127.0.0.1:8332/');
echo "<pre>\n";
print_r($bitcoin->getinfo());
echo "</pre>";
?>
Bitcoind conf:
rpcuser=user
rpcpassword=password
server=1
daemon=1
listen=1
var/log/httpd/error_log:
[Tue Apr 06 15:47:15.403045 2015] [:error] [pid 2293] [client 10.0.0.34:50333] PHP Warning: fopen(http://...#127.0.0.1:8332/): failed to open stream: Permission denied in /var/www/html/jsonRPCClient.php on line 132 [Tue Apr 06 15:47:15.410993 2015] [:error] [pid 2293] [client 10.0.0.34:50333] PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://user:password#127.0.0.1:8332/' in /var/www/html/jsonRPCClient.php:140\nStack trace:\n#0 /var/www/html/bitcoin_get_info.php(15): jsonRPCClient->__call('getinfo', Array)\n#1 /var/www/html/bitcoin_get_info.php(15): jsonRPCClient->getinfo()\n#2 {main}\n thrown in /var/www/html/jsonRPCClient.php on line 1406
Edit:
$ bitcoin-cli getinfo
Works fine, with PHP it doesn't
Maybe try adding rpcallowip=127.0.0.1 into your config and see what happens.
Also make sure that your bitcoind.conf is actually being used, to test this you can set the daemon to testnet using testnet=1 in bitcoind.conf. Restart your bitcoind server then do bitcoin-cli getinfo to see which network it's connected to. If the change isn't reflected then perhaps the bitcoind.conf file is in another location?
Also, make sure you restart your bitcoind server every time you make a change to the bitcoind.conf file.
I'm having an issue where PHP is trying to use the default session directory (/var/lib/php/session) even though I have set it to something different in my php.ini file:
session.save_path = "/WEB/SESSIONS"
I have the exact ini file on another web server and no issue. I'm using PHP 5.5 with Apache. I have verified that PHP is trying to use /var/lib/php/session by looking at phpinfo and from the Apache error log:
[Mon Aug 04 14:32:18 2014] [error] [client x.x.x.x] PHP Warning:
Unknown: open(/var/lib/php/session/sess_e9bvjjf77tbpo40r86e5pegl80,
O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer:
https://x.x.com/
This is usually pretty straight forward for me but not sure why I'm having an issue. Would appreciate any advice! Thank you!
We are getting sporadic errors HTTP Request Failed in the Apache Error log but without a further reason.
The requested URL is on the local server.
I made some tests with a wrong URL and host but this leads to other errors for example
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known.
In the apache error.log:
[DATE] [error] [client XXX.XXX.XXX.XXX] PHP Warning: SoapServer::SoapServer(http://example.com/index.php/api/v2_soap/index/wsdl/1/): failed to open stream: HTTP request failed! in /var/www/lib/Zend/Soap/Server.php on line 762
[DATE] [error] [client XXX.XXX.XXX.XXX] PHP Warning: SoapServer::SoapServer(): I/O warning : failed to load external entity "http://example.com/index.php/api/v2_soap/index/wsdl/1/" in /var/www/live/lib/Zend/Soap/Server.php on line 762
I checked our Apache error log for the SOAP URL that is being called and the return code is "200".
So what can be the reason for this error?