PHP with Phar (for Composer)

Hi,

I'm looking into a way to add Phar support in PHP (disabled in the compiled package) to install Composer and related stuff.

So far, I tried to :

  • fork both openwrt-yun & the packages repos to remove --disable-phar in the makefile of PHP and recompile a Yun build, but too many errors due to down repos of whatever dependencies (I'm looking at you git.infradead.org and repo.ham.fi)

  • build only the PHP package, and again, inception of errors (you have to specify that Hash is static and not shared because it's a dependecy of Phar, and some random errors between Hash, Phar, the need of a PHP binary to build the PHP binary, problems between the debian x86/64 arch and the mips/ar71xx arch, and so on...)

  • add Phar via PECL, a massive fail too : install mod-xml, zoneinfos, reinstall a proper PEAR via pear.php.net (with "php go-pear.phar", magic), update the pear and pecl channels, upgrade everything, remove "-n" of the PHP call at the end of PECL binary because of the XML extension need, configure PEAR paths, "pecl install phar", and cry a little because it can't find phpize to build the extension (php5-dev not available)...

Well, if someone has a clue, I will appreciate it.

fredericseiler: Hi,

I'm looking into a way to add Phar support in PHP (disabled in the compiled package) to install Composer and related stuff.

So far, I tried to :

  • fork both openwrt-yun & the packages repos to remove --disable-phar in the makefile of PHP and ::::SNIP::::
  • build only the PHP package, and again, inception of errors (you have to specify that Hash is static ::::SNIP::::
  • add Phar via PECL, a massive fail too : install mod-xml, zoneinfos, reinstall a proper PEAR via ::::SNIP::::

Well, if someone has a clue, I will appreciate it.

@fredericseiler,

have you tried leather with spiked metal balls on the end? :smiling_imp:

But seriously, there is a Linino branch which has more activity. You can read about it here: The Yún CLI Tools http://codesnippets.altervista.org/documentation/yun/CLI_tools/CLItools.html

while you are there you can look at: Yún Software Packages http://codesnippets.altervista.org/documentation/yun/packages/packages.html

Jesse

Hi,

Thanks for taking your time to answer me, but, no offense, what a list of /usr/bin scripts and a print of “opkg list-available” have to do with my question ?

From time to time we need next level support:

Level 2 support:

OpenWRT forum

Level 3 support:

Drop a line to the maintainer of php package at OpenWRT.

Yep, I did that.

fredericseiler: Yep, I did that.

The answer of maintainer of php package?

I’m waiting for it (without too hope).

fredericseiler: Hi,

Thanks for taking your time to answer me, but, no offense, what a list of /usr/bin scripts and a print of "opkg list-available" have to do with my question ?

@fredericseiler, no offence taken. :) The questions we get vary in the amount of work the questioner has made. That is to say, Just because we get an intelligent question does not mean the person did as much work as you have. ;)

So I think if you have not found that the package already done, you may have to compile.

I assume you have googled: Linino php phar If not, you can compile - base on what I see from a quick scan of the results.

Namely, OpenWrt (Linino) + uHTTPd + PHP 5.4 - how to add Phar and Filter module to PHP

The same search shows that the Linino Distro has disable Phar, which is why you don't see it in the Arudino Yun.

Does this help?

Jesse

jessemonroy650: ... Namely, OpenWrt (Linino) + uHTTPd + PHP 5.4 - how to add and Filter module to PHP ...

The answer only help Filter module but not Phar, The Phar has dependent module hash , to get Phar to compile might need hash compiled as static, but ...

Anyway here is the level 4 support:

The maintainer of php package, but he/she might be not care about cross compile route.