Loading...

Architecture / Installation

# Architecture / Installation

## Composer not found problem

Hi,
I'm running under Windows Server 2008 and IIS.
I've installed Tiki OK, but found Composer hadn't installed.
So I found this page https://dev.tiki.org/Composer and the Note for Windows Users at the bottom of section 1.3.2 and went for option 2, the global install.
I downloaded composer, it starts up OK from the command prompt in the Tiki folder, and is in the path.

I then went to the Tiki folder and ran composer install
This gave the following screen messages:
''Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
''
No obvious error messages, so I assume all is OK.

But then I run tiki-check.php and under Tiki Packages it says Composer not found

Also, under the Admin menu I go to the Packages page. Again it says Composer not found.
If I click on Diagnose Composer it just comes back with Composer not found.
If I click on Install Composer it says Error - There was a problem installing composer

Many thanks for any suggestions,
Tim

Hi Tim

I have a Tiki 20.x clean installation on LAMP and I installed Composer via Tiki's web interface.

Going via the "Packages" feature in Control Panel, under the Diagnose tab there is an "install Composer" button.
Installing it through this route and then installing packages works for me, I see those packages installed when I run tiki-check.php.

Not sure whether Windows Server/IIS environment should make a difference.

What Tiki version are you running?

Hi,
Thanks for looking at this.

Tiki 19.0

I tried that in my original post, but revisited it and got a bit further.
The Install Composer button downloads a file which it renames composer-setup.php, so I manually downloaded that and ran it from the Tiki directory.

That gave this output:
Notice: Undefined variable: argv in C:\inetpub\wwwroot\TikiWiki\tiki-19.0\composer-setup.php on line 14
All settings correct for using Composer Unable to create Composer home directory "C:/Windows/system32/config/systemprofile/AppData/Roaming/Composer": mkdir(): File exists

I'm not a great PHP programmer, but the Notice seems to be triggered because a command line argument wasn't supplied, and I'm not sure that one is needed.
Then it passes through all of the checks OK
But then the error at mkdir is strange because, contrary to what it says, there isn't a Composer folder in the Roaming directory.

Tim

Tim Thornton wrote:
But then the error at mkdir is strange because, contrary to what it says, there isn't a Composer folder in the Roaming directory.

Unless Windows 2008 is getting tripped up by the syntax

C:/Windows/system32/config/systemprofile/AppData/Roaming/Composer"

which has the forward-slash in Unix style (/) as opposed to Windows traditional back-slash (\).

With more modern Windows OS versions such as Windows 7 this shouldn't be a problem anymore but can't remember if it was already implemented in Win 2008 server.

No, that's not it

I'm running Tiki on Windows Server 2016 and I use Composer through command line.
I wasn't able to get it working through the webinterface, but with these steps it's a working solution for Tiki 20.x:

- Install composer on your server https://getcomposer.org/Composer-Setup.exe
- Create a composer.json file in the web root with the content:

{
"name": "YOURWEBSITE",
"description": "",
"license": "LGPL-2.1",
"homepage": "YOURURL",
"minimum-stability": "stable",
"require": {
"psr/log": "^1.0",
"google/apiclient": "^2.2.2",
"enygma/expose": "^3.0",
"thiagoalessio/tesseract_ocr": "^2.7.0",
"mpdf/mpdf": "^7.1",
"xorti/mxgraph-editor": "^3.9.12.2",
"npm-asset/pdfjs-dist-viewer-min": "~2.1.266",
"bower-asset/wodo.texteditor": "^0.5.9",
"j0k3r/php-readability": "^1.1.10",
"npm-asset/pdfjs-dist": "~2.0.487",
"media-alchemyst/media-alchemyst": "^0.5.1",
"mathjax/mathjax": "^2.7",
"npm-asset/lozad": "^1.6.0",
"fullcalendar/fullcalendar-scheduler": "^1.9",
"jerome-breton/casperjs-installer": "dev-master"
},
"config": {
"process-timeout": 5000,
"bin-dir": "bin",
"component-dir": "vendor/components"
},
"repositories": [
{
"type": "composer",
"url": "https://composer.tiki.org"
}
]
}

- Open CMD in Windows and type:
cd D:\WEBPATH\
d:
composer update

Repeat last step when you want to update the packages to the last version.

### Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.