Can't start SA-MP Server by PHP -
bruunosoniico - 06.12.2011
Hi everyone,
Today i tried to start my SA-MP Server as version 0.3d in Linux by PHP but i couldnt. In 0.3c i was using:
popen("cd /home/sampsvr && ./samp03svr &", "r");
Now i used the same script but nothing happens...
Can someone help me please?
PD: It works perfectly by SSH, but not with exec, system, popen, etc.
Re: Can't start SA-MP Server by PHP -
JiHost - 06.12.2011
Install ssh2.so module for PHP, and then start it by using ssh2_exec().
****** on how to install it.
Re: Can't start SA-MP Server by PHP - array13 - 06.12.2011
If you are running centOS , please do the next commands(skip that you have already done)
wget -q -O -
http://www.atomicorp.com/installers/atomic | sh
yum upgrade
yum install vsftpd php php-devel openssl-devel php-pear
mkdir libssh2
cd libssh2
yum install gcc
wget
http://www.libssh2.org/download/libssh2-1.3.0.tar.gz
tar xvzf libssh2-1.3.0.tar.gz
cd libssh2-1.3.0
./configure
make install
pecl install ssh2 (will give you a error, after that write pecl install ssh2 [channel://.....])
after that vi /etc/php.ini
add on the file(somewhere)
extension=ssh2.so
after that save the file
and restart your webserver
service httpd restart
^^apache web server
and try your commands again.
Respuesta: Can't start SA-MP Server by PHP -
bruunosoniico - 06.12.2011
I already fixed a few errors on ./configure, but i cant with this one:
configure: error: cannot find OpenSSL or Libgcrypt, try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
Yes, i have OpenSSL and Libgcrypt installed, and i tried too with ./configure --with-libssl-prefix=/usr/bin/openssl
EDIT: Fixed by installing openssl-devel
Re: Can't start SA-MP Server by PHP - array13 - 06.12.2011
well after installed try again to start your server.
Respuesta: Can't start SA-MP Server by PHP -
bruunosoniico - 06.12.2011
No, it doesnt starts...
Re: Can't start SA-MP Server by PHP - array13 - 06.12.2011
Add me on msn:
papapanikes@hotmail.com
I will help you via msn ok?
Respuesta: Can't start SA-MP Server by PHP -
bruunosoniico - 07.12.2011
Well, tried with ssh2 like this:
$connection = ssh2_connect("localhost", 22);
ssh2_auth_password($connection, "root", "123456");
ssh2_exec($connection, "cd /home/samp03 && ./samp03svr");
It doesn't start... If i put exactly that command "cd /home/samp03 && ./samp03svr" on Putty it works fine.
Help please, im using CentOS 5.7.
Respuesta: Can't start SA-MP Server by PHP -
bruunosoniico - 08.12.2011
Solved, installed Debian ^^.