Strange error with composer

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange error with composer

Peter Brooks
My CPANEL interface doesn't allow .phar files, so I've had to unpack
composer.phar and run it directly. It was working, but I've now got this
strange behaviour:

Error message:

"
PHP:  syntax error, unexpected '(' in
/home/kchcl200/public_html/wiki/extensions/Composer/bin/composer on line 3
Could not open input file: require
"
Command (in cron):

cd www/wiki;php-cli -c extensions/Composer/bin/composer require
mediawiki/semantic-media-wiki "~1.9.2"

The file structure is:

public_html/wiki/extensions/Composer
  bin
   composer
   composer.json
  res
   composer-schema.json
   spdx-identifier.json
  src
   Composer
     bootstrap.php
     Composer
       Autoload
       Command
       Config
       Console
         Application.php
         HtmlOutputFormatter.php
       ...

I suspect it's something to do with the:

use Composer\Console\Application;

That's the third line of composer.php - but I don't know php, so I'm not
familiar with what the back-slashes are supposed to be.

I also think that, in this case, trying to fix the code is probably the
wrong approach.

Hence my question here.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Strange error with composer

andys
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Strange error with composer

James HK
Hi,

>> My CPANEL interface doesn't allow .phar files, so I've had to unpack
>> composer.phar and run it directly.

I don't think this what you are suppose to be doing. If you apply such
"custom" procedures I would not be surprised about potential issues.

If you think you have encountered a bug in Composer itself, it would
be more appropriate to address your findings at [0].

Generally, when Composer is used in way it is described in [1, 2, 3]
then the issue you have described will likely not appear.

PS: For shared hosting, you might want to look at [4, 5]

[0] https://github.com/composer/composer/issues?state=open

[1] https://getcomposer.org/doc/01-basic-usage.md

[2] https://semantic-mediawiki.org/wiki/Help:Composer

[3] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/INSTALL.md

[4] http://joemaller.com/3308/php-composer-on-shared-hosting/

[5] https://stackoverflow.com/questions/21484310/is-there-any-way-we-can-run-composer-on-shared-hosting-which-only-provide-cpanel/21484840#21484840

Cheers

On 5/4/14, andys <[hidden email]> wrote:

> That's definitely beyond my skill level :). I'm only a user not an admin :)
>
>
>
>
>
> On 4 May 2014, at 03:00, "Peter Brooks [via Wikimedia]"
> <[hidden email]> wrote:
>
>> My CPANEL interface doesn't allow .phar files, so I've had to unpack
>> composer.phar and run it directly. It was working, but I've now got this
>> strange behaviour:
>>
>> Error message:
>>
>> "
>> PHP:  syntax error, unexpected '(' in
>> /home/kchcl200/public_html/wiki/extensions/Composer/bin/composer on line 3
>>
>> Could not open input file: require
>> "
>> Command (in cron):
>>
>> cd www/wiki;php-cli -c extensions/Composer/bin/composer require
>> mediawiki/semantic-media-wiki "~1.9.2"
>>
>> The file structure is:
>>
>> public_html/wiki/extensions/Composer
>>   bin
>>    composer
>>    composer.json
>>   res
>>    composer-schema.json
>>    spdx-identifier.json
>>   src
>>    Composer
>>      bootstrap.php
>>      Composer
>>        Autoload
>>        Command
>>        Config
>>        Console
>>          Application.php
>>          HtmlOutputFormatter.php
>>        ...
>>
>> I suspect it's something to do with the:
>>
>> use Composer\Console\Application;
>>
>> That's the third line of composer.php - but I don't know php, so I'm not
>> familiar with what the back-slashes are supposed to be.
>>
>> I also think that, in this case, trying to fix the code is probably the
>> wrong approach.
>>
>> Hence my question here.
>> ------------------------------------------------------------------------------
>>
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
>> unparalleled scalability from the best Selenium testing platform
>> available.
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
>>
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://wikimedia.7.x6.nabble.com/Strange-error-with-composer-tp5027015.html
>> To start a new topic under Semantic Mediawiki - User, email
>> [hidden email]
>> To unsubscribe from Semantic Mediawiki - User, click here.
>> NAML
>
>
>
>
> --
> View this message in context:
> http://wikimedia.7.x6.nabble.com/Strange-error-with-composer-tp5027015p5027019.html
> Sent from the Semantic Mediawiki - User mailing list archive at Nabble.com.
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Strange error with composer

Peter Brooks
Thank you James - the second two confirm the problem, that you can't use
.phar on CPANEL (some do allow it, but many don't).

Actually, thought, what is odd is that I've had it working, without the
.phar, pretty well exactly as it is set up now. That's why I was asking
here - I know lots of people run mediawiki through CPANEL, so I thought
somebody here might have hit just this problem.

I'll report it to the github link, though, as you suggest, thank you again.


On 4 May 2014 07:35, James HK <[hidden email]> wrote:

> Hi,
>
> >> My CPANEL interface doesn't allow .phar files, so I've had to unpack
> >> composer.phar and run it directly.
>
> I don't think this what you are suppose to be doing. If you apply such
> "custom" procedures I would not be surprised about potential issues.
>
> If you think you have encountered a bug in Composer itself, it would
> be more appropriate to address your findings at [0].
>
> Generally, when Composer is used in way it is described in [1, 2, 3]
> then the issue you have described will likely not appear.
>
> PS: For shared hosting, you might want to look at [4, 5]
>
> [0] https://github.com/composer/composer/issues?state=open
>
> [1] https://getcomposer.org/doc/01-basic-usage.md
>
> [2] https://semantic-mediawiki.org/wiki/Help:Composer
>
> [3]
> https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/INSTALL.md
>
> [4] http://joemaller.com/3308/php-composer-on-shared-hosting/
>
> [5]
> https://stackoverflow.com/questions/21484310/is-there-any-way-we-can-run-composer-on-shared-hosting-which-only-provide-cpanel/21484840#21484840
>
> Cheers
>
> On 5/4/14, andys <[hidden email]> wrote:
> > That's definitely beyond my skill level :). I'm only a user not an admin
> :)
> >
> >
> >
> >
> >
> > On 4 May 2014, at 03:00, "Peter Brooks [via Wikimedia]"
> > <[hidden email]> wrote:
> >
> >> My CPANEL interface doesn't allow .phar files, so I've had to unpack
> >> composer.phar and run it directly. It was working, but I've now got this
> >> strange behaviour:
> >>
> >> Error message:
> >>
> >> "
> >> PHP:  syntax error, unexpected '(' in
> >> /home/kchcl200/public_html/wiki/extensions/Composer/bin/composer on
> line 3
> >>
> >> Could not open input file: require
> >> "
> >> Command (in cron):
> >>
> >> cd www/wiki;php-cli -c extensions/Composer/bin/composer require
> >> mediawiki/semantic-media-wiki "~1.9.2"
> >>
> >> The file structure is:
> >>
> >> public_html/wiki/extensions/Composer
> >>   bin
> >>    composer
> >>    composer.json
> >>   res
> >>    composer-schema.json
> >>    spdx-identifier.json
> >>   src
> >>    Composer
> >>      bootstrap.php
> >>      Composer
> >>        Autoload
> >>        Command
> >>        Config
> >>        Console
> >>          Application.php
> >>          HtmlOutputFormatter.php
> >>        ...
> >>
> >> I suspect it's something to do with the:
> >>
> >> use Composer\Console\Application;
> >>
> >> That's the third line of composer.php - but I don't know php, so I'm not
> >> familiar with what the back-slashes are supposed to be.
> >>
> >> I also think that, in this case, trying to fix the code is probably the
> >> wrong approach.
> >>
> >> Hence my question here.
> >>
> ------------------------------------------------------------------------------
> >>
> >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> >> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> >> unparalleled scalability from the best Selenium testing platform
> >> available.
> >> Simple to use. Nothing to install. Get started now for free."
> >> http://p.sf.net/sfu/SauceLabs
> >> _______________________________________________
> >> Semediawiki-user mailing list
> >> [hidden email]
> >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >>
> >>
> >> If you reply to this email, your message will be added to the discussion
> >> below:
> >>
> http://wikimedia.7.x6.nabble.com/Strange-error-with-composer-tp5027015.html
> >> To start a new topic under Semantic Mediawiki - User, email
> >> [hidden email]
> >> To unsubscribe from Semantic Mediawiki - User, click here.
> >> NAML
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://wikimedia.7.x6.nabble.com/Strange-error-with-composer-tp5027015p5027019.html
> > Sent from the Semantic Mediawiki - User mailing list archive at
> Nabble.com.
> >
> ------------------------------------------------------------------------------
> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> > Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> > unparalleled scalability from the best Selenium testing platform
> available.
> > Simple to use. Nothing to install. Get started now for free."
> > http://p.sf.net/sfu/SauceLabs
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user