? ? Success

User tests: Successful: Unsuccessful:

avatar rivetweb
rivetweb
11 Aug 2014

.

avatar rivetweb rivetweb - open - 11 Aug 2014
avatar jissues-bot jissues-bot - change - 11 Aug 2014
Status Pending New
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 11 Aug 2014

Hi,
Thanks for the fix. FOF is a 3rd party library so you need to make the fix to it's repository here: https://github.com/akeeba/fof and then it will get pulled into Joomla when @nikosdion does a release

avatar brianteeman
brianteeman - comment - 11 Aug 2014

Please can you provide an explanation of the problem you are trying to fx and how to test your solution

avatar rivetweb
rivetweb - comment - 11 Aug 2014

Hi. I am trying to use Joomla in PHAR file. I test it manually. One most problem - if use realpath function with phar path - it create incrorrect (empty) path .

avatar brianteeman brianteeman - change - 11 Aug 2014
Labels Added: ?
avatar nikosdion
nikosdion - comment - 11 Aug 2014

I am against this "fix".

On the FOF part of the "fix" the removal of realdir will result in relative paths being used. This will cause issues with JPath::check() under certain conditions, resulting in FOF no longer working.

On the Joomla! side of things, you can't realistically run Joomla! from inside a PHAR archive. Joomla! expects to be able to write to certain folders. You can certainly work around this limitation with a custom defines.php file. However, you will run into some major issues:

  • Joomla! Update and Joomla! Extensions Manager expect to be able to write to the Joomla! filesystem in order to provide update and extension installation services.
  • Joomla! extensions expect to be able to write to the Joomla! filesystem.
  • The relative URL to media files is calculated from the absolute filesystem path. Running Joomla! from a PHAR archive with the media, images etc folders outside of it will result in all of the relative URLs being wrong and your page being broken.
  • Most web servers won't actually serve a site from a PHAR archive
  • Even when a web server will serve a site from a PHAR archive it will be dead slow.

What you are doing may be enough for your very specific, very simplistic use case (most likely running a site which won't be modified from a PHAR archive) but it's not ripe for inclusion in a mass distributed application used by millions.

avatar rivetweb
rivetweb - comment - 19 Aug 2014

I made some defines for using templates and cache from real path not phar file. Maybe it helpful in feature.
I think it's real for using most part of Joomla! in PHAR, except files like media, cache, templates.

It's really works. Except com_menus. I see another error
/index.php?option=com_menus&view=items&menutype=mainmenu
because
require_once realpath(JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');

And don't understand - it's really necessary using relapath for includes?

avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 21 Aug 2014
The description was changed
Status New Pending
avatar brianteeman
brianteeman - comment - 17 Oct 2014

Setting to Needs Review so the maintainers can make a decision

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4091.

avatar brianteeman brianteeman - change - 17 Oct 2014
Status Pending Needs Review
avatar roland-d
roland-d - comment - 12 Jun 2015

Thank you for contribution. I am closing this request as I don't see this moving forward or is something we will implement.

avatar roland-d roland-d - change - 12 Jun 2015
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2015-06-12 22:29:44
Closed_By roland-d
avatar roland-d roland-d - close - 12 Jun 2015

Add a Comment

Login with GitHub to post a comment