Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Sorry, such file doesn't exist...



 
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6262
Location: Outer Space

PostPosted: Fri Jan 09, 2004 1:42 pm    Post subject: Sorry, such file doesn't exist...
Reply with quote

Question Problem: You get an error that says:

Code:

Sorry, such file doesn't exist...


Of course, following a classic attitude to error handling, it doesn't tell you which file does not exist... Rolling Eyes

Idea Reason: The error

Code:

Sorry, such file doesn't exist...


comes from mainfile.php. There are exactly three occurences of it in the code. In all three the pattern is the same:

First it is tested if you are a normal user, an administrator, if the module is active etc., depending on the circumstances.

Then, a test is made on the existence of $modpath. Upon its failure, you get the error above:

Code:

$modpath .= "modules/$name/$file.php";
if (file_exists($modpath)) {
    include($modpath);
} else {       
    die ("Sorry, such file doesn't exist...");
}     



$modpath, in turn, is the path to the module in question. As you can see in the code snippet yourself, it depends on the value of $name, which is the name of the module, and $file, which is...

...well, for this you have to scroll up to the start of mainfile.php. There, we read

Code:

if (!isset($file)) { $file="index"; }


which in plain english says "if the variable $file is NOT set, set it to 'index'".

Putting all the puzzle pieces together, we arrive to the conclusion that the file

modules/YourModule/index.php

is not there.

Arrow Solution: There are various things you should check and all have to do with trying to find out why your web server cannot find the index file of the module you are trying to access:

  • Is the index.php file really there in the modules/YourModule folder?
  • Did you set up the permissions correctly? Does your web server have read access to that folder and file?
  • Is there a (hidden) .htaccess file somewhere in your document tree that prevents the web browser from accessing that file?
  • Did you install all files? You have to dive in the docs of that module to see if you are missing anything.
  • Check if

    http://www.yoursite.com/modules/YourModule/index.php

    returns an error. Substitute YourModule with the name of the module that is giving you the headaches.
  • If this is a module you downloaded and installed yourself (as opposed to a preinstalled one): Did you really follow the instructions? Did you download the right file? Did you extract it in the modules folder?
  • Did you see the module in the list of modules and did you activate it?

_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 1
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group