php-windows Digest 6 Sep 2001 01:22:16 -0000 Issue 739

Topics (messages 9197 through 9205):

Re: Local Apache
        9197 by: Jonathan Wright (DjNA)

Re: php/apache $remote_addr variable help!
        9198 by: pasupathy

PHP4-Apache-WinNT config problems
        9199 by: Brad Harriger

304 Not Modified
        9200 by: Ouster

errorhandler problems with mssql
        9201 by: Bryan Kaufman

Re: Install issue
        9202 by: Kirk Mitchell

What's my problem with nl2br and a text file?
        9203 by: Asendorf, John

Re: PHP 406 on W2K+IIS, GD and freetype
        9204 by: Stephan Figge

Re: Has anyone else problemes using session under win98 running apache?
        9205 by: Gaylen Fraley

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


I think that if you send the option bind to 127.0.0.1 or localhost, that 
may work.

Failing that, using the VirtualHost options, if you create two, and set one 
as 127.0.0.1 and the other as _default_, then you can create two sites, one 
which you can view (localhost), and the other to say that you can't access 
this site or something.

<VirtualHost _default_>
     ServerAdmin [EMAIL PROTECTED]
     DocumentRoot /www/docs/default/
     ServerName my.domain.name
     ErrorLog logs/default-error_log
     CustomLog logs/default-access_log common
</VirtualHost>

<VirtualHost 127.0.0.1>
     ServerAdmin [EMAIL PROTECTED]
     DocumentRoot /www/docs/dummy-host.example.com
     ServerName localhost
     ErrorLog logs/127.0.0.1-error_log
     CustomLog logs/127.0.0.1-access_log common
</VirtualHost>



Hope that helps,

Jonathan Wright..

At 11:53 05.09.01 +0200, Sichta Daniel wrote:
>Hi,
>My PC is in network. I'm using Apache for developing sites but I don't want
>to other people in network access my Apache. What should I change in
>httpd.conf file ? Or is it possible to do it ?
>
>DAN
>

__________________________________________________
Jonathan Wright (DjNA)
[EMAIL PROTECTED]







Bryan Kaufman wrote:

> Try
> <?php echo HTTP_SERVER_VARS['REMOTE_ADDR']; ?>

this gives the same result i.e 127.0.0.1

> 
> also try
> <?php echo phpinfo(); ?>
> 
> It will tell you all the vars available, and you can
> see if register_globals is turned off (which is why
> you need to use HTTP_SERVER_VARS[])

yes the register globals is 'on' for both local and master value

now what do i do




Hello all,

    I'm trying to set up PHP4 and Apache on a WinNT box.  When I try to
run the php scripts from a browser, I get a 500 error with the following
text

[Tue Sep 04 11:46:30 2001] [error] [client 127.0.0.1] Premature end of
script
headers: c:/php/php.exe

Any ideas how i can resolve this issue?

Thanks,

Brad





I'm making a sort of cache system. I fell to this problem: I leave a cookie
with the timestamp of the last access, and when the user reconnect, I
compare the timestamp of the last change with the timestamp sent me with the
cookie. Then I leave a new cookie.

So:
if($last_modified <= $last_access)
    {
    header("304 Not Modified);
    exit;
    }
else
    {
    /* code genertating the new page */
    }

Whether the If is TRUE, I get a blank page, else I see a new page (correct
behaviour).
Why I always get a blank page and not the cached page?
This always happen with PWS and IIS, and sometimes with Apache.
Thanks.





I am having a problem with my custom errorhandler
"ignoring" the exit (or die) inside the handler.

I have experienced it with several mssql_* functions.
php 4.0.6 and php 4.0.7 running in cgi mode on iis 5

Try the code below:
using an invalid servername, it behaves properly
(returns an error).  But if you have a valid
servername, and invalid username/password the script
never finishes.  The browser will time out. 

This also happens if you have a valid
servername/username/password, but invalid db name.

Or of you can connect, but pass an invalid query. (not
in this code snippet)  Can anyone else reproduce this
problem?  Am I doing something wrong?  It makes using
a custom error handler useless...

<?php

$old_error_handler = set_error_handler("myEH");

$db_hostname = "servername";
$db_username = "username";
$db_password = "password";
$db_dbname = "dbname";

MSSQL_CONNECT($db_hostname,$db_username,$db_password)
;
mssql_select_db($db_dbname);

echo "Logged in OK!";

function myEH($errno, $errstr, $errfile, $errline,
$context) {

    if ($errno<8) {
        echo 'Sorry, there was an error.';
        exit();
    }
}

?>

Thanks for any insight!
Bryan

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




At 09:25 AM 9/5/01 +0100, Phil Driscoll wrote:
>>
>> Fatal error: Call to undefined function: pg_connect() in
>> F:\inetpub\etgcompanies\fibercom\doc\global.php on line 2
>>
>> The file noted contains:
>>
>> <?
>> $conn=pg_Connect("","","","", "joel");
>> ?>
>>
>> Any ideas?
>
>You probably haven't enabled the postgress extension dll in your php.ini
(and 
>you may also not have installed the extension).

Color me stupid, but which one would that be? Looking at them,
php_pgsql.dll looks likely, but SQL isn't on the server. Do I need to have
it on there?

Thanks,

-- 
Kirk Mitchell-General Manager    [EMAIL PROTECTED]
Keystone Connect                 Unlock Your World
Altoona, PA  814-941-5000   http://www.keyconn.net





Why am I having such a hard time with this code?


$doc = "doc.txt";
$text = nl2br ( readfile ("D:\\foob\\bar\\foo\\$doc" ) );
echo $text;

OR

$doc = "doc.txt
$text = readfile ( "D:\\foob\\bar\\foo\\$doc" );
$text = nl2br ( $text );
echo $text;


NEITHER of these give me any breaks...  I'm at my wits end here.  This seems
like a no brainer... I get the text file without any problem, but there are
no breaks in what is echoed.  Anyone?

PHP 4.0.7-dev from php4win

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aliquando et insanire iucundum est





Hi,

in PHP 4.06 the file path to the ttfs is compiled into the binaries and the
ttf functions aren't capable of taking full path names (afaik they will fix
the problem in 4.07). To figure out wich directory php is using try filemon
from www.sysinternals.com to locate it (should be something like
c:/usr/share/fonts/truetype/). Create the directory and put the fonts into
it or wait for 4.07

bye

Stephan







Try this.  It works under my w98se:


doc1.php:

<?
session_start();
session_register("valid_user");
$valid_user = "Hello World";
echo "<a href=\"doc2.php\">Click to see if Doc2 knows who valid_user is</a>"
?>

doc2.php:
<?
session_start();
echo "valid_user is $valid_user"
?>


--
Gaylen

"Mindfield" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I just cant get my sessions to remember my variabels, any ideas.
>
>




Reply via email to