Re: [PHP] How to send mail with authentification?
On 11/4/02 6:54 AM, Martin Thoma [EMAIL PROTECTED] tapped the keys: Hello! Our SMTP-Server has changed to authentification. Now we cannot send mails anymore using mail(). How can I set the password in mail? The built in mail command cannot handle authentication. There is a class on phpclasses, though, that can. I forget which one it is, but you can start your search here: http://phpclasses.php-start.de/browse.html/class/2.html Looks like you have a little re-coding ahead of you. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Distance Script Available?
On 10/4/02 8:21 AM, RoyW [EMAIL PROTECTED] tapped the keys: There has to be somewhere you can pick up a script or function that will calculate distance? If you can search by US Zip Code or lat/long, search the archives of this list for 'proximity'. You'll find this comes up quite often. Also, I believe PHP Classes (http://www.phpclasses.org/mirrors.html?page=%2Findex.html) has some scripts that do this (based on zip). -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newman and his session management.
On 7/24/02 1:33 AM, Philip J. Newman [EMAIL PROTECTED] wrote: I have started a session on the server, and now would like to add a user name and password, and some other information to the session to carry it across all the other pages that are in this session. Any hints on where to start? $_SESSION['username'] = philipn; $_SESSION['password'] = $password; Etc. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GOTO command. Doest it exist?
On 6/11/02 4:06 PM, Chris Hewitt [EMAIL PROTECTED] wrote: Carlos, A search of the on-line manual does not find it (http://www.php.net/manual) but even if it has, I would advise you not to use it. Its a throwback to the 1970s before structured programming. Sometimes, it's appropriate. You can't tell me that if I'm programming in assembly that I should never issue a BRanch command (basically GOTO). Now, you shouldn't sprinkle it about too liberally, either. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.0.6 file upload problems?
On 6/7/02 11:43 AM, Bogdan Stancescu [EMAIL PROTECTED] wrote: One of the users of OPT has major problems uploading files to the system and I have absolutely no clue why that is. His PHP version is 4.0.6 on Linux. Quoting his description of the problem: In fact, now it doesn't even report an error. It just takes some time (about 30 seconds) trying to upload, I guess. The progress bar in the bottom of MSIE 6.0 shows it doing something, but then it 'finishes', while still showing the page with the 'Add a new document' form. I know, your first thought is that OPT has a problem - but here's another report from the same user when I directed him to alter some stuff in a MySQL database: By pasting it into the 'query' window in phpMyAdmin, but I was surprised by the result. Instead of an error or successful result from phpMyAdmin, I got a browser error from MSIE: 'This page cannot be displayed' I have absolutely no idea why this happens - when he sent the first report, I started thinking it may have been some php.ini setting regarding uploads, but I was completely confused by the second report. Did anyone encounter this? Is it a PHP bug? Is it a setting? Well, you could post the code you're tryingbut as I found out recently while learning this, if a file is bigger than max file size, $_FILES['name'] will have 'none' and $_FILES['size'] will be 0. (I thinks that's $HTTP_POST_FILES under 4.0.6). Check thatOtherwise, we need more info about what 'is not working'. (Not sure what query you're checking in phpMyAdmin...) -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File Upload
On 5/29/02 10:39 PM, Gerard Samuel [EMAIL PROTECTED] pressed the keys forming the message: A guess, but is the tmp dir set in php.ini?? Yeah - sorry, I should have said that in the first place. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File Upload
On 5/30/02 8:13 AM, Ford, Mike [LSS] [EMAIL PROTECTED] pressed the keys forming the message: -Original Message- From: Edward Marczak [mailto:[EMAIL PROTECTED]] Sent: 30 May 2002 03:27 OK - I've read the manual, looked at sample codeand I sadly am missing something. I'm doing (basically) this in my form: form action=someform.php ENCTYPE=multipart/form-data method=post name=replysub id=replysub input type=hidden name=MAX_FILE_SIZE value=10 input type=file name=subfile id=subfile size=50 On the page it's submitted to, just to check the data, I did this: $lineNo = 1; echo Dumping file info...br--br; reset($_FILES); while (list ($key, $val) = each($_FILES['subfile'])) { echo $lineNo $key = $valbr; $lineNo++; } and I get this: Dumping file info... -- 1 name = somefile.exe 2 type = application/x-msdownload 3 tmp_name = none 4 size = 0 Where do I start looking to figure out why tmp_name and size don't get set? Why doesn't this file get uploaded? tmp_name and size *are* set -- none is PHP's way of saying it didn't actually upload anything, and 0 is the correct size for a file that wasn't uploaded anyway! At a guess, you've exceeded one of the size limits -- check the settings of the php.ini parameters upload_max_file_size and post_max_size (which should be larger than upload_max_filesize). And, just for good measure, check that file_uploads is turned On! Hmm. Sure, file_uploads is onand I just tested with a really small file...andyup. Looks like I'm going over some limit. Crap, I thought I had that nailed down. Thanks - back to the manual for me. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File Upload
OK - I've read the manual, looked at sample codeand I sadly am missing something. I'm doing (basically) this in my form: form action=someform.php ENCTYPE=multipart/form-data method=post name=replysub id=replysub input type=hidden name=MAX_FILE_SIZE value=10 input type=file name=subfile id=subfile size=50 On the page it's submitted to, just to check the data, I did this: $lineNo = 1; echo Dumping file info...br--br; reset($_FILES); while (list ($key, $val) = each($_FILES['subfile'])) { echo $lineNo $key = $valbr; $lineNo++; } and I get this: Dumping file info... -- 1 name = somefile.exe 2 type = application/x-msdownload 3 tmp_name = none 4 size = 0 Where do I start looking to figure out why tmp_name and size don't get set? Why doesn't this file get uploaded? Thanks! -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Sessions under Win98/Apache
On 5/16/02 5:17 AM, Neil Freeman [EMAIL PROTECTED] wrote: FYI... I'm using sessions successfully using PHP v4.1.0 on Windows NT. Hurmph. Well, the upgrade to 4.2.x did it for me under 98. I just need to check the rest of my code, though. For now, seems pretty harmless. Thanks, though. -- Ed Marczak [EMAIL PROTECTED] P.S. Are you also using Apache? Or IIS? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using Sessions under Win98/Apache
I've been developing a PHP driven site that will ultimately run under Solaris and Linux - no problems there. But I set up a small development/test environment on my laptop running Win98. Downloaded the PHP binary (v 4.1.2) along with Apache (v 1.3.24) and MySQL. Everything works greatalmost. Sessions aren't working for some reason. Yes, they're enabled in my php.ini file (and running a php_info() confirms that session support is enabled). The odd thing is, is that it will create the 'sess_038d7' file. Just no data goes into it. Yes, I'm running the exact same code against it that I'm running against the Solaris and Linux PHP. Is there something different about the Windows version that I don't know that is causing my sessions to not work? Thanks! -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] security checks with sessions...
On 5/15/02 12:38 PM, Jas [EMAIL PROTECTED] pressed the keys forming the message: I am wondering if someone can help me understand a good way to use sessions to check to see if a user has entered a user name and password before allowing them to view the rest of the page. I need to have this check on each page, just not sure how I can pass the sessions to each page, as of yet I can get the variables I have registered to pass from the login form to the login check, and from there it seems to drop the session variable I registered. Any pointers would be great! Thanks in advance, You need to use session_start(); on each page (in fact, it has to be the very first thing). That'll tell PHP to either look for an existing session, or to start a new one. To store variables for later use by the session, use $_SESSION[varname]; Now, when you say, I can get the variables I have registered to pass from the login form to the login check, and from there it seems to drop the session variable I registered, without looking at your code, it's tough to tell what's going on. I'm having a problem with Windows right now that is causing that same problem. Other problems would be: - Not using session_start() - Not storing the variables correctly for later retrieval (e.g. Using $_SESSION). - Not passing the session ID, either yourself or letting PHP do it. Check the manual for the section on sessions. It explains a lot. -- Ed Marczak [EMAIL PROTECTED] P.S. Some of this assumes PHP v 4.10 or greater. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Sessions under Win98/Apache
On 5/15/02 2:21 PM, 1LT John W. Holmes [EMAIL PROTECTED] pressed the keys forming the message: You probably want to get 4.2, or 4.2.1 if it's out. Didn't think those were considered production quality just yet. How are you registering variables for the session? Is register_globals on or off in your php.ini. Off If it's off, you register a variables just by using $_SESSION[var] = value; instead of using session_register(var); $var = value; Yeah, I'm using $_SESSION[blah] If register globals is on, then use the second method with session_register(). This is all after you call session_start, of course. Of course. Again, this is all code that works perfectly against a setup I have on Solaris and Linux. And again, I'm using a file handler for sessions, and the 'sess_037df7670' file gets created. Just that nothing ends up in it - which is a problem when PHP goes to retrieve a session. Thanks for the response. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Sessions under Win98/Apache
On 5/15/02 3:47 PM, 1LT John W. Holmes [EMAIL PROTECTED] pressed the keys forming the message: I'm not sure what it could be then. If you try a simple test script, doing nothing but starting a session and setting a value, does it work? No. If that still doesn't work, then definitely upgrade to 4.2.1. The reality is, why should I? I want to match my production environment as closely as possible. Is this working for other people or not (under Win98/WinApache)? Are you saying that sessions never worked under this configuration until v 4.2.1? Load this script up: ? session_start(); if(isset($_SESSION[var])) { echo variable is already set; } else { $_SESSION[var] = one; } echo pClick a href= . $_SERVER[SCRIPT_NAME] . here/a; ? It remembers the variable for the duration of the script. Once the page is reloaded, since the session is never written, I get nothing. I appreciate your help on this. However, my frustration is that it's not my code, it's something with the system setup - which seems right! -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Sessions under Win98/Apache
On 5/15/02 4:30 PM, SHEETS,JASON (Non-HP-Boise,ex1) [EMAIL PROTECTED] pressed the keys forming the message: Sessions under windows were broken for 4.1.x They were fixed in 4.2.x so you should upgrade. Great - a definitive answer. Thank you. I'll just have to make note of the differences between 4.2.x and older versions. Thanks everyone who sent over tips and suggestions. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web Hosts and PHP 4.10 +
I know the subject of web hosts that support PHP comes up frequently - but here's a twist: After going through the archives, and checking out many, many hosts, I haven't found a web host that is up to PHP 4.10 or better. Most seem stuck at 4.04 or, at best, 4.06. Since 4.10 made some important changes/improvments, (and most of my code already takes advantage of this), I'd like to find a host supporting 4.10 and MySQL. I understand I could run a dedicated server, but I'm trying to save that as a last resort right now. Any recommendations? Thanks. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.10 New Vars Question
On 12/26/01 1:39 AM, Philip Olson [EMAIL PROTECTED] wrote: hmm, now that i\'m trying to program with register_globals=off, what is the new $HTTP_SESSION_VARS? $HTTP_SESSION_VARS works, as will $_SESSION (after 4.1.0). These special PHP variables are described in the manual: [snip] I'll check that out. Thanks! -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 4.10 New Vars Question
Hello! Two items in the new 4.10 change-log caught my attention: *Introduced a new $_REQUEST array, which includes any GET, POST or COOKIE variables. Like the other new variables, this variable is also available regardless of the context. (Andi Zeev) *Introduced $_GET, $_POST, $_COOKIE, $_SERVER and $_ENV variables, which deprecate the old $HTTP_*_VARS arrays. In addition to be much shorter to type - these variables are also available regardless of the scope, and there's no need to import them using the 'global' statement. (Andi Zeev) However, I can't seem to find any documentation regarding these variables on the php.net site. Any pointers? Am I missing something obvious? Thanks! -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]