|
-
May 30th, 2006, 06:24 PM
#1
Thread Starter
Addicted Member
[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}
-
May 30th, 2006, 09:47 PM
#2
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.
-
May 30th, 2006, 11:10 PM
#3
Thread Starter
Addicted Member
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}
-
May 30th, 2006, 11:24 PM
#4
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?
-
May 30th, 2006, 11:50 PM
#5
Thread Starter
Addicted Member
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
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}
-
May 31st, 2006, 01:39 AM
#6
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?
-
May 31st, 2006, 11:11 PM
#7
Thread Starter
Addicted Member
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}
-
May 31st, 2006, 11:14 PM
#8
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.
-
Jun 1st, 2006, 03:07 AM
#9
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.
-
Jun 1st, 2006, 09:40 AM
#10
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|