[PHP] Geo-IP: Lookup country by IP Address
Does anyone know about a PHP API for http://geo-ip.com/ ? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] installing php3 and php4 on the same server
We have the following problem, we have now apache 3 and php 3 ,we have upgrade the apache and the php3 tot php4 evereting will working fine. 2 internetproviders in belgium will working with proxyservers if you want to view a webpage on the lastversion of apache an php4 the page will not correct viewed Greetings, - Original Message - From: Alex Dowgailenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 8:44 AM Subject: RE: [PHP] installing php3 and php4 on the same server Question is, why would you want to? php3 scripts will work fine under php4. -Original Message- From: Manu Verhaegen [mailto:[EMAIL PROTECTED]] Sent: January 18, 2002 2:39 AM To: [EMAIL PROTECTED] Subject: [PHP] installing php3 and php4 on the same server Hi, We have installed apache 3 and PHP3, can we install PHP4 on the same server the we can use PHP3 and PHP4 Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting the last record in a mysql table FINALLY!!
Also, PHP has a built in function for finding the ID of the last insert query. ill show some brief code. $query = (insert into tbl_blah (fld_blargh) values ('$roar')); $result = mysql_query($query) or die (mysql_error()); $last_id = mysql_insert_id(); echo $last_id; this should print out whatever the primary key # of the last insert query performed. This help at all? From: Niklas Lampén [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Subject: RE: [PHP] Getting the last record in a mysql table FINALLY!! Date: Fri, 18 Jan 2002 10:05:35 +0200 Well, ofcourse you have to have the table + field names right. ;) Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 18. tammikuuta 2002 9:38 To: [EMAIL PROTECTED] Cc: Php-General Subject: Re: [PHP] Getting the last record in a mysql table FINALLY!! Niklas, I needed to change the statement slightly, but it did put me on the right track. Thanks again, Hugh $result=mysql_query(SELECT id FROM my_table ORDER BY id DESC, id limit 1); $id=mysql_result($result,0); - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Thursday, January 17, 2002 10:29 PM Subject: RE: [PHP] Getting the last record in a mysql table If you have ID that is a incrementing number, you could just query like this: 'SELECT ID FROM MY_TABLE ORDER BY ID DESC, LIMIT 1' And there you have just one result, the last (biggest) ID number. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 18. tammikuuta 2002 7:37 To: Php-General Subject: [PHP] Getting the last record in a mysql table Help! I thought this would be easy but it ain't. What I want is the id number of the last record in a table. I've tried a number of variations to the following but am getting no where! Any help will be greatly appreciated. Hugh $results=mysql_query( SELECT last_insert_id() FROM MY_TABLE ); $row=mysql_fetch_assoc($results); while ($row=mysql_fetch_row($results)) { print tr; foreach($row as $field) { if ($field==) { $field=nbsp;; } print td align=centerh5.$field./h5/td; } print /tr; } print /table/td/tr/table; -- 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] _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] checking the content?????
hi! I 'm trying to make my script to check one by one whether there is a content in the field on a record. How do I do that? I use mysql_num_fields() but it doesn't work. Any reply is appriciated! regards, Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] htmlspecialchars() alias
I was wondering if it would be feasible to create an alias for this function, say hsc() or something short. function hsc ($foo) { $foo = htmlspecialchars ($foo); return $foo; } HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Passing vars w/refresh w/register globals off?
On Friday 18 January 2002 04:11, Floyd Baker wrote: Yes. I was using the url to pass variables without a form. It looks like the javascript idea would cover that now that you remind me. I've used it before to refresh two frames at once. But even so I'd rather not go that way if at all possible. I'd like to stay within php's ability. Not being able to POST and GET is a 'limitation' of HTTP not PHP. Not knowing what I'm talking about for sure but is there no way of putting a variable into the 'post' status or condition, prior to being redirected, without actually using a form? Only be using a form will you be able to POST. Thanks for the idea though. It'll work if nothing else. :-) Up to now we (I?) still don't know exactly what you're trying to do. Maybe if you could tell us what you're doing and if appropriate post some code, then we could see if there is another solution to your problem. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I am just a nice, clean-cut Mongolian boy. -- Yul Brynner, 1956 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Installing PHP4
Hi, We have installed Apache 1.3.6 and PHP4 If we use phpscripts with the extention .php everiting will working fine, if we use .php3 this will not working Can you help my Greetings, Manu
Re: [PHP] MySQL and PHP
Brandon, Please do some 'homework': Will the native query run from the MySQL command line, or in a admin tool? Have you tried varying the number of fields? What are the column specifications? In and amongst this you might like to check where you should have spaces (a) for legibility (particularly if you're asking us to read it to help you), and (b) for machine parsing requirements. =dn - Original Message - From: hugh danaher [EMAIL PROTECTED] To: Brandon Orther [EMAIL PROTECTED] Cc: Php-General [EMAIL PROTECTED] Sent: 18 January 2002 01:14 Subject: Re: [PHP] MySQL and PHP Brandon, Try using single quotes rather than doubles in the values e.g. ('something','something else') hugh - Original Message - From: Brandon Orther [EMAIL PROTECTED] To: PHP User Group [EMAIL PROTECTED] Sent: Thursday, January 17, 2002 2:25 PM Subject: [PHP] MySQL and PHP Hello, I am trying to use mysql through php. When I try to run the following query it does nothing. I am trying to figure out if it is the query or php I am having a problem with. Does anyone see a problem with the below query? (Note: This is for mysql) QUERY: INSERT INTO page_properties (page_name,open_menu,top_image,title_image,side_images) VALUES(30daypolicy,comp_info2,top_aboutus,titlebar_aboutus,30da y); Thanx for your help, Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating a new line in a text file
Chris, \n = *nix \r = Mac \r\n = PC (now that you've 'dropped' MS Notepad into the conversation...) The simplest M$ tools content themselves with black blocks (apparently not being interested in your comfort), but the more sophisticated tools will sometimes oblige... =dn - Original Message - From: Chris Janes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 18 January 2002 05:15 Subject: Re: [PHP] Generating a new line in a text file : : Ah, so you're opening the file in something that doesn't understand : newlines and prefers line feeds, then. : : In that case you'll want to use \r instead of \n. : : Jason You'll never guess what, that doesn't work either... still pretty black blocks, but no new line... In a foolish move (perhaps) I'm opening the file in MS Notepad (I know, there are better things to use, but I don't have them). I hope that eventually I'll be able to only have to open the file to check how many quotes are in it, and check spelling and the like... Bah, and I was hoping that working on this would help me get to sleep! Ah well... Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Mod function
I am looking for a mod() function in PHP but unfortunately I am unable to find one. Please help... ( ° Jim-Christian Flatin //\\ Skien / Norway / \/ ) [EMAIL PROTECTED] '- http://niteshift.d2g.com
Re: [PHP] checking the content?????
Dani, Am slightly confused/finding the question ambiguous. Could you provide the code you have so far, and the relevant column specification(s)? Could be simple or complex! =dn - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 18 January 2002 12:22 Subject: [PHP] checking the content? hi! I 'm trying to make my script to check one by one whether there is a content in the field on a record. How do I do that? I use mysql_num_fields() but it doesn't work. Any reply is appriciated! regards, Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?
Jeff, The following batch files works for me (WinNTWS 4.0 SP6a):- cd c:\program files\php php.exe -q c:\.path.\w.php c:\.path.\webute.log NB the first line reflects my PHP config - your mileage may vary! Of course the other possibility is to add the PHP folder into the PATH environment variable... Regards, =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: ; [EMAIL PROTECTED] Sent: 18 January 2002 07:00 Subject: [PHP-WIN] command line are -c doesn't work on win2k? I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr Then I found a solution at http://bugs.php.net/bug.php?id=6742 , [22 Nov 2000 5:21am] [EMAIL PROTECTED] After a few emails this really got solved. Adding -c/path/to/phpini/ (command line) was the solution. --Jani but, when I tried it, php -c c:\php mail_test.php, Again, the results were, X-Powered-By: PHP/4.0.6Content-type: text/html attempting to deliver the mail brbWarning/b: Unknown error in bmail_test.php/b on line b3/bbr So, I tried a gazillion permitations on -c, -c /php, -c c:/php -c:\php\php.ini, etc, etc, etc, to no avail... I finally moved the script into the same dir as php.exe and it worked fine. The problem is that I need to run the script from the normal path and not from c:\php... Does the -c switch actually work? How can I run this script from another dir? Is this a bug? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing PHP4
Open up your server's config file, eg httpd.conf , and ensure that PHP's AddType line has the extension .php3 Should look something like this: AddType application/x-httpd-php .php .phtml .php3 HTH Neil Manu Verhaegen wrote: Hi, We have installed Apache 1.3.6 and PHP4 If we use phpscripts with the extention .php everiting will working fine, if we use .php3 this will not working Can you help my Greetings, Manu *** This message was virus checked with: SAVI 3.52 last updated 8th January 2002 *** -- Email: [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing PHP4
Thanks, Evereting will working fine - Original Message - From: Neil Freeman [EMAIL PROTECTED] To: Manu Verhaegen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 12:12 PM Subject: Re: [PHP] Installing PHP4 Open up your server's config file, eg httpd.conf , and ensure that PHP's AddType line has the extension .php3 Should look something like this: AddType application/x-httpd-php .php .phtml .php3 HTH Neil Manu Verhaegen wrote: Hi, We have installed Apache 1.3.6 and PHP4 If we use phpscripts with the extention .php everiting will working fine, if we use .php3 this will not working Can you help my Greetings, Manu *** This message was virus checked with: SAVI 3.52 last updated 8th January 2002 *** -- Email: [EMAIL PROTECTED] [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]
RE: [PHP] Mod function
I am looking for a mod() function in PHP but unfortunately I am unable to find one. Please help... As in modulus? if ($foo % 2 == 0) { // if there's no remainder after dividing by 2 } if ($foo % 5 != 0) { // if there is a remainder after dividing by 5 } HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4 on OSX 10.1.2
Hi all Im trying to get setlocale to work on my OSX box ?php print (strftime (%A in Danish is )); setlocale (LC_ALL, da); print (strftime (%A.\n)); ? this should give me Friday in Danish is Fredag but no matter what I set the languagecode to it always returns Friday Why? regards Kaj Schermer Didriksen New media applications macron ApSTelefon: 87959650 Virkevangen 11, Assentoft Fax: 87959670 8900 RandersWeb: http://www.macron.dk --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating a new line in a text file
: Chris, : \n = *nix : \r = Mac : \r\n = PC : (now that you've 'dropped' MS Notepad into the conversation...) The simplest M$ tools content themselves with : black blocks (apparently not being interested in your comfort), but the more sophisticated tools will sometimes : oblige... : =dn : Excellent, it would appeared to have been a combination of the quotes and the right newline command that was the problem, I had in fact tried various combinations of the two, but apparently not quite hit the right one. Like I said, it was something totally obvious. Guess it was just a case of not seeing the wood for the trees. I would have mentioned the MS Notepad usage earlier, only it was 4:30 in the morning when I decided to ask about it, so my mind wasn't exactly in a high gear. But it's sorted now, so cheers to both you and Jason for helping out! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Scripts keep refreshing
Maybe you were doing something like this: if (function() == true) { header(Location: this_page.php); } And your function() is now broken because you upgraded to php4? It's probaly something like this, some function that worked on php3 and now it's not. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Feature Suggestion
?php $array = range('a','z'); ? As usual your mileage may vary but it worked here :-) -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Mike Eheler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If this is the wrong place for it, please point me to the right place. This is real small, though.. I'd like to see a shorthand for defining arrays.. for example $ucase_alphabet = array(['A'..'Z']); (creates an array of all alphabet characters, uppercase) $numeric = array([1..100]); Or something of that sort. Just something that popped into my mind. PHP feels like a language that has been built on little suggestions like this, so I thought I'd post it. :) Mike -- 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] encrypt in php?
I have encrypted the passwords for my login script with the mysql command password('$password') ... is there any way to encrypt to the same format in php? Seems like the above isn't working atleast.. Hawk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP/ Oracle 'undefined function'
I get undefined function when I use PHP/Oracle-functions like ociconnect. For example: $connection = ocilogon(loginname,password); In the documentation i have found there is only mentioned Oracle 8i, so I do not know if the same functions can be used for the 9i release. Oracle is just installed, so is a Apache. I think myself it is a settings problem Can anybody help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: printing an XML node
In [EMAIL PROTECTED], Christian Stocker wrote: In [EMAIL PROTECTED], Thomas Gagne wrote: dumpmem works great for entire documents, but what is the strategy for printing the contents of a single node? It is impossible to use dumpmem on a node since the code looks for a 'doc' property that doesn't exist in nodes. it's not possible at the moment, but there's a libxml-function, which does exactly that. if i find some time, i will implement it in the not so distant future :) ok. did it. it's in cvs now. $string = domxml_dump_node($docobject,$nodeobj); or $string = $docobject-dump_node($nodeobj); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help installing php
If I remember correctly, when you install MySQL and Apache from rpm you get the binary version and no source is installed on your system. It's been a while since I've looked for them, but there used to be a source rpm for MySQL at the MySQL site, and it took some digging to find it. Ditto for Apache. Take this opportunity to install al three from source -- because you've decided where to put the files you won't be trying to guess where an rpm packager decided they should go. (I've had the same problem with .deb pkgs, but maybe that's because I don't know enough about dselect.) For the Apache source file look for ABOUT_APACHE; for MySQL look for mit-pthreads. I believe those t wo will be relatively unique, certainly better than looking for README. Regards - Miles Thompson At 02:09 PM 1/18/2002 -0500, Juni Adi wrote: On Thu, 17 Jan 2002, Anas Mughal wrote: |I haven't seen any RPMs for PHP. Yes there are RPMs for PHP (ftp.mirror.ac.uk) |However, I have installed using the source. It works |fine. |Try to install the CGI version first. That is easier. |Than, you could dive into the apache module stuff. Ok, I'm now in the middle of installing it from source code. But I'm not sure where the path to apache and mysql source code to fill in : ./configure --with apache=/path/to/apache_source_code --with mysql=/path/to/mysql_source_code I 'm even not I have the source code for the two of them as I was instaling both apache and mysql from rpms. So, can you tell me to define the path for those apache and mysql so I can make the PHP work along with apache and mysql as well? Or at least tell me what indicate a source code directory (what files are in). Maybe I can search it manually. Regards Juni Adi | |--- Juni Adi [EMAIL PROTECTED] wrote: | Hello, | | I'm new to PHP (actually I'm just about to | begin) and have problem with installing. | | I'm looking for version of PHP that will be | suit to RH 6.2 and MySQL 3.23.47? (my RH package | didn't include any php rpms). | I've tried some version 4 rpms but always have | error on dependency stuffs. | | So, can anybody point me sites where I can | download the right rpms to work along with my | stuffs? (I'd prefer RPMS because I've always been | having trouble installing from source code). | | Cheers | -- | + | || Juni Adi || | || Volunteers Alliance for Saving the Nature || | || www.arupa.or.id || | + | | | -- | 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] | | | |= |Anas Mughal |[EMAIL PROTECTED] |[EMAIL PROTECTED] |Tel: 973-249-6665 | |__ |Do You Yahoo!? |Send FREE video emails in Yahoo! Mail! |http://promo.yahoo.com/videomail/ | -- + || Juni Adi || || Volunteers Alliance for Saving the Nature || || www.arupa.or.id || + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Computer Science and PHP
Where I went to school (UMass Amherst), they primarily use Java and C/C++. The reason has been cited that the skills learned in programming with these languages are scalable to many other languages, including PHP, and thus form a solid foundation from which other programming skills can evolve. It's a pretty academic department, which is a good thing from the computer scientist point of view -- to teach the theory rather than the process (so that you can take that theory with you as computer science evolves). I sure wish that I had studied CS when I was in school! Hindsight is 20/20, they say. I'm just starting out with programming, and I think PHP is a great introduction. Erik On Thursday, January 17, 2002, at 07:15 PM, Robert Covell wrote: They are trying to prepare you for what they believe businesses want. What will give you the best opportunity to get a job once out of college. When I was in college our teachers sat down with the businesses that came to campus for recruiting and asked What should we be teaching to suit your needs. The courses taught reflected their needs. The perception in the business world is on things such as (but not limited to): C, C++, COBOL, Graphics, and M$ products. I think your doing it the right way, on your own. This is how I learned PHP and use it for a majority of our web development. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.471.1095 Fax: 816.471.3447 24x7: 816.210.7145 -Original Message- From: Francesco Gallarotti [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 5:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Computer Science and PHP I am a student in a college in NY state. Here we have several servers and dozens of courses on computer science. No server is PHP ready and no course instructor knows anything about PHP. Why do you think this is happening? I really like PHP and I am using it in my personal website to work with some text files and a small database. Why PHP is so not popular in the computer science teaching area? F.G. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regular Expressions...
Howdy people... I want to extract the name of a hyperlink which looks like this: a href=this is the name!/a I tried to do this: ereg(([a-zA-Z0-9_. -]*),$hlink, $reg3); and it works if it only consists of the above characters, how can I tell ereg to include all characters? not only a-zA-Z0-9_. -. / Tony... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Does any have the 'edit_member.php' script ....
I thought that all of the source code for that book was available at http://mysql.he.net/Downloads/Contrib/Examples according to page 497. Erik On Thursday, January 17, 2002, at 08:48 PM, Mike C wrote: In electronic format that I can have? It is included in the book 'MySQL' by Paul DuBois ? I have a parse error in my script that I simply cannot find (after many, many tries). TIA Regards Mike C -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Regular Expressions...
On Friday 18 January 2002 22:09, Tony Arnold wrote: Howdy people... I want to extract the name of a hyperlink which looks like this: a href=this is the name!/a I tried to do this: ereg(([a-zA-Z0-9_. -]*),$hlink, $reg3); and it works if it only consists of the above characters, how can I tell ereg to include all characters? not only a-zA-Z0-9_. -. / Tony... Use .* as in: ereg((.*),$hlink, $reg3); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* court, n.: A place where they dispense with justice. -- Arthur Train */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expressions...
Thank you! -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: den 18 januari 2002 15:14 To: Tony Arnold; [EMAIL PROTECTED] Subject: Re: [PHP] Regular Expressions... On Friday 18 January 2002 22:09, Tony Arnold wrote: Howdy people... I want to extract the name of a hyperlink which looks like this: a href=this is the name!/a I tried to do this: ereg(([a-zA-Z0-9_. -]*),$hlink, $reg3); and it works if it only consists of the above characters, how can I tell ereg to include all characters? not only a-zA-Z0-9_. -. / Tony... Use .* as in: ereg((.*),$hlink, $reg3); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* court, n.: A place where they dispense with justice. -- Arthur Train */ -- 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] Session Time Out - Question
I've noticed that the user sessions automatically time out after X amount of minutes without me putting any extra code in the scripts. How do I set the amount of time before the sessions time out? I've looked all over my 3 books on PHP/MySQL and haven't found a damn thing Thanks!
[PHP] strange problem
Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 18-01-02 at 15:49 * Marc Logghe said Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc No idea, but a fella on this list told me [] had been deprecated in favour of {} Maybe that has something to do with it? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8SDaaHpvrrTa6L5oRAq/iAKCFdCMULk8xWwcT1mMhgPF0Xsj3QwCcCxE+ M+YsJ4QKu1szbP5tkGScES4= =bTv8 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange problem
hmmm try $coding = %coding; $a[$coding]='whatever this array shall contain'; please let me know if it worked... diggn - Original Message - From: Marc Logghe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 3:44 PM Subject: [PHP] strange problem Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Passing vars w/refresh w/register globals off?
On Fri, 18 Jan 2002 18:13:50 +0800, you wrote: On Friday 18 January 2002 04:11, Floyd Baker wrote: Yes. I was using the url to pass variables without a form. It looks like the javascript idea would cover that now that you remind me. I've used it before to refresh two frames at once. But even so I'd rather not go that way if at all possible. I'd like to stay within php's ability. Not being able to POST and GET is a 'limitation' of HTTP not PHP. Not knowing what I'm talking about for sure but is there no way of putting a variable into the 'post' status or condition, prior to being redirected, without actually using a form? Only be using a form will you be able to POST. Thanks for the idea though. It'll work if nothing else. :-) Up to now we (I?) still don't know exactly what you're trying to do. Maybe if you could tell us what you're doing and if appropriate post some code, then we could see if there is another solution to your problem. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* I am just a nice, clean-cut Mongolian boy. -- Yul Brynner, 1956 */ This should be fairly standard. Filling out a form and using a recursive call and if/then, to bring the variables around to a case switch for routing to desired pages according to form input data. if 'completed = y ( switch case get to go here case get go there ) else ( post to /this page form submit ) This draft does work but I don't like the visible url variables. Of course in addition we have all the fields passed by the form post that were used as required on switch case and receiving pages... Now we need to REQUEST every one. That's fine for the sake of the security but now it's beneficial to get into arrays, etc. to keep script shorter and easier to maintain. More learning. Always good. 4.1 is pushing me. :-) The solutions look more involved than my poor coding has been til now. We need to put more things into function form maybe, instead of passing between separate pages. I'm probably still out in left field with a lot of this *visualizing* but it's coming. And always good to talk it out. Can you tell me if it's possible to run 4.03 and 4.1 *both* on the same machine? I'm thinking the old script would be php3 and the new stuff php4. Is that something that could be done until the old scripts are upgraded? Floyd -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Setting up an XML platform/website
hi... I work in php and need a XML tutorial ... ¿where I fin any? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange problem
hmmm try $coding = %coding; $a[$coding]='whatever this array shall contain'; please let me know if it worked... diggn this is a test because my email client gave me an error message so if this message arrives twice, it wasnt meant to be spam...
Re: [PHP] strange problem
No idea, but a fella on this list told me [] had been deprecated in favour of {} Maybe that has something to do with it? Maybe: $a[${'%coding'}] = 'red'; this works: ? ${'%coding'}='blue'; $a[${'%coding'}]='red'; echo $a[blue];//print red ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help installing php
I just installed Apache and PHP 4.1.1 on my home computer ( Red hat Linux 7.2) from source and they are isntalled without any problem. If you have already installed apache, then find out the installation directory ( probably /usr/local/apache) and then see if its bin directory is in your path. If not add it. then goto the bin directory and run ./httpd -l. If you see a line called mod_so.c then you can install PHP as a DSO module without the source code for Apache. Follow the steps below and it will work. run configure in your PHP source dir as ./configure --with-apxs [ and rest of the modules you want to enable] make make install If you are using PHP 4.1.1, it comes with builtin support for mysql and is installed by default or you can run ./configure --with-apxs --with-mysql [ and rest of the modules you want to enable] if it says can not find path to apxs, then change the configuration to ./configure --with-apxs=path to apache/bin/apxs [ and rest of the modules you want to enable] where path to apache is where apache is installed ( probably /usr/local/apache) HTH R'twick - Original Message - From: Juni Adi [EMAIL PROTECTED] To: Anas Mughal [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 2:09 PM Subject: Re: [PHP] help installing php On Thu, 17 Jan 2002, Anas Mughal wrote: |I haven't seen any RPMs for PHP. Yes there are RPMs for PHP (ftp.mirror.ac.uk) |However, I have installed using the source. It works |fine. |Try to install the CGI version first. That is easier. |Than, you could dive into the apache module stuff. Ok, I'm now in the middle of installing it from source code. But I'm not sure where the path to apache and mysql source code to fill in : ./configure --with apache=/path/to/apache_source_code --with mysql=/path/to/mysql_source_code I 'm even not I have the source code for the two of them as I was instaling both apache and mysql from rpms. So, can you tell me to define the path for those apache and mysql so I can make the PHP work along with apache and mysql as well? Or at least tell me what indicate a source code directory (what files are in). Maybe I can search it manually. Regards Juni Adi | |--- Juni Adi [EMAIL PROTECTED] wrote: | Hello, | | I'm new to PHP (actually I'm just about to | begin) and have problem with installing. | | I'm looking for version of PHP that will be | suit to RH 6.2 and MySQL 3.23.47? (my RH package | didn't include any php rpms). | I've tried some version 4 rpms but always have | error on dependency stuffs. | | So, can anybody point me sites where I can | download the right rpms to work along with my | stuffs? (I'd prefer RPMS because I've always been | having trouble installing from source code). | | Cheers | -- | + | || Juni Adi || | || Volunteers Alliance for Saving the Nature || | || www.arupa.or.id || | + | | | -- | 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] | | | |= |Anas Mughal |[EMAIL PROTECTED] |[EMAIL PROTECTED] |Tel: 973-249-6665 | |__ |Do You Yahoo!? |Send FREE video emails in Yahoo! Mail! |http://promo.yahoo.com/videomail/ | -- + || Juni Adi || || Volunteers Alliance for Saving the Nature || || www.arupa.or.id || + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] String to array ???
Hi, I have a for loop in which a variable $privid reads and stores the content from a xmlfile in the form of a string.. the string has 5 different values... I want to call this variable $privid outside the loop like this... for($y_au=0; $y_ausizeof($priv); $y_au++) { $this-privid = $childNodes[$y]-content ; print $this-privid; // here the variale privid stores and prints all the 5 values as a string.. } function id() { print $this-privid; // here only the last value of in the string is being printed ..WHY??? and how can I resolve this?? return $this-privid; // RETURNS ONLY THE LAST VALUE IN THE STRING.. Why?? } Thanks in adv.:) sands p.S: I tried using an array within the for loop (had posted yest about it..) but makes no diff.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP/ Oracle 'undefined function'
PHP has to be compiled with the oci8 support (built-in module). The oracle extension is the old one, the newest is oci8. Regards, Philippe Gkin [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] I get undefined function when I use PHP/Oracle-functions like ociconnect. For example: $connection = ocilogon(loginname,password); In the documentation i have found there is only mentioned Oracle 8i, so I do not know if the same functions can be used for the 9i release. Oracle is just installed, so is a Apache. I think myself it is a settings problem Can anybody help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session Time Out - Question
How do I set the amount of time before the sessions time out? See session.gc_maxlifetime in the php.ini file. 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]
[PHP] odbc linux to win2000
I want to make a database connection with odbc. My php-script is running on linux, the database (centura sqlbase 7.5) is running on win2000. Is it possible to make a direct odbc-connection to the database or do I really need a software-bridge for this connection? Someone said it is unpossible without a software-bridge, even though when I use odbc. But I forgot why, how und who... thanx ergin aytac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help installing php
hi juni, although i totally agree with the folks who recommended you compile php from source, maybe it's time you sat down :) compiling apache, mysql and php from source can tax even the greatest patience the first time it is tried. hopefully, here's a couple things to think about. create a directory where you store _all_ your source for everything you compile. lots of folks use /usr/src and i'll assume that here. now, download all the source tarballs you need into that directory and expand them all in there. this should create subdirectories for everything. ie, /usr/src/apache_1.3.22 /usr/src/php-4.1.0 /usr/src/mysql-3.23.40 it's possible that you may need other packages. only you will now what is used on your machine. do you use snmp with php? gd? do y'all also use perl with apache? you'll want to read the documentation that comes with _each_ package you are compiling. especially apache. they know about php. there is lots of good info in there. there are also many sites out there with tutorials on getting these all to compile together. you'll need to decide if you want to compile php as a static or dynamic module. static seems to compile easier for some folks, but dynamic means in the future you only need to recompile php to upgrade it (as opposed to recompiling everything like you are about to do :) the first time you do this, it could take hours just getting it all squared away, and that doesn't necessarily include compile time. after that, it should only take you a few minutes each time. to answer the specific question about apache source, if we assume the directories above, then you would use ../apache_1.3.22. i recommend writing down everything it took to get it all working so you have it for next time. the configure string might look something like ./configure \ --enable-track-vars \ --with-mysql=/usr/local \ --with-apache=/usr/src/apache_1.3.22 \ --enable-trans-sid \ --with-snmp \ --with-ftp \ --with-gd depending on what all you need from php. hope this all helps, mike on 1/18/02 12:09 PM, Juni Adi at [EMAIL PROTECTED] wrote: Ok, I'm now in the middle of installing it from source code. But I'm not sure where the path to apache and mysql source code to fill in : ./configure --with apache=/path/to/apache_source_code --with mysql=/path/to/mysql_source_code I 'm even not I have the source code for the two of them as I was instaling both apache and mysql from rpms. So, can you tell me to define the path for those apache and mysql so I can make the PHP work along with apache and mysql as well? Or at least tell me what indicate a source code directory (what files are in). Maybe I can search it manually. -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Computer Science and PHP
py wrote: Do you guys really think PHP should be in computer science curriculum? In my curriculum (in canada) I learned C/C++, Software Design (database architecture and OO Design), SQL, Unix and Networks (OSI, TCP-IP and HTTP mainly) There was no Perl, Python, PHP, ASP, JSP and even no VB... I think it's more important to learn Programming than it is to learn PHP. I know for a fact that some of our teachers knew about PHP, but still they decide to teach the class in C. And I happy they did. Now if your school has no PHP server, why don't you suggest and offer to install it? That's what we did, we made it run on a small machine on Linux first than with the help of the university sys admin, we installed it on a Unix server. The sys admin is now very happy to do his web stuff in PHP instead of Perl :) just my canadien 2 cents... (1.14 cent US ;) ) py At 03:46 AM 1/18/2002 -0200, you wrote: Hello, Francesco Gallarotti wrote: I am a student in a college in NY state. Here we have several servers and dozens of courses on computer science. No server is PHP ready and no course instructor knows anything about PHP. Why do you think this is happening? I really like PHP and I am using it in my personal website to work with some text files and a small database. Why PHP is so not popular in the computer science teaching area? Most University CS departments prefer to teach programming using a more structured language with stronger type casting. It is much easier to move from a structured language to a language like perl or PHP than the reverse after graduation. At our university we offer special topics courses that are not on the curriculum when requested by students - courses on PHP perl visual basic. Maybe you should talk to the CS department head about special topic classes or department sponsored user discussion groups. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange problem
On Friday, January 18, 2002, at 09:52 AM, Nick Wilson wrote: my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc No idea, but a fella on this list told me [] had been deprecated in favour of {} Maybe that has something to do with it? From what I understand (as a participant in that thread), [] hasn't been deprecated for all arrays, just the situations in which you want to consider a string as an array of characters and are using a numeric index to point to a specific character. Like so: $string = abcdefg; echo $string{3}; (should print d unless I'm doing this wrong). For most other arrays, brackets are still OK. Erik -- 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] $this objects and vars
Hey there, got a question about $this. I thought this was a fixed variable to point to the currently used object but I've seen a script wherein it's used within an object like this class a { $var = 0; function b { do something... $this -var++; } } the $this here will increment the $var of the object a... so far so good. now further in the script you'll get an sql query $this = mysql_fetch_array(indentifier); now as far as I knew you shouldn't be possible to use $this for this purpose, it has nothing to do with objects... why can it be used? it's only confusing things. The script works tho... As far as I've seen in other languages, the things the language contains can't be used for something else (think they're called language constructs?!) anyways it would be sortta like trying to define a function print while one already exists natively in the language. You shouldn't be able to do that right? Does anyone mind explain why $this can be used as a normal var? this is very confusing. And what is php gonna do if you have a var $this and use $this to point to the current object? Kind regards and have a nice weekend --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: htmlspecialchars() alias
Jason G. wrote: Hello General and Dev list, Considering the fact that it is good practice to use htmlspecialchars() anytime you are outputting non-html content to the browser... After typing the 16 characters in the htmlspecialchars() function thousands of times... I was wondering if it would be feasible to create an alias for this function, say hsc() or something short. Even nicer, but probably not practical would be a language extension like: ?== $var ? being the same as ?= htmlspecialchars($var) ? Yup, sounds like a good idea. But I guess you could always wrap htmlspecialchars in your own function until php gets that feature. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating a new line in a text file
Jason Murray wrote: : Don't know why it's got everyone else stumped. : : \n is the new line character. Make sure you use it in and : not in ''. : : Jason Unfortunately, that doesn't work either, it changes the \n that appeared at the end of the new line to a single black block. It does not put the next quote onto a new line. Ah, so you're opening the file in something that doesn't understand newlines and prefers line feeds, then. In that case you'll want to use \r instead of \n. Na, he's posting using MS Outlook so I guess he is using Windows. In that case use \r\n. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange problem
On Friday 18 January 2002 15:52, you wrote: So hashes are now $var{'keyname'} (with curly brackets) and arrays are $var[0] (with normal brackets?) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 18-01-02 at 15:49 * Marc Logghe said Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc No idea, but a fella on this list told me [] had been deprecated in favour of {} Maybe that has something to do with it? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8SDaaHpvrrTa6L5oRAq/iAKCFdCMULk8xWwcT1mMhgPF0Xsj3QwCcCxE+ M+YsJ4QKu1szbP5tkGScES4= =bTv8 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $this objects and vars
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 18-01-02 at 17:00 * TD - Sales International Holland B.V. said Hey there, got a question about $this. I thought this was a fixed variable to point to the currently used object but I've seen a script wherein it's used within an object like this class a { $var = 0; function b { do something... $this -var++; } } the $this here will increment the $var of the object a... so far so good. now further in the script you'll get an sql query $this = mysql_fetch_array(indentifier); Looks to me like $this is just an ordinary var as it not being used with the pointer thingy (-) Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8SEjkHpvrrTa6L5oRArB8AKCUrW7gCVlEF51wXKQO2yY+TIaBLACcDTgX IPYbBSPO6fDvZH8fvXlEmyM= =/t2J -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $this objects and vars
on 1/18/02 8:58 AM, TD - Sales International Holland B.V. at [EMAIL PROTECTED] wrote: now further in the script you'll get an sql query $this = mysql_fetch_array(indentifier); now as far as I knew you shouldn't be possible to use $this for this purpose, it has nothing to do with objects... why can it be used? it's only confusing things. The script works tho... this is only a guess, but maybe separate namespaces. one is an array and one is an object. the object $this should only exist inside a method definition, right? $this outside of that context isn't referring to itself at that point but some memory space allocated to the variable named 'this' instead, i guess. ? mike -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and COM - Syntax question
I sent this to the php.windows group as well, but haven't heard an answer, so I'm escalating it to the general list. Please don't be offended by the redundant posting. I've scoured the web for an answer, but virtually all COM examples using Word are copies of the code in the PHP manual. I'm just looking for the PHP syntax for a specific COM call. I have the VBA code I'm trying to base it on included below. The answer is probably blatantly obvious, but I don't see it. I'm just using the quit() to close it and having to hit no every time. I'm working on a simple PHP spell check that uses Word as its engine. The whole thing works, but I want to close the temp document without being prompted to save. The VBA to do this according to several VBA sites is: ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges I'm looking for the PHP syntax to do this. function spellcheck($string){ $word = new COM(word.application) or die(The spellcheck function requires MS Word.); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; //the VBA sample code ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges $word-Quit(); $word-Release(); $word = null; return $corrected; } J Wynia phpgeek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating a new line in a text file
On Friday 18 January 2002 17:00, you wrote: FYI, In windows a newline is usualy made by CRLF (Carriage Return (\r) , Line Feed (\n)), in linux/unix it's usually just LF (\n) Jason Murray wrote: : Don't know why it's got everyone else stumped. : : \n is the new line character. Make sure you use it in and : not in ''. : : Jason Unfortunately, that doesn't work either, it changes the \n that appeared at the end of the new line to a single black block. It does not put the next quote onto a new line. Ah, so you're opening the file in something that doesn't understand newlines and prefers line feeds, then. In that case you'll want to use \r instead of \n. Na, he's posting using MS Outlook so I guess he is using Windows. In that case use \r\n. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?
the path to php is already in the PATH variable... I'm not doing anything different that http://bugs.php.net/bug.php?id=6742 ,but for some reason the -c doesn't make a difference... Jeff. Dl Neil [EMAIL PROTECTED] wrote in message 0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$2916100a@jrbrown... Jeff, The following batch files works for me (WinNTWS 4.0 SP6a):- cd c:\program files\php php.exe -q c:\.path.\w.php c:\.path.\webute.log NB the first line reflects my PHP config - your mileage may vary! Of course the other possibility is to add the PHP folder into the PATH environment variable... Regards, =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: ; [EMAIL PROTECTED] Sent: 18 January 2002 07:00 Subject: [PHP-WIN] command line are -c doesn't work on win2k? I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr Then I found a solution at http://bugs.php.net/bug.php?id=6742 , [22 Nov 2000 5:21am] [EMAIL PROTECTED] After a few emails this really got solved. Adding -c/path/to/phpini/ (command line) was the solution. --Jani but, when I tried it, php -c c:\php mail_test.php, Again, the results were, X-Powered-By: PHP/4.0.6Content-type: text/html attempting to deliver the mail brbWarning/b: Unknown error in bmail_test.php/b on line b3/bbr So, I tried a gazillion permitations on -c, -c /php, -c c:/php -c:\php\php.ini, etc, etc, etc, to no avail... I finally moved the script into the same dir as php.exe and it worked fine. The problem is that I need to run the script from the normal path and not from c:\php... Does the -c switch actually work? How can I run this script from another dir? Is this a bug? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help installing php
On Fri, 18 Jan 2002, Juni Adi wrote: Ok, I'm now in the middle of installing it from source code. But I'm not sure where the path to apache and mysql source code to fill in : ./configure --with apache=/path/to/apache_source_code --with mysql=/path/to/mysql_source_code I 'm even not I have the source code for the two of them as I was instaling both apache and mysql from rpms. mysql should work fine with the bundled library. just use --with-mysql, no directory argument. for apache, if you're not compiling the apache source you should compile php as a shared apache module: use --with-apxs or --with-apxs2 depending whether you're using Apache 1.x or 2.x. Carl | |--- Juni Adi [EMAIL PROTECTED] wrote: | Hello, | | I'm new to PHP (actually I'm just about to | begin) and have problem with installing. | | I'm looking for version of PHP that will be | suit to RH 6.2 and MySQL 3.23.47? (my RH package | didn't include any php rpms). | I've tried some version 4 rpms but always have | error on dependency stuffs. | | So, can anybody point me sites where I can | download the right rpms to work along with my | stuffs? (I'd prefer RPMS because I've always been | having trouble installing from source code). | | Cheers | -- | + | || Juni Adi || | || Volunteers Alliance for Saving the Nature || | || www.arupa.or.id || | + | | | -- | 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] | | | |= |Anas Mughal |[EMAIL PROTECTED] |[EMAIL PROTECTED] |Tel: 973-249-6665 | |__ |Do You Yahoo!? |Send FREE video emails in Yahoo! Mail! |http://promo.yahoo.com/videomail/ | -- 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] Addslashes not working correctly?
Hi all, I am having a problem with one of my forms. I was testing to see if it would except data with apostrophes, and it doesn't. I thought maybe I had forgotten to addslashes to the variables...but I had the addslashes in my code... I was reading the manual page about addslashes to see if maybe I was doing something wrong and I noticed this line in one of the user comments: Addslashes operates in 2 modes, either escape ' with Sybase method '' or the MySQL/rest \' method. I quickly ran into problems when I have both MySQL, and Openlink ODBC- MS SQL 7.0 in use. An optional parameter to force Sybase style quoting would be nice. Now I am using MSSQL via freetds and since the commands for MSSQL and Sybase are basically identical as far as php is concerned, I am assuming that I have to use the sybase method to escape quotes. However, I can't seem to figure out how to do this, can somebody point me in the right direction? (and in case anyone is interested in my error message, here it is) Warning: Sybase error: Unclosed quotation mark before the character string ' ORDER BY lastname,firstname'. (severity 15) in /home/www/html/devel/idback/empsearch2.phtml on line 47 Thanks for any help, Zara
[PHP] Variable Problem
How do I combine the following so it is treated as one variable $i=10 $result$i=test; I want this to be: $result10=test; $i changes so I cannot just put in 10 instead of I. anybody know how i can do that? TIA Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variable Problem
?php $i = 10; eval (\$result$i=\test\;); echo $result10; ? Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 19, 2002 2:47 AM Subject: [PHP] Variable Problem How do I combine the following so it is treated as one variable $i=10 $result$i=test; I want this to be: $result10=test; $i changes so I cannot just put in 10 instead of I. anybody know how i can do that? TIA Randy -- 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] /19, the / doesn't work??
Hi! When I put the data, /19; into a PHP variable, I found that it produce only 9 in the variable. PHP probably think that /1 is like /r, /n, etc. So, what substitute do I need to use to make it /19 instead of 9. I don't know of any PHP code or shortcut to cancel out that effect. 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]
Re: [PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?
Jeff, Let's start 'casting around' then. If you've already done these (I may not have read all of your posts) please discuss the results of the following: 1 what happens when you run the script in a browser? 2 with/without the -c and/or -q options, what happens when you run another PHP script from the command line? 3 if PHP is in the PATH, what happens if C:\ is the current directory and you attempt to run PHP (with or without an argument/script filename)? Do you have another PHP script that has sent email/used the mail() function successfully? Please advise, =dn the path to php is already in the PATH variable... I'm not doing anything different that http://bugs.php.net/bug.php?id=6742 ,but for some reason the -c doesn't make a difference... Jeff. Dl Neil [EMAIL PROTECTED] wrote in message 0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$2916100a@jrbrown... Jeff, The following batch files works for me (WinNTWS 4.0 SP6a):- cd c:\program files\php php.exe -q c:\.path.\w.php c:\.path.\webute.log NB the first line reflects my PHP config - your mileage may vary! Of course the other possibility is to add the PHP folder into the PATH environment variable... Regards, =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: ; [EMAIL PROTECTED] Sent: 18 January 2002 07:00 Subject: [PHP-WIN] command line are -c doesn't work on win2k? I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr Then I found a solution at http://bugs.php.net/bug.php?id=6742 , [22 Nov 2000 5:21am] [EMAIL PROTECTED] After a few emails this really got solved. Adding -c/path/to/phpini/ (command line) was the solution. --Jani but, when I tried it, php -c c:\php mail_test.php, Again, the results were, X-Powered-By: PHP/4.0.6Content-type: text/html attempting to deliver the mail brbWarning/b: Unknown error in bmail_test.php/b on line b3/bbr So, I tried a gazillion permitations on -c, -c /php, -c c:/php -c:\php\php.ini, etc, etc, etc, to no avail... I finally moved the script into the same dir as php.exe and it worked fine. The problem is that I need to run the script from the normal path and not from c:\php... Does the -c switch actually work? How can I run this script from another dir? Is this a bug? Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP Windows 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]
Re: [PHP] /19, the / doesn't work??
That's weird. But try '\/19; use the back-slash to escape the control character. Scott Fletcher wrote: Hi! When I put the data, /19; into a PHP variable, I found that it produce only 9 in the variable. PHP probably think that /1 is like /r, /n, etc. So, what substitute do I need to use to make it /19 instead of 9. I don't know of any PHP code or shortcut to cancel out that effect. Thanks, Scott -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] /19, the / doesn't work??
I tried your suggest and it doesn't work. Sorry! Thanks, Scott Richard Crawford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... That's weird. But try '\/19; use the back-slash to escape the control character. Scott Fletcher wrote: Hi! When I put the data, /19; into a PHP variable, I found that it produce only 9 in the variable. PHP probably think that /1 is like /r, /n, etc. So, what substitute do I need to use to make it /19 instead of 9. I don't know of any PHP code or shortcut to cancel out that effect. Thanks, Scott -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- 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] Does somebody knows a good Authentication Sample in PHP
Hi, I am looking for a good sample in order to implement security in some htm pages using PHP using Login/Paswword implementation. Let me know if somebody knows about it. Best Regards !! Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
No, but you're getting close. The .ini is in the same dir as the .exe and I'm guessing you guys aren't trying to diagnose this on a windows machine since we're covering all the simple things first. I don't mean to sound like a jerk, but I've covered all the possibilties I can think of. back-slashes, forward slashes, case sensitivity, spaces in the path c:\program files\apache group\apache... I'm guessing the -c (not the -C) switch isn't working on the win32 version. If I move the ini file into the path where I run the script, then the script works fine. so that... C:\Program Files\Apache Group\Apache\htdocs\new_spokanephp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php and when i move the mail_test.php script into a dir one level higher and type C:\Program Files\Apache Group\Apache\htdocs\new_spokanephp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php the script fails which the error C:\Program Files\Apache Group\Apache\htdocsphp -c c:\program files\apache group\apache\htdocs\new_spokane mail_test.php X-Powered-By: PHP/4.0.6 Content-type: text/html br bWarning/b: Unknown error in bmail_test.php/b on line b2/bbr C:\Program Files\Apache Group\Apache\htdocs Hope this helps... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: Jeff D. Hamann [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:53 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP
Re: [PHP] /19, the / doesn't work??
/19 is ok, but \19 really fails. Try put \\19 instead. Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: Scott Fletcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 7:45 PM Subject: [PHP] /19, the / doesn't work?? Hi! When I put the data, /19; into a PHP variable, I found that it produce only 9 in the variable. PHP probably think that /1 is like /r, /n, etc. So, what substitute do I need to use to make it /19 instead of 9. I don't know of any PHP code or shortcut to cancel out that effect. 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]
Re: [PHP] command line are -c doesn't work on win2k?
do you have an ini, not the exe, file in c:\winnt\system32 ? jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: Jeff D. Hamann [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:53 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] /19, the / doesn't work??
I'm posting the result and solution that work! At least the problem is now fixed, thanks to Richard Crawford. - clip Oh! In your first e-mail, you used a forward slash, not a back slash. That was kind of confusing. Heh. Try using \\19 -- two back slashes. It worked well for me; you can see the quick test page I made at http://www.mossroot.com/weirdstuff.php Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! - clip Scott Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried your suggest and it doesn't work. Sorry! Thanks, Scott Richard Crawford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... That's weird. But try '\/19; use the back-slash to escape the control character. Scott Fletcher wrote: Hi! When I put the data, /19; into a PHP variable, I found that it produce only 9 in the variable. PHP probably think that /1 is like /r, /n, etc. So, what substitute do I need to use to make it /19 instead of 9. I don't know of any PHP code or shortcut to cancel out that effect. Thanks, Scott -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: odbc linux to win2000
I think I know it again. There is no sqlbase-odbc driver available for linux, only for win2000. So I have to write a bridge, which runs on win2000 and answers the php-sql-requests. sorry for this question ergin aytac Ergin Aytac [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to make a database connection with odbc. My php-script is running on linux, the database (centura sqlbase 7.5) is running on win2000. Is it possible to make a direct odbc-connection to the database or do I really need a software-bridge for this connection? Someone said it is unpossible without a software-bridge, even though when I use odbc. But I forgot why, how und who... thanx ergin aytac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Feature Suggestion
range() is good, but what I was getting at was a shorthand/shortcut/alternate syntax kinda thing. Mike Julio Nobrega Trabalhando wrote: ?php $array = range('a','z'); ? As usual your mileage may vary but it worked here :-) -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Mike Eheler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If this is the wrong place for it, please point me to the right place. This is real small, though.. I'd like to see a shorthand for defining arrays.. for example $ucase_alphabet = array(['A'..'Z']); (creates an array of all alphabet characters, uppercase) $numeric = array([1..100]); Or something of that sort. Just something that popped into my mind. PHP feels like a language that has been built on little suggestions like this, so I thought I'd post it. :) Mike -- 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] bug in echo function?
I ran across a curious bug in the echo function this morning. My PHP is Debian binary 4.1.1-1. The first example below does not work (it should draw a checkerboard-like table): - html head titleChess/title body table border=1 ? for ($i=0 ; $i8 ; $i++) { echo tr align=center valign=center; for ($j=0 ; $j8 ; $j++) { echo td . ($i*8)+$j . /td; } echo /tr\n; } ? /table /body /html - However, by changing the echo line to two echo lines, it works as desired: - html head titleChess/title body table border=1 ? for ($i=0 ; $i8 ; $i++) { echo tr align=center valign=center; for ($j=0 ; $j8 ; $j++) { echo td; echo ($i*8)+$j . /td; } echo /tr\n; } ? /table /body /html - I don't see any limitations about concatenating strings in the man page of the echo statement. Perhaps this is a bug? Billy -- 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] Does somebody knows a good Authentication Sample in PHP
I am using: PHP4.01 CGI Version on W2K Greetings !! Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 - Remitido por Ignacio Estrada Fonseca/CEN/GDL/CFE con fecha 01/18/2002 12:41 - ignacio.estrada@ cfe.gob.mx Para: [EMAIL PROTECTED] cc: 01/18/2002 11:55Asunto: [PHP] Does somebody knows a good Authentication Sample in PHP Hi, I am looking for a good sample in order to implement security in some htm pages using PHP using Login/Paswword implementation. Let me know if somebody knows about it. Best Regards !! Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] bug in echo function?
Good day, The reason that the first statement doesn't work as intended is due to the order that the operands are processed. The operands in the line: td . ($i*8)+$j . /td are being processed like this: (td . ($i*8))+($j . /td) If you change the line to: td . (($i*8)+$j) . /td then you'll get the desired result. Rule of thumb: Use parenthesis whenever you have a complex operation to ensure the result is what you want. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Billy Harvey [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 11:44 AM To: php Subject: [PHP] bug in echo function? I ran across a curious bug in the echo function this morning. My PHP is Debian binary 4.1.1-1. The first example below does not work (it should draw a checkerboard-like table): - html head titleChess/title body table border=1 ? for ($i=0 ; $i8 ; $i++) { echo tr align=center valign=center; for ($j=0 ; $j8 ; $j++) { echo td . ($i*8)+$j . /td; } echo /tr\n; } ? /table /body /html - However, by changing the echo line to two echo lines, it works as desired: - html head titleChess/title body table border=1 ? for ($i=0 ; $i8 ; $i++) { echo tr align=center valign=center; for ($j=0 ; $j8 ; $j++) { echo td; echo ($i*8)+$j . /td; } echo /tr\n; } ? /table /body /html - I don't see any limitations about concatenating strings in the man page of the echo statement. Perhaps this is a bug? Billy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Scripts keep refreshing
Yeah i thought it would be something like that too at first, but it happens to all scripts and most of them don't use header(Location:...); Julio Nobrega Trabalhando [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Maybe you were doing something like this: if (function() == true) { header(Location: this_page.php); } And your function() is now broken because you upgraded to php4? It's probaly something like this, some function that worked on php3 and now it's not. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 -- 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] mailing list manager
Hello, i need a mailing list manager in php, with which i can send html email and store my subscribers in a mysql database anyone knows where i can get one? thanks, Christophe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] bug in echo function?
Good day, No, that's not it. It's just a simple matter of order of operations. You have an expression- that expression needs to be evaluated into one thing, and that one thing is then passed to echo() as the single argument. I'm not a php expert, but evidently the . operator is evaluated before the * operator, which in turn is evaluated before the + operator. Perhaps it would be easier to understand if you thought of the . operator like the exponent operator in math- it is evaluated before * or + is. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Billy Harvey [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 12:07 PM To: Darren Gamble Cc: php Subject: RE: [PHP] bug in echo function? On Fri, 2002-01-18 at 13:54, Darren Gamble wrote: Good day, The reason that the first statement doesn't work as intended is due to the order that the operands are processed. The operands in the line: td . ($i*8)+$j . /td are being processed like this: (td . ($i*8))+($j . /td) If you change the line to: td . (($i*8)+$j) . /td then you'll get the desired result. Rule of thumb: Use parenthesis whenever you have a complex operation to ensure the result is what you want. Hmmm - so my assumption that the concatenation operator between the strings gives them a delination equivalent to listing this as three separate echo statements is incorrect, I take it. Shouldn't the echo function process it in this manner from a standpoint of consistency? Thanks for the clarification. Billy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] quick and easy(php newbie)
Try something like: $Entry = $openingEntry . $numberAtt . \ . $myNumber . \ . $nameAtt... and so on. travis wrote: just a quick syntax question: here is my php ? $openingItemTag = item\n; $openingEntry = entry ; $numberAtt = number=; $nameAtt = name=; $dateAtt = date=; $messageAtt = message=; $linkAtt = link=; $closingEntry = /\n; $closingItemTag = /item; $Entry= $openingEntry.$numberAtt.$myNumber.$nameAtt.$myName.$dateAtt.$myDate. $messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry; $Item = $openingItemTag.$Entry.$closingItemTag; $fp = fopen (news.xml, a); fwrite($fp,$Item); fclose($fp); ? if done twice it returns this: item entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /itemitem entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /item i want it to display as follows: item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item now it is writing to the file I want perfectlybut but but I need to add quotes around the attributes and spaces between each attribute, and a line break before each item what do I need to add to $Entry to get that to display correctly -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] bug in echo function?
On Fri, 2002-01-18 at 13:54, Darren Gamble wrote: Good day, The reason that the first statement doesn't work as intended is due to the order that the operands are processed. The operands in the line: td . ($i*8)+$j . /td are being processed like this: (td . ($i*8))+($j . /td) If you change the line to: td . (($i*8)+$j) . /td then you'll get the desired result. Rule of thumb: Use parenthesis whenever you have a complex operation to ensure the result is what you want. Hmmm - so my assumption that the concatenation operator between the strings gives them a delination equivalent to listing this as three separate echo statements is incorrect, I take it. Shouldn't the echo function process it in this manner from a standpoint of consistency? Thanks for the clarification. Billy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: odbc linux to win2000
Hi Ergin, Not entirely true - ODBC drivers to MS SQL Server and Sybase, etc are available. You may use OpenLink's Multi-Tier driver, which has linux client support. Free downloads are available at http://www.openlinksw.com and free support is offered at http://www.openlinksw.com/support/suppindx.htm if you run into problems. You will need to link your PHP against the iODBC Driver Manager, as per the HOWTOs at www.iodbc.org. Let me know how you get on. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Ergin Aytac [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 1:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: odbc linux to win2000 I think I know it again. There is no sqlbase-odbc driver available for linux, only for win2000. So I have to write a bridge, which runs on win2000 and answers the php-sql-requests. sorry for this question ergin aytac Ergin Aytac [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to make a database connection with odbc. My php-script is running on linux, the database (centura sqlbase 7.5) is running on win2000. Is it possible to make a direct odbc-connection to the database or do I really need a software-bridge for this connection? Someone said it is unpossible without a software-bridge, even though when I use odbc. But I forgot why, how und who... thanx ergin aytac -- 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] quick and easy(php newbie)
just a quick syntax question: here is my php ? $openingItemTag = item\n; $openingEntry = entry ; $numberAtt = number=; $nameAtt = name=; $dateAtt = date=; $messageAtt = message=; $linkAtt = link=; $closingEntry = /\n; $closingItemTag = /item; $Entry= $openingEntry.$numberAtt.$myNumber.$nameAtt.$myName.$dateAtt.$myDate. $messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry; $Item = $openingItemTag.$Entry.$closingItemTag; $fp = fopen (news.xml, a); fwrite($fp,$Item); fclose($fp); ? if done twice it returns this: item entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /itemitem entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /item i want it to display as follows: item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item now it is writing to the file I want perfectlybut but but I need to add quotes around the attributes and spaces between each attribute, and a line break before each item what do I need to add to $Entry to get that to display correctly
[PHP] disable_functions on virtual hosts?
I'd like to disable certain functions for a particular virtual host, and leave them as is for all the rest. The usual way to do this would be to include something like: php_admin_value disable_functions system,exec in the virtual host's configuration block. However, this doesn't work, and scripts are still able to use the disabled functions. phpinfo() shows system,exec under local value for disable_functions, which would seem to indicate that the configuration is correct, even though it doesn't work. I made a little experiment and added those functions to php.ini's disable_function directive, and in this case it works perfectly, and the specified functions are disabled. I'm wondering if I'm missing something here, or is this a known problem with PHP? This is PHP 4.0.6 running on OpenBSD 2.9 with Apache 1.3.19. I guess I can live without disabling those functions on one particular virtualhost, but I'd sleep better knowing they are disabled. Thanks in advance! - Daniel Manrique -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: quick and easy(php newbie)
heres a question, I am using this to update an xml file... the vars originate from a flash interface, so they are all strings, do I need to worry about anything here? should i be usiung arrays in php to house the info or is this sufficient? I am using php only to add new entries, the flash parses and loads the xml file seperately Travis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... just a quick syntax question: here is my php ? $openingItemTag = item\n; $openingEntry = entry ; $numberAtt = number=; $nameAtt = name=; $dateAtt = date=; $messageAtt = message=; $linkAtt = link=; $closingEntry = /\n; $closingItemTag = /item; $Entry= $openingEntry.$numberAtt.$myNumber.$nameAtt.$myName.$dateAtt.$myDate. $messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry; $Item = $openingItemTag.$Entry.$closingItemTag; $fp = fopen (news.xml, a); fwrite($fp,$Item); fclose($fp); ? if done twice it returns this: item entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /itemitem entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/ /item i want it to display as follows: item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item item entry number=01 name=travis date=01.08.02 message=hello world link=http://www.me.com/; /item now it is writing to the file I want perfectlybut but but I need to add quotes around the attributes and spaces between each attribute, and a line break before each item what do I need to add to $Entry to get that to display correctly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Variable problem
Use an array !?, I mean : $result[$i] = test; How do I combine the following so it is treated as one variable $i=10 $result$i=test; I want this to be: $result10=test; $i changes so I cannot just put in 10 instead of I. anybody know how i can do that? -- Yoel Benitez Fonseca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and COM - Syntax question
Figured it out. Pulled out the -Close() and had the quit() just override the save. Here's the new function in case anyone cares. function spellcheck($string){ $word = new COM(word.application) or die(Unable to instanciate Word); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; $word-Quit(false); $word-Release(); $word = null; return $corrected; } J Wynia phpgeek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] function arguments
Hi, how do i tell a function which arguments can be passed and which must be passed... example: function func($arga, $argb, $argc) { do_something_with_arga; do_another_thing_with_argb; and_if_argc_was_passed_do_something_with_it_too; } because i dont want to pass argc if i dont need it, and to pass void arguments like '' is annoying...
[PHP] writing xml with php
this is a long one so bear with me... my current php script * ? $openingItemTag = item\n; $openingEntry = ' entry '; $numberAtt = 'number='; $nameAtt = ' name='; $dateAtt = ' date='; $messageAtt = ' message='; $linkAtt = ' link='; $closingEntry = \/\n; $closingItemTag = /item\n; $Entry= $openingEntry.$numberAtt.$myNumber.$nameAtt.$myName.$dateAtt.$myDate. $messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry; $Item = $openingItemTag.$Entry.$closingItemTag; $fp = fopen (news.xml, a); fwrite($fp,$Item); fclose($fp); ? * writes thie following to my file perfectly: * item entry number=00 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=01 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=02 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=03 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=04 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item * how would i get it to write this: * menu item entry number=00 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=01 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=02 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=03 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item item entry number=04 name=travis date=01.08.02 message=hello world! link=http://www.fourm.com/ /item /menu * so how can i add an opening menu tag and a closing menu tag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] function arguments
You can do something like this: function myFunction($a = hello, $b = world) { } Both arguments are optional and have default values. This is in the documentation. -- Ben Sinclair [EMAIL PROTECTED] - Original Message - From: Malte Fucks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 18, 2001 2:17 PM Subject: [PHP] function arguments Hi, how do i tell a function which arguments can be passed and which must be passed... example: function func($arga, $argb, $argc) { do_something_with_arga; do_another_thing_with_argb; and_if_argc_was_passed_do_something_with_it_too; } because i dont want to pass argc if i dont need it, and to pass void arguments like '' is annoying... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] command line are -c doesn't work on win2k?
Jeff, FWIW my system is set up to hold PHP in C:\program files\php, which is where the php.exe can be found. PHP.ini is supposed to be in c:\winnt isn't it? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 18:23 Subject: Re: [PHP] command line are -c doesn't work on win2k? do you have an ini, not the exe, file in c:\winnt\system32 ? jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: Jeff D. Hamann [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:53 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Jeff, If mail is working, then agree with your point about config. Appendix B. Using PHP from the command line Usage: php [-q] [-h] [-s [-v] [-i] [-f file] | {file [args...]} -q Quiet-mode. Suppress HTTP Header output. -C Do not chdir to the script's directory -c path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 18 January 2002 17:25 Subject: Re: [PHP] command line are -c doesn't work on win2k? This will work from the dir that contains php.exe.. ? mail( [EMAIL PROTECTED], subject, test ); ? here are the php.ini smtp lines... [mail function] ; For Win32 only. ;SMTP = stimpy - this works fine as does SMTP = 192.168.0.2 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] I don't see how this could be a config problem. The emails I have been sending state that the script works *fine* from the same dir as php.exe. The problem arises when I attempt to run the script from another directory... Jeff. - Original Message - From: DL Neil [EMAIL PROTECTED] To: mike cullerton [EMAIL PROTECTED]; Jeff D. Hamann [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18, 2002 9:09 AM Subject: Re: [PHP] command line are -c doesn't work on win2k? Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can make advice on the forum 'tricky'. On Windows the email msg is shunted out of PHP and thrown at the SMTP server with no ceremony - and no 'backwards' communication eg a confirmatory msg got it thanks. Whereas *nix systems allow for some discussion between PHP and sendmail (for example). =thus under Windows the quality of the email address is almost irrelevant (to PHP at least). However the email lines from PHP.INI will be of interest. Can you post them please Jeff? =Regards, =dn on 1/18/02 9:14 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: nope. no difference. jeff. Mike Cullerton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 1/18/02 12:00 AM, Jeff D. Hamann at [EMAIL PROTECTED] wrote: I've been trying to figure out what was wrong with my script... ? mail([EMAIL PROTECTED], Subject, command line mail() test); ? from the command line, php mail_test.php and getting, X-Powered-By: PHP/4.0.6 Content-type: text/html attempting to deliver the mailbr bWarning/b: Unknown error in bmail_test.php/b on line b3/bbr didn't notice any other responses, and this is just a guess here, but how about taking the '()' out of the body of the message. ie, command line mail test -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the
[PHP] printing html
Hi friends, =) someone have experience using printer functions ? I mean... I would like to print a php generated page with a link within this page example: I have an html page with a table..but I need to print without header, footer and also I need to print in landscape... all of this with a link within this generated page. can I do this with PHP ? thanks for your advice. best regards.. (sorry me... my english isn't good enough) :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] function arguments
expanding on this... function func($arga, $argb, $argc='') { do_something_with_arga($arga); do_another_thing_with_argb($argb); if ($argc != '') do_somthing_with_argc($argc); } on 1/18/02 1:19 PM, Ben Sinclair at [EMAIL PROTECTED] wrote: You can do something like this: function myFunction($a = hello, $b = world) { } Both arguments are optional and have default values. This is in the documentation. -- Ben Sinclair [EMAIL PROTECTED] - Original Message - From: Malte Fucks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 18, 2001 2:17 PM Subject: [PHP] function arguments Hi, how do i tell a function which arguments can be passed and which must be passed... example: function func($arga, $argb, $argc) { do_something_with_arga; do_another_thing_with_argb; and_if_argc_was_passed_do_something_with_it_too; } because i dont want to pass argc if i dont need it, and to pass void arguments like '' is annoying... -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] printing html
You might have better luck using the Print command from MSIE or Netscape, something which allows you to set up printer parameters. fitiux wrote: Hi friends, =) someone have experience using printer functions ? I mean... I would like to print a php generated page with a link within this page example: I have an html page with a table..but I need to print without header, footer and also I need to print in landscape... all of this with a link within this generated page. can I do this with PHP ? thanks for your advice. best regards.. (sorry me... my english isn't good enough) :-) -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- 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] Uploading file to php
Hi, I followed the examples in the FAQ and was able to make the upload work, using client HTML code similar to this: FORM NAME=the_form ENCTYPE=multipart/form-data METHOD=POST ACTION=somephp.php File Name: INPUT NAME=filename TYPE=file INPUT TYPE=submit VALUE=submit /FORM The problem is that it works great with Netscape, but fails with IE. If the client is Netscape, the somephp.php program gets the $filename= /tmp/phpmo4QE9 and $filename_name=BackB.gif (or whatever) When the client is IE (I tried V5.5 and 6.0) I get $filename=F:\\disk_e\\Butter\\BackB.gif and $filename_name (etc) are empty. Has anyone else run into this? Any suggestions as to how I can further debug this? Thanks, Mike at nutfield.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to send to URL on if statement?
Can anyone advise or direct me to the documentation that references how to send a user to a URL if an 'if' statement is satisfied? Thanks! Andrea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to send to URL on if statement?
Can anyone advise or direct me to the documentation that references how to send a user to a URL if an 'if' statement is satisfied? Assuming you hadn't sent any output before: if ($condition){ header(Location: http://wherever.com;); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to send to URL on if statement?
Sorry, I'm new at this... I have already sent output... any way to do this? Thanks again, Andrea Ing. Daniel Manrique [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can anyone advise or direct me to the documentation that references how to send a user to a URL if an 'if' statement is satisfied? Assuming you hadn't sent any output before: if ($condition){ header(Location: http://wherever.com;); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and COM - Syntax question
Hopefully this is my last reply on this thread. I discovered after opening Word normally after a few dozen tests, that it tried to recover all those lost documents. The following demo script has that fixed. ?php function spellcheck($string){ $word = new COM(word.application) or die(The spellcheck function requires MS Word.); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; $word-ActiveDocument-Close(false); $word-Quit(false); $word-Release(); $word = null; return $corrected; } if ($text) { $checkedtext= spellcheck($text); print($checkedtext); } else { ? form action=spellcheck.php method=post Enter Texttextarea name=text/textarea input type=submit /form ?php } ? -- 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]