php-general Digest 19 Apr 2001 07:41:23 -0000 Issue 636 Topics (messages 49247 through 49328): Re: New problem with PHP "odbc_exec". 49247 by: Scott Fletcher Characters counting 49248 by: Jorn van Eck 49249 by: Jack Dempsey 49251 by: Johannes Janson 49275 by: Joe Stump Re: where to get info on developing web e-mail 49250 by: Henrik Hansen 49283 by: Plutarck regex and mysql - looking for opinions. 49252 by: Larry Hotchkiss 49281 by: Plutarck Finding the records that are NOT linked 49253 by: Simon Kimber 49261 by: Steve Werby 49276 by: Joe Stump php + apache.src.rpm 49254 by: Robert Mena 49263 by: Martín Marqués Password Generator? 49255 by: Ashley M. Kirchner 49272 by: David VanHorn 49279 by: Plutarck 49284 by: Nathan Cassano PHP Enabled Web Hosts 49256 by: Corin Rathbone 49270 by: Philip Olson how to scale down image using ImageMagick? 49257 by: Noah Spitzer-Williams 49280 by: Morgan Curley 49289 by: Noah Spitzer-Williams Creating UTF-8 characters from scratch 49258 by: Dennis Gearon 49312 by: Yasuo Ohgaki 49318 by: Yasuo Ohgaki ACSII in PHP 49259 by: Augusto Cesar Castoldi 49262 by: Steve Werby 49264 by: Frank M. Kromann PHP and Double? 49260 by: Jason Caldwell 49265 by: Steve Werby 49268 by: Augusto Cesar Castoldi 49269 by: Larry Hotchkiss Re: Regular Expression 49266 by: Jeroen Geusebroek 49273 by: Andrew Braund 49274 by: Martín Marqués XML - simple get data from elements 49267 by: Mark Bean 49277 by: Joe Stump 49296 by: Manuel Lemos stripslashes() equivalent when magic_quotes_sybase = on? 49271 by: Johnson, Kirk 49282 by: Rasmus Lerdorf Re: Graphic process within PHP 49278 by: Matt McClanahan 2. run: PHP4 parsing canceled 49285 by: Norbert Pfeiffer Re: `AM_PROG_LIBTOOL' not found in library 49286 by: Pablo Sabatino 49287 by: Kelly Cochran Add data to three tables at once from one form 49288 by: Fates 49290 by: Steve Werby 49291 by: Jason Murray Global variables 49292 by: JCampbell 49293 by: Jason Murray 49294 by: Philip Olson 49295 by: Aaron Tuller 49297 by: Philip Olson Re: PUT Method using PHP4/Apache ... 49298 by: The Hermit Hacker Re: thank you very much 49299 by: Jacky.lilst Re: PHP for Apache 2.0 49300 by: August Zajonc best way to include html? 49301 by: Duke Newbie Help!! Please Look! 49302 by: Tony Daniels 49303 by: Jason Murray 49304 by: Jack Dempsey 49305 by: Tony Daniels 49306 by: Tony Daniels 49307 by: Jason Lotito 49308 by: Jason Murray 49309 by: Tony Daniels 49311 by: Jack Dempsey 49319 by: Brian Clark 49326 by: chris herring 49327 by: chris herring No more help needed! I get the picture!! 49310 by: Tony Daniels SESSIONS, a weird, funny yet strange error happens to wrong peopl e... 49313 by: Maxim Maletsky Different Question?? 49314 by: Tony Daniels 49315 by: Jason Murray 49317 by: Tony Daniels special thanks to Chis Fry, this is great list!! 49316 by: Jacky.lilst HTMLSpecialchars 49320 by: Dddogbruce \(.home.com\) 49321 by: David Robley 49322 by: Jason Murray 49325 by: Brian Clark Re: global sessions 49323 by: CC Zona Weird Ordering & Queries 49324 by: Chris Aitken image-resize/convert 49328 by: De Bodemschat 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] ----------------------------------------------------------------------
The table in the SQL have primary key already and I get this error message. So, I'll try your recommendation to disable part of the PHP script and recompile. Sometime it is better to move on than to struggle over it because no one seem to have the answer to the problem. Thanks, Scott ""Andrew Hill"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Scott, > > This error indicates that there is no index/primary key on a table that the > result set is coming from - and PHP has told the driver read the result set > into a into a cursor (which requires a primary key). > > Adding a primary key to the table will fix this, or passing a different > cursor type - keyset driven cursors are essentially 'sliding windows' - they > read a set of rows in, and then scroll back and forth. Upon reaching the > end of the set, they grab the next keyset in the direction of scroll, etc. > > Alternatively, instead of adding the primary key, you can disable "#define > HAVE_SQL_EXTENDED_FETCH 1 " in php_odbc.h and recompile. This will prevent > PHP from atomatically setting a cursor. > > Best regards, > Andrew > -------------------------------------- > Andrew Hill - OpenLink Software > Director Technology Evangelism > Universal Data Access Integration > http://www.openlinksw.com > > > -----Original Message----- > > From: Scott Fletcher [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 18, 2001 9:37 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] New problem with PHP "odbc_exec". > > > > > > Hi! I don't understand why PHP is having trouble with the > > odbc_exec. Is > > there a bug in PHP code? Here's what the error messages said! > > > > "SQL error: [OpenLink][ODBC][Driver]No key columns found for table > > referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect". > > > > This show that it had to do with primary (or secondary) keys or index > > issues. I'm using MS-SQL Sever and this table I'm using in the database > > have primary key already! > > > > So, what can I do to fix it? I need it to be working. When I use the > > Linux odbctest command and it execute without a problem. So, it > > is obvious > > the problem lie with PHP code, odbc_exec(); > > > > Thanks, > > Scott > > > > > > > > -- > > 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] >
Hi there, Does someone know how to display for example150 characters from a $ set by MySQL? -- Jorn van Eck Student Information Engineering Almere Tel: +31 614430902 E-mail: [EMAIL PROTECTED] Website: http://www.iie.nl/~eck13
What exactly do you need? If you have a variable that contains a string, you can do echo substr($var,0,150) to print the first 150 characters... or, are you trying to limit the amount in the mysql query? I believe you have to get the whole result then limit it in php, but others might know better about that... -jack -----Original Message----- From: Jorn van Eck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 18, 2000 3:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Characters counting Hi there, Does someone know how to display for example150 characters from a $ set by MySQL? -- Jorn van Eck Student Information Engineering Almere Tel: +31 614430902 E-mail: [EMAIL PROTECTED] Website: http://www.iie.nl/~eck13 -- 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]
Hi, to get the first 150 chars of a mysql filed do this: SELECT LEFT(YourField, '150') FROM YourTable WHERE YourCondition=true; This does it in MySQL and for PHP follow the mentioned substr-method. cheers Johannes ""Jorn van Eck"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 9bkpd8$r77$[EMAIL PROTECTED]">news:9bkpd8$r77$[EMAIL PROTECTED]... > Hi there, > > Does someone know how to display for example150 characters from a $ set by > MySQL? > -- > Jorn van Eck > Student Information Engineering > Almere > Tel: +31 614430902 > E-mail: [EMAIL PROTECTED] > Website: http://www.iie.nl/~eck13 > > > > -- > 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] >
look into the substr() function in PHP --Joe On Tue, Apr 18, 2000 at 09:23:39PM +0200, Jorn van Eck wrote: > Hi there, > > Does someone know how to display for example150 characters from a $ set by > MySQL? > -- > Jorn van Eck > Student Information Engineering > Almere > Tel: +31 614430902 > E-mail: [EMAIL PROTECTED] > Website: http://www.iie.nl/~eck13 > > > > -- > 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] /* Joe Stump * Sr. PHP Developer * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net */
"Szeto" <[EMAIL PROTECTED]> wrote: > Hello, > > * i wondering where to get ifo on developing web e-mail > * what standard should i use to deveping to software look at the imap functions in the php manual they are what you need to develop what you need. -- Henrik Hansen
Check out PHPost at webgadgets.com for some non-IMAP email tips. -- Plutarck Should be working on something... ...but forgot what it was. "Henrik Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Szeto" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > * i wondering where to get ifo on developing web e-mail > > * what standard should i use to deveping to software > > look at the imap functions in the php manual they are what you need to > develop what you need. > > -- > Henrik Hansen > > > -- > 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] >
Im working on a site utilizing apaches/mysqp and of course php. Im working through the basic framwork creating forms to collect user input and do various searches etc. I was curious as to what most people find the best way keep thier mysql queries from getting messed up by user entered data. None of my searches or database data has or needs any sort of punctuation, so I was thinking of striping it all out from form input. What method is everyone else using? -- Larry H.
I use a special function just for reforming input, but they use the following bits with PCRE: $replace_wordwhite = '/[^\w\s]/'; $replace_word = '/\W/'; $replace_num = '/\D/'; $replace_email = '/[^\w\-\.@]/'; Works pretty well and it's quite useful for killing useless input without returning errors, so the username (for instance) "B{o}b" it made into "Bob". That way it's more or less forgiving of morons and malicious users alike :) -- Plutarck Should be working on something... ...but forgot what it was. "Larry Hotchkiss" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Im working on a site utilizing apaches/mysqp and of course php. Im > working through the basic framwork creating forms to collect user input > and do various searches etc. I was curious as to what most people find > the best way keep thier mysql queries from getting messed up by user > entered data. None of my searches or database data has or needs any sort > of punctuation, so I was thinking of striping it all out from form > input. What method is everyone else using? > > > -- > Larry H. > > -- > 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] >
Hi all, I have written a PHP/MySQL "top-sites" program. It has two tables, link_sites, which contains the details of all the sites signed up (ID,url,title,description) and link_stats in which a new record is inserted every time a visitor links in from one of those sites (ID,siteID,clientIP,datestamp). Can anyone help me write a SQL query to pull out all the sites in link_sites that are not mentioned in link_stats.. ie the ones that have never been clicked.. Cheers Simon Kimber Funny.co.uk - The Comedy Portal http://www.funny.co.uk/
"Simon Kimber" <[EMAIL PROTECTED]> wrote: > I have written a PHP/MySQL "top-sites" program. It has two tables, > link_sites, which contains the details of all the sites signed up > (ID,url,title,description) and link_stats in which a new record is inserted > every time a visitor links in from one of those sites > (ID,siteID,clientIP,datestamp). > > Can anyone help me write a SQL query to pull out all the sites in link_sites > that are not mentioned in link_stats.. ie the ones that have never been > clicked.. Read the manual about LEFT JOIN syntax. In a nutshell you need something like: SELECT * FROM link_sites LEFT JOIN link_stats ON link_sites.ID=link_stats.ID WHERE link_stats.ID IS NULL In regular language, it means: Look through *all* of the records from link_sites, join them with records from link_stats with an ID that matches the ID from link_sites and then only show records where there isn't a matching record in link_stats (in which case it's NULL). -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
On your join instead of doing ID=ID do ID!=ID --Joe On Wed, Apr 18, 2001 at 09:55:05PM +0100, Simon Kimber wrote: > Hi all, > > I have written a PHP/MySQL "top-sites" program. It has two tables, > link_sites, which contains the details of all the sites signed up > (ID,url,title,description) and link_stats in which a new record is inserted > every time a visitor links in from one of those sites > (ID,siteID,clientIP,datestamp). > > Can anyone help me write a SQL query to pull out all the sites in link_sites > that are not mentioned in link_stats.. ie the ones that have never been > clicked.. > > Cheers > > Simon Kimber > Funny.co.uk - The Comedy Portal > http://www.funny.co.uk/ > > > -- > 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] /* Joe Stump * Sr. PHP Developer * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net */
Hi, I've donwloaded apache_1.3.12.src.rpm from RedHat's site and I am trying to build it. Unfortunately it keeps giving me error + adding selected modules o rewrite_module uses ConfigStart/End disabling DBM support for mod_rewrite (perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS) o db_auth_module uses ConfigStart/End Error: None of Berkeley-DB 1.x, 2.x or 3.x libraries found. Either disable mod_auth_db or provide us with the paths to the Berkeley-DB include and library files. (Hint: INCLUDES, LDFLAGS, LIBS) The "funny" things it that I do have db1, db3 and gdbm (devel also) installed. rpm -qi db1 Name : db1 Relocations: /usr Version : 1.85 Vendor: Red Hat, Inc. Release : 4 Build Date: Thu 17 Aug 2000 09:06:58 PM AMT Install date: Fri 03 Nov 2000 08:03:45 AM AMT Build Host: porky.devel.redhat.com Group : System Environment/Libraries Source RPM: db1-1.85-4.src.rpm Size : 76370 License: BSD Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> URL : http://www.sleepycat.com Summary : The BSD database library for C (version 1). ldconfig -v shows libdb1 e db3 ldconfig -v | grep db ldconfig: Path `/usr/lib' given more than once libnss_db.so.2 -> libnss_db.so.2.0.0 libnss_db.so.1 -> libnss_db.so.1.0.0 libdb-3.1.so -> libdb-3.1.so libpwdb.so.0 -> libpwdb.so.0.61.1 libthread_db.so.1 -> libthread_db-1.0.so libgdbm.so.2 -> libgdbm.so.2.0.0 libdb.so.3 -> libdb2.so.3 libdb.so.2 -> libdb1.so.2 libkdb5.so.3 -> libkdb5.so.3.0 I am using the original .spec. and a standard RH 7.0 + upgrades machine Why is this related to php ? Because I'll need to compile apache with phtreads support in order to use php+oracle. thanks. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Have a look at this: http://www.jasons.org/modssl.php You might find it usefull. Saludos... :-) On Mié 18 Abr 2001 23:18, Robert Mena wrote: > Hi, I've donwloaded apache_1.3.12.src.rpm from > RedHat's site and I am trying to build it. > > Unfortunately it keeps giving me error > > + adding selected modules > o rewrite_module uses ConfigStart/End > disabling DBM support for mod_rewrite > (perhaps you need to add -ldbm, -lndbm or -lgdbm > to EXTRA_LIBS) > o db_auth_module uses ConfigStart/End > Error: None of Berkeley-DB 1.x, 2.x or 3.x libraries > found. > Either disable mod_auth_db or provide us with > the paths > to the Berkeley-DB include and library files. > (Hint: INCLUDES, LDFLAGS, LIBS) > > The "funny" things it that I do have db1, db3 and gdbm > (devel also) installed. > > rpm -qi db1 > Name : db1 > Relocations: /usr > Version : 1.85 > Vendor: Red Hat, Inc. > Release : 4 Build > Date: Thu 17 Aug 2000 > 09:06:58 PM AMT > Install date: Fri 03 Nov 2000 08:03:45 AM AMT > Build Host: > porky.devel.redhat.com > Group : System Environment/Libraries Source > RPM: > db1-1.85-4.src.rpm > Size : 76370 > License: BSD > Packager : Red Hat, Inc. > <http://bugzilla.redhat.com/bugzilla> > URL : http://www.sleepycat.com > Summary : The BSD database library for C (version > 1). > > ldconfig -v shows > libdb1 e db3 > > ldconfig -v | grep db > ldconfig: Path `/usr/lib' given more than once > libnss_db.so.2 -> libnss_db.so.2.0.0 > libnss_db.so.1 -> libnss_db.so.1.0.0 > libdb-3.1.so -> libdb-3.1.so > libpwdb.so.0 -> libpwdb.so.0.61.1 > libthread_db.so.1 -> libthread_db-1.0.so > libgdbm.so.2 -> libgdbm.so.2.0.0 > libdb.so.3 -> libdb2.so.3 > libdb.so.2 -> libdb1.so.2 > libkdb5.so.3 -> libkdb5.so.3.0 > > I am using the original .spec. and a standard RH 7.0 + > upgrades machine > > Why is this related to php ? Because I'll need to > compile apache with phtreads support in order to use > php+oracle. > > thanks. > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ -- El mejor sistema operativo es aquel que te da de comer. Cuida tu dieta. ----------------------------------------------------------------- Martin Marques | [EMAIL PROTECTED] Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
Is there an easy way to generate generic passwords based on (combined) dictionary words? (ej: take two different words and put them together) AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. |____________________________________________________________________ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .................. . . . . Boulder, CO 80303, USA
At 02:20 PM 4/18/01 -0600, Ashley M. Kirchner wrote: > Is there an easy way to generate generic passwords based on >(combined) dictionary words? (ej: take two different words and put them >together) Would be huge, and vulnerable to dictionary attack (of course) You'd have to have a file containing all possible dictionary words, then the rest is dead easy, just do a randomized grab of two words from the pile. I've seen PHP code for pronouncable non-words, like "optogru" and "umoktin" These are far more secure. -- Dave's Engineering Page: http://www.dvanhorn.org Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
I believe there is an article on phpbuilder.com on "pronouncable passwords", which is probably what you'll want to actually do. Using real words would just be way too resource intensive. I'd give you the direct link to the article, but it seems my internet connection only works for NNTP and ftp downloads...my HTTP has broken for the moment, and I have no idea why ;( -- Plutarck Should be working on something... ...but forgot what it was. ""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is there an easy way to generate generic passwords based on > (combined) dictionary words? (ej: take two different words and put them > together) > > AMK4 > > -- > W | > | I haven't lost my mind; it's backed up on tape somewhere. > |____________________________________________________________________ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 > SysAdmin / Websmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . eFax 248.671.0909 > http://www.pcraft.com . 3550 Arapahoe Ave #6 > .................. . . . . Boulder, CO 80303, USA > > > > -- > 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] >
Random Pronounceable Password Generator This function generates random pronounceable passwords. (ie jachudru, cupheki) http://www.zend.com/codex.php?id=215&single=1 -----Original Message----- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 1:20 PM To: PHP-General List Subject: [PHP] Password Generator? Is there an easy way to generate generic passwords based on (combined) dictionary words? (ej: take two different words and put them together) AMK4
Hi all, I am a student and with little money, I am trying to find a low-cost or preferably free web host with PHP and if possible MySQL. Any suggestions would be most helpful. Regards, Corin Rathbone [EMAIL PROTECTED]
Some places to look : General web hosts : http://hosts.php.net/ Free web hosts : http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27 Other discussions : http://marc.theaimsgroup.com/?l=php-general&s=web+host Regards, Philip On Wed, 18 Apr 2001, Corin Rathbone wrote: > Hi all, > I am a student and with little money, I am trying to find a low-cost or > preferably free web host with PHP and if possible MySQL. Any suggestions > would be most helpful. > > Regards, > Corin Rathbone > [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] >
I have a bunch of pictures all in ranging filesizes and dimensions. I want to resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). i have this but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want the height to be 30. i want it to be whatever it should be so the picture doesnt look flattened. Thanks! - Noah
according to the docs use -geometry 175x175> picture.jpeg man mogrify: -geometry <width>x<height>{+-}<x offset>{+-}<y offset>{%}{!}{<}{>} preferred width and height of the image. See X(1) for details about the geometry specification. By default, the width and height are maximum values. That is, the image is expanded or contracted to fit the width and height value while maintaining the aspect ratio of the image. Append an exclamation point to the geometry to force the image size to exactly the size you specify. For example, if you specify 640x480! the image width is set to 640 pixels and height to 480. If only one factor is speci fied, both the width and height assume the value. To specify a percentage width or height instead, append %. The image size is multiplied by the width and height percentages to obtain the final image dimensions. To increase the size of an image, use a value greater than 100 (e.g. 125%). To decrease an image's size, use a percentage less than 100. Use > to change the dimensions of the image only if its size exceeds the geometry specification. < resizes the image only if its dimensions is less than the geometry specification. For example, if you specify 640x480> and the image size is 512x512, the image size does not change. However, if the image is 1024x1024, it is resized to 640x480. it looks like mogrify bases its resizing on the first value that is diff than the one supplied i.e. if your image is 200x50 it will scale it to 175x? but if it is 50x200 it will scale it to ?x175 if it is important you not resize based on height use identify to get the geometry first. morgan At 04:27 PM 4/18/2001, Noah Spitzer-Williams wrote: >I have a bunch of pictures all in ranging filesizes and dimensions. I want >to resize the ones that over 175 pixels wide to a 175 pixel wide picture >however i want the height to scale down (ie. i dont want a really thin >picture, i just want it to be what it would be if it were resized). i have >this but i cant figure out how to just scale down the width: > >c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg > >the '!' forces those sizes to be used but obvoiusly i dont want the height >to be 30. i want it to be whatever it should be so the picture doesnt look >flattened. > >Thanks! - Noah > > > >-- >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]
morgan, this is starting to work! the 175x175 does resize it to a width of 175 while retaining the aspect ratio. however.... when i tried using the less than sign, the windows nt command prompt is treating it as saving the output to a file: c:\progra~1\imagem~1\mogrify.exe -geometry 175x175> picture.jpeg imagemagick replies with : missing image file name. this is because the > sign is telling windows to save the output to a file. i tried putting a 1 after the > sign and it made a blank file with filename of '1'. how can i get around this? i couldnt figure out how to use -identify, it was not in the docs Thanks so much! - Noah "Morgan Curley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... according to the docs use -geometry 175x175> picture.jpeg man mogrify: -geometry <width>x<height>{+-}<x offset>{+-}<y offset>{%}{!}{<}{>} preferred width and height of the image. See X(1) for details about the geometry specification. By default, the width and height are maximum values. That is, the image is expanded or contracted to fit the width and height value while maintaining the aspect ratio of the image. Append an exclamation point to the geometry to force the image size to exactly the size you specify. For example, if you specify 640x480! the image width is set to 640 pixels and height to 480. If only one factor is speci fied, both the width and height assume the value. To specify a percentage width or height instead, append %. The image size is multiplied by the width and height percentages to obtain the final image dimensions. To increase the size of an image, use a value greater than 100 (e.g. 125%). To decrease an image's size, use a percentage less than 100. Use > to change the dimensions of the image only if its size exceeds the geometry specification. < resizes the image only if its dimensions is less than the geometry specification. For example, if you specify 640x480> and the image size is 512x512, the image size does not change. However, if the image is 1024x1024, it is resized to 640x480. it looks like mogrify bases its resizing on the first value that is diff than the one supplied i.e. if your image is 200x50 it will scale it to 175x? but if it is 50x200 it will scale it to ?x175 if it is important you not resize based on height use identify to get the geometry first. morgan At 04:27 PM 4/18/2001, Noah Spitzer-Williams wrote: >I have a bunch of pictures all in ranging filesizes and dimensions. I want >to resize the ones that over 175 pixels wide to a 175 pixel wide picture >however i want the height to scale down (ie. i dont want a really thin >picture, i just want it to be what it would be if it were resized). i have >this but i cant figure out how to just scale down the width: > >c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg > >the '!' forces those sizes to be used but obvoiusly i dont want the height >to be 30. i want it to be whatever it should be so the picture doesnt look >flattened. > >Thanks! - Noah > > > >-- >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]
I want to try inserting a UTF-8 string into a varchar field. I'd like to try something like cyrillic, which I know uses multiple byte characters mixed with single byte characters. Anyone know how to create binary values as an argument to insert into a field?
I don't know about "Cyrillic", but anyway, Why not just assign UTF-8 char codes to variables? (It would be nice if there is hex2bin(), though. You can use sprintf() assign sort of binary value, but it would not work well to assign multi-byte char values since it interpret as integer) I think PHP is basically multi-byte char safe. (Code like BIG5 would not work, though) I use PostgreSQL with EUC-JP for backend and client. (PostgreSQL supports UTF-8 also and you don't have to do anything special for UTF-8 as well as various EUC/Mule codes. PostgreSQL users also can rely on automatic code conversion between backend and client. For example, I can use EUC for client while backend is using UTF8.) It's possible to pass query like this to pg_exec() (You will see some garbage unless your mail client support JIS char code which is one of multi-byte char code) $text = 'PgSQL work well with ????????????'; $query =<<<EOQ INSERT INTO employee ( id, name, country, single_byte_char_and_multi_byte_char ) VALUES ( 12345, '????', '??', '$text' ); EOQ; I don't have enough experience with MySQL and multi-byte chars, but you should be able to do similar thing. All you need is database, editor and input method that supports multi-byte chars. Regards, -- Yasuo Ohgaki "Dennis Gearon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to try inserting a UTF-8 string into a varchar field. I'd like to > try something like cyrillic, which I know uses multiple byte characters > mixed with single byte characters. Anyone know how to create binary > values as an argument to insert into a field? > > -- > 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] >
My mail client converted invalid char code for the original post to '?'. Anyway, PHP works well with multi-byte chars and it works well with UTF-8/EUC at least. Not sure if PHP work well with KOI, though. This works. $value = 'ABCDabcd日本語文å—列12341234'; (This mail's char code must be UTF-8 if it's working ok, and you should be able to view some kanji if you have font) -- Yasuo Ohgaki ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message 9blmbg$k8k$[EMAIL PROTECTED]">news:9blmbg$k8k$[EMAIL PROTECTED]... > I don't know about "Cyrillic", but anyway, > > Why not just assign UTF-8 char codes to variables? > (It would be nice if there is hex2bin(), though. You can use sprintf() assign > sort of binary value, but it would not work well to assign multi-byte char > values since it interpret as integer) > > I think PHP is basically multi-byte char safe. (Code like BIG5 would not work, > though) > > I use PostgreSQL with EUC-JP for backend and client. > (PostgreSQL supports UTF-8 also and you don't have to do anything special for > UTF-8 as well as various EUC/Mule codes. PostgreSQL users also can rely on > automatic code conversion between backend and client. For example, I can use EUC > for client while backend is using UTF8.) > > It's possible to pass query like this to pg_exec() > (You will see some garbage unless your mail client support JIS char code which > is one of multi-byte char code) > > $text = 'PgSQL work well with ????????????'; > $query =<<<EOQ > INSERT INTO employee ( > id, > name, > country, > single_byte_char_and_multi_byte_char > ) VALUES ( > 12345, > '????', > '??', > '$text' > ); > EOQ; > > > I don't have enough experience with MySQL and multi-byte chars, but you should > be able to do similar thing. > > All you need is database, editor and input method that supports multi-byte > chars. > > Regards, > -- > Yasuo Ohgaki > > > "Dennis Gearon" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I want to try inserting a UTF-8 string into a varchar field. I'd like to > > try something like cyrillic, which I know uses multiple byte characters > > mixed with single byte characters. Anyone know how to create binary > > values as an argument to insert into a field? > > > > -- > > 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] >
Is there any function in PHP that I could use to know the number of the ASCII table of letter "A" for example? something like: $tmp=function_name("A"); $tmp==99 ("A" is 99 in ASCII table). regards, Augusto
"Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote: > Is there any function in PHP that I could use to know the number of the > ASCII table of letter "A" for example? It's chr() or ord(). I don't recall which (one is the inverse of the other) so check the online manual. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
You can use $temp = ord("A"); And you will then see that it's 65 end not 99 :-) - Frank > Is there any function in PHP that I could use to know the number of the > ASCII table of letter "A" for example? > > > something like: $tmp=function_name("A"); > > $tmp==99 ("A" is 99 in ASCII table). > > regards, > > Augusto > > > -- > 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] > > >
how can i separate the digits in a Double number? for example: if i have 3.2 i would like to separate the digits into 3 and 2 and assign each to its own variable, like so numb1 = 3 numb2 = 2 thanks. jason
"Jason Caldwell" <[EMAIL PROTECTED]> wrote: > how can i separate the digits in a Double number? > > for example: > > if i have 3.2 i would like to separate the digits into 3 and 2 and assign > each to its own variable, like so > > numb1 = 3 > numb2 = 2 Use explode() to explode on the "." and save into an array. Key 0 will be the integer and key 1 will be the decimal component (without the "."). Or if you don't like that use floor() to round it down to next lowest integer and save that as $integer and then subtract it from the original value to get the decimal component and use substr() to return everything, but the first character. Clearly, the first method is cleaner, but I posed the second option (which I'd never use) just to demonstrate there are plenty of solutions for most situations. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
Take a look here: http://www.php.net/manual/en/ref.math.php regards, Augusto On Wed, 18 Apr 2001, Jason Caldwell wrote: > how can i separate the digits in a Double number? > > for example: > > if i have 3.2 i would like to separate the digits into 3 and 2 and assign > each to its own variable, like so > > numb1 = 3 > numb2 = 2 > > thanks. > jason > > > > > -- > 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] >
There are prolly a few ways to do it, using split() may be easiest. Jason Caldwell wrote: > > how can i separate the digits in a Double number? > > for example: > > if i have 3.2 i would like to separate the digits into 3 and 2 and assign > each to its own variable, like so > > numb1 = 3 > numb2 = 2 > > thanks. > jason > > -- > 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] -- Larry Hotchkiss Universal Capital 612-551-9309 http://www.unicap.com/
>oops. The expression should read '/\[([^\]]+)\]/' Thanks all, i used this code and it works: preg_match("/\[(.+)\]/",$msg_array[$i],$segments); $title = trim($segments[1]); $description = ereg_replace("\[ $title \]", "", $msg_array[$i]); Does anyone know a good regex tutorial? I'll probably bump into it again. Regex'es seem to be very usefull. Regards, Jeroen Geusebroek
LinuxSA http://www.linuxsa.org.au/ meeting a couple of days ago was on regex, some notes are at; http://www.fornax.net/regex2/ or part 1 at; http://www.fornax.net/regex/ HTH Andrew Braund > -----Original Message----- > From: Jeroen Geusebroek [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 19 April 2001 06:25 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Regular Expression > > > > >oops. The expression should read '/\[([^\]]+)\]/' > > Thanks all, i used this code and it works: > > preg_match("/\[(.+)\]/",$msg_array[$i],$segments); > $title = trim($segments[1]); > $description = ereg_replace("\[ $title \]", "", > $msg_array[$i]); > > Does anyone know a good regex tutorial? I'll probably bump > into it again. > Regex'es seem to be very usefull. > > Regards, > > Jeroen Geusebroek
On Jue 19 Abr 2001 00:23, Andrew Braund wrote: > LinuxSA http://www.linuxsa.org.au/ meeting a couple of days ago was > on regex, some notes are at; > http://www.fornax.net/regex2/ > or part 1 at; > http://www.fornax.net/regex/ Isn't there a place with printable versions? Saludos... :-) -- El mejor sistema operativo es aquel que te da de comer. Cuida tu dieta. ----------------------------------------------------------------- Martin Marques | [EMAIL PROTECTED] Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
I have a valid XML file that all I want to do is assign to variables the data in the elements <title> and <fulltext>. I know nothing about XML and am not a programmer. Are there any good tutorials out there to do something as simple as what I'm looking for? Will expat do what I'm looking for? I think that I installed PHP properly for XML support. Is there a way to verify this? Thanks, Mark _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
I wrote an article for PHPBuilder.com - I would start there - I made it as easy as possible. --Joe On Wed, Apr 18, 2001 at 04:58:28PM -0400, Mark Bean wrote: > I have a valid XML file that all I want to do is assign to variables the > data in the elements <title> and <fulltext>. I know nothing about XML and > am not a programmer. Are there any good tutorials out there to do something > as simple as what I'm looking for? Will expat do what I'm looking for? I > think that I installed PHP properly for XML support. Is there a way to > verify this? > > Thanks, > Mark > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.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] /* Joe Stump * Sr. PHP Developer * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net */
Hello, Mark Bean wrote: > > I have a valid XML file that all I want to do is assign to variables the > data in the elements <title> and <fulltext>. I know nothing about XML and > am not a programmer. Are there any good tutorials out there to do something > as simple as what I'm looking for? Will expat do what I'm looking for? I > think that I installed PHP properly for XML support. Is there a way to > verify this? You may want to try this XML generic parser class. What it does is to build an associative array of XML elements that you may traverse and assign the variables when you find the relevant XML tags. http://phpclasses.UpperDesign.com/browse.html/package/4 Manuel Lemos
With magic_quotes_sybase = on, a single quote in Get/Post/Cookie data gets escaped with another single quote. Is there a function analagous to stripslashes that will strip off the escaping quote? TIA Kirk
stripslashes() sees the magic_quotes_sybase setting and behaves accordingly. -Rasmus On Wed, 18 Apr 2001, Johnson, Kirk wrote: > With magic_quotes_sybase = on, a single quote in Get/Post/Cookie data gets > escaped with another single quote. Is there a function analagous to > stripslashes that will strip off the escaping quote? > > TIA > > Kirk > > -- > 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] >
On Wed, Apr 18, 2001 at 02:37:00PM -0000, SED wrote: > Hi, > > Recently I noticed e-mails on this list about Imlib2 and GD2 extensions > which I was not aware of. So I started to wander if there are more > extensions working with PHP which allows graphic process (the only one I > knew was GD). Is it? If so, is it possible to use these extensions on all > platforms (which PHP supports) and with all web servers? I'm not aware of other graphics-related extensions, but two other common ways of processing images with PHP are to shell out to ImageMagick or NetPBM. As you look through the various PHP code repositories out there, you'll probably notice a fair number of scripts that use one of these two apps. As for portability, PHP extensions can require certain platforms to work. Unfortunately Imlib2 falls into this category, because it doesn't (And almost certainly never will) support Windows. Matt
Hello generals, I work since version 3.0.3 with PHP and had until today no problems with it. In this week, three Interpreter have adjusted her service to three same computers, with Win98 and OmniHTTPd, one after the other. I have tested all versions of PHP4, no one works more, also the newest not. Then I have replaced PHP4 with PHP3 and all problems were missing. This participates no lasting solution however since many Scriptes use the advantages of PHP4 which now works no longer. To the better understanding, I have a protocol-departure and the php.ini attached. It will be very happy me, if can be helped me. Therefore thank you in advance. With very hopeful greetings Norbert Pfeiffer _________________________ tel +49-(0)2292-681769 mobil +49-(0)177-2363368 ------------------------- e.o.m.
Hello!! I am using php4-cvs on Linux Suse 6.4. I issued the command ./buildconf and got a message: pablo@pablito:~/php4 > ./buildconf buildconf: checking installation... buildconf: autoconf version 2.13 (ok) buildconf: automake version 1.4 (ok) buildconf: libtool version 1.3.5 (ok) WARNING: automake and libtool are installed in different directories. This may cause aclocal to fail. continuing anyway aclocal: configure.in: 810: macro `AM_PROG_LIBTOOL' not found in library make[1]: *** [aclocal.m4] Error 1 make: *** [all] Error 2 pablo@pablito:~/php4 > pablo@pablito:~/php4 > whereis libtool libtool: /usr/bin/libtool /usr/local/bin/libtool /usr/share/libtool pablo@pablito:~/php4 > whereis automake automake: /usr/bin/automake /usr/share/automake pablo@pablito:~/php4 > whereis automake automake: /usr/bin/automake /usr/share/automake pablo@pablito:~/php4 > I installed libtool-1.3.5. Help me, please!! Pablo Sabatino..
Do a 'which libtool' and I'd hazard a guess that it'll find the one in /usr/local/bin first. As it's using that libtool (dir: /usr/local/bin) and your normal automake (dir: /usr/bin), the dirs don't match and aclocal fails, as the warning mentions. Either switch your path around to move /usr/local/bin after /usr/bin (and end up using the libtool your system came with), or reconfigure and reinstall libtool 1.3.5 starting with "./configure --prefix=/usr" which will cause it to install into /usr/bin, /usr/share, etc. (otherwise it defaults to /usr/local which is likely the problem you have right now). Pablo Sabatino wrote: > > Hello!! > I am using php4-cvs on Linux Suse 6.4. > I issued the command ./buildconf and got a message: > > pablo@pablito:~/php4 > ./buildconf > buildconf: checking installation... > buildconf: autoconf version 2.13 (ok) > buildconf: automake version 1.4 (ok) > buildconf: libtool version 1.3.5 (ok) > > > WARNING: automake and libtool are installed in different > directories. This may cause aclocal to fail. > continuing anyway > aclocal: configure.in: 810: macro `AM_PROG_LIBTOOL' not found in library > make[1]: *** [aclocal.m4] Error 1 > make: *** [all] Error 2 > pablo@pablito:~/php4 > > > pablo@pablito:~/php4 > whereis libtool > libtool: /usr/bin/libtool /usr/local/bin/libtool /usr/share/libtool > pablo@pablito:~/php4 > whereis automake > automake: /usr/bin/automake /usr/share/automake > pablo@pablito:~/php4 > whereis automake > automake: /usr/bin/automake /usr/share/automake > pablo@pablito:~/php4 > > > I installed libtool-1.3.5. > Help me, please!! > Pablo Sabatino.. -- - Kelly Cochran <[EMAIL PROTECTED]> Technical Staff - funschool.com Corporation
I know how to add data to one table but how do I add data to three tables from one form? I want to do this with just one form and on one web page so it doesn't post to another page. How do I set up the insert statement? $query = "INSERT INTO $table VALUES ('$menu_id', '$server', '$menunumber', '$menuname')"; $result = mysql_db_query($dbname, $query); <form enctype="multipart/form-data" method="post" action="<?php echo $PHP_SELF ?>"> Anyting special I have to do with the form submit? <INPUT type="submit" name="submenu" value="submenu"> <INPUT type=reset value="Reset">
"Fates" <[EMAIL PROTECTED]> wrote: > I know how to add data to one table but how do I add data to three > tables from one form? > > I want to do this with just one form and on one web page so it doesn't > post to another page. > > How do I set up the insert statement? > > $query = "INSERT INTO $table VALUES ('$menu_id', '$server', > '$menunumber', '$menuname')"; > > $result = mysql_db_query($dbname, $query); Add two more sets of statements like those you have for the first query. That's it. There's nothing special to do. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
> Add two more sets of statements like those you have for the > first query. That's it. There's nothing special to do. MySQL also lets you stack insert statements: $sql="INSERT INTO t1 ('A'); INSERT INTO t2 ('B'); INSERT INTO t3 ('C');" This would work (but if you get an error, you'll have trouble debugging it. It'll also save minutely on execution since it only needs to call mysql_query once instead of three times. I prefer to use three explicit statements and query calls. Jason
I know there is a way to do it in Perl, but is there anyway in PHP to display all of the global variables. Such as OS, browser, date/time, that sort of thing I know I could print each one seperately, but are they all stored in an array somewhere?
> I know there is a way to do it in Perl, but is there anyway > in PHP to display all of the global variables. Such as OS, > browser, date/time, that sort of thing > > I know I could print each one seperately, but are they all > stored in an array somewhere? <? phpInfo(); ?> That should show you everything...
Have a look at the enormous $GLOBALS array, something like : <pre> <?php var_dump($GLOBALS) ?> </pre> As previously mentioned, phpinfo() provides some pretty information and it may be more what you want. Regarding $GLOBALS, (as quoted from the manual) : "The $GLOBALS array is an associative array with the name of the global variable being the key and the contents of that variable being the value of the array element." Also, be sure to look around here : http://www.php.net/manual/en/language.variables.predefined.php regards, philip On Wed, 18 Apr 2001, JCampbell wrote: > I know there is a way to do it in Perl, but is there anyway in PHP to > display all of the global variables. Such as OS, browser, date/time, > that sort of thing > > I know I could print each one seperately, but are they all stored in > an array somewhere? >
At 1:16 AM +0000 4/19/01, Philip Olson wrote: > <pre> > <?php var_dump($GLOBALS) ?> > </pre> don't do that, at least I think it will recursively traverse the $GLOBALS arrary (since $GLOBALS itself is $GLOBAL) and you will never end. -aaron
> At 1:16 AM +0000 4/19/01, Philip Olson wrote: > > <pre> > > <?php var_dump($GLOBALS) ?> > > </pre> > > don't do that, at least I think it will recursively traverse the > $GLOBALS arrary (since $GLOBALS itself is $GLOBAL) and you will never > end. This is true with print_r($GLOBALS) up until 4.0.4 where it was fixed, which is why I used var_dump in the example although print_r is much prettier :-) regards, Philip
Is there maybe somethign in php.ini or in the php compile that has to be enabled, that I'm not find/cluing into? On Wed, 18 Apr 2001, The Hermit Hacker wrote: > > I've read through: > > http://php.net/manual/pt_BR/features.file-upload.put-method.php > > I added: > > Script PUT /put.php > > to my apache config file ... everything as far as Netscape Composer is > concerned looks right, but it isn't working. > > I changed my put.php script so that it output all ENV variables to a log > file: > > =========== > <? > $fp = fopen("/tmp/log.txt","w+"); > $temp="PHP_PUT_FILENAME: $PHP_UPLOADED_FILE_NAME\n"; > $vars = get_defined_vars(); > foreach ($vars as $test => $value) { > if (is_array($value)) { > foreach ($value as $subtest => $subvalue) { > $temp .= "$subtest: $subvalue\n"; > } > } else { > $temp .= "$test: $value\n"; > } > } > fwrite($fp, $temp); > $temp="DOCUMENT_ROOT: $DOCUMENT_ROOT\n"; > fwrite($fp, $temp); > $temp="REQUEST_URI: $REQUEST_URI\n"; > fwrite($fp, $temp); > fclose($fp); > ?> > ============ > > But PHP_PUT_FILENAME isn't being set: > > ======================= > hub# grep PUT update/log.txt > PHP_PUT_FILENAME: > REQUEST_METHOD: PUT > REQUEST_METHOD: PUT > temp: PHP_PUT_FILENAME: > hub# grep FILE update/log.txt > PHP_PUT_FILENAME: > SCRIPT_FILENAME: /home/vhosts/farelist.com/www/put.php > SCRIPT_FILENAME: /home/vhosts/farelist.com/www/put.php > temp: PHP_PUT_FILENAME: > hub# grep ^PHP update/log.txt > PHP_PUT_FILENAME: > PHP_SELF: /put.php/test/Untitled.htm2 > PHP_SELF: /put.php/test/Untitled.htm2 > ====================== > > Am I missing something obvious here? > > Thanks ... > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy > Systems Administrator @ hub.org > primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.org > > > -- > 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] > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.org
Chris Apologise for sending you message directly, just one last thing about what I have tried to to do, basically after I got list of string from HTTP_POST_VAR, it will be like 12154, how do I make it to be 1,2,1,5,4 so that I can put that in variable to put it in query? I tried connect it like this "val" . ", " ; and it returns 1,2,1,5,4, instead of 1,2,1,5,4 and it screw up query. Thank again for this help, I am pretty sure this will be last question about this :-) Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Chris Fry <[EMAIL PROTECTED]> To: Jacky@lilst <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 5:59 PM Subject: Re: thank you very much > Jacky, > > Happy to help - I went through a lot of pain myself the first time I tried to do > something like this! > > Regards > > Chris > > "Jacky@lilst" wrote: > > > Chris > > Nothing but thank you very much, I managed to got the value of the ID list > > out according to your advice now. > > cheers > > Jack > > [EMAIL PROTECTED] > > "There is nothing more rewarding than reaching the goal you set for > > yourself" > > ----- Original Message ----- > > From: Chris Fry <[EMAIL PROTECTED]> > > To: Jacky@lilst <[EMAIL PROTECTED]> > > Sent: Wednesday, April 18, 2001 4:52 AM > > Subject: Re: what about the include files in your example? > > > > > Jacky, > > > > > > You don't need the include files - they are a style sheet and some table > > > definitions for my db. > > > > > > Just remove the includes and substitute your database stuff for mine. > > > > > > Regards > > > > > > Chris > > > > > > > > > "Jacky@lilst" wrote: > > > > > > > What about those include file in your example? what do I have to do with > > > > them? > > > > Jack > > > > [EMAIL PROTECTED] > > > > "There is nothing more rewarding than reaching the goal you set for > > > > yourself" > > > > ----- Original Message ----- > > > > From: Chris Fry <[EMAIL PROTECTED]> > > > > To: Jacky <[EMAIL PROTECTED]> > > > > Sent: Wednesday, April 18, 2001 4:43 AM > > > > Subject: Re: [PHP] Variable variable > > > > > > > > > Sorry - fogot the url: it's getting late! > > > > > > > > > > http://sis.quillsoft.com.au/checkboxtest.php > > > > > > > > > > Chris > > > > > > > > > > Jacky wrote: > > > > > > > > > > > Hi all > > > > > > I have a form with check box and name of those checkboxes is usuing > > > > variable lke this, > > > > > > > > > > > > <!-- I got the value $id from a table and looping them and assign > > them > > > > to the check box name--> > > > > > > <input type="checkbox" name ="$id" value="on"> > > > > > > > > > > > > and when I submit the form to page foo.php4, at that page, I use > > > > Variable variable to call the value of the check box to see if it > > checked > > > > like this > > > > > > > > > > > > $quey = "select id from table"; > > > > > > $result = ...... ( assumeing it is done and i got value for $id for > > all > > > > records from table) > > > > > > > > > > > > if ($$id =="on"){ > > > > > > echo "on"; > > > > > > }else{ > > > > > > echo "off"; > > > > > > } > > > > > > > > > > > > It always returns echo "off", why is that? > > > > > > cheers > > > > > > Jack > > > > > > [EMAIL PROTECTED] > > > > > > "There is nothing more rewarding than reaching the goal you set for > > > > yourself" > > > > > > > > > > -- > > > > > Chris Fry > > > > > Quillsoft Pty Ltd > > > > > Specialists in Secure Internet Services and E-Commerce Solutions > > > > > 10 Gray Street > > > > > Kogarah > > > > > NSW 2217 > > > > > Australia > > > > > > > > > > Phone: +61 2 9553 1691 > > > > > Fax: +61 2 9553 1692 > > > > > Mobile: 0419 414 323 > > > > > eMail: [EMAIL PROTECTED] > > > > > http://www.quillsoft.com.au > > > > > > > > > > You can download our Public CA Certificate from:- > > > > > https://ca.secureanywhere.com/htdocs/cacert.crt > > > > > > > > > > ********************************************************************** > > > > > > > > > > This information contains confidential information intended only for > > > > > the use of the authorised recipient. If you are not an authorised > > > > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return > > > > > e-mail. > > > > > In this case, you should not read, print, re-transmit, store or act > > > > > in reliance on this e-mail or any attachments, and should destroy all > > > > > copies of them. > > > > > This e-mail and any attachments may also contain copyright material > > > > > belonging to Quillsoft Pty Ltd. > > > > > The views expressed in this e-mail or attachments are the views of > > > > > the author and not the views of Quillsoft Pty Ltd. > > > > > You should only deal with the material contained in this e-mail if > > > > > you are authorised to do so. > > > > > > > > > > This notice should not be removed. > > > > > > > > > > > > > > > > > > > > > -- > > > Chris Fry > > > Quillsoft Pty Ltd > > > Specialists in Secure Internet Services and E-Commerce Solutions > > > 10 Gray Street > > > Kogarah > > > NSW 2217 > > > Australia > > > > > > Phone: +61 2 9553 1691 > > > Fax: +61 2 9553 1692 > > > Mobile: 0419 414 323 > > > eMail: [EMAIL PROTECTED] > > > http://www.quillsoft.com.au > > > > > > You can download our Public CA Certificate from:- > > > https://ca.secureanywhere.com/htdocs/cacert.crt > > > > > > ********************************************************************** > > > > > > This information contains confidential information intended only for > > > the use of the authorised recipient. If you are not an authorised > > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return > > > e-mail. > > > In this case, you should not read, print, re-transmit, store or act > > > in reliance on this e-mail or any attachments, and should destroy all > > > copies of them. > > > This e-mail and any attachments may also contain copyright material > > > belonging to Quillsoft Pty Ltd. > > > The views expressed in this e-mail or attachments are the views of > > > the author and not the views of Quillsoft Pty Ltd. > > > You should only deal with the material contained in this e-mail if > > > you are authorised to do so. > > > > > > This notice should not be removed. > > > > > > > > > > > -- > Chris Fry > Quillsoft Pty Ltd > Specialists in Secure Internet Services and E-Commerce Solutions > 10 Gray Street > Kogarah > NSW 2217 > Australia > > Phone: +61 2 9553 1691 > Fax: +61 2 9553 1692 > Mobile: 0419 414 323 > eMail: [EMAIL PROTECTED] > http://www.quillsoft.com.au > > You can download our Public CA Certificate from:- > https://ca.secureanywhere.com/htdocs/cacert.crt > > ********************************************************************** > > This information contains confidential information intended only for > the use of the authorised recipient. If you are not an authorised > recipient of this e-mail, please contact Quillsoft Pty Ltd by return > e-mail. > In this case, you should not read, print, re-transmit, store or act > in reliance on this e-mail or any attachments, and should destroy all > copies of them. > This e-mail and any attachments may also contain copyright material > belonging to Quillsoft Pty Ltd. > The views expressed in this e-mail or attachments are the views of > the author and not the views of Quillsoft Pty Ltd. > You should only deal with the material contained in this e-mail if > you are authorised to do so. > > This notice should not be removed. > > >
I've got PHP up and running partially under Apache 2.0 quite some time ago, however despite the sweetness of Apache 2, this is probably not something you want to do. Looking forward to PHP coming out more fully for Apache 2.0, if there is anything we can do to help it along I'm all ears. August ----- Original Message ----- From: "Alexander Wagner" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Saturday, April 14, 2001 11:07 AM Subject: Re: [PHP] PHP for Apache 2.0 > Patrick Dunford wrote: > > According to Apache, modules made for Apache 1.3 will not work as-is > > in 2.0 due to changes in the API. > > > > Is a version of PHP 4 for Apache 2.0 coming out? > > Try the configure-option --with-apxs2 instead of --with-apxs and it > should work with Apache 2. > > PHP 4 supports far more than one Webserver-API. > > regards > Wagner > > -- > 'When the computer industry is at a low, beer drinking is at a high.' > Jon 'maddog' Hall said. > By combining both industries into a single course you can make sure you > always have a job. > > -- > 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] >
I'm setting up an html "shell" for my webpage that I include with my php code so I don't have to see html crap and whatnot. I'm wondering what the best way is to insert the html "shell" into my code? Should I just echo the file, should I include(), require(), include_once(), or require_once()?? One section of the shell, which is in a separate file, is an html form - would that change the way I include that particular section of html? Thanks.
Hello, I need to know if there is a program out there that I can use to edit the PHP files. I use CuteFTP to download the files from my server as I need to change some wording around from time to time. Does anyone know the correct procedure for downloading a php file with CuteFTP and then a program that I can use to edit the text I need to edit. Then also, the correct way to upload it back to the server using CuteFTP. Do I use Binary or ACII. Or, if I am way off and there is a program that makes CuteFTP look silly, please let me know this also. I am open for any suggestions, as long as they are detailed. Please email responses to [EMAIL PROTECTED] . Thank you!
> I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. PHP files (unless optimised by Zend or something) are just plain text files. You can use either Binary or ASCII mode to up/download them, and your text editor of choice (Notepad, PFM, HomeSite, or for the masochists, MS Word :)) to edit them and save them. Jason
PHP files are text files, thus you can use any text editor to make your changes. On Windows, the simplest way would be to use notepad or wordpad to edit and save your changes. On other platforms like unix/linux you could use pico, vi, or emacs to name a few. If you have telnet access to the server, it'd be easier to just code your changes on the server, bypassing the need for ftp'ing. To download a file, do the same as you would with any other file. In CuteFTP you can drag the file from the server window to your desktop (or wherver your default save location is) and save it there. Then, when you upload, since its text, you don't need to set it to binary. I use CuteFTP for uploading and downloading files, but when coding anything, I find it easier to just telnet in and use pico (now I submit to flames from BOTH the vi and emacs lovers =P ) best of luck, jack -----Original Message----- From: Tony Daniels [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 11:18 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie Help!! Please Look! Hello, I need to know if there is a program out there that I can use to edit the PHP files. I use CuteFTP to download the files from my server as I need to change some wording around from time to time. Does anyone know the correct procedure for downloading a php file with CuteFTP and then a program that I can use to edit the text I need to edit. Then also, the correct way to upload it back to the server using CuteFTP. Do I use Binary or ACII. Or, if I am way off and there is a program that makes CuteFTP look silly, please let me know this also. I am open for any suggestions, as long as they are detailed. Please email responses to [EMAIL PROTECTED] . Thank 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]
I used notepad and it shows some weird symbols like darkened in squares. That is why I was wondering if there was a specific program. Is there any way to get rid of the squares? Thank for your help. Jason Murray wrote: > > I need to know if there is a program out there that I can use to edit > > the PHP files. I use CuteFTP to download the files from my server as I > > need to change some wording around from time to time. Does anyone know > > the correct procedure for downloading a php file with CuteFTP and then a > > program that I can use to edit the text I need to edit. Then also, the > > correct way to upload it back to the server using CuteFTP. Do I use > > Binary or ACII. > > PHP files (unless optimised by Zend or something) are just plain text > files. You can use either Binary or ASCII mode to up/download them, and > your text editor of choice (Notepad, PFM, HomeSite, or for the masochists, > MS Word :)) to edit them and save them. > > Jason > > -- > 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]
I wish I knew how to use Telnet. Maybe I'll search and learn. Thank you for your help! Jack Dempsey wrote: > PHP files are text files, thus you can use any text editor to make your > changes. On Windows, the simplest way would be to use notepad or wordpad to > edit and save your changes. On other platforms like unix/linux you could use > pico, vi, or emacs to name a few. > If you have telnet access to the server, it'd be easier to just code your > changes on the server, bypassing the need for ftp'ing. > To download a file, do the same as you would with any other file. In CuteFTP > you can drag the file from the server window to your desktop (or wherver > your default save location is) and save it there. Then, when you upload, > since its text, you don't need to set it to binary. > I use CuteFTP for uploading and downloading files, but when coding anything, > I find it easier to just telnet in and use pico (now I submit to flames from > BOTH the vi and emacs lovers =P ) > > best of luck, > jack > > -----Original Message----- > From: Tony Daniels [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 11:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Newbie Help!! Please Look! > > Hello, > > I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. > > Or, if I am way off and there is a program that makes CuteFTP look > silly, please let me know this also. I am open for any suggestions, as > long as they are detailed. Please email responses to [EMAIL PROTECTED] > . > > Thank 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 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]
> -----Original Message----- > From: Tony Daniels [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 8:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Newbie Help!! Please Look! > > > Hello, > > I need to know if there is a program out there that I can use to edit > the PHP files. Any text editor. Example: Notepad. > I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. 1) Download the php file just like you would a html file. 2) Edit the file using a text editor. > Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. Neither. You use ASCII. > > Or, if I am way off and there is a program that makes CuteFTP look > silly, please let me know this also. I don't think so, though funny is a relative word. I use WS_FTP. > I am open for any suggestions, as > long as they are detailed. Please email responses to [EMAIL PROTECTED] You mean to reply to the PHP Mailing list, right? > . > > Thank you! Your welcome.
> I used notepad and it shows some weird symbols like darkened > in squares. That is why I was wondering if there was a specific > program. Is there any way to get rid of the squares? The squares are characters Notepad doesn't recognise. If you see them in anything, not just PHP files, open it in WordPad. Me, I use HomeSite. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
Ah, that helps tons. Thank you!! Jason Murray wrote: > > I used notepad and it shows some weird symbols like darkened > > in squares. That is why I was wondering if there was a specific > > program. Is there any way to get rid of the squares? > > The squares are characters Notepad doesn't recognise. > > If you see them in anything, not just PHP files, open it in WordPad. > > Me, I use HomeSite. > > Jason > > -- > Jason Murray > [EMAIL PROTECTED] > Web Design Team, Melbourne IT > Fetch the comfy chair! > > -- > 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]
its not so much learning "telnet" as learning unix or linux...but as far as editing text files, its easy...here're some basic commands to get you started: telnet www.yourhost.com login: <enter it> password: <enter it> prompt$ pico yourfile.php i find pico to be the quickest and easiest (and probably the "weakest") of the text editors on *nix systems...start with it and progress if you want... you can use the arrow keys as you'd expect...edit your file then hit control-x, y, return to save and quit from your file and pico...at any time you can also use ctrl-o to save your progress without quitting... the squares in notepad were a result of you taking a file from a *nix system....try opening it with wordpad, and you should be fine... -jack -----Original Message----- From: Tony Daniels [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 11:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Newbie Help!! Please Look! I wish I knew how to use Telnet. Maybe I'll search and learn. Thank you for your help! Jack Dempsey wrote: > PHP files are text files, thus you can use any text editor to make your > changes. On Windows, the simplest way would be to use notepad or wordpad to > edit and save your changes. On other platforms like unix/linux you could use > pico, vi, or emacs to name a few. > If you have telnet access to the server, it'd be easier to just code your > changes on the server, bypassing the need for ftp'ing. > To download a file, do the same as you would with any other file. In CuteFTP > you can drag the file from the server window to your desktop (or wherver > your default save location is) and save it there. Then, when you upload, > since its text, you don't need to set it to binary. > I use CuteFTP for uploading and downloading files, but when coding anything, > I find it easier to just telnet in and use pico (now I submit to flames from > BOTH the vi and emacs lovers =P ) > > best of luck, > jack > > -----Original Message----- > From: Tony Daniels [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 11:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Newbie Help!! Please Look! > > Hello, > > I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. > > Or, if I am way off and there is a program that makes CuteFTP look > silly, please let me know this also. I am open for any suggestions, as > long as they are detailed. Please email responses to [EMAIL PROTECTED] > . > > Thank 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 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]
Hi Tony, @ 11:24:30 PM on 4/18/2001, Tony Daniels wrote: > I used notepad and it shows some weird symbols like darkened in > squares. That is why I was wondering if there was a specific > program. Is there any way to get rid of the squares? Those are 'end of line characters' that your Operating System doesn't understand. You'll probably see that if you're editing files that were created on Linux or Unix. Likewise, if you edit the files on a PC then upload them in your native format, to Unix or Linux they're going to end up having ^M's at the end of each line. Your best bet is to grab a fairly decent Programmer's Editor that can tell the difference and (re)act accordingly. Some good ones that come to mind are EditPlus (I've used it) or TextPad (I prefer it). You can find others in quite a long list here: <http://www.itworks.demon.co.uk/phpeditors.htm> -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.
right up my alley... I use cuteftp, and it usually does all this stuff for you. all you have to do is right click on the file you want to edit, and it opens it up in notepad, or the editor you choose. just make sure you save the file before you close it. after that cuteftp will have a window that says "upload" or "cancel".. choose upload. if you wish to change the editor, just go to edit>settings in cuteftp, and find the text that says "helper applications" in the window that pops up. click that, and you can choose your program. ----- Original Message ----- From: "Tony Daniels" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:18 PM Subject: [PHP] Newbie Help!! Please Look! > Hello, > > I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. > > Or, if I am way off and there is a program that makes CuteFTP look > silly, please let me know this also. I am open for any suggestions, as > long as they are detailed. Please email responses to [EMAIL PROTECTED] > . > > Thank 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]
forgot to mention that ascii/binary is auto in cuteftp ----- Original Message ----- From: "chris herring" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 1:51 AM Subject: Re: [PHP] Newbie Help!! Please Look! > right up my alley... I use cuteftp, and it usually does all this stuff for > you. all you have to do is right click on the file you want to edit, and it > opens it up in notepad, or the editor you choose. just make sure you save > the file before you close it. after that cuteftp will have a window that > says "upload" or "cancel".. choose upload. if you wish to change the editor, > just go to edit>settings in cuteftp, and find the text that says "helper > applications" in the window that pops up. click that, and you can choose > your program. > ----- Original Message ----- > From: "Tony Daniels" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, April 18, 2001 10:18 PM > Subject: [PHP] Newbie Help!! Please Look! > > > > Hello, > > > > I need to know if there is a program out there that I can use to edit > > the PHP files. I use CuteFTP to download the files from my server as I > > need to change some wording around from time to time. Does anyone know > > the correct procedure for downloading a php file with CuteFTP and then a > > program that I can use to edit the text I need to edit. Then also, the > > correct way to upload it back to the server using CuteFTP. Do I use > > Binary or ACII. > > > > Or, if I am way off and there is a program that makes CuteFTP look > > silly, please let me know this also. I am open for any suggestions, as > > long as they are detailed. Please email responses to [EMAIL PROTECTED] > > . > > > > Thank 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 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]
Thanks Everyone!! That was quick and painless! Tony Daniels wrote: > Hello, > > I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > program that I can use to edit the text I need to edit. Then also, the > correct way to upload it back to the server using CuteFTP. Do I use > Binary or ACII. > > Or, if I am way off and there is a program that makes CuteFTP look > silly, please let me know this also. I am open for any suggestions, as > long as they are detailed. Please email responses to [EMAIL PROTECTED] > . > > Thank 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]
hello guys... On one of our websites, where we use sessions, a funny error have happened. <err> Warning: open(/tmp/sess_b5ad1e0878dee63fa8a780df44af3ea7, O_RDWR) failed: File exists (17) in page.japaninc.inc on line 109 </err> The funny side of it is that no one has ever seen it except our manager (what a luck) from his PC only. I guess, we developers, visit our art-work much more often than our manager... She's seen it twice already, first time was a month-two ago and now again. I ignored it the first time, I though - well, happens... But now I start to think it is a bit weird (and dangerous for carrier). Any of you have any idea why this "rare" error keeps happening on her browser and NEVER on any of developer's? (nor even any other employee of our 200> company ever complained)... What to fix? Sincerely, Maxim Maletsky Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 [EMAIL PROTECTED] www.j-door.com www.japaninc.net www.lincmedia.co.jp
Hello, Thank you for the quick help on the apparant easy question. Here is another easy one. Here is a portion of the code of one of my files. $recipient = $email; $headers = "From: Sirplus.tv <[EMAIL PROTECTED]>\n"; $headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; This grabs the email address out of MySql and send them the email that would be following. However, I want a copy to go to me as well. What line of code to I input. Thanks in advance.
> $recipient = $email; > $headers = "From: Sirplus.tv <[EMAIL PROTECTED]>\n"; > $headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; > > This grabs the email address out of MySql and send them the email that > would be following. However, I want a copy to go to me as well. What > line of code to I input. $headers .= "Bcc: [EMAIL PROTECTED]\n"; This will set a Bcc header, so you'll see the mail, but the recipient won't know it. Jason
Thanks once again!! Jason Murray wrote: > > $recipient = $email; > > $headers = "From: Sirplus.tv <[EMAIL PROTECTED]>\n"; > > $headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; > > > > This grabs the email address out of MySql and send them the email that > > would be following. However, I want a copy to go to me as well. What > > line of code to I input. > > $headers .= "Bcc: [EMAIL PROTECTED]\n"; > > This will set a Bcc header, so you'll see the mail, but the recipient > won't know it. > > Jason > > -- > 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]
As the title say, I would like to make a special thanks to one of our member Chris Fry and to say this is great list!! Thank for all help :-) Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
I'm having a problem with HTMLspecialchars and nl2br interfearing with each other. Obviously, I'm trying to stop malicous HTML/scripts from being entered into my guestbook, but I'm also trying to add spacing. nl2br adds <br>, but HTMLspecialchars tells it to not show that. Anyways, I'm sure there is a way around this. All help is welcome, so I'm eager for replys. Thank you very, very much! -Owen
On Thu, 19 Apr 2001 14:36, [EMAIL PROTECTED] wrote: > I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds <br>, but HTMLspecialchars tells it to not show that. > > Anyways, I'm sure there is a way around this. All help is welcome, so > I'm eager for replys. Thank you very, very much! > > -Owen Perhaps if you do the nl2br after rather than before htmlspecialchars? Or just use nl2br when you actually display the text, rather than trying to put the <BR> in your database. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
> I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds <br>, but HTMLspecialchars tells it to not show that. > > Anyways, I'm sure there is a way around this. All help is welcome, so > I'm eager for replys. Thank you very, very much! <? // Malicious content (don't laugh, I've had this happen!) $content = "<FRAMESET>\n" ." <FRAME SRC='whee'>\n" ." <FRAME SRC='whee1'>\n" ."</FRAME>"; // Convert < to <, etc $output = htmlentities($content); // change newlines to <BR>s $output = nl2br($output); ?> Jason
Hi Dddogbruce, @ 1:06:08 AM on 4/19/2001, Dddogbruce (@home.com) wrote: > I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds <br>, but HTMLspecialchars tells it to not show that. Are you sure you wouldn't rather strip all HTML? I would do that then implement my own special "tagged" language. A lot of developers go with the [url]htp://www.example.com[/url] type of thing. You can strip HTML with: <http://www.php.net/manual/en/html/function.strip-tags.html> > Anyways, I'm sure there is a way around this. All help is welcome, so > I'm eager for replys. Thank you very, very much! I wouldn't store <br>'s, or any HTML for that matter, in your database unless there's just no other choice. If you do, you wind up having to patch a lot of small problems -- like converting <br>'s back to newlines if you were to quote original posts in a <textarea>, for example. If you have <br>'s instead of the original newline characters, then you run it through nl2br() again, you end up with double the breaks. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.
In article <9bjvo1$irv$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Ben") wrote: > i'm trying to use sessions with my project, but it seems that registered > variables in a session aren't global by default. They should be. Can you show an example of the code that leads you to believe they're not? > It doesn't even seem like the session is global, because if I reference the > sessionid (which only shows up if cookies are disabled) > by using <?=SID?>, it shows up within a function, if I reference it from > within the function. That's because SID is a constant (no dollar sign). Only variables have to be declared as global before using the global version in a function. -- CC
Ive come up with a curly problem and im wondering if anyone can shed some lights on it. I looked under the SELECT part of Mysql but it didnt seem to cover this and I didnt know how to phrase it. What I have is a displayed list on the site. This data that makes up the list comes from 2 tables. 'item' and 'location' are the 2 table names. For each item there is 1 entry in the item table. But under location there is several entries depending on where the part is. Its done this way to log a history of whether the item has been sent out, or received in. Each entry in the location table is date stamped and records the items location, and the item_id field. Currently I am doing my list like this. $item_q=mysql_query("select * from item order by item name"); while ($item=mysql_fetch_array($item_q)) { $location_q=mysql_query("select * from location where item_id=$item_q[item_id] order by date desc limit=1"); $location=mysql_fetch_array($location_q); echo"$itemlist[item_name] - $location[location] - $location[date]"; } The reason I do it this way is that I firstly need it to list all items, but then next step (and next SELECT) it grabs the most recent entry in location for that item. My problem is, I need to be able to combine the SELECT queries into 1, so that I can order by either Location, Date or Name Im not sure if this sort of thing is possible but it would make life so much easier if I could do it. Thanks Chris -- Chris Aitken - Webmaster/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 8888 fax: +61 2 4628 8890 -------------------------------------------- Unix -- because a computer's a terrible thing to waste!
Hello, I'm creating a bunch of photogalleries and wondering about the following: - Is it possible to convert an image or a whole dir with images (jpg) to 60% of the original imagesize using php to automate this task? I know the gd library is installed, but don't know if it supports jpg... And what functions do I need to use? >> gd-variables in phpinfo(): GD Support enabled GD Version 1.6.2 or higher FreeType Support enabled FreeType Linkage with TTF library PNG Support enabled << Hope you people can help. THanks, Bart Verbeek