PATH_INFO does not work under phpsuexec

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
Hello!

Is there any way to use PATH_INFO under phpsuexec?

cPanel.net Support Ticket Number:
 
Last edited:

ciphervendor

Well-Known Member
Aug 26, 2002
1,050
0
166
Stop using phpsuexec, its garbage. Wait until a real solution is released before trying to run php processes as their actual owner.

cPanel.net Support Ticket Number:
 

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
What about spammers?

How can I find out who sends emails from PHP scripts?

cPanel.net Support Ticket Number:
 

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
Is there any possibility to automatically add custom directives in httpd.conf for virtual hosts?

cPanel.net Support Ticket Number:
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
PHP_Info works fine under phpsuexec...

What kind of error are you getting.

cPanel.net Support Ticket Number:
 

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
Originally posted by Faldran
PHP_Info works fine under phpsuexec...

What kind of error are you getting.

cPanel.net Support Ticket Number:
Not php_info.
PATH_INFO.

cPanel.net Support Ticket Number:
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
What of Path_info don't work... I tested it, and I see no problems with it.

From what I saw of it, it just sperates a path into 3 parts.
Directory Name
Base Name
Extension

Just a simply PHP command, would not see any reason why it would not work.

cPanel.net Support Ticket Number:
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
Will either of the two following items are what you are looking for:

<?
echo($SCRIPT_FILENAME);
?>
( gives path with filename )
OR

<?
echo($DOCUMENT_ROOT);
?>
( gives only path )


Or as alternative...
<?
$path_parts = pathinfo($PHP_SELF);

echo $path_parts["dirname"] . "\n";
echo $path_parts["basename"] . "\n";
echo $path_parts["extension"] . "\n";
?>
( takes $PHP_SELF and breaks it down into path, basename and extension )
Of couse you could put $SCRIPT_FILENAME in place of $PHP_SELF for full absolute path.
 
Last edited:

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
Are you kidding?:)))))

Please read MORE carefully.

If you do not understand, read the thread again, and again, an' again.:)))

I'm NOT talking about $PHP_SELF.
I'm talking about $PATH_INFO.

It's NOT the path to the script.

What is the difference between
"script.php" & "script.php/one/two/three"?

For mod_php4 they are the SAME files and "/one/two/three" is the VALUE of $PATH_INFO.
For phpsuexec they are the DIFFERENT files.

Do you understand NOW?:)

cPanel.net Support Ticket Number:
 
Last edited:

Faldran

Well-Known Member
May 28, 2002
135
0
316
Originally posted by WMS
What is the different between
"script.php" & "script.php/one/two/three"?

For mod_php4 they are the SAME files and "/one/two/three" is the VALUE of $PATH_INFO.
For phpsuexec they are the DIFFERENT files.
I have never seen anyone put /one/two/three for options at the end of php scripts.... new one on me...

normally it is script.php?one=something&two=something etc...

Well good luck on that one....

cPanel.net Support Ticket Number:
 

WMS

Active Member
Jul 18, 2003
40
0
156
Moscow
Originally posted by Faldran
I have never seen anyone put /one/two/three for options at the end of php scripts.... new one on me...

normally it is script.php?one=something&two=something etc...

Well good luck on that one....

cPanel.net Support Ticket Number:
Thanks:)

But I didn't find any way to make it work...:(

cPanel.net Support Ticket Number:
 

jamesbond

Well-Known Member
Oct 9, 2002
737
1
168
Originally posted by Faldran
I have never seen anyone put /one/two/three for options at the end of php scripts.... new one on me...

normally it is script.php?one=something&two=something etc...

Well good luck on that one....
You sure you have never seen it? ;)
People already started doing these url rewrites a few years ago to have their pages spidered by the search engines.

One way to do it is by using apache's mod_rewrite

cPanel.net Support Ticket Number:
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
Originally posted by jamesbond
You sure you have never seen it? ;)
People already started doing these url rewrites a few years ago to have their pages spidered by the search engines.

One way to do it is by using apache's mod_rewrite

cPanel.net Support Ticket Number:
Yep, first reference I have ever heard of anyone using that for anything.

So what is the use of it.. does it really do anything...

cPanel.net Support Ticket Number:
 

jamesbond

Well-Known Member
Oct 9, 2002
737
1
168
Originally posted by Faldran
Yep, first reference I have ever heard of anyone using that for anything.

So what is the use of it.. does it really do anything...
Well, as mentioned this was done to make pages searchengine friendly. Otherwise your pages would not get spidered.
Nowadays most searchengine spider dynamic urls without problems though.

cPanel.net Support Ticket Number:
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
Originally posted by jamesbond
Well, as mentioned this was done to make pages searchengine friendly. Otherwise your pages would not get spidered.
Nowadays most searchengine spider dynamic urls without problems though.

cPanel.net Support Ticket Number:
Ok, so that is just another feature that is not very usefull.. since the bots have caught up with things..

Could be why I could not find any refernces to it for PHP 4.3.2 on php.net

cPanel.net Support Ticket Number:
 

rbrown

Active Member
Jun 11, 2003
35
0
156
I'm having the same problem - 404 Error. I need to be able to use $PATH_INFO but I'm using phpsuexec. What should I do to get this working?
 

rbrown

Active Member
Jun 11, 2003
35
0
156
This issue was resolved earlier today by cPanel. To try the latest version of phpsuexec, you'll need to rebuild apache:

/scripts/easyapache

Then the PHP scripts will run fine even with pathinfo appended on the end.

Good luck!

-- Rob
 

Faldran

Well-Known Member
May 28, 2002
135
0
316
about time, someone got a fix for that.. sure that will make alot of people happy now.