Miniscript werkt niet naar behoren
Ik probeer een redelijk klein script op de site in te voegen, maar ik krijg de volgende foutmelding wanneer ik dit met behulp van error_reporting doe:
Code (php)
1
2
3
2
3
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/vhosts/frisianpride.nl/httpdocs/themes/templates/panels.php(59) : eval()'d code on line 11
Warning: file_get_contents(http://voetbal4u.com/feed/) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/vhosts/frisianpride.nl/httpdocs/themes/templates/panels.php(59) : eval()'d code on line 11
Warning: file_get_contents(http://voetbal4u.com/feed/) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/vhosts/frisianpride.nl/httpdocs/themes/templates/panels.php(59) : eval()'d code on line 11
Daaruit neem ik op dat de panels.php niet juist is. Deze heb ik vervangen door de originele panels.php zoals die is geleverd door PHP Fusion. Bij een andere PHPFusion gebruiker werkt dit script wel, terwijl die dezelfde panels.php gebruikt...
Wie zou mij uit de brand kunnen helpen?
Panels.php ziet er als volgt uit:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
// Calculate current true url
$script_url = explode("/", $_SERVER['PHP_SELF'].(FUSION_QUERY ? "?".FUSION_QUERY : ""));
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/") + 1;
$start_page = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$start_page .= "/".$script_url[$current];
$base_url_count--;
}
define("START_PAGE", substr(preg_replace("#(&|\?)(s_action=edit&shout_id=)([0-9]+)#s", "", $start_page), 1));
// Side & center panels
ob_start();
$plc = 0;
// Render left panels
if(!defined("ADMIN_PANEL")){
if (check_panel_status("left")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='1' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
$plc++;
}
}
}
}
}else{
require_once ADMIN."navigation.php";
}
define("LEFT", ob_get_contents());
ob_end_clean();
// Render right panels
$prc = 0;
ob_start();
if(!defined("ADMIN_PANEL")){
if (check_panel_status("right")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='4' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
$prc++;
}
}
}
}
}
define("RIGHT", ob_get_contents());
ob_end_clean();
// Set the require div-width class
if(defined("ADMIN_PANEL")){
$main_style = "side-left";
}elseif ($plc && $prc) {
$main_style = "side-both";
} elseif ($plc && !$prc) {
$main_style = "side-left";
} elseif (!$plc && $prc) {
$main_style = "side-right";
} elseif (!$plc && !$prc) {
$main_style = "";
}
// Render upper center panels
ob_start();
if(!defined("ADMIN_PANEL")){
echo "<a id='content' name='content'></a>\n";
if (iADMIN && $settings['maintenance']) {
echo "<div class='admin-message'>".$locale['global_190']."</div>";
}
if (iSUPERADMIN && file_exists(BASEDIR."setup.php")) {
echo "<div class='admin-message'>".$locale['global_198']."</div>";
}
if (iADMIN && !$userdata['user_admin_password']) {
echo "<div class='admin-message'>".$locale['global_199']."</div>";
}
if (check_panel_status("upper")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='2' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
}
}
}
}
}
}
define("U_CENTER", ob_get_contents());
ob_end_clean();
// Render lower center panels
ob_start();
if(!defined("ADMIN_PANEL")){
if (check_panel_status("lower")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='3' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res) != 0) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
}
}
}
}
}
}
define("L_CENTER", ob_get_contents());
ob_end_clean();
?>
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
// Calculate current true url
$script_url = explode("/", $_SERVER['PHP_SELF'].(FUSION_QUERY ? "?".FUSION_QUERY : ""));
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/") + 1;
$start_page = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$start_page .= "/".$script_url[$current];
$base_url_count--;
}
define("START_PAGE", substr(preg_replace("#(&|\?)(s_action=edit&shout_id=)([0-9]+)#s", "", $start_page), 1));
// Side & center panels
ob_start();
$plc = 0;
// Render left panels
if(!defined("ADMIN_PANEL")){
if (check_panel_status("left")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='1' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
$plc++;
}
}
}
}
}else{
require_once ADMIN."navigation.php";
}
define("LEFT", ob_get_contents());
ob_end_clean();
// Render right panels
$prc = 0;
ob_start();
if(!defined("ADMIN_PANEL")){
if (check_panel_status("right")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='4' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
$prc++;
}
}
}
}
}
define("RIGHT", ob_get_contents());
ob_end_clean();
// Set the require div-width class
if(defined("ADMIN_PANEL")){
$main_style = "side-left";
}elseif ($plc && $prc) {
$main_style = "side-both";
} elseif ($plc && !$prc) {
$main_style = "side-left";
} elseif (!$plc && $prc) {
$main_style = "side-right";
} elseif (!$plc && !$prc) {
$main_style = "";
}
// Render upper center panels
ob_start();
if(!defined("ADMIN_PANEL")){
echo "<a id='content' name='content'></a>\n";
if (iADMIN && $settings['maintenance']) {
echo "<div class='admin-message'>".$locale['global_190']."</div>";
}
if (iSUPERADMIN && file_exists(BASEDIR."setup.php")) {
echo "<div class='admin-message'>".$locale['global_198']."</div>";
}
if (iADMIN && !$userdata['user_admin_password']) {
echo "<div class='admin-message'>".$locale['global_199']."</div>";
}
if (check_panel_status("upper")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='2' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
}
}
}
}
}
}
define("U_CENTER", ob_get_contents());
ob_end_clean();
// Render lower center panels
ob_start();
if(!defined("ADMIN_PANEL")){
if (check_panel_status("lower")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='3' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res) != 0) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
}
}
}
}
}
}
define("L_CENTER", ob_get_contents());
ob_end_clean();
?>
Gewijzigd op 01/01/1970 01:00:00 door Ane Lenstra
je host geeft geen toegang tot file_get_contents.
Mijn server gebruikt PLESK
Dat zal je host dan moeten doen.
In ieder geval bedankt voor de hulp!!
php_value allow_url_fopen = On
Ik werk ook op een plesk host en heb in mijn .htaccess een php.ini instelling succesvol overruled.
Mmm, dan krijg ik een 500 internal server error, lijkt me ook niet echt goed. :p
Dit is de enige regel in mijn .htaccess
session files komen nu in /httpdocs/phpsessions
Ik had het probleem dat deze PLESK hoster geen PHP startsession() ondersteunde op de default locatie /var/lib/php/sessions, was niet writeable. Belachelijk overigens want de httpd deamon ruim dit ook weer op (mits goed ingesteld).
Gewijzigd op 01/01/1970 01:00:00 door John D
Bedankt voor de hulp en moeite in ieder geval!
Ik heb een ticket geplaatst bij mijn hosting en hoop dat zij vanaf daar iets open kunnen zetten of iig mij kunnen helpen een oplossing te vinden!