PhantomJS with Wordpress - php

I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs and already tested it via command prompt and got the result (pdf) I want. Now I'd like to use it on my WP project but not sure how to get it started. I've tried to copy phantomjs folder to my wp-content/plugins folder and run exec command but no results at all.
I know there're lots of examples out there on how to run phantomjs but I couldn't find anything for wp.

Related

Trying run working Laravel project on my PC via XAMPP

I have a whole project with database, everything is working here.
Project with database
I would like to run website so I can see changes I have made.
Im using XAMPP. My configs for VirtualHost hosts and http-vghosts.conf
I have tried this https://youtu.be/iXYCnYRalaw?t=2m13s ->> from [2:13] to [4:22]
using XAMPP, but still cant run it.
Can you give me any advice or steps how to make website run on my PC? [ofcourse just for me (VirtualHost)].
Editor using: Atom
My PC spec
If running laravel appliation inside XAMPP htdocs folder is really necessary, then could you provide some kind of error, simply telling "it doesn't work" doesn't help at all.
One thing you can try is to open command prompt inside laravel folder and run
php artisan serve
This will open local server that runs current project in:
http://127.0.0.1:8000
Also, checking laravel minimum requirements is something you should check out. 5.5 requires PHP 7 and you didnt tell what XAMPP version you are running.

desktop application with NW.js and php

I need to create a stand alone local window app using web front-end code and PHP.
Noticing that good old TideSDK is completely dead I tried searching around and the only viable option seems to be NW.js and his extension "baconface php-webkit" (https://github.com/baconface/php-webkit). Fact is, I cant even manage to start!
1- I download NW.js for windows and extract the files in a new desktop folder
2- I open a node.js console and execute these commands (https://www.npmjs.com/package/express)
3- I paste php-webkit files into the folder overwriting package.json
4- try to exec NW.exe and just get the message that Express is not present
any help?
Reverse your step 2, and 3. Copy the files into that folder then from there just run a npm install to get all needed dependencies.
I followed your steps except reversing, and it worked for me! Hope this helps.

PHP OSX XAMPP - exec mount command

Good Afternoon,
I am currently working on a PHP project which requires a php script to mount a windows shared drive. Currently building using OSX with XAMPP.
exec('mount -t smbfs //user:pass#192.168.1.1/Share /Volumes/Share 2> temp/error.txt');
Now i understand why this does not work. Its due to permissions. Apache is running as user daemon. Now i could change the user that Apache runs to fix this "challenge" but want to avoid any changes to the server if possible.
I would like to reach out and see if there is a better way to go about this.
Any ideas?
Ok, So i got it working.
I just needed the web server (user daemon) to own a folder in which the share is mounted.
EG. created a folder called "tempshare" that user daemon owns and is in the same folder as the php script (don't worry, it will be placed out of the web root when complete)
exec('mount -t smbfs //user:pass#192.168.1.1/Share /path/to/tempshare 2> temp/error.txt');
Seemed to work. Any advice on security using this method?

Can you run PHPUnit if you just download it from Github and link to it in your script

Ive got some custom Selenium scripts working in a similar way that you might use cURL (theirs a ton of js encryption being done on the POST data on the 3rd party site so it actually more complex to reverse engineer them and use cURL), for these Selenium scripts to work they require PHPUnit, ive gone around trying to install it via the Command line / Pear, but for the life of me cant get it to work.
I noticed you can download all the files as a .zip from the Github page would i run into trouble if i just downloaded them placed them in the same folder as my selenium scripts and linked them up correctly via require() ?

Netbeans PHP - how to run all the files in a directory

I am running PHP files in my NetBeans with a shell script command. So far so good. I can run individual files without any problem. Sometimes, however, I would like to run all the files in a directory (and it's subdirectories). I tried selecting the directory and hitting the shortcut for "Run" but nothing happens. If I select multiple files and hit "Run" only the last one selected will be run.
I am using the latest NetBeans 7.0.1 on MacOS 10.6. Thanks.
Never heard of such a feature. What I'd do with NetBeans is create a php application and in the main file write some code calling each php file... it will look ugly but I think it's the only way

Categories