[PHP] php-general mailing list active?
Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks, David [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php-general mailing list active?
Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
[EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. getting his email addr is easy - but I doubt he is looking forward to your mail asking him to 'fix' the generals mailing list ... would just resubscribe. David Thanks, guys. Problem is I have resubscribed from this address 2 times, and I also tried to subscribe from my gmail account. From this address, I get no response whatsoever. I got a confirmation from my gmail account several hours ago, but have not gotten any list email. I know our admins here at the hospital do something funky with routing between the primary and secondary email servers. That was the problem the last time, and because of bounced emails, this address got placed on a 'bad address' list. I don't have a clue why my gmail account hasn't started to get traffic. But it's funny how we get accustomed to the exchange of ideas and cyber-contact with others. I guess I 'm having some withdrawal. ;-) David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookie Variables Maxing Out Using IE6
On Wed, August 16, 2006 9:00 am, [EMAIL PROTECTED] wrote: Does IE6 limit somehow/somewhere the number of cookie variables I can create and store? Richard Lynch responded: Yes. Read the Cookie spec. There's no need for any site to ever send more than ONE Cookie anyway. Just use session_start() and you can store all the stuff in $_SESSION and it's all tied to the one Cookie. Users like me who set the browser to prompt for Cookies will often LEAVE a site that is being stupid and sending too many cookies, unless we really really really need your content, which is unlikely. So you're calling my app stupid, Richard?? lol To clarify, the app is for a small group of known users on an intranet, and yes, they really really need the content. There are 24 check boxes, and each selection triggers a graphical display of radiation levels in a specific area over the last hour. Since the active areas - 12 to 15 usually - don't change all that much over time, I thought it would make sense to have the app remember which boxes had been checked at last launch. I didn't like the idea of using cookies, so I actually have a database solution in place. But I've not dealt much with cookies, and I had some time and tried to use them to solve the problem. That's when I ran into the 20 cookie limit with IE (Having just read the spec, I'm surprised that Microsoft has actually followed it). Unless there's something basic about $_SESSION variables I've missed, I don't believe they would work here. I need to track and remember which boxes are checked between sessions, not within a single session. Someone please correct me if I'm mistaken. Thanks again to Adam Zey for suggesting I serialize the cookie data. That solved the problem. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookie Variables Maxing Out Using IE6
Does IE6 limit somehow/somewhere the number of cookie variables I can create and store? The following code snippet successfully creates 24 cookie variables when run in FireFox, but in IE6 it is limited to 20. I can provide the full code with HTML/Javascript if anyone wants to test for themselves. David ?php // populates a hidden form variable on the second submit $somevar = anything; if (!IsSet($_POST['monitors']) || empty($_POST['monitors'])) { $_POST['monitors'] = array(); } /*** Manage Monitor CheckBoxes via $_POST $_Cookie */ // code in here only runs the first time the page is displayed if ($_POST['trakVisit'] == ) { if (IsSet($_COOKIE['cookieMeter'])) { foreach ($_COOKIE['cookieMeter'] as $key = $value) { if ($value == 'CHECKED') { $checked[$key] = 'CHECKED'; } else $checked[$key] = ; } } } // runs on the second and subsequent submits elseif ($_POST['trakVisit'] == anything) { for ($i=1; $i = 24; $i++) { if (in_array($i, $_POST['monitors'])) { setcookie(cookieMeter[$i], 'CHECKED', time() +60*60*24*12, '/', .mydomain.com, 1); $checked[$i] = 'CHECKED'; } elseif(!in_array($i, $_POST['monitors'])) { $checked[$i] = ''; setcookie(cookieMeter[$i], 'CHECKED', time()-3600, '/', .mydomain.com, 1); } } } echo pre; print_r($_COOKIE); echo /pre; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Variables Maxing Out Using IE6
Does IE6 limit somehow/somewhere the number of cookie variables I can create and store? The following code snippet successfully creates 24 cookie variables when run in FireFox, but in IE6 it is limited to 20. I can provide the full code with HTML/Javascript if anyone wants to test for themselves. David ?php // populates a hidden form variable on the second submit $somevar = anything; if (!IsSet($_POST['monitors']) || empty($_POST['monitors'])) { $_POST['monitors'] = array(); } /*** Manage Monitor CheckBoxes via $_POST $_Cookie */ // code in here only runs the first time the page is displayed if ($_POST['trakVisit'] == ) { if (IsSet($_COOKIE['cookieMeter'])) { foreach ($_COOKIE['cookieMeter'] as $key = $value) { if ($value == 'CHECKED') { $checked[$key] = 'CHECKED'; } else $checked[$key] = ; } } } // runs on the second and subsequent submits elseif ($_POST['trakVisit'] == anything) { for ($i=1; $i = 24; $i++) { if (in_array($i, $_POST['monitors'])) { setcookie(cookieMeter[$i], 'CHECKED', time() +60*60*24*12, '/', .mydomain.com, 1); $checked[$i] = 'CHECKED'; } elseif(!in_array($i, $_POST['monitors'])) { $checked[$i] = ''; setcookie(cookieMeter[$i], 'CHECKED', time()-3600, '/', .mydomain.com, 1); } } } echo pre; print_r($_COOKIE); echo /pre; ? Adam Zey Asked: Why do you need more than one single cookie? If you want to store multiple pieces of information, serialize the data or something similar. Regards, Adam Zey. Got it. Serialize works just fine. Thank you, Adam. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookie Variables Maxing Out Using IE6
On Wed, August 16, 2006 9:00 am, [EMAIL PROTECTED] wrote: Does IE6 limit somehow/somewhere the number of cookie variables I can create and store? Richard Lynch wrote: Yes. Read the Cookie spec. There's no need for any site to ever send more than ONE Cookie anyway. Just use session_start() and you can store all the stuff in $_SESSION and it's all tied to the one Cookie. Users like me who set the browser to prompt for Cookies will often LEAVE a site that is being stupid and sending too many cookies, unless we really really really need your content, which is unlikely. You can Google and find the Cookie spec on Netscape's site -- It's very easy to digest, no pun intended, and a very well thought out spec. Thanks, Richard. I'll take a look. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamically assigning var namesi
Bob Pilly asked earlier today: Does anyone know if you can assign a new variable name based on the contents of another variable in PHP? If so whats the syntax to do this? $counter = 1; for ($i == 0; $i 6; $i++) { ${'newVar_' . $counter} = $counter; $counter++; } echo $newVar_1 . br /; echo $newVar_2 . br /; echo $newVar_3 . br /; echo $newVar_4 . br /; echo $newVar_5 . br /; echo $newVar_6 . br /; This displays: 1 2 3 4 5 6 Something like this maybe? David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with header in an if
/* send the errors to the interface and exit*/ if('' !== $errorsReported){ for($i = 0; $i count($errorsReported); $i++){ echo $errorsReported[$i]; } } else { /* reload the empty interface */ header(Location: adminTicketMgmtCreationForm.php); } Jay, Maybe try... if(!empty($errorsReported)) { instead of... if('' !== $errorsReported){ David
[PHP] header('www-Authenticate ...') Problem
I can't remember where the example below came from, but the event handler for the 're-authenticate' button doesn't allow a re-authentication following a successful login. If you run the code, it allows you to login the first time, or even catch the incorrect password and display via the line with the comments in the authenticate function after 3 failures. But after a successful login, trying to re-authenticate by hitting the button only redisplays the network login box without the password. And after 3 failures, Password = . $_SERVER['PHP_AUTH_PW'] displays just Password = so obviously $_SERVER['PHP_AUTH_PW'] is never getting a value the second time through. This IS NOT a mission critical problem, but it is bugging me. It perhaps is an Apache issue...? Testing environment is Win2k, Apache 1.3.31 with SSL ( though behavior is the same on Apache without SSL), and PHP 4.3.7. Comment very welcomed. Thanks much, David ?php ERROR_REPORTING(E_ALL ^ E_NOTICE); function authenticate() { header('WWW-Authenticate: Basic realm=Test Authentication System'); header('HTTP/1.0 401 Unauthorized'); /** ? **/ echo Password = . $_SERVER['PHP_AUTH_PW'] . BR; // used for debugging echo You must enter a valid login name and password to access this resource\n; exit; } $qualifiedUsers = array('user1, user2'); $qualifiedPasswords = array('password1, password2'); /** * reset event handler does not work as expected* **/ if(IsSet($_POST['authenticator']) $_POST['authenticator']) { unset($qualifiedUsers); unset($qualifiedPasswords); unset($_SERVER['PHP_AUTH_USER']); unset($_SERVER['PHP_AUTH_PW']); unset($_POST['authenticator']); } /***/ // no username if(!isset($_SERVER['PHP_AUTH_USER'])) { authenticate(); } //username but not on list elseif(isset($_SERVER['PHP_AUTH_USER']) !in_array($_SERVER['PHP_AUTH_USER'], $qualifiedUsers)) { authenticate(); } //username ok, but no PW or not on list elseif(isset($_SERVER['PHP_AUTH_USER']) in_array($user = $_SERVER['PHP_AUTH_USER'], $qualifiedUsers) !isset($_SERVER['PHP_AUTH_PW']) || !in_array($_SERVER['PHP_AUTH_PW'], $qualifiedPasswords)) { authenticate(); } //username / PW ok elseif(isset($_SERVER['PHP_AUTH_USER']) in_array($user = $_SERVER['PHP_AUTH_USER'], $qualifiedUsers) isset($_SERVER['PHP_AUTH_PW']) in_array($pw = $_SERVER['PHP_AUTH_PW'], $qualifiedUsers)) { echo Welcome, {$_SERVER['PHP_AUTH_USER']}, using password {$_SERVER['PHP_AUTH_PW']}.; echo form action='$_PHP_SELF' METHOD='POST'\n; echo input type='hidden' name='SeenBefore' value='1'\n; echo input type='submit' name=authenticator value='Re Authenticate'\n; echo /form/p\n; } unset($_SERVER['PHP_AUTH_USER']); unset($_SERVER['PHP_AUTH_PW']); ?
Re: [PHP] List gone quiet?
Nothing on list over night? -- Lester Caine Nope, so I had to do real work this mourning (sic). David
Re: [PHP] Web Browser Timeout on Upload Script
I think there is a file size argument both in the html form tag and within php.ini (max_file_size...? or something like that). I would try to make both very large, just as a test. Anyway, I had a similar problem that was fixed by playing around with these settings. David Matt Cassarino [EMAIL PROTECTED] 02/23/2005 03:01 PM To: php-general@lists.php.net cc: Matt Cassarino [EMAIL PROTECTED] Subject: [PHP] Web Browser Timeout on Upload Script Hi, I am running a simple Upload script in PHP using a HTML Form with a File field. The user can browse their computer and upload a file. It works great, except for large files, where the browser will timeout. The timeout appears to happen after about 5 minutes. Any ideas on how to get around this? Ideal solution would be on the server side b/c I don't want to have my users set a browser option. Thanks a lot! Matt Cassarino Cell: (206) 484-4626 Web: www.mattcass.com Email: [EMAIL PROTECTED]
[PHP] Writing PNG Images to File from Command Line
Howdy, Because of some latency issues in the display of dynamically created PNG images, I've been trying to separate the image-creation process from the image-display process. Essentially, I'm trying to run a cron job that writes a PNG image to file every 5 seconds. The php file pulls data from a MySQL db and creates a color-coded map of a cancer treatment building. The presence of normal levels of Neutrons would lead to the creation of a green flag, above-normal levels yields a yellow flag, and high levels yields a red flag. Another page will simply use a SRC tag to display the image, and will refresh every 5-6 seconds to get the latest readings/image. The concept worked extremely well when the image was output to the browser, except for the fact that a latency caused the image in the browser to flicker when it refreshed. So I've attempted the above, but without success, in that I can't get the cron job to actually make the image file. I know that the file is being processed because I can echo out a few words to the screen. And I know that the php file can create an image file because it does so when I add the file_name attribute to the imagecreate() function. I've checked permissions on folders, etc, and have tried both the CLI and SAPI versions of php, with and without available command line flags, but no luck. And it's not the db query portion of the process because I've commented out that portion of the code. Pretty much stumped and very open to thoughts/comments. The Set Up: RH 9.0 Apache 2.0.48 PHP 4.3.4 Mozilla 1.5 (MySQL 4.0.18) Thanks, David
Re: [PHP] Writing PNG Images to File from Command Line
Bret, Richard, Jason, Thank you all for your comments and suggestions. What I had been doing -- using GD to create the image with db data in one file, then calling this file from IMG SRC=make_the _picture_in_here.php in another page, seems to have been the culprit in regards to the latency issue. Of note is that this is an intranet app, traffic is not so heavy, and the netadmin has already said that he didn't think the network was the issue. However at a previous building, the app worked just fine, which was the only reason that I even pursued the approach I was taking. Also, Mozilla (Gecko...?) is almost perfectly stable as opposed to IE, which just doesn't cut it at all. I had concerns similar to Richard about reading and writing to the same file at the same time. So, for the time being, we are going to live with a 5 second delay in data availability, i.e., use html to display the latest image file at the top of the page, then jump into php and overwrite the file with new data at the bottom of the page, then wait 5 seconds for the page to refresh with the latest image. The idea of using pre-made, colored flags, handled within the code, sounds very reasonable, and if problems persist, I think this approach will be tried next. There are only 3 colors for flag states, red - yellow - green, and these cover 24 Neutron monitors, so not too time consuming to implement. But other data from the db get displayed also, so it still seems best to create one image with all the data for the entire page, assuredly large at about 1200 X 800 pixels. Is it possible to limit the bit-depth or reduce the file size of a PNG image ? I haven't found anything in the manual about this as yet. David
[PHP] test
test post. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php