[PHP] Pipe an email to PHP
I'm sure this question has been visited before, but I've had some troubles searching through the archives. This is at least a two part question. I wish to use a pipe instead of the pop3 class, because I wish the email to start the script instead of waiting for a cronjob. 1) The pipe itself: On a cPanel server, I wish to setup an email address with a pipe like: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : |/home/account/public_html/mailtools/emailscript.php This always gives me an error saying it cannot foraward. If I pipe it to |/usr/bin/php /home/account/public_html/mailtools/emailscript.php it tells me: No input file specified. 2) to read the data: I wish to parse the data into $from $subject and $body The data will then be manipulated, and key pieces of data will be extracted and sent to either a database or an instant message to my cell phone. (this part I've already solved) Thomas Tremain www.LiveHost.net http://www.LiveHost.net www.GotoNames.com http://www.GotoNames.com www.TrafficExaminer.com http://www.TrafficExaminer.com
[PHP] If empty don't display...
Hi there, Can you please have a look at the following code: I've got two questions; 1. I'm trying not to display the fields that are empty with: if (!empty($row9-prijs4pk)){ But it's still display the line and there is no value in PRIJS4PK field. 2. How can i reduce the amount of Queries?? Thanks for your time and help, Frank The code: ? // Avaibility and prices include(../conf/config.php); include(../conf/functions.php); // open database connection $connection = mysql_connect($host, $user, $pass) or die (Unable to connect!); // select database mysql_select_db($db) or die (Unable to select database!); //Get ID $id=$_GET['id']; $page=$_GET['page']; // limit value for number of records to be shown per page // query database to find total number of records to display $limit = 10; $query_count = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id'; $result_count = mysql_query($query_count); $totalrows = mysql_num_rows($result_count); if(empty($page)) $page = 1; $limitvalue = $page * $limit - ($limit); $query = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result = mysql_query($query) or die(Error: . mysql_error()); $count_result = mysql_num_rows($result); $query2 = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result2 = mysql_query($query2) or die(Error: . mysql_error()); $query3 = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result3 = mysql_query($query3) or die(Error: . mysql_error()); $query5 = SELECT date, prijs4pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result5 = mysql_query($query5) or die(Error: . mysql_error()); $query6 = SELECT date, prijs4pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result6 = mysql_query($query6) or die(Error: . mysql_error()); $query4 = SELECT naamreis FROM reizen WHERE reisid = '$id'; $result4 = mysql_query($query4) or die(Error: . mysql_error()); $row4 = mysql_fetch_object($result4); $query9 = SELECT totaalprijs, prijs4pk, prijs5pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id'; $result9= mysql_query($query9) or die(Error: . mysql_error()); $row9 = mysql_fetch_object($result9); // Display links at the top to indicate current page and number of pages displayed $numofpages = ceil($totalrows / $limit); $from=$limit*$page-$limit+1; $to=$from + $count_result-1; ? html head link href=../css/main.css rel=stylesheet type=text/css /head body body bgcolor=#F2D071 ? echo font class=\bold\ . $row4-naamreis . /font; ? brbrTR bgColor=#ffcc00 TD colSpan=3 height=126 TABLE cellSpacing=1 cellPadding=3 width=100% border=0 TBODY TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right/DIV/TD ? if (mysql_num_rows($result) 0) { while($row = mysql_fetch_object($result)) { echo TD width=40 bgColor=#ff height=38DIV align=right. formatDateShort($row-date) . /DIV/TD; } } ? /TR ? if (!empty($row9-prijs4pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right4 pk/DIV/TD ? if (mysql_num_rows($result6) 0) { while($row5= mysql_fetch_object($result5)) { $pr6 = number_format($row5-prijs4pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr6 . /DIV/TD; } } } if (!empty($row99-prijs3pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right3 pk/DIV/TD ? if (mysql_num_rows($result5) 0) { while($row5= mysql_fetch_object($result5)) { $pr5 = number_format($row5-prijs3pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr5 . /DIV/TD; } } } if (!empty($row9-prijs2pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right2 pk/DIV/TD ? if (mysql_num_rows($result2) 0) { while($row2= mysql_fetch_object($result2)) { $pr2 = number_format($row2-prijs2pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr2 . /DIV/TD; } } } ? ? if (!empty($row9-prijs1pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right1 pk/DIV/TD ? if (mysql_num_rows($result3) 0) { while($row3= mysql_fetch_object($result3)) { $pr1 = number_format($row3-prijs1pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr1 . /DIV/TD; } } } // start 123 next
Re: [PHP] verifying sql INSERTs
From: Curt Zirzow [EMAIL PROTECTED] I should instead just try to perform the INSERT and then if it fails I know I've already got a record. If it doesn't I know everything is cool. I've debated with myself several times if this is really a good method to not have duplicates in the database. Like what happens if for some reason the constraint gets dropped? having your progam rely on the constraint will cause all data integrity to go to hell. For one little script inserting into it's own little table, yeah, it really doesn't matter. Consider, though, a business making use of this database not only through a PHP script, but through an Access frontend in marketing, some ASP scripts in HR, etc. Now, if you don't enforce the constraints in the database, each and every program must enforce the constraits itself. It's easier to do it in one place. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Interview questions
On Tue, 2003-08-26 at 11:35, Curt Zirzow wrote: * Thus wrote Richard Baskett ([EMAIL PROTECTED]): on 8/26/03 9:57 AM, Robert Cummings at [EMAIL PROTECTED] wrote: This smells like a trick question... Are the switches connected to the same light bulb? You've only mentioned one light bulb? 8) Cheers, Rob. On Tue, 2003-08-26 at 12:35, Jay Blanchard wrote: Also ask a couple of other questions that require thought, but have nothing else to do with code. such as... In one room you have 3 light switches, each connected to one light bulb in another room. How many trips must you make to determine which switch is connected to which light bulb? Only one trip, and Im not sure if I should explain or let you guys figure it out :) toggle_light(1); sleep(120); toggle_light(1); toggle_light(2); move('self', 'room/'); if ($lightbulb['temp'] $room['temp']) { echo switch #1; } elseif ($lightbulb['ison']) { echo switch #2; } else { echo switch #3; } unfortunately, this won't work... you need to loop through the lightbulbs... try something like: foreach ($lightbulbs as $bulb){ } and your if else logic needs a little tweaking so you don't incorrectly label the on lightbulb as being switch #1 since it is also greater than $temp['room'] see the following manual pages: http://us4.php.net/manual/en/control-structures.foreach.php http://us4.php.net/manual/en/thelightbulb-determination-problem.php http://us4.php.net/manual/en/i-have-too-much-time-on-my-hands.php /joking gabe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Website templating schemes
Quoting Chris W. Parker [EMAIL PROTECTED]: And I completely don't understand Option #2. What does body() do and why do you call it? Can you show some pseudo code to help us (or maybe it's just me) understand how Option #2 works? Browser calls index.php -- #index.php programming tasks.. $results = results of above; function body() { # info, content, etc. global $results; echo $results; } require template.php; -- -- #template.php prints header stuff body(); prints footer stuff -- Does that make any sense? -- Joel Konkle-Parker Webmaster [Ballsome.com] Phone [662-518-1636] E-mail[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website templating schemes
With method 2 it seems like your template file would become redundant because every one of them would have to contain the header and footer code. I would use 3 template files, header.php, footer.php, and body_index.php index.php would: 1. PERFORM LOGIC 2. include header 3. include body 4. include footer Then, all you have to do is make new body_XXX.php files for each page on your site and the header/footer content is contained in one place. Ok, wait, I'm having a hard time understanding this... the browser would request the same index.php every time? with server.com/index.php?query_string? And the query string would determine the body_XXX.php to be included? Right now I have it set up so that a different index.php is requested each time, but calls the same template.php. -- Joel Konkle-Parker Webmaster [Ballsome.com] Phone [662-518-1636] E-mail[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Interview questions
From: Curt Zirzow [EMAIL PROTECTED] toggle_light(1); sleep(120); toggle_light(1); toggle_light(2); move('self', 'room/'); if ($lightbulb['temp'] $room['temp']) { echo switch #1; } elseif ($lightbulb['ison']) { echo switch #2; } else { echo switch #3; } hm.. i had to keep it OT somehow :) Aren't you missing a foreach($lightbulb as $bulb) in there somewhere? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions on 4.3.2, register_globals On
Hi all. I am switching a site I built to a new server, and the old site was written with register_globals on. I believe the php version was the same, but I'm not sure (and I can't check). The way I understand it, for older versions of php, one had to use session_register($foo) and could use the session variable $foo in other pages. In 4.3, the standard is to use $_SESSION['foo'] to register and use the variable. Now, I would imagine that in 4.3.2 with register_globals on my code should still work. In fact, it does not work unless I use $_SESION['foo']. Why is this? Is there a way to make my code work without editing every page? Please tell me I don't have to go in and redo my session (and form, for that matter) variables... Thanks for your help. -jason -- web developer jjwd.net
[PHP] speed of mail() on two servers
Hi, all -- I'm working up a [cli] script to send a personalized (ugh) email to some [often large] number of web site subscribers. Unfortunately, I'm getting lousy performance, running about 0.54 sec per email. My partner has a mail script implemented on another machine and he's running somewhere down around 0.10 sec per email, which is better but still not very good for sending to 60k users. The box (dual Xeon 2.2G with mirrored fast SCSI and 1G RAM) has plenty of horsepower, and it certainly shouldn't need more. It's running RH 7.3 (Valhalla) with 2.4.20 on ext3 and has qmail installed as its MTA. It seems to be the mail() call itself, because I can make a system call (system, exec, passthru) to just echo the current data and it rips through my list in nothin' flat. So how do I tune mail() to make it faster? Or do I need to give up and call qmail-inject directly? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] Image Magick
Mike -- ...and then Mike At Spy said... % % Anyone here familiar with the installation of Image Magick and what files it % installs on your machine? Yep. % % I had an admin put it on, and then took it off - but took it off by removing Why take it off? Tsk, tsk! You'll miss it ;-) % what she thought were all of the files related to it. I just found some % files I think that are. They are located in the usr/local/bin directory and % are called: % % animate % composite % convert % display % identify % mogrify % montage Yes, those are all magick executables. The interesting thing is that your admin could have missed those when, well, they're the biggest end result of IM (some might just use the perl or lib code, but most will want the CLI executables). I wouldn't be at all sure that everything else has been cleaned from the machine. You might run a find across the whole system and check for that timestamp. As was already suggested, if it was installed via rpm then go ahead and remove it via rpm. HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
RE: [PHP] PHP Interview questions
Just to throw a spanner (where'd that come from, that wasn't part of the question) into the works... What is the state of the light bulb before the test? If it's on and it's connected to switch #1, then the logic below would result in switch #2 being displayed... (maybe.., I don't know how long it takes for a light bulb to cool down) Martin -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, 27 August 2003 5:35 AM To: Curt Zirzow; PHP General Subject: Re: [PHP] PHP Interview questions From: Curt Zirzow [EMAIL PROTECTED] toggle_light(1); sleep(120); toggle_light(1); toggle_light(2); move('self', 'room/'); if ($lightbulb['temp'] $room['temp']) { echo switch #1; } elseif ($lightbulb['ison']) { echo switch #2; } else { echo switch #3; } hm.. i had to keep it OT somehow :) Aren't you missing a foreach($lightbulb as $bulb) in there somewhere? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from NOD32 1.490 (20030820) __ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Interview questions
* Thus wrote Gabriel Guzman ([EMAIL PROTECTED]): On Tue, 2003-08-26 at 11:35, Curt Zirzow wrote: * Thus wrote Richard Baskett ([EMAIL PROTECTED]): on 8/26/03 9:57 AM, Robert Cummings at [EMAIL PROTECTED] wrote: unfortunately, this won't work... you need to loop through the lightbulbs... try something like: foreach ($lightbulbs as $bulb){ Only one light bulb from how I originally read it. Multiple light bulbs will be supported in the next version. http://us4.php.net/manual/en/i-have-too-much-time-on-my-hands.php According to this manual I have to supply this patch to make the program work properly: *** lightbulb.php Tue Aug 26 23:21:10 2003 --- lightbulb.fix.php Tue Aug 26 23:21:51 2003 *** *** 7,12 ! if ($lightbulb['temp'] $room['temp']) { ! echo switch #1; ! } elseif ($lightbulb['ison']) { echo switch #2; } else { --- 7,12 ! if ($lightbulb['ison']) { echo switch #2; + } elseif ($lightbulb['temp'] $room['temp']) { + echo switch #1; } else { /joking Cheers! Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamical balancing text in two colums
We tried something like this in the spring. If the paragraphs are uniform in length you can get columns roughly balanced - but never with a high degree of certainty. We also knew our subscribers would be printing out the copy, and that's where we gave up on two column layout, as we had no control over the sheet size, font size, etc. If an article extended over two pages, you had to read the first colum to the bottom, turn the page and keep reading to the end of the column, then flip back and start reading the second column. I suppose one could get closer, but look at the desktop publishing programs - apart from FrameMaker, you have to flow and place text by hand. To do it we'd be counting lines, adjusting for heads and bylines, and hoping, hoping, hoping it would not look too disgraceful. So we bailed out - the subscriber could read it online, with a decent line lenght in a Flash movie, or accept typewriter like printout extending across the page. What made that decision easier was a survey which indicated that over 90% of subscribers read it on line and did not print it. Cheers - Miles Thompson At 07:10 PM 8/26/2003 +0200, Dynamical.biz wrote: Hi, I've been dealing withs this question: I've never seen dynamical balanced text in two colums in a web so this the challenge. html formated text is stored in a database, conetion and placed into a variable i.e.: $text = PIMG alt=labordeta hspace=3 src=http://www.lamundial.net/img/labordeta.jpg; align=left border=0EMefe.Zaragoza./EM El parlamentario./PPSome more text tranquilo simplenente trabajando./P; ... some more paragrphs just like newspaper articles. the first idea is this: 1. count the total characters in $text string so we can guess juts the half 2. getting into $tx1 variable the fisrt half 3. count the total characters in $tx1 till the fisrt /p STARTING from the END to the BEGUINING of $tx1 4. getting into $col1 the fist part 5. getting into $col2 the rest 6. render the text in a table //CODE 1. $half = floor(strlen($texto)/2); 2. $tx1 = substr($text,0,$half); 3. $first_P = strrpos($tx1,/P); 4. $col1 = substr($text,0,$first_P); 5. $col2 = substr($text,$first_P); 6. table tr td?= $col1 ?/td td?= $col2 ?/td /tr /table PROBLEMS easy to know the middle point of a string but we have html code so easy to break it badly, something like: IMG hspace=3 src=ht -|- tp://www.lamundial.net/img/img.jpg so this is why the /p idea. If there is a large paragrph in the middle of the whole text the columns the two columns are not so nice balanced, this is why I ask the people writing articles for my web trying to avoid long ones. They use HTMLAREA http://www.interactivetools.com/products/htmlarea/ from Interactive tools so the html is not done by hand. anyway just in case there is no way to correctly balance the text I let the writer the 1 colum / 2 colums as an option so the traditional 1 colum (no colums) is always available. they can display the final render os the article as they save it when writing so the decide. this is working at most of the articles in http://www.lamundial.net i.e.: http://www.lamundial.net/home.php?pg=articleidart=124 http://www.lamundial.net/home.php?pg=articleidart=121 http://www.lamundial.net/home.php?pg=articleidart=118 the text balancing is working quite nice any other idea? thanks aniceto lópez DYNAMICAL.BIZ web development host services -- 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] DOM setting encoding attribute
Hi there everybody !! i have been trying to set the encoding attribute in the ?xml version=1.0? document definition, using the DOM model any idea about some info ??? Thanks in advance!!! -- Maciek Ruckgaber Bielecki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pipe an email to PHP
I'm sure this question has been visited before, but I've had some troubles searching through the archives. This is at least a two part question. I wish to use a pipe instead of the pop3 class, because I wish the email to start the script instead of waiting for a cronjob. 1) The pipe itself: On a cPanel server, I wish to setup an email address with a pipe like: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : |/home/account/public_html/mailtools/emailscript.php I would read the data from the pipe with STDIN: $fp = fopen(php://stdin, r); while(!feof($fp)) $buffer .= fgets($fp, 4096); fclose($fp); This always gives me an error saying it cannot foraward. If I pipe it to |/usr/bin/php /home/account/public_html/mailtools/emailscript.php it tells me: No input file specified. I use something like that in my .procmailrc: :0 fw | /usr/bin/spamassassin :0 * ^X-Spam-Status: Yes { :0 c | $HOME/.spamassassin/spamcop.php :0 spam } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can pdf forms be used to submit data into db?
hi guys and gals, aloha from hawaii, Not sure if this is the right place to ask, but i just need to know if it is technically possible to have a pdf form be filled out online and then once the user hits submit, php takes the data and puts it into a db or some sort of db technology and if the need arises to pull up that record once more, php fetches the data from the db and dynamically fills out the pdf form and presents it to the end user...can do? or anyone know who i can talk to about this... thanks and mahalo from hawaii incentive if anyone can help me or point me in the right direction, i MAY be inclined to send some macadamia nuts to the continental US /incentive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can pdf forms be used to submit data into a db?
hi guys and gals, aloha from hawaii, Not sure if this is the right place to ask, but i just need to know if it is technically possible to have a pdf form be filled out online and then once the user hits submit, php takes the data and puts it into a db or some sort of db technology and if the need arises to pull up that record once more, php fetches the data from the db and dynamically fills out the pdf form and presents it to the end user...can do? or anyone know who i can talk to about this... thanks and mahalo from hawaii incentive if anyone can help me or point me in the right direction, i MAY be inclined to send some macadamia nuts to the continental US /incentive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Looping through a list - Newbie question
Hi, I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value. Is there an easy way to do this, or do I need to convert the list to an array first? In the code below, $id isn't being set. Here's my code (this is just testing stuff, sv_CampusList is set somewhere else): ?php session_start(); $_SESSION['sv_CampusList'] = 1,2,4,5; for($i=1; $i=strlen($_SESSION['sv_CampusList']); $i++){ $id = strpos($_SESSION['sv_CampusList'],$i); echo $id; } ? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webserver for mac
I am doing some php work for a local company who uses a mac. I was telling them that I use apache as my webserver and they want to know what they can use as their webserver. I know nothing about Macs and don't think you an run apache but I may be all wrong...what do mac owners use for a webserver? _A_ mac? Do I sense the fragrance of ancient hardware? First place you want to look is apple.com. After reading the white pages on Mac OS X and Mac OS X Server, you really should plug apple web server and macintosh web server and other variants into your favorite search site and look around. You might even run into the fact that a Mac (pre-Mac OS X) was once considered practically impenetrable. (I don't remember if that challenge was ever defeated, the industry just seems to have moved on.) More information than you probably want: Mac OSses 8 and 9 have a personal web server built it. There are also freeware/shareware servers available that will run on Mac OSses 7 and 8. There are some commercial webservers, as well, some of which are being maintained and updated for Mac OS X, one has already been mentioned. I know of a live site being maintained professionally, serving FileMaker files on the web with the personal web server under Mac OS 8.6. It's a low-traffic site, of course. I think there's still an SE running System 6 and serving (hobby) web pages somewhere out there, too, just to show it can be done. Haven't looked for a while. But you should understand that the Mac OS previous to Mac OS X was cooperative multitasking, and it was difficult to serve multiple requests simultaneously on those machines. on-topic It'd surprise me if you could serve php on a pre-Mac OS X machine, but you can definitely serve perl (MacPerl) on them. As the others have said, I'd recommend Mac OS X for your customer, for a couple of reasons: First, php is already installed, or, at least, it was there on Mac OS X 10.2 when I got my copy of that. It needs to be updated for security reasons, but it is already in place. All I did was uncomment a couple of lines in httpd.conf and I was testing php pages on my iBook. (Perl is there, too, of course. Perl 5.8 will probably make it into Panther. Java is also there, and installing Tomcat/Struts, and the like is not all that hard.) Second, unless you need to build an absolutely impenetrable site, you and your customer will prefer to have the full Unix-family OS underlying Mac OS X. (Mac OS X is pretty secure, too, anyway. If you need more than that, you might want to look at openbsd, which, incidentally, does run on some Mac hardware.) Third, your customer really doesn't want to serve their site on a box that is also being used to run applications. So, even if the box they are thinking of putting the site on isn't a Mac OS X box, they really want another box, and they might as well get Mac OS X for that box. /on-topic -- Joel Rees, programmer, Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dealing with arrays
hi I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php?
[PHP] SQL Query request is just hanging.
I'm using IIS5.0 on W2k. I have upgraded w2k to sp4 and ms sql server to sp3. I created a new table and just do a simple query in php program. But it seems sql server doesn't return any query result. I'm using mssql_fetch_array() function, but no any return. PHP program is just pending there. I checked process info and found wait type is NETWORKIO. No problem for other existing queries. Only this new one. Almost got crazy Any idea, Thanks a lot! Larry
[PHP] Re: speed of mail() on two servers
Hello, On 08/26/2003 07:39 PM, David T-G wrote: I'm working up a [cli] script to send a personalized (ugh) email to some [often large] number of web site subscribers. Unfortunately, I'm getting lousy performance, running about 0.54 sec per email. My partner has a mail script implemented on another machine and he's running somewhere down around 0.10 sec per email, which is better but still not very good for sending to 60k users. The box (dual Xeon 2.2G with mirrored fast SCSI and 1G RAM) has plenty of horsepower, and it certainly shouldn't need more. It's running RH 7.3 (Valhalla) with 2.4.20 on ext3 and has qmail installed as its MTA. It seems to be the mail() call itself, because I can make a system call (system, exec, passthru) to just echo the current data and it rips through my list in nothin' flat. So how do I tune mail() to make it faster? Or do I need to give up and call qmail-inject directly? I think your bottleneck is not in the queuing but rather in the composition of the personalized messages and the actual delivery. As for the personalization, you should ask if you really need it. What do you need it for? For the delivery, you can always tune qmail to try deliverying messages to more recipients at the same time tweaking concurrencyremote option. The default it 20 recipients at the same time but you can increase it to 120 without patches. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Frames: how to get the url of the top frame?
I am providing content for an other site. My content is getting shown in side a frame. My content contains links to other content I provide. It also has forms that the user can use to submit information. The form's submit action depends on some information that the main site send to me in the url, i.e., http://bigsite.com/index.html?submit=actionName The problem is that cannot find a way to access the URL form inside the frame. All the $_SERVER vars are relative to my frame. Is there a way for me to access the top (parent?) frame's URL? Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Looping through a list - Newbie question
explode() and then foreach are your friends :) explode() using the comma as your separator and then traverse the array using foreach. Jean-Christian Imbeault James Johnson wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot pass values from one page to another
Hi, Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. murugesan wrote: My register_globals in set to ON in php.ini file. I cannot use HTTP_COOKIE_VARS because I need to pass the password from one page to another. -murugesan - Original Message - From: [EMAIL PROTECTED] To: php mailing list [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 7:13 PM Subject: Re: [PHP] Cannot pass values from one page to another what's your register globals settings? did you try to retrieve from HTTP_COOKIE_VARS ? murugesan wrote: Thanks for the message. I looked into the manual. But it is not working. Ofcourse I used session_start in every pages. -murugesan - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: murugesan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 5:23 PM Subject: RE: [PHP] Cannot pass values from one page to another [snip] I got this value in next page(main.php) But from there I am not able to pass it to next page I used session_register('uid'); in main.php but in next page $uid is returning null [/snip] First, look at the manual for sessions. You have posted many questions where the manual would have provided you a solution. Are you placing session_start() at the top of each page where you expect session variables to be available? You should be... Have a pleasant day. -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dealing with arrays
hi I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php?
[PHP] Sessions and frames
I'm having problems getting a session to start when my script is loaded in a frame. I provide some content that another web site loads up in a frame. I have set session.autostart to true in my php.ini file so that sessions are always started automatically and use cookies. The problem is that when a user clicks on any links in my first page a new session is started, the current one is not used. I try and set some session vars using the following on my first page: ?php $_SESSION[a] = a; $_SESSION[b] = b; echo a href='index.html'Click Here/a; ? After this page loads in a frame I look at the /tmp dir on my server and I can see that a session file has been created and contains the correct values. However if I click the link (which is just a link to the same page), a new session is started. I.e. if I look in /tmp I now see 2 session files and the newer one is empty. If I reclick on the link the new session is used and the the session vars are properly set. The problem is that the first session that is created is not used. clicking on links in my frame (which go to other pages on my server) causes a new session to be started and the original session to be forgotten. The second session is then correctly kept across pages. Why is my first session not kept? I'm a bit confused. Could it have anything to do with the fact that the site that is using my content is also setting a cookie? Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Pipe an email to PHP
I have attempted to create a .procmailrc that looks like: :0 * [EMAIL PROTECTED] | $HOME/emailtest.php I have also removed the forwarder from my /etc/valiases file. Now I get: The following address(es) failed: [EMAIL PROTECTED] Can I be sure Procmail is even handling my email? I thought Exim and MailScanner took care of that. -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] This always gives me an error saying it cannot foraward. If I pipe it to |/usr/bin/php /home/account/public_html/mailtools/emailscript.php it tells me: No input file specified. I use something like that in my .procmailrc: :0 fw | /usr/bin/spamassassin :0 * ^X-Spam-Status: Yes { :0 c | $HOME/.spamassassin/spamcop.php :0 spam } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] Re: pear problem
Hi, yes, the directory the /usr/php/pear/share/pear is included, the error message is: Warning: main(PEAR.php): failed to open stream: No such file or directory in /usr/php/pear/share/pear/SOAP/Base.php on line 37 Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/usr/php/pear/share/pear') in /usr/php/pear/share/pear/SOAP/Base.php on line 37 Moritz -Ursprüngliche Nachricht- Von: Catalin Trifu [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 26. August 2003 16:53 An: [EMAIL PROTECTED] Betreff: [PHP] Re: pear problem Hi, Did you added the /usr/php/pear/share/pear in the php.ini include_path option ? Besides the mime is part of Mail_Mime extension and SOAP needs some extensions too (don't remember exactly which) so check if all requirements are met. btw! what's the error message when it crashes ? Cheers, Catalin Moritz Steiner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've a problem with pear, only the DB.php and the Mail.php are working, all the others I installed don't work. Installed packages: === Package Version State DB 1.5.0RC1 stable HTTP_Request 1.1.1stable Mail 1.1.1stable Mail_Mime1.2.1stable Net_DIME 0.3 beta Net_URL 1.0.10 stable SOAP 0.8RC1 beta When I have a look into the directory, it's like that: [lxcmsb3] /usr/php/pear/share/pear l total 72 drwxr-xr-x6 root root 4096 Aug 26 16:24 SOAP drwxr-xr-x6 root root 4096 Aug 26 16:24 docs drwxr-xr-x2 root root 4096 Aug 26 16:24 HTTP drwxr-xr-x2 root root 4096 Aug 26 16:24 Net drwxr-xr-x4 root root 4096 Aug 26 16:24 tests drwxr-xr-x2 root root 4096 Aug 26 16:24 Mail drwxr-xr-x3 root root 4096 Aug 26 16:24 data -rw-r--r--1 root root 7331 Aug 26 16:23 Mail.php drwxr-xr-x2 root root 4096 Aug 26 16:23 DB -rw-r--r--1 root root29165 Aug 26 16:23 DB.php In this code snipplet the first three lines work very well, but when I try to access a subdirectory it crashes... 1 require 'DB.php'; 2 $db = DB::connect('mysql://mysql:[EMAIL PROTECTED]/mysql); 3 require 'Mail.php'; 4 require 'Mail/mime.php'; It's exactly the same with require 'SOAP/Client.php' instead of line 4 Please help me. Moritz -- 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: Sessions and frames
A little update, seems I was wrong about the session cookie being set when the page is first access. The first time the page is accessed no session cookie or /tmp file is generated. I think this may be because the site that is loading my content in a frame is also generating a cookie. Is that a probable cause for my problem? If yes (or) how can I get a session to be started (using cookies) when my content is loaded into a frame? Thanks, Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 27 Aug 2003 07:54:28 -0000 Issue 2261
php-general Digest 27 Aug 2003 07:54:28 - Issue 2261 Topics (messages 160847 through 160875): Re: OO PHP question 160847 by: Ralph Guzman Pipe an email to PHP 160848 by: Thomas Tremain 160860 by: Greg Donald 160873 by: Thomas Tremain If empty don't display... 160849 by: Frank Keessen Re: verifying sql INSERTs 160850 by: CPT John W. Holmes Re: PHP Interview questions 160851 by: Gabriel Guzman 160856 by: Martin Towell 160857 by: Curt Zirzow Re: Website templating schemes 160852 by: Joel Konkle-Parker 160853 by: Joel Konkle-Parker speed of mail() on two servers 160854 by: David T-G 160867 by: Manuel Lemos Re: Image Magick 160855 by: David T-G Re: dynamical balancing text in two colums 160858 by: Miles Thompson DOM setting encoding attribute 160859 by: Maciek Ruckgaber Bielecki can pdf forms be used to submit data into db? 160861 by: Ryan.K.Look.courts.state.hi.us can pdf forms be used to submit data into a db? 160862 by: Ryan.K.Look.courts.state.hi.us Looping through a list - Newbie question 160863 by: James Johnson 160869 by: Jean-Christian IMbeault Re: webserver for mac 160864 by: Joel Rees dealing with arrays 160865 by: Aris Santillan 160871 by: Aris Santillan SQL Query request is just hanging. 160866 by: Larry_Li.contractor.amat.com Frames: how to get the url of the top frame? 160868 by: Jean-Christian IMbeault Re: Cannot pass values from one page to another 160870 by: jabber.raditha.com Sessions and frames 160872 by: Jean-Christian IMbeault 160875 by: Jean-Christian IMbeault Re: pear problem 160874 by: Moritz Steiner 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: [EMAIL PROTECTED] -- ---BeginMessage--- http://www.php.net/oop http://php.resourceindex.com/Documentation/Class_Design_and_OOP/ http://www.evolt.org/article/PHP_Intro_to_Objects_and_Classes/17/48911/i ndex.html -Original Message- From: Mike Zornek [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: [PHP] OO PHP question I'm just beginning a new PHP system and would like to do it in an OO way. I'm having trouble getting my head around how I should store the data in the MySQL db. I mean do I build model objects in PHP and put logic right in the model so anytime I set a property of the object it makes the change to the DB right there and then (which may get chatty) or do I build model objects and then on pages, initialize them from the DB, do my work and send all the data to the db in one shot? Everything I've done in PHP has been procedural till this point so I'm up for any advice, articles, links, etc. ~ Mike -- Mike Zornek Extreme geek in training http://MikeZornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- I'm sure this question has been visited before, but I've had some troubles searching through the archives. This is at least a two part question. I wish to use a pipe instead of the pop3 class, because I wish the email to start the script instead of waiting for a cronjob. 1) The pipe itself: On a cPanel server, I wish to setup an email address with a pipe like: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : |/home/account/public_html/mailtools/emailscript.php This always gives me an error saying it cannot foraward. If I pipe it to |/usr/bin/php /home/account/public_html/mailtools/emailscript.php it tells me: No input file specified. 2) to read the data: I wish to parse the data into $from $subject and $body The data will then be manipulated, and key pieces of data will be extracted and sent to either a database or an instant message to my cell phone. (this part I've already solved) Thomas Tremain www.LiveHost.net http://www.LiveHost.net www.GotoNames.com http://www.GotoNames.com www.TrafficExaminer.com http://www.TrafficExaminer.com ---End Message--- ---BeginMessage--- I'm sure this question has been visited before, but I've had some troubles searching through the archives. This is at least a two part question. I wish to use a pipe instead of the pop3 class, because I wish the email to start the script instead of waiting for a cronjob. 1) The pipe itself: On a cPanel server, I wish to setup an email address with a pipe like: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : |/home/account/public_html/mailtools/emailscript.php I would read the data from the pipe with STDIN: $fp = fopen(php://stdin, r); while(!feof($fp)) $buffer .= fgets($fp, 4096); fclose($fp);
[PHP] Extracting EXIF/IPTC info from jpeg/tiff image files
Hi everybody I need to extract the information (EXIF and IPTC) from jpeg/tiff image files. After that i have to allow my client to modify and put them back in jpeg/tiff files. I want to know whether php has got built-in support in terms of libraries to achieve the goal or i will have to load some external modules/software to do the same. In case external which all modules/software to refer? Please let me know. Thanks Binay
[PHP] Re: Sessions and frames
After much head banging I found the answer. I had set my browser to only allow cookies from the originating site to be set. (This prevent banner ads from setting cookies). Of course the first time my frame was loaded the browser was seeing it as content not from the originating site and hence blocking the session cookie from being set ... argh. One more reason to hate frames :) Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Implode slows down file reading? [was: str_replace performance in large mailing script]
Hi all, I thought str_replace caused slow down of my mailing script, but it seems to be this line of code: $fd = implode(,file(http://www.domain.org/store/min/Mailing_template.html;) ); I first put the mailing template in $fd (only once) and then replace (str_replace) elements of it to individualize HTML emails. Btw im using php version 4.0.6. Are there better(faster) ways to read the contents of a file? Thanks! Fré -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Frames: how to get the url of the top frame?
Hi, Server side there si no way to get the parent's URL you could however client side with JS Cheers, Catalin Jean-Christian Imbeault [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am providing content for an other site. My content is getting shown in side a frame. My content contains links to other content I provide. It also has forms that the user can use to submit information. The form's submit action depends on some information that the main site send to me in the url, i.e., http://bigsite.com/index.html?submit=actionName The problem is that cannot find a way to access the URL form inside the frame. All the $_SERVER vars are relative to my frame. Is there a way for me to access the top (parent?) frame's URL? Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: dealing with arrays
Hi, Insteand of using the same value for checked, you should use different values for the checked parameter like value=entryOneChecked value=entryTwoChecked And it's a good idea to use quoting around variable names at least. Cheers, Catalin Aris Santillan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with a mysql query with data from a form
hi, i am a newbie to php and mysql, i run the easyphp kit ( php 4.2.0, Mysql 3.23.49 and phpmyadmin 2.2.6 ) i would like to use a select * from mytable where my variable like '%$mystring%' where $mystring come from a form form action=show.php method=post name=form1 target=_blank table align=left tr '%Mike % td width=98h3Communication Impliquant :/h3/td td width=144 valign=middle font color=#CC select name=det size=5 id=det option value=PC selectedPC/option option value=echoecho/option ... option value=H10 TangoH10 Tango/option /select select name=den size=1 id=den option value= selected /option option value=11/option ... option value=1010/option /select /font/td td width=153 input name=delibre type=text id=delibre maxlength=20/td td width=39 input type=submit name=Submit value=Ok /td so in show.php i do a $sql=SELECT * FROM journal WHERE a like '%det%' OR de like '%$det%' order by dateheure desc; echo $sql; and what i get is : SELECT * FROM journal WHERE a like '%PC %' OR de like '%PC %' order by dateheure desc ( note the blank space at the end of PC ) whitch doesnt get any record since the word i am looking is PC and not PC i used a like because the request should be used to find record with PC 1 PC PC 9 PC12 ... any ideas ? Thanx Vincent Fievet
RE: [PHP] speed of mail() on two servers
I think that may be 'problem' from sendmail .. mail() function under linux only interacts with sendmail, it doesn't contact to the remote SMTP to leave the mail. Do you have the same sendmail version in two machines? You should compare both sendmail configuration and try to check the speed from a bash script for example. -Mensaje original- De: David T-G [mailto:[EMAIL PROTECTED] Enviado el: miercoles, 27 de agosto de 2003 0:40 Para: PHP General list Asunto: [PHP] speed of mail() on two servers Hi, all -- I'm working up a [cli] script to send a personalized (ugh) email to some [often large] number of web site subscribers. Unfortunately, I'm getting lousy performance, running about 0.54 sec per email. My partner has a mail script implemented on another machine and he's running somewhere down around 0.10 sec per email, which is better but still not very good for sending to 60k users. The box (dual Xeon 2.2G with mirrored fast SCSI and 1G RAM) has plenty of horsepower, and it certainly shouldn't need more. It's running RH 7.3 (Valhalla) with 2.4.20 on ext3 and has qmail installed as its MTA. It seems to be the mail() call itself, because I can make a system call (system, exec, passthru) to just echo the current data and it rips through my list in nothin' flat. So how do I tune mail() to make it faster? Or do I need to give up and call qmail-inject directly? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Extracting EXIF/IPTC info from jpeg and tiff files
Hi everybody I need to extract the information (EXIF and IPTC) from jpeg/tiff image files. After that i have to allow my client to modify and put them back in jpeg/tiff files. I want to know whether php has got built-in support in terms of libraries to achieve the goal or i will have to load some external modules/software to do the same. In case external which all modules/software to refer? Please let me know. Thanks Binay
[PHP] mail mime attachment
Hi, has somebody a working code example of sending a mail with attachment, my code is unfortunately not working... My Code: require 'Mail.php'; require 'Mail/mime.php'; $headers['From']='[EMAIL PROTECTED]'; $headers['Subject']='mueedddee'; $body = 'brauc ich nicht'; $to = [EMAIL PROTECTED]; $mime = new Mail_mime; $mime-setTXTBody($body); $html = 'htmlbodythis is b html /b /body/html'; $mime-setHTMLBody($html); $file = 'my.cnf.txt'; $mime-addAttachment($file, 'text/plain'); $headers = $mime-headers($headers); $body = $mime-get(); $message = Mail::factory('mail'); $message-send($to,$headers,$body); The mail I receive: --=_7c5403d1e75e31c069963519ac27e8a2 Content-Type: multipart/alternative; boundary==_70ce8099b4ea871773cbe46983db1bb5 --=_70ce8099b4ea871773cbe46983db1bb5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit brauc ich nicht --=_70ce8099b4ea871773cbe46983db1bb5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable htmlbodythis is b html /b /body/html --=_70ce8099b4ea871773cbe46983db1bb5-- --=_7c5403d1e75e31c069963519ac27e8a2 Content-Type: text/plain Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=my.cnf.txt IyBteXNxbCBjb25maWcgZmlsZS4KCiMgVGhpcyB3aWxsIGJlIHBhc3NlZCB0byBhbGwgbXlz cWwg Y2xpZW50cwpbY2xpZW50XQojIFBvcnQgbnVtYmVyIHRvIHVzZSBmb3IgY29ubmVjdGlvbgpw b3J0 PTMzMDYKIyBTb2NrZXQgZmlsZSB0byB1c2UgZm9yIGNvbm5lY3Rpb24KI3NvY2tldD1NeVNR TAoK IyBUaGUgTXlTUUwgc2VydmVyCgpbbXlzcWxkXQojIFBvcnQgbnVtYmVyIHRvIHVzZSBmb3Ig Y29u bmVjdGlvbgpwb3J0CQkJPQkzMzA2CiMgVGhlIG51bWJlciBvZiBzaW11bHRhbmVvdXMgY2xp ZW50 cyBhbGxvd2VkCm1heF9jb25uZWN0aW9ucwkJPQkxMDAwCiMgVGhlIG51bWJlciBvZiBvdXRz dGFu ZGluZyBjb25uZWN0aW9uIHJlcXVlc3RzIE15U1FMIGNhbiBoYXZlLiAKIyBUaGlzIGNvbWVz IGlu dG8gcGxheSB3aGVuIHRoZSBtYWluIE15U1FMIHRocmVhZCBnZXRzIHZlcnkgbWFueSAKIyBj b25u ZWN0aW9uIHJlcXVlc3RzIGluIGEgdmVyeSBzaG9ydCB0aW1lLgpiYWNrX2xvZwkJPQkxMDAK IyBU aGUgc2l6ZSBvZiB0aGUgYnVmZmVyIHVzZWQgZm9yIGluZGV4IGJsb2Nrcy4gSW5jcmVhc2Ug dGhp cyB0byBnZXQgYmV0dGVyIAojIGluZGV4IGhhbmRsaW5nIChmb3IgYWxsIHJlYWRzIGFuZCBt dWx0 aXBsZSB3cml0ZXMpIHRvIGFzIG11Y2ggYXMgeW91IGNhbiBhZmZvcmQKa2V5X2J1ZmZlcl9z aXpl CQk9CTUxMk0KIyBUaGUgbnVtYmVyIG9mIG9wZW4gdGFibGVzIGZvciBhbGwgdGhyZWFkcwp0 YWJs ZV9jYWNoZQkJPQk1MTIKIyBQZXJtaXRzIHRoZSBhcHBsaWNhdGlvbiB0byBnaXZlIHRoZSB0 aHJl YWRzIHN5c3RlbSBhIGhpbnQgZm9yIHRoZSAKIyBkZXNpcmVkIG51bWJlciBvZiB0aHJlYWRz IHRo Thanks, Moritz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] speed of mail() on two servers
Javier, et al -- ...and then Javier Tacon said... % % I think that may be 'problem' from sendmail .. mail() function under % linux only interacts with sendmail, it doesn't contact to the remote Right. Only it doesn't make much sense, because qmail is FAST. % SMTP to leave the mail. Do you have the same sendmail version in two % machines? You should compare both sendmail configuration and try to % check the speed from a bash script for example. Unfortunately, I can't get to his other server, and he doesn't really know anything about its guts (he's a great php coder and a great art designer, but he's entirely a windoze guy). I don't even know if he's running qmail there. Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
[PHP] Can we control the content of MS Outlook Express
Dear all Here is the question: I had a link which will open user's outlook express and let the user to type the content and send it to me! Now i want to set some content which will appear on the outlook express and then user will type the rest of the content to it and send it to me! is this possible? Thx alot Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session.cookie_domain
We're having a problem with a site that recently upgraded to php 4.3.3. Ever since the upgrade, session variables won't pass between pages. Looking at the php.ini file, I see that session.cookie_domain is set to server.hostingcompany.com while our site is www.ourdomain.com. If the session.cookie_domain is set to another domain, would this be the cause of our problems? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] speed of mail() on two servers
May be the machine of your friend has a better network output than your machine :) -Mensaje original- De: David T-G [mailto:[EMAIL PROTECTED] Enviado el: miercoles, 27 de agosto de 2003 11:59 Para: PHP General list CC: Javier Tacon Asunto: Re: [PHP] speed of mail() on two servers Javier, et al -- ...and then Javier Tacon said... % % I think that may be 'problem' from sendmail .. mail() function under % linux only interacts with sendmail, it doesn't contact to the remote Right. Only it doesn't make much sense, because qmail is FAST. % SMTP to leave the mail. Do you have the same sendmail version in two % machines? You should compare both sendmail configuration and try to % check the speed from a bash script for example. Unfortunately, I can't get to his other server, and he doesn't really know anything about its guts (he's a great php coder and a great art designer, but he's entirely a windoze guy). I don't even know if he's running qmail there. Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] speed of mail() on two servers
Javier -- ...and then Javier Tacon said... % % May be the machine of your friend has a better network output than your % machine :) Heh :-) Hey, stranger things have happenned! But check my other followup for an interesting twist. Thanks again HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
[PHP] Re: php.ini sendmail settings (was Re: [PHP] speed of mail() ... )
Hi again, everyone -- I have a feeling that our problem is a lousy php.ini configuration. For both module and CLI php we're using /usr/local/lib/php.ini, so I look in there and I see [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] ; For Unix only. You may supply arguments as well (default: sendmail -t -i). ;sendmail_path = and get a little worried. But in the phpinfo() output I have ... sendmail_from [EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i ... (for both web and CLI) which, aside from the silly sendmail_from value, looks right after all. Do our admins have us set up to make an SMTP connection -- back to ourselves, even -- for every mail? If not, how on earth do we have a value for sendmail_path (which, in fact, points to an existing link to qmail's sendmail, just as it should). If I DO need to fix it, what are the *correct* values for sendmail_from and SMTP on this *NIX box; should I just comment them out? And then I imagine that apache needs a restart to see the new php.ini values, no? Even more confused, :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
[PHP] Linking to files outside the directory structure...?
I wanna protect a few files from reandom downloads. I'm moving hosts soon, and will loose my mod_auth_mysql module that let it talk to the .htaccess file. What I want to do is store a number of files, outside of my web folder, say one level under it, but still get my browser to retrive that file. Perhaps with some coding in PHP? is this at all possible, or am I barking up the wrong tree...? Any ideas? Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: [PHP] PHP if exit Q
You should fix your logic, or put additional if in. Or you can use while and break, but this is somewhat sick: while( condition ) { // code here if( codition ) { } else { break; } // more code here break; // break at the end so while() becomes if() } jsWalter wrote: If I am in a second level IF conditional and it failes, I want to jump out of the parent IF. How can I do that? Thanks Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Interview questions
Gabriel Guzman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2003-08-26 at 10:00, CPT John W. Holmes wrote: PHP is server side, so it obviously cannot control light bulbs. Use javascript. maybe the lightbulbs are connected to the server :) as seems to be the case right here : http://www.drivemeinsane.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] If empty don't display...
[snip] 1. I'm trying not to display the fields that are empty with: if (!empty($row9-prijs4pk)){ But it's still display the line and there is no value in PRIJS4PK field. [/snip] You are testing to see if $row9-prijs4pk is NOT empty. If it is not empty you print it. You have not specified an action for IS empty (else)...perhaps this would help. [snip] 2. How can i reduce the amount of Queries?? [/snip] It appears that you have multiple duplicate queries. It appears that you are using the $limit and $page to paginate the results, there is a good tutorial which shows you how to do this on DevShed. The last page (displaying all of the code) is http://www.devshed.com/Server_Side/PHP/Paginating/page6.html . I did not look over each line of your code, but this is the general impression I received. If I may be frank, Frank, you probably didn't receive responses as quickly as you had wished due to the enormous amount of code you included with your request. It is my suggestion that you read http://catb.org/~esr/faqs/smart-questions.html as it contains valuable information (such as only including the code blocks in question) that will help to get your questions answered quickly. HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can we control the content of MS Outlook Express
Yes, mailto:[EMAIL PROTECTED]body=Some_text_in_the_body... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] Jack [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Dear all Here is the question: I had a link which will open user's outlook express and let the user to type the content and send it to me! Now i want to set some content which will appear on the outlook express and then user will type the rest of the content to it and send it to me! is this possible? Thx alot Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Interview questions
[snip] toggle_light(1); sleep(120); toggle_light(1); toggle_light(2); move('self', 'room/'); if ($lightbulb['temp'] $room['temp']) { echo switch #1; } elseif ($lightbulb['ison']) { echo switch #2; } else { echo switch #3; } hm.. i had to keep it OT somehow :) [/snip] :7) Curt. However, Curt does bring up a good pointgiven a real world situation create the decision logic (in code format) that demonstrates you grep the path needed to arrive at a conclusion. As many of us model business processes this is a valid method for determining familiarity with the problem solving method in a code based world. Some of you requested another situation You are presented with three crates. One is labled 'apples', one is labled 'oranges', one is labled 'apples and oranges'. The lables have been mis-applied with none of the lables being on the correct crate. To be perfectly clear ( :7) Brian! ) one crate contains apples, one contains oranges, and one contains apples and oranges...but you do not know which crate contains which fruits. Can you draw one fruit from a single crate (without being able to see inside the crate) and determine where the labels should be re-applied in order to correct the problem? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webserver for mac
On Wednesday, August 27, 2003, at 04:49 AM, Richard Baskett wrote: on 8/26/03 10:50 AM, Edward Peloke at [EMAIL PROTECTED] wrote: Hello all, I am doing some php work for a local company who uses a mac. I was telling them that I use apache as my webserver and they want to know what they can use as their webserver. I know nothing about Macs and don't think you an run apache but I may be all wrong...what do mac owners use for a webserver? Thanks, Eddie My primary machine is a Mac OS X machine and I run Apache, whatever version you would like, PHP, MySQL and all of the other fun stuff. Plus I administer a couple xserves and of course they can run it all also. Now if you are using OS 9 then tell them they need to upgrade to OS X. OS 9 just has too many problems and shouldnt be used as a webserver in my opinion. Actually, to the best of my knowledge you cannot run a decent server on Mac OS 10 (X), and certainly can't run PHP/MySQL, which is the main reason I upgraded to OSX. But if they're running anything less than a G4, Mac OSX may be too hungry?!? Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function and php.ini file
Hi guys I am new to the mail function. I have looked in the manual however there isnt much about the mail function. I am trying to use the function and get returned this error: Warning: mail() [function.mail]: Failed to connect to mailserver at localhost port 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in c:\program files\apache group\apache\htdocs\bookabstract\sendrequest.php on line 162 anyone have any idea what settings I have to set in the php.ini file? these are the only setting s that I have found to be relevant: [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I am running windows 2000, any ideas what could be wrong? could it be a network problem? Thanx in advance Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamical balancing text in two colums
To throw a huge spanner in the works: 1. tables are not intended for layout 2. devices other than a PC/Windows web browser may be more suited to q well structured XHTML based, table-less format with CSS for styling. 3. columns work well in a newspaper, but do not translate well to the web, since you have no idea where the bottom of the screen is... who wants to scroll down, only to discover this is half or one third of the text, having to scroll up again??? IF ANYTHING, structure/style your columns using DIVs/CSS, NOT tables... that way, for accessibility purposes, the content is still readable when read top-to-bottom, via something like a PDA, mobile/cell phone, text-to-speach converter, etc. Yes, i use columns in layout, but NOT to discuss one topic... each column is a div, and each div is styled with CSS to look like a column when styled, and each div discusses one topic... a long article would not be spread across two divs... this is a structural nightmare!!! You are trying to emulate another medium (print), rather than embracing another (web) which has a different set of rules. If you must break the text into two columns, try to do it with divs and style sheets, not tables, so that it's structurally not too far out of normal reading. Really though, do your readers want/need this??? I hate to think how bad this sort of ugly mark-up prints out!!! Justin On Wednesday, August 27, 2003, at 03:10 AM, Dynamical.biz wrote: Hi, I've been dealing withs this question: I've never seen dynamical balanced text in two colums in a web so this the challenge. html formated text is stored in a database, conetion and placed into a variable i.e.: $text = PIMG alt=labordeta hspace=3 src=http://www.lamundial.net/img/labordeta.jpg; align=left border=0EMefe.Zaragoza./EM El parlamentario./PPSome more text tranquilo simplenente trabajando./P; ... some more paragrphs just like newspaper articles. the first idea is this: 1. count the total characters in $text string so we can guess juts the half 2. getting into $tx1 variable the fisrt half 3. count the total characters in $tx1 till the fisrt /p STARTING from the END to the BEGUINING of $tx1 4. getting into $col1 the fist part 5. getting into $col2 the rest 6. render the text in a table //CODE 1. $half = floor(strlen($texto)/2); 2. $tx1 = substr($text,0,$half); 3. $first_P = strrpos($tx1,/P); 4. $col1 = substr($text,0,$first_P); 5. $col2 = substr($text,$first_P); 6. table tr td?= $col1 ?/td td?= $col2 ?/td /tr /table PROBLEMS easy to know the middle point of a string but we have html code so easy to break it badly, something like: IMG hspace=3 src=ht -|- tp://www.lamundial.net/img/img.jpg so this is why the /p idea. If there is a large paragrph in the middle of the whole text the columns the two columns are not so nice balanced, this is why I ask the people writing articles for my web trying to avoid long ones. They use HTMLAREA http://www.interactivetools.com/products/htmlarea/ from Interactive tools so the html is not done by hand. anyway just in case there is no way to correctly balance the text I let the writer the 1 colum / 2 colums as an option so the traditional 1 colum (no colums) is always available. they can display the final render os the article as they save it when writing so the decide. this is working at most of the articles in http://www.lamundial.net i.e.: http://www.lamundial.net/home.php?pg=articleidart=124 http://www.lamundial.net/home.php?pg=articleidart=121 http://www.lamundial.net/home.php?pg=articleidart=118 the text balancing is working quite nice any other idea? thanks aniceto lópez DYNAMICAL.BIZ web development host services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] If empty don't display...
Shouldn't it be if (empty($row9-prijs4pk)){ -Oorspronkelijk bericht- Van: Frank Keessen [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 26 augustus 2003 22:14 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] If empty don't display... Hi there, Can you please have a look at the following code: I've got two questions; 1. I'm trying not to display the fields that are empty with: if (!empty($row9-prijs4pk)){ But it's still display the line and there is no value in PRIJS4PK field. 2. How can i reduce the amount of Queries?? Thanks for your time and help, Frank The code: ? // Avaibility and prices include(../conf/config.php); include(../conf/functions.php); // open database connection $connection = mysql_connect($host, $user, $pass) or die (Unable to connect!); // select database mysql_select_db($db) or die (Unable to select database!); //Get ID $id=$_GET['id']; $page=$_GET['page']; // limit value for number of records to be shown per page // query database to find total number of records to display $limit = 10; $query_count = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id'; $result_count = mysql_query($query_count); $totalrows = mysql_num_rows($result_count); if(empty($page)) $page = 1; $limitvalue = $page * $limit - ($limit); $query = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result = mysql_query($query) or die(Error: . mysql_error()); $count_result = mysql_num_rows($result); $query2 = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result2 = mysql_query($query2) or die(Error: . mysql_error()); $query3 = SELECT date, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result3 = mysql_query($query3) or die(Error: . mysql_error()); $query5 = SELECT date, prijs4pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result5 = mysql_query($query5) or die(Error: . mysql_error()); $query6 = SELECT date, prijs4pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id' ORDER BY date LIMIT $limitvalue, $limit ; $result6 = mysql_query($query6) or die(Error: . mysql_error()); $query4 = SELECT naamreis FROM reizen WHERE reisid = '$id'; $result4 = mysql_query($query4) or die(Error: . mysql_error()); $row4 = mysql_fetch_object($result4); $query9 = SELECT totaalprijs, prijs4pk, prijs5pk, prijs3pk, prijs2pk, prijs1pk FROM date WHERE reisid = '$id'; $result9= mysql_query($query9) or die(Error: . mysql_error()); $row9 = mysql_fetch_object($result9); // Display links at the top to indicate current page and number of pages displayed $numofpages = ceil($totalrows / $limit); $from=$limit*$page-$limit+1; $to=$from + $count_result-1; ? html head link href=../css/main.css rel=stylesheet type=text/css /head body body bgcolor=#F2D071 ? echo font class=\bold\ . $row4-naamreis . /font; ? brbrTR bgColor=#ffcc00 TD colSpan=3 height=126 TABLE cellSpacing=1 cellPadding=3 width=100% border=0 TBODY TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right/DIV/TD ? if (mysql_num_rows($result) 0) { while($row = mysql_fetch_object($result)) { echo TD width=40 bgColor=#ff height=38DIV align=right. formatDateShort($row-date) . /DIV/TD; } } ? /TR ? if (!empty($row9-prijs4pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right4 pk/DIV/TD ? if (mysql_num_rows($result6) 0) { while($row5= mysql_fetch_object($result5)) { $pr6 = number_format($row5-prijs4pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr6 . /DIV/TD; } } } if (!empty($row99-prijs3pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right3 pk/DIV/TD ? if (mysql_num_rows($result5) 0) { while($row5= mysql_fetch_object($result5)) { $pr5 = number_format($row5-prijs3pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr5 . /DIV/TD; } } } if (!empty($row9-prijs2pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right2 pk/DIV/TD ? if (mysql_num_rows($result2) 0) { while($row2= mysql_fetch_object($result2)) { $pr2 = number_format($row2-prijs2pk,0); echo TD class=standaard width=40 bgColor=#ffDIV align=right. $pr2 . /DIV/TD; } } } ? ? if (!empty($row9-prijs1pk)){ ? TR TD class=standaardwit width=14% bgColor=#ff9900 DIV align=right1 pk/DIV/TD ? if (mysql_num_rows($result3) 0) {
Re: [PHP] can pdf forms be used to submit data into a db?
Look here: http://sk2.php.net/manual/en/ref.fdf.php Thanks you fixed the missing indefinite article, I was not going to answer the original. [EMAIL PROTECTED] wrote: hi guys and gals, aloha from hawaii, Not sure if this is the right place to ask, but i just need to know if it is technically possible to have a pdf form be filled out online and then once the user hits submit, php takes the data and puts it into a db or some sort of db technology and if the need arises to pull up that record once more, php fetches the data from the db and dynamically fills out the pdf form and presents it to the end user...can do? or anyone know who i can talk to about this... thanks and mahalo from hawaii incentive if anyone can help me or point me in the right direction, i MAY be inclined to send some macadamia nuts to the continental US /incentive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with readfile
Hi all I am using the following to pass a file to the client snip header(Content-type: . $row['filetype'] ); $path = ROOT_PATH . file_uploads/; $real_filename = $path . $row['location'] . '/' .$row['filename']; header(Content-Disposition: attachment; filename= . $row['filename']); readfile($real_filename); /snip The content type is obtained from a database along with the actual location of the file. The files are outside of the webroot. The problem is that the file is either corrupted or something different is sent. E.g. if a pdf is sent the first line of the received file is %PDF-1.3 followed by some unprintable (in a 7 bit email) characters, this causes adobe to report an error. If a text file is downloaded, then all I get is the source of the webpage I called the function from. Where am I going wrong? I have checked the pathnames and the headers and all seems to be correct. The browser produces a dialog with the correct information in it, i.e what file type and the name. Thanks Alastair This email and any attached files are confidential and intended solely for the use of the individual/s or entity to whom it is addressed. If you have received this email in error please notify:- [EMAIL PROTECTED] RACAL INSTRUMENTS WIRELESS SOLUTIONS. An AEROFLEX Company. Visit our website at:- http://www.racalinstruments.com/ This footnote also confirms that this email message has been swept for the presence of computer viruses. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pipe an email to PHP
Thomas -- ...and then Thomas Tremain said... % % I'm sure this question has been visited before, but I've had some troubles % searching through % the archives. What sort of trouble? Just trouble finding a helpful answer, or actual trouble performing a search? % % This is at least a two part question. % % I wish to use a pipe instead of the pop3 class, because I wish the email to % start the script % instead of waiting for a cronjob. Makes sense. % % 1) The pipe itself: % On a cPanel server, I wish to setup an email address with a pipe like: % [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : % |/home/account/public_html/mailtools/emailscript.php % % This always gives me an error saying it cannot foraward. Is emailscript.php marked as executable and does it have a proper shebang line at the top? % % If I pipe it to |/usr/bin/php % /home/account/public_html/mailtools/emailscript.php % it tells me: No input file specified. Hmmm... How does your code look? % % 2) to read the data: % % I wish to parse the data into $from $subject and $body Greg's STDIN suggestion sounds good to me. Read the thing in and look for ^From:, ^Date:, and ^$; everything after the blank line is the body. Strip the signature for bonus points. % % The data will then be manipulated, and key pieces of data will be extracted % and sent to either a database or an instant message to my cell phone. (this % part I've already solved) Well, that's something ;-) % % % Thomas Tremain % www.LiveHost.net http://www.LiveHost.net % www.GotoNames.com http://www.GotoNames.com % www.TrafficExaminer.com http://www.TrafficExaminer.com HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
RE: [PHP] Looping through a list - Newbie question
There are a lot of methods. The most common is using an array: $_SESSION['sv_CampusList'] = Array (1,2,3,4,5); foreach($_SESSION['sv_CampusList'] as $id) { echo $id; } If you want to use sv_CampusList as string: $_SESSION['sv_CampusList'] = 1,2,4,5; $tmpArr = explode(,,$_SESSION['sv_CampusList']); foreach($tmpArr as $id) { echo $id; } -Mensaje original- De: James Johnson [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 27 de agosto de 2003 4:45 Para: [EMAIL PROTECTED] Asunto: [PHP] Looping through a list - Newbie question Hi, I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value. Is there an easy way to do this, or do I need to convert the list to an array first? In the code below, $id isn't being set. Here's my code (this is just testing stuff, sv_CampusList is set somewhere else): ?php session_start(); $_SESSION['sv_CampusList'] = 1,2,4,5; for($i=1; $i=strlen($_SESSION['sv_CampusList']); $i++){ $id = strpos($_SESSION['sv_CampusList'],$i); echo $id; } ? Thanks, James -- 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] dealing with arrays
Then you must include keys: input type=text name=name[1] input type=text name=tel[1] input type=checkbox name=check[1] value=1 input type=text name=name[2] input type=text name=tel[2] input type=checkbox name=check[2] value=1 and so on. This is needed bacause only checked checkboxes are send on submit. Aris Santillan wrote: hi I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamical balancing text in two colums
Thanks Justin and Miles for your ideas. It can take a looong time and a huge quantity of beer to disscuss them. I was asking for some other ideas just about the code, how to solve this problem technicaly not if this is a good idea to use one / two colums, tables or DIVS, print vs screen etc. thanks anyway saludos aniceto lópez :: DYNAMICAL.BIZ web development host services Barcelona - Spain -Mensaje original- De: Justin French [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 27 de agosto de 2003 15:06 Para: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Asunto: Re: [PHP] dynamical balancing text in two colums To throw a huge spanner in the works: 1. tables are not intended for layout 2. devices other than a PC/Windows web browser may be more suited to q well structured XHTML based, table-less format with CSS for styling. 3. columns work well in a newspaper, but do not translate well to the web, since you have no idea where the bottom of the screen is... who wants to scroll down, only to discover this is half or one third of the text, having to scroll up again??? IF ANYTHING, structure/style your columns using DIVs/CSS, NOT tables... that way, for accessibility purposes, the content is still readable when read top-to-bottom, via something like a PDA, mobile/cell phone, text-to-speach converter, etc. Yes, i use columns in layout, but NOT to discuss one topic... each column is a div, and each div is styled with CSS to look like a column when styled, and each div discusses one topic... a long article would not be spread across two divs... this is a structural nightmare!!! You are trying to emulate another medium (print), rather than embracing another (web) which has a different set of rules. If you must break the text into two columns, try to do it with divs and style sheets, not tables, so that it's structurally not too far out of normal reading. Really though, do your readers want/need this??? I hate to think how bad this sort of ugly mark-up prints out!!! Justin On Wednesday, August 27, 2003, at 03:10 AM, Dynamical.biz wrote: Hi, I've been dealing withs this question: I've never seen dynamical balanced text in two colums in a web so this the challenge. html formated text is stored in a database, conetion and placed into a variable i.e.: $text = PIMG alt=labordeta hspace=3 src=http://www.lamundial.net/img/labordeta.jpg; align=left border=0EMefe.Zaragoza./EM El parlamentario./PPSome more text tranquilo simplenente trabajando./P; ... some more paragrphs just like newspaper articles. the first idea is this: 1. count the total characters in $text string so we can guess juts the half 2. getting into $tx1 variable the fisrt half 3. count the total characters in $tx1 till the fisrt /p STARTING from the END to the BEGUINING of $tx1 4. getting into $col1 the fist part 5. getting into $col2 the rest 6. render the text in a table //CODE 1. $half = floor(strlen($texto)/2); 2. $tx1 = substr($text,0,$half); 3. $first_P = strrpos($tx1,/P); 4. $col1 = substr($text,0,$first_P); 5. $col2 = substr($text,$first_P); 6. table tr td?= $col1 ?/td td?= $col2 ?/td /tr /table PROBLEMS easy to know the middle point of a string but we have html code so easy to break it badly, something like: IMG hspace=3 src=ht -|- tp://www.lamundial.net/img/img.jpg so this is why the /p idea. If there is a large paragrph in the middle of the whole text the columns the two columns are not so nice balanced, this is why I ask the people writing articles for my web trying to avoid long ones. They use HTMLAREA http://www.interactivetools.com/products/htmlarea/ from Interactive tools so the html is not done by hand. anyway just in case there is no way to correctly balance the text I let the writer the 1 colum / 2 colums as an option so the traditional 1 colum (no colums) is always available. they can display the final render os the article as they save it when writing so the decide. this is working at most of the articles in http://www.lamundial.net i.e.: http://www.lamundial.net/home.php?pg=articleidart=124 http://www.lamundial.net/home.php?pg=articleidart=121 http://www.lamundial.net/home.php?pg=articleidart=118 the text balancing is working quite nice any other idea? thanks aniceto lópez DYNAMICAL.BIZ web development host services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looping through a list - Newbie question
From: James Johnson [EMAIL PROTECTED] I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value. Is there an easy way to do this, or do I need to convert the list to an array first? In the code below, $id isn't being set. Here's my code (this is just testing stuff, sv_CampusList is set somewhere else): ?php session_start(); $_SESSION['sv_CampusList'] = 1,2,4,5; for($i=1; $i=strlen($_SESSION['sv_CampusList']); $i++){ $id = strpos($_SESSION['sv_CampusList'],$i); echo $id; } ? What are you actually trying to accomplish here? I could tell you how to loop through a list in a string and run a query for each number, but I'd have the horrible feeling that you're using some inefficient method to accomplish something. For instance, if you're just trying to select data matching the numbers in your list, you can do this: $query = SELECT * FROM Table WHERE campus_list IN ({$_SESSION['sv_CampusList']}); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dealing with arrays
You need to name the elements a little differently. You're on the right track with making them an array, but if I check the third box, that'll make $check[0] = 1, and if I put in a name in the first box, that'll make $name[0] = 'John'... so you have no way of relating the name from entry one to the checkbox in entry one. So, the easy fix for this is to supply the key yourself. pEntry One input type=text name=name[1] input type=text name=tel[1] input type=checkbox name=check[1] value=1 pEntry Two input type=text name=name[1] input type=text name=tel[1] input type=checkbox name=check[1] value=1 Now, when that is submitted, only the checked values will be passed in $check.. so you can do this (assuming POST): foreach($_POST['check'] as $key = $value) { if(empty($_POST['name'][$key])) { echo you didn't supply a name for entry $key; } if(empty($_POST['tel'][$key])) { echo you didn't supply a telephone number for entry $key; } //process $_POST['name'][$key] and $_POST['tel'][$key] } Hope that helps. Sorry for the top post, but OE sucks. :) ---John Holmes... - Original Message - From: Aris Santillan [EMAIL PROTECTED] To: Php (E-mail) [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 11:21 PM Subject: [PHP] dealing with arrays hi I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SQL Query request is just hanging.
[snip] I'm using IIS5.0 on W2k. I have upgraded w2k to sp4 and ms sql server to sp3. I created a new table and just do a simple query in php program. But it seems sql server doesn't return any query result. I'm using mssql_fetch_array() function, but no any return. PHP program is just pending there. I checked process info and found wait type is NETWORKIO. No problem for other existing queries. Only this new one. Almost got crazy [/snip] Can we see the query? The code? It would probably help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: speed of mail() on two servers
Manuel, et al -- ...and then Manuel Lemos said... % % Hello, Hi! % % On 08/26/2003 07:39 PM, David T-G wrote: % I'm working up a [cli] script to send a personalized (ugh) email to some % [often large] number of web site subscribers. Unfortunately, I'm getting % lousy performance, running about 0.54 sec per email. ... % % I think your bottleneck is not in the queuing but rather in the % composition of the personalized messages and the actual delivery. Actually, that can't be. I ran some tests where I did everything but instead of calling mail() I printed the mail() call. It ran nearly 800 messages through in about two and a half seconds :-) % % As for the personalization, you should ask if you really need it. What % do you need it for? No luck there; I already fought as hard as I could. It's a feature that our clients tout to the people for whom they do marketing, so they have to be able to provide it, so we have to write it. % % For the delivery, you can always tune qmail to try deliverying messages % to more recipients at the same time tweaking concurrencyremote option. % The default it 20 recipients at the same time but you can increase it to % 120 without patches. Hmmm... That's worth a look; where do I set that? % % -- % % Regards, % Manuel Lemos Thanks TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] Cannot pass values from one page to another
From: [EMAIL PROTECTED] Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. Please explain how you've come to this conclusion... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WYSIWYG online editor for Macintosh?
Hi there. Slightly OT, but it's for a PHP project... We normally use a plug-in WYSIWYG editor so that our clients can manage their content in a word-like interface. Normally this works fine, but this time when we've completed the site we've discovered they have an entire department that is 100% Macintosh and this editor doesn't work. Has anyone come across one of these that are cross-platform? Would really appreciate some advice Thanks Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dealing with arrays
On 27 August 2003 04:22, Aris Santillan wrote: I Have pEntry One input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Two input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Three input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Four input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 pEntry Five input type=text name=name[] input type=text name=tel[] input type=checkbox name=check[] value=1 . i want to process entries only with checked checkbox how can i do this in php? This happens anyway, as only the values for checked checkboxes are returned to the script -- you'll never get to see unchecked boxes. However, the way you've written the form causes a problem here: since all text boxes, but only checked checkboxes, are sent, you'll see 5 elements in the name[] and tel[] arrays (name[0] to name[4] and tel[0] to tel[4]) but only as many entries in the check[] array as there are boxes checked -- you might get, for example, check[0] and check[1], so you know 2 boxes were checked but not *which* boxes (it might have been the ones for Entry Three and Entry Five). The way to combat this is to use explicit subscripts in your form field names, like so: pEntry One input type=text name=name[1] input type=text name=tel[1] input type=checkbox name=check[1] value=1 pEntry Two input type=text name=name[2] input type=text name=tel[2] input type=checkbox name=check[2] value=1 pEntry Three input type=text name=name[3] input type=text name=tel[3] input type=checkbox name=check[3] value=1 pEntry Four input type=text name=name[4] input type=text name=tel[4] input type=checkbox name=check[4] value=1 pEntry Five input type=text name=name[5] input type=text name=tel[5] input type=checkbox name=check[5] value=1 Now, you'll still get all five entries for name[] and tel[] ([1] to [5] in this instance), but you'll also helpfully get the corresponding elements of check[] for the boxes which were actually checked -- so, if only Entry Two and Entry Four are checked, you'll get check[2] and check[4] set (but no other elements of the check[] array). All you need to do is foreach() along the check array, and take action for each key that that returns you. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pipe an email to PHP
Is emailtest.php executable, does it start with #!/usr/bin/php, is $HOME set? Thomas Tremain wrote: I have attempted to create a .procmailrc that looks like: :0 * [EMAIL PROTECTED] | $HOME/emailtest.php I have also removed the forwarder from my /etc/valiases file. Now I get: The following address(es) failed: [EMAIL PROTECTED] Can I be sure Procmail is even handling my email? I thought Exim and MailScanner took care of that. -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] This always gives me an error saying it cannot foraward. If I pipe it to |/usr/bin/php /home/account/public_html/mailtools/emailscript.php it tells me: No input file specified. I use something like that in my .procmailrc: :0 fw | /usr/bin/spamassassin :0 * ^X-Spam-Status: Yes { :0 c | $HOME/.spamassassin/spamcop.php :0 spam } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function
Hi php-general, I have a question about the mail function. In the API I saw, that when running on linux, I just need the binary sendmail, usually located on /usr/sbin. Windows users need a running mail-server. I have php working on a linux machine. Why do I need to have postfix running then to make it work? I posted before, because no mails were sent. I had the sendmail-binary (postfix) installed, but postfix was not running. Maybe someone can explain it to me... SvT -- Who is the ennemy? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sessions and frames
It has nothing to do with the other site. Browser makes a separate request for the frame content and you can set cookies without any problem. You should check if the cookie is realy set and if the cookie parameters are right (eg. in Mozilla's cookie manager). Jean-Christian IMbeault wrote: A little update, seems I was wrong about the session cookie being set when the page is first access. The first time the page is accessed no session cookie or /tmp file is generated. I think this may be because the site that is loading my content in a frame is also generating a cookie. Is that a probable cause for my problem? If yes (or) how can I get a session to be started (using cookies) when my content is loaded into a frame? Thanks, Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extracting EXIF/IPTC info from jpeg/tiff image files
search for exif on phpclasses.org Binay Agarwal wrote: Hi everybody I need to extract the information (EXIF and IPTC) from jpeg/tiff image files. After that i have to allow my client to modify and put them back in jpeg/tiff files. I want to know whether php has got built-in support in terms of libraries to achieve the goal or i will have to load some external modules/software to do the same. In case external which all modules/software to refer? Please let me know. Thanks Binay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Implode slows down file reading? [was: str_replace performance in large mailing script]
From: frederik feys [EMAIL PROTECTED] I thought str_replace caused slow down of my mailing script, but it seems to be this line of code: $fd = implode(,file(http://www.domain.org/store/min/Mailing_template.html;) ); I first put the mailing template in $fd (only once) and then replace (str_replace) elements of it to individualize HTML emails. Btw i'm using php version 4.0.6. Are there better(faster) ways to read the contents of a file? file_get_contents() ? The slow down is probably because you're going through HTTP to read the file. Is there a reason for that? Any way you can cache the file locally so it's not read through HTTP all of the time? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] speed of mail() on two servers
* Thus wrote David T-G ([EMAIL PROTECTED]): It seems to be the mail() call itself, because I can make a system call (system, exec, passthru) to just echo the current data and it rips through my list in nothin' flat. So how do I tune mail() to make it faster? Or do I need to give up and call qmail-inject directly? The mail() command simply passes the message to the sendmail configured in you php.ini. You might want to check the configuration of sendmail, it might be the bottleneck. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot pass values from one page to another
Hi, Didn't know this was the army :-) first unless you got your variable ordering (POST, GET, Env, Sesssion etc). the values in the session can be easily overridden with a simple old query string. Sure would hate to have my username and password passed along to each page. remember that when you are using cookies the data actually get's transferred between the client and the server. best regards CPT John W. Holmes wrote: From: [EMAIL PROTECTED] Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. Please explain how you've come to this conclusion... ---John Holmes... -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot pass values from one page to another
I think you don't get me. I am not registering the password. Just I use $_SESSION['uname']=$uname; and I need to get the value $_SESSION['visnme'] in the next new page without passing the uname in the URL itself.( form action=?uname=$uname ) as query parameter What I need is that I want to fetch the value of $unme in the next page after login without passing it to next page. Ofcourse the solution is to use POST. I used POST to pass it to next page. That page is authentication.php where I check the uname and passwd and invoked header('...php?$visnme) function From this page how can I pass $uname without using query parameters. Thanks for the reply -murugesan - Original Message - From: [EMAIL PROTECTED] To: php mailing list [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 11:24 AM Subject: Re: [PHP] Cannot pass values from one page to another Hi, Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. murugesan wrote: My register_globals in set to ON in php.ini file. I cannot use HTTP_COOKIE_VARS because I need to pass the password from one page to another. -murugesan - Original Message - From: [EMAIL PROTECTED] To: php mailing list [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 7:13 PM Subject: Re: [PHP] Cannot pass values from one page to another what's your register globals settings? did you try to retrieve from HTTP_COOKIE_VARS ? murugesan wrote: Thanks for the message. I looked into the manual. But it is not working. Ofcourse I used session_start in every pages. -murugesan - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: murugesan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 5:23 PM Subject: RE: [PHP] Cannot pass values from one page to another [snip] I got this value in next page(main.php) But from there I am not able to pass it to next page I used session_register('uid'); in main.php but in next page $uid is returning null [/snip] First, look at the manual for sessions. You have posted many questions where the manual would have provided you a solution. Are you placing session_start() at the top of each page where you expect session variables to be available? You should be... Have a pleasant day. -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. _ Design your own holidays. Make memories that last a lifetime. http://www.flexihols.com/2003/index.php Enjoy! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can we control the content of MS Outlook Express
Dear all Here is the question: I had a link which will open user's outlook express and let the user to type the content and send it to me! Now i want to set some content which will appear on the outlook express and Why do that when you could do it all in the browser with a form? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] speed of mail() on two servers
having you tried ezmlm or to directly inject the message into the que? Javier Tacon wrote: I think that may be 'problem' from sendmail .. mail() function under linux only interacts with sendmail, it doesn't contact to the remote SMTP to leave the mail. Do you have the same sendmail version in two machines? You should compare both sendmail configuration and try to check the speed from a bash script for example. -Mensaje original- De: David T-G [mailto:[EMAIL PROTECTED] Enviado el: miercoles, 27 de agosto de 2003 0:40 Para: PHP General list Asunto: [PHP] speed of mail() on two servers Hi, all -- I'm working up a [cli] script to send a personalized (ugh) email to some [often large] number of web site subscribers. Unfortunately, I'm getting lousy performance, running about 0.54 sec per email. My partner has a mail script implemented on another machine and he's running somewhere down around 0.10 sec per email, which is better but still not very good for sending to 60k users. The box (dual Xeon 2.2G with mirrored fast SCSI and 1G RAM) has plenty of horsepower, and it certainly shouldn't need more. It's running RH 7.3 (Valhalla) with 2.4.20 on ext3 and has qmail installed as its MTA. It seems to be the mail() call itself, because I can make a system call (system, exec, passthru) to just echo the current data and it rips through my list in nothin' flat. So how do I tune mail() to make it faster? Or do I need to give up and call qmail-inject directly? TIA HAND :-D -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linking to files outside the directory structure...?
Hello, This is very much a possibility. first you 'fopen' the file and then you do an 'fpassthru' it will send the file to the client. You do need to create the correct headers (content-type and content-disposition) to match the file type etc. All the best [EMAIL PROTECTED] wrote: I wanna protect a few files from reandom downloads. I'm moving hosts soon, and will loose my mod_auth_mysql module that let it talk to the .htaccess file. What I want to do is store a number of files, outside of my web folder, say one level under it, but still get my browser to retrive that file. Perhaps with some coding in PHP? is this at all possible, or am I barking up the wrong tree...? Any ideas? Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Looping through a list - Newbie question
I need to loop through a list that is generated by a select tag, so I can query a lookup table. I managed to come up with this, ?php session_start(); $_SESSION['sv_CampusList'] = 1,2,4,5; // set elsewhere. Here for demo/testing purposes $lst= split(,,$_SESSION['sv_CampusList']); foreach ($lst as $id){ print($idbr); } ? And have modified it to query the lookup table, then the main table. Seems to work ok. Thanks, J -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 7:23 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Looping through a list - Newbie question From: James Johnson [EMAIL PROTECTED] I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value. Is there an easy way to do this, or do I need to convert the list to an array first? In the code below, $id isn't being set. Here's my code (this is just testing stuff, sv_CampusList is set somewhere else): ?php session_start(); $_SESSION['sv_CampusList'] = 1,2,4,5; for($i=1; $i=strlen($_SESSION['sv_CampusList']); $i++){ $id = strpos($_SESSION['sv_CampusList'],$i); echo $id; } ? What are you actually trying to accomplish here? I could tell you how to loop through a list in a string and run a query for each number, but I'd have the horrible feeling that you're using some inefficient method to accomplish something. For instance, if you're just trying to select data matching the numbers in your list, you can do this: $query = SELECT * FROM Table WHERE campus_list IN ({$_SESSION['sv_CampusList']}); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can pdf forms be used to submit data into db?
Yes you can! All the information is on www.php.net/fdf. Cesar [EMAIL PROTECTED] wrote: hi guys and gals, aloha from hawaii, Not sure if this is the right place to ask, but i just need to know if it is technically possible to have a pdf form be filled out online and then once the user hits submit, php takes the data and puts it into a db or some sort of db technology and if the need arises to pull up that record once more, php fetches the data from the db and dynamically fills out the pdf form and presents it to the end user...can do? or anyone know who i can talk to about this... thanks and mahalo from hawaii incentive if anyone can help me or point me in the right direction, i MAY be inclined to send some macadamia nuts to the continental US /incentive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Warning - Page has expired error
On a website I am working on, when I go to a page that pulls a query , then click back to choose another option, I get an error that says Warning: page has expired then I have to click back twice to get back to the drop down menu to make a new choice of query. Is there anywhere around this? Let me know what I can post to help in solving this problem. Thanks
Re[2]: [PHP] PHP Interview questions
Hi, Wednesday, August 27, 2003, 9:48:38 PM, you wrote: JB [snip] JB toggle_light(1); JB sleep(120); JB toggle_light(1); JB toggle_light(2); JB move('self', 'room/'); JB if ($lightbulb['temp'] $room['temp']) { JB echo switch #1; JB } elseif ($lightbulb['ison']) { JB echo switch #2; JB } else { JB echo switch #3; JB } JB hm.. i had to keep it OT somehow :) JB [/snip] JB :7) Curt. JB However, Curt does bring up a good pointgiven a real world situation JB create the decision logic (in code format) that demonstrates you grep JB the path needed to arrive at a conclusion. As many of us model business JB processes this is a valid method for determining familiarity with the JB problem solving method in a code based world. JB Some of you requested another situation JB You are presented with three crates. One is labled 'apples', one is JB labled 'oranges', one is labled 'apples and oranges'. The lables have JB been mis-applied with none of the lables being on the correct crate. To JB be perfectly clear ( :7) Brian! ) one crate contains apples, one JB contains oranges, and one contains apples and oranges...but you do not JB know which crate contains which fruits. Can you draw one fruit from a JB single crate (without being able to see inside the crate) and determine JB where the labels should be re-applied in order to correct the problem? JB -- JB PHP General Mailing List (http://www.php.net/) JB To unsubscribe, visit: http://www.php.net/unsub.php take fruit from apples/oranges if(apple) move apple_label to current move orange_label to old apple move apples/oranges_label to old orange else move orange_label to current move apple_label to old_orange move apples/oranges_label to old apple endif -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP] PHP Interview questions
[snip] JB You are presented with three crates. One is labled 'apples', one is JB labled 'oranges', one is labled 'apples and oranges'. The lables have JB been mis-applied with none of the lables being on the correct crate. To JB be perfectly clear ( :7) Brian! ) one crate contains apples, one JB contains oranges, and one contains apples and oranges...but you do not JB know which crate contains which fruits. Can you draw one fruit from a JB single crate (without being able to see inside the crate) and determine JB where the labels should be re-applied in order to correct the problem? JB -- JB PHP General Mailing List (http://www.php.net/) JB To unsubscribe, visit: http://www.php.net/unsub.php take fruit from apples/oranges if(apple) move apple_label to current move orange_label to old apple move apples/oranges_label to old orange else move orange_label to current move apple_label to old_orange move apples/oranges_label to old apple endif [/snip] You are taking a fruit from the crate labeled apples and oranges, right? If so, you would be correct. Well done! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Website templating schemes
Joel Konkle-Parker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to make a PHP-backed website, and I'm trying to decide between two templating schemes: Neither sounds very exciting to me :) . While PHP is often considered as template system in it self, I think it is is not very strong, or efficient one. So if you would like to use templates you could consider some add-on to help you out. On the other hand if you do not like additional template systems for whatever reason, I am surrendering immediately to prevent holly war :) rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] including .shtml file within my php script
I have an open source php script to add items to a mysql database. I want to wrap the page using a .shtml file Currently, the .shtml file is: http://bursar.indiana.edu/gotcha/index.shtml The php script is: http://bursar.indiana.edu/gotcha/g_add_gotcha.php I believe that I should be able to use one of the commands: Include, require or virtual in order to have the .shtml file called from php. I'm having trouble with the syntax. Has anybody successfully done something like this? I tried: ?php require(_header.shtml); ? - Jim Gronquist Computer Network and Programming Analyst Office of the Bursar Indiana University 812.856.3026 x6-3026 [EMAIL PROTECTED]
Re: [PHP] Extracting EXIF/IPTC info from jpeg/tiff image files
Hi, Some time ago I needed to read IPTC info from jpeg files, and I ended up with a function to read these fields from JPEG header. Another approach is to use ImageMagick to read the exif/iptc from jpeg/tiff. Here is the function, I hope it'll be useful: function get_IPTC($path) { $size = GetImageSize ($path, $info); if (isset($info[APP13])) { $iptc = iptcparse($info[APP13]); if (is_array($iptc)) { $IPTC_data=array( Version = $iptc[2#000][0], # Max 2 octets, binary number Title = $iptc[2#005][0], # Max 65 octets, non-repeatable, alphanumeric Urgency = $iptc[2#010][0], # Max 1 octet, non-repeatable, numeric, 1 - High, 8 - Low Category = $iptc[2#015][0], # Max 3 octets, non-repeatable, alpha SubCategories = $iptc[2#020], # Max 32 octets, repeatable, alphanumeric Keywords = $iptc[2#025], # Max 64 octets, repeatable, alphanumeric Instructions = $iptc[2#040][0], # Max 256 octets, non-repeatable, alphanumeric CreationDate = $iptc[2#055][0], # Max 8 octets, non-repeatable, numeric, MMDD CreationTime = $iptc[2#060][0], # Max 11 octets, non-repeatable, numeric+-, HHMMSS(+|-)HHMM ProgramUsed = $iptc[2#065][0], # Max 32 octets, non-repeatable, alphanumeric Author = $iptc[2#080][0], #!Max 32 octets, repeatable, alphanumeric Position = $iptc[2#085][0], #!Max 32 octets, repeatable, alphanumeric City = $iptc[2#090][0], # Max 32 octets, non-repeatable, alphanumeric State = $iptc[2#095][0], # Max 32 octets, non-repeatable, alphanumeric Country = $iptc[2#101][0], # Max 64 octets, non-repeatable, alphanumeric TransmissionReference = $iptc[2#103][0], # Max 32 octets, non-repeatable, alphanumeric Headline = $iptc[2#105][0], # Max 256 octets, non-repeatable, alphanumeric Credit = $iptc[2#110][0], # Max 32 octets, non-repeatable, alphanumeric Source = $iptc[2#115][0], # Max 32 octets, non-repeatable, alphanumeric Copyright = $iptc[2#116][0], # Max 128 octets, non-repeatable, alphanumeric Caption = $iptc[2#120][0], # Max 2000 octets, non-repeatable, alphanumeric CaptionWriter = $iptc[2#122][0] # Max 32 octets, non-repeatable, alphanumeric ); } else $IPTC_data=array(); } return $IPTC_data; } Regards, Vahan Binay Agarwal wrote: Hi everybody I need to extract the information (EXIF and IPTC) from jpeg/tiff image files. After that i have to allow my client to modify and put them back in jpeg/tiff files. I want to know whether php has got built-in support in terms of libraries to achieve the goal or i will have to load some external modules/software to do the same. In case external which all modules/software to refer? Please let me know. Thanks Binay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot pass values from one page to another
Hi, I see that Jay has already pointed out that session_register() is the correct approach and not $_SESSION['uname']=$uname; if you have already tried session_register and had no luck few other things you could look at are 1) make sure that client is configured to accept cookies. 2) if the client is not configured to accept cookies pass the session id as a query variable between urls 3) make sure you don't mix www.yourdomain.com with yourdomain.com 4) make sure that the session has not timed out. and it might be worth the while to clear the browser cache and cookies as well, finally if you are going through a proxy please ask someone to test from the 'outside' some proxies do wierd things. All the best Murugesan N wrote: I think you don't get me. I am not registering the password. Just I use $_SESSION['uname']=$uname; and I need to get the value $_SESSION['visnme'] in the next new page without passing the uname in the URL itself.( form action=?uname=$uname ) as query parameter What I need is that I want to fetch the value of $unme in the next page after login without passing it to next page. Ofcourse the solution is to use POST. I used POST to pass it to next page. That page is authentication.php where I check the uname and passwd and invoked header('...php?$visnme) function From this page how can I pass $uname without using query parameters. Thanks for the reply -murugesan - Original Message - From: [EMAIL PROTECTED] To: php mailing list [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 11:24 AM Subject: Re: [PHP] Cannot pass values from one page to another Hi, Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. murugesan wrote: My register_globals in set to ON in php.ini file. I cannot use HTTP_COOKIE_VARS because I need to pass the password from one page to another. -murugesan - Original Message - From: [EMAIL PROTECTED] To: php mailing list [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 7:13 PM Subject: Re: [PHP] Cannot pass values from one page to another what's your register globals settings? did you try to retrieve from HTTP_COOKIE_VARS ? murugesan wrote: Thanks for the message. I looked into the manual. But it is not working. Ofcourse I used session_start in every pages. -murugesan - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: murugesan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 5:23 PM Subject: RE: [PHP] Cannot pass values from one page to another [snip] I got this value in next page(main.php) But from there I am not able to pass it to next page I used session_register('uid'); in main.php but in next page $uid is returning null [/snip] First, look at the manual for sessions. You have posted many questions where the manual would have provided you a solution. Are you placing session_start() at the top of each page where you expect session variables to be available? You should be... Have a pleasant day. -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. _ Design your own holidays. Make memories that last a lifetime. http://www.flexihols.com/2003/index.php Enjoy! -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Website templating schemes
Joel Konkle-Parker mailto:[EMAIL PROTECTED] on Tuesday, August 26, 2003 1:51 PM said: Does that make any sense? Yes, and that's what I kind of thought you meant but just couldn't envision it completely. Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Pipe an email to PHP
I am actually real close now... Thanks to your help. The email pipes to the PHP, and I get an email response from PHP so I can look at output. However, I still get a non-delivery message at the same time: == This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |php -q /home/mydomain/public_html/emailtest.php generated by [EMAIL PROTECTED] The following text was generated during the delivery attempt: -- pipe to |php -q /home/mydomain/public_html/emailtest.php generated by [EMAIL PROTECTED] -- -- This is a copy of the message, including all the headers. -- etc... == In my /etc/valiases/domain.com file: [EMAIL PROTECTED]: |php -q /home/mydomain/public_html/emailtest.php --- In emailtest.php: #!/usr/bin/php -q ? $pipe = fopen(php://stdin, r); while(!feof($pipe)) { $buffer .= fgets($pipe, 4096); } fclose($pipe); //Shoot the data back to me so I can actually see the output mail ([EMAIL PROTECTED],Autoresponce,$buffer); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webserver for mac
on 8/27/03 8:40 AM, Justin French at [EMAIL PROTECTED] wrote: Actually, to the best of my knowledge you cannot run a decent server on Mac OS 10 (X), and certainly can't run PHP/MySQL, which is the main reason I upgraded to OSX. But if they're running anything less than a G4, Mac OSX may be too hungry?!? Justin Actually you can, 4D Webstar (4.5 on Mac Classic). So secure and stable that the US Army used it for their web site. Having said that, let me also say that WebSTAR is crap compared to Apache. :-) ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock.com, MacAgent.com and MacShirt.com ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Old style classes
Im currently testing with PHP5.0.0b2-dev Aug 27 2003 08:07:21 on windowsXP, Apache2. I have a class that acts as the DB layer, of which I pass all objects by reference. It works like a dream in PHP 4. Not sure if this is the expected behaviour, or an unwanted side effect. --- start psuedo snip --- $sql = 'SELECT * FROM foo'; $result = $obj-do($sql); while(!$result-EOF) { var_dump($result-records()); //$obj2 is another object that accepts the DB layer by reference in the Sanitize method $bar = $obj2-Sanitize($text, $obj); } --- end psuedo snip --- If the table foo has 2 rows to return, it will only return one row. From what Im seeing so far, $bar = $obj2-Sanitize($text, $obj); , which does another DB action, is highjacking the original $result, that is supposed to be returning the 2 rows. If I comment out $bar = $obj2-Sanitize($text, $obj); , the script returns the 2 rows properly. If uncommented, it only returns one row. Mind you, the psuedo code works perfectly in PHP 4.3.3 So far my code breaks in certain places when Im expecting more that one result. And in each place it breaks, the situation is the same like the code above. If doing another query inside a loop hijacks the original result. Im not sure if this is because of passing objects by reference. Ill do some poking around and see what else I can figure out, but if anyone can give me a heads up from their past experiences or know of something, please feel free to let me know. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need Help - past deadline
Ok - Thanks to Jim Lucas off list - I am almost to where i want to be, but i am unable to reach him for further assistance. Can someone tell me where in this code I can add a grey table row seperator? AND how come only the first seat from my database is being displayed as taken? $alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'); $rowCount = 14; $totalSeats = 238; $connection = mysql_connect(localhost,**,***) or die (Couldn't make connection.); $db = mysql_select_db(registration, $connection) or die (Couldn't select database.); $sql = SELECT seat, alias FROM attendees; $sql_result = mysql_query($sql,$connection) or die(Couldn't execute query.); $row = mysql_fetch_array($sql_result); $alias = $row['alias']; ? center table class=seattable width=650 ?php for($i=0; $i$totalSeats; $i++) { $val = $i + 1; if($i % $rowCount) { echo td align=\center\ valign=\middle\ ; } else { echo tr; echo td align=\center\ valign=\middle\ class=\rowheader\; echo $alphabet[($i / $rowCount)]; echo /td; echo td ; } if(in_array($val, $row)) { echo class=\closed\a class=\sold\ title=\SOLD TO $alias\ onMouseOver=\self.status='SOLD TO .$alias.'; return true;\ onMouseOut=\self.status=' '; return true;\; echo {$alias}; } else { echo class=\open\; echo input type=\radio\ name=\seat\ value=\{$val}\font class=\avail\{$val}/font; } if($i % $rowCount + 1) { echo /td; } else { echo /td/tr; } } ? /table /center here is what I am wanting to add - I tried placing this in several places in this code so far (top, middle bottom) but whenever i add it, the output gets totally fudged tr td class=rowspacenbsp;/TD td class=space colspan=15nbsp;/td /tr but I also need it to display ALL of the seats that are in the db as being sold and not just the first row... TIA Jay Fitzgerald, Design Director - Certified Professional Webmaster (CPW-A) - Certified Professional Web Designer (CPWDS-A) - Certified Professional Web Developer (CPWDV-A) - Certified E-Commerce Manager (CECM-A) - Certified Small Business Web Consultant (CWCSB-A) Bayou Internet - http://www.bayou.com/http://www.bayou.com Toll Free: 888.30.BAYOU (22968) Vox: 318.338.2034 / Fax: 318.338.2506 E-Mail: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
Re: [PHP] Cannot pass values from one page to another
From: [EMAIL PROTECTED] Didn't know this was the army :-) Yeah, I signed you up last week. You report to basic training in November. I hope you're ready! :) first unless you got your variable ordering (POST, GET, Env, Sesssion etc). the values in the session can be easily overridden with a simple old query string. Sure would hate to have my username and password passed along to each page. remember that when you are using cookies the data actually get's transferred between the client and the server. By default, sessions are made global last, so the session value would overwrite anything passed. But, yes, you're right that if some idiot changed the order around (why?) then it could present a security problem. Thanks for the explanation (just checking!) :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session.cookie_domain
From: Shu Chow [EMAIL PROTECTED] We're having a problem with a site that recently upgraded to php 4.3.3. Ever since the upgrade, session variables won't pass between pages. Looking at the php.ini file, I see that session.cookie_domain is set to server.hostingcompany.com while our site is www.ourdomain.com. If the session.cookie_domain is set to another domain, would this be the cause of our problems? Yeah, that'd cause problems. You can set your own value for the domain using an .htaccess file or the session_set_cookie_params() function http://us2.php.net/manual/en/function.session-set-cookie-params.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need Help - past deadline
Ok - Thanks to Jim Lucas off list - I am almost to where i want to be, but i am unable to reach him for further assistance. Can someone tell me where in this code I can add a grey table row seperator? AND how come only the first seat from my database is being displayed as taken? $alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'); $rowCount = 14; $totalSeats = 238; $connection = mysql_connect(localhost,**,***) or die (Couldn't make connection.); $db = mysql_select_db(registration, $connection) or die (Couldn't select database.); $sql = SELECT seat, alias FROM attendees; $sql_result = mysql_query($sql,$connection) or die(Couldn't execute query.); $row = mysql_fetch_array($sql_result); $alias = $row['alias']; ? center table class=seattable width=650 ?php for($i=0; $i$totalSeats; $i++) { $val = $i + 1; if($i % $rowCount) { echo td align=\center\ valign=\middle\ ; } else { echo tr; echo td align=\center\ valign=\middle\ class=\rowheader\; echo $alphabet[($i / $rowCount)]; echo /td; echo td ; } if(in_array($val, $row)) { echo class=\closed\a class=\sold\ title=\SOLD TO $alias\ onMouseOver=\self.status='SOLD TO .$alias.'; return true;\ onMouseOut=\self.status=' '; return true;\; echo {$alias}; } else { echo class=\open\; echo input type=\radio\ name=\seat\ value=\{$val}\font class=\avail\{$val}/font; } if($i % $rowCount + 1) { echo /td; } else { echo /td/tr; } } ? /table /center here is what I am wanting to add - I tried placing this in several places in this code so far (top, middle bottom) but whenever i add it, the output gets totally fudged tr td class=rowspacenbsp;/TD td class=space colspan=15nbsp;/td /tr but I also need it to display ALL of the seats that are in the db as being sold and not just the first row... TIA Jay Fitzgerald, Design Director - Certified Professional Webmaster (CPW-A) - Certified Professional Web Designer (CPWDS-A) - Certified Professional Web Developer (CPWDV-A) - Certified E-Commerce Manager (CECM-A) - Certified Small Business Web Consultant (CWCSB-A) Bayou Internet - http://www.bayou.com Toll Free: 888.30.BAYOU (22968) Vox: 318.338.2034 / Fax: 318.338.2506 E-Mail: [EMAIL PROTECTED] ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Thank You for your help
Hi guys, gals, first off i just wanted to thank all of you who responded to my question, they were very helpful...but the answers bring me to several new questions: 1) has anyone seen anything like this done with the reader ver. of acrobat and not the full version of acrobat...could you point me somewhere where FDF is actually implemented? 2) this question is more directed to Justin French, but in any case, the reason i wanted to use the PDF forms is so that i don't have to create them again in CSS or any other format, the forms are already created and all i need to do is figure out how to make the data that people enter into them submittable. but in any case, have you seen some pretty complex forms made up of entirely CSS that i can look at? i guess this solution would be acceptable pending some examples 3) now who do i send the nuts to? but actually before i do that, i wanted to see something like FDF in action to see if this is exactly what i needed thanks, ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot pass values from one page to another
CPT John W. Holmes wrote: From: [EMAIL PROTECTED] Ok this is a major vulnerability that you are coding. Register globals on and password being stored in the session is like having a banner on your home page saying 'come and hack me'. Please explain how you've come to this conclusion... ---John Holmes... Yes, please explain this... I'm very curious! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help - past deadline
Ok - Thanks to everyone who has helped me so far both on and off-list - I am almost to where i want to be, but i am unable to reach him for further assistance. Can someone tell me where in this code I can add a grey table row seperator (as shown at the bottom)? AND how come only the first seat from my database is being displayed as taken? $alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'); $rowCount = 14; $totalSeats = 238; $connection = mysql_connect(localhost,**,***) or die (Couldn't make connection.); $db = mysql_select_db(registration, $connection) or die (Couldn't select database.); $sql = SELECT seat, alias FROM attendees; $sql_result = mysql_query($sql,$connection) or die(Couldn't execute query.); $row = mysql_fetch_array($sql_result); $alias = $row['alias']; ? center table class=seattable width=650 ?php for($i=0; $i$totalSeats; $i++) { $val = $i + 1; if($i % $rowCount) { echo td align=\center\ valign=\middle\ ; } else { echo tr; echo td align=\center\ valign=\middle\ class=\rowheader\; echo $alphabet[($i / $rowCount)]; echo /td; echo td ; } if(in_array($val, $row)) { echo class=\closed\a class=\sold\ title=\SOLD TO $alias\ onMouseOver=\self.status='SOLD TO .$alias.'; return true;\ onMouseOut=\self.status=' '; return true;\; echo {$alias}; } else { echo class=\open\; echo input type=\radio\ name=\seat\ value=\{$val}\font class=\avail\{$val}/font; } if($i % $rowCount + 1) { echo /td; } else { echo /td/tr; } } ? /table /center here is what I am wanting to add - I tried placing this in several places in this code so far (top, middle bottom) but whenever i add it, the output gets totally fudged tr td class=rowspacenbsp;/TD td class=space colspan=15nbsp;/td /tr but I also need it to display ALL of the seats that are in the db as being sold and not just the first row... TIA Jay At 12:00 PM 8/26/2003 -0800, you wrote: [clip] if ($i = 84) { ? td align=center valign=top class=greeninput type=radio name=seat value=?php print $i++; ?nobr /font class=avail?php print $i++; ?/td ?php } } } ? [/clip] ?php print $i++; ? prints out the value of $i as well as incrementing it twice. Did you notice in your code that the input type=radio name=seat value={one less than...} ... {this}/td HTH, -Michael Jay Fitzgerald, Design Director - Certified Professional Webmaster (CPW-A) - Certified Professional Web Designer (CPWDS-A) - Certified Professional Web Developer (CPWDV-A) - Certified E-Commerce Manager (CECM-A) - Certified Small Business Web Consultant (CWCSB-A) Bayou Internet - http://www.bayou.com Toll Free: 888.30.BAYOU (22968) Vox: 318.338.2034 / Fax: 318.338.2506 E-Mail: [EMAIL PROTECTED] ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php