Architecture / Installation

# Architecture / Installation

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:
Updating dependencies (including require-dev)
Nothing to install or update
''
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

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

Dear all,
I step in here as I also have the problem of "Composer not found".

fatiki wrote:

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.

That was my first attempt - and exactly that way I get the message "Composer not found".
In fact I also have a clean install of Tiki 20.x on an Ubuntu LAMP server with i-MSCP admin software only. Almost everything else seems to work fine (minor issues with other stuff seem not be related to this).

I also found the page https://composer.tiki.org/, but to me it seems the composer needs to be already installed before I can add anything to composer.json - right?
As i-MSCP is a software to run several independent Domains the installation via shell for the whole server feels to be the wrong way to me.

Any suggestions?

Best regards
Uli

Uli wrote:
Any suggestions?

Grmpf. No suggestions after a month. :-/

I finally went the easy way and installed composer via apt (thanks god I have a dedicated server). But no success.
Then I found a hint somewhere in the Admin Settings to install composer via shell by using "./setup.sh composer". This didn't work as well - but for a simple reason: setup.sh was not set to be executable. I did that and the script was running... telling me "by the way" it should not be executed as root. What the #*!\$&~§!
1. Great idea to provide this info AFTER the setup.sh is started without possibility to exit.
2. Only root has shell access on my server. How else should I execute it?
As expected now: No success, same result as before.

I uninstalled composer via apt again and rerun the script (of cause as root, as there is no other shell user), but no change. I still get "composer not found". Well - now in the Diagnose together with the message:

Composer errors

Composer returned some errors:

The Process class relies on proc_open, which is not available on your PHP installation.

trying apt install proc_open returns a message that such package can't be found.

What am I doing wrong?

If you have a dedicated server (as you say) you should be able to manage it by editing your php.ini file to enable proc_open. Look for disable_functions = line (or enable_functions?)

Anyway, correct way of launching setup.sh is sh ./setup.sh. If you have a dedicated server you can create new users (other than root), give them proper rights and run under that user I guess to avoid the warnings?

Btw, Ctrl+C is way to abort any script right away.

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": "",
"homepage": "YOURURL",
"minimum-stability": "stable",
"require": {
"psr/log": "^1.0",
"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",
"npm-asset/pdfjs-dist": "~2.0.487",
"media-alchemyst/media-alchemyst": "^0.5.1",
"mathjax/mathjax": "^2.7",
"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.

Wiebe wrote:

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": "",
"homepage": "YOURURL",
"minimum-stability": "stable",
"require": {
"psr/log": "^1.0",
"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",
"npm-asset/pdfjs-dist": "~2.0.487",
"media-alchemyst/media-alchemyst": "^0.5.1",
"mathjax/mathjax": "^2.7",
"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.

Hi, I am trying to follow your instructions, but I believe I might be doing something wrong.
In what folder should I put the composer installation folder on my server?
I just put it in the same folder where you can find other folders like vendor, templates,themes, etc. I updated as you had instructed but on my tiki-site I am still getting the error message that composer cannot be found.
Any help would be greatly appreciated.

I gave up trying to run Tiki under Windows as I found other problems, so I switched over to Linux.
Even with a clean installation, I had the same problem with getting Composer installed and working, but I did find that using the web interface to Composer did the job OK.

### Upcoming Events

No records to display

### 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.