|
|
|
|
![]() ![]() |
Mar 26 2006, 07:22 PM
Post
#1
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 95 Joined: 17-October 05 From: California Member No.: 13,046 |
I have a problem...
QUOTE Warning: file_get_contents(): open_basedir restriction in effect. File(/1/r0khan) is not within the allowed path(s): (/dh/web/phpmyadmin:/tmp:/usr/local/tmp:/dh/solidclient:/usr/local/lib/php:/home/r0khan:/home/.celine/r0khan) in /home/.celine/r0khan/1/seo.php on line 69 Warning: file_get_contents(/1/r0khan): failed to open stream: Operation not permitted in /home/.celine/r0khan/1/seo.php on line 69 Please help, im setting up a website of mine and im beggin 4 ur help, thx |
|
|
|
Mar 26 2006, 07:40 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,005 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
can you post some code here, please. It looks like either a file path or file permission problem. We need some code to work with, though.
|
|
|
|
Mar 26 2006, 07:43 PM
Post
#3
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 95 Joined: 17-October 05 From: California Member No.: 13,046 |
QUOTE <?php
include('config.php'); $file = $_SERVER['REQUEST_URI']; if($script_path) { $slash = '/'; } $replace = $slash.$script_path.'/'.MFORUM.'/'; if($file == $slash.$script_path.'/'.MFORUM) { header('Location: '.$replace); exit; } if(ereg('^'.$replace.'admin', $file) && !ereg('login.php', $file)) { chdir('admin'); $admin = 'yes'; $file = ereg_replace('^'.$replace.'admin/', '', $file); } if($admin != 'yes') { $file = ereg_replace('^'.$replace, '', $file); } if(!$file) { include('index.php'); exit; } $file = explode('?', $file); $file = $file[0]; if(ereg('..', $file)) { die('<b><center>Invalid file!</center></b>'); } $extension = explode('.', $file); $count = count($extension); $count--; $extension = $extension[$count]; if(!function_exists('mime_content_type')) { function mime_content_type($file) { $extension = explode('.', $file); $count = count($extension); $count--; $extension = $extension[$count]; $file = file('mime.dat'); for($i = 0; $i < count($file); $i++) { $line = $file[$i]; $line = explode(':', $line); if($line[1] == $extension) { return $line[0]; } } } } if($extension == 'php') { include($file); } else { $mime = mime_content_type($file); header('(anti-spam-content-type:) '.$mime); print file_get_contents($file); } ?> |
|
|
|
Mar 26 2006, 08:06 PM
Post
#4
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 874 Joined: 30-July 04 Member No.: 246 |
There is a PHP forum. I would suggest you post such topics there.
Anyway, the problem appears to lie in the path you're specifying. Note in the error that it indicates the file path is prefixed with a slash - this means that PHP is going to try and look in the server's root directory, to which you almost certainly wouldn't have access (unless you own the server). Try adding $_SERVER['DOCUMENT_ROOT'] to the start of the file path. |
|
|
|
Mar 26 2006, 08:16 PM
Post
#5
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,005 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
looks like a PATH problem.
CODE Warning: file_get_contents(): open_basedir restriction in effect. File(/1/r0khan) is not within the allowed path(s): (/dh/web/phpmyadmin:/tmp:/usr/local/tmp:/dh/solidclient:/usr/local/lib/php:/home/r0khan:/home/.celine/r0khan) in /home/.celine/r0khan/1/seo.php on line 69 Warning: file_get_contents(/1/r0khan): failed to open stream: Operation not permitted in /home/.celine/r0khan/1/seo.php on line 69 And the path is formed like this : (/r0khan/1/) Notice the reversal of the folder/sub-folder? And I can't see where that occurs in the script. I don't have my head wrapped around the code right now. Company just walked in and I am distracted, so I'll be back to have another look shortly. Spectre's answer is good, too. |
|
|
|
Mar 26 2006, 08:23 PM
Post
#6
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 95 Joined: 17-October 05 From: California Member No.: 13,046 |
k
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 06:18 PM |