[PHP] postgres session handling
I have need to get php to use postgres to store session information. I've changed the directive in php.ini and written a set of functions that should do the job and I've made the call to set the session handler. The following simple test case works: ? require_once ('database.php'); require_once ('sess_handler.php'); //session_start (); session_register ('asdf'); $asdf = 123; print $asdf; ? the idea being that the line where $asdf is assigned is commented out in the second execution of it and the value is still there upon reloading. That works fine. But, when I try to use it with the code for which it was originally intended I get this error: *Fatal error*: Failed to initialize session module in */usr/local/apache/vhosts/600xl/httpdocs/fe_login.php* on line *44* Keep in mind that this is all code which worked perfectly with the bulit in session handler before. Any ideas? Thanks, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Goofy interactions between $this and vars in classs. 4.1.0
Hello Mark, Monday, December 17, 2001, 11:05:15 AM, you wrote: M However, if I Change the Zabba function to: M function Zabba() M { M $localVariable = $this; M $localVariable-addValue(asdfasdfasdf); M } M Then I will get on output, a NULL array. M Why is this? Is there any particular reason this happens? Yes, there is. When you do $localVariable = $this, a new object in $localVariable is born. This object definitely dies at the function end, so you get nothing in return. To make the things work properly, you'd need a reference to the $this object, hence the expression should be $localVariable = $this. But don't forget, that the things will change with the new Zend engine coming and PHP 5 (I suppose). -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP as a web browser?
you may want to look at the curl functions as a start. thats most of the functionality down already. otherwise you'll have to parse raw data. not too hard, but can be painful to keep stateful info. you'll also have to rewrite code when the interface changes, you'll probably want to look at hotscripts or manuel lemos's script archives for prewritten html parsers. fopen/fread/fwrite is the way to go, but you'll need to interpret that data accordingly. Look at the rfc's on cookies and html if you are interested in going that route. been there done that myself (for a sms autosend script using mtnsms, but its a pia to start from scratch...) Lawrence -Original Message- From: David Yee [mailto:[EMAIL PROTECTED]] Sent: December 17, 2001 3:49 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP as a web browser? Is it possible to have PHP act like a web browser, accept cookies and post data (for login)? I'm not sure exactly where to start- I know you can use fopen/file to retrieve url's but I'm not too sure about the other steps. I would like to write and run such a php script as a cron job and have it do something like log into my web-based email account, retrieve emails, process them, save them locally, and then delete them on the server. Thanks for any help. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Checking a frames url..
Lo all, I am trying to write a script that will output to a frame the current location within a site.. like Home :: Contact I need PHP to be able to check the url of the frame main and then parse out anything after the domain to decide what to output as the location. e.g. http://domain.com/contact/index.html (http://domain.com) -- forgotten (contact/index.html) If URL = contact/index.html { echo('Home :: Contact'); } If URL = business/index.html { echo('Home :: Business'); } Am I on the correct track with most of it?? I just cant work out how to grab the URL of a single frame. Thanx Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a web browser?
if you want a php-only solution, you should probably also consider fsockopen. http://www.php.net/manual/en/function.fsockopen.php best regards Stefan Rusterholz - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 9:26 AM Subject: RE: [PHP] PHP as a web browser? you may want to look at the curl functions as a start. thats most of the functionality down already. otherwise you'll have to parse raw data. not too hard, but can be painful to keep stateful info. you'll also have to rewrite code when the interface changes, you'll probably want to look at hotscripts or manuel lemos's script archives for prewritten html parsers. fopen/fread/fwrite is the way to go, but you'll need to interpret that data accordingly. Look at the rfc's on cookies and html if you are interested in going that route. been there done that myself (for a sms autosend script using mtnsms, but its a pia to start from scratch...) Lawrence -Original Message- From: David Yee [mailto:[EMAIL PROTECTED]] Sent: December 17, 2001 3:49 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP as a web browser? Is it possible to have PHP act like a web browser, accept cookies and post data (for login)? I'm not sure exactly where to start- I know you can use fopen/file to retrieve url's but I'm not too sure about the other steps. I would like to write and run such a php script as a cron job and have it do something like log into my web-based email account, retrieve emails, process them, save them locally, and then delete them on the server. Thanks for any help. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 17 Dec 2001 10:15:05 -0000 Issue 1057
php-general Digest 17 Dec 2001 10:15:05 - Issue 1057 Topics (messages 77884 through 77924): large object problem 77884 by: David H 77907 by: Manuel Lemos URL checking 77885 by: trx 77903 by: Phillip Oertel Question for you MySQL gurus... 77886 by: Deron 77887 by: Deron 77914 by: David Re: Searching for a new provider 77888 by: Indera PHP object-oriented features 77889 by: Colin Tucker 77891 by: Martin Towell Re: using variables 77890 by: Gerard Onorato php.ini 77892 by: Jeremiah Jester 77895 by: jtjohnston mysql_query() problem 77893 by: Brian Rue 77916 by: Yasuo Ohgaki Re: i get a warning after upgrading to 4.1.0 (repost) 77894 by: Phillip Oertel Re: pictures width and height 77896 by: Phillip Oertel picture gallery 77897 by: Jeremiah Jester 77912 by: steph.philedom2k.com Re: Opinions, please 77898 by: Ray Gaylog Re: problem finding out original filename while using php to upload. 77899 by: Ray Gaylog 77909 by: Daniel Grace printf()? 77900 by: Ray Gaylog 77901 by: Jason Murray 77902 by: Mark Charette Re: Problem with Code 77904 by: Phillip Oertel Re: how to reinitialise an MySQL_fetch_array 77905 by: Frederick L. Steinkopf Re: Unable to return object references from functions 77906 by: Manuel Lemos 77908 by: Tom Rogers 77911 by: Manuel Lemos HTTP Authentication problems 77910 by: Daniel Grace User Authentication 77913 by: Daniel Grace Re: PHP4.1.0 Apache1.3.22 under WinXP 77915 by: Daniel Grace Goofy interactions between $this and vars in classs. 4.1.0 77917 by: Mark 77921 by: Maxim Derkachev TN3270? 77918 by: brendan PHP as a web browser? 77919 by: David Yee 77922 by: Lawrence.Sheed.dfait-maeci.gc.ca 77924 by: Stefan Rusterholz postgres session handling 77920 by: James Gregory Checking a frames url.. 77923 by: Necro 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--- Hi all, I am trying to findout what is wrong with this script can anyone help? $dbconn = pg_connect (cnnection string) or die ( Error: .pg_errormessage ($dbconn)) ; pg_exec ($dbconn, begin) ; $oid = pg_locreate ($dbconn) ; $fd = pg_loopen ($dbconn, $oid, w) ; pg_lowrite ( $fd, $img ) ; pg_loclose ( $fd ) ; $strqry = INSERT INTO tblImg ( myname, mytype, myimg, myfilesize ) VALUES ( '$img_name', '$img_type', '$oid', $img_size ); $result = pg_exec ( $dbconn, $strqry ) ; pg_exec ($dbconn, commit) ; pg_exec ($dbconn, end) ; The output that I am getting is this /tmp/phpQPUyx2 by pg_loreadall function. Thanks, David __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com ---End Message--- ---BeginMessage--- Hello, David H wrote: Hi all, I am trying to findout what is wrong with this script can anyone help? $dbconn = pg_connect (cnnection string) or die ( Error: .pg_errormessage ($dbconn)) ; pg_exec ($dbconn, begin) ; $oid = pg_locreate ($dbconn) ; $fd = pg_loopen ($dbconn, $oid, w) ; pg_lowrite ( $fd, $img ) ; pg_loclose ( $fd ) ; $strqry = INSERT INTO tblImg ( myname, mytype, myimg, myfilesize ) VALUES ( '$img_name', '$img_type', '$oid', $img_size ); $result = pg_exec ( $dbconn, $strqry ) ; pg_exec ($dbconn, commit) ; pg_exec ($dbconn, end) ; The output that I am getting is this /tmp/phpQPUyx2 by pg_loreadall function. Similarly, you need to do pg_loopen on a OID returned by a select query. Anyway, if you want to try something that works with easier to understand interface, maybe you would like to try Metabase which is a database abstraction PHP package that provides a single and portable interface to BLOBs that supports PostgreSQL among many other databases. Metabase is free and you may download it from here: http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos ---End Message--- ---BeginMessage--- Hi, I'm very much a newbie! I'm trying to set up a site which will automatically test links in a large link directory and show date and time of last check and
[PHP] RE: problem finding out original filename while using php to upload.
You could also use the function getimagesize this will tell what kind of image it is, and if it is not an image it will return false. GD LIB is NOT needed for getimagesize. Kind Regards, Jerry Verhoef -Original Message- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 6:52 AM To: [EMAIL PROTECTED] Subject: Re: problem finding out original filename while using php to upload. Neil M [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using php to upload image files. heres my code .. ? if (is_uploaded_file($photo_file)) { clearstatcache (); $size = filesize ( $photo_file ) ; if ( $size 1024000 ) { print (BR ERROR - File is too big ! File uploads should be below 1024 k ( 1mb ) BR); exit ; } move_uploaded_file($photo_file, $upload_path$check_nick-nickname); } else { echo BR ERROR : File upload was not successfull , please try again !BR; } ? -- the problem is that when i look for the original filename ( e.g. myphoto.gif ) , $photo_file contains a random file name like 383hr93php As i mentioned , its image files i am uploading , how do i know what type of image the file was ? like .jpg , .png etc. Any help appreciatted , i am really stuck on this ;0) Thanks Neil M $photo_file will map to the name of the temporary file on the server's HD -- it is NOT the name of the original file. You'll want to use $photo_file_name to determine the original filename, or better yet, $photo_file_type to determine the content type. (a gif is image/gif, for instance). See http://www.php.net/manual/en/features.file-upload.php -- Daniel Grace echo make_witty_sig($foo) . \n; The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mysql_query() problem
Hi Try the following to find out what's happening : $result = mysql_query($query,$conn) or die (mysql_error()); Or try echo'ing $result to see what it contains. It should contain something like this if everything is working fine : Resource id #2 Regards Girish - Original Message - From: Brian Rue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 8:33 AM Subject: [PHP] mysql_query() problem Hi, I'm getting the error Warning: Supplied argument is not a valid MySQL result resource from this code: function validateUser($username,$password) { $conn = connectToMySQL(); mysql_select_db($db_name,$conn); $query=select * from members where username='.$username.' AND password='.$password.'; $result = mysql_query($query,$conn); if (mysql_num_rows($result) != 0) { file://*this is the line that returns the error* return true; } else { return false; } } I've checked that the connection works, and that the query is what it should be, and the query works when I type it into the terminal. Any ideas? Thanks, Brian Rue -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Logo proposal - voting script!
Arg - Not Found The requested URL /vote/logo.php was not found on this server. Apache/1.3.22 Server at zoon.se Port 80 -- What's happenin' ?? Le Vendredi 14 Décembre 2001 18:50, Andrew Chase a écrit : Hmm, I get a 404 error as of 17:44 GMT. I hope that 'Mole' is one of the options on the list... I'm kind of inclined to defer to Rasmus on the issue anyway, what with him being the guy responsible for creating PHP in the first place. :) I'm also keeping in mind that (unless I missed something), there's been no indication that any animal mascot would be officially adopted by the project. ;) -Original Message- From: Michael Cronstrom [mailto:[EMAIL PROTECTED]] Subject: [PHP] Logo proposal - voting script! a voting script! at: http://zoon.se/vote/logo.php -- ( * Nicolas Costes, //\\ IUT de La Roche / Yon ( \/ ) [EMAIL PROTECTED] http://luxregina.free.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] LIBXML- Auto-Indent - How do it?
Hi All, I would like to know if there is any way to auto-indent the XML file when I add a new node in a docxml object and export the string of the created XML file with dumpmem() function... For example: $new = new_xmldoc(1.0); $root = $new-add_root(ROOT); $level1 = $root-new_child(LEVEL-1, ); $level1-new_child(LEVEL2, ); $new_xml_file = fopen (test.xml, w); fwrite($new_xml_file, $new-dumpmem()); fclose ($new_xml_file); The result in test.xml file is: ?xml version=1.0? ROOTLEVEL-1LEVEL2//LEVEL-1/ROOT But I'm needing it like this: ?xml version=1.0? ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Could someone help me on this?! Thanks. _ Ricardo J. A. Júnior, Software Engineer Trainee Bowne Global Solutions Phone +55 21 2515 7713 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.bowneglobal.com.br http://www.bowneglobal.com.br/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] LIBXML- Auto-Indent - How do it?
The conversion to plain text mail format changed the correct indent that I need I'm needing it like this: ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Thanks !!! _ Ricardo J. A. Júnior, Software Engineer Trainee Bowne Global Solutions Phone +55 21 2515 7713 [EMAIL PROTECTED] www.bowneglobal.com.br -Original Message- From: Junior, Ricardo [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:48 AM To: '[EMAIL PROTECTED]' Subject:[PHP] LIBXML- Auto-Indent - How do it? Hi All, I would like to know if there is any way to auto-indent the XML file when I add a new node in a docxml object and export the string of the created XML file with dumpmem() function... For example: $new = new_xmldoc(1.0); $root = $new-add_root(ROOT); $level1 = $root-new_child(LEVEL-1, ); $level1-new_child(LEVEL2, ); $new_xml_file = fopen (test.xml, w); fwrite($new_xml_file, $new-dumpmem()); fclose ($new_xml_file); The result in test.xml file is: ?xml version=1.0? ROOTLEVEL-1LEVEL2//LEVEL-1/ROOT But I'm needing it like this: ?xml version=1.0? ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Could someone help me on this?! Thanks. _ Ricardo J. A. Júnior, Software Engineer Trainee Bowne Global Solutions Phone +55 21 2515 7713 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.bowneglobal.com.br http://www.bowneglobal.com.br/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Checking a frames url..
You can get the URL of a frame using JavaScript - maybe you could pass this in somehow to the PHP script??? -Original Message- From: Necro [SMTP:[EMAIL PROTECTED]] Sent: 17 December 2001 08:59 To: [EMAIL PROTECTED] Subject:[PHP] Checking a frames url.. Lo all, I am trying to write a script that will output to a frame the current location within a site.. like Home :: Contact I need PHP to be able to check the url of the frame main and then parse out anything after the domain to decide what to output as the location. e.g. http://domain.com/contact/index.html (http://domain.com) -- forgotten (contact/index.html) If URL = contact/index.html { echo('Home :: Contact'); } If URL = business/index.html { echo('Home :: Business'); } Am I on the correct track with most of it?? I just cant work out how to grab the URL of a single frame. Thanx Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session storage and the --with-mm option
John (and all), I was using --with-mm on my system and immediately saw a jump in memory usage and I wasn't even using the mm session support! The memory doubled from 4.0.6 to 4.1.0. I've since removed it from my compile. Jaime Bozza GeoComm International Corp. -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 9:27 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Session storage and the --with-mm option This doesn't explain why mm is causing such a memory bloat though. Mark, are you storing big arrays as session variables? I am using mm myself for sessions and never have these problems (I only store less than 1K of data in sessions anyway). Regards, John Jeremy Allen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sessions by default will use the file system to store session data. Using the file system on a site that utilizes sessions moderately can be negative as far as performance goes. Using shared memory simply means that session data is now stored in shared memory. Shared memory is a bit more efficient than using the file system. Where session data is stored is supposed to be sort of black box and transparent to the actual use of sessions. You can also define a group of custom session handling functions to use any device your mind can imagine for session storage. Anything PHP can easily connect to (Java, RDBMS, ...) the sky is the limit. Take a look at session_set_save_handler (for custom session handling routines). Once you get your session save handler working it is transparent to the use of sessions. If your having performance troubles with sessions using the file system, shared memory may be the best way to go. Take a look at this page http://www.php.net/manual/en/ref.session.php To actually use shared memory you must modify the option session.save_handler in the php.ini file. Thanks Jeremy Allen -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 10:38 AM To: [EMAIL PROTECTED] Subject: [PHP] Session storage and the --with-mm option I'm trying to cut down on the amount of memory that my apache proceeses use, I've noticed that when I have the --with-mm option set when I configure and compile PHP that the apache process goes up by about 40MB or more on the process table: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 23102 0.0 2.5 54588 12972 ? SDec11 0:13 /usr/sbin/httpd nobody 11242 0.0 2.7 55040 14408 ? SDec13 0:16 /usr/sbin/httpd nobody 11244 0.0 2.7 55076 14216 ? SDec13 0:16 /usr/sbin/httpd I understand that not each process is using up that much ram, but I'd still like to cut down the usage since without having --with-mm enabled makes the processes more like this: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 29415 0.0 0.7 13988 5844 ?SDec13 0:02 /usr/sbin/httpd nobody 31719 0.0 0.7 14140 6096 ?S04:02 0:00 /usr/sbin/httpd nobody 31720 0.0 0.7 14140 6096 ?S04:02 0:00 /usr/sbin/httpd So my question is this. What is the --with-mm option for? The only real documentation I can find about it anywhere is on the PHP site where they have a complete list of configuration options: -- --with-mm[=DIR] PHP 3: Option not available in PHP 3 PHP 4: Include mm support for session storage -- Well, that's not really helpful. Does this option affect how sessions work under PHP? I think some of the users on my system have been using sessions successfully without this option. Also, since this gets compiled in the ext/sessions directory, would I be able to compile it as a module that could be loaded into PHP at run time? Any help would be appretiated. Thanks, -- mark.krenz [EMAIL PROTECTED] ___ Their snazzy page and friendly installation process don't make up for damn trickery. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To
RE: [PHP] LIBXML- Auto-Indent - How do it?
In 100984FEB15DD511BA9300104B6980760AC36B@EXCHANGE-RIO, Ricardo Junior wrote: The conversion to plain text mail format changed the correct indent that I need I'm needing it like this: ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Thanks !!! no need to scream here :) here's a function, which maybe helps you (it adds indentation to a string containing xml-stuff) function get_indented_xml($xml,$instring = ) { $xml = preg_replace(/(\)\n/,$1,$xml); $xml = preg_replace(/\\s*\/,\n,$xml); $axml = explode(\n,$xml); $indent=-1; $xmls = ; foreach ($axml as $key = $value) { if (preg_match(/[^\/{1}]/,$value)) { $indent++; } if ($indent 0) $indent = 0; $xmls .= str_repeat($instring,$indent); if (preg_match(/\\//,$value) || preg_match(/\/\/,$value)|| preg_match(/--/,$value)) { $indent--; } $xmls .= trim($value).\n; } return $xmls; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] multicolumn table
Hi list, I've tried for many times, but couldn't make a table with 3 columns and n rows This is my code, someone please, can help in make it outputs a 3 column table?? $sql = SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico; $query = new Query($conexao); $query-executa($sql); $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } Thank's in advance Rodrigo Peres -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] LIBXML- Auto-Indent - How do it?
In 100984FEB15DD511BA9300104B6980760AC36B@EXCHANGE-RIO, Ricardo Junior wrote: The conversion to plain text mail format changed the correct indent that I need I'm needing it like this: ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Thanks !!! no need to scream here :) here's a function, which maybe helps you (it adds indentation to a string containing xml-stuff) function get_indented_xml($xml,$instring = ) { $xml = preg_replace(/(\)\n/,$1,$xml); $xml = preg_replace(/\\s*\/,\n,$xml); $axml = explode(\n,$xml); $indent=-1; $xmls = ; foreach ($axml as $key = $value) { if (preg_match(/[^\/{1}]/,$value)) { $indent++; } if ($indent 0) $indent = 0; $xmls .= str_repeat($instring,$indent); if (preg_match(/\\//,$value) || preg_match(/\/\/,$value)|| preg_match(/--/,$value)) { $indent--; } $xmls .= trim($value).\n; } return $xmls; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] multicolumn table
try to start the sql at a prompt and post the error which mysql returns Regards, Andrey Hristov - Original Message - From: Rodrigo Peres [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:04 PM Subject: [PHP] multicolumn table Hi list, I've tried for many times, but couldn't make a table with 3 columns and n rows This is my code, someone please, can help in make it outputs a 3 column table?? $sql = SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico; $query = new Query($conexao); $query-executa($sql); $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } Thank's in advance Rodrigo Peres -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] can php pretend to be a MSIE or Netscape?
hi all how do i prevent php from exposing itself when opening url with fopen() ? kann i make it look like MSIE or whatever? reaons : i want to query google by script but it does not allow that... Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Logo proposal - voting script!
Let´s say the site was attacked, abused or so so we don´t run it anymore;-| Anyhow, even I say: LEAVE IT THE WAY IT IS!!! Michael Cronstrom Web Inventor [EMAIL PROTECTED] At 13:36 17/12/01, you wrote: Arg - Not Found The requested URL /vote/logo.php was not found on this server. Apache/1.3.22 Server at zoon.se Port 80 -- What's happenin' ?? Le Vendredi 14 Décembre 2001 18:50, Andrew Chase a écrit : Hmm, I get a 404 error as of 17:44 GMT. I hope that 'Mole' is one of the options on the list... I'm kind of inclined to defer to Rasmus on the issue anyway, what with him being the guy responsible for creating PHP in the first place. :) I'm also keeping in mind that (unless I missed something), there's been no indication that any animal mascot would be officially adopted by the project. ;) -Original Message- From: Michael Cronstrom [mailto:[EMAIL PROTECTED]] Subject: [PHP] Logo proposal - voting script! a voting script! at: http://zoon.se/vote/logo.php -- ( * Nicolas Costes, //\\ IUT de La Roche / Yon ( \/ ) [EMAIL PROTECTED] http://luxregina.free.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] User Authentication
on 12/16/01 12:58 PM, Daniel Grace at [EMAIL PROTECTED] wrote: Anyways, though the 401 part works and actually brings up the typical Enter Username/Password box, $PHP_AUTH_USER and $PHP_AUTH_PW are not being set. There are no .htaccess files in the directory (or any parent dirs for that matter), and no AuthType directives all in my httpd.conf file. I have been unsuccessful in determining what is wrong, and am flat out of ideas. My guess would be that register_globals is off. If I recall correctly, $PHP_AUTH_USER and $PHP_AUTH_PW need register_globals on to work like you want them to. Check phpinfo() to see if another variable, maybe one in the new arrays, will give them to you. If not, you can look for the Authorize Header and then manually parse out the User and PW information. Paul ?php /* Happy Holidays */ mysql_select_db('North_Pole'); mysql_query('SELECT reindeer FROM stable WHERE nose_color=red'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] can php pretend to be a MSIE or Netscape?
You should be able to using fsockopen. You can use the class below and modify it. Search the class for the string User-Agent: and change what's behind. http://phpclasses.upperdesign.com/browse.html?file=1222 happy querying Stefan Rusterholz - Original Message - From: Sebastian [EMAIL PROTECTED] To: 'Php-General [EMAIL PROTECTED] Sent: Monday, December 17, 2001 3:16 PM Subject: [PHP] can php pretend to be a MSIE or Netscape? hi all how do i prevent php from exposing itself when opening url with fopen() ? kann i make it look like MSIE or whatever? reaons : i want to query google by script but it does not allow that... Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP + DB2
hi Anyone here used PHP to connect to a IBM DB2 database? Of course, using ODBC. I am having difficulties calling stored procedures with input/output parameters. Any help is appreciated. Rares
[PHP] Using PHP in an HTTP 404 error document ($HTTP_REFERER is blank)
I have a php document which I direct my server to use as a 404 error doc. In it I write: print $REQUEST_URI\n; print $HTTP_REFERER\n; The thing is I get the the error page itself in place of $REQUEST_URI and $HTTP_REFERER is blank. any suggestions as to how I can get the URL which the user entered? I'm runnig Apache on RedHat 7.2 Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP + DB2
Rares, Using ODBC should be fine; what problems are you having with input/output parameters? Also, what ODBC drivers are you using? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Rares Vasilescu [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 9:44 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP + DB2 hi Anyone here used PHP to connect to a IBM DB2 database? Of course, using ODBC. I am having difficulties calling stored procedures with input/output parameters. Any help is appreciated. Rares -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Using PHP in an HTTP 404 error document ($HTTP_REFERER is blank)
PHP 4.1.0 : $_SERVER[REDIRECT_URL] and $_SERVER[REDIRECT_STATUS] PHP 4.0.6 and earlier: $HTTP_SERVER_VARS[REDIRECT_URL] and $HTTP_SERVER_VARS[REDIRECT_STATUS] greets, bvr. On Mon, 17 Dec 2001 14:27:45 GMT, [EMAIL PROTECTED] wrote: I have a php document which I direct my server to use as a 404 error doc. In it I write: print $REQUEST_URI\n; print $HTTP_REFERER\n; The thing is I get the the error page itself in place of $REQUEST_URI and $HTTP_REFERER is blank. any suggestions as to how I can get the URL which the user entered? I'm runnig Apache on RedHat 7.2 Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] multicolumn table
Sorry list, I think, I was not clear enough. I don't have errors, what I could do with this code is output a table in alphabetical order ex: A a.. ab.. B b... bc... But what I really need and I couldn't make work is, my table output one name per row and a long one singlke column, and I need a table with 3 colmns and many rows as necessary to have all names. Thank's Rodrigo Peres on 12/17/01 12:10 PM, Andrey Hristov at [EMAIL PROTECTED] wrote: try to start the sql at a prompt and post the error which mysql returns Regards, Andrey Hristov - Original Message - From: Rodrigo Peres [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:04 PM Subject: [PHP] multicolumn table Hi list, I've tried for many times, but couldn't make a table with 3 columns and n rows This is my code, someone please, can help in make it outputs a 3 column table?? $sql = SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico; $query = new Query($conexao); $query-executa($sql); $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } Thank's in advance Rodrigo Peres -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Using PHP in an HTTP 404 error document ($HTTP_REFERER is blank)
Maybe you use 4.1.0 and register_globals is off (in php.ini). try this var_dump($HTT_SERVER_VARS); Regards, Andrey Hristov - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:27 PM Subject: [PHP] Using PHP in an HTTP 404 error document ($HTTP_REFERER is blank) I have a php document which I direct my server to use as a 404 error doc. In it I write: print $REQUEST_URI\n; print $HTTP_REFERER\n; The thing is I get the the error page itself in place of $REQUEST_URI and $HTTP_REFERER is blank. any suggestions as to how I can get the URL which the user entered? I'm runnig Apache on RedHat 7.2 Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP + DB2
Using ODBC should be fine; what problems are you having with input/output parameters? I have a stored procedure like this: CREATE PROCEDURE ADMINISTRATOR.Proc2 (IN idc INT,OUT max int) . P1: BEGIN SET max = 22; END P1 And I try to call it like this: $ps = CALL ADMINISTRATOR.PROC2(2,?); $result = odbc_prepare($link,$ps); $arrparam = array(1); $rst = odbc_execute($result, $arrparam); echo $arrparam[0]; and no luck. Also, what ODBC drivers are you using? IBM DB2 ODBC DRIVER 7.01.00.40 I appreciate any suggestion. Rares -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] stat failed error
Since I've installed the 4.1 version of PHP, i have a lot of stat failed warning. By exemple, in PHPmyAdmin : Warning: stat failed for ./sql.php?lang=frserver=1db=phototable=Users_x_magasinpos=0sql_query=SE LECT+%60UXM_id%60%2C%60U_email%60%2C%60MAG_id%60%2C%60UXM_paiement_magasin%6 0%2C%60UXM_credit_francs%60%2C%60U_id%60%2C%60UXM_credit%60%2C%60UXM_devise% 60+FROM+%60Users_x_magasin%60+WHERE+1+AND+%60U_id%60+%3D+1 (errno=36 - File name too long) in /var/www/htdocs/administration/sql/tbl_replace.php on line 202 Or in my code : stat failed for imgEPQfTy.jpeg (errno=2 - No such file or directory) (it is on a is_dir() call ) I don't use the stat function of php... Any idea -- -- Matthieu Brunet - [EMAIL PROTECTED] Réseau-Photo S.A. - http://www.reseau-photo.com 15, rue du Général Campredon - 34000 Montpellier Tél. : 04 67 58 07 08 - Fax : 04 67 58 03 04 Icq : 119683958 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] multicolumn table
Try something like this... $my_array = array( A=array(1,2,3),B=array(1,2,3),C=array(1,2,3)); $num_columns = 3; echo table; foreach($my_array as $key=$value) { echo trtd$key/td; for($i=1;$i=$num_columns;$i++) { echo td.$value[$i-1]./td; } echo /tr; } echo /table; Sorry list, I think, I was not clear enough. I don't have errors, what I could do with this code is output a table in alphabetical order ex: A a.. ab.. B b... bc... But what I really need and I couldn't make work is, my table output one name per row and a long one singlke column, and I need a table with 3 colmns and many rows as necessary to have all names. Thank's $sql = SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico; $query = new Query($conexao); $query-executa($sql); $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using persistent connection to database
Hi to everybody, first sorry for my poor english. im trying to use persistents connections to an Oracle Database through PHP, for manageing transactions, and have some problems. My Schema: * Web Server: Apache 1.3.20 on a Linux RedHat 7.0 * PHP: 4.0.6 compiled with oracle module functions (ora_*) * Data Base: Oracle 8.0.5 on a Windows NT Server I need to manage transactions to database. For it i made a test pages like this: 1 index paga that generate some frames and open a persistent connection to the database 1 frame that made an insert to one table of the database 1 frame that made an insert to another table of the same databese 1 frame with 2 buttons, one for execute a Commit and another for execture a Rollback Some times works well, but other times not work correctly... What im doing wrong? Can somebody help me? Avanced thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] another GD problem
I have a problem.. I build some images by GD library via PHP.. Next, I need them to contain some text (i.e. date) I use the ImageString function, with color allocation black (ImageColorAllocate($img,0,0,0)). And there's the problem: IE5.0+ display the pictures properly... bud NN 4.7 draws the picture w/o the text. Where's the problem? P.S. I am pretty sure that my image-creating PHP is correct. Thank you all.. J.M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sending Email
is imap_mail() currently available in Win32?? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] multicolumn table
Here is a script I use to create columns. I wrote this my first month phping, so it may be ugly. (Hence it may not be up to my new standards... :) Not to mention, this was designed for creating menu button which sounds different than what you do. I use it as follows: display_columns( mysql query result, name of function that display's html row [, number of rows prefered]) · Since returned rows can vary, this function will try to force that number of rows. So you could end up with 15 million columns. · $max_columns determines the maximum number of columns and the script adjusts as needed. Default is three. · This will create the columns down then across. NOTE: I included my html function called 'regular_menu' Example use- /* $results = mysql_query(etc.); display_columns($results,regular_menu); **/ function display_columns($menu_query_result,$display_menu,$max_rows_allowed = 6){ / Variables for Menus / global $page; $row_count = mysql_num_rows($menu_query_result); $max_rows_allowed = $max_rows_allowed; # Number of allowed rows per column $total_column_rows = $max_rows_allowed; # The default is 1 column X $max_rows_allowed /*** Get $max_column and $max_rows and $width of entire Table ***/ while($row_count $total_column_rows){ $total_column_rows += $max_rows_allowed; } $max_columns = ($total_column_rows/$max_rows_allowed); ### limit the number of columns to 3 max- (Makes it easier to print) if($max_columns 3){ $max_columns = 3; } ### Clean up columns whileceil($row_count/$max_columns))*$max_columns) - $row_count) ceil($row_count/$max_columns)){ $max_columns--; } ### Define $max_rows now that $max_columns is defined $max_rows = ceil($row_count/$max_columns); $width = $max_columns * 200; / Display this thing / $container_html = EOQ !-- Start container_html - Container of the columns. -- TABLE cellspacing='0' border='0' align='center' width='$width' TR EOQ ; print $container_html; /*** Print Columns and Rows ***/ ### Start Column ### for($column_counter = 0; $column_counter $max_columns; $column_counter++){ $print_html = EOQ !-- New Column -- TD valign=top width=200 TABLE border=0 cellpadding=3 EOQ ; print $print_html; ### Start and Stop Rows ### for($row_counter = 0; $row_counter $max_rows; $row_counter++){ $ary = mysql_fetch_assoc($menu_query_result); if($ary){ $display_menu($ary); } ### End of Row Loop ### } $print_html = EOQ !-- Close Column -- /table /TD EOQ ; print $print_html; } $print_html = EOQ !-- Close Container -- /TR /table br EOQ ; print $print_html; } function regular_menu($ary){ global $page; extract($ary); $print_html = EOQ !-- Row -- tr bgcolor=#003366 td width=200 div align=center a href='http://$page?menu=$m_id' class='links'$m_artical $m_name /a /div /td /tr EOQ ; print $print_html; } At 12:04 PM 12/17/2001 -0200, Rodrigo Peres wrote: Hi list, I've tried for many times, but couldn't make a table with 3 columns and n rows This is my code, someone please, can help in make it outputs a 3 column table?? $sql = SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico; $query = new Query($conexao); $query-executa($sql); $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } Thank's in advance Rodrigo Peres -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: another GD problem
I take it back.. after some time of tracing the error, I found out that I handed over the date as a string argument (img src=image.php?date=25. 01. 2001...) And the problem were the whitespaces.. If you run into similiar trouble, just URLEncode the string, and before using it in imagePHP, simply URLDecode it. :-)) Phewww... :-] J.M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP not able to send email
Hi, Recently, I have found that I have had a problem sending emails with particular accounts on my RedHat Linux 6.2 server using Sendmail-8.9.3. There are two examples of my inability to send email and I think they are related. I have a PHP script used to send email and the user rights of the file containing the PHP script belong to a user called webuser (same as the user of my Apache server). When I use the script to send email, I noticed that the email was not sent and when I checked the mail logs, I found the following: Dec 17 12:59:16 ns sendmail[14686]: NOQUEUE: SYSERR(webuser): queuename: Cannot create qfMAA14686 in /var/spool/mqueue When I telnet into the machine, log on as webuser and try to use Pine to send email , I noticed the following error occurs. [Mail not sent. Sending error: 451 queuename: Cannot create qfQAA15157] However I was able to resolve the problem in Pine by setting the mail.visors.com.hk as my outgoing mail server. Something that I never had to do before yet still successful in sending out email. The same thing happened to another account also, but these accounts were just find previously. I have been reported to have had a recent telnet attack , but I am not sure if this could be the cause of it. Most grateful if someone can shed some light on this for me? Thanks Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP not able to send email
On Mon, Dec 17, 2001 at 11:48:13PM +0800, Peter wrote: Dec 17 12:59:16 ns sendmail[14686]: NOQUEUE: SYSERR(webuser): queuename: Cannot create qfMAA14686 in /var/spool/mqueue Your sendmail-setup is b0rked, check permissions on /var/spool and fix sendmail, there's nothing wrong with PHP (read: this is offtopic). -- Andreas D Landmark / noXtension When I was in school, I cheated on my metaphysics exam: I looked into the soul of the boy sitting next to me. -- Woody Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: another GD problem
Small comment: No need to use urldecode() here, as the data is automatically decoded during submit. greets, bvr. On Mon, 17 Dec 2001 17:11:33 +0100, Jan Maska wrote: I take it back.. after some time of tracing the error, I found out that I handed over the date as a string argument (img src=image.php?date=25. 01. 2001...) And the problem were the whitespaces.. If you run into similiar trouble, just URLEncode the string, and before using it in imagePHP, simply URLDecode it. :-)) Phewww... :-] J.M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How can i send eMail under Win32
I need to send eMail under Win32 Regards.. William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why don't ...
H! Thank you, but yuor fragment of code read all file and I'm really want is read an integer from the file. There are some fuction of PHP thas serve me to make that? Rasmus Lerdorf said: Is your second character perhaps a 0? That while loop is going to end as soon as it gets a character that evaluates to 0. Write it like this instead: while(!feof($this-m_file)) { $c = fgetc($this-m_file); if(is_numeric($c)) $str .= $c; } -Rasmus On Sun, 16 Dec 2001, Yoel Benitez Fonseca wrote: Hi! The following code fragment tries to read a sequence of digits from a file but it doesn't work, only the first character is read, Which is my error?. $str = ; while( ($c = fgetc($this-m_file)) ereg([0-9], $c) ){ $str .= $c; } Thank you in advance -- Yoel Benitez Fonseca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP not able to send email
WOW! You were right! It worked! But how did it happen in the first place? Thanks a lot for your help. On Mon, 17 Dec 2001, Andreas Landmark wrote: On Mon, Dec 17, 2001 at 11:48:13PM +0800, Peter wrote: Dec 17 12:59:16 ns sendmail[14686]: NOQUEUE: SYSERR(webuser): queuename: Cannot create qfMAA14686 in /var/spool/mqueue Your sendmail-setup is b0rked, check permissions on /var/spool and fix sendmail, there's nothing wrong with PHP (read: this is offtopic). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] User Authentication
Paul Burney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 12/16/01 12:58 PM, Daniel Grace at [EMAIL PROTECTED] wrote: Anyways, though the 401 part works and actually brings up the typical Enter Username/Password box, $PHP_AUTH_USER and $PHP_AUTH_PW are not being set. There are no .htaccess files in the directory (or any parent dirs for that matter), and no AuthType directives all in my httpd.conf file. I have been unsuccessful in determining what is wrong, and am flat out of ideas. My guess would be that register_globals is off. If I recall correctly, $PHP_AUTH_USER and $PHP_AUTH_PW need register_globals on to work like you want them to. Check phpinfo() to see if another variable, maybe one in the new arrays, will give them to you. If not, you can look for the Authorize Header and then manually parse out the User and PW information. Paul ?php /* Happy Holidays */ mysql_select_db('North_Pole'); mysql_query('SELECT reindeer FROM stable WHERE nose_color=red'); ? Bah, my test page displayed a phpinfo() and I never noticed this... For some reason You were correct. $PHP_AUTH_USER and $PHP_AUTH_PW reside in _$SERVER under PHP 4.1.0 (and thus presumably $HTTP_SERVER_VARS under PHP 4.0.6) This means I can actually get back to making progress on my site... -- Daniel Grace Warning: Undefined variable: signature in email.php on line 35 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How can i send eMail under Win32
Mail() function works fine on win32, you need enter smtp server in your php.ini and sendfrom address. example: SMTP = 10.1.25.1 ; for Win32 only sendmail_from = [EMAIL PROTECTED] Zliy Pes, http://zliypes.com.ua - Original Message - From: William Sanchez Sanchez [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Monday, December 17, 2001 6:45 PM Subject: [PHP] How can i send eMail under Win32 I need to send eMail under Win32 Regards.. William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PMA worry
Just got this. Never had it before. Am I being hacked? Warning: Too many connections in /htdocs/PMA/lib.inc.php3 on line 305 Warning: MySQL Connection Failed: Too many connections in /htdocs/PMA/lib.inc.php3 on line 305 Error MySQL said: Too many connections --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: LIBXML- Auto-Indent - How do it?
Hello, Ricardo Junior wrote: Hi All, I would like to know if there is any way to auto-indent the XML file when I add a new node in a docxml object and export the string of the created XML file with dumpmem() function... This PHP Class generates properly indented XML as you need. http://phpclasses.upperdesign.com/browse.html/package/250 Regards, Manuel Lemos For example: $new = new_xmldoc(1.0); $root = $new-add_root(ROOT); $level1 = $root-new_child(LEVEL-1, ); $level1-new_child(LEVEL2, ); $new_xml_file = fopen (test.xml, w); fwrite($new_xml_file, $new-dumpmem()); fclose ($new_xml_file); The result in test.xml file is: ?xml version=1.0? ROOTLEVEL-1LEVEL2//LEVEL-1/ROOT But I'm needing it like this: ?xml version=1.0? ROOT LEVEL-1 LEVEL2/ /LEVEL-1 /ROOT Could someone help me on this?! Thanks. _ Ricardo J. A. Júnior, Software Engineer Trainee Bowne Global Solutions Phone +55 21 2515 7713 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.bowneglobal.com.br http://www.bowneglobal.com.br/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: large object problem
Manuel, Thanks for the comment. I am able to load the output correctly, if I do a import directly from the server. I am only having trouble with the upload code. Any idea from the code below? Thanks, David --- Manuel Lemos [EMAIL PROTECTED] wrote: Hello, David H wrote: Hi all, I am trying to findout what is wrong with this script can anyone help? $dbconn = pg_connect (cnnection string) or die ( Error: .pg_errormessage ($dbconn)) ; pg_exec ($dbconn, begin) ; $oid = pg_locreate ($dbconn) ; $fd = pg_loopen ($dbconn, $oid, w) ; pg_lowrite ( $fd, $img ) ; pg_loclose ( $fd ) ; $strqry = INSERT INTO tblImg ( myname, mytype, myimg, myfilesize ) VALUES ( '$img_name', '$img_type', '$oid', $img_size ); $result = pg_exec ( $dbconn, $strqry ) ; pg_exec ($dbconn, commit) ; pg_exec ($dbconn, end) ; The output that I am getting is this /tmp/phpQPUyx2 by pg_loreadall function. Similarly, you need to do pg_loopen on a OID returned by a select query. Anyway, if you want to try something that works with easier to understand interface, maybe you would like to try Metabase which is a database abstraction PHP package that provides a single and portable interface to BLOBs that supports PostgreSQL among many other databases. Metabase is free and you may download it from here: http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: large object problem
Hello, David H wrote: Manuel, Thanks for the comment. I am able to load the output correctly, if I do a import directly from the server. I am only having trouble with the upload code. Any idea from the code below? Sure, the problem is that you think that $img contains the contents of the uploaded file but in fact it contains just the name of the temporary file to which the uploaded file was copied. You need to open that temporary file and read its contents to store the BLOB. Regards, Manuel Lemos Thanks, David --- Manuel Lemos [EMAIL PROTECTED] wrote: Hello, David H wrote: Hi all, I am trying to findout what is wrong with this script can anyone help? $dbconn = pg_connect (cnnection string) or die ( Error: .pg_errormessage ($dbconn)) ; pg_exec ($dbconn, begin) ; $oid = pg_locreate ($dbconn) ; $fd = pg_loopen ($dbconn, $oid, w) ; pg_lowrite ( $fd, $img ) ; pg_loclose ( $fd ) ; $strqry = INSERT INTO tblImg ( myname, mytype, myimg, myfilesize ) VALUES ( '$img_name', '$img_type', '$oid', $img_size ); $result = pg_exec ( $dbconn, $strqry ) ; pg_exec ($dbconn, commit) ; pg_exec ($dbconn, end) ; The output that I am getting is this /tmp/phpQPUyx2 by pg_loreadall function. Similarly, you need to do pg_loopen on a OID returned by a select query. Anyway, if you want to try something that works with easier to understand interface, maybe you would like to try Metabase which is a database abstraction PHP package that provides a single and portable interface to BLOBs that supports PostgreSQL among many other databases. Metabase is free and you may download it from here: http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: streaming media via php
Try re-writing your script to accept the url as such: http://server/content.php/media/file.asf Mike Stephen Vandyke wrote: Hello PHP people :) I have a tough one here, I wrote a content script that plays media files, but I can't seem to get things to actually buffer and stream as they should. Here's the conundrum: http://server/media/file.asf - Media player will buffer and start playing before download completes http://server/content.php?f=media/file.asf - Media player has to download entire file before it starts trying to play Here's the source of content.php, anyone see anything obvious that I'm missing? I've been all over the HTTP/1.1 spec and media RFCs trying to figure out what the heck I'm missing. Windows Media Player interprets the media name as content if that's any help. Alse, the mime types are all correct so that's not the issue, I'm just trying to figure out how to make the players buffer+play instead of download+play. ?php $mime_type = strtolower(strrchr($f,'.')); $mime_type_array = array( '.asf' = 'application/vnd.ms-asf', '.avi' = 'video/x-msvideo', '.gif' = 'image/gif', '.jpg' = 'image/jpeg', '.mov' = 'video/quicktime', '.mpe' = 'video/mpeg', '.mpeg' = 'video/mpeg', '.mpg' = 'video/mpeg', '.ra' = 'audio/x-pn-realaudio', '.ram' = 'audio/x-pn-realaudio', '.rm' = 'audio/x-pn-realaudio', '.wmv' = 'audio/x-ms-wmv' ); // this is our security, bleh if(!in_array($mime_type,array_keys($mime_type_array))) { header(Location: /error.php); } $filename = '/path/to/'.$f; $dlname = substr(strrchr($filename,'/'),1); $offset = (isset($nocache)?0:(86400 * 3)); header(Accept-Ranges: bytes); header(Expires: .gmdate(D, d M Y H:i:s \G\M\T, time() + $offset)); header(Cache-Control: max-age=.$offset); header(Last-modified : .gmdate(D, d M Y H:i:s \G\M\T, filemtime($filename))); header(Content-Length: .filesize($filename)); header(Content-Disposition: filename=$dlname); if($debugx==1) { phpinfo(); } else { header(Content-Type: .$mime_type_array[$mime_type]); @readfile($filename); } ? Thanks in advance for any help, Please cc me on any replies since I am not on this mailing list. Stephen VanDyke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Checking a frames url..
This will not work. JavaScript is a client side language and will not have the frame information until the browser has the web page, at which time all parsing of the php code (done on the server side) is already complete. Fred Richard Black [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can get the URL of a frame using JavaScript - maybe you could pass this in somehow to the PHP script??? -Original Message- From: Necro [SMTP:[EMAIL PROTECTED]] Sent: 17 December 2001 08:59 To: [EMAIL PROTECTED] Subject: [PHP] Checking a frames url.. Lo all, I am trying to write a script that will output to a frame the current location within a site.. like Home :: Contact I need PHP to be able to check the url of the frame main and then parse out anything after the domain to decide what to output as the location. e.g. http://domain.com/contact/index.html (http://domain.com) -- forgotten (contact/index.html) If URL = contact/index.html { echo('Home :: Contact'); } If URL = business/index.html { echo('Home :: Business'); } Am I on the correct track with most of it?? I just cant work out how to grab the URL of a single frame. Thanx Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 'Select All'
Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Checking a frames url..
Necro, inline below - Original Message - From: Necro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 9:58 AM Subject: [PHP] Checking a frames url.. Lo all, I am trying to write a script that will output to a frame the current location within a site.. like Home :: Contact I need PHP to be able to check the url of the frame main and then parse out anything after the domain to decide what to output as the location. e.g. http://domain.com/contact/index.html (http://domain.com) -- forgotten (contact/index.html) If URL = contact/index.html { echo('Home :: Contact'); } If URL = business/index.html { echo('Home :: Business'); } Am I on the correct track with most of it?? I just cant work out how to grab the URL of a single frame. Thanx Andrew you basically have it right there. You can do it easier by passing the $loc (location) per the url (loc=contact) or per session. either way you have the page that is being called and can then use the following to output the location echo strtoupper($loc); all done. chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Select All'
Shane, is this meant for initial settings of the form only or as a button, or some such, to allow someone to select all the boxs? chuck - Original Message - From: Shane Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 6:54 PM Subject: [PHP] 'Select All' Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Delete File Contents?
I've created a program that runs a process then stores the results to a file on the server. I would like the file to contain only the most recent update, but it seems I can only append to my using fopen. Is there a way to open the file and overwrite the data in that file? I've considered deleting the file and creating a new one but that seems like a lot to do. It would be nice if there were a way to set a pointer to the top of the file and overwrite. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Select All'
I know *exactly* what you mean, the solution (took me at least an hour) is attached. have fun, bvr. On Mon, 17 Dec 2001 17:54:42 +, Shane Wright wrote: Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Select All'
Hi Charles, As a button, ideally two in fact - 'select all' and 'unselect all'. I've done it easily with ASP sites - where the '[]' is not required to have the values passed back as an array. (I know I could find a non-array way of doing it but its a pain) -- Shane On Monday 17 Dec 2001 6:06 pm, Charles Williams wrote: Shane, is this meant for initial settings of the form only or as a button, or some such, to allow someone to select all the boxs? chuck - Original Message - From: Shane Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 6:54 PM Subject: [PHP] 'Select All' Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Select All'
Oh, one more thing.. The latest MSIE suddenly doesn't seem to support the function to be named 'selection' . change that and it'll work ;) bvr. I know *exactly* what you mean, the solution (took me at least an hour) is attached. have fun, bvr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Delete File Contents?
Just open the file in mode w. $fp = fopen(your_file, w); There is also the the function fseek(), which will allow you to move the file pointer around to any place in the file. Mode w will suffice for your needs. fopen() - http://www.php.net/manual/en/function.fopen.php fseek() - http://www.php.net/manual/en/function.fseek.php Thanks Jeremy Allen -Original Message- From: Chris [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Delete File Contents? I've created a program that runs a process then stores the results to a file on the server. I would like the file to contain only the most recent update, but it seems I can only append to my using fopen. Is there a way to open the file and overwrite the data in that file? I've considered deleting the file and creating a new one but that seems like a lot to do. It would be nice if there were a way to set a pointer to the top of the file and overwrite. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] $PHPSESSID on PHP 4.1.0
Hi All, I have a few scripts using $PHPSESSID to softly disable cookies requirement on some pages. I just installed PHP 4.1.0 and I am porting some lines to adapt to the new version. If I do this: ?php echo $PHPSESSID; ? It doesn't show nothing at all. Did something changed, does this var now have a new name, some new way to access it? Thanks for any help, -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] telnet or ssh in PHP (Curl?)
Hello everybody! I need some help. I want to use a SSH (or, if SSH is impossible, telnet) connection in PHP. But I can't find anything about it. The only thing about telnet in the PHP manual (English), is that Curl supports it, but how? Tanks in advance for all replies! Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] telnet or ssh in PHP (Curl?)
Hi Bas! SSH is possible but complicated. For telnet, simply use fsockopen() (default telnet port is 23). This returns a filepointer so you can read/write like as a regular file. greets, Bas van Rooijen On Mon, 17 Dec 2001 17:28:04 +0100, Bas van Schaik wrote: Hello everybody! I need some help. I want to use a SSH (or, if SSH is impossible, telnet) connection in PHP. But I can't find anything about it. The only thing about telnet in the PHP manual (English), is that Curl supports it, but how? Tanks in advance for all replies! Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Using persistent connection to database
I would recommend switching to the oci_* functions. More reliable. Bye, John Berlina [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi to everybody, first sorry for my poor english. im trying to use persistents connections to an Oracle Database through PHP, for manageing transactions, and have some problems. My Schema: * Web Server: Apache 1.3.20 on a Linux RedHat 7.0 * PHP: 4.0.6 compiled with oracle module functions (ora_*) * Data Base: Oracle 8.0.5 on a Windows NT Server I need to manage transactions to database. For it i made a test pages like this: 1 index paga that generate some frames and open a persistent connection to the database 1 frame that made an insert to one table of the database 1 frame that made an insert to another table of the same databese 1 frame with 2 buttons, one for execute a Commit and another for execture a Rollback Some times works well, but other times not work correctly... What im doing wrong? Can somebody help me? Avanced thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Delete File Contents?
http://www.php.net/manual/en/function.ftruncate.php Chris writes: I've created a program that runs a process then stores the results to a file on the server. I would like the file to contain only the most recent update, but it seems I can only append to my using fopen. Is there a way to open the file and overwrite the data in that file? I've considered deleting the file and creating a new one but that seems like a lot to do. It would be nice if there were a way to set a pointer to the top of the file and overwrite. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] installing php on apache
i'm having trouble running php on my linux box running apache. the rpm is installed but cant get my simple script to execute. What else do i need to do. Edit php.ini? Edit httpd.conf? Peremissions? Apache runs fine by itself. Thanks. JJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: installing php on apache
You need to add lines to the httpd.conf file and maybe edit the php.ini file. On windows, the instructions for doing this are in install.txt which is found in the directory in which PHP was installed. If doing this doesnt help (make sure you restart apache!), I'm not sure what to do as my Linux experience is limited! Jeremiah Jester [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i'm having trouble running php on my linux box running apache. the rpm is installed but cant get my simple script to execute. What else do i need to do. Edit php.ini? Edit httpd.conf? Peremissions? Apache runs fine by itself. Thanks. JJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] http message
Is there a way for PHP to attempt to open a URL and return the HTTP response header? For example, I want to make a PHP page which will redirect a visitor to a mirror site if it encounters a 404 Not found error whilst trying to open the website homepage. This test page will reside on a seperate server. I was thinking maybe attempting to open the homepage with something like fopen() and, using nested if() statements, try the next mirror in the list if the fopen() command didnt succeed. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http message
see my message Re: URL checking. i just posted a few curl functions that do exactly what you want to. phil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] please help! ./common_db.inc'
Hi all, this is my first real php program -can any one explain to me what this error message means? Warning: Failed opening './common_db.inc' for inclusion (include_path='') in /var/www/html/myphp/ex.php on line 2 thanks a lot, Caleb _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http message
use fsockopen http://www.php.net/manual/en/function.fsockopen.php to \talk\ to the remote host. Is there a way for PHP to attempt to open a URL and return the HTTP response header? For example, I want to make a PHP page which will redirect a visitor to a mirror site if it encounters a 404 Not found error whilst trying to open the website homepage. This test page will reside on a seperate server. I was thinking maybe attempting to open the homepage with something like fopen() and, using nested if() statements, try the next mirror in the list if the fopen() command didnt succeed. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: replacing Carriage Return
Phantom wrote: I solicit information from a text field and save the data in mysql to be pulled out later and displayed as text on a webpage. However, Carrage Returns in the text field do not appear in the webpage text. they're not supposed to show up in HTML ! you need to replace the \n that come from the textarea with the HTML Tag br to have line breaks in your HTML. nl2br() will do that for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.1.0 SAPI on Apache Win32?
I'm wondering if anyone else is trying to run the SAPI version of PHP on Apache for Win32 and hitting problems with the include_path? I'm running Win2K, if I set the include_path parameter to any non-blank value I get an error as follows: Warning: Failed opening '/apache/htdocs/helloworld.php' for inclusion (include_path='.') in Unknown on line 0 How to test it on your system: - add the following to your HTTPD.conf: LoadModule php4_module ./PATH_TO_PHP/sapi/php4apache.dll - comment out: Action application/x-httpd-php /php/php.exe - give everyone user access to read/execute to a sub-directory in your htdocs directory. - create a PHP file that just echo's hello world w/ no include/require statements. - restart apache - run the script (should be ok) - add include_path=. to your PHP.ini (this will search for includes in local directory) - restart apache - run the script (does it give this error?) Can someone tell me if I missed something in configuring Apache/PHP that would cause this? Here is the bug report I filed: http://bugs.php.net/bug.php?id=14563edit=1 -GED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: please help! ./common_db.inc'
It couldnt open ./common_db.inc which you referenced in an include() function on line 2 of /var/www/html/myphp/ex.php Its a bit like the PHP version of the 404 not found message. Check the path for typing mistakes etc. You might like to try using ../../dir1/dir2 instead of ./ Caleb Carvalho [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, this is my first real php program -can any one explain to me what this error message means? Warning: Failed opening './common_db.inc' for inclusion (include_path='') in /var/www/html/myphp/ex.php on line 2 thanks a lot, Caleb _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] fopen - permission denied
Hi Folks, I've been scanning the documentation for a simple answer to this.. but can't seem to find one. How can I solve fopen(/path/filename,w) running from my script - without it resulting in a permission denied error? I'm not sure what it is in my apache conf file that I have to change to allow this, but what I don't want to do is allow apache directory write permissions to everything.. Can anyone help? dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http message
Thanks all of you. I'm sure one of these will work!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a web browser?
On Sun, Dec 16, 2001 at 11:48:38PM -0800, David Yee wrote: Is it possible to have PHP act like a web browser, accept cookies and post data (for login)? I'm not sure exactly where to start- I know you can use fopen/file to retrieve url's but I'm not too sure about the other steps. I would like to write and run such a php script as a cron job and have it do something like log into my web-based email account, retrieve emails, process them, save them locally, and then delete them on the server. Thanks for any help. Have a look at hte Snoopy PHP class, an object that simulates a web browser. http://sourceforge.net/projects/snoopy/ Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] printer_write()
Hello php-general, I can print directly from the server, but from the script page I get Warning: couldn't allocate the printerjob in code line whatever. I'm using php version 4.06 on Win2000 Advanced Server. Code sample... ? $DATA = array(Test Header, Test Page); //dump list of local printers know to machine $PRINTERS = printer_list(PRINTER_ENUM_LOCAL); foreach($PRINTERS as $key=$val) { foreach($val as $sub_key=$value) { echo $sub_key.: .$value.br; } } ? p ? // do the actual printing work $printer = net node\\printer; echo printer: .$printer.br; $handle = printer_open($printer); foreach($DATA as $val) { printer_write($handle, $val); echo $val.br; } printer_close($handle); ? -- Best regards, Michael mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.10: any way to override register_globals = OFF
Hi, Now that register_globals is (or will be) OFF by default (just like error_reporting) I'm facing a huge rewrite of existing code if my hosting provider decides that he wants to upgrade his php (and believe me, he will use default settings) Is there any way to override register_globals and error_reporing runtime in your PHP script? (there is no way that I can use .htaccess to override :-(( Any help would be much appreciated! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How deep can I go with embedded if s.
Hello All, Is anybody aware of any limitations of php on embedded if ..else statements? For example: if ($a$b) { if ($c$d) { this(); } else { if ($gg==$dd) { echo 'ladooo'; } else { echo 'bab'; } that(); } if ($e$f) { tthis(); } else { tthat(); } else { echo Oooops; } would this work, = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mysql php error
im trying to run phpMyAdmin but everytime i try to pull the index.php file or any other associated with the MyAdmin program i get the following error in my browser: cannot load MySQL extension, please check PHP Configuration. I'm guessing this means mysql is not installed properly or the php.ini file needs to be modified. Anyone know how to check if mysql is properly installed? How to start service? Ideas? Thanks. JJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How deep can I go with embedded if s.
Well, I just made a test program that nested 1000 if() statements and it worked. Just make sure you close all your curly brackets correctly. IMHO, a large number of nested if else elseif statements indicate poor programming design. Sometimes they are necessary, but usually can be simplified by employing other methods. Jim Hello All, Is anybody aware of any limitations of php on embedded if ..else statements? For example: if ($a$b) { if ($c$d) { this(); } else { if ($gg==$dd) { echo 'ladooo'; } else { echo 'bab'; } that(); } if ($e$f) { tthis(); } else { tthat(); } else { echo Oooops; } would this work, = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: mysql php error
try ?PHP phpinfo(); ? to see if there's any clues in there make sure the mysql daemon is running (not sure how to do this) see if you can connect using the MySQL client (not PHP). If you can then MySQL is running ok It sounds like the mysql exetension is damaged of missing. Check its in the right folder etc and if it is try reinstalling the PHP package. Just off the top of my head!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.10: any way to override register_globals = OFF
a quick and inelegant hack 4.1 includes an array that has all of the data sent to the script...(or use the different ones like $_GET etc if need be) then write a globalize function that extracts the vars and declares them global...then use this snippet in an auto_prepend file to magically register the vars there's probably a much easier way, including asking your hosting provider to change one little config var... jack Michael Jurgens wrote: Hi, Now that register_globals is (or will be) OFF by default (just like error_reporting) I'm facing a huge rewrite of existing code if my hosting provider decides that he wants to upgrade his php (and believe me, he will use default settings) Is there any way to override register_globals and error_reporing runtime in your PHP script? (there is no way that I can use .htaccess to override :-(( Any help would be much appreciated! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mySQL INSERT question
I suppose this is more of a SQL question, but how do I insert a row into a table right before the very last row in the table. I am sure there is a way to insert a row other than just at the beginning or end of a table but I can't find the syntax on the mySQL site. Anyone know? » Michael Krisher [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.10: any way to override register_globals = OFF
a quick and inelegant hack 4.1 includes an array that has all of the data sent to the script...(or use the different ones like $_GET etc if need be) then write a globalize function that extracts the vars and declares them global...then use this Or use extract(). -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] electronic postcard recommendation?
hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.10: any way to override register_globals = OFF
Thank you for your answers. The hack seems the way to go, but I haven't found anything like this on the net. Presumably because the 'problem' is so new... I have absolutely no control over my hosting providers settings, and I wish PHP 4.10 would just understand something like set_register_globals I haven't got that much experience with playing with variables at this level. What would do the trick is something like this: for all in $_GET { $[varname] = $_GET[varname] } Could anyone give me some pointers in actually programming this? Many thanks, Michael Richard Heyes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... a quick and inelegant hack 4.1 includes an array that has all of the data sent to the script...(or use the different ones like $_GET etc if need be) then write a globalize function that extracts the vars and declares them global...then use this Or use extract(). -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: electronic postcard recommendation?
I've just been sending some from totl.net. I'm not sure how they do it though and I think they've written the code themselves. Brian Tully [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.10: any way to override register_globals = OFF
exactly...in the function you'd have to extract the variables then globalize them... or you could loop through the arrays and store the keys and values in the globals array...that loop should be simple... jack -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 4:54 PM To: Jack Dempsey; Michael Jurgens Cc: [EMAIL PROTECTED] Subject: RE: [PHP] PHP 4.10: any way to override register_globals = OFF a quick and inelegant hack 4.1 includes an array that has all of the data sent to the script...(or use the different ones like $_GET etc if need be) then write a globalize function that extracts the vars and declares them global...then use this Or use extract(). -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 'Select All'
you _can_ reference it by name - try this: script function my_select(type) { frm = document.forms.test; ele = frm[mycheckbox[]]; len = ele.length; for (i = 0; i len; i++) ele[i].checked = type; } /script form name=test input type=button value=All onClick=my_select(true); input type=button value=None onClick=my_select(false); input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] /form Martin -Original Message- From: Shane Wright [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 4:55 AM To: [EMAIL PROTECTED] Subject: [PHP] 'Select All' Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.10: any way to override register_globals = OFF
for all in $_GET { $[varname] = $_GET[varname] } Could anyone give me some pointers in actually programming this? extract($_GET); -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mySQL INSERT question
Maybe I'm reading your question wrong, but what you are asking isn't possible and more importantly doesn't make sense. I think you're thinking of a database table as you'd think about say an excel worksheet (in that it's ordered). tables aren't ordered in that way. Think about a table as um... a pond. And each fish in that pond is a row (or tuple or record). The fish can swim anywhere they want in that pond so there is no beginning or end. However, if you've tattoed each fish with the number indicating it's insertion into the pond (ie the first fish into the pond got 1, the second gets 2, etc.) then when you select your fish you can order it by those numbers. Heh... how's that for a wacky analogy. Depending on the physical order of rows in a database table is going to get you into trouble down the road. good luck! On Mon, 17 Dec 2001, Mike Krisher wrote: I suppose this is more of a SQL question, but how do I insert a row into a table right before the very last row in the table. I am sure there is a way to insert a row other than just at the beginning or end of a table but I can't find the syntax on the mySQL site. Anyone know? » Michael Krisher [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: electronic postcard recommendation?
Check www.zend.com and php.resourceindex.com and you'll probably find something... On Mon, 17 Dec 2001, Brian Tully wrote: hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Newsgroups????
Just signed up for the mailing list because I couldn't access the newsgroups, what's going on there? __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: electronic postcard recommendation?
hotscripts.com should have something. Steph -Original Message- From: LaserJetter [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 2:04 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: electronic postcard recommendation? I've just been sending some from totl.net. I'm not sure how they do it though and I think they've written the code themselves. Brian Tully [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] TN3270 socket
does anyone know of how or where I can find info on, accessing a IBM mainframe which uses the TN3270 protocol via a socket? TN3270 isnt ordinary telnet so I assume the existing telnet socket info isnt helpful ta brendan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Newsgroups????
a preventative measure against spamAFAIK you don't actually have to sign up for the e-mail list, you just need to give an e-mail address to prove you're not a spammer. jack -Original Message- From: Eddie Shipman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 5:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Newsgroups Just signed up for the mailing list because I couldn't access the newsgroups, what's going on there? __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Displaying html
Does anyone know of an easy way to store html code in a mysql database, and then retreive it, in such a way that it can display the page as if it were a standard html page? Would using php be of benefit to me? Steve Osborne [EMAIL PROTECTED] ?php /* Happy Holidays */ mysql_select_db('North_Pole'); mysql_query('SELECT reindeer FROM stable WHERE nose_color=red'); ?* *(borrowed from Paul) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Newsgroups????
Seems to be working fine from here. Fred Eddie Shipman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Just signed up for the mailing list because I couldn't access the newsgroups, what's going on there? __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: TN3270 socket
http://www.faqs.org/rfcs/rfc1576.html Google Search took 0.3 seconds. Fred Brendan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... does anyone know of how or where I can find info on, accessing a IBM mainframe which uses the TN3270 protocol via a socket? TN3270 isnt ordinary telnet so I assume the existing telnet socket info isnt helpful ta brendan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mySQL INSERT question
I figured out my question was a little illogical, I figured out how to get what I needed with an insert and update statement. Thanks for those that responded. » Michael Krisher [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How deep can I go with embedded if s.
Mehmet, If you can keep the scope ({and}) correct then you will have no problems. However, it will get kinda slow after going deep enough. chuck - Original Message - From: Mehmet Kamil ERISEN [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Monday, December 17, 2001 10:07 PM Subject: [PHP] How deep can I go with embedded if s. Hello All, Is anybody aware of any limitations of php on embedded if ..else statements? For example: if ($a$b) { if ($c$d) { this(); } else { if ($gg==$dd) { echo 'ladooo'; } else { echo 'bab'; } that(); } if ($e$f) { tthis(); } else { tthat(); } else { echo Oooops; } would this work, = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]