xoops forums

#### Sikandar

Just popping in
Posted on: 2009/11/20 14:43
Just popping in
Posts: 99
Since: 2005/5/19

#### Re: Error: Selected module does not exist?

I have searched and here are xoops_version.php file no one on root.

D:\inetpub\erpstuff.com\Frameworks\art\xoops_version.php
D:\inetpub\erpstuff.com\modules\pm\xoops_version.php
D:\inetpub\erpstuff.com\modules\profile\xoops_version.php
D:\inetpub\erpstuff.com\modules\protector\xoops_version.php
D:\inetpub\erpstuff.com\modules\system\xoops_version.php
D:\inetpub\erpstuff.com\xoops_lib\modules\protector\xoops_version.php

#### Peekay

XOOPS is my life!
Posted on: 2009/11/20 14:49
XOOPS is my life!
Posts: 2335
Since: 2004/11/20

#### Re: Error: Selected module does not exist?

'PHP_SELF' should work on IIS, but I have read about a few problems with it. I would normally try changing it to

 $_SERVER['SCRIPT_NAME']  but it doesn't return a full path so I don't know how that might affect that function. I know that $_SERVER['REQUEST_URI'] 

won't work on IIS if PHP is running in CGI mode.

#### Sikandar

Just popping in
Posted on: 2009/11/20 15:00
Just popping in
Posts: 99
Since: 2005/5/19

#### Re: Error: Selected module does not exist?

Can you pl let me know what it should return?

$_SERVER['SCRIPT_NAME'] is supported on all platforms$_SERVER['PHP_SELF']
This is the filename of the currently executing script, relative to the document root. However, unlike $_SERVER['SCRIPT_NAME'], it provides additional path information like$_SERVER['REQUEST_URI'] when the actual php file is present in the path. So when the $_SERVER['REQUEST_URI'] is /index.php/big/directory/ then$_SERVER['PHP_SELF'] will be /index.php/big/directory/.
However if all the URI's under http://www.example.com/ is mapped to http://www.example.com/index.php, then, for example, http://www.example.com/abc/def will return /index.php like $_SERVER['SCRIPT_NAME']. Note that$_SERVER['REQUEST_URI'] data is ignored for this request.

$_SERVER['PHP_SELF'] is supported on all platforms. #### Sikandar Just popping in Posted on: 2009/11/20 15:09 Sikandar (Show more) Just popping in Posts: 99 Since: 2005/5/19 #### Re: Error: Selected module does not exist? One possible reason just want to check by placing all files in a folder instead of root. may it effect. thanks #### ghia Community Support Member Posted on: 2009/11/20 15:15 ghia (Show more) Community Support Member Posts: 4954 Since: 2008/7/3 1 #### Re: Error: Selected module does not exist? Quote: I can see following error in debug? Yes Try this testversion.php in your root  <?php if (file_exists('./xoops_version.php')) { echo "exists"; } else { echo "exists not"; } ?>  #### Sikandar Just popping in Posted on: 2009/11/20 15:48 Sikandar (Show more) Just popping in Posts: 99 Since: 2005/5/19 #### Re: Error: Selected module does not exist? It says exists not now when I tested on my local pc the following,$_SERVER['SCRIPT_NAME']

is returning '/'

while on online hosting it is giving error with,

why so as it it will only return directory then I think there will be no issue. Just my thought. thanks

#### Sikandar

Just popping in
Posted on: 2009/11/20 16:16
Just popping in
Posts: 99
Since: 2005/5/19

#### Re: Error: Selected module does not exist?

I think is I think due to placing XOOPS on root and IIS is getting confused. Now if I will place XOOPS in a folder then how users will be able to access it? Do I need to place any file on root? thanks

#### ghia

Community Support Member
Posted on: 2009/11/20 16:23
Community Support Member
Posts: 4954
Since: 2008/7/3 1

#### Re: Error: Selected module does not exist?

Don't compare different things. The added display on the server comes from $_SERVER['PHP_SELF']. But I can't get why the first statement  if (file_exists('./xoops_version.php'))  of common.php resolves to true. Could you change once the line in common.php to  echo '<h4>' . _MODULENOEXIST . '|' .$_SERVER['PHP_SELF'] . '|' . realpath('./xoops_version.php') . '|' . '</h4>'; 

#### Sikandar

Just popping in
Posted on: 2009/11/20 16:42