473,657 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

different PHP_SELF behaviors

Say I had the following script:

<?
echo $_SERVER['PHP_SELF'];
?>

Lets call this script test.php. On some severs, accessing
/test.php/foobar will yield in /test.php/foobar being displayed while
on others, it'll result in /test.php being displayed. I can't seem to
find anything that all the servers that do display it or all the
servers that don't display it have in common. Any ideas? Is it some
PHP directive or some Apache module or something?

Jul 4 '06 #1
2 1359
yawnmoth wrote:
Say I had the following script:

<?
echo $_SERVER['PHP_SELF'];
?>

Lets call this script test.php. On some severs, accessing
/test.php/foobar will yield in /test.php/foobar being displayed while
on others, it'll result in /test.php being displayed. I can't seem to
find anything that all the servers that do display it or all the
servers that don't display it have in common. Any ideas? Is it some
PHP directive or some Apache module or something?
PATH_INFO
See, especially the Jul 3 post of:
http://groups.google.com/group/comp....df8b9b8b5d81a/

Csaba Gabor from Vienna

Jul 4 '06 #2
Csaba Gabor wrote:
yawnmoth wrote:
>Say I had the following script:

<?
echo $_SERVER['PHP_SELF'];
?>

Lets call this script test.php. On some severs, accessing
/test.php/foobar will yield in /test.php/foobar being displayed while
on others, it'll result in /test.php being displayed. I can't seem to
find anything that all the servers that do display it or all the
servers that don't display it have in common. Any ideas? Is it some
PHP directive or some Apache module or something?

PATH_INFO
See, especially the Jul 3 post of:
http://groups.google.com/group/comp....df8b9b8b5d81a/

Csaba Gabor from Vienna

[Is this synchronicity?]

I agree. That sure sounds like the difference between the
cgi.fix_pathinf o settings in php.ini (used when Php runs as a a CGI
binary). I dredged this up while researching a problem with the contents
of the path_info server var only yesterday.

http://bugs.php.net/bug.php?id=31843

--
*************** **************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Everyone's journey should be different,
so that we all are enriched
in new and endless ways
*************** **************
Jul 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6038
by: Ankur Gupta | last post by:
How can I retrieve all the page name with arguments passed to itself? Using Php_Self tag with the following URL: http://localhost/workplaceGSA/index.php?start_bottom_count=0&bottom_total_count=7 returns: http://localhost/workplaceGSA/index.php
5
2829
by: Maja | last post by:
here's situation: i have installed php 5 and apache 2.0. i can call my page with: localhost\\subdir\page.php inside my page i use links like this:
12
4452
by: Don | last post by:
What's the PHP equivalent for the following? if(window.location == "http:/site.com/page1.html") { } else { }
1
4190
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens in IE as well as FireFox. This code has been tested on a Win2003 server, IIS6, PHP 5.0.3, mySQL 4.1.8 and it works fine. The problem server is a Win2k server, IIS5, PHP 5.0.4, mySQL 4.1.11.
137
7060
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very pragmatic - 3) I usually move forward when I get the gut feeling I am correct - 4) Most likely because of 1), I usually do not manage to fully explain 3) when it comes true. - 5) I have developed for many years (>18) in many different environments,...
10
5241
by: Jim Carlock | last post by:
Looking for a way to extract the path from the pfqpn (partially full qualified path name). $sThisServer = $_SERVER; // returns either aquaticcreationsnc.com or www.aquaticcreationsnc.com $sThisServer = $_SERVER; // returns aquaticcreationsnc.com whether or not the end-user typed // in the preceding www.
4
5661
by: Jim Carlock | last post by:
Are the XSS / Cross Site Scripting attacks fixed in Version 4.44? I'm seeing that $_SERVER doesn't return the $_SERVER appended to it. I was just messing with a few things and noticed that PHP_SELF returns only the page name now and without the $_GET query... http://blog.phpdoc.info/archives/13-XSS-Woes.html
18
10736
by: zoilus | last post by:
Can not determine how "<?=PHP_SELF?>" is supposed to work. The below is the line of code. <!-- <form name="search" method="post" action="<?=$PHP_SELF?>"--> When the above statement is run the following is the result. You don't have permission to access /dev/forms/forms_testing/< on this server.
7
1718
by: dantebothermy | last post by:
In the data entry area of my access application, I give users an opportunity to undo. The same code gives me three different behaviors. When I first test it, it works fine. But if I edit the field again and click elsewhere, I get an error that "the command or action undo isn't available". And if I cancel the error message dialog box and edit the field again, click elsewhere. This time the undo deletes the entire edited field. Please...
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.