HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
One of Custom Pages not showing
jackmaessen
✭✭✭
I have several pages made with Custom pages plugin. Unfortunately, one of them is not displayed anymore after i did upgrade server configuration php from 5.3 to 5.6.
The page is about an uploadmanagement system with folders and files
This is the page:
<?php if (!defined('APPLICATION')) exit(); ?> <?php /*---------------- show upload page only for administrators ----------------------- */ $AllowedUsers = Gdn::Session()->CheckPermission('Garden.Moderation.Manage'); if(!$AllowedUsers) return; /*--------------------------- ------------------------- */ $params = array( 'path' => "demo/", //relative path to script 'rows_per_page' => 10, //rows (items) in folder to display per page 'max_file_size' => 2 * 1048576, //2Mb, this depends on you server setting's 'post_max_size', usually 2Mb on shared servers 'quota' => 5000 * 1048576, //5Gb user storage quota 'user_id' => 1, //usually you'll have S_SESSION['user_id'] here ); require_once($params['path'] . "jFile.php"); $app = new jFile($params); ?> <div class="headercontent"> <h3>Upload Area (Mods only)</h3> <div class="innercontent"> test content <?php $app->display(); ?>
This gives me a "Something has gone wrong page".
I tried to find out what the proglem exactly is and i noticed when disabling this line:
$app = new jFile($params);
he shows me the "test content" but not the folders.
When testing the same page out of vanilla framework on the webserver, everything works fine.
What could be wrong with this line: $app = new jFile($params);
It should look like this: http://webprofis.nl/modsuploadtest.php
0
Comments
I would suspect the search path is wrong. But you can try to find out what went wrong by adding
$Configuration['Debug'] = TRUE;
to your /conf/config.phpoke get some more info:
Do not understand the "undefined variable": on line 18 in script above, he is defined
I fixed the undefined index (stupid failure) but now i got this error:
Still do not uderstand why the script is working standalone outside vanilla.
Also with other Custom Pages i have no problem.
And when disabling this line:
$app = new jFile($params);
; the page shows me the html on the pageWhen this line is enabled: "Something went wrong" page
This means some call passed an object by reference (using the
&
operator). This is a no-no in new PHP versions.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight
I opened the file class.thememanager.php. There a lots of this operator: &
I can replace the double && with and, but i do not know how to handle with the single ones:
You only have to replace "&$variablename" with "$variablename" leave the rest of & where they are
And only on object pointers.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
hmmm... but that still doenst solve my problem with the custom page