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
Related
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.
I have meshlab installed in my machine running Ubuntu 14.04 OS. I can access it from command line using meshlabserver command. But problem arises whenever I try to call it from a php script using the command
<?php
system('meshlabserver 2>&1');
?>
It shows the error meshlabserver: cannot connect to X server. After going through a few websites I did the following things:
I moved the meshlabserver executable from /usr/bin to /usr/local/bin and gave it executable permissions using
sudo chmod a+x meshlabserver
But when I ran the whoami command from my php script (calling the meshlabserver), it showed www-data. So I gave executable permissions for all users to the meshlabserver using
sudo chmod 777 /usr/local/bin/meshlabserver
But still it is showing the same meshlabserver: cannot connect to X server error. meshlabserver comamnd is working fine when ran from the command line.
I really need to call meshlab from the php script for my website. Thus any help would be highly appreciated. Thanks in advance.
It seems the php script can't access your display variable. If you logged in via ssh remember to tunnel your X-server via 'ssh -X ...' Your second option is to create a virtual frame buffer using Xvfb and redirect the display variable to it:
export DISPLAY=:100.0
Xvfb :100 &
Note the ampersand for the second command as Xvfb needs to be running in the background.
a combo of prior answers works for me:
ssh -X, as well as export DISPLAY=:0.0 (on remote)
I've installed git-ftp onto my CentOS Server so that I can do deployments from an activeCollab installation running the ac_gitolite module.
Everything installed fine and the app lives at
/usr/local/bin/git-ftp
When I log into the server via ssh I can run git-ftp commands without the full path, but when attempting to use PHP to run commands with exec ie:
exec ("git-ftp --version 2>&1", $output);
I receive the following error:
sh: git-ftp: command not found
Is there an environment path I need to specify somewhere specifically for PHP, or what am I doing wrong?
The two options discussed in "command not found - error in exec() command" are:
One easy solution would be to put the full path of the git-ftp executable.
The other is to add git-ftp to the php server user's PATH.
I have trouble running wget through php exec or system functions. The configuration is with MAMP.
I successfully run basic commands like ('whoami', 'pwd', etc.).
I even changed the apache user to the root user and still nothing. In the error log it output "wget: command not found".
I can run with the terminal and it works fine. The wget is installed through Macports.
What should I do?
Regards!
From a terminal, run which wget, and use the full path in the call to exec/system.
I have been struggling to get my CakePHP site working on a Godaddy "grid hosting" account. My cake app is setup is hosted from a subdirectory on the account, and can be accessed via a subdomain. I had to adjust my .htaccess files to get this working, and now I need to get the CakePHP console working in this environment.
I have the same cake application setup on an Ubuntu server which is hosted on Amazon's EC2 service. Basically a plain out of the box Ubuntu LAMP setup. The CakePHP console works as expected in this environment.
When I try to run the console on Godaddy I get the following message:
CakePHP Console: This file has been loaded incorrectly and cannot
continue.Please make sure that /cake/console is in your system
path,and check the manual for the correct usage of this
command.(http://manual.cakephp.org/)
I've started to add in some debugging code in cake/console/cake.php to find out what's going on. On the godaddy site, when I echo out print_r($this->args) at line 183 I find the array is empty. When I do this on my Ubuntu EC2 instance I get this:
Array
(
[0] => /var/www/www.directory.sdcweb.org/htdocs/cake/console/cake.php
)
It looks like godaddy's command-line PHP isn't passing through the bash shell command line arguments. Does anybody have some advice as to how I might get the CakePHP console working on Godaddy?
The bash script which invokes the Cake shell contains the following
LIB=${0/%cake/}
APP=`pwd`
exec php -q ${LIB}cake.php -working "${APP}" "$#"
exit;
I am thinking that modifying this script may solve the problem.
in the cake shell script (cake/console/cake) change
exec php -q ${LIB}cake.php -working "${APP}" "$#"
to
exec php -q -d register_argc_argv=1 ${LIB}cake.php -working "${APP}" "$#"
after this I found out that calling php like this happened to run the PHP 4 CLI. to fix this here is the final bash script that I am using to invoke PHP 5 on my shared Godaddy hosting
exec /web/cgi-bin/php5 -q -d register_argc_argv=1 ${LIB}cake.php -working "${APP}" "$#"
if you setup a php-based cron job through their hosting control panel, you will find the php command invoked is actually to this php5 executable.
"Please make sure that /cake/console is in your system path."
This is grid hosting so I'm assuming you have a .bashrc file which you can edit. First you need to know the absolute path to your cake sub-directory then use vim or nano to edit your .bashrc
PATH=$PATH:/absolute/path/to/cake/console
Then you can log out and log back in and you should be able to type cake bake from anywhere and it should fix the error your getting (run it from your app directory so it can find your database.php).
Failing a .bashrc file you can export the variable temporarily but you will have to type it every time you log in.
I don't think editing anything in the lib/cake is okay, since it will be gone with your first cake update.
Rather, I changed the register_argc_argv setting from the php.ini by adding the line:
register_argc_argv=On
All seems to work now with me.