php-windows Digest 14 Sep 2004 01:14:37 -0000 Issue 2394
Topics (messages 24561 through 24566):
Can't figure out how to surpress this error
24561 by: Ron.Herhuth.tatumpartners.com
24562 by: Ed Lazor
Re: PHP 5.0.1 Manual/Automatic Install
24563 by: Kevin Crookes
Re: NT username detectable?
24564 by: Gryffyn, Trevor
24565 by: Manuel Lemos
Survey on Open Source
24566 by: Mike Chan
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 ---
I have a page that has a form allowing users to upload a file. The
following page processes the information they entered checking all form
fields with "isset" before attempting to process any of the information.
The script works fine EXCEPT when the user does NOT upload a file...then
the page displays this error:
"PHP Notice: No file uploaded in Unknown on line 0 PHP Warning: Cannot
send session cache limiter - headers already sent in
E:\tatumpartners\tcms_admission\public_site_email_contact_process.php on
line 2 "
The problem is that everything still processes correctly in all
cases...but the error is still displayed and this looks bad from the
user's perspective.
This is the code that handles the file upload:
if(isset($_FILES['userfile']) && $_FILES['userfile']['name'] !="")
{
$file_url1 = $_FILES['userfile']['tmp_name'];
$file_name1 = $_FILES['userfile']['name'];
$file_type1 = $_FILES['userfile']['type'];
$fp1 = fopen($file_url1,"r");
$str1 = fread($fp1, filesize($file_url1));
$str1 = chunk_split(base64_encode($str1));
$message .= "--MIME_BOUNDARY\n";
$message .= "Content-Type: $file_type1 ; name=\"$file_name1\"\n";
$message .= "Content-disposition: attachment\n";
$message .= "Content-Transfer-Encoding: base64\n";
$message .= "\n";
$message .= "$str1\n";
$message .= "\n";
}
Is there anyway other than what I have done here to surpress the error
message from displaying?
Thanks,
Ron
--- End Message ---
--- Begin Message ---
Line 0 makes me wonder if you have a space or something before the opening
php tag, especially the part about headers already sent.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 13, 2004 6:09 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Can't figure out how to surpress this error
>
>
> I have a page that has a form allowing users to upload a file. The
> following page processes the information they entered checking all form
> fields with "isset" before attempting to process any of the information.
> The script works fine EXCEPT when the user does NOT upload a file...then
> the page displays this error:
>
> "PHP Notice: No file uploaded in Unknown on line 0 PHP Warning: Cannot
> send session cache limiter - headers already sent in
> E:\tatumpartners\tcms_admission\public_site_email_contact_process.php on
> line 2 "
>
> The problem is that everything still processes correctly in all
> cases...but the error is still displayed and this looks bad from the
> user's perspective.
>
>
> This is the code that handles the file upload:
>
> if(isset($_FILES['userfile']) && $_FILES['userfile']['name'] !="")
> {
> $file_url1 = $_FILES['userfile']['tmp_name'];
> $file_name1 = $_FILES['userfile']['name'];
> $file_type1 = $_FILES['userfile']['type'];
>
> $fp1 = fopen($file_url1,"r");
> $str1 = fread($fp1, filesize($file_url1));
> $str1 = chunk_split(base64_encode($str1));
> $message .= "--MIME_BOUNDARY\n";
> $message .= "Content-Type: $file_type1 ; name=\"$file_name1\"\n";
> $message .= "Content-disposition: attachment\n";
> $message .= "Content-Transfer-Encoding: base64\n";
> $message .= "\n";
> $message .= "$str1\n";
> $message .= "\n";
> }
>
>
>
> Is there anyway other than what I have done here to surpress the error
> message from displaying?
>
>
> Thanks,
> Ron
>
>
>
>
--- End Message ---
--- Begin Message ---
Hi there,
I finally managed to get it working. I haven't got a clue how it has started
working but it has. I uninstalled PHP, completely removed everything to do
with PHP5 from my server, removed IIS, re-installed IIS, downloaded the two
package files, and the installation file. Extracted the two package files
into PHP folder, and then ran the installer, bingo it works without a
problem.
How I have not got a clue!! But it does.
Kev
-----Original Message-----
From: Nadim Attari [mailto:[EMAIL PROTECTED]
Sent: 10 September 2004 07:59
To: Kevin Crookes
Subject: RE: [PHP-WIN] Re: PHP 5.0.1 Manual/Automatic Install
Importance: High
Hello Kevin,
I have IIS5 under win2000 at office and PHP5.0.0 is installed. It works
fine. No problem at all!
Note that I've installed .NET framework too and .NET is working alongside
PHP5 at office (under win2000, IIS5).
At home I have IIS6 (windows 2003 server) and PHP 4.3.8. Works fine. No
problem at all!
I don't know what your problem really is: Please give me more details /
error messages / etc. you are having so that we can solve the problem.
Well personally I always install PHP through the installer! Just
double-click and follow the instructions... installation completes and PHP
works perfectly right! I never got any problem before!
For now I'll suggest a few points:
1. uninstall everything (I mean PHP stuffs)
2. if not done already, download PHP installer + the binary package (some
DLLs will be needed to run other modules - e.g. mySQL, etc)
3. install through the installer.
4. first see whether the web server is running (run a simple html page).
Then try to run a simple PHP page ( for e.g. <?php phpinfo() ?> ). Note the
error(s)
If possible, please send me the error messages today itself before 15hrs00
(it's about 10:55 now) - I gonna leave office at 16hrs00 today and will be
back on Monday only!
Information to be useful for me:
- are you running http://localhost/ or what ?
- where have you install php ? In "c:\php\" ? where is php.ini found ?
- what are listed in the file c:\windows\system32\drivers\etc\hosts (file
name is "host") - if not present, should create one. I'll tell you what to
put in the file.
- Do your machine has an IP address (private or public) ? Under IIS console
when you list its properties, under the "Website" tab what do you have ?
- Any other information: e.g. when installing PHP thr' the installer, does
it ask you to modify php.ini (cgi-redirect or something like that)? gimme
the exact message on the window!
Please be quick ! Or wait until Monday...
Regards,
Nadim
p.s.: [EMAIL PROTECTED] is you wanna contact be thr' MSN ! I'll be online
until 16hrs00 today.
-----Message d'origine-----
De : Kevin Crookes [mailto:[EMAIL PROTECTED]
Envoye : jeudi 9 septembre 2004 22:48
A : 'Nadim Attari'
Objet : RE: [PHP-WIN] Re: PHP 5.0.1 Manual/Automatic Install
Yeo had a look at those sites, and I am still getting the same problem.
Although the wampserver looked interesting but I really need this to be
running under IIS6. Any other ideas?
-----Original Message-----
From: Nadim Attari [mailto:[EMAIL PROTECTED]
Sent: 09 September 2004 09:33
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: PHP 5.0.1 Manual/Automatic Install
Dunno whether it gonna help... but a try costs nothing!
http://dedntfaq.hostingsupport.com/iis6_php_install.txt
http://www.en.wampserver.com/
Nadim Attari
--- End Message ---
--- Begin Message ---
Ok, I finally talked our IT guys into turning off the "Anonymous Access"
and I can get into the PHP scripts just fine and "LOGON_USER" is
populated just fine, but some of the other users in the company get a
popup login request when they hit my PHP pages.
If they log in with their usual domain login, password and domain name,
they can get in just fine.
The first thought is permissions. But now it's doing it to my login
which it didn't do at first. And I should have full permissions on that
folder and all.
Could it be that that machine MAY be on another domain? We apparently
have two domains here and I'm not sure which one it belongs to. Does
that make any sense to anyone?
Thanks in advance. Just wondering if anyone else had run into this
issue.
-TG
> -----Original Message-----
> From: Gryffyn, Trevor
> Sent: Friday, September 03, 2004 9:09 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] NT username detectable?
>
>
> Probably not the most reliable way (actually, I know it's not 100%
> reliable), but the way I use for quick and dirty, informal
> usage logging
> is this:
>
> $ipaddress = $_SERVER["REMOTE_ADDR"];
>
> $nbtstat = "nbtstat -A ". $ipaddress;
> exec ($nbtstat,$result);
> foreach ($result as $row) {
> if (strpos($row,"<03>")) $username = strtok($row," ");
> }
>
>
> This only works if you're on the same network and the users
> are logging
> into their box.
>
> It seems to fail when someone is logged into multiple
> machines at once,
> you end up getting the computer name or something. Probably does this
> under other circumstances as well. But there's some little
> 80% reliable
> way of doing it.
>
> If you find a better way, by all means let me know!
>
> -TG
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 3:49 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] NT username detectable?
> >
> >
> > In the html headers, the server sees the clients OS, user agent, IP
> > address etc. Is there a way on a local LAN a server might be
> > able to know
> > the username of the client that sends a request?
> >
> > I've checked all $_SERVER variables, PHP_AUTH_USER etc
> > require the auth
> > box to be displayed. I'm thinking it might be possible to
> > know which user
> > is logged in when the request is made, possibly by using
> COM or even
> > (gasp) .NET, without having to ask the user his username.
> >
> > Any ideas if this can be accomplished at all?
> >
> > Right now we have Firefox clients and Apache with PHP in an Active
> > Directory domain with NT4 compatibility, but we can move to
> IE6 with
> > IIS+PHP if that will work.
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello,
On 09/13/2004 05:07 PM, Trevor Gryffyn wrote:
Ok, I finally talked our IT guys into turning off the "Anonymous Access"
and I can get into the PHP scripts just fine and "LOGON_USER" is
populated just fine, but some of the other users in the company get a
popup login request when they hit my PHP pages.
That is basic authentication, not NTLM.
If they log in with their usual domain login, password and domain name,
they can get in just fine.
The first thought is permissions. But now it's doing it to my login
which it didn't do at first. And I should have full permissions on that
folder and all.
Could it be that that machine MAY be on another domain? We apparently
have two domains here and I'm not sure which one it belongs to. Does
that make any sense to anyone?
If NTLM authentication succeeds, users have autenticated in the domain
that they have logged in when they started their Windows logon session.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Dear all,
I am conducting a survey on open source software. This is for my academic
coursework and dissertation. It will be great to have your support and
participation in this survey.
This survey has two separate questionnaires, focusing on the following
areas:
1) OSS development (Developers or those who contribute in coding or
documentation), and
2) IT/IS costs (CIOs or IT Managers).
You are free to go for the questionnaire that is appropriate for you.
Below are the links:
1) Brief introduction page:
http://web.singnet.com.sg/~mikecck/opensource/Introduction1.htm
2) Questionnaire 1(Open Source Development):
http://web.singnet.com.sg/~mikecck/opensource/WebFormA1.htm
3) Questionnaire 2(Open Source and IT/IS Cost):
http://web.singnet.com.sg/~mikecck/opensource/WebFormB1.htm
Thank you for your time.
Mike Chan
Student
Curtin University of Technology
--- End Message ---