Re: [PHP] Re: Spam Bots/E-mail Addys
Hello, On 06/14/2002 01:08 AM, Justin French wrote: http://www.phpclasses.org/browse.html/statistics/statistics.html#user-browsers Interesting, but these stats only indicate what *browser* has been used... not if JS was enabled/disabled. case 1: user gets sick of pop-ups and crap, turns off JS on their browser (sure, it's in their control) case 2: paranoid sys admin disables JS on all browsers in a school / library / cafe / organisation (it's out of the user's control) case 3: JS is accidently turned off by someone who doesn't have a clue what it all means, or they've cranked their security setting through the roof. There are many more. In theory yes, but in practice I doubt that a significant number of users with Javascript enabled browser will really disable it for a long time because soon or later they find that many of the sites that they really want to access rely on Javascript to work right. Even the increasingly popular Flash based sites rely on Javascript to detect if the browser has the Flash plug-in installed. Anyway, if you believe that the number of users that turn-off Javascript is significant, where is the evidence of that? This is a site for geeks/hackers. In a normal site the Javascript less share is even smaller. I'd argue that sites frequented by geeks are more likely to have users with the latest browsers, faster computers, bigger monitors with higher res, etc... sure there may be a few geeks who like to stick it up the system and surf with something like Lynx (0.28% of your users). What I mean is that the share of users that understand how to turn off Javascript is certainly higher in a site for geeks. I did not say that all geeks are smart enough to know how to do it. On non-geek content sites, I would believe the results are different. We actually get quite a lot of NN3, IE3, IE4, NN4 surfers on a craft/hobby store site, adding up to around 9-10%. Once again, we're comparing browsers, not the availability of JS though. In theory, all of them came out of the box with JS, but I'm not going to lay any bets on how many still have it turned on (how many years since NN3). I would say that the long standing users are even more aware that they should not turn off Javascript because they are experienced enough to know that some sites of their preference do not work right without Javascript. I believe that users that disable Javascript just for a short period because soon or later they realize that it is their loss. Users that keep Javascript disable for a long time are not being smart, they are just being stubborn. Soon or later they realize that being stubborn is masochism. BTW, it is nothing related but watch how Mozilla/Netscape is discretely swalling back share from IE at a pace of more than 1% a week. I'd say that will increase a LOT more once AOL adopt NN7! I was with the impression that they already did. I understand your reasoning behind choosing a JS implementation, but I'm still not convinced at all. I think you are just being stubborn. :-) You decide what to do with your sites. I just use Javascript in non-crucial things. It is not like the site does not work without Javascript. I only started using Javascript to avoid e-mail harvesters when I got a complaint from a contributing author about spam got because his e-mail was exposed in the site pages. Contribution authors are golden users. They are what keeps the site audience grow without having me to pay for their contributions. There is only 1 author for each 250 new users that subscribe to the site. Even in the worst case that even if I loose all users with Javascript-less browsers because when they click on mailto: links they see -at- instead of and -dot- instead of . , which is an extremely unlikely situation, I think that protecting the e-mails of the contributing authors is much more important. And Miguel has raised an interesting point about useability... I feel this is going to be a huge issue in coming years... If you can be sued for not having wheelchair access in a hotel (a demand that all people can walk), then surely the hotel's website can also be sued for making demands about the user's method of surfing. SOCOG already copped this in Sydney 2002 didn't they??? Replacing characters of the e-mail to protect them from harvesting with characters that can be easily guess that they need to be replaced by Javascript-less users, does not make the site unusable. Insisting that it does makes your point becomes unreasonable. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Different colors on lines
Can anyone help out with this ?? Since i do the search after the query, there is an problem if line 1 in the Sql table matches, line 2 does not, but line 3 does. Then the result will display the same color on the two lines That would be printet in this example. How can i make sure that it will allways display the colors On each line ?? Regards Bård Tommy Nilsen $query_1 = mysql_query(select * from $tabell_4); $number_1 = mysql_numrows($query_1) ; $i_1 = 0; $bgcolor[0] = #FFE38E; $bgcolor[1] = #FF; $Search = Test; while ($i_1 $number_1) { $Name = mysql_result($query_1,$i_1,Name); if (eregi ($Search, $Name)) { Echo 'tr BGCOLOR='.$bgcolor[$i_1%2].''; } $i++; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Email validation
Hello, On 06/14/2002 03:06 AM, Miguel Cruz wrote: On Fri, 14 Jun 2002, Manuel Lemos wrote: The following classes use this validation regular expression string. It does not exclude some invalid addresses but includes all valid addresses. ^([-!#\$%'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$ It doesn't, as far as I can tell, allow this valid address: [EMAIL PROTECTED] I never heard of TLD with more than 4 characters. Is this recent? This classes that I mentioned with this regular expression are used by more than 10.000 users. If this was a problem already, I should have learned. So, I assume TLDs like this are recent. And what's with all the nonsense characters in the domain name portion? Only letters, numbers, hyphen, and period are allowed after the @ sign. I just followed the BNF of the RFC to figure which characters would eventually be valid. At least it does not exclude valid characters. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Different colors on lines
have a seperate counter $query = mysql_query(select * from $tabell_4); $number = mysql_numrows($query) ; $i = 0; $bgcolor[0] = #FFE38E; $bgcolor[1] = #FF; $Search = Test; $j = 0 while ($i $number) { $Name = mysql_result($query_1,$i,Name); if (eregi ($Search, $Name)) { Echo 'tr BGCOLOR='.$bgcolor[$j%2].''; $j++; } $i++; } -Original Message- From: Bård Tommy Nilsen [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 4:21 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Different colors on lines Can anyone help out with this ?? Since i do the search after the query, there is an problem if line 1 in the Sql table matches, line 2 does not, but line 3 does. Then the result will display the same color on the two lines That would be printet in this example. How can i make sure that it will allways display the colors On each line ?? Regards Bård Tommy Nilsen $query_1 = mysql_query(select * from $tabell_4); $number_1 = mysql_numrows($query_1) ; $i_1 = 0; $bgcolor[0] = #FFE38E; $bgcolor[1] = #FF; $Search = Test; while ($i_1 $number_1) { $Name = mysql_result($query_1,$i_1,Name); if (eregi ($Search, $Name)) { Echo 'tr BGCOLOR='.$bgcolor[$i_1%2].''; } $i++; } -- 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] Different colors on lines
Hello, Check out the following link. http://www.zend.com/codex.php?CID=322 There are various code examples for alternating table backgrounds. Hope this helps, Chris Bunting _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Advanced User Authentication
I like very much the idea of using a short way. Actually, I did and here's how: // After I queried the DB for a username password match: if (mysql_num_rows($result) 0) { $row = mysql_fetch_array($result); if ($row[authlevel] == '1') { $valid_user = $username; session_register(valid_admin); } else if ($row[authlevel] == '0') { $valid_user = $username; session_register(valid_user); } } but still doesn't work. I'm still getting the posted values back (when pointed to phpinfo.php) including the sessionID variable, but the Session doesn't show like registered. That is, when I called the following Script, nothing happens: [snip] if (session_is_registered(valid_admin)) { // do admin stuff } else if (session_is_registered(valid_user)) { // do users stuff } else { // prompt for login // this is still what's showing!!!??? } [snip] César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621 -Mensaje original- De: Miguel Cruz [mailto:[EMAIL PROTECTED]] Enviado el: Viernes, 14 de Junio de 2002 03:11 a.m. Para: César Aracena CC: PHP General List Asunto: Re: [PHP] Advanced User Authentication I think you're making it needlessly complicated. Why don't you just select * from * FROM auth WHERE authname = '$username' AND authpass = password('$password') and not worry about WHERE authlevel = 1? Then, if that query is successful, you can just fetch the result row and see what 'authlevel' is for that user, and act accordingly. miguel On Fri, 14 Jun 2002, César Aracena wrote: Im trying to make a somehow advanced user authentication system fro my own web site. What Im using as a model example, is the authentication system explained by Luke Welling Laura Thomson in their book PHP and MySQL Web Development. In the book, they explain how to make apparently a perfect user authentication system, but only for one level users. I would like to change that somehow in order to make my scripts recognize whether the user is an Administrator or a Common User, identified by a authlevel field in my DB (1 for Admin 2 for Users). Im making all my web sites, by using an include schema, so the user is authenticated only in the Header (included in all the pages). What I have so far is: ? // this is where the original script begin session_start(); if ($userid $password) { $db_conn = mysql_connect(localhost, user, password); mysql_select_db(dbname, $db_conn); $query = SELECT * FROM auth WHERE authname = '$username' AND authpass = password('$password') AND authlevel = 1; $result = mysql_query($query, $db_conn); if (mysql_num_rows($result) 0) { $valid_user = $userid; session_register(valid_admin); } // this is what I tried to add else if (mysql_num_rows($result) = 0) { $query1 = SELECT * FROM auth WHERE authname = '$username' AND authpass = password('$password') AND authlevel = 0; $result1 = mysql_query($query1, $db_conn); if (musql_num_rows($result1) 0) { $valid_user = $userid; session_register(valid_user); } } } ? It works great when used in its original state, but does no good to what Im trying to do here. Also, Im willing to learn from this so I dont want to rush and get it already done out there ;-) By the way, before you ask, I use MySQL and PHP 4 under a Apache emulator (PHPTriad) running under WinXP (and damn, it works good and smooth). Hope to get some knowledge from you guys and gals, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- 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] Re: Spam Bots/E-mail Addys
Hello, On 06/14/2002 01:25 AM, Analysis Solutions wrote: Javascript-less represent less then 0.5% of the users in the World. I'd be interested in seeing this data proven. I'm not being sarcastic -- I'm genuinely interested. http://www.phpclasses.org/browse.html/statistics/statistics.html#user-browsers Just because they have a browser that can handle JS doesn't mean they have it turned on. My target audience is the folks who are smart enough to keep JS turned off. And what is the percentage of users that intentionallu disable Javascript in their browsers? I keep JS off my sites because I want them to be universally accessible. This is a nice theory but in practice you can benefit a lot of Javascript without compromising the accessibility of your site. Considering there's very little Java'sCrap does that can't be done server side, there's very little reason to use it. I don't agree. Form validation can benefit a lot of Javascript. You should always do it on the server side, but if you also do it on the client side with Javascript you avoid the server round trip and the time and patience of the user that has to wait for the server to tell him that something is wrong in the form. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg-Maximum allowed size for uploaded files
On Friday 14 June 2002 14:10, Chris Bunting wrote: A quick search on google shows that yes, Php has a maximum upload filesize of 10MB. I don't where you got this information from, it's simply not true. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Quite frankly, I'd rather have a few people hate me deeply than apply stuff I don't like. - Linus Torvalds */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Spam Bots/E-mail Addys
On Fri, 14 Jun 2002, Analysis Solutions wrote: On Thu, Jun 13, 2002 at 10:36:56PM -0500, Miguel Cruz wrote: If you're doing the site for the US government, you're (thank goodness) required by law to make sure it works without JavaScript. REALLY?! That's good news. Could you please provide a source for that? Section 508 of the Rehabilitation Act Amendments (which is so exciting that it has its own web site, www.section508.gov) requires that information made available to the public through electronic means be done so in a manner that provides broad accessibility to people with a wide variety of impairments. It took a long time (the law was passed in 1998) to figure out what that would mean - I was working for the government at the time and it was a bit frustrating, as expectations for the final requirements kept changing, even though the compliance deadline was expected to arrive before the guidelines! Reading the final law, it looks like they eased up from the position taken in the penultimate proposal which was looking solid as I left for the private sector. That position was that any scripted process had to be accompanied by a non-client-side-scripted alternative. In the final version, that's been replaced with a not-too-clear statement (paragraph l) which may or may not say the same thing. Here's the full set of requirements as put forth in 36 CFR 1194.22, Web-based intranet and internet information and applications: (a) A text equivalent for every non-text element shall be provided (e.g., via alt, longdesc, or in element content). (b) Equivalent alternatives for any multimedia presentation shall be synchronized with the presentation. (c) Web pages shall be designed so that all information conveyed with color is also available without color, for example from context or markup. (d) Documents shall be organized so they are readable without requiring an associated style sheet. (e) Redundant text links shall be provided for each active region of a server-side image map. (f) Client-side image maps shall be provided instead of server-side image maps except where the regions cannot be defined with an available geometric shape. (g) Row and column headers shall be identified for data tables. (h) Markup shall be used to associate data cells and header cells for data tables that have two or more logical levels of row or column headers. (i) Frames shall be titled with text that facilitates frame identification and navigation. (j) Pages shall be designed to avoid causing the screen to flicker with a frequency greater than 2 Hz and lower than 55 Hz. (k) A text-only page, with equivalent information or functionality, shall be provided to make a web site comply with the provisions of this part, when compliance cannot be accomplished in any other way. The content of the text-only page shall be updated whenever the primary page changes. (l) When pages utilize scripting languages to display content, or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology. (m) When a web page requires that an applet, plug-in or other application be present on the client system to interpret page content, the page must provide a link to a plug-in or applet that complies with ¤1194.21(a) through (l). (n) When electronic forms are designed to be completed on-line, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues. (o) A method shall be provided that permits users to skip repetitive navigation links. (p) When a timed response is required, the user shall be alerted and given sufficient time to indicate more time is required. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Email validation
On Fri, 14 Jun 2002, Manuel Lemos wrote: On 06/14/2002 03:06 AM, Miguel Cruz wrote: On Fri, 14 Jun 2002, Manuel Lemos wrote: The following classes use this validation regular expression string. It does not exclude some invalid addresses but includes all valid addresses. ^([-!#\$%'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$ It doesn't, as far as I can tell, allow this valid address: [EMAIL PROTECTED] I never heard of TLD with more than 4 characters. Is this recent? About a year old, I think. Not that it's being used a whole lot yet, admittedly. And what's with all the nonsense characters in the domain name portion? Only letters, numbers, hyphen, and period are allowed after the @ sign. I just followed the BNF of the RFC to figure which characters would eventually be valid. At least it does not exclude valid characters. The RFCs would also suggest that the final component of a domain could be longer than 4 characters. In fact, accommodating that has been a clear operational requirement for some time, as it's long been threatened that such domains would exist in the primary root, and for people who use the various splinternet alternate roots, it's been reality for years. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Advanced User Authentication --- solved
Done it!!! Followed the examples both of you gave me and voala! Hey... it turned out to be quite a effective user authentication system. Thanks a lot. Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -Mensaje original- De: Justin French [mailto:[EMAIL PROTECTED]] Enviado el: Viernes, 14 de Junio de 2002 03:29 a.m. Para: César Aracena Asunto: Re: [PHP] Advanced User Authentication This is a reasonably in-depth topic, and I don't have any experience with the book in question, but here's some code to follow. Please note TOTALLY UNTESTED CODE! ? session_start(); // make sure userid password were set // thru sessions, not through URL or other // method $userid = $_SESSION['userid']; $password = $_SESSION['password']; $db_conn = mysql_connect(localhost, user, password); mysql_select_db(dbname, $db_conn); $query = SELECT * FROM auth WHERE authname = '$username' AND authpass = password('$password'); if(mysql_num_rows($result) == 0) { // invalid username and/or password unset($_SESSION['password']); unset($_SESSION['userid']); } else { $valid_user = 1; // we know they're valid, but what level user are they? $myrow = mysql_fetch_array($result); $authlevel = $myrow['authlevel']; } ? So, you find the userid and password in the $_SESSION array, and you query the database to see if there's a match. If not, you unset the $_SESSION['userid'] and $_SESSION['password']. If yes, you then have a look at the result your queried, and find out what authlevel they are. In your case, it looks like you're using 0 for normal, and 1 for admin. In my case, I'm using 0 for a blocked user, 1 for basic, 2 for admin, and three for me (super admin, for lack of a better word!). For basic stuff, we can just check if they're a valid user: ? if($valid_user) { echo welcome {$userid}; } ? or more complex stuff ? if($authlevel == 1) { echo admin: A HREF=\blah.php\delete this/a; } ? Hope this get you started on the right track. Justin French Creative Director http://Indent.com.au on 14/06/02 3:08 PM, César Aracena ([EMAIL PROTECTED]) wrote: Hi all, Im trying to make a somehow advanced user authentication system fro my own web site. What Im using as a model example, is the authentication system explained by Luke Welling Laura Thomson in their book PHP and MySQL Web Development. In the book, they explain how to make apparently a perfect user authentication system, but only for one level users. I would like to change that somehow in order to make my scripts recognize whether the user is an Administrator or a Common User, identified by a authlevel field in my DB (1 for Admin 2 for Users). Im making all my web sites, by using an include schema, so the user is authenticated only in the Header (included in all the pages). What I have so far is: ? // this is where the original script begin session_start(); if ($userid $password) { $db_conn = mysql_connect(localhost, user, password); mysql_select_db(dbname, $db_conn); $query = SELECT * FROM auth WHERE authname = '$username' AND authpass = password('$password') AND authlevel = 1; $result = mysql_query($query, $db_conn); if (mysql_num_rows($result) 0) { $valid_user = $userid; session_register(valid_admin); } // this is what I tried to add else if (mysql_num_rows($result) = 0) { $query1 = SELECT * FROM auth WHERE authname = '$username' AND authpass = password('$password') AND authlevel = 0; $result1 = mysql_query($query1, $db_conn); if (musql_num_rows($result1) 0) { $valid_user = $userid; session_register(valid_user); } } } ? It works great when used in its original state, but does no good to what Im trying to do here. Also, Im willing to learn from this so I dont want to rush and get it already done out there ;-) By the way, before you ask, I use MySQL and PHP 4 under a Apache emulator (PHPTriad) running under WinXP (and damn, it works good and smooth). Hope to get some knowledge from you guys and gals, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Different colors on lines
On Fri, 14 Jun 2002, Bård Tommy Nilsen wrote: Can anyone help out with this ?? Since i do the search after the query, there is an problem if line 1 in the Sql table matches, line 2 does not, but line 3 does. Then the result will display the same color on the two lines That would be printet in this example. How can i make sure that it will allways display the colors On each line ?? $query_1 = mysql_query(select * from $tabell_4); $number_1 = mysql_numrows($query_1) ; $i_1 = 0; $bgcolor[0] = #FFE38E; $bgcolor[1] = #FF; $Search = Test; while ($i_1 $number_1) { $Name = mysql_result($query_1,$i_1,Name); if (eregi ($Search, $Name)) { Echo 'tr BGCOLOR='.$bgcolor[$i_1%2].''; } $i++; } $bgcolor[0] = #FFE38E; $bgcolor[1] = #FF; $i = 0; while ($row = mysql_fetch_assoc($query_1)) { $name = $row['name']; if (eregi($search, $name)) echo 'tr bgcolor=' . $bgcolor[$i = 1 - $i] . ''; } miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Nested IF's (Is there a LIMIT ?)
This is my code, it seems that either I have the curly brackets in the wrong place OR there is a limit to how many times you can set IF's. So before I pull out the shotgun, and take out this machine, I figure I would ask the Cousel Of the PHP OverLords. So you know, I happen to also be using validateEmailFormat that was suggested a few minutes ago by Manuel... Thanx by the way, you saved me some time. I also chage the permissions on the files on the server to 777 so there would be no mistake. I also changed the order of the IF statements for the validateEmail class. I have run it both ways with the same result. TIA ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { $my_form = new form_validator; if($my_form -validate_fields(first, last, email, company, address, city, state, zip, phone)) { $isValid = validateEmailFormat($email); if(!$isValid) { echo Your Email Address Is InValid, \n Please Press your Web Browsers 'BACK' button and re-enter your email address; }else{ $db = mysql_connect($dbhost,$dbuname,$dbpass); mysql_select_db($dbname,$db); $sql = INSERT INTO $prefix; $sql .= (first, last, email, company, address, city, state, zip, phone, fax, mobile, comments); $sql .= VALUES; $sql .= ('$first', '$last', '$email', '$company', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments'); $result = mysql_query($sql); if (!$result) {echo(error: . mysql_error() . \n$sql\n);} echo bThank You/b for your submission.bOne of our agents will review your submission and forward your username and password.\n; echo You will not receive this email instantly\n; }else{ echo ($my_form-error_message . brbr); } } } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] sessions help
On Thu, 13 Jun 2002, Kevin Stone wrote: Your problem is here.. return ($_SESSION['node'] = $node_id); I do not believe that you can both set and return a varaible on the same line. FYI, the variable which you're returning in this function is global.. so there's no reason to return it anyway. Just fill the index and you're all set. There's no particular reason that in itself shouldn't work - the return value of an assignment is the result of the assignment. Try: $i = 1; echo $i = $i + 3; miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested IF's (Is there a LIMIT ?)
I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. miguel On Fri, 14 Jun 2002, Daniel Negron/KBE wrote: This is my code, it seems that either I have the curly brackets in the wrong place OR there is a limit to how many times you can set IF's. So before I pull out the shotgun, and take out this machine, I figure I would ask the Cousel Of the PHP OverLords. So you know, I happen to also be using validateEmailFormat that was suggested a few minutes ago by Manuel... Thanx by the way, you saved me some time. I also chage the permissions on the files on the server to 777 so there would be no mistake. I also changed the order of the IF statements for the validateEmail class. I have run it both ways with the same result. TIA ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { $my_form = new form_validator; if($my_form -validate_fields(first, last, email, company, address, city, state, zip, phone)) { $isValid = validateEmailFormat($email); if(!$isValid) { echo Your Email Address Is InValid, \n Please Press your Web Browsers 'BACK' button and re-enter your email address; }else{ $db = mysql_connect($dbhost,$dbuname,$dbpass); mysql_select_db($dbname,$db); $sql = INSERT INTO $prefix; $sql .= (first, last, email, company, address, city, state, zip, phone, fax, mobile, comments); $sql .= VALUES; $sql .= ('$first', '$last', '$email', '$company', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments'); $result = mysql_query($sql); if (!$result) {echo(error: . mysql_error() . \n$sql\n);} echo bThank You/b for your submission.bOne of our agents will review your submission and forward your username and password.\n; echo You will not receive this email instantly\n; }else{ echo ($my_form-error_message . brbr); } } } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- 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] Nested IF's (Is there a LIMIT ?)
Bracketing looks good try pulling chunks of code out and gradually add it in to see where the problem lies eg (sorry for reformatting your code) ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { echo ok } else { ? HTML FORM html code in here, /FORM /HTML ? } ? then ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { echo ok } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? etc.. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 4:53 PM To: Daniel Negron/KBE Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Nested IF's (Is there a LIMIT ?) I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. miguel On Fri, 14 Jun 2002, Daniel Negron/KBE wrote: This is my code, it seems that either I have the curly brackets in the wrong place OR there is a limit to how many times you can set IF's. So before I pull out the shotgun, and take out this machine, I figure I would ask the Cousel Of the PHP OverLords. So you know, I happen to also be using validateEmailFormat that was suggested a few minutes ago by Manuel... Thanx by the way, you saved me some time. I also chage the permissions on the files on the server to 777 so there would be no mistake. I also changed the order of the IF statements for the validateEmail class. I have run it both ways with the same result. TIA ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { $my_form = new form_validator; if($my_form -validate_fields(first, last, email, company, address, city, state, zip, phone)) { $isValid = validateEmailFormat($email); if(!$isValid) { echo Your Email Address Is InValid, \n Please Press your Web Browsers 'BACK' button and re-enter your email address; }else{ $db = mysql_connect($dbhost,$dbuname,$dbpass); mysql_select_db($dbname,$db); $sql = INSERT INTO $prefix; $sql .= (first, last, email, company, address, city, state, zip, phone, fax, mobile, comments); $sql .= VALUES; $sql .= ('$first', '$last', '$email', '$company', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments'); $result = mysql_query($sql); if (!$result) {echo(error: . mysql_error() . \n$sql\n);} echo bThank You/b for your submission.bOne of our agents will review your submission and forward your username and password.\n; echo You will not receive this email instantly\n; }else{ echo ($my_form-error_message . brbr); } } } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- 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
Re: [PHP] Re: Spam Bots/E-mail Addys
On Fri, 14 Jun 2002, Manuel Lemos wrote: I would say that the long standing users are even more aware that they should not turn off Javascript because they are experienced enough to know that some sites of their preference do not work right without Javascript. I believe that users that disable Javascript just for a short period because soon or later they realize that it is their loss. Users that keep Javascript disable for a long time are not being smart, they are just being stubborn. Soon or later they realize that being stubborn is masochism. I keep JavaScript off most of the time. This state of affairs has gone on for about 5 years now (in the 4 years I was using the web prior to that, it wasn't enough of a nuisance to worry about) and I haven't yet realized I'm stubborn (though maybe that's the problem). I don't know of any major sites that require it - even Microsoft's own MSNBC works fine with scripting disabled. Only four types of sites require JavaScript, in my experience: 1) Really flashy or otherwise non-transactional sales sites like car companies and movie studios. 2) Transactional sites that are a first effort. Eventually the company either abandons the JavaScript requirement (Amazon, eBay, etc.) or goes out of business. Not that JavaScript drove them out of business, but it's symptomatic of a general lack of understanding of the web world. 3) Gee-whiz sites by web developers who are trying to show off their prowess. 4) Moronic amateurish sites commissioned by small business owners who don't understand the web and think users will like them better if their site has every single available gimmick (marquee text in the status bar, music playing while you visit the site, etc.). They pay $100 for the site plus $20 per gimmick, and they get what they paid for. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested IF's (Is there a LIMIT ?)
I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. »»» Do you happen to have the name of an editor that does that ? I am using dreamweaverMX and UltraEdit, also have EditPlus and TextPad.just is case it was one of them. Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Nested IF's (Is there a LIMIT ?) SOLVED
I re-arranged the order of IF execution all together. Email Validation First then Form Validation. Thanx Martin and Miguel for your responses. Finally going to bed, have to be up in 3 hours. Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com Martin Towell martin.towell@ To: Daniel Negron/KBE [EMAIL PROTECTED] world.netcc: [EMAIL PROTECTED] Subject: RE: [PHP] Nested IF's (Is there a LIMIT ?) 06/14/2002 02:56 AM Bracketing looks good try pulling chunks of code out and gradually add it in to see where the problem lies eg (sorry for reformatting your code) ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { echo ok } else { ? HTML FORM html code in here, /FORM /HTML ? } ? then ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { echo ok } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? etc.. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 4:53 PM To: Daniel Negron/KBE Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Nested IF's (Is there a LIMIT ?) I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. miguel On Fri, 14 Jun 2002, Daniel Negron/KBE wrote: This is my code, it seems that either I have the curly brackets in the wrong place OR there is a limit to how many times you can set IF's. So before I pull out the shotgun, and take out this machine, I figure I would ask the Cousel Of the PHP OverLords. So you know, I happen to also be using validateEmailFormat that was suggested a few minutes ago by Manuel... Thanx by the way, you saved me some time. I also chage the permissions on the files on the server to 777 so there would be no mistake. I also changed the order of the IF statements for the validateEmail class. I have run it both ways with the same result. TIA ? include config.php; include form_validator.class; include validateEmailFormat.php; if ($submit) { if ($form_complete) { $my_form = new form_validator; if($my_form -validate_fields(first, last, email, company, address, city, state, zip, phone)) { $isValid = validateEmailFormat($email); if(!$isValid) { echo Your Email Address Is InValid, \n Please Press your Web Browsers 'BACK' button and re-enter your email address; }else{ $db = mysql_connect($dbhost,$dbuname,$dbpass); mysql_select_db($dbname,$db); $sql = INSERT INTO $prefix; $sql .= (first, last, email, company, address, city, state, zip, phone, fax, mobile, comments); $sql .= VALUES; $sql .= ('$first', '$last', '$email', '$company', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments'); $result = mysql_query($sql); if (!$result) {echo(error: . mysql_error() . \n$sql\n);} echo bThank You/b for your submission.bOne of our agents will review your submission and forward your username and password.\n; echo You will not receive this email instantly\n; }else{ echo ($my_form-error_message . brbr); } } } } else { ? HTML FORM html code in here, /FORM /HTML ? } ? Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
RE: [PHP] Advanced User Authentication --- solved
Hi All, Here is a link to an easy to use session program. Has all the code needed I think. This is what I have been using to get used to sessions and all. http://www.trios.org/php/sessions/ Hope this helps soneone, Chris _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Linux DBG-GUI
I'm using SuSE 8.0 and i need a free GUI to use with DBG. yours Philipp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP Compression
Hi, I would like to know how can I compress the output of PHP through Zlib. Thanking in advance, Nuno Lopes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fishcart on win98
I have a problem trying to install Fishcart on my win98 system.(Also a ActivePerl problem) Has anyone succeed this? PS Sorry for non-topic. I had no answer from the fishchart list. Makis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] row pointer
Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SSL Support for PHP....
Right... Back to the old bombshell of which webserver... I have'nt seen any reports which say what is better... Here is my issue: The webserver I am setting up will potentially host 4 or 5 sites... How does IIS fair against Apache with servring multiple sites? each site will be like... http://customername.ourdomain.co.uk Also - more an IIS/Apache Q, how do you configure the above to work in both IIS and Apache? We arenot using ASP - yet, but might do at a later date... can IIS and Apache live together? if so how would you confirue a site who's PHP is served with Apache and ASP with IIS. SSL Certificates... how do they work on Apache? IIS is a simple Wizard, I've not had to set SSL up before. The hardware config is that machine has 2 nics, one to router for outside world to access it, another so the server can access the LAN as components of the web-application are VB Apps running on client machines to the LAN manipulating the database that is ultimatley used by PHP. It's Win2k Server, p3 1.7ghz 512mb ram, 120gb raid 5. The Application is not *launched* as yet, So I'l looking at whither to use Apache/IIS. Thanks in advance Brian M McGarvie... [ http://www.the-local-guide.com :: http://www.mcgarvie.net ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SSL Support for PHP....
Hello, I'm not to sure about the servers. I use Windows XP Pro and I'm coding and stuff offline to learn more about php, lasso and mysql. I've been doing this awile now but I've had problems with various php/mysql scripts. I usually get scripts from hotscripts.com and have prolly about 100 different programs running. Just messing moreless. On IIS 5.0 that comes with WINXP Pro, I ran IIS5.0, MySQL, PHP and Lasso. Every once in a while, IIS would hang and would not do anything at all. This happened on many propular scripts such as php nuke. I have also ran the same configuration above along with Cold Fusion and tried, Xitami (imatix.com), Omnihttpd, and Apache.. All these servers ran well with no problems. Xitami is slow, Apache is much better but I don't care much for non gui stuff, and Omnihttpd is the fastest in my opinion. However, I'm only using this software on a home computer, Gateway 1.5 MHZ with 512 MB ram. I am now using apache again on WINXP PRO and all has been well for now. Personally, I like IIS although it does get slow on smaller servers with alot of traffic. ASP and the likes slow it down to much for me but other than that, there is alot of documentation for seting it up to run various programs such as Cold Fusion, Lasso, Php ect. I know this isn't much help. It's just my thoughts on what I've went through recently and just my general thoughts on the server. Remember, Apache on WIN2K or any windows machine isn't nearly as fast as on linux. Chris _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Replace characters
I am getting the values out from an image with iptcparse, but som charachters like æ and å (norwegian) Doesnt work. I get F¾rder instead of Færder And Stende instead of Stående. Could i do anything about this to get i right ?? Could it have somehting to do with it that the images are saved in Mac ?? Please help ! Regards Bård Tommy Nilsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP Compression
On Fri, Jun 14, 2002 at 08:58:29AM +0100, Webmaster do Aborla.net wrote: I would like to know how can I compress the output of PHP through Zlib. You mean like: http://www.php.net/manual/en/function.ob-gzhandler.php -- Daniel Tryba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Email validation
That one does not accept '+'. In fact, that was the 1st time I ever saw such a character in an e-mail address. I did not check the RFC, but if it is valid, just add the '+' char to the reg. exp. like this: function mailCheck($strEMailAddress) { return eregi(^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$, $strEMailAddress); } This should now accept your mail address. Regards, Pedro Alberto Pontes - Original Message - From: Timothy J. Luoma [EMAIL PROTECTED] Newsgroups: php.general To: Pedro Pontes [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 04:49 Subject: Re: Email validation On Wed, 12 Jun 2002, Pedro Pontes wrote: function checkEmail($strEMailAddress) { return eregi(^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$, $strEMailAddress); } You have it now :). I'm still learning my PHP regex... does the above allow someone to have a literal + in their email address, ala [EMAIL PROTECTED] which is perfectly valid, but often rejected by email validators? TjL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SSL Support for PHP....
Also... IF Apache... what version? -Original Message- From: Brian McGarvie Sent: 14 June 2002 9:14 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] SSL Support for PHP Right... Back to the old bombshell of which webserver... I have'nt seen any reports which say what is better... Here is my issue: The webserver I am setting up will potentially host 4 or 5 sites... How does IIS fair against Apache with servring multiple sites? each site will be like... http://customername.ourdomain.co.uk Also - more an IIS/Apache Q, how do you configure the above to work in both IIS and Apache? We arenot using ASP - yet, but might do at a later date... can IIS and Apache live together? if so how would you confirue a site who's PHP is served with Apache and ASP with IIS. SSL Certificates... how do they work on Apache? IIS is a simple Wizard, I've not had to set SSL up before. The hardware config is that machine has 2 nics, one to router for outside world to access it, another so the server can access the LAN as components of the web-application are VB Apps running on client machines to the LAN manipulating the database that is ultimatley used by PHP. It's Win2k Server, p3 1.7ghz 512mb ram, 120gb raid 5. The Application is not *launched* as yet, So I'l looking at whither to use Apache/IIS. Thanks in advance Brian M McGarvie... [ http://www.the-local-guide.com :: http://www.mcgarvie.net ] -- 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] Re: [PHP-WIN] SSL Support for PHP....
On Friday, June 14, 2002, 9:13:59 AM, Brian McGarvie wrote: How does IIS fair against Apache with servring multiple sites? each site will be like... http://customername.ourdomain.co.uk Both are capable of serving multiple sites without any issues that I am aware of. Also - more an IIS/Apache Q, how do you configure the above to work in both IIS and Apache? In IIS you set the host header for the site when you set the IP for the site. In Apache you use the NameVirtualHost directive. See the MSIIS and Apache docs for more detailed instructions. We arenot using ASP - yet, but might do at a later date... can IIS and Apache live together? if so how would you confirue a site who's PHP is served with Apache and ASP with IIS. IIS and Apache can live together happily. You have to disable connection pooling for IIS (can't remember how - there is a knowledge-base article on the MS site that gives full details). Why would you want to have Apache serve PHP and IIS serve ASP for the same site? Why not just have IIS do both? SSL Certificates... how do they work on Apache? IIS is a simple Wizard, I've not had to set SSL up before. Dunno, never used SSL with Apache. Sorry. I hope that helps. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] get_object_vars()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I'm using get_object_vars() to unset all of the object vars in a function like this: function destroy_properties($obj) { if($properties=get_object_vars($obj)) { foreach($properties as $key = $val) { unset($key); } return TRUE; } else return FALSE; } problem is, when I print($obj-property); I still get the value? What am I missing here? Many thanks... - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9Cb9FHpvrrTa6L5oRAsdTAJ4iC2wNgF4T7UJPnh29oryoe/q2iwCeOhwN +N6Gx7i62Gyu1q1U/PVKA1M= =EvX1 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shut down server
Thanks, but the idea is another user only to start and shutdown the server. Any ideas ? Thanks, Rosen Bruce Karstedt [EMAIL PROTECTED] wrote in message 00ea01c21339$e7856d60$4773d73f@c3">news:00ea01c21339$e7856d60$4773d73f@c3... This is a bad idea from a security standpoint. If your server is local, login as root and type shutdown. If the system is remote telnet to the box, login, su to root and type reboot. If you use shutdown remotely, there is no way to restart the server. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 6:29 PM To: 'Rosen'; [EMAIL PROTECTED] Subject: RE: [PHP] Shut down server clip I am not a security expert. Check with others to get their opinion on whether this is the best approach. -Original Message- The server is Linux Red Hat 7.2 Can someone tell me how I could make shut down the server ? Is it possible ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg-Maximum allowed size for uploaded files
Thanks Chris for your immediate response.Yes we got the error page not found when we cross 7.5 MB. How to increase the time out time.Whether we have to edit the httpd.conf or php.ini file to increase the time out time. Any help is appreciated. thanks in advance, SenthilVelavan.P - Original Message - From: Chris Bunting [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 11:40 AM Subject: Re: [PHP] Reg-Maximum allowed size for uploaded files A quick search on google shows that yes, Php has a maximum upload filesize of 10MB. Maybe your upload timed out or the session expired if you are using them before you got to 10MB or something else happened. Chris Bunting _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- 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] Reg-Maximum allowed size for uploaded files
On Friday, June 14, 2002, 11:51:22 AM, SenthilVelavan wrote: How to increase the time out time.Whether we have to edit the httpd.conf or php.ini file to increase the time out time. Per script: http://www.php.net/set_time_limit In PHP.ini: http://www.php.net/manual/en/configuration.php#ini.max-execution-time -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extracting from an Array
Hi John, Sorry about the delayed mail. Anyway, I kept at it, and debugged every line with no success. Finally, I rewote it, and it worked?? [Sigh . . . one of those days :] Thanks again for all your help. Regards, Andre On Thursday 13 June 2002 11:28 pm, you wrote: Step through your code. What value does $rexpiry have? What do you see when you do print_r($Date) ?? Troubleshoot... ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:36 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Extracting from an Array Hi John, ?php /* Using PostgreSQL: it needs $numrows and $row=0 to work. Also set it to choose only one record in db to simplify testing. Date was set to 10 May 1998*/ // $db conect stuff $query = SELECT rexpiry FROM rap WHERE rid = '1024'; $result = pg_exec($db, $query); if (!$result) {printf (ERROR); exit;} $numrows = pg_numrows($result); $row = 0; $Row = pg_fetch_array($result,$row); $rexpiry = $Row['rexpiry']; $Date = explode( , $rexpiry); $Year = $Date[3]; pg_close($db); print $Year; /* 'Year' returns something like 1 */ ? Btw, according to the error message, there's no such function as 'RIGHT' in PostgreSQl. (Sorry about referring to the string as an array in a session variable -- I've extracted the code from some other stuff that I had been working on.) Sigh. I'd like to know why this doesn't work: how I can extract the last few characters from the array. Regards, Andre On Wednesday 12 June 2002 09:34 pm, you wrote: I don't understand why you keep referring to the string as an array in a session variable. Can you show me how you are issuing the query, fetching the result, assigning it to the session, etc... It should be as easy as this: ? $result = MySQL_query(SELECT RIGHT(date_column,4) AS Year FROM tablename); while($row = MySQL_fetch_array($result)) { echo $row['Year']; } ? You know you could write a simple little script to convert this into the correct format for a date column. If you want to do sorting by year, you can try this: SELECT date_column FROM table ORDER BY RIGHT(date_column,4) ASC ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 9:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Extracting from an Array Hi John, Yup. I know now that I've caused myself all sorts of grief when I set it to varchar. If I recall correctly (and I set this up four months ago when I began coding) I couldn't get it format without the crummy little dashes. So I set it to a string. Much coding later, I realize that I could solve this problem by changing it back to 'date' type, but as i'm writing, I remember that this particular array has only one use - and in a string format it's easier to manipulate. [Bad reason, I guess with hindsight -- perhaps it's a hangover from my Paradox PAL days where I needed to format the string for 'other purposes'.] Your last point is precisely what I'm writing about: it IS all messed up! So, the upshot is - live with it, and don't use it; or change it. Hmmm. I had planned to sort a column by 'Year', but it might be a case of 'overkill' - - the form is already loaded with enough options. Now that being said, this is more a problem of why can't I get ALL of the last part of the array? Suppose I wanted to extarct something that was not a date like: $_SESSION['odd'] which was varchar in the format of Session is closed. Now if I wanted to extract the last part: 'closed' what I've tried wouldn't work. It would give me: c -- how would I get the rest of the characters? Thanks for the advice, Regards, Andre On Wednesday 12 June 2002 08:25 pm, you wrote: What are the possible reasons that you need it to be a varchar ?? Do you realize how much extra work you are creating for yourself? Do you realize that you can have your users enter data in one format, and convert it to another format for MySQL? Do you realize you can use DATE_FORMAT() in your query to re-format the date back to dd-mm- if you want to? Do you realize that if you ever wanted to sort by this column, you'd be all messed up? It'll sort as a string, where 10 is less than 2. Do you realize what I'm trying to say?? ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 8:15 PM To:
Re: [PHP] Nested IF's (Is there a LIMIT ?)
Maguma Studio for PHP Light will do the job. Neil Daniel Negron/KBE wrote: ** This Message Was Virus Checked With : SAVI 3.58 May 2002 Last Updated 11th June 2002 ** I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. »»» Do you happen to have the name of an editor that does that ? I am using dreamweaverMX and UltraEdit, also have EditPlus and TextPad.just is case it was one of them. Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- Work: [EMAIL PROTECTED] Home: [EMAIL PROTECTED] Web: www.curvedvision.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error in enabling Image module in Php
Hello folks, When i tried to install php.My make command stops with the following error gd.c:95: conflicting types for `gdIOCtx' /usr/local/include/gd_io.h:18: previous declaration of `gdIOCtx' gd.c: In function `php_if_imagecreatefromgif': gd.c:1209: `gdImageCreateFromGif' undeclared (first use in this function) gd.c:1209: (Each undeclared identifier is reported only once gd.c:1209: for each function it appears in.) gd.c: In function `php_if_imagegif': gd.c:1404: `gdImageGif' undeclared (first use in this function) make[3]: *** [gd.lo] Error 1 make[3]: Leaving directory `/usr/local/php-4.0.6/ext/gd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/php-4.0.6/ext/gd' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/php-4.0.6/ext' make: *** [all-recursive] Error 1 My configure option is ./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=/usr/local/ \ --with-zlib \ --with-ftp \ --with-gd \ --with-jpeg-dir=/usr/local/lib \ --enable-versioning \ --enable-track-vars=yes \ --enable-url-includes \ --enable-sysvshm=yes \ --enable-sysvsem=yes \ --with-config-file-path=/etc Any help is appreciated Thanks in Advance K.Arul Venkatesh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session variables in OOP....
Hi all, I'm busy building a site which uses OOP. Several classes are used to constuct different sections of the final page to be displayed. The overall class is called class.basepage.php This is the page which outputs HTML and calls other classes to construct other parts of the page. Now I have this problem: In one of the objects I use session variables. However i get the famous error :Cannot send session cookie - headers already sent by (output started Is there a way to overcome this problem? I mean: the session variable is registered in the main part of the page after the class $this-header is called (which writes HTML)... now, I don't think I can register the sessionvariable at the top of my script since the value of the session var is determined in the main.class...or can I? I hope you understand my problem and have some tips for me. Below is some code snippets I'm using: thx and regards Wilbert Enserink class.basebape.php--- ?php $this-header(); ?// includes a php file which writes HTMLcode functioning as the header of the HTML page (i.e. navigation menu) ?php $this-main(); ? // includes a php file (main.php) which writes the main part of the HTML data --- ---main.php-- echo a lot of HTML depending on queries and stuff; session_register($variable); output browser-- Warning: Cannot send session cookie - headers already sent by (output started at /opt/guide/www.designmatcher.com/HTML/wwwtest/class.basepage.php:125) in /opt/guide/www.abc.com/HTML/wwwtest/phpincludes/main/main.php on line 400 - - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] -
[PHP] RE: [PHP-WIN] SSL Support for PHP....
Basically then there is no real reason for Apache over IIS on win2k server? I am the admin of the Webservers, but the overall network manager would like to keep it MS-centric just because all the rest is. With our leased line we aqquired 16 ips, so in the IIS config I would just use that IP and keep it port 80? (I will read the manual, I will read the manual, I will read the manual!) SSL is a must for a few of the 'sites' that will be getting ran. As for ASP *shudder* I personally don't plan on using it, tho I might experiment with asp.net but thats a by-the-by. I'm kinda trying to verify that using IIS with PHP isapi module is as secure as Apache? Heres a strange one tho jist on the side: I installed Apache2/PHP on my own machine (used for writing code etc) and copied the application to an apache location, and ran it, but... there is supposedly files missing according to apache, all is as on the other machine - files/code wise. One last item I need some advise with... is IIS able to handle LOTS of sites accross multiple servers? as we have lots of clients so in the future will possibly need a machine to load-balance etc and seperate database serving machines - databases primarily MsSQL/Access/MySQL. Btw, thanks Stuart, thats kinda making me feel easier about keeping it IIS. -Original Message- From: Stuart Dallas [mailto:[EMAIL PROTECTED]] Sent: 14 June 2002 10:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] SSL Support for PHP On Friday, June 14, 2002, 9:13:59 AM, Brian McGarvie wrote: How does IIS fair against Apache with servring multiple sites? each site will be like... http://customername.ourdomain.co.uk Both are capable of serving multiple sites without any issues that I am aware of. Also - more an IIS/Apache Q, how do you configure the above to work in both IIS and Apache? In IIS you set the host header for the site when you set the IP for the site. In Apache you use the NameVirtualHost directive. See the MSIIS and Apache docs for more detailed instructions. We arenot using ASP - yet, but might do at a later date... can IIS and Apache live together? if so how would you confirue a site who's PHP is served with Apache and ASP with IIS. IIS and Apache can live together happily. You have to disable connection pooling for IIS (can't remember how - there is a knowledge-base article on the MS site that gives full details). Why would you want to have Apache serve PHP and IIS serve ASP for the same site? Why not just have IIS do both? SSL Certificates... how do they work on Apache? IIS is a simple Wizard, I've not had to set SSL up before. Dunno, never used SSL with Apache. Sorry. I hope that helps. -- Stuart -- PHP Windows 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] Re: [PHP-WIN] SSL Support for PHP....
On Friday, June 14, 2002, 11:07:24 AM, Brian McGarvie wrote: Basically then there is no real reason for Apache over IIS on win2k server? Not now Apache 2 is here. Apache 1.x has always been considered by the Apache group as beta code and therefore not suitable for use in a production environment. I have been using Apache 2 for development on Win2k since it was first released to the public and I will upgrade my public server as soon as PHP releases a production version of their module. I have IIS on the same server and have never had a problem with them co-existing. With our leased line we aqquired 16 ips, so in the IIS config I would just use that IP and keep it port 80? In the site configuration, click on the Advanced... button next to the IP address. Make sure that each entry has the IP address, port 80 and the host header set to the site domain name. (I will read the manual, I will read the manual, I will read the manual!) A very good idea ;o) SSL is a must for a few of the 'sites' that will be getting ran. As I said, I have not experience with SSL on Apache, but on IIS it is as simple as following a wizard. I'm kinda trying to verify that using IIS with PHP isapi module is as secure as Apache? A web server is only as secure as it's administrator is anal. I personally believe that IIS on Win2k can be made as secure as Apache on any platform, but not a lot of people agree with that. As for how secure PHP is, most of that will depend on the scripts rather than the server/PHP interface you're using. Heres a strange one tho jist on the side: I installed Apache2/PHP on my own machine (used for writing code etc) and copied the application to an apache location, and ran it, but... there is supposedly files missing according to apache, all is as on the other machine - files/code wise. What files did it say were missing? Were they scripts, modules, what? One last item I need some advise with... is IIS able to handle LOTS of sites accross multiple servers? as we have lots of clients so in the future will possibly need a machine to load-balance etc and seperate database serving machines - databases primarily MsSQL/Access/MySQL. Again, here is where my experience falls short. I have not yet had a chance to be involved in a load-balanced project. However, I would expect that there would be little difference whether you implement it using IIS or Apache. Btw, thanks Stuart, thats kinda making me feel easier about keeping it IIS. No problem. Don't get me wrong, I think the ?AMP combination (Linux/FreeBSD/etc, Apache, MySQL and PHP) is unbeatable as a server platform, but I strongly believe that, done properly, IIS on Win2k is still a strong platform. The problem is that MS have (purposefully) made IIS accessible to the average PC user which I think is one of the main reasons that it has *that* reputation. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session variables in OOP....
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Wilbert Enserink declared I hope you understand my problem and have some tips for me. Below is some code snippets I'm using: Actually it's a little tricky to understand ;-) Have you considered output buffering? - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9Cdq/HpvrrTa6L5oRAqmzAJ99bcz64l6/lfcIqLz4iGKlTLeJHQCeOmsH e0lahzjczcVE3aFql/+G6+M= =Fl/c -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SSL Support for PHP....
Hi. You probably want to use Windows 2000 Server instead; after all, Windows XP is more or less targeted against workstations and home use (as of yet). It may need some tweaking to be suitable for server-use. Consider the complexity of all DCOM+ components that coexist and rely on various services to excel in performance and functionality. I doubt this neither, is of any real use. Just my thoughts on the subject, and my practical experience with IIS 5/PHP is limited. Cheers, Henrik J. -Original Message- From: Chris Bunting [mailto:[EMAIL PROTECTED]] Sent: den 14 juni 2002 10:41 To: [EMAIL PROTECTED] Subject: Re: [PHP] SSL Support for PHP Hello, I'm not to sure about the servers. I use Windows XP Pro and I'm coding and stuff offline to learn more about php, lasso and mysql. I've been doing this awile now but I've had problems with various php/mysql scripts. I usually get scripts from hotscripts.com and have prolly about 100 different programs running. Just messing moreless. On IIS 5.0 that comes with WINXP Pro, I ran IIS5.0, MySQL, PHP and Lasso. Every once in a while, IIS would hang and would not do anything at all. This happened on many propular scripts such as php nuke. I have also ran the same configuration above along with Cold Fusion and tried, Xitami (imatix.com), Omnihttpd, and Apache.. All these servers ran well with no problems. Xitami is slow, Apache is much better but I don't care much for non gui stuff, and Omnihttpd is the fastest in my opinion. However, I'm only using this software on a home computer, Gateway 1.5 MHZ with 512 MB ram. I am now using apache again on WINXP PRO and all has been well for now. Personally, I like IIS although it does get slow on smaller servers with alot of traffic. ASP and the likes slow it down to much for me but other than that, there is alot of documentation for seting it up to run various programs such as Cold Fusion, Lasso, Php ect. I know this isn't much help. It's just my thoughts on what I've went through recently and just my general thoughts on the server. Remember, Apache on WIN2K or any windows machine isn't nearly as fast as on linux. Chris _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session variables in OOP....
Hi all, Nick: thx for the tip, it removed the error, and might further be a good idea: except: do you know if I can declare session variables and use them in between the output buffer statements like this: (i tried it but it doesn't seem to work)?? greetings Wilbert include (class.basepage.php); ob_start();//start the outputbuffering $object= new basepage; //object basepage which determines which HTML to output (due to queries and calcultaions) session_register($variable); $extra_variable=$variable+1; echo $extra_variable; ob_get_contents();//show the buffer ob_end_flush() ;//clear the buffer - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 1:59 PM Subject: Re: [PHP] session variables in OOP -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Wilbert Enserink declared I hope you understand my problem and have some tips for me. Below is some code snippets I'm using: Actually it's a little tricky to understand ;-) Have you considered output buffering? - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9Cdq/HpvrrTa6L5oRAqmzAJ99bcz64l6/lfcIqLz4iGKlTLeJHQCeOmsH e0lahzjczcVE3aFql/+G6+M= =Fl/c -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session variables in OOP....
If you want to do it right, don' t output anything, obviously. Instead of using ECHO, assign all output to a variable within your class. Then, at the end of the processing, after everything is done, echo out that variable (which will contain the entire page). Then you can set cookies, sessions, whatever, at any point. Or you can use output buffering... ---John Holmes... - Original Message - From: Wilbert Enserink [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 7:44 AM Subject: [PHP] session variables in OOP Hi all, I'm busy building a site which uses OOP. Several classes are used to constuct different sections of the final page to be displayed. The overall class is called class.basepage.php This is the page which outputs HTML and calls other classes to construct other parts of the page. Now I have this problem: In one of the objects I use session variables. However i get the famous error :Cannot send session cookie - headers already sent by (output started Is there a way to overcome this problem? I mean: the session variable is registered in the main part of the page after the class $this-header is called (which writes HTML)... now, I don't think I can register the sessionvariable at the top of my script since the value of the session var is determined in the main.class...or can I? I hope you understand my problem and have some tips for me. Below is some code snippets I'm using: thx and regards Wilbert Enserink class.basebape.php--- ?php $this-header(); ?// includes a php file which writes HTMLcode functioning as the header of the HTML page (i.e. navigation menu) ?php $this-main(); ? // includes a php file (main.php) which writes the main part of the HTML data --- ---main.php-- echo a lot of HTML depending on queries and stuff; session_register($variable); output browser-- Warning: Cannot send session cookie - headers already sent by (output started at /opt/guide/www.designmatcher.com/HTML/wwwtest/class.basepage.php:125) in /opt/guide/www.abc.com/HTML/wwwtest/phpincludes/main/main.php on line 400 - - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Query Help!!!!
Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution that go silent. I find that the ones most often to find flaws in someones code, are the ones who never provide Answers. I've been on this list for a few months (IIRC), but I don't post much. That's because I never provide Answers (being a newbie, and therefore not knowing them). I'm on the list because I want to learn about PHP, and I've found it easier in the years I've been online to subscribe to mailing lists or (once upon a time) USENET newsgroups and just read the various solutions to peoples' problems. Where's all this going?, you impatiently ask, perhaps stamping your foot. Well, pause for a second, gentle reader, for you are about to be shocked to your very core. Well, maybe not. Here goes anyway: I've learnt a lot about PHP simply from reading the answers provided by the more intelligent, knowledgeable and helpful members of this list. Guess who's helped the most? A young (?) man by the unusual name of John Holmes. Before you chew people out, Mr Kay, about being perpetually unhelpful, you may like to lurk on a list for a while and see if you're actually within a stones throw of the truth, or really just spouting off out of your own sense of hurt pride. HTH, HAND! -- Mark Gallagher http://cyberfuddle.com/infinitebabble/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML Feed
I am currently trying to implement XML Parsing on a site using the XML News Feed of another site. The site puts two versions of the news in its file though: - item titleTsunami 2265 Date, Demo/title linkhttp://www.shacknews.com/onearticle.x/20959/link /item - ITEM SUBJECTTsunami 2265 Date, Demo/SUBJECT URLhttp://www.shacknews.com/onearticle.x/20959/URL CATEGORYGeneral/CATEGORY /ITEM I have a script that is meant to parse the file which is downloaded to a local file hourly. The trouble is that the script tries parsing both lots and I only wish it to parse the top half and to stop when it reaches the entries using SUBJECT tags. Does anyone have a solution for this? The script below is what I use to echo the news onto my site. The script attached is the script that is meant to parse the xml document. ? include( includes/xmlfeed.php ); $rdffile = shacknews.xml; $remote = http://www.shacknews.com/shackfeed.xml;; $refreshtime = time() - 3600; ? ? if ((filemtime($rdffile) $refreshtime) || (filesize($rdffile) == 0)) { $RDF = fopen( $rdffile, w ) or die( Cannot open $rdffile ); $FILE = fopen( $remote, r ) or die( Cannot open $remote ); while (!feof( $FILE )) { fwrite( $RDF, fgets( $FILE, 1024 )); } fclose( $RDF ); fclose( $FILE ); } parseRDF( $rdffile ); ? - Andrew. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing variables from one page to another
Hi, Does anyone have a PHP method of passing variables from a form to another page without using sessions or encoding within the URL? I remember someone mentioning a class but I lost the reference. My site uses PHP 4.0.1Pl1 Thanks, Don
[PHP] Quick question
I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the missing field. I have made it so that the person doesnt lose everything, currently they will lose radio button information or checkbox information. Can someone tell me how to best keep it so the checkboxes stay checked or radio buttons stay selected. thanks, dan __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting help on php
Dear sir, I have two questions : 1- Is there a function in php that refreshes my page ? 2- Is there a function that lets me open a new window ?
Re: [PHP] Passing variables from one page to another
On Friday 14 June 2002 22:16, Don wrote: Hi, Does anyone have a PHP method of passing variables from a form to another page without using sessions or encoding within the URL? I remember someone mentioning a class but I lost the reference. My site uses PHP 4.0.1Pl1 Use POST. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It has long been an axiom of mine that the little things are infinitely the most important. -- Sir Arthur Conan Doyle, A Case of Identity */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick question
Quick answer: input type=checkbox name=name value=value?= ( $HTTP_POST_VARS['name']=='value' ? ' checked' : '' ) ? the same for radio boxes. Dan McCullough wrote: I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the missing field. I have made it so that the person doesnt lose everything, currently they will lose radio button information or checkbox information. Can someone tell me how to best keep it so the checkboxes stay checked or radio buttons stay selected. thanks, dan __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting help on php
1. use META TAGS to refresh the page 2. use javascript to open a new window - Original Message - From: Hotmail [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 10:36 AM Subject: [PHP] getting help on php Dear sir, I have two questions : 1- Is there a function in php that refreshes my page ? 2- Is there a function that lets me open a new window ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting help on php
On Friday 14 June 2002 22:36, Hotmail wrote: 1- Is there a function in php that refreshes my page ? Short answer, no. Longer answer depends on what you want to do and what you mean by 'refresh page'. 2- Is there a function that lets me open a new window ? No, that's a client-side operation, use javascript. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Good news from afar can bring you a welcome visitor. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Editor
I am just surprised that noone mentioned HTML-Kit among all the editors suggested. I think it is fine and it even gives you a quick preview in browser window for HTML. It gives you PHP among various other options colouring the code differently and you can just highlight code to surround it with php tags for example. Does Java and other stuff too. Lots of plug-ins endlessly under development And it's FREE. I have it plugged in as the external text editor of choice with Dreamweaver. Regards Adrian Greeman Telephone +44 20 8672 9661 Mobile +44 780 329 7447 e-mail:- [EMAIL PROTECTED] or [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imgeupload to mysql beyond 1 kb fails
Hi Images under 1 kb uploads and shows fine. Images larger than this is inserted into database, with correct file size, but does not show when calling a php file get_image.php as a image. Below is from my database, the image with id 33 does not show, the image with id 34 do show. When having the larger image, it only shows a broken link, not the image. I can´t see any reason for this ?? Endre Slett 33 [BLOB]hydra.gif4023image/gif Endre Slett 34 [BLOB]hjerte.gif597 image/gif Regards Are Haugsdal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imgeupload to mysql beyond 1 kb fails
Hi Images under 1 kb uploads and shows fine. Images larger than this is inserted into database, with correct file size, but does not show when calling a php file get_image.php as a image. Below is from my database, the image with id 33 does not show, the image with id 34 do show. When having the larger image, it only shows a broken link, not the image. I can´t see any reason for this ?? Endre Slett 33 [BLOB]hydra.gif4023image/gif Endre Slett 34 [BLOB]hjerte.gif597 image/gif Regards Are Haugsdal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] protect code or something like..
Hi list, I have a project that was develop in a partnership, now this partners doesn't so partners anymore :-/ My question is there's a way to create a protection that I can trace if the software was installed in other servers?? I mean not hide the code, but put an important include of the project in another server and generate a log of the acess to it, or anything that can tell me who is installed and running the system. Thank's Rodrigo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Beginning / and end of word / in eregi_replace
Can it be true that PHP does not implement the beginning and end of word syntax of regular expressions? In builing a bad word filter, I find this... $outstring = eregi_replace(badword$,goodword,$stringtocheck); will find an occurance of the 'badword' at the end of the string and replace it. Similarly, $outstring = eregi_replace(^badword,goodword,$stringtocheck); will find an occurance of the 'badword' at the beginning of the string and replace it. Also, $outstring = eregi_replace(badword,goodword,$stringtocheck); will find all occurances of 'badword' even if they are part of a longer not so bad word like 'badwordage' and replace it. Then, $outstring = eregi_replace( badword ,goodword,$stringtocheck); will help me isolate just the actual bad word, but not those at the beginning and end of a string or that end in a period or comma. So I could make a rule for each possible placement of badword in a string and then do this for each vulger term I try to filter. Or I could just do... $outstring = eregi_replace(/badword/,goodword,$stringtocheck); Which should find any occurance of 'badword' and nothing more anywhere in the string. It works in grep. It works in bash. It does not seem to work in PHP. Anybody know what I might be doing wrong? ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editor
URL?? :) * * Cal Evans * Techno-Mage * http://www.calevans.com * - Original Message - From: Adrian Greeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 8:18 AM Subject: [PHP] Editor I am just surprised that noone mentioned HTML-Kit among all the editors suggested. I think it is fine and it even gives you a quick preview in browser window for HTML. It gives you PHP among various other options colouring the code differently and you can just highlight code to surround it with php tags for example. Does Java and other stuff too. Lots of plug-ins endlessly under development And it's FREE. I have it plugged in as the external text editor of choice with Dreamweaver. Regards Adrian Greeman Telephone +44 20 8672 9661 Mobile +44 780 329 7447 e-mail:- [EMAIL PROTECTED] or [EMAIL PROTECTED] -- 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] Regular expression newbie question, convert this: [::word1 \ word2\ word3::] to : .word1 word2 word3.
hi, i have been banging my head against the wall for hours trying to figure the expression out to perform the following: covert this: [::word1 \ word2 \ word3::] to: .word1 word2 word3. i would definitely appreciate any help given on this. thanks beforehand. lance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session variables in OOP....
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then W. Enserink declared Nick: thx for the tip, it removed the error, and might further be a good idea: except: do you know if I can declare session variables and use them in between the output buffer statements like this: (i tried it but it doesn't seem to work)?? Sorry, not sure, I've never actually had cause to use output buffering. You might want to ask the question specifically in a new thread. In fact: Please do, I'd be very interested to hear what the others think ;-) - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9ChHWHpvrrTa6L5oRAiucAJ9Zpydunune2hmPjaBvyMAE9GpYCQCfSJZy /2SzYVUDutkYu5821iyjscI= =rBgs -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editor
Google?? http://www.google.com/search?hl=enie=UTF8oe=UTF8q=HTML-Kit ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: Adrian Greeman [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 14, 2002 11:38 AM Subject: Re: [PHP] Editor URL?? :) * * Cal Evans * Techno-Mage * http://www.calevans.com * - Original Message - From: Adrian Greeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 8:18 AM Subject: [PHP] Editor I am just surprised that noone mentioned HTML-Kit among all the editors suggested. I think it is fine and it even gives you a quick preview in browser window for HTML. It gives you PHP among various other options colouring the code differently and you can just highlight code to surround it with php tags for example. Does Java and other stuff too. Lots of plug-ins endlessly under development And it's FREE. I have it plugged in as the external text editor of choice with Dreamweaver. Regards Adrian Greeman Telephone +44 20 8672 9661 Mobile +44 780 329 7447 e-mail:- [EMAIL PROTECTED] or [EMAIL PROTECTED] -- 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
Re: [PHP] Beginning / and end of word / in eregi_replace
You have your answer, just use this: $outstring = eregi_replace(badword,goodword,$stringtocheck); It'll replace it whether it's at the beginning or end of a string, embedded in a word, or by itself. Isn't that what you want? Actually, it'd be better and faster to just use str_replace() instead of a regular expression... ---John Holmes... - Original Message - From: John S. Huggins [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 11:37 AM Subject: [PHP] Beginning / and end of word / in eregi_replace Can it be true that PHP does not implement the beginning and end of word syntax of regular expressions? In builing a bad word filter, I find this... $outstring = eregi_replace(badword$,goodword,$stringtocheck); will find an occurance of the 'badword' at the end of the string and replace it. Similarly, $outstring = eregi_replace(^badword,goodword,$stringtocheck); will find an occurance of the 'badword' at the beginning of the string and replace it. Also, $outstring = eregi_replace(badword,goodword,$stringtocheck); will find all occurances of 'badword' even if they are part of a longer not so bad word like 'badwordage' and replace it. Then, $outstring = eregi_replace( badword ,goodword,$stringtocheck); will help me isolate just the actual bad word, but not those at the beginning and end of a string or that end in a period or comma. So I could make a rule for each possible placement of badword in a string and then do this for each vulger term I try to filter. Or I could just do... $outstring = eregi_replace(/badword/,goodword,$stringtocheck); Which should find any occurance of 'badword' and nothing more anywhere in the string. It works in grep. It works in bash. It does not seem to work in PHP. Anybody know what I might be doing wrong? ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- 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] protect code or something like..
Kind of. You can have it include() or fopen() something from another server and do whatever. But you have to realize that the code is still open on their page, so they can bypass or just comment out whatever you are trying to do. Search the archives, too. Wasn't there a huge discussion on this a couple months ago?? ---John Holmes... - Original Message - From: Rodrigo Peres [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Friday, June 14, 2002 11:37 AM Subject: [PHP] protect code or something like.. Hi list, I have a project that was develop in a partnership, now this partners doesn't so partners anymore :-/ My question is there's a way to create a protection that I can trace if the software was installed in other servers?? I mean not hide the code, but put an important include of the project in another server and generate a log of the acess to it, or anything that can tell me who is installed and running the system. Thank's Rodrigo -- 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] Passing variables from one page to another
Plain and simple...you have four options: COOKIE, GET, POST, SESSION. So, load all of your data into a cookie or load it into hidden elements in a form and submit it somewhere... Okay? ---John Holmes... - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Friday, June 14, 2002 10:16 AM Subject: [PHP] Passing variables from one page to another Hi, Does anyone have a PHP method of passing variables from a form to another page without using sessions or encoding within the URL? I remember someone mentioning a class but I lost the reference. My site uses PHP 4.0.1Pl1 Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML Feed
On Fri, Jun 14, 2002 at 11:35:04PM +1000, Necro wrote: I am currently trying to implement XML Parsing on a site using the XML News Feed of another site. The site puts two versions of the news in its file though: - item titleTsunami 2265 Date, Demo/title linkhttp://www.shacknews.com/onearticle.x/20959/link /item - ITEM SUBJECTTsunami 2265 Date, Demo/SUBJECT URLhttp://www.shacknews.com/onearticle.x/20959/URL CATEGORYGeneral/CATEGORY /ITEM Man, that's REALLY bad XML. I have a script that is meant to parse the file which is downloaded to a local file hourly. The trouble is that the script tries parsing both lots and I only wish it to parse the top half and to stop when it reaches the entries using SUBJECT tags. I'd stop when it hits the ending /item tag. Take a look at http://www.analysisandsolutions.com/code/phpxml.htm. For your case, in the EndHandler() function, put in the case 'ITEM' In that case, have the code process the data you've accumulated and exit. But, if you want to stick with your methodology, below, here's a possibility: if ((filemtime($rdffile) $refreshtime) || (filesize($rdffile) == 0)) { $RDF = fopen( $rdffile, 'w' ) or die( Cannot open $rdffile ); $FILE = fopen( $remote, 'r' ) or die( Cannot open $remote ); while (!feof( $FILE )) { $Line = fgets( $FILE, 1024 ); fwrite( $RDF, $Line); if ( preg_match('/\/item/', $Line) ) { break; } } fclose( $RDF ); fclose( $FILE ); } -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fast Templates to embed data into Flash files ?
Hi I'm about to start a project which involves building a 'website on a CD'. There will be similar areas and layouts, just containing different data, within the site pages. The pages will be a HTML framework containing Flash and QuickTime files etc. I've worked with Fast Templates and liked the technique used to separate design and data and was wondering if anyone has filled content in Flash files using a Fast Template type technique. The final step would be to freeze the contents into static .swf files so they can be cut to a CD (so basically the data needs to end up inside Flash files) I'm researching this option because it may save a lot of work in future if i build other products on a similar theme. Thanks Girish -- www.girishnath.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dreamweaver MX?
Does Dreamweaver MX have good PHP support? Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Shut down server
Could you restate this question? Sorry, I don't understand what you're asking. -Original Message- but the idea is another user only to start and shutdown the server. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Evaluation. Easy Question but I need some help
I'm trying to evaluate form submissions. When I return a form submission cause of a missing field I want the radio and checkboxes to reflect what the client submitted. So if somone forgets to fill in their address, but has done everything else fine, I dont want them to have to refill out the form. So how would I in PHP say if $var == value1 then this radio button is checked? And how do I do it and keeping the code compact? = Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shut down server
Hi, I want to make server on Linux Red Hat 7.2 to shutdown from WEB interface. A'll not have any access to this server. Server will not be connected to Internet - it's local for organization. I want one men from them only to turn on computer and to shutdown server via WEB interface without any administrative rights on server. I tried to shut down server with exex(/sbin/poweroff) but nothing happened! Can someone tell me how I could make shut down the server via PHP command or executing Linux command? Is it possible ? Thanks, Rosen Ed Lazor [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Could you restate this question? Sorry, I don't understand what you're asking. -Original Message- but the idea is another user only to start and shutdown the server. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Evaluation. Easy Question but I need some help
So how would I in PHP say if $var == value1 then this radio button is checked? And how do I do it and keeping the code compact? input type=checkbox ?php if ($var == value1) echo CHECKED;? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anyone have any experience with the EXEC function?
I am trying to exec a perl script from my php code. Here is what I have: exec(perlpath/perlscript.pl $var, $array) The perl script runs fine as I am piping the results to a txt file also...so I know that the script is running fine. I am printing the result of the perl script to STDOUT which is what is recommended in order to retrieve the result of the perl script back into PHP through the $array variable set above. However in my php the $array is always empty? After the perl script has run I am doing this in PHP: $error = $array[0]; echo $error; Is my syntax correct? Any help is greatly appreciated. Thank you, Batch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Beginning / and end of word / in eregi_replace
On Fri, 14 Jun 2002, 1LT John W. Holmes wrote: -You have your answer, just use this: - -$outstring = eregi_replace(badword,goodword,$stringtocheck); - -It'll replace it whether it's at the beginning or end of a string, embedded -in a word, or by itself. Isn't that what you want? - Not quite. I want to replace words like ass and leave works like assumption in place. Actually, I did find the answer to the beginning and end of word regex syntax. It is. $outstring = \ eregi_replace([[::]]badword[[::]],goodword,$stringtocheck); This constrains the word and will only act if it is surrounded by non-alpha characters. It acts just like / and /. I found this answer in the MySQL web page of all things... http://www.mysql.com/doc/R/e/Regexp.html Thanks for your input. John -Actually, it'd be better and faster to just use str_replace() instead of a -regular expression... - John Holmes... - -- Original Message - -From: John S. Huggins [EMAIL PROTECTED] -To: [EMAIL PROTECTED] -Sent: Friday, June 14, 2002 11:37 AM -Subject: [PHP] Beginning / and end of word / in eregi_replace - - - - Can it be true that PHP does not implement the beginning and end of word - syntax of regular expressions? - - In builing a bad word filter, I find this... - - $outstring = eregi_replace(badword$,goodword,$stringtocheck); - - will find an occurance of the 'badword' at the end of the string and - replace it. - - Similarly, - - $outstring = eregi_replace(^badword,goodword,$stringtocheck); - - will find an occurance of the 'badword' at the beginning of the string - and replace it. - - Also, - - $outstring = eregi_replace(badword,goodword,$stringtocheck); - - will find all occurances of 'badword' even if they are part of a longer - not so bad word like 'badwordage' and replace it. - - Then, - - $outstring = eregi_replace( badword ,goodword,$stringtocheck); - - will help me isolate just the actual bad word, but not those at the - beginning and end of a string or that end in a period or comma. - - So I could make a rule for each possible placement of badword in a string - and then do this for each vulger term I try to filter. Or I could just - do... - - $outstring = eregi_replace(/badword/,goodword,$stringtocheck); - - Which should find any occurance of 'badword' and nothing more anywhere in - the string. It works in grep. It works in bash. It does not seem to - work in PHP. - - Anybody know what I might be doing wrong? - - ** - - John Huggins - VANet - - [EMAIL PROTECTED] - http://www.va.net/ - - ** - - - -- - 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 - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] closing mysql connections
How necessary is this? Don't connections close automatically after the page finishes executing? What are the general rules for closing connections and freeing query results? David McInnis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone have any experience with the EXEC function?
On Saturday 15 June 2002 00:57, Batch wrote: I am trying to exec a perl script from my php code. Here is what I have: exec(perlpath/perlscript.pl $var, $array) Using exec() like this would put the exit code of your perl script into $array -- which isn't what you want. Use shell_exec() or backticks: $array = `perlpath/perlscript.pl $var`; Note that $array is in fact a string and not an array! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You have all the characteristics of a popular politician: a horrible voice, bad breeding, and a vulgar manner. -- Aristophanes */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] closing mysql connections
How necessary is this? Very. Don't connections close automatically after the page finishes executing? Correct. All variables are released and all connections are closed automatically by PHP upon script completion. What are the general rules for closing connections and freeing query results? General rule: Thank PHP for taking care of it for you. -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] row pointer
Hey Zac: On Fri, Jun 14, 2002 at 08:59:02AM +0100, Zac Hillier wrote: I'm looking for a php function that will return the position of the pointer in a mysql recordset. I don't think there is one. You could use a counter variable as you're looping through each row to keep track of where you are. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expression newbie question, convert this: [::word1 \ word2 \ word3::] to : .word1 word2 word3.
Lance: On Fri, Jun 14, 2002 at 11:41:34PM +0800, Lance wrote: [::word1 \ word2 \ word3::] to: .word1 word2 word3. While I don't know if this is really what you need, it does do exactly what you want to do in your example: $Replace['\\'] = ''; $Replace['::'] = '.'; $Replace['['] = ''; $Replace[']'] = ''; $UserInput = '[::word1 \ word2 \ word3::]'; echo strtr($UserInput, $Replace); --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dreamweaver MX?
Yes, download it and see. Gives you a GUI to program recordsets from the database, and drag and drop for results. Other PHP stuff along with highlighting built in. If it didn't cost so much, I'd recommend it. ---John Holmes... -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Dreamweaver MX? Does Dreamweaver MX have good PHP support? Thanks, -Ed ** ** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- 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] closing mysql connections
Use it in your code; it'd be a good programming habit to get into. --John Holmes... -Original Message- From: David McInnis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:57 PM To: [EMAIL PROTECTED] Subject: [PHP] closing mysql connections How necessary is this? Don't connections close automatically after the page finishes executing? What are the general rules for closing connections and freeing query results? David McInnis -- 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] Re: Dreamweaver MX?
Hello Does Dreamweaver MX have good PHP support? Their initial support (PHP_MySQL as known as a server model) is quite nice. However, we have released PHAkt 2 MX (still free and GPL and kicking) , with a lot of goodies included: PHAkt 2 beta improvements over the PHP_MySQL Server Model - Multiple Database support (using ADOdb 2.0.0) ADOdb improvements to correctly return data types - Unified Database Connection The UltraDev and the PHP connection are now unified in a single connection using HTTP access. - User Authentication Server Behaviors - Master / Detail page set creation server behavior - Create Dynamic tables from RecordSets - Recordset Insert / Update Form - Go to related / detail page - Improved RecordSet (Using Limited Recordset for improved performance) - Code Reuse (Using functions.inc.php) - Small-Size generated files For example, an Update Record page has 26 lines of PHP code of 60 total lines PHAkt 2 final new features - Date Locale support - Multiple and extensible recordset support - Other speed and usability improvements Even if the final version will be released in a week or two, we are confident that our server model is a very good improvement over the MM one. Alexandru Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] row pointer
Keep track of it yourself as you loop through the data. Maybe if you explained what you need overall then we could suggest a method... ---John Holmes... -Original Message- From: Zac Hillier [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 3:59 AM To: [EMAIL PROTECTED] Subject: [PHP] row pointer Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac -- 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] Header URL question
I wanted to return to a specific page in a small web app I am writing, which is based on a variable for each individual record. I just tried header(Location: customer.php? . $btn . ); exit; and although syntactically correct it did not work. I am going to try a couple of other things but I wanted to see if any of you had thoughts on this. HAGW! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Header URL question
oops, never mind, I think I see the problem...a missing btn= -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:59 PM To: [EMAIL PROTECTED] Subject: [PHP] Header URL question I wanted to return to a specific page in a small web app I am writing, which is based on a variable for each individual record. I just tried header(Location: customer.php? . $btn . ); exit; and although syntactically correct it did not work. I am going to try a couple of other things but I wanted to see if any of you had thoughts on this. HAGW! Jay -- 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] Variable Result is not displayed
Hi there, To work on some scripts, I have install PHP 4.02 on a IIS 5.1 server. (on my own XP machine) I have setuped PHP following install.txt procedure. When I try to run my scripts they works fine exept for the variables results that are not displayed. I have upload this script on my web site and all is working fine. So I assume there is a misconfiguration on my PHP.ini or a missing extension or . Thanks for your help. J0s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dreamweaver MX?
It also has support for snippits, or a code library that you can add, edit or delete. Saves alot of time in re-using code. I definately recommend it, not only for that reason for but for the code debugging options available. HTH Jas John Holmes [EMAIL PROTECTED] wrote in message 002101c213ca$36cfba20$b402a8c0@mango">news:002101c213ca$36cfba20$b402a8c0@mango... Yes, download it and see. Gives you a GUI to program recordsets from the database, and drag and drop for results. Other PHP stuff along with highlighting built in. If it didn't cost so much, I'd recommend it. ---John Holmes... -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Dreamweaver MX? Does Dreamweaver MX have good PHP support? Thanks, -Ed ** ** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- 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] Variable Result is not displayed
Could you include some of your code? -Original Message- When I try to run my scripts they works fine exept for the variables results that are not displayed. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dreamweaver MX?
Thanks everyone. I'll check it out. much. -- 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 This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] beginner in PHP
So how do I affect the local copies of the variables. The global() doesn't seem to work. Should I take everything out of the function and just use if statements? -Original Message- From: Tim Ward [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 3:46 AM To: [EMAIL PROTECTED]; Tim Ward; Martin Towell; Tom Rogers; Php Subject: RE: [PHP] beginner in PHP You're insetting the variables within the chout() function only This has no effect on the local copies as they are not in scope here. You have successfully destroyed the session so when you refresh they are unset. What I do with sessions is keep them all within a session array so you can then destroy the session locally by unsetting that array. If I have a function that I want to change session variables at all I make it take the session in as a parameter and pass it back as the return value. Tim Ward -Original Message- From: Phillip Perry [SMTP:[EMAIL PROTECTED]] Sent: 13 June 2002 19:45 To: Tim Ward; Martin Towell; Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Yes, here is the checkout code I used... function chout(){ session_destroy(); unset ($mycart); unset ($cart_items); echo pThank you for shopping!/p; } Any suggestions? -Original Message- From: Tim Ward [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:18 AM To: Martin Towell; Tom Rogers; Php; Phillip Perry Subject: RE: [PHP] beginner in PHP From the symptoms it sounds like you're destroying the session okay but leaving the variables In the script. Are you sure you're unsetting them at the appropriate scope level. Tim Ward www.chessish.com http://www.chessish.com -- From: Phillip Perry [SMTP:[EMAIL PROTECTED]] Sent: 13 June 2002 05:18 To: Martin Towell; Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Thanks Martin!! That really helped out a lot. And thanks to all who tried to help me. I appreciate it! I have one other question that is really not so much important as it is annoying, but I can't figure it out myself. I'm practicing with sessions. What I'm making..if you couldn't tell by the array output from before...is a test shopping cart. Now the annoyance is that when I click the checkout link it's just supposed to destroy the session and reset everything to 0 including the shopping cart. And also if an item is clicked, that item gets deleted. With both choices when I click once the session does get destroyed, but everything stays on the page until I refresh the page. I want the info to get reset when I click the link. Here's the delete and checkout code...remember they both do actually work, just not as I want. Any suggestions on how to make it refresh on a click only? / DELETE SHOPPING CART ITEMS function chout(){ session_destroy(); $mycart = array(); $cart_items = 0; echo pThank you for shopping!/p; } if ($action == delnow) { unset($mycart[$itemid]); } // END DELETE SHOPPING CART ITEMS if ($action == checkout) { chout(); } -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:55 PM To: '[EMAIL PROTECTED]'; Tom Rogers; Php Subject: RE: [PHP] beginner in PHP here's the revised loop $cat_cnt = count($catalog); while (list($key,$value) = each($mycart)) { for ($j = 0; $j $cat_cnt; $j++) if ($value == $catalog[$j][itemcd]) { echo $catalog[$j][unitprice]; break; } } -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:50 PM To: '[EMAIL PROTECTED]'; Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Ah! $catalog is a 2D array - any your if statement is expecting a 1D array... -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:52 PM To: Tom Rogers; Php Subject: RE: [PHP] beginner in PHP I meant Martin :) sorry. -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:44 PM To: Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Array ( [0] = gerainiums [1] = roses [2] = roses [3] = roses [4] = roses [5] = roses ) 1 1 Your output is different from the last print_r that Tom had me do. I wonder why that is -Original
[PHP] Re: Variable Result is not displayed
Here is an example of the test script. sample.php ? $result=$who. works as a .$what. in .$where.. He/She can be contacted at: .$web..; print result=.$result; print loading=NO; ? Nota : The variable are passed throught a Flash form. In this case, if the script is uploaded on my web site the result is : Name Test works as a Web developper in Montreal. He/She can be contacted at : My Web Site. But on my own machine the result is : works as a Web in. He/She can be contacted at :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Variable Result is not displayed
make sure global variables are enabled in your php.ini -Original Message- From: J0s [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Variable Result is not displayed Here is an example of the test script. sample.php ? $result=$who. works as a .$what. in .$where.. He/She can be contacted at: .$web..; print result=.$result; print loading=NO; ? Nota : The variable are passed throught a Flash form. In this case, if the script is uploaded on my web site the result is : Name Test works as a Web developper in Montreal. He/She can be contacted at : My Web Site. But on my own machine the result is : works as a Web in. He/She can be contacted at :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML and parameter entities
Hello, I'm having a hard time getting expat to parse parameter entities and I'm wondering if any one tried this before (general entities work fine) sample xml: ?xml version='1.0'? !DOCTYPE alfs [ !ENTITY % common_entities SYSTEM 00-entities-00 %common_entities; ] . - as the name suggests, the file 00-entities-00 contains common general entities shared between multiple .xml's Expat's external_entity_ref_handler doesn't catch parameter entities, but I'm not even sure it should. How should I parse this ? Any hints appreciated Pawel PS. php version 4.3.0-dev (cli) (yesterday's cvs) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Variable Result is not displayed
Thanks a lot! Ok this programm began to be interesting. I will try to stop to be a Newbie. : )) Ed Lazor [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... make sure global variables are enabled in your php.ini -Original Message- From: J0s [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Variable Result is not displayed Here is an example of the test script. sample.php ? $result=$who. works as a .$what. in .$where.. He/She can be contacted at: .$web..; print result=.$result; print loading=NO; ? Nota : The variable are passed throught a Flash form. In this case, if the script is uploaded on my web site the result is : Name Test works as a Web developper in Montreal. He/She can be contacted at : My Web Site. But on my own machine the result is : works as a Web in. He/She can be contacted at :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question about global variables
Hi, Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in. I am trying to implement a 'stack' feature where I can place/remove information into/out of the array. Thanks, Don
RE: [PHP] bulk mail()
I've been doing the following sending personalized mail to 600+ recipients, so far without any signs of discomfort anywhere: set_time_limit($total_rows * 1); // up the script timeout 1 second per email BTW, I use qmail; not sendmail. As I've never used sendmail, I don't know if this is part of your problem or not. I'm guessing a bit, but based on 600+ emails, I'd say that the script itself takes about 10-15 seconds; the mail to be delivered takes a bit longer, perhaps another minute or two. Jeff -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 6:45 AM To: php Subject: [PHP] bulk mail() Hi all, I've got a mailing on a website, with email address' / names / etc in a MySQL table. I think there's around 120 on it at the moment. I've been noticing a growing lag on the sending of mail though... I've got a script which takes a message from a form, then runs a while loop through the rows of the mailing_list table, replacing a special string with the subscribers name, and sending using the mail() command. However, this time, the script actually failed, with a failure when attempting to access blah.com/foo.php (the sending script). I have no idea if SOME people got the email, or what, and have no idea how to check. So, I make the assumption that as the mailing list has grown, the script time has slowed... now it's too big (or the server was too busy) to process all the emails before the script timed out. If I didn't want to personalise the emails, I'm sure the script would run a lot quicker with every address in the Bcc header, but since we personalise each email, I can't see any option other than using mail() 200 times... and it's only going to get a lot worse as we climb to 1000+. So, what options do I have? Break the mailing list up into batches of 40 or so? How would I implement something like this? Any advice / concepts / ideas welcome! Justin French Creative Director http://Indent.com.au -- 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] Question about global variables
I don't think this is possible to setup a global way you're thinking, but I do believe that you can still accomplish the effect you're looking for. First of all, exactly what kind of information will you be storing in the array? You say it needs to be empty the 'first time in'. Does that mean per user? -Kevin - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Friday, June 14, 2002 1:08 PM Subject: [PHP] Question about global variables Hi, Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in. I am trying to implement a 'stack' feature where I can place/remove information into/out of the array. Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] bulk mail()
-Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 6:45 AM To: php Subject: [PHP] bulk mail() Hi all, I've got a mailing on a website, with email address' / names / etc in a MySQL table. I think there's around 120 on it at the moment. I've been noticing a growing lag on the sending of mail though... I've got a script which takes a message from a form, then runs a while loop through the rows of the mailing_list table, replacing a special string with the subscribers name, and sending using the mail() command. You're using something like mysql_fetch_array and not querying the db 120 times I hope. However, this time, the script actually failed, with a failure when attempting to access blah.com/foo.php (the sending script). I have no idea if SOME people got the email, or what, and have no idea how to check. go through the your MTA's logs (long and painful process) So, I make the assumption that as the mailing list has grown, the script time has slowed... now it's too big (or the server was too busy) to process all the emails before the script timed out. The time your MTA takes to process the emails has nothing to do with this. 120 calls to mail() should not time out, maybe you have a complicated regexp for fixing that name in the emails what's the body of your while() loop ? If I didn't want to personalise the emails, I'm sure the script would run a lot quicker with every address in the Bcc header, but since we personalise each email, I can't see any option other than using mail() 200 times... and it's only going to get a lot worse as we climb to 1000+. putting 120 email addresses in one bcc will surely get your email classified as spam So, what options do I have? Break the mailing list up into batches of 40 or so? How would I implement something like this? you could try adding a column in your db that will reflect the last time you've sent an email to that person. Then you could just append LIMIT 40 to your select query, but updating the column requires a separate query (1 update per email if you want to know exactly how got the email and who didn't) Pawel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about global variables
Cookies Session variables - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Friday, June 14, 2002 2:08 PM Subject: [PHP] Question about global variables Hi, Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in. I am trying to implement a 'stack' feature where I can place/remove information into/out of the array. Thanks, Don