Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

bug phantomjs in Ubuntu 16.04 #15326

Closed
xaiborweb opened this issue Feb 17, 2018 · 6 comments
Closed

bug phantomjs in Ubuntu 16.04 #15326

xaiborweb opened this issue Feb 17, 2018 · 6 comments
Projects
Milestone

Comments

@xaiborweb
Copy link

xaiborweb commented Feb 17, 2018

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version. 2.1.3-dev-release
  2. What steps will reproduce the problem? install phantomjs 2.1.3 as follows
sudo apt-get install build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python libx11-dev libxext-dev ttf-mscorefonts-installer
sudo wget https://github.com/ariya/phantomjs/releases/download/2.1.3/phantomjs
sudo chmod +x ./phantomjs
/root/phantomjs --version
result : 2.1.3-dev-release
  1. Which operating system are you using? ubuntu 16.04 (64 bit)
  2. Did you use binary PhantomJS or did you compile it from source? I do not know
  3. Please provide any additional information below.
    html.js file
var page = require('webpage').create();
page.settings.userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36';
var system = require('system');

page.open(system.args[1], function (status) { 
	console.log(page.content);
phantom.exit();
});

html.php file

<?php 
set_time_limit(0);
$url = $_GET['u'];
echo $html=shell_exec("phantomjs /home/admin/web/domain.com/public_html/bot/phantomjs/html.js $url");

it executed the file in this way but it does not print anything.
http://domain.com/bot/phantomjs/html.php?u=http://www.imdb.com/
but if I install phantomjs 2.1 if I print the page but javascript is not executed here
https://hdfull.tv/pelicula/irreplaceable-you

@ghost
Copy link

ghost commented Feb 17, 2018

@xaiborweb its not perfectly clear whats your problem here.....
As of execution of script :: Its OK it did show nothing, because (based upon what you provided), output was empty. In other words - it worked (printed the output which was empty, so you were not able to see it).

@ghost ghost added the Unclear label Feb 17, 2018
@xaiborweb
Copy link
Author

@pixiuPL forgive my english I speak spanish and I support myself in the google translator.
in that script the variable $ url gets it by get method and sent it in this way
/html.php?u=https://hdfull.tv/pelicula/black-panther

in such a way that the output should not be empty, also the same script but with version 2.1.1 if it prints the source code of the page only that the javascript is not executed and prints these errors.

ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/jquery.migrate.js?v=3.0.55:521 in global code
ReferenceError: Can't find variable: $
https://hdfull.tv/pelicula/black-panther:52 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/prettyPhoto/jquery.prettyPhoto.js:73 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/jquery.featureList-1.0.0.js:70 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/easing/jquery.easing.1.3.js:39 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/jquery.tipsy.js:258 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/jquery.quicksand.js:307 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/jquery.autocomplete.js:808 in global code
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/templates/hdfull/js/foxycomplete.js:67 in global code
ReferenceError: Can't find variable: jQuery 
https://hdfull.tv/templates/hdfull/js/jquery.MetaData.js:118 in global code
ReferenceError: Can't find variable: jQuery 
https://hdfull.tv/templates/hdfull/js/jquery.bootstrap.pagination.js:212
ReferenceError: Can't find variable: jQuery
https://hdfull.tv/js/scripts.js?v=3.0.55:702 in global code
ReferenceError: Can't find variable: $
https://hdfull.tv/templates/hdfull/js/jquery.hdfull.view.min.js?v=3.0.55:1 in global code
ReferenceError: Can't find variable: $
https://hdfull.tv/templates/hdfull/js/watch.js?v=3.0.55:1 in global code
ReferenceError: Can't find variable: jQuery 
https://hdfull.tv/pelicula/black-panther:652 in global code
TypeError: undefined is not a function (evaluating '$')
https://hdfull.tv/templates/hdfull/js/bootstrap.js?r=1:23

@codermapuche
Copy link

With phantom 2.1.1 over windows 64bits works fine, sounds like a platform-specific bug

@xaiborweb
Copy link
Author

xaiborweb commented Feb 18, 2018

@pixiuPL ando @codermapuche Exactly in windows works fine but in ubuntu 16.04 it does not work so try to install other versions, which did not work either.

@xaiborweb xaiborweb changed the title Version 2.1.3 does not work on Ubuntu 16.04 bug phantomjs in Ubuntu 16.04 Feb 18, 2018
@ghost ghost added this to To Do in 2.1.4 via automation Feb 19, 2018
@ghost ghost added this to the 2.1.4 milestone Feb 19, 2018
@xaiborweb
Copy link
Author

@pixiuPL
Is there any way to solve this bug friend maybe with another version of phantomjs? and tried several isntaalr and the only one that runs me is 2.1.1

@ariya
Copy link
Owner

ariya commented Mar 4, 2018

Any plan for version > 2.1.1 is effectively abandoned. Please see #15344 for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
2.1.4
  
To Do
Development

No branches or pull requests

3 participants