I want to be able to use Steemconnect on a web-app I built using PHP/MYSQL/APACHE.
This question (well, the answers) says to do this you should be running Node.js on a subdomain.
Node.js Server running from a sub folder
My question is, will this work for steemconnect? I can potentially point the callback to the main URL of the app. Would this work?
Or is there a better option to make this work in a PHP app (App uses jQuery and MySQL)?
Note: Steemconnect v2 has been merged (there is only one steemconnect now, not 2 versions) so that is what I am using.
For reference, the app needs to be able to have users sign in to their Steemit account and post comments to their account (blog), that is all.
Thanks!!
The answer is to simply be able to run packages installed by NPM in your application. There is no real difference to being able to do this and running then in node.js.
I tried requireJS, which gave me errors, then browserify, which worked perfectly.
I hope this helps someone out there!!
Related
What I'm looking for is an easy way to get either individual core usage or total CPU usage for the system that the PHP Script is running on.
However I'm unable to do so. I've looked all over for all manner of solutions from using perf (with and without passthru) to using winmgmts through COM.
The issue is, some of these will work on Windows if you use Apache, but with IIS the security restrictions stop PHP from being able to use for example winmgmts through COM so I just get back a null object.
How can I solve this? - I've honestly tried every solution I can find on the internet and while there is lots of information about how to raise the permissions all the guides point to IIS 7 or earlier and are no longer applicable to IIS 8.5 with literally the suggested option changes being non-existent.
If anyone could help me with this I'd be really appreciative, a workaround like using a third party application that could provide this data would also be acceptable if I can query the data through PHP either from a file or network etc Even a asp.net script that I could query? (I don't know anything about asp.net but I could use it for this single thing if it'd work?)
Thank you.
I managed to solve this and I hope it helps someone else.
What you must do is convert the folder where your PHP (or asp) will execute to an Application. So the structure will look like this:
Website Name
-> Application Name
Then you want to select the parent folder, the Website Name folder and go to "Basic Settings" in the far right actions pane and select "Connect As..." and connect as an Administrator account.
Once you've done this the application will inherent the credentials you specified on the parent website folder and you'll now have full access to perf, wmi and so on.
If you only give the credentials directly to the application it doesn't work and it also doesn't work if you don't convert your folder where your scripts will execute to an application. This is where I was being tripped up and the documentation online is very sparse.
I'd like to thank the good people at the phpsysinfo github for their IIS documentation which pointed me on the right track on needing to convert a site to an application which was part of the puzzle I was missing.
I am new here. I haven't found any solution to my problem.
WHY i need that? I am building a Joomla based system for fast custom Android app creation working on php hostings having no java installed available for people to develop and install apps easily on their devices. Thus i am interested only PHP or universal-like solutions implementable in PHP too. Only CHANGING FILES UNPACKED AND NOT DECOMPILED IS AN OPTION. No apktool no whatever else like that. I am working with DEBUG packages with self generated keys. or something like that, because i am a beginning phone gap developer.
For example i would like my own icons for an app, or change the title of it in AndroidManifest.xml. And update sha1 digest hashes for cert.sf and manifest.sf for the changed files. I need human understandable procedure step by step.
PHP gives sha1 and base64 encoding and many more like that.
I was trying to get the same codes like cert.sf and manifest.sf (no file was changed before) but i wasn't able to do so. I tried silly ways to sha1 files and base64 them and no outcome was as in the files mentioned.
Please there is no answer like that i need.
Let me say the anwswer to the question will help people or at least will help to build application development systems.
P.S.
For Adobe Air apps i will be trying to do the same what for .apk apps. I hope it won't create the same issues. But not about it is the main question.
UPDATE:
I feel from a couple topics of this kind that any practical help on this matter is unavailable and sometimes even perceived negatively. Thus what i am going to do is to use an additional server for making apps (simply command: cordova build) and send an app produced to a server which requested for it. This only because for some unknown reasons i cannot sign any files with php (debug packages). But why? It seems that the effect would be just the same as with installing running stuff with additional server using java, would it not?
Update:
I don't think there will be any answer. So i do .air and .apk apps using home computer hosting java what is not the best idea - two servers one not professional. There is http://build.phonegap.com/ and it can be interesting for building apps manually or via api. For free one app can be private and more open source. IOS and Windows are supported too there.
If you change a file, you must resign the APK with an existing certificate.
APK files are signed with the java jarsigner tool, so you can't do it only manually just by editing some files, you need the private key of the certificate.
Maybe you should try to add a Java application next to your Joomla server and use jarsigner for signing the generated APKs.
I have a running production server on a 64 bit windows os machine, using Wamp 2.2e (which uses Apache 2.4) with mod_wsgi 3.4 (an unofficial compile from pythonlibs) with python 2.7 64bit as well and Django 1.5. This is for a small closed company network so sadly I can't give out any actual links.
My wsgi alias looks like so:
WSGIScriptAlias /Taurus /www/mysite/mysite/wsgi.py
I have another site, built by a former employee which uses PHP. It's on an older server (I have access) and would like to move it over to mine. However, I'm afraid the urls between the php site and the django app would clash, because the php site is in a folder called Taurus (our Team's name).
In other words, I would like that when going here:
http://breezeblocks/Taurus/
The site will go to the php directory with the same name (and run index.php that is inside of it), but when going here:
http://breezeblocks/Taurus/Scheduler
It would go to the django app.
The '/' url is not in use inside urls.py so there's no actual duplication, but I'm guessing wamp can't figure that out and would just pick one of them.
Does anyone have a good idea how to set it up so it would both unclash and make sense? Should I maybe try to convert his entire site to django and have it as another app? Another idea I had was maybe give the wsgi alias a more direct name like:
WSGIScriptAlias /Taurus/scheduler /www/mysite/mysite/wsgi.py
But there's still a good possibility of a clash there. The site is running and in use so I'm afraid to go ahead with it without more information.
Thanks in advance for any help and input. Hope I made the question clear
Have you tried what is outlined in:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive
The part at the end of that section explains how to use mod_rewrite so that if the PHP site is able to handle the URL it will, and if not, then the URL would be passed to Django to handle. This way they can coexist.
I want to create website thumbnails (screenshots) using php. I have a dedicated server running centos 5.5 so I can install software on it.
I need a free solution to create thumbnails of websites on a production server without running X server. (If I was to run X server how much difference would it make to the performance).
I would also appreciate if you could provide me with any free web services which could help me get the website thumnails and download them to my server.
To take a virtual screenshot of a website, use khtml2png. It uses libkhtml, the rendering engine used by the konquerer brower, and imagemagick.
Try this, I used it when I was building a site that required thumbnails of other websites:
http://www.thumboo.com/
Note that you will need to sign up for the API.
Hope this helps and that I understood your question
I've decided to code some applications in PHP that are supposed to run offline in the user's machine. However, I can't seem to find an user-friendly install wizard to create a local server in where the script will run. Any ideas?
PS: Here's an example of what I want: http://www.nolapro.com
You could go to the old school route and try using PHP-GTK.
Text Tutorial here: http://www.kksou.com/php-gtk2/References/Compiling-standalone-PHP-GTK2-applications-on-windows-using-PriadoBlender.php
or you could go the route that I believe has much more promise: Adobe AIR + PHP
It has the added bonus of running on any platform!
Video tutorials here: http://www.vtc.com/products/Adobe-AIR-PHP-Development-Tutorials.htm
There's also a new player in the game, Appcelerator. It lets you write your code in whatever language you want (PHP, Ruby, Python, etc) and compile it for the platform of choice (iPhone, Android, Windows, OSX). Parts of it are still beta, but it looks unbelievably slick & cool, and there are lots of tutorial videos. http://www.appcelerator.com
I hate to advocate this, because it just feels so wrong. You would probably be better off using a language inteded for use for stand-alone applications, if you're going to be doing this often or in a production setting.
With that said, a colleague of mine used to use the Bambalam PHP to EXE Compiler for this. He actually had a profitable product built around it.
Bambalam will generate an EXE that doesn't rely on any external DLLs, based on your PHP code.
http://www.bambalam.se/bamcompile/
If you have a webapp written, you maybe want to deploy on client, a possible way is use wapache, which is a standalone apache bundled with your application, and an integrated (IE) browser control inside.
http://wapache.sourceforge.net/
A new feature of PHP 5.4 & 6 can help you, the builtin web-server.
http://php.net/manual/en/features.commandline.webserver.php
With this feature you can host locally your php app without external webserver, and access on localhost.
If you really talking about a client application you are really wrong to do this.
If you want to wrap a server + browser to deploy your web based application so it runs local you might check out three options:
1) Deploy a simple webkit browser (you can get a QT Webkit Browser in 30 lines of code) and an apache server that is installed somewhere standalone (not via the apache control script as this uses port 80 and i probably conflicts with another installed webserver.
2) Look at the Firefox PRISMA solution. I have read about this only in a news article but it wrapps the firefox around one single start URL. You have to deploy a webserver in the same way as
3) Try to wrap it as a HTA application. Search the corresponding info on MSDN.
I would prefer (1) as you can add special application interacting code as needed.