Re: [PHP] a test (list is too quite)
On 09/04/2010 06:47 PM, chris h wrote: Evidently all is well in the world of php... :) On Sat, Sep 4, 2010 at 12:45 PM, tedd t...@sperling.com wrote: Hi gang: Just checking to see if I am still receiving postings. :-) Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php troll It must be enterprise-ready then ;) /troll regards, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a test (list is too quite)
On 09/04/2010 08:03 PM, Floyd Resler wrote: On Sep 4, 2010, at 1:00 PM, tedd wrote: At 12:47 PM -0400 9/4/10, chris h wrote: Evidently all is well in the world of php... :) If it was so, we would all be out of work. Instead, I think it's the lull before the storm. I'll ask a question to stir things up. :-) Cheers, tedd Good idea. Here's my question: How can I make javascript communicate with MySQL using FTP while sending a proxy through HTML that utilizes XML and SMTP? :) Take care, Floyd I have a wonderfully simple solution to that, but this margin is too small to write it down. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am not receiving any e-mail from the list...
Jay Blanchard wrote: ..and I haven't for a while. Is anyone else having this problem? If you are you will not see this. If they are, how can they wonder if they have this problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Appeal from Monty
rich...@rgraph.net wrote: Hi, You might have already seen this, however if you haven't this may interest you: http://monty-says.blogspot.com/2009/12/help-saving-mysql.html Sent my appeal to comp-merger-regis...@ec.europa.eu and I would suggest everyone on this list does the same. The European Union does not exactly have a good track record when it comes to software and patents. Best regards, Stijn Verholen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form Validation
Ashley Sheridan wrote: On Wed, 2009-08-12 at 12:21 -0400, Micheleh Davis wrote: Please help. My form validation worked fine until I added the terms check at the bottom. Any ideas? //form validation step one function validateStep1(myForm){ // list of required fields with (myForm) { var requiredFields = new Array ( firstName, lastName, phone, email, terms) } // check for missing required fields for (var i = 0; i requiredFields.length; i++){ if (requiredFields[i].value == ){ alert (You left a required field blank. Please enter the required information.); requiredFields[i].focus(); return false; } } // check for valid email address format var eaddress= myForm.email.value; var validaddress= /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})$/; //var validaddress= /^((\w+).?(\w+))+...@\w+/i; var result= eaddress.match(validaddress); if (result == null) { alert (Please enter your complete email address.); myForm.email.focus(); return false; } // check for valid phone format var check= myForm.phone.value; check= check.replace(/[^0-9]/g,); if (check.length 10) { alert (please enter your complete phone number.); return false; }//end if return true; //begin terms and conditions check var termsCheck= myForm.terms.value; if (bcForm1.checked == false) { alert ('Please read and select I Agree to the Terms and Conditions of Service.'); return false; } else { return true; } //end terms check Erm, where's the PHP code in that? Thanks, Ash http://www.ashleysheridan.co.uk Indeed. And I hope that there is server-side form validation also. HTH, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Clarity needed
Yannick Mortier wrote: 2009/2/4 tedd t...@sperling.com: Hi gang: I need some fog removed. I have a problem where I have an unlimited number of tutors teaching an unlimited number of courses. When I call upon a tutor, I want to see all the courses they teach. In my old days, I would just set up a linked list of courses and attach it to the tutor (another linked list). As a tutor adds courses, I would just add the course to the end of the linked list. If the tutor deletes a course, then I would remove it from the list by changing a single pointer. If I needed a list of all the courses the tutor taught, I would just run down the linked list pulling them out as needed. But now I have to think in terms of records in a database. I'll eventually figure it out, but what are your suggestions/solutions? I understand that I can have one record set up for each tutor, and another record set up for each course, and then tie the two together by another record like an assignment. That way I can have as many assignments as I want tying courses to tutors. It that the way you guys would do it? Thanks, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Hi, tedd! Though you might think that this is a stupid task I can recommend you to draw a little entity-relationship model. It quite helps you to overlook the structure of the database that you want to design. It has got different relations between the data and defines a way to represent those in the database. If you are interested in this you can look in wikipedia here: http://en.wikipedia.org/wiki/Entity-relationship_model Since I heard from these models the first time I always use them and I had no more database changes after I started coding since then. Greetings Hey Tedd, Your idea is correct. The keyword you're looking for is 'atomary data', where you have just 1 occurrence of a particular type of information in your entire database. In your case, this translates to: - A single table for tutors (`tutors`) - A single table for courses (`courses`) - A table that combines these two (`tutors_courses`) Basically, what you're doing here is what you did in 'the old days': you're creating a linked list, but on the database level (and more efficient probably; certainly easier to manage). DB queries will cause you some headaches at first, if you're not used to this. You'll be using JOIN instructions to pull data out of the db. I use InnoDB for this type of stuff (it validates the link). Sample query: SELECT `tutors`.`name` AS `tutor_name`, `courses`.`course` AS `course` FROM `tutors_courses` AS `tc` LEFT JOIN `tutors` AS `t` ON `t`.`id` = `tc`.`tutor` LEFT JOIN `courses` AS `c` ON `c`.`id` = `tc`.`course` WHERE whatever you're filter is HTH, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable Scope problem passing function parameters
Jim McIntyre wrote: I'm new to PHP 5 and classes, but I've done a lot of ActionScript. I'm trying to use PHPMailer inside my own class (a service for AMFPHP). I'm having problems getting the data that'spassed into my class's send() method to the instance of the PHPMailer. Basically, I have this: class EmailAMF { public function send ($from, $to, $subject, $body) { require('class.phpmailer.php'); $phpMail = new PHPMailer(); $phpMail-From = $from; $phpMail-AddAddress($this-to); $phpMail-Subject = $subject; $phpMail-Body = $body; return $phpMail-Send(); } } As far as I can tell, it sends an essentially blank email to nobody (but returns true. If I replace any of my function variables with strings, like this: $phpMail-AddAddress('m...@example.com'); the email actually gets that data. What am I missing? Thanks, Jim $this - to it has no meaning in the scope of your class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] namespaces ... coming to a php5.3 near you.
Jochem Maas wrote: Jochem Maas schreef: has anyone here downloaded/compiled 5.3 and played with namespaces? have you encountered any issues/problems? so no-one? really? none of you muppets ever even smelled a namespace? I'd like to hear from you as I've been asked to compile a reference documenting anything/everything people may have come across (so far as namespaces go), if you have some reproduce code, all the better. rgds, Jochem I haven't tried php namespaces yet, but have implemented them for my own projects, to 1) avoid the ever enduring hassle of setting directory paths for every host where the project lives in one form or another (dev, test, production). 2) calling classes according to their logical structure, in stead of figuring out in what freaking folder I put the class. namespaceMyProjectName('db.mysql.MySqlHandler'); Nice and easy, although at a performance cost atm. I'm looking forward to seeing how PHP handles it. greetz, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] _SERVER['DOCUMENT_ROOT'] not set?
Does Zend use a separate instance of Apache or some other webserver ? Stijn Saurabh Agrawal wrote: In one of the examples, I am supposed to access _SERVER['DOCUMENT_ROOT']. However, when I am seeing its value in the debug stack, I am getting it to be null! Even phpinfo() is showing that this particular variable does not even exist, though there are other _SERVER[''] declarations. What's DocumentRoot set to in your Apache config? (httpd.conf) Check any VirtualHost blocks you might have, too. What's the result of print_r($_SERVER); ? In httpd.conf, DocumentRoot D:/xampp/htdocs No VirtualHost blocks. David, I just found a thing. I had been running this script within the Zend IDE, looking at output in the IDE itself. Now that I see the output in Firefox, I can see the variable in phpinfo(), as well as in the output of print_r($_SERVER). It must be something to do with Zend, then. Is that it? Even the output of print_r contains the line [DOCUMENT_ROOT]=D:/xampp/htdocs in Firefox, but no such line in Zend! Thanks for the help! Saurabh. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Semi-ADVERT, not really spam, sorry for it
V S Rawat wrote: If you provide paid help in code development/ testing/ troubleshooting related to php or other software areas, please feel free to drop a line to me at my id mentioned below. Please don't write here as some other members might find this off topic. Sorry for bothering the rest of you. I hope you wouldn't really mind if some of our colleagues who are doing such a lovely volunteer work here get to earn some money for a bottle of beer and more. Rest assured that it is no fraud/ scam/ cheating. I am very much here to take the brickbats. Thanks. -- V vsrawat at gmail dot com Imo, it is both off-topic and inappropriate. Moreover, I have not seen your name in any of the topics on this list or remembered it in any reply, as opposed to many others who take time from their busy schedules to give something back, free of charge. This does not inspire much confidence in your qualities or determination. There are many channels out there that would be beneficial to your goals, e.g. wendo, ogone and the likes. Please take your commercial goals there. Just my two cents. Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Semi-ADVERT, not really spam, sorry for it
V S Rawat wrote: On 8/19/2008 4:53 PM India Time, _metastable_ wrote: Imo, it is both off-topic and inappropriate. That could be individual opinion. :-) Moreover, I have not seen your name in any of the topics on this list or remembered it in any reply, Your memory might be playing tricks on you: http://groups.google.co.in/group/php.general/browse_thread/thread/de49b2b04c4eaa89/f59226fdf1b539ba?hl=enlnk=gstq=vsrawat#f59226fdf1b539ba Newbie problem: Php script not running in browser. I have posted about that in c.l.php also. I had also posted a thread about aioe bouncing posts to php groups on account of HTML Tags. as opposed to many others who take time from their busy schedules to give something back, free of charge. This does not inspire much confidence in your qualities or determination. you seem to be bent on not inspiring that. There are many channels out there that would be beneficial to your goals, e.g. wendo, ogone and the likes. Please take your commercial goals there. You seem to be having something against commercial dealings. Seems you dad-in-law has enough money. Just my two cents. Stijn Thanks. I did indeed misread your post, but it was also confusing. Good luck in your quest ! regards, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Semi-ADVERT, not really spam, sorry for it
Jochem Maas wrote: metastable schreef: V S Rawat wrote: If you provide paid help in code development/ testing/ troubleshooting related to php or other software areas, please feel free to drop a line to me at my id mentioned below. Please don't write here as some other members might find this off topic. Sorry for bothering the rest of you. I hope you wouldn't really mind if some of our colleagues who are doing such a lovely volunteer work here get to earn some money for a bottle of beer and more. Rest assured that it is no fraud/ scam/ cheating. I am very much here to take the brickbats. Thanks. -- V vsrawat at gmail dot com Imo, it is both off-topic and inappropriate. which the subject made pretty clearly, use common sense and ignore such mails if they don't interest you. The subject made clear__ that this was an advert, not a job offering. Moreover, I have not seen your name in any of the topics on this list or hadn't seen yours either, at least Rawat is a real name. and for the record he has posted 2 more messages to the list than you have this year (your massive contribution ammounts to 7 posts since Nov'07) ... Rawat's first post started with the words 'Newbie Problem' so he's indentified himself as a beginner and therefore it's in everyone's interest that he do alot more reading (and asking questions) rather than replying to other's questions with the limited knowledge he has atm. You must really have nothing better to do than to look up statistics on posting behaviour. Slow day ? :) I stand by my point though. Had it actually been an advert, which it was not, a post count of 9 would not inspire confidence in his qualities as a determined support engineer. remembered it in any reply, as opposed to many others who take time from their busy schedules to give something back, free of charge. This does not inspire much confidence in your qualities or determination. There are many channels out there that would be beneficial to your goals, e.g. wendo, ogone and the likes. Please take your commercial goals there. He's looking for a little off-list help for which he is apparently willing to offer some kind of compensation ... plenty of other's have done the same in the past, some of us occasionally even take people up on their offer and I've actually earned more dollars that way than you've posted words to this list. Seems to me you either have a pathetic grasp of the english language or you can't be bothered to read. Just my two cents. indeed. PS - for those that know, I'm back ... with a vengeance. I'm sure everyone here spent these last couple of weeks wandering aimlessly in your abscence, hoping that you would find a post suitable enough to direct your vengeance at. Welcome back. regards, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: [PHP-DOC] ftp help
Thiago H. Pojda wrote: Forwarding to correct list. -- Forwarded message -- From: Dan [EMAIL PROTECTED] Date: Fri, Jul 4, 2008 at 1:56 PM Subject: [PHP-DOC] ftp help To: [EMAIL PROTECTED] I am using a php script to connect to an ftp server. However, the server requires a password change every 90 days. Any ideas on how to handle this? Yes. This can be accomplished in the following steps: 1) change password every 90 days HTH Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: [PHP-DOC] ftp help
Thiago H. Pojda wrote: Forwarding to correct list. -- Forwarded message -- From: Dan [EMAIL PROTECTED] Date: Fri, Jul 4, 2008 at 1:56 PM Subject: [PHP-DOC] ftp help To: [EMAIL PROTECTED] I am using a php script to connect to an ftp server. However, the server requires a password change every 90 days. Any ideas on how to handle this? Yes. This can be accomplished in the following steps: 1) change password every 90 days HTH Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists
Daniel Brown wrote: On Mon, Jul 7, 2008 at 11:43 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: They can be what? I was wrong, the S is $_SERVER not $_SESSION. Sorry, Shawn. That message was meant for the OP, but I clipped your message to send a response to you as well. Disregard. The body is here, but the brain is still on the beach in Florida. Cliff, is that you ? Cliff Clavin ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session cookie doesn't work
Hey, Your session will expire, regardless of the call to session_set_cookie_params. If you're looking to propagate a session across time, you should look at keeping your session data in a database (google: session_set_save_handler, there's a good tutorial on the zend site), then calling a table row based on a cookie you set independently of the session. Based on the configuration you presented, I don't see why the following code shouldn't give you the expected results: ## test1.php ## ?php session_start(); $_SESSION['name'] = 'Kevin'; ? a href=test2.phptest2/a ### ## test2.php ## ?php session_start(); echo $_SESSION['name']; // If the above doesn't work, try doing a print_r($_SESSION) and let us know what that brings up. ? ### If for some reason I am not aware off, your typical setup doesn't automatically save the session before exiting the script, you could try ending your scripts with: ?php session_write_close(); ? As a general tip, I suggest you set your error_reporting to E_ALL on your development machine. That would print out a notice when a certain index or key is not set in an array. best regards, Stijn Teck wrote: Hi, I'm working to use cookie to maintain session data across multiple pages in PHP4.42. I have the following two scripts, where I think the second file outputs a data in a session variable. file 1 - test_1.php # ?php session_set_cookie_params(360 * 24 * 3600); session_start(); $_SESSION['name'] = Kevn; ? a href=test_2.php?php? echo SID ?Go next/a ## file 2 - test_2.php ## ?php session_start(); echo $_SESSION['name']; // Here I expect to show the word Kevin ? ## phpinfo() tells me that * Session Support enabled * session.auto_start Off * session.bug_compat_42 On * session.bug_compat_warn On * session.cache_expire 180 * session.cache_limiter nocache * session.cookie_domain no value * session.cookie_path / * session.cookie_secure Off * session.entropy_file no value * session.entropy_length 0 * session.gc_divisor 100 * session.gc_maxlifetime 1440 * session.gc_probability 0 * session.name PHPSESSID * session.referer_check no value * session.save_handler files * session.save_path /var/lib/php4 * session.use_cookies On * session.use_only_cookies On * session.use_trans_sid On What am I missing? In file 1, I also tried a href=test_2.phpGo next/a . I've been learning PHP using various books and websites. Still I don't solve this issue. Any help would be apprecaited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session cookie doesn't work
Hey Teck, If the session works when you append the session id to the URL, I would think that the session_save_path is ok and writable. You can assure yourself that it is indeed the case, by going to your session.save_path and checking out the contents of the session files there. Better practice might be to create a directory under /tmp, chmod it to 700 and use that as the session.save_path. In general, it will be the user running apache that writes to all the paths, so at least that user (probably apache:apache) needs read, write and execute permissions for the directory. I don't know anything about the cookie_path, and can't find a decent explanation as to what it does at the moment. I would say your browser rejects cookies, or is at least setup to reject cookies from your domain (localhost, I assume). Could you check that out ? Greetz, Stijn Teck wrote: Thanks Stijn for your advice. I wonder if my session.save_path /var/lib/php4 is correct. Who should be the owner of the directory? Is there any permission settings I need to care about? I also consider session.cookie_path /. After searching, it means cookies are avaiable for all the directories under, let's say, http://www.example.com/ . So if I work only at http://example.com/myspace , would it be better to change the path? What permissions are required to the path? Sessions work when I use URL as paramers such as http://www.example.com?SESSID=3u498q7rtq34897 . But I want to make session cookies work. - T On Nov 26, 2007, at 8:12 PM, metastable wrote: Hey, Your session will expire, regardless of the call to session_set_cookie_params. If you're looking to propagate a session across time, you should look at keeping your session data in a database (google: session_set_save_handler, there's a good tutorial on the zend site), then calling a table row based on a cookie you set independently of the session. Based on the configuration you presented, I don't see why the following code shouldn't give you the expected results: ## test1.php ## ?php session_start(); $_SESSION['name'] = 'Kevin'; ? a href=test2.phptest2/a ### ## test2.php ## ?php session_start(); echo $_SESSION['name']; // If the above doesn't work, try doing a print_r($_SESSION) and let us know what that brings up. ? ### If for some reason I am not aware off, your typical setup doesn't automatically save the session before exiting the script, you could try ending your scripts with: ?php session_write_close(); ? As a general tip, I suggest you set your error_reporting to E_ALL on your development machine. That would print out a notice when a certain index or key is not set in an array. best regards, Stijn Teck wrote: Hi, I'm working to use cookie to maintain session data across multiple pages in PHP4.42. I have the following two scripts, where I think the second file outputs a data in a session variable. file 1 - test_1.php # ?php session_set_cookie_params(360 * 24 * 3600); session_start(); $_SESSION['name'] = Kevn; ? a href=test_2.php?php? echo SID ?Go next/a ## file 2 - test_2.php ## ?php session_start(); echo $_SESSION['name']; // Here I expect to show the word Kevin ? ## phpinfo() tells me that * Session Support enabled * session.auto_start Off * session.bug_compat_42 On * session.bug_compat_warn On * session.cache_expire 180 * session.cache_limiter nocache * session.cookie_domain no value * session.cookie_path / * session.cookie_secure Off * session.entropy_file no value * session.entropy_length 0 * session.gc_divisor 100 * session.gc_maxlifetime 1440 * session.gc_probability 0 * session.name PHPSESSID * session.referer_check no value * session.save_handler files * session.save_path /var/lib/php4 * session.use_cookies On * session.use_only_cookies On * session.use_trans_sid On What am I missing? In file 1, I also tried a href=test_2.phpGo next/a . I've been learning PHP using various books and websites. Still I don't solve this issue. Any help would be apprecaited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php