Re: [PHP] including the result of one query in another query
Pedro Quaresma de Almeida wrote: Hi I have two databases, on for aeromodelistas (aeromodelling) and another for Códigos Postais (Postal Codes). I whant to do the following query SELECT CódigoPostal FROM Aeromodelistas WHERE CódigoPostal IN (SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO WHERE codigopostal.LOCART.DD=codigopostal.DISTRITO.DD AND codigopostal.DISTRITO.DESIG='Coimbra'); This query is not working, and I do not know why. If I try the two queries individualy they work, togheter they don't!? Firstly, this is not PHP related. If you are using MySQL, you should know that sub-selects are only supported in versions 4.1 and above. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP vs. ColdFusion
PHP is open source. It's highly supported by lots of developers. It's free. There are many different libraries such as PEAR, for instance. There many free frameworks for creating convinient modular and easyly managebale applications both web and command line. I can name mojavi.org as a brilliant MVC pattern implementation for PHP5, propel (propel.phpdb.org) and metastorage (http://www.meta-language.net/metastorage.html) as OOtoR transformation frameworks. As to ColdFusion, It seems to me that this technology is dead already. Rick Emery wrote: My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term). We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some ammunition that I can take into a meeting to sell management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end. Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to sell it to management (I'm already on the PHP side), so links to data or articles comparing the two are best. Thanks in advance, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] status
The original message was received at Mon, 27 Jun 2005 13:10:24 +0200 from [127.20.163.238] - The following addresses had permanent fatal errors - php-general@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] array_diff php version
As far as I can see in the Help File, Array_Diff was introduced in 4.0.1 and should be in the version you are using. Does it not work? -Original Message- From: André Le Tissier [mailto:[EMAIL PROTECTED] Sent: 26 June 2005 10:20 To: php-general@lists.php.net Subject: [PHP] array_diff php version Help! Array_diff is the perfect function for what I am try to do but I have a php version 4.1.5. Is there any replacement I can use to achieve the same result Many thanks, André Le Tissier This message has been delivered to the Internet by the Revenue Internet e-mail service * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Display picture from MySQL
Hi All, I'm looking for tutorial/template/code, how to display a picture on web pages which the picture is stored on MySQl database. Thanks in advance, regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display picture from MySQL
On 6/27/05, Bagus Nugroho [EMAIL PROTECTED] wrote: I'm looking for tutorial/template/code, how to display a picture on web pages which the picture is stored on MySQl database. You can download a copy of my image rating script and have a look at the image.php. http://destiney.com/Scripts -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] daemons listen on apache port when run by php
I am trying to run a daemon via php4 apache2 (on debian sarge). I am using the command exec('sh script.sh');. All works fine, my daemon (which I run with script.sh) is running. But when I stop apache, I can see that the daemon I ran previously is listening on port 80 (apache port). This does not happen if I run the script from a shell. How can I prevent these daemons from taking over port 80? This happens with amule and giftd (haven't tried any others though). this is my script: #!/bin/bash HOME=/var/www case $1 in start) /usr/bin/giftd -dq --home-dir '/var/www' ;; stop) killall giftd ;; restart | force-reload) $0 stop sleep 2 $0 start ;; *) echo Usage: gift.sh {start|stop|restart|force- reload} exit 1 esac exit 0 the command used in php: exec('./gift.sh start'); what I get when I stop apache, after I ran the script: [router:/var/www/.giFT] racer% sudo netstat -np --ip --listen | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2522/giftd Dusan Smolnikar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing nonlatin characters
Have you seen: http://us2.php.net/manual/en/function.recode-string.php kgt Dotan Cohen wrote: I thought that this was another old STFA but marc and google are quiet. I as parsing a bunch of submitted works and some of them have non-latin characters. I know that I once saw in the user-submitted notes in the docs a function for replacing them with o,a,i,e,u but I can't find it. I think that it may have been purged. Can anyone help? Dotan http://lyricslist.com/lyrics/artist_albums/109/carlisle_belinda.php Belinda Carlisle Lyrics -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $mydata-StampDate
On 27/06/05, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: John Taylor-Johnston wrote: I could just change the field type. But how do you calculate it? I don't see much to inspire a start. I'm not a full-time coder either. More of a tinkerer. I don't want someone to do it for me, but need to get my head around how to do it. http://ca3.php.net/manual/en/function.strtotime.php As I said, though, you should be using a MySQL date field. Have a look at the MySQL manual for the corresponding functions to the above -- there's probably a quicker way with MySQL too. Dates should almost always be stored as dates in a database, not varchars. This allows for more and/or faster date functions, sorting that works (it only works with -mm-dd format in varchars), and you can select the data into a unix timestamp instead of needing to strtotime() first. The calculation in mysql couldn't be much simpler. select datediff(StampDate, '2003-08-23') as StampDateDiff From the manual: DATEDIFF() returns the number of days between the start date expr and the end date expr2. expr and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation. mysql SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30'); - 1 http://mysql.org/doc/mysql/en/date-and-time-functions.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5.0.4 compilation under Mac
Hello, I've search the archive but doesn't find anything about what I will expose to you. There is my problem : I've followed the following tutorial : http://www.phpmac.com/articles.php?view=221 , in order to compile apache 2.0.54 and php 5.0.4 under MacOSX Tiger 10.4.1. XCode is installed on the box in version 2.1. I only change the configure command line for php by doing this : ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --enable-sigchild --enable-ftp --with-gd --with-jpeg-dir=/sw --with-png-dir=/sw --with-mime-magic --with-mysql=/usr/local/mysql --with-ncurses --enable-sockets --with-unixODBC=/usr --with-pdflib --with-tiff-dir --enable-sysvmsg --enable-sysvshm --enable-sysvsem --with-xslt --with-xsl --with-curl -with-ming=/sw --with-libxml-dir --enable-zend-multibyte --with-crypt --with-mime-magic --with-crack --enable-mbstring --with-dom make clean make But I little problem. The compilation fails with these error messages : /usr/bin/ld: warning multiple definitions of symbol _pcre_free ext/pcre/pcrelib/pcre.o definition of _pcre_free in section (__DATA,__data) /usr/local/apache/bin/httpd definition of _pcre_free /usr/bin/ld: warning multiple definitions of symbol _pcre_malloc ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in section (__DATA,__data) /usr/local/apache/bin/httpd definition of _pcre_malloc /usr/bin/ld: warning multiple definitions of symbol _regcomp /usr/local/apache/bin/httpd definition of _regcomp /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libpthread.dylib(regcomp.So) definition of _regcomp /usr/bin/ld: warning multiple definitions of symbol _regexec /usr/local/apache/bin/httpd definition of _regexec /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libpthread.dylib(regexec.So) definition of _regexec /usr/bin/ld: warning multiple definitions of symbol _regfree /usr/local/apache/bin/httpd definition of _regfree /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libpthread.dylib(regfree.So) definition of _regfree /usr/bin/ld: Undefined symbols: _SQLGetPrivateProfileString _SQLSetConfigMode _SQLGetConfigMode collect2: ld returned 1 exit status make: *** [libs/libphp5.bundle] Error 1 I don't know what to do. I doesn't want to disable PEAR which will allow me to disable PCRE in php because I will need PCRE and I don't know if I will not use a PEAR package during the developement of the website. Has someone a workaround for this problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display picture from MySQL
/*Fetch the image :*/ $res=mysql_query(select picture from pics_table where id=1) or die(err); $line=mysql_fecth_array($res); /*Send headers*/ header(content-type: image/png); echo $line[picture]; On Monday 27 June 2005 15:38, Bagus Nugroho wrote: Hi All, I'm looking for tutorial/template/code, how to display a picture on web pages which the picture is stored on MySQl database. Thanks in advance, regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display picture from MySQL
or you could just store the path to where the directory is in the database and go find the file according to the path and filename. HTH Georgi Ivanov wrote: /*Fetch the image :*/ $res=mysql_query(select picture from pics_table where id=1) or die(err); $line=mysql_fecth_array($res); /*Send headers*/ header(content-type: image/png); echo $line[picture]; On Monday 27 June 2005 15:38, Bagus Nugroho wrote: Hi All, I'm looking for tutorial/template/code, how to display a picture on web pages which the picture is stored on MySQl database. Thanks in advance, regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP search
Bruce Gilbert wrote: Hello, I am fairly new to PHP, and I am looking to create a search functionality on a website using php. Can anyone point me to a good tutorial that can walk me through this? Between Google / Codewalkers / PHPFreaks you should be able to find something. -- NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] removing chars from string
Hi, If a have a string thats 11 characters long how can I strip off the last two characters? TIA! Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] removing chars from string
[snip] If a have a string thats 11 characters long how can I strip off the last two characters? [/snip] $newString = substr($oldString, 0, 8); echo $newString; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Paul Nowosielski [EMAIL PROTECTED] wrote: If a have a string thats 11 characters long how can I strip off the last two characters? Jay Blanchard [EMAIL PROTECTED] wrote: $newString = substr($oldString, 0, 8); echo $newString; substr's third argument is length, not position. It also accepts negative values which makes it go from the end, allowing you to do absolute lengths or relative. To make a string no more than 9 characters: substr($string, 0, 9); To always remove the last two characters of a string: substr($string, 0, -2); http://php.net/substr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP vs. ColdFusion
as well as a great templating engine: smarty (there are others as well) Please let us know what the outcome is!! thanks Angelo Anton Kovalenko wrote: PHP is open source. It's highly supported by lots of developers. It's free. There are many different libraries such as PEAR, for instance. There many free frameworks for creating convinient modular and easyly managebale applications both web and command line. I can name mojavi.org as a brilliant MVC pattern implementation for PHP5, propel (propel.phpdb.org) and metastorage (http://www.meta-language.net/metastorage.html) as OOtoR transformation frameworks. As to ColdFusion, It seems to me that this technology is dead already. Rick Emery wrote: My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term). We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some ammunition that I can take into a meeting to sell management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end. Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to sell it to management (I'm already on the PHP side), so links to data or articles comparing the two are best. Thanks in advance, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] removing chars from string
[snip] Paul Nowosielski [EMAIL PROTECTED] wrote: If a have a string thats 11 characters long how can I strip off the last two characters? Jay Blanchard [EMAIL PROTECTED] wrote: $newString = substr($oldString, 0, 8); echo $newString; substr's third argument is length, not position. It also accepts negative values which makes it go from the end, allowing you to do absolute lengths or relative. To make a string no more than 9 characters: substr($string, 0, 9); To always remove the last two characters of a string: substr($string, 0, -2); http://php.net/substr [/snip] I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than one way to skin a mule. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Hello Paul, Monday, June 27, 2005, 4:33:35 PM, you wrote: PN If a have a string thats 11 characters long how can I strip off PN the last two characters? $newstring = substr($string, 0, -2); Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Jay Blanchard wrote: snip I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than one way to skin a mule. /snip Did you take Math in Mississippi? ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] removing chars from string
[snip] Jay Blanchard wrote: snip I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than one way to skin a mule. /snip Did you take Math in Mississippi? ;) [/snip] As a matter of fact ;) 0-8 is nine characters, which is two less than eleven, IIRC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than one way to skin a mule. $string = '12345678901'; $jayString = substr($string, 0, 9); $kevinString = substr($string, 0, 8); echo $jayString; // echos 123456789 echo 'br /'; // echos 12345678 echo $kevinString; It turns out to skin a mule is to outsmart him. Because mules aren't actually stubborn, they're just smarter than most of us. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] removing chars from string
[snip] $string = '12345678901'; $jayString = substr($string, 0, 9); $kevinString = substr($string, 0, 8); echo $jayString; // echos 123456789 echo 'br /'; // echos 12345678 echo $kevinString; It turns out to skin a mule is to outsmart him. Because mules aren't actually stubborn, they're just smarter than most of us. [/snip] Drat! Foiled again! My mind is absent. If you only knew My apologies for getting the math wrong...damnI need a vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] removing chars from string
Hello Jay, Monday, June 27, 2005, 4:46:36 PM, you wrote: JB I know that it is length, and I gave the correct length for an 11 JB character string minus two characters. But as always, there is JB more than one way to skin a mule. Would that be a three-legged mule? :-) (you're one short : 0,8) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Jay Blanchard wrote: [snip] Jay Blanchard wrote: snip I know that it is length, and I gave the correct length for an 11 character string minus two characters. But as always, there is more than one way to skin a mule. /snip Did you take Math in Mississippi? ;) [/snip] As a matter of fact ;) 0-8 is nine characters, which is two less than eleven, IIRC Yeah, but that new math doesn't work with PHP. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Stut wrote: Jay Blanchard wrote: 0-8 is nine characters, which is two less than eleven, IIRC So the length should be 9 not 8 no? Or should I go back to school? Forgive us, it's Monday. $newstring = substr ( $oldstring, 0, 9 ); Will knock the last two characters off of an eleven character string. 0 is the starting point, and 9 is the length you want returned $newstring = substr ( $oldstring, 1, 9 ); Will knock off the first and last character of an eleven character string (giving you the 'middle' 9 characters). $newstring = substr ( $oldstring, 0, -2 ); Will knock the last two characters off a string of any length. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing chars from string
Jay Blanchard wrote: 0-8 is nine characters, which is two less than eleven, IIRC So the length should be 9 not 8 no? Or should I go back to school? -Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] removing chars from string
Hello Stut, Monday, June 27, 2005, 4:59:17 PM, you wrote: 0-8 is nine characters, which is two less than eleven, IIRC S So the length should be 9 not 8 no? Or should I go back to school? It should be 9 if you want 9 characters. Lots of PHP functions are zero-based, but the 3rd parameter to substr is asking for the number of characters to return, not the actual character location in the string to stop at - if it did, then it would have been 8 (0 being the 1st character, etc), but in this case it's 9. It's an easy one to slip-up on imho. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. ColdFusion
On 6/26/05, Rick Emery [EMAIL PROTECTED] wrote: My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term). We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some ammunition that I can take into a meeting to sell management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end. Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to sell it to management (I'm already on the PHP side), so links to data or articles comparing the two are best. It might not be easy to put a number on, but consider your (and possibly the other developers') enthusiasm about PHP. I would guess that you will be more productive with something that you are excited about. I have done a lot of work in both ColdFusion and PHP and I much prefer PHP. There are some technical reasons (i.e., I like shared nothing), but some of it is also personal preference. I just like it. CF is fine and I don't think it's dead, but it just isn't as fun to work with. My biggest problem with CF is probably that I have to use it on Windows and, well, I really don't like that. ;) You mention being in a Windows environment so maybe you don't have a choice with that aspect. If management can see that you are stoked to use PHP that might help your cause. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs. ColdFusion
Yeah - I'll second all of this. I'm a Certified Macromedia CF Developer, why do you ask am I on this list? The answer is simple, php is better. However with the recent developments in CF6, CF has become very comparable. Why would I still choose PHP over CF given this? Ease of management. I don't have to even think about the server. I spend about 1 hr a month messing around with the server (daemon restarts or php config changes). That's where LAMP's value really shines through I think you will find. Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com -Original Message- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 11:09 AM To: php-general@lists.php.net Subject: Re: [PHP] PHP vs. ColdFusion On 6/26/05, Rick Emery [EMAIL PROTECTED] wrote: My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term). We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some ammunition that I can take into a meeting to sell management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end. Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to sell it to management (I'm already on the PHP side), so links to data or articles comparing the two are best. It might not be easy to put a number on, but consider your (and possibly the other developers') enthusiasm about PHP. I would guess that you will be more productive with something that you are excited about. I have done a lot of work in both ColdFusion and PHP and I much prefer PHP. There are some technical reasons (i.e., I like shared nothing), but some of it is also personal preference. I just like it. CF is fine and I don't think it's dead, but it just isn't as fun to work with. My biggest problem with CF is probably that I have to use it on Windows and, well, I really don't like that. ;) You mention being in a Windows environment so maybe you don't have a choice with that aspect. If management can see that you are stoked to use PHP that might help your cause. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shell expansion (globbing) from inside php cli script
Can not make this work inside a php script. Have tried several variations: $cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.; $cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . $tmp_dir/.; etc... I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shell expansion (globbing) from inside php cli script
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can not make this work inside a php script. Have tried several variations: $cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.; $cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . $tmp_dir/.; etc... I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] the EXEC command
I wanted to use the exec function but when i did a simple test script i got no result. This is the testscript: ? echo exec(whoami); ? tested also with echo exec('whoami'); but no result... the server in NOT in safe_mode and other php-files works fine. and if i would get this to work how should i do to execute a couple of commands in a row? best regards ¨ Mikael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: the EXEC command
mikael wrote: I wanted to use the exec function but when i did a simple test script i got no result. This is the testscript: ? echo exec(whoami); exec('whoami', $stdout, $stderr); print Standard Out:\n; print_r($stdout); print Standard Error:\n; print_r($stderr); -- NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: the EXEC command
Jason Barnett wrote: mikael wrote: I wanted to use the exec function but when i did a simple test script i got no result. This is the testscript: ? echo exec(whoami); exec('whoami', $stdout, $stderr); print Standard Out:\n; print_r($stdout); print Standard Error:\n; print_r($stderr); And there's http://us4.php.net/manual/en/function.shell-exec.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing nonlatin characters
On 6/27/05, Kristen G. Thorson [EMAIL PROTECTED] wrote: Have you seen: http://us2.php.net/manual/en/function.recode-string.php kgt No, I didn't see that. Thank you! What CAN'T php do?!? Dotan Cohen http://lyricslist.com/lyrics/artist_albums/23/aguilera_christina.php Aguilera, Christina Song Lyrics -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing nonlatin characters
Dotan Cohen wrote: snip What CAN'T php do?!? /snip I can't get it to alter space-time...yet. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Removing nonlatin characters
[snip] Dotan Cohen wrote: snip What CAN'T php do?!? /snip I can't get it to alter space-time...yet. [/snip] E-mail me for the formula. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing nonlatin characters
On 6/27/05, John Nichel [EMAIL PROTECTED] wrote: Dotan Cohen wrote: snip What CAN'T php do?!? /snip I can't get it to alter space-time...yet. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] function spacetime($distance,$time) { if ( $time$now || $distance$here ) { altereinstein(+$distance*$time); } else { altereinstein(-$distance*$time); } } Dotan Cohen http://lyricslist.com/lyrics/artist_albums/153/def_leppard.php Def Leppard Song Lyrics -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sybase and PHP
Does anyone know how to build PHP with sybase support without having a sybase server running on the local machine Joe, You can access Sybase with PHP by using the FreeTDS libraries. You don't need to install anything from Sybase on the webserver you mention. Get FreeTDS from http://www.freetds.org/ (you might even find an RPM for your system at http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/redhat/RPMS/). You'll need to define data sources for your sybase db in the FreeTDS config files. Check the FreeTDS docs for that. You won't be able to connect via PHP if your data sources aren't configured correctly. Recompile PHP with --with-sybase=/usr/local/freetds (or wherever you installed FreeTDS). You should then be able to use the sybase_* functions to connect to your Sybase system on another machine. As an added bonus, I think you can also use the sybase functions to connect to a MSSQL server (or vice versa if you compile PHP with --with-mssql=/usr/local/freetds). - Jamie After looking through sybase.com and coming up with nothing I thought it might be better to see if anyone has already been down this road: I've got a very old laptop with a tiny little hard drive with very little free space on it. It's being used as a 'rogue' intranet server and doing a suprisingly good job of it. Right now we are needing to access one of the company's sybase servers to retrieve customer data, but I don't think we can afford the extra space needed to install too much extra on this poor thing. Does anyone know how to build PHP with sybase support without having a sybase server running on the local machine.or for that matter does anyone know how to install an ODBC driver for the same setup? I'm willing to accept information on either one at this point. It's running rh7.3 w/ php 5 and apache 2. Any help at all would be very much appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] APD Problem
Help! I have installed the APD, but when i want to execute a page to have it's pprof.id in the apd.dumpdir for checking it by pprofp the execution terminate with this fatal error (for example): Fatal error: apd_set_pprof_trace() failed to open /tmp/traces/pprof.07084 for tracing in /var/www/apd.php on line 2 APD is installed correctly (from it's outputs in phpinfo()) and i have set the apd.dumpdir to /tmp/traces. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Breaking up data efficiently
Hi All, I'm working on an aircraft booking system and it has multiple origin/destination data, concatenated into a single line: /* BEGIN DATA */ Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00 /* END DATA */ As you can see, each origin/destination is separated by a pipe '|', and then, each origin/destination data has its location, country and datetime of departure/arrival, separated by comma ','. I'm splitting them up into array of location, country and datetime using the following: /* BEGIN CODE */ $itenary = explode('|', $booking-booking_flight_details); $size = count($itenary); for($i=0; $i $size; $i++) { list($path[$i]['location'], $path[$i]['country'], $path[$i]['datetime']) = explode(',', $itenary[$i]); } /* END CODE */ *Question*: Is the above the code an effective way to do it? Or is there a better/faster way? Somehow, it feels like there's lots of things going through the above code. Please advise. Thanks. -- Wee Keat Chin Protocol Networks p: 1300 131 932 e: [EMAIL PROTECTED] h: www.pn.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Breaking up data efficiently
Wee Keat wrote: /* BEGIN DATA */ Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00 /* END DATA */ [snip] /* BEGIN CODE */ $itenary = explode('|', $booking-booking_flight_details); $size = count($itenary); for($i=0; $i $size; $i++) { list($path[$i]['location'], $path[$i]['country'], $path[$i]['datetime']) = explode(',', $itenary[$i]); } /* END CODE */ *Question*: Is the above the code an effective way to do it? Or is there a better/faster way? It's pretty good, but I would've done: $itinerary = explode('|', $booking-booking_flight_details); foreach($itinerary as $item) { $item = explode(',', $item); $path[] = array( 'location' = $item[0], 'country' = $item[1], 'datetime' = $item[2] ); } That's really just a matter of preference though. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Breaking up data efficiently
On Tue, 28 Jun 2005, Wee Keat wrote: Hi All, I'm working on an aircraft booking system and it has multiple origin/destination data, concatenated into a single line: /* BEGIN DATA */ Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00 /* END DATA */ As you can see, each origin/destination is separated by a pipe '|', and then, each origin/destination data has its location, country and datetime of departure/arrival, separated by comma ','. I'm splitting them up into array of location, country and datetime using the following: /* BEGIN CODE */ $itenary = explode('|', $booking-booking_flight_details); $size = count($itenary); for($i=0; $i $size; $i++) { list($path[$i]['location'], $path[$i]['country'], $path[$i]['datetime']) = explode(',', $itenary[$i]); } /* END CODE */ *Question*: Is the above the code an effective way to do it? Or is there a better/faster way? I suppose it depends on how many records you're going to have to split up... here's another way, but I don't know if it's faster -- I'll let you time it -- and it's certainly not as readable... $bits = split([|,], $booking-booking_flight_details); $size = count($itenary); for ( $i = 0; $i $size; $i += 3 ) { $path[$i]['location'] = $bits[$i]; $path[$i]['country'] = $bits[$i + 1]; $path[$i]['datetime'] = $bits[$i + 2]; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shell expansion (globbing) from inside php cli script
On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote: $cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can not make this work inside a php script. Have tried several variations: $cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.; $cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . $tmp_dir/.; etc... I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. No, I already tried it that way too. I guess I should mention this is a cli script if that matters. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] looking for a pure startup opportunity..
hi... i'm out here in california, the bay area, and was wondering if anyone on the list is interested in either being partners, forming a sweat equity startup? or if anyone has an idea/concept, and you're looking for people to be part of your team... i've read way too many articles about the 3 kids/guys/etc... who managed to get $10 million in funding for esentially a basic idea, but they had/have traffic/eyeballs!!! yeah, i recognize that the 'best' dream would be to have a wealthy benefactor, but that's not going to happen for the vast majority of people/ideas! i'm of the firm opinion that the right group, willing to sweat/work together, can build a pretty good business. this approach requires the parties to work on it part-time, until it generates revenues, and sustains itself. so, if you're looking at your shrinking retirement going to iraq, and you want something more out of life, let's talk!! but with the right combination of web development skills (perl/php/c/apache/linux/mysql/html/css) we can do some damage. there are numerous opportunities for the right 3-5 person team! regards, bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Breaking up data efficiently
Hi, Tuesday, June 28, 2005, 9:34:28 AM, you wrote: WK Hi All, WK I'm working on an aircraft booking system and it has multiple WK origin/destination data, concatenated into a single line: WK /* BEGIN DATA */ WK Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, WK AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00 WK /* END DATA */ WK As you can see, each origin/destination is separated by a pipe '|', and WK then, each origin/destination data has its location, country and WK datetime of departure/arrival, separated by comma ','. WK I'm splitting them up into array of location, country and datetime using WK the following: WK /* BEGIN CODE */ WK $itenary = explode('|', $booking-booking_flight_details); WK $size = count($itenary); WK for($i=0; $i $size; $i++) { WK list($path[$i]['location'], WK $path[$i]['country'], WK $path[$i]['datetime']) = explode(',', $itenary[$i]); WK } WK /* END CODE */ WK *Question*: Is the above the code an effective way to do it? Or is there WK a better/faster way? WK Somehow, it feels like there's lots of things going through the above code. WK Please advise. Thanks. This ay work: ? $str = 'Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00'; preg_match_all('/(\w+),\s*(\w+),\s*([0-9-]+)\s([0-9:]+)(?=\|)/s',$str,$match); print_r($match); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a pure startup opportunity..
b i'm of the firm opinion that the right group, willing to sweat/work b together, can build a pretty good business. this approach requires b the parties to work on it part-time, until it generates revenues, b and sustains itself. [snip] This is the 1990s calling, we want our wishful thinking back. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Breaking up data efficiently
Hi, Tuesday, June 28, 2005, 10:26:12 AM, you wrote: TR This ay work: TR ? TR $str = 'Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, TR 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, TR 25-07-2005 18:00:00'; TR preg_match_all('/(\w+),\s*(\w+),\s*([0-9-]+)\s([0-9:]+)(?=\|)/s',$str,$match); TR print_r($match); A different way that will generate what you actually need :) function build($data){ global $path; $i = count($path); $path[$i]['location'] = $data[1]; $path[$i]['country'] = $data[2]; $path[$i]['datetime'] = $data[3]; } $path = array(); $str = 'Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00'; preg_replace_callback('/(\w+),\s*(\w+),\s([0-9-]+\s[0-9:]+)(?=\|)/s','build',$str); print_r($path); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] looking for a pure startup opportunity..
richard... you're too cynical... but why do you not believe that you and 3-4 of your peers couldn't build something that would work... mean.. if you think about it.. you probably already possess the skills that you need to get something started... but let me ask you... do you think that you and a few of the developers you know could build this -- www.thefacebook.com. these guys are kids... started this (actually ripped off another site) about 18 months ago... they recently got ~$13million in funding... they started in college, with not much more than a realization that they could build this... so, the question i have for you.. why do you not think you could do it!! but the fact that you think you can't means there's less competition from those who do it! peace... -bruce -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 5:36 PM To: php-general@lists.php.net Subject: Re: [PHP] looking for a pure startup opportunity.. b i'm of the firm opinion that the right group, willing to sweat/work b together, can build a pretty good business. this approach requires b the parties to work on it part-time, until it generates revenues, b and sustains itself. [snip] This is the 1990s calling, we want our wishful thinking back. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shell expansion (globbing) from inside php cli script
Brian V Bonini wrote: I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. Try shell_exec(). I don't think exec() goes via the shell. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a pure startup opportunity..
I'd be interested in playing with some ideas...
Re: [PHP] Breaking up data efficiently -- closed
Hi all, Thanks for all the input. Really an eye opener on all the various ways that could do the same thing! :) Really appreciate it. Off to work with new ideas! Tom Rogers wrote: function build($data){ global $path; $i = count($path); $path[$i]['location'] = $data[1]; $path[$i]['country'] = $data[2]; $path[$i]['datetime'] = $data[3]; } $path = array(); $str = 'Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00'; preg_replace_callback('/(\w+),\s*(\w+),\s([0-9-]+\s[0-9:]+)(?=\|)/s','build',$str); print_r($path); Jasper Bryant-Greene wrote: $itinerary = explode('|', $booking-booking_flight_details); foreach($itinerary as $item) { $item = explode(',', $item); $path[] = array( 'location' = $item[0], 'country' = $item[1], 'datetime' = $item[2] ); } Philip Hallstrom wrote: $bits = split([|,], $booking-booking_flight_details); $size = count($itenary); for ( $i = 0; $i $size; $i += 3 ) { $path[$i]['location'] = $bits[$i]; $path[$i]['country'] = $bits[$i + 1]; $path[$i]['datetime'] = $bits[$i + 2]; } -- Wee Keat Chin Protocol Networks p: 1300 131 932 e: [EMAIL PROTECTED] h: www.pn.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object Oriented PHP (5)
Sams, PHP and MySQL Web Development (2005 edition) PHP Anthology both good books...
Re: [PHP] Display picture from MySQL
Google is your friend. _http://forums.mysql.com/read.php?20,17671,27914_ (http://forums.mysql.com/read.php?20,17671,27914)
Re: [PHP] shell expansion (globbing) from inside php cli script
Brian, Can you post more of the script? --Bob Brian V Bonini wrote: On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote: $cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can not make this work inside a php script. Have tried several variations: $cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.; $cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . $tmp_dir/.; etc... I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. No, I already tried it that way too. I guess I should mention this is a cli script if that matters. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Email screwing my swedish characters
Hi guys, Having a bit of a problem, I've just completed a project for a Swedish company, when someone joins the site they get a welcome letter, but unfortunatly in the welcome letter the Swedish characters ÖÅÄ and öåä are getting replaced with a ? (without quotes) Any idea whats wrong and how I can make it good? Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic pspell module, and adding new words to the list
Hi there, an internal client of ours requires spell checking in their textarea forms on names of people for searching thousands of records properly. What it needs to be able to do is add new names to the dictionary. The server its on is a few years old, it already has the pspell and aspell libraries and command line tools, its running php4.3.0 urrggh, what i am needing to do is load it as a dynamic module and then use an Ajax service to do the spell checking. The spell checker needs to be able to add names to the dictionary is any of this possible ? Let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Email screwing my swedish characters
Hello, on 06/27/2005 11:44 PM Ryan A said the following: Having a bit of a problem, I've just completed a project for a Swedish company, when someone joins the site they get a welcome letter, but unfortunatly in the welcome letter the Swedish characters ÖÅÄ and öåä are getting replaced with a ? (without quotes) Any idea whats wrong and how I can make it good? You cannot send messages with 8 bit characters. To send your message you need to encode the body using quoted-printable encoding. You may want to take a look at this class for composing and sending messages that can encode the message properly for you . It comes with an example that sends messages with letters with accents. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Email screwing my swedish characters
Hi, Thanks for replying. snip when someone joins the site they get a welcome letter, but unfortunatly in the welcome letter the Swedish characters ÖÅÄ and öåä are getting replaced with a ? (without quotes) /snip snip2 You cannot send messages with 8 bit characters. To send your message you need to encode the body using quoted-printable encoding. You may want to take a look at this class for composing and sending messages http://www.phpclasses.org/mimemessage /snip2 That really helps but I would rather not use a whole class for this little problem, is there any small piece of code I could use instead? Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ad management
i am looking for a simple ad management app to keep track of ad views/impressions. i was looking at phpadsnews, but it seems way too much bloat of what i need i to do. anyone know of a simple ad script to keep track of views/impressions? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Email screwing my swedish characters
Hello, on 06/28/2005 12:23 AM Ryan A said the following: snip when someone joins the site they get a welcome letter, but unfortunatly in the welcome letter the Swedish characters ÖÅÄ and öåä are getting replaced with a ? (without quotes) /snip snip2 You cannot send messages with 8 bit characters. To send your message you need to encode the body using quoted-printable encoding. You may want to take a look at this class for composing and sending messages http://www.phpclasses.org/mimemessage /snip2 That really helps but I would rather not use a whole class for this little problem, is there any small piece of code I could use instead? You can use the class function QuotedPrintableEncode. It also takes care of encoding the message headers that have 8 bit characters with q-encoding which is slightly different from quoted-printable. You also need to set the Content-Transfer encoding to quoted-printable. That is all if you want to send just a plain text message. If you messages are more complicated with HTML parts, embedded images or attachments, that is more complicated. You would need to use the whole class rather than just a single function. The actual delivery of the message also has details. There are differences when you send via SMTP or sendmail (or equivalent). The class and its sub-classes take care of all those differences too. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Breaking up data efficiently
I agree, your implementation is efficient. It does depend on the data being entirely proper, however. If you can not be entirely sure (and you should rarely be), i might add a suggestion that increases code length, but decreases the chance of problems: You might consider creating a function to validate the location as well as list() = explode() it. $locations = explode('|', $booking-booking_flight_details); foreach ($locations as $location) $list[] = split_location($location); Create the function split_location to return the associative array or, if it is invalid, throws an exception. If PHP4, replace the exception with similar error handling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question about HTTP 301 permanent redirects
Hi, I'm a novice trying to understand the exact construction of code for doing an HTTP 301 permanent redirect for a server coded in PHP. Could someone please tell me how I would handle the following example? http://www.nimblepedic.com/services-bodytools.php?i=bodytools WANT TO DO A HTTP 301 REDIRECT TO: http://www.nimblepedic.com/services.php/body_tools Please only answer if you know exactly how to do so. The advise is very crucial to me. Thanks very much in advance Dr. Brad -- Dr. Brad R. Lustick/CEO Ergonomic Supervisor Back Be Nimble--Your One-Stop Back Shop Nimble-Pedic Memory Foam Products 2405 Rice Blvd. Houston, Texas, USA 77005 TOLL-FREE(USA only)-800-639-3746(ERGO) TEL. 713-521-0003 FAX. 713-521-2220 Email: [EMAIL PROTECTED] Tech Support: [EMAIL PROTECTED] website: http://www.backbenimble.com DISCLAIMER: All writings are purely the opinion of this author, and although meant to offer help and guidance, should not be considered as medical advice or in lieu of the recommendations of an attending physician or other health care professional.
Re: [PHP] ad management
On 27/06/05, Sebastian [EMAIL PROTECTED] wrote: i am looking for a simple ad management app to keep track of ad views/impressions. i was looking at phpadsnews, but it seems way too much bloat of what i need i to do. I am not aware of any such package, however you may way to keep in mind that what you need right now is not necessarily what you will need in the future. The bloat you see in some, such as phpadsnews, has likely been added because needs expanded. Your needs may also expand. Your client/manager may want to track impressions in a certain way in the future; will LightweightAdManager handle that? Most such packages start out fulfilling a simple need, and features are added as clients or managers desire new functionality. I agree that a lot of packages are bloated, but in many cases the bloat is there to provide flexibility so you do not need to rework everything to add feature Foo. If you are fully certain you will not need anything but a basic set of functions, then ignore this message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about HTTP 301 permanent redirects
On 27/06/05, Dr. Brad Lustick [EMAIL PROTECTED] wrote: I'm a novice trying to understand the exact construction of code for doing an HTTP 301 permanent redirect for a server coded in PHP. Could someone please tell me how I would handle the following example? http://www.nimblepedic.com/services-bodytools.php?i=bodytools WANT TO DO A HTTP 301 REDIRECT TO: http://www.nimblepedic.com/services.php/body_tools There are a few examples at http://php.net/header In your case you might want to do something like: $article = $_REQUEST['i']; // some validation of $article if necessary $url = sprintf('/services.php/%s'. $i); header('Location: ' . $url); (Also, that's a hell of a signature.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php