Re: Confused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-09-02 at 13:31 -0400, Dan Shirah wrote:
> All,
> 
> Okay, I am a bit confused.   I'm setting up another server to host PHP
> pages.  I followed everything in the Manual for installing PHP.  I'm running
> Windows Server 2003, IIS6.0 and PHP 5.2.6.
> 
> And...it kind of works...
> 
> If I do: <?php echo "Test"; ?> it prints fine.
> If I do: Today is: <?php echo date("l, F j, Y"); ?> it prints fine.
> 
> If I do: You are recognized as: <?php echo substr($_SERVER['AUTH_USER'],
> 13); ?> I get no output.

Add the following:

<?php

echo '<pre>'."\n"
print_r( $_SERVER );
echo '</pre>'."\n";

?>

See if the AUTH_USER entry is in there.

> If I do:
>      if (!$connect_id = ifx_connect("$database@$host", $user, $pass)) { //
> THE ACTUAL CONNECTION
>      echo "Unable to connect to Informix Database\n"; // DISPLAY IF
> CONNECTION FAILS
>      exit();
>   }
> 
> I don't get a connection to the database and the "Unable to connect to
> Informix Database\n"; does not even display.

Shouldn't that be:

if( !($connect_id = ifx_connect("$database@$host", $user, $pass)) )

I think PHP may support the style you've used, but I sure as heck
wouldn't use it.

How do you know you don't get a connection to the database? What is the
value of $connect_id? Use var_dump( $connect_id ) to find out.

> I get no errors output to the screen and I have display_errors = On
> And I have error_reporting = E_ALL & ~E_NOTICE

Maybe turn on notices as well. That will probably generate a notice for
the missing AUTH_USER index.

> 
> Any ideas?
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux