This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Problem getting Phantomjs and Casperjs to run on a sentora panel
#1
Problem getting Phantomjs and Casperjs to run on a sentora panel
Hi I'm at a bit of a loss here i must admit and cant work out what the hell I'm doing wrong

I'm trying to get phantomjs and casperjs to run via a php exec command on a domain run via sentora panel.

I installed sentora panel first

Then I installed Phantomjs via


Code:
# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
# tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
# cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin

I then Installed CasperJs via


Code:
# cd /opt
# wget https://github.com/casperjs/casperjs/zipball/master
# unzip master
# ln -s casperjs-casperjs-7505339/ casperjs
# ln -s /opt/casperjs/bin/casperjs /usr/local/bin/


So both casperjs and phantomjs are in local bin file and my version of python is 2.6.6

I then run this php script with chmod 777


PHP Code:
<?php
    
## This Function Below Sets PhantomJs So CasperJS Can Use It
 
   putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
 
   echo "Running PhantomJS version: ";
 
   echo exec('/usr/local/bin/phantomjs --version 2>&1');
 
   echo "<br />";
 
   echo "Running CasperJS version: ";
 
   echo exec('/usr/local/bin/casperjs --version 2>&1');

?>

and should get
Quote:
Code:
Running PhantomJS version: 2.1.1
Running CasperJS version: 1.1.1


but just get

Quote:Running PhantomJS version:


Is there anything at all in sentora which would stop this from running?

I've spent 4 days trying to solve it and its driving me cuckoo!
Reply
Thanks given by:
#2
RE: Problem getting Phantomjs and Casperjs to run on a sentora panel
You can't! As sentora will sandbox php using openbase_dir to user directory. Otherwise it's not secure.

If it's a dev box that you are only accessing it. Then you can disable openbase_dir.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: Problem getting Phantomjs and Casperjs to run on a sentora panel
Hi Me.B

There is no direct user input

I've gone into Module admin > Apache config

And turned "Use Open Base Dir" to false

I've also gone into override a virtual host setting and unticked open base dir for my domain aswell

It's still not playing ball however and im still getting Running PhantomJS version:

is there anywhere else i should disable open base dir?
Reply
Thanks given by:
#4
RE: Problem getting Phantomjs and Casperjs to run on a sentora panel
No you disabled everywhere. So if any user/Script on the system can access all the server.

In case you get a hack or allow other users to set websites they will own the server in few lines.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 3 ,979 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,594 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 3 ,348 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)