Add-on Install & Upgrade

Add-on Install & Upgrade 1.4.3

No permission to download
Hi Chris

I've decided to try and get this working again tonight (After pigging around with a separate Wordpress installation, so while I'm in apache and chmod mode.....)

Anyway, I was getting the aforementioned "Could not create directory" for a particular plugin....so I chmodded the relevant ./Library/PLUGIN folder to group writable.
This is now naturally throwing up errors that the files within aren't writable.
I notice some plugin folders within library are group writable, some aren't.

The host will change anything for us, or I can change anything myself, but it's starting to get to the limit of my knowledge.
I did ask the host when we first installed this and they weren't too sure.

The user that owns the folder structure is, for example Marcel1111, set up as the main user in our control panel / ftp etc etc.
It's a member of the psacln group....as is the web server user (apache).

I understand it's outside the remit of the addon, but is there any chance you could briefly advise? Even if it's in general.
I suppose I could set the group write flags on everything within Library, but I'm sure that's not the correct answer.

Cheers
 
What is the current error you are getting while trying to install? If it is cannot create directory then you may need to make the install/addons directory writable.
 
I've just updated your actual addon itself, using itself.... which worked fine...but all the Library/AddOnInstaller subfolders and files are set to 777......so I'm assuming that's why it's worked.

However for example, trying to upgrade the "HTML in Custom Titles" addon... I now get this error

copy(./library/HtmlCustomTitles/Listener.php) function.copy: failed to open stream: Permission denied

  1. XenForo_Application::handlePhpError()
  2. copy() in AddOnInstaller/Model/AddOn.php at line 60
  3. AddOnInstaller_Model_AddOn->recursiveCopy() in AddOnInstaller/Model/AddOn.php at line 64
  4. AddOnInstaller_Model_AddOn->recursiveCopy() in AddOnInstaller/Model/AddOn.php at line 64
  5. AddOnInstaller_Model_AddOn->recursiveCopy() in AddOnInstaller/ControllerAdmin/AddOn.php at line 249
  6. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 347
  7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  8. XenForo_FrontController->run() in /{forumlocation}/admin.php at line 13
 
Then, yes, the destination it is copying to isn't writable. Which I think you are aware of already. I can't advise more than that as you and your hosts would need to decide how best to implement that in your environment.

It's worth noting that the js and styles directories may be written to also with some add ons.
 
OK Cheers. I'll keep digging. I understand how it's not working, I'm just not sure why. You're right, it's a web server configuration issue, but I'm not sure of the actual requirements of XenForo (and this addon) beyond the minimal explanation in XF's installation guide (that /data and /internal_data should be world writable).
 
I keep getting this:
Server Error
Given file is no zip archive

  1. Zend_Filter_Compress_Zip->decompress() in C:\server\www\frustratedgamers.com\library\Zend\Filter\Decompress.php at line 47
  2. Zend_Filter_Decompress->filter() in C:\server\www\frustratedgamers.com\library\AddOnInstaller\Model\AddOn.php at line 29
  3. AddOnInstaller_Model_AddOn->extractZip() in C:\server\www\frustratedgamers.com\library\AddOnInstaller\ControllerAdmin\AddOn.php at line 146
  4. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in C:\server\www\frustratedgamers.com\library\XenForo\FrontController.php at line 347
  5. XenForo_FrontController->dispatch() in C:\server\www\frustratedgamers.com\library\XenForo\FrontController.php at line 134
  6. XenForo_FrontController->run() in C:\server\www\frustratedgamers.com\admin.php at line 13
 
If the file you are trying to upload/install is a ZIP file then it may be corrupted.
 
I've got all plugins updated by manually tweaking specific file and folder permissions for now......
However, just one plugin refuses to update.

ErrorException: copy(./.DS_Store) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied - library/AddOnInstaller/Model/AddOn.php:60
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'copy(./.DS_Stor...', '/var/www/vhosts...', 60, Array)
#1 /var/{PATHTOFORUM}/library/AddOnInstaller/Model/AddOn.php(60): copy('/var/www/vhosts...', './.DS_Store')
#2 /var/{PATHTOFORUM}/library/AddOnInstaller/ControllerAdmin/AddOn.php(249): AddOnInstaller_Model_AddOn->recursiveCopy('install/addons/...', '.')
#3 /var/{PATHTOFORUM}/library/XenForo/FrontController.php(347): AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade()
#4 /var/{PATHTOFORUM}/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /v{PATHTOFORUM}/admin.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
["url"] => string(66) "http://www.talkphotography.co.uk/admin.php?add-ons/install-upgrade"
["_GET"] => array(1) {
["add-ons/install-upgrade"] => string(0) ""
}
["_POST"] => array(3) {
["resource_url"] => string(91) "http://xenforo.com/community/resources/double-click-forum-icons-to-mark-forum-as-read.2298/"
["_xfToken"] => string(8) "********"
["_xfConfirm"] => string(1) "1"
}
}


I can't for the life of me find out *why* it's trying to copy a DS_Store file over. (Yes I'm running OSX). I've searched the server itself and removed all traces of any old .DS_Store files that were lingering around from old uploads just incase.
Also, I can't find out *where* it's trying to copy due to XenForo condensing the path in the stack trace.

Admittedly this is now outside the remit of your addon, do you know of a way I can find the full path of what its trying to copy and where from/to?


Edit....aaah just realised, the .DS_Store file might be from the addon's updated zip thats being downloaded from XenForo.
That still begs the question, where is it trying to copy it to? (So I can manually adjust permissions)
 
Got the bugger. Cheers. Had to manually download the zip from the XF Resources repository, and manually remove the .DS_Store files before it would accept it to upgrade.

I think I may have seen you cover this earlier in this thread, but as a suggestion would it be idea for your addon to ignore such files?
 
You cannot download that from the XenForo Resource Manager URL because the XenForo Resource Manager doesn't host that file. It is hosted externally.

You would need to download the file and use "Option 1" and upload the ZIP file.
 
I am having issues installing the Elastic Search add on from Xenforo. I have your add on installed and it is giving me this error when trying to install the add on:

Code:
String could not be parsed as XML

SimpleXMLElement->__construct() in AddOnInstaller/Model/AddOn.php at line 0
AddOnInstaller_Model_AddOn->getXmlType() in AddOnInstaller/ControllerAdmin/AddOn.php at line 47
AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/mike/public_html/admin.php at line 13
 
There are some hardcoded phrases, please fix it:
 

Attachments

  • 2014-10-20 11-52-24 Скриншот экрана.webp
    2014-10-20 11-52-24 Скриншот экрана.webp
    58.3 KB · Views: 11
I will keep it in mind.

I'm not going to release an update just for that, though.

And, after all, these are in the Admin CP rather than the front end so I can't say it will be a particular priority to sort it out.
 
Back
Top Bottom