Results 1 to 10 of 10

Thread: [RESOLVED] PHP Setup question

  1. #1

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Resolved [RESOLVED] PHP Setup question

    I am setting up PHP on a 602Lan Suite Server. 602 says it works with PHP and here is their KB article on how to set it up [HowTo] Setup PHP and 602Lan Suite, which I have followed precisely.

    Although I haven't got it working yet, I think I am close, and I came across a strange behavior. I would like to determine if this is a 602 problem or maybe I haven't configured PHP correctlly.

    In my test PHP script, all I have is:
    PHP Code:
    <?
    phpinfo();
    ?>
    When I browse to the test script, this is what I see:
    System => Windows NT SERVER 5.1 build 2600 Build Date => May 4 2006 10:30:29 Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API => Command Line Interface Virtual Directory Support => enabled Configuration File (php.ini) Path => c:\php\php.ini PHP API => 20041225 PHP Extension => 20050922 Zend Extension => 220051025 Debug Build => no Thread Safety => enabled Zend Memory Manager => enabled IPv6 Support => enabled Registered PHP Streams => php, file, http, ftp, compress.zlib Registered Stream Socket Transports => tcp, udp Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.* This program makes use of the Zend Scripting Language Engine: Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend...
    This goes on and on for several pages, but this should give you enough of an idea that PHP is processing the phpinfo(); command but for some reason it's not formatting it for the page.

    What do you think? Any ideas would be very helpful.
    Changes are not permanent, but change is. {Neil Peart}

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP Setup question

    Hmm,

    Dump this in a new PHP file and test it.

    PHP Code:
    <?php echo 'Test?'?>
    Also, I know it's what 602 use on their instruction page, but don't use the <? short open tag. It's too easily confused with XML.

  3. #3

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Re: PHP Setup question

    I did just as you asked. I copied and pasted your code even, and I got nothing. I mean, nothing but white space. I clicked "View Source" and this is all I saw,

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
    <BODY></BODY></HTML>
    PHP has got to be running at some level right? The phpinfo() spit out a tons of arrays, and values.
    Changes are not permanent, but change is. {Neil Peart}

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP Setup question

    You saw that HTML code? Interesting... Are you using IE?

    But anyway, that's weird.

    Can you try this one for me.

    PHP Code:
    <?php
      header
    ('Content-type: text/plain');
      
    print_r($_SERVER);
    ?>
    You should see something like this page:
    http://dev.penagate.spiralmindsinc.com/php/test.php

    If you do, can you post it here?

  5. #5

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Re: PHP Setup question

    Yes, I am using IE to browse with.

    Ok, I pasted what you wrote in the last post and I got this output
    HTML Code:
    [argc] => 1 )
    When I clicked on your test.php link, it asked me to download it. Is that what you intended?
    Changes are not permanent, but change is. {Neil Peart}

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP Setup question

    No, it's not. And not what happened to me on IE 6 and Firefox either. I think something is wrong on your end. You should get a text listing of server variables.

    If what you posted is really all you got on your setup, something is very screwed, but I'm more inclined to blame IE. If you go to View Source does it show you anything more?

  7. #7

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Resolved Re: PHP Setup question

    Whoa! Hold the press. I fixed it! 602 says this in their KB article
    6.) Add the following settings:
    Mapped Application Name: PHP
    Extension: .php
    Path to EXE file: c:\php\php.exe
    Leave everything else blank and click ADD, then save your configuration.
    I changed the php.exe to php-cgi.exe and now it works! Damn I'm happy.
    Changes are not permanent, but change is. {Neil Peart}

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [RESOLVED] PHP Setup question

    Ah yes.

    php.exe was correct for PHP 4, I think. They were separated in version 5

    Glad to hear you fixed it.

  9. #9
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [RESOLVED] PHP Setup question

    In PHP 5, php.exe is the command line interpreter and php-cgi.exe is the PHP CGI application designed to run with a CGI compatible web server.

    The difference is, the PHP CLI doesn't output a content-type header and errors are not output in HTML by default. It allows you to write scripts which can be run from the command line similar to batch files.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  10. #10

    Thread Starter
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Re: [RESOLVED] PHP Setup question

    That's good to know VisualAd. I can see an application for the CLI already.
    Changes are not permanent, but change is. {Neil Peart}

Posting Permissions

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



Click Here to Expand Forum to Full Width