Currently am implementing a video conferencing application using Tokbox . Sample server and web client is working in my local-host .But when i tried to run the PHP tokbox server on AWS EC2 instance .The server is not working properly.
I am using the following run-demo file to start the server in AWS.
export TOKBOX_API_KEY=**********
export TOKBOX_SECRET=**********************
if [ -d "storage" ]
then
rm -rf storage/
fi
php -S ec2-34-240-136-230.eu-west-1.compute.amazonaws.com:8083 -t web web/index.php
I am geting the alerts "Server started" ,Listening on ec2-34-240-136-230.eu-west-1.compute.amazonaws.com:8083" after executing the "run-demo" commands. But when i took the URL http://ec2-34-240-136-230.eu-west-1.compute.amazonaws.com:8083/room/session not getting any json result from server.
You can probably just do:
php -S localhost:8083 -t web web/index.php
To confirm it works, after running the above command, open a new SSH session and run:
curl -v http://localhost:8083/room/session
The issue you're facing is the port is likely being blocked. You will need to expose port 8083 using AWS security groups.
Related
Hope someone can shed some light on this one, it's driving me nuts. I have a backup web app written in php, this creates an rsync which is run on a remote server and stores the files in a local folder. This function works using the php exec function.
We are migrating this to within a laravel8 app and the identical call to the same rsync and to the same local storage directory fails. The error is a 255.
If i use the same rsync command from command line it works the same as it does in our original app.
A bit more...
The Laravel instance is using Horizon to perform this so i have this in the handle() function of a process file in the jobs folder.
Of note I have a dev version of this laravel app and with this it works correctly and syncs with the remote folder.
My rsync command is using an id_rsa file for the apache user - www-data (the app is not available to the outside world). the folders have the correct permissions and owners (www-data and 755 for directories and 644 for files).
an example (modified version) of the rsync command:
rsync -rLDvcs -e "ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /var/www/.ssh/id_rsa" --no-perms --no-group --no-owner --progress --exclude-from '/var/www/backup/exclude.txt' --delete --backup --backup-dir=/hdd/mnt/incs/deleted_files/the-project/ theproject#188.102.210.41:/home/theproject/files/ /hdd/mnt/incs/theproject/files
the code which calls this is:
$aResult['res'] = exec($rsync . ' 2>&1', $aResult['output'], $aResult['return']);
when run $aResult['return'] has a value of 255 and the process has failed. The docs seem to say this is a failure to connect yet the identical call on another app on the same machine works (as it does if rsync is used in command line)
Any ideas? The php version on this box (the original app and the laravel upgrade) is php8.0 and my dev copy uses php7.4. my dev and this internal box use Ubuntu20.04 and apache2 so besides the php version are pretty identical.
No error is in any logs.
thanks
Craig
I installed a fresh copy of Symfony on my localhost at htdocs\symfony-fresh and the file structure is:
Now I run the following in git bash:
$ php bin/console server:run
then I was suggested to browse at 127.0.0.1:8000 to see the fresh installation of symfony. It works like a charm. But one day later I browse at 127.0.0.1:8000 and I can see the following error message:
This site can’t be reached
127.0.0.1 refused to connect.
It seems server is offline. I checked my apache & Mysql is running.
Then I tried to run the command again:
$ php bin/console server:run
But same problem is going on. I am new in Symfony and enjoying to learn, but this problem stuck me. What should I do to run this app browsing at 127.0.0.1/symfony-fresh or localhost/symfony-fresh?
You should check status follow:
php bin/console server:status
By default, the web server listens on port 8000 on the loopback device. You can change the socket passing an IP address and a port as a command-line argument:
# passing a specific IP and port
php bin/console server:start 192.168.0.1:8080
# or like this
php bin/console server:start *:8080
Apache has nothing to do with this, the built in Symfony server is based on php built in server (php -S ...)
The built in server is intended for development use only, you must run the command every time the server has stopped or the machine has rebooted.
If you want to use Symfony with apache you can setup a virtualhost: https://symfony.com/doc/current/setup/web_server_configuration.html
I am trying to deploy a Symfony2 PHP project on Ubuntu 15.10 with MagePHP, but it always asks me for the SSH users password when executing:
sudo php vendor/andres-montanez/magallanes/bin/mage deploy to:staging
When checking the log I can see it stops at this command:
ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ssh-user#my-domain.com "sh -c \"mkdir -p /customers/489176_10999/websites/my_company/symfony/staging/releases/20160902094526\""
Executing this command by itself works fine (so the server accepts the ssh key), but from within the context of the deployment script it doesn't.
I am quite puzzled by this, since both commands are run from the same directory. Any ideas how I can make this work?
try running the deploy with sudo.
Regards!
Since the file has been located under /var/www the ssh-agent had no access to the key files, since they were stored under the user directory. Moving the entire project inside the user directory fixed this issue.
I try to setup a local website to resign ipa file. but I have an issue with codesign command.
the command works properly when I run it from the shell terminal.
But it shows this error when it run from php: "no identity found".
I run an Apache server with php.
I think the account used to run apache server haven't access to keychain library.
Any idea how to fix this issue?
I finaly found a solution,
my command was :
codesign -f --verbose -s D7F14A3C73E20026ECB384BB7F7FCAEB76EF24B3 --resource-rules Payload/my.app/ResourceRules.plist Payload/my.app
I went to Keychain Acces, and copy my certificate from Session to System.
and it works
I built a app ,and i choose the php language.I see that openshift platform use the Apache Server.
now i want to check the access.log? how can i find it?
thx!
The easiest way would just be to just run rhc tail YOUR_APP_NAME from the command line tools.
To view the logs on the remote server:
rhc ssh YOUR_APP_NAME # ssh into your app
cd $OPENSHIFT_LOG_DIR # change to the log directory
tail -f php.log