php-windows Digest 27 Jan 2003 07:09:30 -0000 Issue 1557

Topics (messages 18106 through 18109):

Setcookie()
        18106 by: Duncan

Re: php-win2k error in apache as isapi module
        18107 by: Stephen Edmonds

can't wirte and read on/from a file - Apache.exe  access error
        18108 by: phplam

Re: Running PHP 4.3 under WIN 2000 IIS with MSSQL Server.
        18109 by: Christoph Grottolo

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]


----------------------------------------------------------------------
--- Begin Message ---
Hi All,

I'm looking for any sites that have working examples on how to use the
Setcookie() function.

 

Many thx in adv

 

--- End Message ---
--- Begin Message ---
Two things. Firstly, how are you running your source code?

Secondly, when do you get the error? When you try to run the script or when
you try to start Apache?


----- Original Message -----
From: "Vikas Pande" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 26, 2003 1:21 PM
Subject: [PHP-WIN] php-win2k error in apache as isapi module


> What is going wrong and where it is going wrong I dont
> know?
>
> I was trying my first script with sessions.
> Before testing the script, I did following change in
> php.ini in winnt\system32
> register_globals=Off
> The code I was trying was:
> -----
> <?php
>
> $os = "BSD";
>
> session_register($os);
>
> $name = "devon";
>
> $devon = "my name";
>
> session_register($name); //registers variable "devon"
> with value "my name"
> ?>
> -----
> Immediately I got the error the following error
> a
> Critical Error Button
> Message: The Instruction at "0x006c956c" referenced
> memory at "0x8b2b43b1:. The memory could not be
> "read". Click OK to terminate the program. Click
> Cancel to debug the problem.
>
> Please help me where have I gone wrong:
> either in modifying php.ini
> or choosing php as apache module
> or anything else in configuration.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Hello !
I'm in a mess. Please help me.
Every time I tried to write with fwrite or fputs in a file, I get an error
on windows nt sp6 , ie6 from "Doc. Watson" saying that Apache.exe makes an
application access error .
Filesystem functions: is_readable, is_writable,fopen,fclose are ok . I can
create, find,open the file.
versions: PHP 4.2.3, APACHE 1.3
httpd.conf :
   Alias /test/ "C:/Apache/htdocs/test/"

    <Directory "C:/Apache/htdocs/test">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
----------
example1:
// start buffering the output
ob_start();
$filename = "c:\\apache\\htdocs\\test\files\\mifile.txt";
// output format - either "www" or "file"
$output = "file";
// print some output
print "Welcome to the Matrix, Neo";
// now decide what to do with the buffered output
if ($output == "www")
{
 // either print the contents of the buffer...
 ob_end_flush();
}
else
{
 // ... or write it to a file
 $data = ob_get_contents();
 chmod ($filename, 0777);
 $fp = fopen ($filename, "wb+");
//ERROR IS HERE
 fwrite($fp, $data);
 fclose($fp);
 ob_end_clean();
}

example 2:
//I tried each of the following 5 $filename assignments.
//$filename = "c:\\apache\\htdocs\\mcm\\mifile.txt";
//$filename = "/mifile.txt";
//$filename = "mifile.txt";
//$filename = "c:\\tmp\\mifile.txt";
$filename = "c:\\apache\\htdocs\\test\files\\mifile.txt";
$somecontent = "Add this to the file\n";
$fp = fopen($filename,"wb");
//NOTHING IS DISPLAYED
echo "<br>this is fgets " .fgets ( $fp );
// Write $somecontent to our opened file.
//ERROR IS HERE
    if (!fwrite($fp, $somecontent)) {
        print "Cannot write to file ($filename)";
        exit;
    }
fclose($fp);



--- End Message ---
--- Begin Message ---
Hi

[EMAIL PROTECTED] (Lukasz Karapuda) wrote:

>Thanks for the thorough answer.
>However I am still uncertain what is the best method to run PHP under
>windows.
>In my case I am dealing with very high traffic sites (a college website and
>intranet).
>
>Do you think that the ISAPI for IIS would be the best solution?

You could give it a try... I think CGI still works for this kind of
size. It depends also on the type of your apps. A general answer is
not possible.

Christoph
--- End Message ---

Reply via email to