Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
PHP
(view source)
Revision as of 14:50, 17 July 2024
1,038 bytes added
,
17 July
→Installation of Composer
Line 474:
Line 474:
This is made tricky as we do not have the PHP CLI configured.
This is made tricky as we do not have the PHP CLI configured.
−
But we can install it as follows with command line arguments. This is using
php74
.
+
But we can install it as follows with command line arguments. This is using
php7. Check the latest hash file as this changes
.
Download:
Download:
Line 484:
Line 484:
Install:
Install:
php74 -d allow_url_fopen=on ./composer-setup.php
php74 -d allow_url_fopen=on ./composer-setup.php
+
+
=== Bash script===
+
+
Add the code:
+
+
nano composer.install
+
+
Paste this:
+
+
if [ ! -d '/tmp/compose' ]; then
+
/usr/bin/mkdir -p /tmp/compose
+
cd /tmp/compose
+
else
+
cd /tmp/compose
+
fi
+
+
# Get the setup file
+
/usr/bin/php74 -d allow_url_fopen=on -r "copy('https://getcomposer.org/installer', '/tmp/compose/composer-setup.php');"
+
+
# Hash check
+
/usr/bin/php74 -r "if (hash_file('sha384', '/tmp/compose/composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('/tmp/compose/composer-setup.php'); } echo PHP_EOL;"
+
+
# Install
+
/usr/bin/php74 -d allow_url_fopen=on /tmp/compose/composer-setup.php
+
mv /tmp/compose/composer.phar /usr/local/bin/composer
+
+
# Tidy
+
rm -rf /tmp/compose
+
+
Save and exit.
+
+
Run it:
+
+
chmod 0700 composer.install
+
./composer.install
+
+
Check ths file is there:
+
+
ll /usr/local/bin/composer
+
+
Use with
+
+
php74 composer <blah>
=== Bugs ===
=== Bugs ===
ReetP
Bureaucrats
,
Administrators (Semantic MediaWiki)
,
Curators (Semantic MediaWiki)
,
Administrators
882
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search