XF 2.1 Setting up advertising issue

framer

Member
Short:

Trying to setup advertising on an upgraded 2.1.3. No madder what I enter I keep getting "
ErrorException: [E_WARNING] file_put_contents(/var/www/html/internal_data/code_cache/templates/l1/s0/public/_ads.php): failed to open stream: Permission denied in src/vendor/league/flysystem/src/Adapter/Local.php at line 136" followed by 25 lines of trace.

What permission am I missing and where do I find it.

Thanks for all the help I've been getting here.


framer
 
I copied the complete message:

Server error log

ErrorException: [E_WARNING] file_put_contents(/var/www/html/internal_data/code_cache/templates/l1/s0/public/_ads.php): failed to open stream: Permission denied src/vendor/league/flysystem/src/Adapter/Local.php:136

Generated by: UzZx32QU Aug 20, 2019 at 1:03 PM

Stack trace



#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fil...', 's...', 136, Array)
#1 src/vendor/league/flysystem/src/Adapter/Local.php(136): file_put_contents('i...', '<?php
// FROM H...', 2)
#2 src/vendor/league/flysystem/src/Filesystem.php(102): League\Flysystem\Adapter\Local->write('templates/l1/s0...', '<?php
// FROM H...', Object(League\Flysystem\Config))
#3 [internal function]: League\Flysystem\Filesystem->put('templates/l1/s0...', '<?php
// FROM H...', Object(League\Flysystem\Config))
#4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('parent::put', Array)
#5 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('put', Array)
#6 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(57): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('put', Array)
#7 src/vendor/league/flysystem/src/MountManager.php(595): League\Flysystem\EventableFilesystem\EventableFilesystem->put('templates/l1/s0...', '<?php
// FROM H...', Array)
#8 src/XF/Util/File.php(197): League\Flysystem\MountManager->put('templates/l1/s0...', '<?php
// FROM H...', Array)
#9 src/XF/Service/Template/Compile.php(146): XF\Util\File::writeToAbstractedPath('code-cache://te...', '<?php
// FROM H...')
#10 src/XF/Service/Template/Compile.php(43): XF\Service\Template\Compile->writeCompiled(Object(XF\Entity\Template), 'code-cache://te...', 'return array('m...')
#11 src/XF/Entity/Template.php(433): XF\Service\Template\Compile->recompile(Object(XF\Entity\Template))
#12 src/XF/Mvc/Entity/Entity.php(1208): XF\Entity\Template->_postSave()
#13 src/XF/Service/Advertising/Writer.php(47): XF\Mvc\Entity\Entity->save()
#14 src/XF/Container.php(275): XF\Service\Advertising\Writer->__construct(Object(XF\Admin\App), Array, Array)
#15 src/XF/App.php(1564): XF\Container->createObject('XF\\Service\\Adve...', Array)
#16 src/XF/Container.php(228): XF\App->XF\{closure}('XF\\Service\\Adve...', Array, Object(XF\Container))
#17 src/XF/App.php(2770): XF\Container->create('service', 'XF:Advertising\\...', Array)
#18 src/XF/Repository/Advertising.php(59): XF\App->service('XF:Advertising\\...', Array, Array)
#19 src/XF/Entity/Advertising.php(38): XF\Repository\Advertising->writeAdsTemplate()
#20 src/XF.php(290): XF\Entity\Advertising->XF\Entity\{closure}()
#21 src/XF/Mvc/Dispatcher.php(143): XF::triggerRunOnce(true)
#22 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#23 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#24 src/XF.php(390): XF\App->run()
#25 admin.php(13): XF::runApp('XF\\Admin\\App')
#26 {main}



Request state

array(4) {
["url"] => string(35) "/admin.php?advertising/111.5/delete"
["referrer"] => string(43) "http://192.168.1.143/admin.php?advertising/"
["_GET"] => array(1) {
["advertising/111_5/delete"] => string(0) ""
}
["_POST"] => array(4) {
["_xfToken"] => string(8) "****"
["_xfRequestUri"] => string(23) "/admin.php?advertising/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Permissions problems.
open your FTP client and navigate to your XenForo root directory (the directory your created earlier). You should see the data and internal_data directories. You will need to change permissions on these two directories.

In Linux, these should be "chmod 0777". You can generally do this via your FTP client by making sure that the directory has read, write, and execute permissions for user, group and world.
 
Back
Top Bottom