Page 1 of 1

problem with.php.ini

Posted: Wed Dec 05, 2007 10:12 am
by senzacionale
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


look here: 
[url]http://turisticnioglasnik.si/test/index.php/param1/name[/url]

i get No input file specified instead od word name

i use this class for reading paramether

Code: Select all

class Request
{
   protected static $instance = null;
   protected $vars = array();
 
   protected function __construct()
   {
      if(!isset($_SERVER['PATH_INFO']) || strlen($path = trim($_SERVER['PATH_INFO'], '/')) == 0)
         return;
      $matches = explode('/', $path);
      $c = count($matches);
      for($x=0;$x<$c;$x+=2)
         if(isset($matches[$x+1]))
            $this->vars[$matches[$x]] = $matches[$x+1];
      unset($matches);
   }
 
   public static function getInstance()
   {
      if(self::$instance === null)
         self::$instance = new Request();
    
      return self::$instance;
   }
 
   public function get($name)
   {
      if(isset($this->vars[$name]))
         return $this->vars[$name];
      else
         return null;
   }
 
}
$r = Request::getInstance();
echo $r->get('param1');
i try with mod_rewrite but i always get no input file specified. My host provider said to me that this is php.ini problem but they do not know how to fix it. Can someone help me?

Regards


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Dec 05, 2007 11:04 am
by feyd
Path info generally has little to do with php.ini, but with the configuration of the server to pass the information.

AOL Speak

Posted: Wed Dec 05, 2007 11:52 am
by senzacionale
hi [s]thx[/s] thanks for your modification of the post.

can you tell me what with path must i change? I try with mod_rewrite in .htaccess but not working.

regards
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Wed Dec 05, 2007 7:25 pm
by s.dot
Give us an example URL you'd like to run through mod_rewrite, and the page it should map to, and what you've tried in .htaccess. :)

Posted: Thu Dec 06, 2007 3:46 am
by senzacionale
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


[syntax="apache"]<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 
http://turisticnioglasnik.si/test/index.php/param1/name

but i always get a message no input file specified instead of word name.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]