SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: php.exe?

  1. #1
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is pretty strange. When I call something using $PHP_SELF, I don't get the normal page. Instead I get the page loaded into the php/php.exe format. For example, I am trying to use a session for a site I am woking on...the link I use to test it is supposed to "reload" the page. The URL that I have when loading this page is:

    http://localhost/trial.php3

    <A HREF="<?php echo $PHP_SELF; ?>">this very page</A>

    When I click that link, the URL that shows up in the address bar is this:

    http://localhost/php/php.exe/trial.php3

    What gives? I am using Apache 1.3 (at least) and PHP 4.0.0 for Windows. Anyone have any clues?

    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  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, since you are running php in cgi mode it makes the path to the page from the executable in this case php.exe. Put $PHP_SELF = $PATH_INFO; at the top off all the pages and your problem will be solved. Keep in mind if and when you move your site to a unix platform you can just comment out the above line.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man...that was easy enough...Freddy, if I remember right, PHP does not run as a module for WIndows Apache yet does it? It is only CGI?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Creole,

    It does however it is horribly unstable. It seems to crash all the time using the LoadedModule in Apache for Windows. You beeter off using CGI mode on windows
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The solution being to load the modules from the ini file. I assume we are only talking about a test machine? Even if we are talking about a live web server it makes more sense to have the modules loaded at start anyway (I know they take up memory but it's not as if a web server is running with only 32Mb - well I hope not).

    The only time I have had the Win32 Apache modules crash is when I have been using a copy of the latest CVS versions of PHP and the modules.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  6. #6
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP4 runs great as an ISAPI module using PWS and IIS. Maybe you could try using it that way.
    Wayne Luke
    ------------



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
  •