SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Toronto Canada
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Why does PHP_SELF contain php.exe?

    script calls itself in the script from a form submit, i.e: <form method="post" action="<?=$php_self?>">

    then when the script runs the second time, the url changes to:http://localhost/php/php.exe/clients.php
    this results in some images not being displayed correctly.

    Can any one help me?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes its because you are running PHP in CGI mode. So PHP_SELF starts att he php interpreter(php.exe)


    Either change to using it as a Module, the docs can help you with that, also search around these forums. For a quick fix.

    Put
    PHP Code:
    $PHP_SELF $PATH_INFO

    At the top of your scripts.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Toronto Canada
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Thank you for your help freddydoesphp
    Your a very helpful Cat

  4. #4
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Toronto Canada
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apache conf-httpd
    from:
    <Files ~ "\.(php3|cgi)$>
    HostnameLookups on
    </Files>
    to:
    <Files ~ "\.(php4)$>
    HostnameLookups on
    </Files>

    seems to work


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •