I need an experts advice

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
BareKnuckles
-


Joined: 01 Feb 2004
Posts: 6

PostPosted: Thu Mar 25, 2004 11:03 pm    Post subject: I need an experts advice Reply with quote

I am new to php and I could use some advice.

I'm running php 4.3.4 and abyss server on a win98 machine.
php is installed correctly as I have tested it using phpinfo().
I get this error when executing a certain script that I wrote...


Warning: fopen(undeliverable email.txt): failed to open stream: No such file or directory in C:\Program Files\Abyss Web Server\htdocs\php\sendmixed.php on line 6
Warning: fread(): supplied argument is not a valid stream resource in C:\Program Files\Abyss Web Server\htdocs\php\sendmixed.php on line 7

What needs to be done to fix this?

just so you know:
register_globals=on
safemode=off

thanks! :?
Back to top View user's profile Send private message
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Fri Mar 26, 2004 2:18 am    Post subject: Reply with quote

First of all, what is the script supposed to do? It looks like a formmail script to me. If it is a formmail, then I can almost bet you that you are trying to use "sendmail;" when in fact, Windows has no sendmail.

If this is the issue, tell me, and I can help you out with it.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Mar 26, 2004 2:04 pm    Post subject: Re: I need an experts advice Reply with quote

BareKnuckles,

The error means that there is a file creation/reading error. Can you give us the download URL of the script so that we can test it?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
j_browne
-


Joined: 26 Mar 2004
Posts: 13

PostPosted: Fri Mar 26, 2004 4:23 pm    Post subject: this works for me... Reply with quote

I used forward slash and the file is relative to htdocs (htdocs/texts/text1.txt).
I seem to remember also getting the problem when trying to open from C:\Program Files\... but can't think why I would want to do that now.

Try setting up the following test using a new file with a few lines in it, you need to set up the path/file as above:


<?php
//--- open the file:
$filename="texts/text1.txt";
if (!($f=fopen("$filename","r")))
exit("Unable to open file: $filename");
else
echo "<br>" . "File opened: $filename";
echo "<br>" . "Contents of file: $filename" . "<br>";
//--- display contents of file line-by-line:
while (!feof($f))
{
$x=fgetc($f);
echo $x;
}
fclose($f);
?>
Back to top View user's profile Send private message
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Sat Mar 27, 2004 1:34 am    Post subject: Reply with quote

But I would still like to know exactly what script you are using (and what is its purpose).
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group