uvuno / pockethold Goto Github PK
View Code? Open in Web Editor NEWInstall Flarum without SSH/composer access.
Home Page: https://discuss.flarum.org/d/5731-pockethold-a-web-based-installer
License: MIT License
Install Flarum without SSH/composer access.
Home Page: https://discuss.flarum.org/d/5731-pockethold-a-web-based-installer
License: MIT License
Pockethold does not support this at the moment.
It is possible to do it, but it requires some manual work.
I am currently experimenting with this, and will most likely write a guide for this when I am comfortable with it myself.
I do plan to have upgrade being part of Pockethold.
But it depends on the new UI being finished before I can start work on it.
Move repository from "andreherberth/pockethold" to "pockethold/pockethold".
Send clientside JS logs for the events to phlog.
I have everything copied and it is still stuck
Provide an option as to install Bazaar after main install is done.
Ajax needs an overhaul. It needs to display something to indicate it is working on something, and display errors properly when it is done.
I've seen a lot of people having issues with timeouts due to composer taking a really long time to complete. Would it makes sense to bundle https://github.com/hirak/prestissimo in an attempt to avoid timeout issues?
Hey,
I first wanted to create a Flarum web installer on my own, but then I discovered this pockethold.
This link takes you to a video of my installer. I only coded two or three hours on it and it had some major issues like not beeing able to reload the tab or continue from a second device like pockethold is able to.
I still like the vertical timeline or at least some more visual feedback from what is happening. So I forked the repo and made the following changes.
h2
and span
to button
with disabled
attribute and a spinning font-awesome gear.<title>
And that looks like this. Code here.
What I want to say with this issue is that Pockethold, even in alpha, could get some love to it's style. Not exactly what I programmed, but not "only" text.
Aaand maybe upgrade to Bootstrap 4 even if it's in beta, it looks really cool to me compared with Boostrap 3.
KevSlashNull. ^-^
$("#progress").html('<pre id=\'consoleoutput\' style=\'white-space: pre-wrap; text-align:left; height: 300px; max-height: 300px; overflow:auto; color:#fff;\'>'data'</pre>');
Am more comfortable using backtick so I change my code which work but I got error 500 on on first run with logged php error
2020-02-08 22:36:09.824665 [NOTICE] ...[STDERR] PHP Parse error: syntax error, unexpected 'return' (T_RETURN) in /home/.../public_html/pockethold/classes/pockethold.class.php on line 242
an indication of inability to create log file
Does this script depends on composer?
Hello,
I am using BlueHost to test out Flarum and after trying to run Pockethold it gets stuck on step 3 with the following message on the log:
./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)
It seems to have frozen eventhough I've given it 2048M in the php.ini.
Any suggestions would be appriciated!
Still get timeouts. All test-beds use 1 to 2 minutes downloading Flarum. However, live test at 000webhost.com(Edge Case Testing) times out randomly. It work 2 times, then fail 5, then works again.
It could be server load, or limited bandwidth, and that increasing php timeout will help.
Also get random 504 timeout return from Ajax call which is not supposed to return anything, however, the call itself initiated what it is supposed to.
Bazaar have been discontinued and pockethold should stop installing with Flarum.
Add time stamps on log entires.
hi
it is not downloading and not installing stuck at step 1
when you click step one download, there current task log is showing, then, back to step 1 download button...
Hi,
I uploaded pockethold installer to my web website folder. When i navigate my browser to https://myurl.com/community/installer.php nable to setup. When I open the error_log file that was created in the ftp directory, I encounter the error.
[20-Feb-2019 19:11:22 Europe/Istanbul] PHP Fatal error: Uncaught Error: Class 'Composer\Util\Filesystem' not found in /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Cache.php:45
Stack trace:
#0 /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Repository/ComposerRepository.php(101): Composer\Cache->__construct(Object(Composer\IO\ConsoleIO), '/home/elissaga/...', 'a-z0-9.$')
#1 /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Repository/RepositoryManager.php(131): Composer\Repository\ComposerRepository->__construct(Array, Object(Composer\IO\ConsoleIO), Object(Composer\Config), NULL, Object(Composer\Util\RemoteFilesystem))
#2 /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Repository/RepositoryFactory.php(160): Composer\Repository\RepositoryManager->createRepository('composer', Array, 'packagist.org')
#3 /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Repository/RepositoryFactory.php(104): Composer\Repository\Reposi in /home/elissaga/public_html/community/pockethold/3rdparty/composer/src/Composer/Cache.php on line 45
How can i fix this? Thanks.
Not only on Windows anymore. It seems in-fact that my recursive move folder function needs more work. For some reason it can't delete the folders inside /flarumtemp.
@andreherberth like the look of Pockethold. Tried your master branch and clicked through stages 1, 2 and 3 but the install failed.
flarumtemp and composer (inside vendor) are both empty.
Server details:
Apache Version 2.4.29
PHP Version 5.6.32
MySQL Version 10.0.31-MariaDB-cll-lve
Architecture x86_64
Operating System linux
Presumably /FlarumTest is ok and it doesn't need to install in the root directory?
I currently have a 302 temporary redirect on the root of the domain but not the directory for Flarum.
I tried a second time and stage 1 does create the temp directory with res, src, bin and vendor directories and vendor has the composer and symfony subdirectories etc. Stage 2 seems to quit very early with something like "1 of 91" flashing up on screen before moving onto stage 3.
install.log has:
Mon Nov 13 22:26:44: Status: prepare
Mon Nov 13 22:26:53: Status: Composer is Unpacked
Mon Nov 13 22:26:59: Status: composer
Mon Nov 13 22:30:02: Status: waiting1
Mon Nov 13 22:30:02: Status: /home/domain/public_html/test/temp/
Mon Nov 13 22:30:02: Status: composer.log is currently 1 long
Mon Nov 13 22:30:12: Status: cleanup1
OK think I have found the problem. composer.log shows:
Installing flarum/flarum (v0.1.0-beta.7)
- Installing flarum/flarum (v0.1.0-beta.7): Downloading (100%)
<warning>Failed to download flarum/flarum from dist: The Process class relies on proc_open, which is not available on your PHP installation.</warning>
<warning>Now trying to download from source</warning>
- Installing flarum/flarum (v0.1.0-beta.7):
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
Any way around the proc_open if the host will not enable it?
For Pockethold to be a viable option in the future, and it's added workload, I am moving away from my original goal, which was to provide a singlefile way of installing Flarum via Web-browser.
Beta 8 version of Pockethold will come bundles with composer 1.7.1 (Latest working with pockethold).
It will also, if not at first release, have the option to use "cron". These options should in theory increase the chance of Pockethold being able to setup flarum on shared hosts.
Clean up code, remove unused ajax calls, separate logs for composer events.
The download just sits at 1 of 87 and never moves. Is there something I am doing wrong?
https://github.com/Pockethold/pockethold/blob/8d82b833b9eff68651c48eae718d518f5a717a0c/pockethold/classes/pockethold.class.php#L26
This line causes ```
Parse error: syntax error, unexpected '$this' (T_VARIABLE), expecting ')' in D:\htdocs\Manhunt\Forum\pockethold\classes\pockethold.class.php on line 26
Everything works, except the composer install. Need to validate where error occurs, as current codebase does not stop. use a try/catch maybe.
If someone have a hostinger paid plan, it would be nice to see if it works or not there.
After uploading installer.php + pockethold folder to server, I was stuck on step 1, and received a 500 error.
Output from apache error log
[Tue Mar 05 11:32:39.109649 2019] [php7:warn] [pid 19699] [client 192.168.0.3:51517] PHP Warning: file_put_contents(/var/www/html/flarum/pockethold/log/ajax.log): failed to open stream: No such file or directory in /var/www/html/flarum/pockethold/classes/pockethold.class.php on line 41, referer: http://192.168.0.19/flarum/installer.php
This was resolved with manually creating the ajax.log in pockethold/log/ajax.log
OS: Debian 8
EDIT: Changed title to better reflect issue
I am rewriting pockethold. Mainly, what I want is to make it more robust.
First of, it will use a .lock file and "composer install". This let's composer consentrate on just downloading the specific packages. It should make composer timeout less likely. It will also be easier to re-run if composer times out.
Second, the installer will check requirements before proceeding.
Third, UI will be updated with better information. Instead of progress tracking, I have decided I want to show the composer.log instead, updating it every 6 seconds or so.
Before cleanup (Both on success and failure), the option to download the logs will be present.
My main issue would be the UI. My JS skills is somewhat limited (Not that my PHP skills are that much better, but still).
I will update this ticket during the planing phase.
Current Tasks:
Installing flarum/flarum (v0.1.0-beta.11)
As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Installing 'unzip' may remediate them.
Eventually, it would be awesome if this installer could handle upgrading Flarum to the latest build.
Requirements:
If not, I would recommend an upgrade.php option that handles upgrades.
That is, until, Flagrow introduces that magical "upgrade" option down the line <3 @luceos
It might be very possible to speed up, depending on servers bandwidth, composers vendor download.
The composer plugin "prestissimo" enables parallel downloads of vendors which should speed things up noticeably.
I'm trying this on InfinityFree host. I just wanted to make sure it works with that host before I actually connect my domain and all.
So, this is the URL: http://forum2500.epizy.com/installer.php
It asked me to download the files of Flarum and then, it just shows 'Current Task Log' with no progress (except, it keeps blinking). Is it working, is it not? Can someone tell?
Edit: I have now found that my PHP memory limit is just 158MB and it can't increase.
Let's give Pockethold the ability to zip down all logs/temps that the user can download. (And if they want, give it to me).
Need a full cleanup phase for beta. Remove code, ponder on errors, and read up more on theory. A part of me thinks that when this is finally done in a beautiful way, it will be built into flarum.
Hey
My web-hosting provider doesn't allow SSH access due to their security. is it possible to install flaurm addons. I've used pockethold to install flarum.
Trying to solve 000webhost problems, I will experiment getting the output from composer using this: http://api.symfony.com/3.1/Symfony/Component/Console/Output/StreamOutput.html
or similar.
Hello there!
Today, I've tried to install Flarum with Pockethold.
I've created a folder called "flarum" and then I've unzipped Pockethold in the folder.
Then I launched the installer.php
But I'm stuck on "Getting Status" and I can't start the installation
What should I do?
Thanks in advance :)
I am considering doing composer create-project flarum/flarum --no-install, and then manually require each package manually after the fact. This would allow the script to be used on a load more systems, due to the decreased memory requirements.
Doing this, I could perhaps move away from create-project all together, and download flarum/flarum manually, and just use the require command?
Food for for brain.
v0.1.0-beta.2
With this version, I have tested locally as well as on shared hosting and Bazaar does not install after the button is clicked. It is missing from the extensions page after the final installation phase.
If the composer create-project times out. Allow a compressed archive to be downloaded.
Github Integration Test Discord
Next Up - Move all functions into methods in a pockethold class.
Good on my way already. Will shorten code down a bit. And I need to begin thinking object like! And, easier for testing as well.
Add tracking for folders created under ./flarum/vendors/ to see how many are created to allow a rough progress bar on the front end. (Extend the $ajax=status?)
I am fairly sure this will be straight forward, and that my main problem will be honing my JS and front-end skills.
Coming soon.
All I seem to be getting is:
Something went wrong: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
Some help please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.