TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-29-2008, 05:11 PM   #1 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default Virtual Directory Support?

So I spend all morning adding stupid DEBUG hacks to my web site so that I can have it run on my current server, albeit not the way I wanted it to, as close to it as possible.

Not only did I have to mess with my directory structure because locally I have it set up under the document root, and thanks to some a$$h*le company called Verio front running the domain I wanted for it I have it set up remotely as a sub domain of my other site... but as I mentioned elsewhere mod_rewrite isn't enabled so I had to go through and add the little .php extension here and there and.... OH BUT GUESS WHAT??!

So, you know how this should work fine, right?

http://host/index.php/this/still/loads/index.php

Ie, it loads index.php and everything after is just ignored (unless of course you explode your path and use it as input like I theoretically was going to do...). WELL. Not only does my dumbass, we've been on the internet for 15+ years and still don't know a damned thing host not have mod_rewrite enabled, apparently they've managed to do something to Apache to disable that from working too. If I go to...
http://remotehost/index.php/anythinghere

...it just loads, and loads until the connection times out.

I know this doesn't have much to do with PHP but I don't feel like joining talkapache.com just to ask. I can't figure out how they managed to screw that one up, except for one setting in phpinfo() I spotted.

Virtual Directory Support enabled

It's enabled on mine, disabled on theirs, and no matter how much you google it, for some reason even apache.org doesn't tell you what it does. Anybody know if that's my problem?
-m
delayedinsanity is offline  
Reply With Quote
Old 04-29-2008, 07:33 PM   #2 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

While I can't be sure if it's a solution to your problem you could use $_SERVER['REQUEST_URI'] to see if theres something after index.php and if there is relocate them to the desired page...here

PHP Code:
function detect(){
  
$uri end(explode('/',$_SERVER['REQUEST_URI']));
  if(
$uri != '' xor $uri !='index.php')
  {
     
header("Location: http://google.com");
  }

Again don't know exactly what you want.
__________________
"What everyone seems to forget is that while knowledge certainly is something - it's the implementation of knowledge that brings power" - Andres Galindo.
TlcAndres is offline  
Reply With Quote
Old 04-29-2008, 08:38 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

I already use REQUEST_URI except it's more like this;

PHP Code:

// globally clean the data
if ($_POST$this->objForm->sanitize();

// determine course of action
$this->command explode("/"$_SERVER['REQUEST_URI']);

// bullshit I need because I'm using a sub-domain
if (DEBUG_LOCALarray_shift($this->command);

// I need 3 and 4 in some cases further on in the class, so I sacrifice some readability instead of using end()
switch ($this->command[3]) {
    case 
"join"     $this->procRegister(); break;
    case 
"verify"   $this->procVerify(); break;
    case 
"login"    $this->procLogin(); break;
    case 
"forgot"   $this->procForgotPass(); break;
    case 
"remember" $this->procRemember(); break;
    default         : 
$this->procLogout();

Locally, if I type in http://localhost/index.php and if I type in http://localhost/index.php/blah/ it'll still load index.php and the server just ignores everything after index.php. In other worsds, by exploding REQUEST_URI, I can use the information after index.php as a form of data input. This is how I process my UAC calls. The links say /users/process/login/ or /users/process/register/, but technically they're all going to process.php, and everything after process is used to determine what process.php should be doing.

It works just fine on my very default set up of apache locally. It doesn't work on my host. Doesn't work here either, so I don't have a physical example to show you, but I'm sure the person who can help me should understand what I'm saying, I hope.
-m
delayedinsanity is offline  
Reply With Quote
Old 01-15-2011, 11:05 AM   #4 (permalink)
The Visitor
 
Join Date: Jan 2011
Posts: 1
Thanks: 0
taurusweb is on a distinguished road
Default Virtual Directory Support

Locate your php.ini file in your server and search for the entry virtual Directory Support and check it is enabled, If not enable it.

Virtual Directory Support => enabled

Sachin
Visit us on - <removed>

Last edited by Salathe : 01-15-2011 at 12:29 PM.
taurusweb is offline  
Reply With Quote
Old 11-08-2012, 09:04 PM   #5 (permalink)
The Visitor
 
Join Date: Nov 2012
Posts: 1
Thanks: 0
robsand is on a distinguished road
Default

I located my php.ini and can not see an entry for Virtual Directory Support; yet I see that it is set do DISABLED at http://localhost/phpinfo.php.

What is the setting called in PHP.ini?
robsand is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:45 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design