php-general Digest 18 Sep 2005 20:10:27 -0000 Issue 3689
php-general Digest 18 Sep 2005 20:10:27 - Issue 3689 Topics (messages 222588 through 222599): Re: email validation regex 222588 by: bruce Re: A dumb question - Regarding a php cms 222589 by: Dragan Stanojevic - Nevidljivi Re: monthly statistics 222590 by: John Taylor-Johnston Re: scrolling the table 222591 by: viraj Re: It's A Windows World 222592 by: viraj 222595 by: Greg Donald 222596 by: Ryan A 222598 by: Robert Cummings Re: imap_open 222593 by: viraj mysql table row updation based on user input. 222594 by: babu E-Mail 222597 by: All PTC Re: Quick Poll: PHP 4 / 5 222599 by: Chris Shiflett Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: php-general@lists.php.net -- ---BeginMessage--- for one... as i recall... email::valid picks up the fact that [EMAIL PROTECTED] is not valid email::valid also permits you to have ip addresses in the domain section email::valid also has in my mind a better grasp of the valid/invalid chars for the username portion... you mileage may vary.. -bruce -Original Message- From: Robert Paul [mailto:[EMAIL PROTECTED] Sent: Saturday, September 17, 2005 8:06 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: email validation regex Well what does the aforementioned regex seem to miss that Email::Valid catches? --Rob bruce wrote: i tried that one... it doesn't do as well as the perl... Email::Valid mod... i decided to write a quick perl script, and call it from the php app... seems to satisfy my needs for now... i haven't run across any php script/regex that's as comprehensive as the perl Email::Valid -bruce -Original Message- From: Robert Paul [mailto:[EMAIL PROTECTED] Sent: Friday, September 16, 2005 7:13 PM To: php-general@lists.php.net Subject: [PHP] Re: email validation regex http://www.iamcal.com/publish/articles/php/parsing_email/ The author goes through RFC822 in detail and writes up a regex that validates emails based on that. It's worked in my experience, but I havn't exactly put it through its paces. --Rob bruce wrote: hi.. looking for a good/working/tested php email validation regex that conforms to the rfc2822 standard. a lot of what i've seen from google breaks, or doesn't follow the standard! any ideas/thoughts/sample code/etc... thanks -bruce [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 ---End Message--- ---BeginMessage--- Troy Pieterman wrote: Im trying to run Syntax desktop which is a php cms (on my own server win2003). In the installation readme it tells me to edit a cfg.php file, i have done this but the cms still does not load, i have a feeling its becuase it dosnt know where to load its files from, here is the code that tells it, its path and relative path. /// // AUTO CALCULATED VARIABLE How do i write in there its phisical path and relative path are c:\www\syntax desktop\ As I can see those are auto calculated and should not be touched... Your problem probably lies somewhere else. Did you get any error? What do server logs say? Do you get any output? bye, N:: smime.p7s Description: S/MIME Cryptographic Signature ---End Message--- ---BeginMessage--- Hi, Where could I find a monthly statistic plugin that can take my `StampDate` field and generate monthy graphs of my primary key `id`? I'm sure I,m not the first to ask? ;-) CREATE TABLE `counter` ( `id` int(10) NOT NULL auto_increment, `StampDate` date NOT NULL default '1999-12-31', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=26050 ; John ---End Message--- ---BeginMessage--- this is not a php question.. why don't you google a little bit before make any posts to the list? http://www.google.com/search?hl=enq=DIV+tags anyway, try CSS, you can achieve it using DIV and SPAN tags. do a little RD work. happy scrolling! ~viraj. On 9/16/05, R. Vijay Daniel [EMAIL PROTECTED] wrote: sir, how can i add scroll pan to a table in php. is that possible to scroll the html table like jtable in java. with regards vijay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html ~viraj. On 9/16/05, Jay Blanchard [EMAIL PROTECTED] wrote: Howdy group! As many of you may or may not know, I made the switch to another company recently and it is a Windows shop
Re: [PHP] scrolling the table
this is not a php question.. why don't you google a little bit before make any posts to the list? http://www.google.com/search?hl=enq=DIV+tags anyway, try CSS, you can achieve it using DIV and SPAN tags. do a little RD work. happy scrolling! ~viraj. On 9/16/05, R. Vijay Daniel [EMAIL PROTECTED] wrote: sir, how can i add scroll pan to a table in php. is that possible to scroll the html table like jtable in java. with regards vijay -- 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] It's A Windows World
no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html ~viraj. On 9/16/05, Jay Blanchard [EMAIL PROTECTED] wrote: Howdy group! As many of you may or may not know, I made the switch to another company recently and it is a Windows shop (although I do have the IT Mgr. leaning heavily towards exploring *nix products soon). I have successfully configured a brand new W2K test server with IIS 5.0 and PHP 4.4.n (isapi config) with very little difficulty save for a RAID array issue during the W2K installation. This server matches the production box very well, save for the PHP install. One of these days, when time permits, I will move the web servers to Apache My question is this, are there any gotchas I need to be aware of when using PHP on windows? Any knowledge you could throw my direction on this would be grandly appreciated. Thanks! -- 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] imap_open
did you tried telneting to host's 143 port? if you are getting a response from the IMAP server you better go through the php-imap requirements, it's here.. http://www.php.net/imap ? I have got the address and the port to the imap server right, but I think that the imap server requires some sort of secure login. Could this be the it depends, http://www.php.net/manual/en/function.imap-open.php ~viraj. problem? If yes, how can it be solved? If no, what other causes could it be? -- 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] mysql table row updation based on user input.
Hi, i have a form for the user input with checkboxes and table rows for the user. The user can select the checkboxes which correspond to table rows in database. Depending on the selection of checkboxes i want to update the fields. For example: checkboxessubstrate_typesubstrate_numpixelprocess_classprocess_logoperatorcdatectimelocationdurationtemperaturepressureultrasonicsolventpedotsolutionsolution_tempsubstrate_tempmaskcomment [input] S4350absorber annealingMM2017-09-0514:18:15LF02124000fdsg [input] M2340pedot annealingMM-00-0014:22:03LF01223000saddDate*: [input] (DD.MM.YY) Time*: [input] (HH:MM:SS) [input] if the user selects some checkboxes and submits, then i want to take the cdate,ctime in table and calculate the difference from the current date and time,and enter the difference in duration. The code for the above form is echo 'link rel=stylesheet type=text/css href=sql-query.css'; $link = mysql_connect('localhost', 'root', ''); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db('fmfgui', $link); if (!$db_selected) { die ('Can\'t use fmfgui : ' . mysql_error()); } $res = mysql_query(select * from running_processes); if (!$res) { print p style=\color:red;\mysql error: .mysql_error()./p\n;} $ncols = mysql_num_fields($res); print TABLE style='border: 1pt solid blue; border-collapse: collapse; cell-spacing: 0px'; print TR; print TD style='border-bottom-style: double; border-left: 1pt solid black; font-weight:bold; text-align:center'checkboxes/TD; for ( $i = 0; $i $ncols; $i++ ) { $column_name = mysql_field_name($res,$i); print TD style='border-bottom-style: double; border-left: 1pt solid black; font-weight:bold; text-align:center'$column_name/TD; } print /TR; print TR; while ($row = mysql_fetch_array($res)) { $ncols = mysql_num_fields($res); print TD style='border: 1pt solid black cell-padding: 3px'input type='checkbox' name=\id[]\ value=\.$row[id].\ /TD; for ( $i = 0; $i $ncols; $i++ ) { print TD style='border: 1pt solid black cell-padding: 3px'$row[$i]/TD; } print /TR; } print /TABLE\n; $tdate=date(d.m.y); echo h4Date*:input type='text' name='edate' value='$tdate';echo (DD.MM.YY); echo br /; $ttime=$ttime = date(H:i:s); echo h4Time*:input type='text' name='etime' value='$ttime'; echo (HH:MM:SS); echo br /; echo br /; echo input type='submit' name='submit' value='submit'; echo /form; The problem is if the user selects more than one checkbox then how can i write the update command. thanks babu. - How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos
Re: [PHP] It's A Windows World
On 9/18/05, viraj [EMAIL PROTECTED] wrote: no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html And for those who need a second opinion: http://www.securityspace.com/s_survey/data/200508/index.html Not to mention it's very much a PHP world: http://www.securityspace.com/s_survey/data/man.200508/apachemods.html -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/
Re: [PHP] It's A Windows World
no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html And for those who need a second opinion: http://www.securityspace.com/s_survey/data/200508/index.html I would like to think I helped a bit in the above, I always tell my clients to go for Apache as does the company I work for and nearly always the client listens to us :-) I guess our contribution is not very very significant but heyevery drop makes up the ocean ;-) Cheers, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] E-Mail
Hi, Ive recently installed the php script on my website. It all works perfectly well except e-mails don't get through. E-mails don't ever get sent to new members, and when I try sending messages from my admin section they don't send either. Ive set-up the correct e-mail accounts and all details were entered correctly when I set-up the database. Have you any ideas how I could fix this. Thanks Alot. Regards, Chris Satchwell. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] It's A Windows World
On Sun, 2005-09-18 at 03:18, viraj wrote: no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html As much as I dislike Microsoft and its practices I bring bad news. The above only indicates that it's not an IIS world. There's no breakdown of hosting environment for apache :/ Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick Poll: PHP 4 / 5
Robert Cummings wrote: I don't agree with your position that the above code is incorrect I think notices are fine for situations where you've probably screwed up. I'd rather PHP let me know than do nothing. I see this situation as being very similar to the following: ?php function foo($bar) { /* ... */ } foo(3); ? This happens to throw a fatal error, which seems fine (mainly because it always has, as far as I know, so no one can have working code that does this sort of thing). I'm curious to know whether you would also disagree that this code is incorrect. I don't see a big fundamental difference, but I might be misunderstanding something. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Javscript embedding problem
I realize this isn't exactly a PHP problem, but I'm hoping someone here can see whatever it is I'm evidently missing. The script works just fine in normal html, but refuses to run when I attempt to embed this in one of my php pages. Which leads me to believe I've made a formatting mistake of some type. I'm trying to call the javascript in this portion of code //INCLUSION OF COUNTDOWN TIMER .trtd colspan=2SCRIPT language='JavaScript' SRC='countdown.js'/SCRIPTcenterscript type='text/javascript'countdown_clock(05, 11, 19, 08, 00, 1);/script/center/td/tr\n ./table\n countdown.js looks like this: script type=\text/javascript\ function countdown_clock(year, month, day, hour, minute, format) { //I chose a div as the container for the timer, but //it can be an input tag inside a form, or anything //who's displayed content can be changed through //client-side scripting. html_code = 'div id=\countdown\/div'; document.write(html_code); countdown(year, month, day, hour, minute, format); } function countdown(year, month, day, hour, minute, format) { Today = new Date(); Todays_Year = Today.getYear() - 2000; Todays_Month = Today.getMonth() + 1; //Convert both today's date and the target date into miliseconds. Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(), Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime(); Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime(); //Find their difference, and convert that into seconds. Time_Left = Math.round((Target_Date - Todays_Date) / 1000); if(Time_Left 0) Time_Left = 0; switch(format) { case 0: //The simplest way to display the time left. document.all.countdown.innerHTML = Time_Left + ' seconds'; break; case 1: //More datailed. days = Math.floor(Time_Left / (60 * 60 * 24)); Time_Left %= (60 * 60 * 24); hours = Math.floor(Time_Left / (60 * 60)); Time_Left %= (60 * 60); minutes = Math.floor(Time_Left / 60); Time_Left %= 60; seconds = Time_Left; dps = 's'; hps = 's'; mps = 's'; sps = 's'; //ps is short for plural suffix. if(days == 1) dps =''; if(hours == 1) hps =''; if(minutes == 1) mps =''; if(seconds == 1) sps =''; document.all.countdown.innerHTML = days + ' day' + dps + ' '; document.all.countdown.innerHTML += hours + ' hour' + hps + ' '; document.all.countdown.innerHTML += minutes + ' minute' + mps + ' and '; document.all.countdown.innerHTML += seconds + ' second' + sps; break; default: document.all.countdown.innerHTML = Time_Left + ' seconds'; } //Recursive call, keeps the clock ticking. setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000); } /script -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quick Poll: PHP 4 / 5
Chris, You probably are aware that this comes from a C/C++ standard the '' before the variable means that you are passing by reference and not by value. If you are passing by reference, you are passing the address of a variable instead of the value of that variable. By passing the value of 3 the script crashes because it thinks that you are passing a pointer to address 3 in memory. This means the computer thinks that the value being passed to the function is located in memory address '3' which is invalid because that memory address is reserved for the OS (at least on most machines the lowest memory addresses are reserved for the OS.) In order to make your code work you would have to pass a variable so that the computer can get the address of that variable and use/compute the data located there. Sounds like the original problem is some kind of type mismatch of this sort. Carl -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: Sunday, September 18, 2005 4:10 PM To: Robert Cummings Cc: Rasmus Lerdorf; Stephen Leaf; PHP-General Subject: Re: [PHP] Quick Poll: PHP 4 / 5 Robert Cummings wrote: I don't agree with your position that the above code is incorrect I think notices are fine for situations where you've probably screwed up. I'd rather PHP let me know than do nothing. I see this situation as being very similar to the following: ?php function foo($bar) { /* ... */ } foo(3); ? This happens to throw a fatal error, which seems fine (mainly because it always has, as far as I know, so no one can have working code that does this sort of thing). I'm curious to know whether you would also disagree that this code is incorrect. I don't see a big fundamental difference, but I might be misunderstanding something. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: E-Mail
Show me your example.. I think you have to assign your smtp server in your php.ini too. All PTC wrote: Hi, Ive recently installed the php script on my website. It all works perfectly well except e-mails don't get through. E-mails don't ever get sent to new members, and when I try sending messages from my admin section they don't send either. Ive set-up the correct e-mail accounts and all details were entered correctly when I set-up the database. Have you any ideas how I could fix this. Thanks Alot. Regards, Chris Satchwell. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Javscript embedding problem
Try \countdown.js\ instead of single quotes ? //INCLUSION OF COUNTDOWN TIMER .trtd colspan=2SCRIPT language='JavaScript' SRC='countdown.js'/SCRIPTcenterscript type='text/javascript'countdown_clock(05, 11, 19, 08, 00, 1);/script/center/td/tr\n ./table\n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mysql table row updation based on user input.
Me thinks you have to name the checkboxes differently, otherwise the post variable will only take the last value it found, overwriting previous values. Otherwise they act like radioboxes. print TD style='border: 1pt solid black cell-padding: 3px'input type='checkbox' name=\id[]\ value=\.$row[id].\ /TD; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E-Mail
quoth the All PTC: Hi, Ive recently installed the php script on my website. It all works perfectly well except e-mails don't get through. E-mails don't ever get sent to new members, and when I try sending messages from my admin section they don't send either. Ive set-up the correct e-mail accounts and all details were entered correctly when I set-up the database. Have you any ideas how I could fix this. Thanks Alot. Regards, Chris Satchwell. Do you have an MTA installed and configured? PHP just passes the mail on... You also need software to actually transport the mail. -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org ...the number of UNIX installations has grown to 10, with more expected... - Dennis Ritchie and Ken Thompson, June 1972 pgpvlZiWL0lEE.pgp Description: PGP signature
Re: [PHP] Re: Javscript embedding problem
John Taylor-Johnston wrote: Try \countdown.js\ instead of single quotes ? //INCLUSION OF COUNTDOWN TIMER .trtd colspan=2SCRIPT language='JavaScript' SRC='countdown.js'/SCRIPTcenterscript type='text/javascript'countdown_clock(05, 11, 19, 08, 00, 1);/script/center/td/tr\n ./table\n Tried that and it didn't work either. I changed it to SRC='countdown.js' after escaping the double quites didn't work. This is really bugging the heck out of me! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mysql table row updation based on user input.
John Taylor-Johnston wrote: Me thinks you have to name the checkboxes differently, otherwise the post variable will only take the last value it found, overwriting previous values. Otherwise they act like radioboxes. print TD style='border: 1pt solid black cell-padding: 3px'input type='checkbox' name=\id[]\ value=\.$row[id].\ /TD; No, he's passing an array of checkboxes -- see the [] ? If you haven't seen that done before check out these pages: http://php.net/language.variables.external#AEN3832 http://php.net/faq.html#faq.html.arrays -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Way for script to discover it's path?
I'm working on an auto-include mechanism for some complex scripts and rather than have all the paths to the various components hard coded, I'd like to have the script walk up the hierarchy looking for it's specified includes. Is it possible to do this? I looked at the various file related php functions but didn't see anything resembling 'my_path()' Thanks Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Way for script to discover it's path?
Hey Ken, The variable you want is already a superglobal known as $_SERVER ['SCRIPT_FILENAME']. See: http://www.php.net/reserved.variables Do something like this to get started: echo $_SERVER['SCRIPT_FILENAME']; Good luck. Jordan On Sep 18, 2005, at 4:58 PM, Ken Tozier wrote: I'm working on an auto-include mechanism for some complex scripts and rather than have all the paths to the various components hard coded, I'd like to have the script walk up the hierarchy looking for it's specified includes. Is it possible to do this? I looked at the various file related php functions but didn't see anything resembling 'my_path()' Thanks Ken -- 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] Way for script to discover it's path?
Thanks Jordan, that did the trick! Ken On Sep 18, 2005, at 6:40 PM, Jordan Miller wrote: Hey Ken, The variable you want is already a superglobal known as $_SERVER ['SCRIPT_FILENAME']. See: http://www.php.net/reserved.variables Do something like this to get started: echo $_SERVER['SCRIPT_FILENAME']; Good luck. Jordan On Sep 18, 2005, at 4:58 PM, Ken Tozier wrote: I'm working on an auto-include mechanism for some complex scripts and rather than have all the paths to the various components hard coded, I'd like to have the script walk up the hierarchy looking for it's specified includes. Is it possible to do this? I looked at the various file related php functions but didn't see anything resembling 'my_path()' Thanks Ken -- 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] Quick Poll: PHP 4 / 5
On Sun, 2005-09-18 at 16:10, Chris Shiflett wrote: Robert Cummings wrote: I don't agree with your position that the above code is incorrect I think notices are fine for situations where you've probably screwed up. I'd rather PHP let me know than do nothing. I see this situation as being very similar to the following: ?php function foo($bar) { /* ... */ } foo(3); ? This happens to throw a fatal error, which seems fine (mainly because it always has, as far as I know, so no one can have working code that does this sort of thing). I'm curious to know whether you would also disagree that this code is incorrect. I don't see a big fundamental difference, but I might be misunderstanding something. I have no argument about what you have shown above, but it becomes a tricker question when you have the following which is similar but not exactly what you have shown: function foo( $bar ) { /* ... */ } function fee( $beer ) { return ($beer + 1); } foo( fee( 3 ) ) So the point being made here is that fee returns a variable container (temporary or otherwise) and not a constant, however, with the new system that is as incorrect as the foo( 3 ) you have expressed. Either way, Rasmus has admitted that the new current system is a bit aggressive, but points out (as do you) that it is better to generate a notice just in case. And I already responded to that response by Rasmus' with grudging agreement :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: headers .vs javascript location.href
On 2005-09-17, bruce [EMAIL PROTECTED] wrote: need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... Now, if you read the documentation of output buffering you will see that it does *not* buffer headers.. -- Met vriendelijke groeten, Tim Van Wassenhove http://timvw.madoka.be -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [php]: monthly statistics
On 2005-09-18, John Taylor-Johnston [EMAIL PROTECTED] wrote: Hi, Where could I find a monthly statistic plugin that can take my `StampDate` field and generate monthy graphs of my primary key `id`? I'm sure I,m not the first to ask? ;-) CREATE TABLE `counter` ( `id` int(10) NOT NULL auto_increment, `StampDate` date NOT NULL default '1999-12-31', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=26050 ; All you need to do is SELECT .. GROUP BY YEARMONTH(StampDate) and you're ready to go.. -- Met vriendelijke groeten, Tim Van Wassenhove http://timvw.madoka.be -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php guru!!!!!
OK, this might sound a bit harsh, but try using Smarty or other templating engine. Really. It will help you a lot in this sittuation. If you decide to run through that path, let me know so I can help you. If not, we'll figure something else :) On 9/18/05, bruce [EMAIL PROTECTED] wrote: andre.. you can find the files/app at http://olederer.users.phpclasses.org/browse/package/1906.html. i'm basically trying to figure out how to do the following... ++ || || | header | || || ++ | nav menu | ++ || | || new | || registration | | login | stuff | | area | | || | || | || | || | || | || | || | ++ basically, i'd like to have the app display the traditional login in the login area, as well as the 'new registration'. the app should allow the user to enter the login user/passwd in the login area. selecting 'register new user' should cause the 'registration form' to be displayed in the 'right area' the way i've quickly put this together is via a lot of includes based on the user slection of the 'nav menu items' as well as the user selecting different items within the various pages... however, i'm now having an issue when i try to use the 'header' function to redirect the user to another page after the given logic is completed. -bruce -Original Message- From: André Medeiros [mailto:[EMAIL PROTECTED] Sent: Saturday, September 17, 2005 5:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: php guru! Could you give us the full url of the class so we can look at it's source code? :) On 9/18/05, bruce [EMAIL PROTECTED] wrote: i already did... i got the same error... which is why i was/am looking for a guru -bruce -Original Message- From: James Benson [mailto:[EMAIL PROTECTED] Sent: Saturday, September 17, 2005 4:34 PM To: php-general@lists.php.net Subject: [PHP] Re: php guru! http://php.net/ob_start try something like... ?php // top of page ob_start(); /* whole script goes here */ // bottom of page ob_end_flush(); ? bruce wrote: hi... i'm playing with a script/class from phpclasses.org. the script/class is user_class. the script is straight enough, but i'm trying to figure out how i can include/incorporate the script into a test site i'm creating... the user_access script more or less uses the entire page. for my app, i'd like to basically use the user_access app/class and have the different pages be displayed in specific areas of my pages... given that the user_class script uses 'header', i'm not sure how to accomplish this without generating the 'headers already sent...' err msg... if there's someone that i can talk to regarding this, i'd appreciate it.. thanks -bruce [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
[PHP] Re: Way for script to discover it's path?
On 2005-09-18, Ken Tozier [EMAIL PROTECTED] wrote: I'm working on an auto-include mechanism for some complex scripts and rather than have all the paths to the various components hard coded, I'd like to have the script walk up the hierarchy looking for it's specified includes. Is it possible to do this? I looked at the various file related php functions but didn't see anything resembling 'my_path()' You might also want to check out the __FILE__ constant.. http://be.php.net/manual/en/language.constants.predefined.php -- Met vriendelijke groeten, Tim Van Wassenhove http://timvw.madoka.be -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: headers .vs javascript location.href
Tim Van Wassenhove wrote: On 2005-09-17, bruce [EMAIL PROTECTED] wrote: need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... Now, if you read the documentation of output buffering you will see that it does *not* buffer headers.. That's kind of the point. Headers must be sent before any other output, and output buffering stops that output from being sent until the very end of the script (unless you call ob_end_flush() first). So output buffering allows you to send headers at any time in your script. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding or obfuscating tool
ioncube or Turck MMCache (free) Anas Mughal wrote: We need to protect our intellectual property. We wish to encode or obfuscate our PHP code before delivering it to a client. Could someone recommend an free PHP encoder or obfuscating tool. (This is a very small project so we can NOT justify buying the Zend encoder. However, if there is any other reasonably priced encoder, we might consider that.) Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding or obfuscating tool
On 9/17/05, Anas Mughal [EMAIL PROTECTED] wrote: We need to protect our intellectual property. We wish to encode or obfuscate our PHP code before delivering it to a client. Wishing to, and needing to are two different things. Could someone recommend an free PHP encoder or obfuscating tool. (This is a very small project so we can NOT justify buying the Zend encoder. Personally I would be more interested in hearing how you can justify obfuscating code before delivering it to a client. However, if there is any other reasonably priced encoder, we might consider that.) Thank you very much. -- Anas Mughal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [php]: monthly statistics
Tim Van Wassenhove wrote: On 2005-09-18, John Taylor-Johnston [EMAIL PROTECTED] wrote: Hi, Where could I find a monthly statistic plugin that can take my `StampDate` field and generate monthy graphs of my primary key `id`? I'm sure I,m not the first to ask? ;-) CREATE TABLE `counter` ( `id` int(10) NOT NULL auto_increment, `StampDate` date NOT NULL default '1999-12-31', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=26050 ; All you need to do is SELECT .. GROUP BY YEARMONTH(StampDate) and you're ready to go.. How will I draw a graph img src=reddot.gif width=2 height=$mydate-number_of_hits_per_day? Anything in the manual to look at? http://www.mysql.com/search/?q=YEARMONTHcharset=utf-8 http://ca3.php.net/manual-lookup.php?pattern=YEARMONTH John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding or obfuscating tool
On 9/18/05, Rory Browne [EMAIL PROTECTED] wrote: Personally I would be more interested in hearing how you can justify obfuscating code before delivering it to a client. For the same reasons that most commercial software houses that distribute compiled software in binary form don't include the source code, I would imagine. Open source is a wonderful thing, but not every software developer chooses to license their work that way. For those that don't, finding a way to obfuscate code that's written in an interpreted language (and therefore, traditionally appears in source form even when deployed) is a compelling business objective. I'm kinda playing the devil's advocate here, since every line of code I've ever released has been either GPL- or LGPL-licensed...but that's what my response would be if I were to release something to which I didn't wish to give the licensees source access. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: headers .vs javascript location.href
regardless... i've tried to resolve my issue using the buffering functions and still get the same error... if someone wants to look/examine my code, i'm more than willing to let you see it... it's a test app so there's nothing of critical importance. -bruce -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: Sunday, September 18, 2005 6:03 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: headers .vs javascript location.href Tim Van Wassenhove wrote: On 2005-09-17, bruce [EMAIL PROTECTED] wrote: need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... Now, if you read the documentation of output buffering you will see that it does *not* buffer headers.. That's kind of the point. Headers must be sent before any other output, and output buffering stops that output from being sent until the very end of the script (unless you call ob_end_flush() first). So output buffering allows you to send headers at any time in your script. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- 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: headers .vs javascript location.href
bruce wrote: i've tried to resolve my issue using the buffering functions and still get the same error... if someone wants to look/examine my code, i'm more than willing to let you see it... it's a test app so there's nothing of critical importance. Please don't top-post. Fire the trimmed-down relevant sections of your code to the list and I'm sure plenty of people will be able to help you. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] headers .vs javascript location.href
bruce wrote: need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... is there someone that i can talk to about this, who ha experience/understanding of what's going on. i've thought about rewriting what i have to this point, but i've got code interspersed with html... yeah.. i know... cleaning it up would probably make things easier/better, but this is a quick/dirty test.. and i don't claim to be a web developer! You need to ask a question if you want to receive an answer. If your question really is whether there is anyone you can talk to, then the answer is yes. There are quite a few people on this list who know a great deal about the topics you mention. (You might want to start by clarifying the reference to the same error.) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick Poll: PHP 4 / 5
Carl Furst wrote: Chris, You probably are aware that this comes from a C/C++ standard the '' before the variable means that you are passing by reference and not by value. You are probably not aware that I'm not asking a question. :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail-format...
Hi there! I wonder why I get get these kind of mails (look down below in this mail) I recieve them sometimes... ...I have a code like this... $name = $_POST[frmNamn]; $email = $_POST[frmEpost]; //Send mail that there is a new member // mail([EMAIL PROTECTED],Ny medlem - Stammis Internet,Namn: $name, Epost:$email); /G http://www.varupiraten.se/ Namn: [EMAIL PROTECTED] Content-Type: multipart/mixed; boundary=\===0158601545==\ MIME-Version: 1.0 Subject: c1805938 To: [EMAIL PROTECTED] bcc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] This is a multi-part message in MIME format. --===0158601545== Content-Type: text/plain; charset=\us-ascii\ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit aienglpcm --===0158601545==-- , Epost:[EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.0/103 - Release Date: 2005-09-15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: headers .vs javascript location.href
- Original Message - From: bruce [EMAIL PROTECTED] To: 'Jasper Bryant-Greene' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Monday, September 19, 2005 6:14 AM Subject: RE: [PHP] Re: headers .vs javascript location.href regardless... i've tried to resolve my issue using the buffering functions and still get the same error... if someone wants to look/examine my code, i'm more than willing to let you see it... it's a test app so there's nothing of critical importance. -bruce -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: Sunday, September 18, 2005 6:03 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: headers .vs javascript location.href Tim Van Wassenhove wrote: On 2005-09-17, bruce [EMAIL PROTECTED] wrote: need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... Now, if you read the documentation of output buffering you will see that it does *not* buffer headers.. That's kind of the point. Headers must be sent before any other output, and output buffering stops that output from being sent until the very end of the script (unless you call ob_end_flush() first). So output buffering allows you to send headers at any time in your script. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 2005-09-16 Hi there! Send the code, and I'll have a look... :-) /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Off] How much time should this take?
I must admit that this seems a little excessive to me. I don't work much with RH, but what is involved: - install a minimal redhat(I've installed other distros in as little as 15 mins. An hour seems reasonable) - configure/install apache ( assuming he is using RPM's, which I'd recommend for stability, this should take a few mins. Otherwise 30 mins seems reasonable) - configure/install php ( assuming no exotic requirements, php could be installed from rpms in 45 seconds) - configure/installl mysql(including a/c management)(installation from rpms, copying the dbs across could be done as simply as using the correct mysqldump, mysql and netcat combination(assuming the machines are networked) - configure/install a named - lock down the machine( - Assuming an hour for RH installation, and 30 mins for each package, that is 3 hours so far. 9 hours seems quite a lot for post-install configuration, and securing, particularly since most(not all) of the security is integrated into the previous steps. granted this is a vanilla rpm system, but given the requirements, can anyone suggest a reason why not to go for a vanilla rpm system. With rpms you have the benefit testing that is done by rh labs as well as thousands of other users. The only testing of custom compiles is that which you do yourself. I think a professional should take a lot less time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php