[PHP] Need some help too!
Good day to all. Just want to ask some help from you guys. I'h vaving problem with mail function. I'm currently making a PHP application that would be able to send mails to my co-employee. My webserver where my application reside runs on linux without a sendmail appliation. That is why the mail function fails to work. I don't want to install a sendmail program since our office already have a central mail server which runs on solaris. Is there a work around for my problem? Hope you could help me. Thank you very much. Ryan F. Bayhonan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Difference between cookie and session
We had a discussion this morning in our office on the differences between cookie and session. I just would like to ask the body if your could enlighten me more on this. And another thing, can cookie be a carrier of some virus across the internet? Thanks, Ryan
Re: [PHP] Problem...header already sent by
Hello again Peter, I describe my reply below. > I must run it as Apache module. Can someone tell me how do I change > the setting to run as an APACHE module instead? I'll be replying to this question in a Windows Operating System setting. You have 2 option in installing PHP as in Win OS, either to use the executable installer less than 1MB file size or to use the zip file almost 4MB file size (I recommend to use the zip file installer since its more complete interms of modules and othre dlls). Unzipped the zip file into any directory you want then just read and follow the instruction found on the install.txt file. The install.txt file also indicated how to install PHP as a module on Apache, a minor changes on the httpd.conf must be made. The install.txt file will tell you how. Until then Regards, Ryan F. Bayhonan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem...header already sent by
It will work as expected Peter. So where do we go from here?? Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem...header already sent by
Hello Peter. Good Day. Omitting does not solve the problem. I've experience this problem also before. I found out that the once causing the problem is when any data that has been sent to the client. I have listed some example below. Examples: All of these will cause a warning when header is called. 1. Since the tag will be interpreted by the client browser first before the tags, data has been sent to the client, telling the client that an html file is being rendered. So when the browser interprets the header function, a warning will be issued. 2. This will also cause an error. Remember that a call to an echo or print function will send data (the parameters of the function) to the client. So when the header is interpreted, a warning will be issued. Hope this is clear to you now. When a data has been sent already to the client, a call to a header will fail. The best thing you must do is to put the logic/check part on the first line of the file (See below). In the example below, I check first is the a user is valid by calling the the function verify_user( params... ) before any other html tags be rendered. So when the user is not valid it will redirect an error page, if it is valid, the Welcome to page will be printed. Welcome to the page. Hope this help you more. Until then... Ryan F. Bayhonan - Original Message - From: "Peter" <[EMAIL PROTECTED]> To: "Ryan F. Bayhonan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 2:14 PM Subject: Re: [PHP] Problem...header already sent by > Hi Ryan, > I tried and took the tags out and I still get the same > messaage. Why? > > Thanks, > Peter > > > > Hello Peter. > > > > I discribe my reply below: > > > > > ** > > > Warning: Cannot add header information - headers already sent by (output > > > started at C:\apache\htdocs\proj\sports\phps\verify.php:2) in > > > C:\apache\htdocs\proj\sports\phps\verify.php on line 26 > > > *** > > > > This warning message appear when the server already send data to the > client. > > > > > 1. > > > 2. > > > > > > > > > > > 23. if (!$auth) { > > > 24. header("www-Authenticate: Basic realm='Private'"); > > > 25. header("HTTP/1.0 401 Unauthrized"); > > > ... > > > ?> > > > > > > > In the above code, the tag has been sent to the client > browser > > already, thus when calling header function it would cause a warning > telling > > you that data has been rendered already. > > > > Hope this help. > > > > Ryan > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem...header already sent by
Hello Peter. I discribe my reply below: > ** > Warning: Cannot add header information - headers already sent by (output > started at C:\apache\htdocs\proj\sports\phps\verify.php:2) in > C:\apache\htdocs\proj\sports\phps\verify.php on line 26 > *** This warning message appear when the server already send data to the client. > 1. > 2. > > > 23. if (!$auth) { > 24. header("www-Authenticate: Basic realm='Private'"); > 25. header("HTTP/1.0 401 Unauthrized"); > ... > ?> > In the above code, the tag has been sent to the client browser already, thus when calling header function it would cause a warning telling you that data has been rendered already. Hope this help. Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can PHP read system installation?
What if the pc runs not on linux let say windows, how do i do it? Thanks. Ryan - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Ryan F. Bayhonan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 12:50 PM Subject: Re: [PHP] Can PHP read system installation? > Well, if you know the box is running Linux, you can get the kernel info by > doing this: > system("uname -a"); > > Tyler > > - Original Message - > From: "Ryan F. Bayhonan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 04, 2002 10:51 PM > Subject: [PHP] Can PHP read system installation? > > > > I just would like to know if PHP can sort of identify all the software > > installed in a given computer (e.g. OS ). > > > > If PHP can what particular function to use. > > > > Thanks. > > > > Regards, > > > > Ryan > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can PHP read system installation?
I just would like to know if PHP can sort of identify all the software installed in a given computer (e.g. OS ). If PHP can what particular function to use. Thanks. Regards, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php