Problem with $PHP_SELF?
am 29.03.2007 17:07:51 von zac.carey
I recently moved a mysql database and its associated php scripts from
one machine to another.
Now, however, although no errors are displayed, some aspects of the
php interface no longer work properly.
I suspect the problem is connected with my use of $PHP_SELF within
some of the pages.
I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
more widely supported but the problem still persists. Is there some
aspect of my php configuration that I should look at with respect to
this kind of problem?
Sorry to be so vague. Any help appreciated.
Re: Problem with $PHP_SELF?
am 29.03.2007 18:01:49 von Shion
strawberry wrote:
> I recently moved a mysql database and its associated php scripts from
> one machine to another.
> Now, however, although no errors are displayed, some aspects of the
> php interface no longer work properly.
>
> I suspect the problem is connected with my use of $PHP_SELF within
> some of the pages.
> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> more widely supported but the problem still persists. Is there some
> aspect of my php configuration that I should look at with respect to
> this kind of problem?
If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
have full functionality in $_SERVER[].
As you don't tell anything about the web server, we can't be sure on what goes
wrong.
--
//Aho
Re: Problem with $PHP_SELF?
am 29.03.2007 19:44:14 von zac.carey
On Mar 29, 5:01 pm, "J.O. Aho" wrote:
> strawberry wrote:
> > I recently moved a mysql database and its associated php scripts from
> > one machine to another.
> > Now, however, although no errors are displayed, some aspects of the
> > php interface no longer work properly.
>
> > I suspect the problem is connected with my use of $PHP_SELF within
> > some of the pages.
> > I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > more widely supported but the problem still persists. Is there some
> > aspect of my php configuration that I should look at with respect to
> > this kind of problem?
>
> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> have full functionality in $_SERVER[].
>
> As you don't tell anything about the web server, we can't be sure on what goes
> wrong.
>
> --
>
> //Aho
It's just a recent xampp installation on a windows xp machine - so an
apache web server.
Re: Problem with $PHP_SELF?
am 29.03.2007 20:04:12 von zac.carey
On Mar 29, 6:44 pm, "strawberry" wrote:
> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
>
>
>
>
> > strawberry wrote:
> > > I recently moved a mysql database and its associated php scripts from
> > > one machine to another.
> > > Now, however, although no errors are displayed, some aspects of the
> > > php interface no longer work properly.
>
> > > I suspect the problem is connected with my use of $PHP_SELF within
> > > some of the pages.
> > > I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > more widely supported but the problem still persists. Is there some
> > > aspect of my php configuration that I should look at with respect to
> > > this kind of problem?
>
> > If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > have full functionality in $_SERVER[].
>
> > As you don't tell anything about the web server, we can't be sure on what goes
> > wrong.
>
> > --
>
> > //Aho
>
> It's just a recent xampp installation on a windows xp machine - so an
> apache web server.- Hide quoted text -
>
> - Show quoted text -
Re: Problem with $PHP_SELF?
am 29.03.2007 20:04:12 von zac.carey
On Mar 29, 6:44 pm, "strawberry" wrote:
> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
>
>
>
>
> > strawberry wrote:
> > > I recently moved a mysql database and its associated php scripts from
> > > one machine to another.
> > > Now, however, although no errors are displayed, some aspects of the
> > > php interface no longer work properly.
>
> > > I suspect the problem is connected with my use of $PHP_SELF within
> > > some of the pages.
> > > I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > more widely supported but the problem still persists. Is there some
> > > aspect of my php configuration that I should look at with respect to
> > > this kind of problem?
>
> > If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > have full functionality in $_SERVER[].
>
> > As you don't tell anything about the web server, we can't be sure on what goes
> > wrong.
>
> > --
>
> > //Aho
>
> It's just a recent xampp installation on a windows xp machine - so an
> apache web server.- Hide quoted text -
>
> - Show quoted text -
Re: Problem with $PHP_SELF?
am 29.03.2007 20:30:07 von Schraalhans Keukenmeester
strawberry wrote:
> On Mar 29, 6:44 pm, "strawberry" wrote:
>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>
>>
>>
>>
>>
>>> strawberry wrote:
>>>> I recently moved a mysql database and its associated php scripts from
>>>> one machine to another.
>>>> Now, however, although no errors are displayed, some aspects of the
>>>> php interface no longer work properly.
>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>> some of the pages.
>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>> more widely supported but the problem still persists. Is there some
>>>> aspect of my php configuration that I should look at with respect to
>>>> this kind of problem?
>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>> have full functionality in $_SERVER[].
>>> As you don't tell anything about the web server, we can't be sure on what goes
>>> wrong.
>>> --
>>> //Aho
>> It's just a recent xampp installation on a windows xp machine - so an
>> apache web server.- Hide quoted text -
>>
>> - Show quoted text -
>
>
Apart from your odd choice of quoting characters and lines, it could
help if you ran a test script with the get_defined_vars() function to
see what is or isn't available in your particular setup.
See the php manual pages for details if you need more directions. If the
output makes no sense to you, you could post it here.
Rgds
Sh.
Re: Problem with $PHP_SELF?
am 29.03.2007 20:30:07 von Schraalhans Keukenmeester
strawberry wrote:
> On Mar 29, 6:44 pm, "strawberry" wrote:
>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>
>>
>>
>>
>>
>>> strawberry wrote:
>>>> I recently moved a mysql database and its associated php scripts from
>>>> one machine to another.
>>>> Now, however, although no errors are displayed, some aspects of the
>>>> php interface no longer work properly.
>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>> some of the pages.
>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>> more widely supported but the problem still persists. Is there some
>>>> aspect of my php configuration that I should look at with respect to
>>>> this kind of problem?
>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>> have full functionality in $_SERVER[].
>>> As you don't tell anything about the web server, we can't be sure on what goes
>>> wrong.
>>> --
>>> //Aho
>> It's just a recent xampp installation on a windows xp machine - so an
>> apache web server.- Hide quoted text -
>>
>> - Show quoted text -
>
>
Apart from your odd choice of quoting characters and lines, it could
help if you ran a test script with the get_defined_vars() function to
see what is or isn't available in your particular setup.
See the php manual pages for details if you need more directions. If the
output makes no sense to you, you could post it here.
Rgds
Sh.
Re: Problem with $PHP_SELF?
am 29.03.2007 21:07:00 von zac.carey
On Mar 29, 7:30 pm, Schraalhans Keukenmeester
wrote:
> strawberry wrote:
> > On Mar 29, 6:44 pm, "strawberry" wrote:
> >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> >>> strawberry wrote:
> >>>> I recently moved a mysql database and its associated php scripts from
> >>>> one machine to another.
> >>>> Now, however, although no errors are displayed, some aspects of the
> >>>> php interface no longer work properly.
> >>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>> some of the pages.
> >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>> more widely supported but the problem still persists. Is there some
> >>>> aspect of my php configuration that I should look at with respect to
> >>>> this kind of problem?
> >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>> have full functionality in $_SERVER[].
> >>> As you don't tell anything about the web server, we can't be sure on what goes
> >>> wrong.
> >>> --
> >>> //Aho
> >> It's just a recent xampp installation on a windows xp machine - so an
> >> apache web server.- Hide quoted text -
>
> >> - Show quoted text -
>
> Apart from your odd choice of quoting characters and lines, it could
> help if you ran a test script with the get_defined_vars() function to
> see what is or isn't available in your particular setup.
>
> See the php manual pages for details if you need more directions. If the
> output makes no sense to you, you could post it here.
>
> Rgds
> Sh.- Hide quoted text -
>
> - Show quoted text -
Thanks for the response. get_defined_vars didn't seem to do anything.
Perhaps I implemented it incorrectly. Anyway phpinfo() gives this.
I've masked some of the information:
PHP Variables
Variable Value
_SERVER["AuthDigestEnableQueryStringHack"] On
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/
pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-gb
_SERVER["HTTP_UA_CPU"] x86
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.2; SV1; .NET CLR 1.1.4322)
_SERVER["HTTP_HOST"] #####
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files
\Microsoft SQL Server\80\Tools\Binn\
_SERVER["System#####"] C:\WINDOWS
_SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_SERVER["WINDIR"] C:\WINDOWS
_SERVER["SERVER_SIGNATURE"] Apache/2.2.4 (Win32) DAV/2
mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Server at
##### Port 80
_SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4
OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
_SERVER["SERVER_NAME"] #####
_SERVER["SERVER_ADDR"]#####
_SERVER["SERVER_PORT"] #####
_SERVER["REMOTE_ADDR"] #####
_SERVER["DOCUMENT_#####"] C:/Program Files/xampp/htdocs
_SERVER["SERVER_ADMIN"] ####@#####
_SERVER["SCRIPT_FILENAME"] C:/Program Files/xampp/htdocs/phpinfo.php
_SERVER["REMOTE_PORT"] 4892
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["REQUEST_TIME"] 1175194379
_SERVER["argv"] Array
(
)
_SERVER["argc"] 0
_ENV["ALLUSERSPROFILE"] C:\Documents and Settings\All Users
_ENV["APPDATA"] C:\Documents and Settings\#####\Application Data
_ENV["CLASSPATH"] C:\Program Files\VERITAS\Backup Exec\NT\ECM
\bumodule.jar;C:\Program Files\VERITAS\Backup Exec\NT\ECM\LOG4J-
CORE.JAR;C:\Program Files\VERITAS\Backup Exec\NT\ECM\LOG4J.JAR;.
_ENV["ClusterLog"] C:\WINDOWS\Cluster\cluster.log
_ENV["CommonProgramFiles"] C:\Program Files\Common Files
_ENV["COMPUTERNAME"] #####SERVER
_ENV["ComSpec"] C:\WINDOWS\system32\cmd.exe
_ENV["FP_NO_HOST_CHECK"] NO
_ENV["HOMEDRIVE"] C:
_ENV["HOMEPATH"] \Documents and Settings\#####
_ENV["LOGONSERVER"] \\#####SERVER
_ENV["NUMBER_OF_PROCESSORS"] 2
_ENV["OS"] Windows_NT
_ENV["Path"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\Program Files\Symantec\pcAnywhere\;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"] x86
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 2 Stepping 9,
GenuineIntel
_ENV["PROCESSOR_LEVEL"] 15
_ENV["PROCESSOR_REVISION"] 0209
_ENV["ProgramFiles"] C:\Program Files
_ENV["PROMPT"] $P$G
_ENV["SESSIONNAME"] Console
_ENV["SystemDrive"] C:
_ENV["SystemRoot"] C:\WINDOWS
_ENV["TEMP"] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
_ENV["TMP"] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
_ENV["USERDNSDOMAIN"] #####.LOCAL
_ENV["USERDOMAIN"] #####
_ENV["USERNAME"] #####
_ENV["USERPROFILE"] C:\Documents and Settings\#####
_ENV["windir"] C:\WINDOWS
_ENV["AP_PARENT_PID"] 5760
Re: Problem with $PHP_SELF?
am 29.03.2007 21:07:00 von zac.carey
On Mar 29, 7:30 pm, Schraalhans Keukenmeester
wrote:
> strawberry wrote:
> > On Mar 29, 6:44 pm, "strawberry" wrote:
> >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> >>> strawberry wrote:
> >>>> I recently moved a mysql database and its associated php scripts from
> >>>> one machine to another.
> >>>> Now, however, although no errors are displayed, some aspects of the
> >>>> php interface no longer work properly.
> >>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>> some of the pages.
> >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>> more widely supported but the problem still persists. Is there some
> >>>> aspect of my php configuration that I should look at with respect to
> >>>> this kind of problem?
> >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>> have full functionality in $_SERVER[].
> >>> As you don't tell anything about the web server, we can't be sure on what goes
> >>> wrong.
> >>> --
> >>> //Aho
> >> It's just a recent xampp installation on a windows xp machine - so an
> >> apache web server.- Hide quoted text -
>
> >> - Show quoted text -
>
> Apart from your odd choice of quoting characters and lines, it could
> help if you ran a test script with the get_defined_vars() function to
> see what is or isn't available in your particular setup.
>
> See the php manual pages for details if you need more directions. If the
> output makes no sense to you, you could post it here.
>
> Rgds
> Sh.- Hide quoted text -
>
> - Show quoted text -
Thanks for the response. get_defined_vars didn't seem to do anything.
Perhaps I implemented it incorrectly. Anyway phpinfo() gives this.
I've masked some of the information:
PHP Variables
Variable Value
_SERVER["AuthDigestEnableQueryStringHack"] On
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/
pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-gb
_SERVER["HTTP_UA_CPU"] x86
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.2; SV1; .NET CLR 1.1.4322)
_SERVER["HTTP_HOST"] #####
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files
\Microsoft SQL Server\80\Tools\Binn\
_SERVER["System#####"] C:\WINDOWS
_SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_SERVER["WINDIR"] C:\WINDOWS
_SERVER["SERVER_SIGNATURE"] Apache/2.2.4 (Win32) DAV/2
mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Server at
##### Port 80
_SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4
OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
_SERVER["SERVER_NAME"] #####
_SERVER["SERVER_ADDR"]#####
_SERVER["SERVER_PORT"] #####
_SERVER["REMOTE_ADDR"] #####
_SERVER["DOCUMENT_#####"] C:/Program Files/xampp/htdocs
_SERVER["SERVER_ADMIN"] ####@#####
_SERVER["SCRIPT_FILENAME"] C:/Program Files/xampp/htdocs/phpinfo.php
_SERVER["REMOTE_PORT"] 4892
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["REQUEST_TIME"] 1175194379
_SERVER["argv"] Array
(
)
_SERVER["argc"] 0
_ENV["ALLUSERSPROFILE"] C:\Documents and Settings\All Users
_ENV["APPDATA"] C:\Documents and Settings\#####\Application Data
_ENV["CLASSPATH"] C:\Program Files\VERITAS\Backup Exec\NT\ECM
\bumodule.jar;C:\Program Files\VERITAS\Backup Exec\NT\ECM\LOG4J-
CORE.JAR;C:\Program Files\VERITAS\Backup Exec\NT\ECM\LOG4J.JAR;.
_ENV["ClusterLog"] C:\WINDOWS\Cluster\cluster.log
_ENV["CommonProgramFiles"] C:\Program Files\Common Files
_ENV["COMPUTERNAME"] #####SERVER
_ENV["ComSpec"] C:\WINDOWS\system32\cmd.exe
_ENV["FP_NO_HOST_CHECK"] NO
_ENV["HOMEDRIVE"] C:
_ENV["HOMEPATH"] \Documents and Settings\#####
_ENV["LOGONSERVER"] \\#####SERVER
_ENV["NUMBER_OF_PROCESSORS"] 2
_ENV["OS"] Windows_NT
_ENV["Path"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\Program Files\Symantec\pcAnywhere\;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"] x86
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 2 Stepping 9,
GenuineIntel
_ENV["PROCESSOR_LEVEL"] 15
_ENV["PROCESSOR_REVISION"] 0209
_ENV["ProgramFiles"] C:\Program Files
_ENV["PROMPT"] $P$G
_ENV["SESSIONNAME"] Console
_ENV["SystemDrive"] C:
_ENV["SystemRoot"] C:\WINDOWS
_ENV["TEMP"] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
_ENV["TMP"] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
_ENV["USERDNSDOMAIN"] #####.LOCAL
_ENV["USERDOMAIN"] #####
_ENV["USERNAME"] #####
_ENV["USERPROFILE"] C:\Documents and Settings\#####
_ENV["windir"] C:\WINDOWS
_ENV["AP_PARENT_PID"] 5760
Re: Problem with $PHP_SELF?
am 30.03.2007 00:54:42 von Schraalhans Keukenmeester
strawberry wrote:
> On Mar 29, 7:30 pm, Schraalhans Keukenmeester
> wrote:
>> strawberry wrote:
>>> On Mar 29, 6:44 pm, "strawberry" wrote:
>>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>>>> strawberry wrote:
>>>>>> I recently moved a mysql database and its associated php scripts from
>>>>>> one machine to another.
>>>>>> Now, however, although no errors are displayed, some aspects of the
>>>>>> php interface no longer work properly.
>>>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>>>> some of the pages.
>>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>>>> more widely supported but the problem still persists. Is there some
>>>>>> aspect of my php configuration that I should look at with respect to
>>>>>> this kind of problem?
>>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>>>> have full functionality in $_SERVER[].
>>>>> As you don't tell anything about the web server, we can't be sure on what goes
>>>>> wrong.
>>>>> --
>>>>> //Aho
>>>> It's just a recent xampp installation on a windows xp machine - so an
>>>> apache web server.- Hide quoted text -
>>>> - Show quoted text -
>> Apart from your odd choice of quoting characters and lines, it could
>> help if you ran a test script with the get_defined_vars() function to
>> see what is or isn't available in your particular setup.
>>
>> See the php manual pages for details if you need more directions. If the
>> output makes no sense to you, you could post it here.
>>
>> Rgds
>> Sh.- Hide quoted text -
>>
>> - Show quoted text -
>
> Thanks for the response. get_defined_vars didn't seem to do anything.
> Perhaps I implemented it incorrectly. Anyway phpinfo() gives this.
> I've masked some of the information:
>
>
> PHP Variables
> _SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
> \System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files
> \Microsoft SQL Server\80\Tools\Binn\
> _SERVER["System#####"] C:\WINDOWS
> _SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe
> _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> _SERVER["WINDIR"] C:\WINDOWS
> _SERVER["SERVER_SIGNATURE"] Apache/2.2.4 (Win32) DAV/2
> mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Server at
> ##### Port 80
> _SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4
> OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
> _SERVER["SERVER_NAME"] #####
> _SERVER["SERVER_ADDR"]#####
> _SERVER["SERVER_PORT"] #####
> _SERVER["REMOTE_ADDR"] #####
> _SERVER["DOCUMENT_#####"] C:/Program Files/xampp/htdocs
> _SERVER["SERVER_ADMIN"] ####@#####
> _SERVER["SCRIPT_FILENAME"] C:/Program Files/xampp/htdocs/phpinfo.php
> _SERVER["REMOTE_PORT"] 4892
> _SERVER["GATEWAY_INTERFACE"] CGI/1.1
> _SERVER["SERVER_PROTOCOL"] HTTP/1.1
> _SERVER["REQUEST_METHOD"] GET
> _SERVER["QUERY_STRING"] no value
> _SERVER["REQUEST_URI"] /phpinfo.php
> _SERVER["SCRIPT_NAME"] /phpinfo.php
> _SERVER["PHP_SELF"] /phpinfo.php
> [snap]
Well, $_SERVER['PHP_SELF'] appears to be populated, so that's a clue.
AFAIK on windows not every variable is available (compared to *nix).
You can use var_dump($var) to dump any variable's output.
var_dump($_SERVER) should tell you which server vars are available in
your script. (Lok up var_dump in the manual, and/or it's sibling
print_r() for details.
get_defined_vars() returns an array, so you could
var_dump(get_defined_vars()) and that should work, unless your PHP
version doesn't support the function, in which case it should throw an
error (unless error_reporting is switched off in php.ini). If you get
error messages when you make a simple typo, you should get one here as
well, if the func is unsupported.
But your PHP5.2.1 should definitely support all these functions.
Re: Problem with $PHP_SELF?
am 30.03.2007 00:54:42 von Schraalhans Keukenmeester
strawberry wrote:
> On Mar 29, 7:30 pm, Schraalhans Keukenmeester
> wrote:
>> strawberry wrote:
>>> On Mar 29, 6:44 pm, "strawberry" wrote:
>>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>>>> strawberry wrote:
>>>>>> I recently moved a mysql database and its associated php scripts from
>>>>>> one machine to another.
>>>>>> Now, however, although no errors are displayed, some aspects of the
>>>>>> php interface no longer work properly.
>>>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>>>> some of the pages.
>>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>>>> more widely supported but the problem still persists. Is there some
>>>>>> aspect of my php configuration that I should look at with respect to
>>>>>> this kind of problem?
>>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>>>> have full functionality in $_SERVER[].
>>>>> As you don't tell anything about the web server, we can't be sure on what goes
>>>>> wrong.
>>>>> --
>>>>> //Aho
>>>> It's just a recent xampp installation on a windows xp machine - so an
>>>> apache web server.- Hide quoted text -
>>>> - Show quoted text -
>> Apart from your odd choice of quoting characters and lines, it could
>> help if you ran a test script with the get_defined_vars() function to
>> see what is or isn't available in your particular setup.
>>
>> See the php manual pages for details if you need more directions. If the
>> output makes no sense to you, you could post it here.
>>
>> Rgds
>> Sh.- Hide quoted text -
>>
>> - Show quoted text -
>
> Thanks for the response. get_defined_vars didn't seem to do anything.
> Perhaps I implemented it incorrectly. Anyway phpinfo() gives this.
> I've masked some of the information:
>
>
> PHP Variables
> _SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
> \System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files
> \Microsoft SQL Server\80\Tools\Binn\
> _SERVER["System#####"] C:\WINDOWS
> _SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe
> _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> _SERVER["WINDIR"] C:\WINDOWS
> _SERVER["SERVER_SIGNATURE"] Apache/2.2.4 (Win32) DAV/2
> mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Server at
> ##### Port 80
> _SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4
> OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
> _SERVER["SERVER_NAME"] #####
> _SERVER["SERVER_ADDR"]#####
> _SERVER["SERVER_PORT"] #####
> _SERVER["REMOTE_ADDR"] #####
> _SERVER["DOCUMENT_#####"] C:/Program Files/xampp/htdocs
> _SERVER["SERVER_ADMIN"] ####@#####
> _SERVER["SCRIPT_FILENAME"] C:/Program Files/xampp/htdocs/phpinfo.php
> _SERVER["REMOTE_PORT"] 4892
> _SERVER["GATEWAY_INTERFACE"] CGI/1.1
> _SERVER["SERVER_PROTOCOL"] HTTP/1.1
> _SERVER["REQUEST_METHOD"] GET
> _SERVER["QUERY_STRING"] no value
> _SERVER["REQUEST_URI"] /phpinfo.php
> _SERVER["SCRIPT_NAME"] /phpinfo.php
> _SERVER["PHP_SELF"] /phpinfo.php
> [snap]
Well, $_SERVER['PHP_SELF'] appears to be populated, so that's a clue.
AFAIK on windows not every variable is available (compared to *nix).
You can use var_dump($var) to dump any variable's output.
var_dump($_SERVER) should tell you which server vars are available in
your script. (Lok up var_dump in the manual, and/or it's sibling
print_r() for details.
get_defined_vars() returns an array, so you could
var_dump(get_defined_vars()) and that should work, unless your PHP
version doesn't support the function, in which case it should throw an
error (unless error_reporting is switched off in php.ini). If you get
error messages when you make a simple typo, you should get one here as
well, if the func is unsupported.
But your PHP5.2.1 should definitely support all these functions.
Re: Problem with $PHP_SELF?
am 30.03.2007 04:12:17 von Jerry Stuckle
strawberry wrote:
> On Mar 29, 6:44 pm, "strawberry" wrote:
>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>
>>
>>
>>
>>
>>> strawberry wrote:
>>>> I recently moved a mysql database and its associated php scripts from
>>>> one machine to another.
>>>> Now, however, although no errors are displayed, some aspects of the
>>>> php interface no longer work properly.
>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>> some of the pages.
>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>> more widely supported but the problem still persists. Is there some
>>>> aspect of my php configuration that I should look at with respect to
>>>> this kind of problem?
>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>> have full functionality in $_SERVER[].
>>> As you don't tell anything about the web server, we can't be sure on what goes
>>> wrong.
>>> --
>>> //Aho
>> It's just a recent xampp installation on a windows xp machine - so an
>> apache web server.- Hide quoted text -
>>
>> - Show quoted text -
>
>
(it's nice to see a question of yours I can answer - I've learned a lot
from you :-) ).
$PHP_SELF only works if you have register_globals enabled in your
php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
instead.
From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
suspect your old server had register_globals enabled but your new one
doesn't.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Problem with $PHP_SELF?
am 30.03.2007 04:12:17 von Jerry Stuckle
strawberry wrote:
> On Mar 29, 6:44 pm, "strawberry" wrote:
>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>
>>
>>
>>
>>
>>> strawberry wrote:
>>>> I recently moved a mysql database and its associated php scripts from
>>>> one machine to another.
>>>> Now, however, although no errors are displayed, some aspects of the
>>>> php interface no longer work properly.
>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>> some of the pages.
>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>> more widely supported but the problem still persists. Is there some
>>>> aspect of my php configuration that I should look at with respect to
>>>> this kind of problem?
>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>> have full functionality in $_SERVER[].
>>> As you don't tell anything about the web server, we can't be sure on what goes
>>> wrong.
>>> --
>>> //Aho
>> It's just a recent xampp installation on a windows xp machine - so an
>> apache web server.- Hide quoted text -
>>
>> - Show quoted text -
>
>
(it's nice to see a question of yours I can answer - I've learned a lot
from you :-) ).
$PHP_SELF only works if you have register_globals enabled in your
php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
instead.
From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
suspect your old server had register_globals enabled but your new one
doesn't.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Problem with $PHP_SELF?
am 30.03.2007 15:14:24 von zac.carey
On Mar 30, 3:12 am, Jerry Stuckle wrote:
> strawberry wrote:
> > On Mar 29, 6:44 pm, "strawberry" wrote:
> >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> >>> strawberry wrote:
> >>>> I recently moved a mysql database and its associated php scripts from
> >>>> one machine to another.
> >>>> Now, however, although no errors are displayed, some aspects of the
> >>>> php interface no longer work properly.
> >>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>> some of the pages.
> >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>> more widely supported but the problem still persists. Is there some
> >>>> aspect of my php configuration that I should look at with respect to
> >>>> this kind of problem?
> >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>> have full functionality in $_SERVER[].
> >>> As you don't tell anything about the web server, we can't be sure on what goes
> >>> wrong.
> >>> --
> >>> //Aho
> >> It's just a recent xampp installation on a windows xp machine - so an
> >> apache web server.- Hide quoted text -
>
> >> - Show quoted text -
>
> (it's nice to see a question of yours I can answer - I've learned a lot
> from you :-) ).
>
> $PHP_SELF only works if you have register_globals enabled in your
> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> instead.
>
> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> suspect your old server had register_globals enabled but your new one
> doesn't.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Likewise Jerry :-)
OK, I've updated all the relevant scripts (I think), replacing
$PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
So, then I did a bad thing. I switched on register_globals. Now it
works, but obviously we're shortly going to become the plaything of
every mundane-data-obsessed evil geek on the planet.
Any more thoughts?
Thanks
Re: Problem with $PHP_SELF?
am 30.03.2007 15:14:24 von zac.carey
On Mar 30, 3:12 am, Jerry Stuckle wrote:
> strawberry wrote:
> > On Mar 29, 6:44 pm, "strawberry" wrote:
> >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> >>> strawberry wrote:
> >>>> I recently moved a mysql database and its associated php scripts from
> >>>> one machine to another.
> >>>> Now, however, although no errors are displayed, some aspects of the
> >>>> php interface no longer work properly.
> >>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>> some of the pages.
> >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>> more widely supported but the problem still persists. Is there some
> >>>> aspect of my php configuration that I should look at with respect to
> >>>> this kind of problem?
> >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>> have full functionality in $_SERVER[].
> >>> As you don't tell anything about the web server, we can't be sure on what goes
> >>> wrong.
> >>> --
> >>> //Aho
> >> It's just a recent xampp installation on a windows xp machine - so an
> >> apache web server.- Hide quoted text -
>
> >> - Show quoted text -
>
> (it's nice to see a question of yours I can answer - I've learned a lot
> from you :-) ).
>
> $PHP_SELF only works if you have register_globals enabled in your
> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> instead.
>
> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> suspect your old server had register_globals enabled but your new one
> doesn't.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Likewise Jerry :-)
OK, I've updated all the relevant scripts (I think), replacing
$PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
So, then I did a bad thing. I switched on register_globals. Now it
works, but obviously we're shortly going to become the plaything of
every mundane-data-obsessed evil geek on the planet.
Any more thoughts?
Thanks
Re: Problem with $PHP_SELF?
am 30.03.2007 16:28:11 von Captain Paralytic
On 30 Mar, 14:14, "strawberry" wrote:
> On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
>
>
>
>
> > strawberry wrote:
> > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > >>> strawberry wrote:
> > >>>> I recently moved a mysql database and its associated php scripts from
> > >>>> one machine to another.
> > >>>> Now, however, although no errors are displayed, some aspects of the
> > >>>> php interface no longer work properly.
> > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > >>>> some of the pages.
> > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > >>>> more widely supported but the problem still persists. Is there some
> > >>>> aspect of my php configuration that I should look at with respect to
> > >>>> this kind of problem?
> > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > >>> have full functionality in $_SERVER[].
> > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > >>> wrong.
> > >>> --
> > >>> //Aho
> > >> It's just a recent xampp installation on a windows xp machine - so an
> > >> apache web server.- Hide quoted text -
>
> > >> - Show quoted text -
>
> > (it's nice to see a question of yours I can answer - I've learned a lot
> > from you :-) ).
>
> > $PHP_SELF only works if you have register_globals enabled in your
> > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > instead.
>
> > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > suspect your old server had register_globals enabled but your new one
> > doesn't.
>
> > --
> > ==================
> > Remove the "x" from my email address
> > Jerry Stuckle
> > JDS Computer Training Corp.
> > jstuck...@attglobal.net
> > ==================
>
> Likewise Jerry :-)
>
> OK, I've updated all the relevant scripts (I think), replacing
> $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> So, then I did a bad thing. I switched on register_globals. Now it
> works, but obviously we're shortly going to become the plaything of
> every mundane-data-obsessed evil geek on the planet.
>
> Any more thoughts?
>
> Thanks- Hide quoted text -
>
> - Show quoted text -
Honstly Strawberry you should be ashamed of yourself.
Fancy describing your problem as "some aspects of the php interface no
longer work properly."
and "but it still didn't work".
Quite obviously you still have some code that is based on some of the
globals being automagically registered.
How's about sharing precisely what things the "it"s are that are not
working. Then we might be able to help you better.
Re: Problem with $PHP_SELF?
am 30.03.2007 16:28:11 von Captain Paralytic
On 30 Mar, 14:14, "strawberry" wrote:
> On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
>
>
>
>
> > strawberry wrote:
> > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > >>> strawberry wrote:
> > >>>> I recently moved a mysql database and its associated php scripts from
> > >>>> one machine to another.
> > >>>> Now, however, although no errors are displayed, some aspects of the
> > >>>> php interface no longer work properly.
> > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > >>>> some of the pages.
> > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > >>>> more widely supported but the problem still persists. Is there some
> > >>>> aspect of my php configuration that I should look at with respect to
> > >>>> this kind of problem?
> > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > >>> have full functionality in $_SERVER[].
> > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > >>> wrong.
> > >>> --
> > >>> //Aho
> > >> It's just a recent xampp installation on a windows xp machine - so an
> > >> apache web server.- Hide quoted text -
>
> > >> - Show quoted text -
>
> > (it's nice to see a question of yours I can answer - I've learned a lot
> > from you :-) ).
>
> > $PHP_SELF only works if you have register_globals enabled in your
> > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > instead.
>
> > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > suspect your old server had register_globals enabled but your new one
> > doesn't.
>
> > --
> > ==================
> > Remove the "x" from my email address
> > Jerry Stuckle
> > JDS Computer Training Corp.
> > jstuck...@attglobal.net
> > ==================
>
> Likewise Jerry :-)
>
> OK, I've updated all the relevant scripts (I think), replacing
> $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> So, then I did a bad thing. I switched on register_globals. Now it
> works, but obviously we're shortly going to become the plaything of
> every mundane-data-obsessed evil geek on the planet.
>
> Any more thoughts?
>
> Thanks- Hide quoted text -
>
> - Show quoted text -
Honstly Strawberry you should be ashamed of yourself.
Fancy describing your problem as "some aspects of the php interface no
longer work properly."
and "but it still didn't work".
Quite obviously you still have some code that is based on some of the
globals being automagically registered.
How's about sharing precisely what things the "it"s are that are not
working. Then we might be able to help you better.
Re: Problem with $PHP_SELF?
am 30.03.2007 16:51:25 von zac.carey
On Mar 30, 3:28 pm, "Captain Paralytic"
wrote:
> On 30 Mar, 14:14, "strawberry" wrote:
>
>
>
> > On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
> > > strawberry wrote:
> > > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > > >>> strawberry wrote:
> > > >>>> I recently moved a mysql database and its associated php scripts from
> > > >>>> one machine to another.
> > > >>>> Now, however, although no errors are displayed, some aspects of the
> > > >>>> php interface no longer work properly.
> > > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > > >>>> some of the pages.
> > > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > >>>> more widely supported but the problem still persists. Is there some
> > > >>>> aspect of my php configuration that I should look at with respect to
> > > >>>> this kind of problem?
> > > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > > >>> have full functionality in $_SERVER[].
> > > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > > >>> wrong.
> > > >>> --
> > > >>> //Aho
> > > >> It's just a recent xampp installation on a windows xp machine - so an
> > > >> apache web server.- Hide quoted text -
>
> > > >> - Show quoted text -
>
> > > (it's nice to see a question of yours I can answer - I've learned a lot
> > > from you :-) ).
>
> > > $PHP_SELF only works if you have register_globals enabled in your
> > > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > > instead.
>
> > > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > > suspect your old server had register_globals enabled but your new one
> > > doesn't.
>
> > > --
> > > ==================
> > > Remove the "x" from my email address
> > > Jerry Stuckle
> > > JDS Computer Training Corp.
> > > jstuck...@attglobal.net
> > > ==================
>
> > Likewise Jerry :-)
>
> > OK, I've updated all the relevant scripts (I think), replacing
> > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > So, then I did a bad thing. I switched on register_globals. Now it
> > works, but obviously we're shortly going to become the plaything of
> > every mundane-data-obsessed evil geek on the planet.
>
> > Any more thoughts?
>
> > Thanks- Hide quoted text -
>
> > - Show quoted text -
>
> Honstly Strawberry you should be ashamed of yourself.
> Fancy describing your problem as "some aspects of the php interface no
> longer work properly."
> and "but it still didn't work".
>
> Quite obviously you still have some code that is based on some of the
> globals being automagically registered.
>
> How's about sharing precisely what things the "it"s are that are not
> working. Then we might be able to help you better.
:">
But then my shame would only be compounded by revealing how appalling
my php programming actually is! I'll try to have a sift through the
code later, and remind myself what's actually going on, and then see
if I can distil it in to something concise and eloquent enough to
display here.
Re: Problem with $PHP_SELF?
am 30.03.2007 16:51:25 von zac.carey
On Mar 30, 3:28 pm, "Captain Paralytic"
wrote:
> On 30 Mar, 14:14, "strawberry" wrote:
>
>
>
> > On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
> > > strawberry wrote:
> > > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > > >>> strawberry wrote:
> > > >>>> I recently moved a mysql database and its associated php scripts from
> > > >>>> one machine to another.
> > > >>>> Now, however, although no errors are displayed, some aspects of the
> > > >>>> php interface no longer work properly.
> > > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > > >>>> some of the pages.
> > > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > >>>> more widely supported but the problem still persists. Is there some
> > > >>>> aspect of my php configuration that I should look at with respect to
> > > >>>> this kind of problem?
> > > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > > >>> have full functionality in $_SERVER[].
> > > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > > >>> wrong.
> > > >>> --
> > > >>> //Aho
> > > >> It's just a recent xampp installation on a windows xp machine - so an
> > > >> apache web server.- Hide quoted text -
>
> > > >> - Show quoted text -
>
> > > (it's nice to see a question of yours I can answer - I've learned a lot
> > > from you :-) ).
>
> > > $PHP_SELF only works if you have register_globals enabled in your
> > > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > > instead.
>
> > > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > > suspect your old server had register_globals enabled but your new one
> > > doesn't.
>
> > > --
> > > ==================
> > > Remove the "x" from my email address
> > > Jerry Stuckle
> > > JDS Computer Training Corp.
> > > jstuck...@attglobal.net
> > > ==================
>
> > Likewise Jerry :-)
>
> > OK, I've updated all the relevant scripts (I think), replacing
> > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > So, then I did a bad thing. I switched on register_globals. Now it
> > works, but obviously we're shortly going to become the plaything of
> > every mundane-data-obsessed evil geek on the planet.
>
> > Any more thoughts?
>
> > Thanks- Hide quoted text -
>
> > - Show quoted text -
>
> Honstly Strawberry you should be ashamed of yourself.
> Fancy describing your problem as "some aspects of the php interface no
> longer work properly."
> and "but it still didn't work".
>
> Quite obviously you still have some code that is based on some of the
> globals being automagically registered.
>
> How's about sharing precisely what things the "it"s are that are not
> working. Then we might be able to help you better.
:">
But then my shame would only be compounded by revealing how appalling
my php programming actually is! I'll try to have a sift through the
code later, and remind myself what's actually going on, and then see
if I can distil it in to something concise and eloquent enough to
display here.
Re: Problem with $PHP_SELF?
am 30.03.2007 17:08:10 von Captain Paralytic
On 30 Mar, 15:51, "strawberry" wrote:
> On Mar 30, 3:28 pm, "Captain Paralytic"
> wrote:
>
>
>
>
>
> > On 30 Mar, 14:14, "strawberry" wrote:
>
> > > On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
> > > > strawberry wrote:
> > > > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > > > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > > > >>> strawberry wrote:
> > > > >>>> I recently moved a mysql database and its associated php scripts from
> > > > >>>> one machine to another.
> > > > >>>> Now, however, although no errors are displayed, some aspects of the
> > > > >>>> php interface no longer work properly.
> > > > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > > > >>>> some of the pages.
> > > > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > > >>>> more widely supported but the problem still persists. Is there some
> > > > >>>> aspect of my php configuration that I should look at with respect to
> > > > >>>> this kind of problem?
> > > > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > > > >>> have full functionality in $_SERVER[].
> > > > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > > > >>> wrong.
> > > > >>> --
> > > > >>> //Aho
> > > > >> It's just a recent xampp installation on a windows xp machine - so an
> > > > >> apache web server.- Hide quoted text -
>
> > > > >> - Show quoted text -
>
> > > > (it's nice to see a question of yours I can answer - I've learned a lot
> > > > from you :-) ).
>
> > > > $PHP_SELF only works if you have register_globals enabled in your
> > > > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > > > instead.
>
> > > > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > > > suspect your old server had register_globals enabled but your new one
> > > > doesn't.
>
> > > > --
> > > > ==================
> > > > Remove the "x" from my email address
> > > > Jerry Stuckle
> > > > JDS Computer Training Corp.
> > > > jstuck...@attglobal.net
> > > > ==================
>
> > > Likewise Jerry :-)
>
> > > OK, I've updated all the relevant scripts (I think), replacing
> > > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > > So, then I did a bad thing. I switched on register_globals. Now it
> > > works, but obviously we're shortly going to become the plaything of
> > > every mundane-data-obsessed evil geek on the planet.
>
> > > Any more thoughts?
>
> > > Thanks- Hide quoted text -
>
> > > - Show quoted text -
>
> > Honstly Strawberry you should be ashamed of yourself.
> > Fancy describing your problem as "some aspects of the php interface no
> > longer work properly."
> > and "but it still didn't work".
>
> > Quite obviously you still have some code that is based on some of the
> > globals being automagically registered.
>
> > How's about sharing precisely what things the "it"s are that are not
> > working. Then we might be able to help you better.
>
> :">
>
> But then my shame would only be compounded by revealing how appalling
> my php programming actually is! I'll try to have a sift through the
> code later, and remind myself what's actually going on, and then see
> if I can distil it in to something concise and eloquent enough to
> display here.- Hide quoted text -
>
> - Show quoted text -
> But then my shame would only be compounded by revealing how appalling
> my php programming actually is!
Ahh, yes, that is always difficult ;-)
Re: Problem with $PHP_SELF?
am 30.03.2007 17:08:10 von Captain Paralytic
On 30 Mar, 15:51, "strawberry" wrote:
> On Mar 30, 3:28 pm, "Captain Paralytic"
> wrote:
>
>
>
>
>
> > On 30 Mar, 14:14, "strawberry" wrote:
>
> > > On Mar 30, 3:12 am, Jerry Stuckle wrote:
>
> > > > strawberry wrote:
> > > > > On Mar 29, 6:44 pm, "strawberry" wrote:
> > > > >> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>
> > > > >>> strawberry wrote:
> > > > >>>> I recently moved a mysql database and its associated php scripts from
> > > > >>>> one machine to another.
> > > > >>>> Now, however, although no errors are displayed, some aspects of the
> > > > >>>> php interface no longer work properly.
> > > > >>>> I suspect the problem is connected with my use of $PHP_SELF within
> > > > >>>> some of the pages.
> > > > >>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> > > > >>>> more widely supported but the problem still persists. Is there some
> > > > >>>> aspect of my php configuration that I should look at with respect to
> > > > >>>> this kind of problem?
> > > > >>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> > > > >>> have full functionality in $_SERVER[].
> > > > >>> As you don't tell anything about the web server, we can't be sure on what goes
> > > > >>> wrong.
> > > > >>> --
> > > > >>> //Aho
> > > > >> It's just a recent xampp installation on a windows xp machine - so an
> > > > >> apache web server.- Hide quoted text -
>
> > > > >> - Show quoted text -
>
> > > > (it's nice to see a question of yours I can answer - I've learned a lot
> > > > from you :-) ).
>
> > > > $PHP_SELF only works if you have register_globals enabled in your
> > > > php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> > > > instead.
>
> > > > From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> > > > suspect your old server had register_globals enabled but your new one
> > > > doesn't.
>
> > > > --
> > > > ==================
> > > > Remove the "x" from my email address
> > > > Jerry Stuckle
> > > > JDS Computer Training Corp.
> > > > jstuck...@attglobal.net
> > > > ==================
>
> > > Likewise Jerry :-)
>
> > > OK, I've updated all the relevant scripts (I think), replacing
> > > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > > So, then I did a bad thing. I switched on register_globals. Now it
> > > works, but obviously we're shortly going to become the plaything of
> > > every mundane-data-obsessed evil geek on the planet.
>
> > > Any more thoughts?
>
> > > Thanks- Hide quoted text -
>
> > > - Show quoted text -
>
> > Honstly Strawberry you should be ashamed of yourself.
> > Fancy describing your problem as "some aspects of the php interface no
> > longer work properly."
> > and "but it still didn't work".
>
> > Quite obviously you still have some code that is based on some of the
> > globals being automagically registered.
>
> > How's about sharing precisely what things the "it"s are that are not
> > working. Then we might be able to help you better.
>
> :">
>
> But then my shame would only be compounded by revealing how appalling
> my php programming actually is! I'll try to have a sift through the
> code later, and remind myself what's actually going on, and then see
> if I can distil it in to something concise and eloquent enough to
> display here.- Hide quoted text -
>
> - Show quoted text -
> But then my shame would only be compounded by revealing how appalling
> my php programming actually is!
Ahh, yes, that is always difficult ;-)
Re: Problem with $PHP_SELF?
am 30.03.2007 21:56:34 von zac.carey
Jerry Stuckle wrote:
> strawberry wrote:
> > On Mar 30, 3:12 am, Jerry Stuckle wrote:
> >> strawberry wrote:
> >>> On Mar 29, 6:44 pm, "strawberry" wrote:
> >>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
> >>>>> strawberry wrote:
> >>>>>> I recently moved a mysql database and its associated php scripts from
> >>>>>> one machine to another.
> >>>>>> Now, however, although no errors are displayed, some aspects of the
> >>>>>> php interface no longer work properly.
> >>>>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>>>> some of the pages.
> >>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>>>> more widely supported but the problem still persists. Is there some
> >>>>>> aspect of my php configuration that I should look at with respect to
> >>>>>> this kind of problem?
> >>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>>>> have full functionality in $_SERVER[].
> >>>>> As you don't tell anything about the web server, we can't be sure on what goes
> >>>>> wrong.
> >>>>> --
> >>>>> //Aho
> >>>> It's just a recent xampp installation on a windows xp machine - so an
> >>>> apache web server.- Hide quoted text -
> >>>> - Show quoted text -
> >> (it's nice to see a question of yours I can answer - I've learned a lot
> >> from you :-) ).
> >>
> >> $PHP_SELF only works if you have register_globals enabled in your
> >> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> >> instead.
> >>
> >> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> >> suspect your old server had register_globals enabled but your new one
> >> doesn't.
> >>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
> >
> > Likewise Jerry :-)
> >
> > OK, I've updated all the relevant scripts (I think), replacing
> > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > So, then I did a bad thing. I switched on register_globals. Now it
> > works, but obviously we're shortly going to become the plaything of
> > every mundane-data-obsessed evil geek on the planet.
> >
> > Any more thoughts?
> >
> > Thanks
> >
>
> Yes, I agree with Paul. Someplace you missed one or more entries. Do
> you have an editor which can do a multiple file search? I've found it's
> almost imperative when working on sites.
>
> The other thing is - $PHP_SELF probably isn't the only variable coded
> this way. $_POST, $_GET, $_SESSION and $_COOKIE variables could also be
> a potential problem.
>
> It's not easy to find all the places register_globals affects. But you
> really should get them all out. I've found really the only sure-fire
> way to do this is to go through the code line by line. It's time
> consuming, but it works better than trying to troubleshoot all the
> errors they can cause. The good news is you *can* do this after you go
> live, then when you get them all fixed you can turn off register_globals.
>
> But I think it's better to do it before you go live.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Doh! Of course - that's it! There's a $_POST request too. I didn't
appreciate that it was subject to the same limitation. I can't check
it now until Monday, but I bet that's it!
Thanks for the tip.
Re: Problem with $PHP_SELF?
am 30.03.2007 21:56:34 von zac.carey
Jerry Stuckle wrote:
> strawberry wrote:
> > On Mar 30, 3:12 am, Jerry Stuckle wrote:
> >> strawberry wrote:
> >>> On Mar 29, 6:44 pm, "strawberry" wrote:
> >>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
> >>>>> strawberry wrote:
> >>>>>> I recently moved a mysql database and its associated php scripts from
> >>>>>> one machine to another.
> >>>>>> Now, however, although no errors are displayed, some aspects of the
> >>>>>> php interface no longer work properly.
> >>>>>> I suspect the problem is connected with my use of $PHP_SELF within
> >>>>>> some of the pages.
> >>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
> >>>>>> more widely supported but the problem still persists. Is there some
> >>>>>> aspect of my php configuration that I should look at with respect to
> >>>>>> this kind of problem?
> >>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
> >>>>> have full functionality in $_SERVER[].
> >>>>> As you don't tell anything about the web server, we can't be sure on what goes
> >>>>> wrong.
> >>>>> --
> >>>>> //Aho
> >>>> It's just a recent xampp installation on a windows xp machine - so an
> >>>> apache web server.- Hide quoted text -
> >>>> - Show quoted text -
> >> (it's nice to see a question of yours I can answer - I've learned a lot
> >> from you :-) ).
> >>
> >> $PHP_SELF only works if you have register_globals enabled in your
> >> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
> >> instead.
> >>
> >> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
> >> suspect your old server had register_globals enabled but your new one
> >> doesn't.
> >>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
> >
> > Likewise Jerry :-)
> >
> > OK, I've updated all the relevant scripts (I think), replacing
> > $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> > So, then I did a bad thing. I switched on register_globals. Now it
> > works, but obviously we're shortly going to become the plaything of
> > every mundane-data-obsessed evil geek on the planet.
> >
> > Any more thoughts?
> >
> > Thanks
> >
>
> Yes, I agree with Paul. Someplace you missed one or more entries. Do
> you have an editor which can do a multiple file search? I've found it's
> almost imperative when working on sites.
>
> The other thing is - $PHP_SELF probably isn't the only variable coded
> this way. $_POST, $_GET, $_SESSION and $_COOKIE variables could also be
> a potential problem.
>
> It's not easy to find all the places register_globals affects. But you
> really should get them all out. I've found really the only sure-fire
> way to do this is to go through the code line by line. It's time
> consuming, but it works better than trying to troubleshoot all the
> errors they can cause. The good news is you *can* do this after you go
> live, then when you get them all fixed you can turn off register_globals.
>
> But I think it's better to do it before you go live.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Doh! Of course - that's it! There's a $_POST request too. I didn't
appreciate that it was subject to the same limitation. I can't check
it now until Monday, but I bet that's it!
Thanks for the tip.
Re: Problem with $PHP_SELF?
am 30.03.2007 22:46:09 von Jerry Stuckle
strawberry wrote:
> On Mar 30, 3:12 am, Jerry Stuckle wrote:
>> strawberry wrote:
>>> On Mar 29, 6:44 pm, "strawberry" wrote:
>>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>>>> strawberry wrote:
>>>>>> I recently moved a mysql database and its associated php scripts from
>>>>>> one machine to another.
>>>>>> Now, however, although no errors are displayed, some aspects of the
>>>>>> php interface no longer work properly.
>>>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>>>> some of the pages.
>>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>>>> more widely supported but the problem still persists. Is there some
>>>>>> aspect of my php configuration that I should look at with respect to
>>>>>> this kind of problem?
>>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>>>> have full functionality in $_SERVER[].
>>>>> As you don't tell anything about the web server, we can't be sure on what goes
>>>>> wrong.
>>>>> --
>>>>> //Aho
>>>> It's just a recent xampp installation on a windows xp machine - so an
>>>> apache web server.- Hide quoted text -
>>>> - Show quoted text -
>> (it's nice to see a question of yours I can answer - I've learned a lot
>> from you :-) ).
>>
>> $PHP_SELF only works if you have register_globals enabled in your
>> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
>> instead.
>>
>> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
>> suspect your old server had register_globals enabled but your new one
>> doesn't.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Likewise Jerry :-)
>
> OK, I've updated all the relevant scripts (I think), replacing
> $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> So, then I did a bad thing. I switched on register_globals. Now it
> works, but obviously we're shortly going to become the plaything of
> every mundane-data-obsessed evil geek on the planet.
>
> Any more thoughts?
>
> Thanks
>
Yes, I agree with Paul. Someplace you missed one or more entries. Do
you have an editor which can do a multiple file search? I've found it's
almost imperative when working on sites.
The other thing is - $PHP_SELF probably isn't the only variable coded
this way. $_POST, $_GET, $_SESSION and $_COOKIE variables could also be
a potential problem.
It's not easy to find all the places register_globals affects. But you
really should get them all out. I've found really the only sure-fire
way to do this is to go through the code line by line. It's time
consuming, but it works better than trying to troubleshoot all the
errors they can cause. The good news is you *can* do this after you go
live, then when you get them all fixed you can turn off register_globals.
But I think it's better to do it before you go live.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Problem with $PHP_SELF?
am 30.03.2007 22:46:09 von Jerry Stuckle
strawberry wrote:
> On Mar 30, 3:12 am, Jerry Stuckle wrote:
>> strawberry wrote:
>>> On Mar 29, 6:44 pm, "strawberry" wrote:
>>>> On Mar 29, 5:01 pm, "J.O. Aho" wrote:
>>>>> strawberry wrote:
>>>>>> I recently moved a mysql database and its associated php scripts from
>>>>>> one machine to another.
>>>>>> Now, however, although no errors are displayed, some aspects of the
>>>>>> php interface no longer work properly.
>>>>>> I suspect the problem is connected with my use of $PHP_SELF within
>>>>>> some of the pages.
>>>>>> I replaced "$PHP_SELF" with "$_SERVER['PHP_SELF']" which (I think) is
>>>>>> more widely supported but the problem still persists. Is there some
>>>>>> aspect of my php configuration that I should look at with respect to
>>>>>> this kind of problem?
>>>>> If you are using CGI, then $_SERVER[] won't work, if you use ISS you may note
>>>>> have full functionality in $_SERVER[].
>>>>> As you don't tell anything about the web server, we can't be sure on what goes
>>>>> wrong.
>>>>> --
>>>>> //Aho
>>>> It's just a recent xampp installation on a windows xp machine - so an
>>>> apache web server.- Hide quoted text -
>>>> - Show quoted text -
>> (it's nice to see a question of yours I can answer - I've learned a lot
>> from you :-) ).
>>
>> $PHP_SELF only works if you have register_globals enabled in your
>> php.ini (a VERY BAD idea). You should be using $_SERVER['PHP_SELF']
>> instead.
>>
>> From your later posting it seems $_SERVER['PHP_SELF'] is working. So I
>> suspect your old server had register_globals enabled but your new one
>> doesn't.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Likewise Jerry :-)
>
> OK, I've updated all the relevant scripts (I think), replacing
> $PHP_SELF with $_SERVER['PHP_SELF'] - but it still didn't work :-(
> So, then I did a bad thing. I switched on register_globals. Now it
> works, but obviously we're shortly going to become the plaything of
> every mundane-data-obsessed evil geek on the planet.
>
> Any more thoughts?
>
> Thanks
>
Yes, I agree with Paul. Someplace you missed one or more entries. Do
you have an editor which can do a multiple file search? I've found it's
almost imperative when working on sites.
The other thing is - $PHP_SELF probably isn't the only variable coded
this way. $_POST, $_GET, $_SESSION and $_COOKIE variables could also be
a potential problem.
It's not easy to find all the places register_globals affects. But you
really should get them all out. I've found really the only sure-fire
way to do this is to go through the code line by line. It's time
consuming, but it works better than trying to troubleshoot all the
errors they can cause. The good news is you *can* do this after you go
live, then when you get them all fixed you can turn off register_globals.
But I think it's better to do it before you go live.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================