I'm trying to deploy PHP code with Websocket in in a Azure Web App environment.
It works fine on a Virtual server but it does not run as a Web App.
I find some older articles that this might not work.
I like to avoid useing Virtual servers, so any insight on how to solve this?
The solution was to deploy a Docker container image - this was the only way we could find that solved the problem.
Related
I just implemented web-sockets on my laravel php app using the laravel-websockets library. I wanted to know how to deploy it to heroku as it requires me to run another server with command "php artisan websockets:serve".
I have already deployed the app on heroku, I just need help with deploying the websocket server to Heroku.
It's not currently possible to have a websockets server running
alongside a PHP app on Heroku.
As stated in https://help.heroku.com/8R7OO0ZV/can-i-run-a-websockets-server-using-php-on-heroku which was the first result of a search of "heroku websocket php" on google.
I'm trying to deploy my local host laravel project to a live Cloudways Digitalocean server. I have done a SSH transfer from bitbucket to deploy the app but am getting the following error when I try to view the live app. Stripe is not causing any issues on the local host.
"Class 'Laravel\Cashier\CashierServiceProvider' not found"
I've also created a seperate .env file and uploaded it to the server using the server database variables. Can anyone advise if this is the correct procedure?
I've found it really difficult to find any tutorials on how to deploy a Laravel app to a live environment. If anyone has encountered this issue or could point me in the right direction to fix this error it would be much appreciated.
I have my own server how can I run symfony project without creating virtual host.
Do I really need VirtualHost for symfony development?
It all depends on personal preference, if you want to open project with virtual host you can configure it, if not keep like this
localhost/project_folder/web/app_dev.php.
Your symfony app will run with the above URL. I have hosted so many apps on Cloudways and I ran my apps with the URL like this
phpstack-21306-71265-234521.cloudwaysapps.com/fos/web/admin
so I don't need to setup a virtual host either on live server.
Is it possible to create an environment on local machine( i.e. localhost) where we can create and consume web service using PHP?
Is there any flow to create a web service like environment on localhost?
I would like to create an environment on localhost for web services where local machines, on intranet, get connected to main server (here again it's local machine) and can consume web services.
Like on internet we have Web Servers from where we can create and consume web services, Can we do the same on localhost?
Edit:
I am using WAMP with
PHP 5.3 Apache 2.* MySQL 5Windows 8
It is easy to create a local web service. You will need a local web server (like IIS or xampp) to execute PHP locally.
Access you PHP application in your browser using http://localhost/<yourApp>.php and provide any webservice at a local URL as well, e.g. http://localhost/<yourService>.php. Your application can then access the webservice using the local URL.
This works both for REST or SOAP-style services.
EDIT: Your edit shows that you already set up a local environment to develop and test webservices. You should really be more specific in your question, maybe you are looking for a tutorial to create web services with PHP in genereal. If so, Google will be your best friend: https://www.google.de/#q=create+web+service+using+php+tutorial
So I am trying out AWS (Amazon Web Services) and I figured out how to put my db and its information on their server however I am not sure as to where I will put my php web service which gives a JSON response. Is there a tutorial or can someone tell me how I can accomplish this?
Suppose you are going to use the LAMP stack. I would either install LAMP on your EC2 instance or find a community image that has LAMP already installed and create an instance using that image.
You can start with Amazon Lightsail which is a beginner friendly service to deploy applications.
Or you can put your Application in Elastic Beanstalk and use its build in RDS feature for your database.
Attached you see the documentation for deploying a PHP application.