Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: PATH_INFO #4

Open
ghost opened this issue Jan 20, 2010 · 6 comments
Open

Undefined index: PATH_INFO #4

ghost opened this issue Jan 20, 2010 · 6 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2010

I have this error on index:
Notice: Undefined index: PATH_INFO in /opt/lampp/htdocs/qwench/index.php on line 14

I've tried changing the config parameters, but nothing works:
define('BASE_DIR','/qwench');
define('BASE_PATH',BASE_DIR);

@askagamer
Copy link

Post the link to your website, and sign-up on qwench.net and post this question.

@ghost
Copy link
Author

ghost commented Jan 21, 2010

I cannot post a link, its deployed on a LAN.
the xampp server works with php5, maybe the value PATH_INFO is missing.

@kazzab
Copy link

kazzab commented Feb 2, 2011

hello,

I think your script is great, except that I can not install can you help me?
I send you the link:
http://www.le-prescripteur.fr/

merci ;-)

@tamr
Copy link

tamr commented Mar 24, 2011

Try this solution:

config.php

define('BASE_DIR','');
define('BASE_PATH',BASE_DIR);

index.php

//$path = explode("/", substr($_SERVER['PATH_INFO'],1));

$path = explode('/', substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH),1));

@svandragt
Copy link
Contributor

Better fix than tamr's code:

index.php (replaces line 14):

$pi = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '');
$path = explode("/", substr($pi,1));

@honey6293
Copy link

magical..!!! thanks svandragt.... 👍 it made my night.. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants