[PHP] Unveilled Metabase OOP direct to driver object API
Hello, If you are reading this and do not know what is Metabase, be aware that it is PHP database abstraction package for developing truely portable database independent functions. Metabase development will complete 3 years next week. This is a lot of time in the software development world. More information available in the usual place: http://phpclasses.UpperDesign.com/browse.html/package/20 Despite my baby son is monopolizing almost all my free time (I am not complaining :-) ) I finally made time to clean up Metabase API and document a OOP API that is alternative to the Metabase* global functions API, so that now you can use Metabase functions using direct calls to driver class objects. This API has always been available but it was never documented because to enable it, I needed to use a syntax that would break under PHP 3. Finally I realized that I could use eval() to work around that problem and Metabase provides this OOP direct to driver function API preserving backwards compatibility to not affect the applications of those that for some reason still need to use PHP 3. I know that some people that use Metabase still have to use PHP 3 and I simpathize with their constraints. Anyway, finally OOP fans should have no more excuses for not adopting Metabase as their PHP database abstraction of choice. If you thought that typing MetabaseQuery($database,Select * from zbr); would make an hell of difference when compared to $db-Query(Select * from zbr); you should please now with Metabase with this symbolic Christmas gift. Also the performance fanatics should have one less excuse for not using Metabase for some so claimed significant overhead that Metabase global functions add to driver function calls. Soon I will also be adding functions for fetching row data in bulk contributed by Lukas Smith that is giving up his own database abstraction package for Metabase, contributing to make the best that PHP community deserve. More innovating developments will follow. Enjoy. :-) Merry X-mas, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Mommy, is it true that...?
Ermmm are we forgetting the sprintf function? That is doing exactly what you are trying (and succedding) to accomplish if ($delete $id) $sql=sprintf(delete from tbl where id = %d,$id); Personally I also use a small extra security if ($delete $check==md5(SECURITYWORD . $delete)) $sql=sprintf(delete from tbl where id = %d,$delete); This makes sure that the person is using the correct path. Jerry -Original Message- From: Jaime Bozza [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 7:32 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mommy, is it true that...? Another way I validate input is by using settype(); For instance: settype($id, integer); I use addslashes and settype on all data coming from a browser that ends up being using in a query. (abs will convert negative numbers, which may be what you want, but then again. G) Jaime Bozza -Original Message- From: Nathan Cassano [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 11:34 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mommy, is it true that...? One thing that I do know is dangerous is deleting rows based on an integer field with an unprocessed value; Example: Delete row script ? if($delete $id){ delete from mytable where id = $id; } ? By simply appending an all inclusive sql clause. $id = 21421 or 1 = 1; Ca-Boom! The entire table has been deleted. Don't you feel dumb! Instead process the input. $id = abs($id); -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 5:40 PM To: [EMAIL PROTECTED] Subject: [PHP] Mommy, is it true that...? 2. Please enter your age: 25; drop database mysql Does this actually work? I've read at least a dozen articles telling people to get it in their blood not to trust users and addslashes to any king incoming data, as well as pass it as strings to mysql (insert into person set age='$age' instead of insert into person set age =$age). So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. Did you ever actually try this? Does it work on your system? Thanks in advance for the input! Bogdan -- PHP General Mailing List (http://www.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] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sessions
Since turning of register_globals in the php.ini file, sessions don't seem to be working any more, does anyone know why? == Philip MacIver -- PHP General Mailing List (http://www.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] strange empty array behavior being at in_array()
I wonder why something non-empty is considered to be an empty array element: === if ( in_array('pattern', array( 0 ) ) ) print Got it; === I got the true condition. However, after I populate the array with antries other than 0 and '' the condition fails. I think that would not be PHP error. But what's the thing I misunderstood? -- PHP General Mailing List (http://www.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: 4.0.6 Vs. 4.1.0 ?
I found that 4.1.0 is not exactly backwards compatible r.e. the new more secure variables as I think you have to change one of the settings in php.ini to get it to work. I've had no real problems running it as a module under Apache 1.3.20 on Win98. Robert Dyke [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi ... I'm getting ready to do a custom install of PHP on a Pair Networks server, and I'm wondering which version I should go with. It seems like version 4.1.0 has some major changes and new features, which can sometimes create bugs in the world of software. What are your thoughts? Pros and Cons? Thanks in advance. Robert Dyke Montana Software http://www.montanasoft.com/ [EMAIL PROTECTED] * For the best results please include the text of this message (cut and paste if necessary) in your reply * -- PHP General Mailing List (http://www.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] Stopping $_REQUEST array to give warnings
Hello, I'm currently trying to code the new PHP way, so register_globals=OFF, but if I try to do things like $test = $_REQUEST[test]; and the variable test is unknown you receive a warning Warning: Undefined index: test in c:\webserver\test.php What is the new 'proper' way to import a variable in a script without being sure it was passed? (adding a @ to the beginning of the line is not proper you must agree) Thanks, Michael -- PHP General Mailing List (http://www.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 parse an XML document
Hi again. Unfortunatelly, there is not any extra module installed on my remote server in order to parse XML docs. Does anybody know a way to parse them or must I try with Perl? Best regards. --- You wrote: http://www.php.net/manual/en/ref.xml.php HTH. James Cox -Original Message- From: PHP Rules [mailto:[EMAIL PROTECTED]] Sent: 23 December 2001 10:15 AM To: [EMAIL PROTECTED] Subject: [PHP] How to parse an XML document Hi fellas. I would like to know the way to parse an XML document. I come from Java world, and you can handle an XML document, and then show it as an HTML page. I suppose that it's also possible by using PHP, isn't it? I would like also to know if it's available in the 'standard installation' of PHP. I mean, I want to develop this on a remote server. It uses PHP, and I suppose that it's not installated any extra module, so I wonder if the XML parsing needs any extra module or not. Best regards. - This mail was sent through TJGROUP Webmail: http://webmail.tjgroup.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] strange empty array behavior being at in_array()
Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you found is predictable, as we know how PHP behaves when converting strings to integer values... And 'pattern' evaluates to 0 -- '55pattern' for example doesn't match -- but then again, what kinda word is that? :-) HTH Bogdan Peter Vereshagin wrote: I think that would not be PHP error. But what's the thing I misunderstood? -- PHP General Mailing List (http://www.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] Authenitcation problem with IE on Win2k
Dear list, I run a site with php authentication wich works fine with my IE on Win98. The authentication is on page 1 and I can see page 2 and 3 also, because the browser remembers my login ... When I try to do this with the IE on Win2k I can authenitcate on page 1 but whe I switch to page 2 or 3 the browser askes me to login again ... any hints? ThanX, Martin - DI Martin Schichl SCC Software, Communication Consulting GmbH Co KEG Grottenhofstr. 3, A-8053 Graz Tel. +43/(0)316/265-205, Fax +43/(0)316/265-234 mailto:[EMAIL PROTECTED] http://scc.co.at -- PHP General Mailing List (http://www.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 empty array behavior being at in_array()
Bogdan Stancescu wrote: Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you found is predictable, as we know how PHP behaves when converting strings to integer values... you mean PHP converts string pattern to integer before apply pattern? But what's the kind of technique? ASCII? And 'pattern' evaluates to 0 -- '55pattern' for example doesn't match -- but then again, what kinda word is that? :-) I see no reason not to consider it to evaluate to 0 the same way:) Either, you probably mean digits' sense? what kind of? Peter Vereshagin wrote: I think that would not be PHP error. But what's the thing I misunderstood? -- PHP General Mailing List (http://www.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 compile Apache/PHP
At 07:22 PM 12/23/2001 -0500, Brian Clark wrote: * Todd Cary ([EMAIL PROTECTED]) [Dec 23. 2001 10:42]: I am quite new to the Linux environment and do not have experience with make files. The platform is RH Linux 7.2 with the included Apache and the PHP rpm, php-devel-4.0.4pl1-9.i386.rpm. I need someone to give me the step by step process of creating a version of Apache that will process PHP extensions. That's a tall order without knowing exactly what's what with your system. :-) Many thanks.. http://www.php.net/manual/en/install.unix.php Which isn't exactly what you want.. And see the comments here: http://www.php.net/manual/en/install.linux.php I can tell you that you will have problems. It's all a part of the learning process. No two systems are likely to be the same when it comes to installing this stuff. The RPMs with -devel aren't the precompiled Ready made executables. These may also help: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html http://www.efn.org/~rzeller/mysql/mysql-etc.txt I would suggest learning to install all of this stuff from source archives, rather than depending on RPMs, for the first time. I know all of the above is kinda spotty, but I hope it gets you started. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 All you will ever be you are now becoming. Todd, I endorse Brian's recommendations. Fetching the installation docs for Apache is a good idea too. Use Soothingly Seamless as the general guide, adding the switches/modules that seem to make sense based on your reading of the Apache and MySQL installation docs. One little quirk. When you install MySQL from source the path to it is different than when you install it from an rpm. One of them, and I can't remember which, adds an extra directory layer. But really, go with the compile from source. Merry Christmas - Miles Thompson -- PHP General Mailing List (http://www.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 empty array behavior being at in_array()
RTFM: http://www.php.net/manual/en/language.types.type-juggling.php Peter Vereshagin wrote: Bogdan Stancescu wrote: Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you found is predictable, as we know how PHP behaves when converting strings to integer values... you mean PHP converts string pattern to integer before apply pattern? But what's the kind of technique? ASCII? And 'pattern' evaluates to 0 -- '55pattern' for example doesn't match -- but then again, what kinda word is that? :-) I see no reason not to consider it to evaluate to 0 the same way:) Either, you probably mean digits' sense? what kind of? Peter Vereshagin wrote: I think that would not be PHP error. But what's the thing I misunderstood? -- PHP General Mailing List (http://www.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] Merry christmas!
Same to you (and everyone else)! (hey, at least it's a benign off-topic thread. ;] ) Have a lovely day tomorrow, - Erik -Original Message- From: Emile Bosch [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 23, 2001 4:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Merry christmas! Yeah i know it's offtopic =) Anyway, i wish you all the best! Cu in the next year! Warm regards, Emile -- PHP General Mailing List (http://www.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] Fulltext-Search
Hello! Does anybody know a good script to search the own web-server?! Would be nice if the script could display the whole sentence where the word was found... Martin -- PHP General Mailing List (http://www.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] Fulltext-Search
http://www.htdig.org/ Martin wrote: Hello! Does anybody know a good script to search the own web-server?! Would be nice if the script could display the whole sentence where the word was found... Martin -- PHP General Mailing List (http://www.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] gd_installation
Hi , I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll extension . I can use other extensions succesfully (like php_mssql.dll ,php_pdf.dll etc.) . Did anyone can help me about this subject? Sincerely. Emin ÇALIKLI E-mail : [EMAIL PROTECTED] The information contained in this e-mail (including any attachments) is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. Finanbank A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of Finansbank A.S. Bu e-posta'nin içerdigi bilgiler (ekleri dahil olmak üzere) gizlidir. Onayimiz olmaksizin üçüncü kisilere açiklanamaz. Bu mesajin gönderilmek istendigi kisi degilseniz, lütfen mesaji sisteminizden derhal siliniz. Finansbank A.S. bu mesajin içerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne sekilde olursa olsun içeriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu degildir. Bu mesajin içerigi yazarina ait olup, Finansbank A.S.'nin görüslerini içermeyebilir. == -- PHP General Mailing List (http://www.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 permissions/ownership
I'll try to be both concise and precise with this. I have some PHP code like this: if (!rename($path_to_file,$path_to_file_BACKUP)) die($unable_to_access_file_msg $path_to_file_BACKUP); $buffersize = round(filesize($path_to_file_BACKUP)*1.5); $fp_in = fopen($path_to_file_BACKUP,r) or die($unable_to_access_file_msg $path_to_file_BACKUP); $fp = fopen($path_to_file,'a') or die($unable_to_access_file_msg $path_to_file); set_file_buffer($fp,$buffersize); fwrite($fp,hello) or die(HELP!); fclose($fp); This works, sort of. It dies with HELP! The rename happens exactly as required. However, when PHP creates the $fp file, the owner and permissions are different. I can chmod the permissions, through PHP (chmod($path_to_file,0777) , but I can't seem to change the owner, using chown (it says it is not allowed). The original file, before being renamed and the directory are 0777. After the rename, the old file is still 0777, but the new file ($fp) is 0644. It appears that the new owner is the root directory for the server document (in this case 1792=www), instead of the group. As an example, before the rename, the owner is 1444 as is the group. When $fp is created, the owner is now 1792 but the group is still 1444 (user name of the ftp account). On most systems, this seems to work ok. But on some linux systems, it fails due to the ownership. The PHP program cannot write to the new file. I'm hoping that I'm overlooking some minor/major factor here, that someone will/can point out. How does PHP, or is it the server, get ownership? I hope this make sense. Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.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: Sessions
By design. Try accessing $HTTP_SESSION_VARS instead. That should work. In other words, if you were accessing a session variable by $session_var, now use $HTTP_SESSION_VARS['session_var']. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Philip Maciver [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Since turning of register_globals in the php.ini file, sessions don't seem to be working any more, does anyone know why? == Philip MacIver -- PHP General Mailing List (http://www.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: arrays
The best thing for converting XML to HTML is XSLT (that's what it was made for). PHP can do the convertion using the XSLT functions (which require Sablotron): http://www.php.net/manual/ref.xslt.php Peter Php Dood [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to figure out how to parse an xml document, and convert it into html... i know how to parse in simple xml stuff for example easyeasy/easy is pretty easy to parse in, and i know how to code that, but when you start adding flags that i'm going to need variables for, example easy does=1 it=2easy/easy is not so easy. *** paste sample xml *** report gmt_date=1206082001 unix_date=992001907.00 location city=11531 forecast day_sequence=1 day_of_week=6 daylight=D date=060801 high_temp=24.78 low_temp=14.51 sky_desc=3 precip_desc=* temp_desc=8 air_desc=* uv_index=7 wind_speed=18.51 wind_dir=270 humidity=48 dew_point=12.01 comfort=25.28 rainfall=* snowfall=* precip_prob=0 icon=2 / forecast day_sequence=2 day_of_week=7 daylight=D date=060901 high_temp=20.34 low_temp=13.68 sky_desc=1 precip_desc=* temp_desc=7 air_desc=20 uv_index=7 wind_speed=18.51 wind_dir=270 humidity=57 dew_point=9.23 comfort=19.23 rainfall=* snowfall=* precip_prob=2 icon=1 / forecast day_sequence=3 day_of_week=1 daylight=D date=061001 high_temp=20.35 low_temp=12.01 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=56 dew_point=9.80 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=4 day_of_week=2 daylight=D date=061101 high_temp=20.34 low_temp=12.02 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=57 dew_point=10.34 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=5 day_of_week=3 daylight=D date=061201 high_temp=22.01 low_temp=13.12 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=55 dew_point=11.45 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=6 day_of_week=4 daylight=D date=061301 high_temp=23.12 low_temp=13.12 sky_desc=7 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=46 dew_point=9.79 comfort=* rainfall=* snowfall=* precip_prob=2 icon=2 / forecast day_sequence=7 day_of_week=5 daylight=D date=061401 high_temp=23.12 low_temp=13.68 sky_desc=7 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=49 dew_point=10.34 comfort=* rainfall=* snowfall=* precip_prob=3 icon=2 / /location -- PHP General Mailing List (http://www.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] Problem Configuring With MySQL
Hi, Now that I've successfully built PHP (thanks to Brian Clark) I can no longer access mysql! I get the following: #mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) This has got to have something to do with the way I built PHP. How do I begin trouble-shooting it? TIA, BenO -- PHP General Mailing List (http://www.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] Looking for a function
Hello, cannot find function to convert all dangerous symbols (spaces,dots etc) into %20 variant. Is there any standard, or i have to develop my own? -- PHP General Mailing List (http://www.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] Looking for a function
VVP Hello, cannot find function to convert all dangerous symbols (spaces,dots VVP etc) into %20 variant. VVP Is there any standard, or i have to develop my own? Look at urlencode(), it shoud be what you are lookingfor. Cheers, Gianluca -- ALBASOFTWARE C/ Mallorca 186 - 3º 1ª 08036 Barcelona (Spain) Tel./Fax +34 934549324 [EMAIL PROTECTED] http://www.gianlucabaldo.com http://www.phpauction.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Looking for a function
www.php.net/urlencode Merry Christmas! James Cox -Original Message- From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]] Sent: Monday, December 24, 2001 3:58 PM To: PHP Subject: [PHP] Looking for a function Hello, cannot find function to convert all dangerous symbols (spaces,dots etc) into %20 variant. Is there any standard, or i have to develop my own? -- PHP General Mailing List (http://www.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] Problem Configuring With MySQL
try mysql -u username - root?? -p and when prompted, enter password Jim - Original Message - From: Ben Ocean [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 24, 2001 7:56 AM Subject: [PHP] Problem Configuring With MySQL Hi, Now that I've successfully built PHP (thanks to Brian Clark) I can no longer access mysql! I get the following: #mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) This has got to have something to do with the way I built PHP. How do I begin trouble-shooting it? TIA, BenO -- PHP General Mailing List (http://www.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] Looking for a function
Thanks. Exactly what i need Merry Christmas! - Original Message - From: James Cox [EMAIL PROTECTED] To: [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Monday, December 24, 2001 6:15 PM Subject: RE: [PHP] Looking for a function www.php.net/urlencode Merry Christmas! James Cox -Original Message- From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]] Sent: Monday, December 24, 2001 3:58 PM To: PHP Subject: [PHP] Looking for a function Hello, cannot find function to convert all dangerous symbols (spaces,dots etc) into %20 variant. Is there any standard, or i have to develop my own? -- PHP General Mailing List (http://www.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] Re: How to compile Apache/PHP
Hi Todd: There is an extremely good book for what you need. It's called PHP: Fast and easy web development by Julie C. Meloni (PrimaTech publishers). The first three chapters cover installation of MySQL, Apache Web Server, and PHP -- in that order, and with emphasis on configuring them to all work together. It gives very easy, step-by-step instructions for both Windows and Linux environment. You can't go wrong with these instructions. You might find it at a library, or you can always find it in a book store. Good luck!!! -RD Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am quite new to the Linux environment and do not have experience with make files. The platform is RH Linux 7.2 with the included Apache and the PHP rpm, php-devel-4.0.4pl1-9.i386.rpm. I need someone to give me the step by step process of creating a version of Apache that will process PHP extensions. Many thanks.. Todd -- Todd Cary Ariste Software [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] Reading semi formatted text file
201 PNCPS FINANCIAL ACCT 10027 3 8.00- 8.50 MWFGSB 400 I have a text file with rows similar to that above. I need to read the data in the rows into an array. fscanf likes to split the line into elements by spaces and I get 201,PNCPS,FINANCIAL,ACCT etc... and I need results like 201,PNCPS FINANCIAL ACCT,10027 etc... data[1]=201 data[2]=PNCPS FINANCIAL ACCT data[3]=10027 data[4]=3 data[5]=8.00 data[6]=8.50 data[7]=MWF data[8]=GSB 400 Can anybody provide any help on how to do this?
Re: [PHP] Reading semi formatted text file
$delimiter = \t; $file = path/to/file/name.ext; if($file = fopen($file, r)) { $file_array = file($file); foreach($file_array AS $str) { $new_array[] = explode($delimiter, $file_array); } } now when you are done you will have an indexed array called new_array that contains your rows broken up into key=value pairs. Jim - Original Message - From: Chris Steitz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 24, 2001 9:12 AM Subject: [PHP] Reading semi formatted text file 201 PNCPS FINANCIAL ACCT 10027 3 8.00- 8.50 MWFGSB 400 I have a text file with rows similar to that above. I need to read the data in the rows into an array. fscanf likes to split the line into elements by spaces and I get 201,PNCPS,FINANCIAL,ACCT etc... and I need results like 201,PNCPS FINANCIAL ACCT,10027 etc... data[1]=201 data[2]=PNCPS FINANCIAL ACCT data[3]=10027 data[4]=3 data[5]=8.00 data[6]=8.50 data[7]=MWF data[8]=GSB 400 Can anybody provide any help on how to do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.10: any way to override register_globals = OFF
Just FYI - if you use extract($_REQUEST), you're exposed to the very same danger that exists in register_globals. You're much better off using import_request_variables(), which allows you some control over what you put in the global scope. Zeev At 01:14 18/12/2001, Michael Jurgens wrote: Hey Guys, Thanks a lot, I allways use some config files that I include in every page, and with extract ($_REQUEST); added to one of those files, almost all of my problems are history. I'm now working on getting $PHP_SELF etc back working, but that should work out. Amazing this newsgroup, thank you all, Greetz, Michael Richard Heyes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... for all in $_GET { $[varname] = $_GET[varname] } Could anyone give me some pointers in actually programming this? extract($_GET); -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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: Sessions
Thanks, that worked fined! On Mon, 24 Dec 2001 09:31:31 -0600 Gaylen Fraley [EMAIL PROTECTED] wrote: By design. Try accessing $HTTP_SESSION_VARS instead. That should work. In other words, if you were accessing a session variable by $session_var, now use $HTTP_SESSION_VARS['session_var']. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Philip Maciver [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Since turning of register_globals in the php.ini file, sessions don't seem to be working any more, does anyone know why? == Philip MacIver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] == Philip MacIver -- PHP General Mailing List (http://www.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] Most secure way to send a password
| | JavaScript doesn't implement any kind of one-way hashing. But that's for a | good reason: suppose JavaScript encoded your password and sent it encoded to | the server. The in-between hacker would retrieve the encoded password as it | is sent to the server and simply pass that as the password - he doesn't ever | need to know your undencoded password to break in, since the server expects | it to be encoded anyway! and what about those guys who visit your site, download your page with the javascript encoder in the source HTML, and finds out how a crypted password can be decrypted? I 'm not aware of how the javascript source can be hidden. | So you're only left with SSL for proper security... Yes. SSL must be developed for reasons of this kind. | | HTTP_AUTH is just another way of sending the unsername and password as plain | text -- it's just more comfortable to use than checking if you have proper | credeintials in every page. My personal recommendation is to forget about | HTTP_AUTH and use SSL plus phplib for proper security. Yes, agreed.
[PHP] Just in case...
Just in case anyone happens to have this problem sometime in the future, after a lot of testing it seems that it is not necessary to have the line global $GLOBALS before you us the '$GLOBALS' array in a function, or a function in a class. You can just use it. In fact if you have the line global $GLOBALS it doesn't seem to reference the actual '$GLOBALS' array. This is what I have found to be the case anyway. If anyone knows why this is, or knows different to what I have just said, please do let me know, because I would love to know how it all works. Anyway, merry xmas, I'm not doing any of this tomorrow. == Philip MacIver -- PHP General Mailing List (http://www.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] Changing From Info in eMail!
Hi, I'm using the mail() function to send email. However, when the reciever recieves the email, my Servers name comes up in the From in his MailBox and also inside the email, even after defining the From: in the mail function. How do i change this From info?? This is what i'm using : mail($to, $subject, $message, From: $from); Thanks! T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP4 and IB SS 6.01
I am having a problem creating a version of PHP4 that has IB SS 6.01 included. The HowTo provided by RedHat does not have Interbase listed, so the closest I I come is there PostgreSQL. Currently, the IB SS rpm puts Interbase into /opt/interbase. Here are the instructions in the HowTo +++ 4.Change to the PHP directory, configure PHP with PostgreSQL support where the PostgreSQL header files directory is /usr/include/pgsql, install directory is /usr/local/php4, build and install PHP: $ cd php-4.0.4pl1 $ ./configure --with-pgsql=/usr/include/pgsql --prefix=/usr/local/php4 $ make $ make install +++ Using $./configure --with-interbase=/opt/interbase --prefix=/usr/local/php4 produces an error: Cannot find httpd.h or something close to that. Has anyone installed Interbase SS 6.01 with PHP4 on a RedHat 7.2 platform? Todd -- Todd Cary Ariste Software [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] Changing From Info in eMail!
what does the $from var look like? - Original Message - From: Thomas Edison Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 24, 2001 10:35 AM Subject: [PHP] Changing From Info in eMail! Hi, I'm using the mail() function to send email. However, when the reciever recieves the email, my Servers name comes up in the From in his MailBox and also inside the email, even after defining the From: in the mail function. How do i change this From info?? This is what i'm using : mail($to, $subject, $message, From: $from); Thanks! T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Changing From Info in eMail! : SOLVED!!!
Hi Ben, Thanks for your reply. Actually i did find a solution, and it is like this : mail($to,$subject,$message,From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer:PHP/ . phpversion()); The quotes could have been a problem so i did remove them. But the real thing were the Headers in the end. They work perfectly. Replace the Server Name and also put in the extra Reply-TO feature! Thanks again! T. Edison Jr. --- Ben Clumeck [EMAIL PROTECTED] wrote: I would try the following: mail($to, $subject, $message, From: $from); instead of : mail($to, $subject, $message, From: $from); I had a similar problem because I didn't have everything in quotes. Ben -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Monday, December 24, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: [PHP] Changing From Info in eMail! Hi, I'm using the mail() function to send email. However, when the reciever recieves the email, my Servers name comes up in the From in his MailBox and also inside the email, even after defining the From: in the mail function. How do i change this From info?? This is what i'm using : mail($to, $subject, $message, From: $from); Thanks! T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.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] = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File Download
Hey all. Im trying out a script that where I can download the contents of a database as a dump. On a large database, the end get truncated. ie, there were still maybe 6-7 more tables more till the end out of maybe 100 tables. The behaviour is erratic. It is not consistent with where the dump gets truncated. This is in the file if it means anything. header(Content-disposition: filename=database.sql); header(Content-type: application/zip); header(Pragma: no-cache); header(Expires: 0); I never used php to download files, before, so I haven't a clue. Merry Christmas all.. -- PHP General Mailing List (http://www.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] [Fwd: Table Problem]
Phillip B. Bruce wrote: Hi, Look at the code below first: ?php 2 3 include include_fns.php; 4 include header_news.php; 5 6 $conn = db_connect(); 7 8 $pages_sql = select * from pages order by code; 9 $pages_result = mysql_query($pages_sql, $conn); 10 11 while ($pages = mysql_fetch_array($pages_result)) { 12 13$story_sql = select * from stories 14 where page = '$pages[code]' 15 and published is not null 16 order by published desc; 17$story_result = mysql_query($story_sql, $conn); 18if (mysql_num_rows($story_result)) { 19 $story = mysql_fetch_array($story_result); 20 print TABLE border=\1\ width=685; 21 print TR; 22 print TD width=\50%\; 23 print H3$pages[description]/H3; 24 print $story[headline]; 25 print /TD; 26 print TD ALIGN=RIGHT; 27 print nbsp;; 28 print /TD; 29 print /TR; 30 print /TABLE; 31} 32 } 33 34 include footer_news.php; 35 ? My problem is that I want to do the following: == | | = | | | == | | | = So I thought a neat trick would be to before line 22 the following: if ( $pages[code]=intro) print TD ; else print TD width=\50%\; The objective would be to have a whole row by like I describe above. The thing is I don't want to write the same routine just for that one row and by that I mean put in another mysql call to the database. Suggestion? -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac. - George Carlin*** Hi, Group I've solved this problem myself and for those interested here is what I did to resolve it. ?php include include_fns.php; include header_news.php; $conn = db_connect(); $pages_sql = select * from pages order by code; $pages_result = mysql_query($pages_sql, $conn); while ($pages = mysql_fetch_array($pages_result)) { $story_sql = select * from stories where page = '$pages[code]' and published is not null order by published desc; $story_result = mysql_query($story_sql, $conn); if (mysql_num_rows($story_result)) { $story = mysql_fetch_array($story_result); print TABLE border=\1\ width=685; if ( $pages[code] == Intro ){ print TR; print TD; print H3$pages[description]/H3; print $story[headline]; print /TD; print /TR; } else { print TR; print TD width=\50%\; print H3$pages[description]/H3; print $story[headline]; print /TD; print TD ALIGN=RIGHT; print H3$pages[description]/H3; print $story[headline]; print /TD; print /TR; } print /TABLE; } } include footer_news.php; ? My orginal problem was that I was using lower case intro and not Intro what I put into the database. Which was a stupid oversite on my part. Now this cose will only create a TD/TD when it sees Intro and not a pair of TD/TD. I'm truly starting to like php a lot. -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac. - George Carlin*** -- PHP General Mailing List (http://www.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 software tool
I use this one too... its just 20$ or so though, and is a very great and convient editor. I do all my PHP coding in it. Yoep Mike [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... TextPad is another good text editor for all types of programming languages. Unforuntatly it is not free but the demo my work for you. http://www.textpad.com It supports multiple languages like PHP, JAVA and HTML -Mike Laserjetter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Does anybody know of or can recommend any freeware text editing tools for editing PHP code in Win32? I can manage with Windows' Notepad but something with code highlighting etc and of a similar footprint to notepad would be useful. -- PHP General Mailing List (http://www.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] faxing in PHP
Hi, Is there a way to send to a fax machine like you would a email address in PHP. Thanks for any help you can give. :-)
php-general Digest 24 Dec 2001 20:24:26 -0000 Issue 1071
php-general Digest 24 Dec 2001 20:24:26 - Issue 1071 Topics (messages 78642 through 78682): Re: $GLOBALS array 78642 by: Philip MacIver Unveilled Metabase OOP direct to driver object API 78643 by: Manuel Lemos Re: Mommy, is it true that...? 78644 by: Jerry Verhoef (UGBI) Sessions 78645 by: Philip MacIver 78660 by: Gaylen Fraley 78672 by: Philip MacIver strange empty array behavior being at in_array() 78646 by: Peter Vereshagin 78650 by: Bogdan Stancescu 78652 by: Peter Vereshagin 78654 by: Bogdan Stancescu Re: 4.0.6 Vs. 4.1.0 ? 78647 by: LaserJetter Stopping $_REQUEST array to give warnings 78648 by: Michael Jurgens Re: How to parse an XML document 78649 by: php.bilbao.com Authenitcation problem with IE on Win2k 78651 by: Martin Schichl Re: How to compile Apache/PHP 78653 by: Miles Thompson 78668 by: Robert Dyke Re: Merry christmas! 78655 by: Erik H. Mathy Fulltext-Search 78656 by: Martin 78657 by: Bogdan Stancescu gd_installation 78658 by: EMIN CALIKLI PHP and permissions/ownership 78659 by: Gaylen Fraley Re: arrays 78661 by: Peter Clarke Problem Configuring With MySQL 78662 by: Ben Ocean 78666 by: Jim Lucas [jimphp] Looking for a function 78663 by: Valentin V. Petruchek 78664 by: Gianluca Baldo 78665 by: James Cox 78667 by: Valentin V. Petruchek Reading semi formatted text file 78669 by: Chris Steitz 78670 by: Jim Lucas [jimphp] Re: PHP 4.10: any way to override register_globals = OFF 78671 by: Zeev Suraski Re: Most secure way to send a password 78673 by: Papp Gyozo Just in case... 78674 by: Philip MacIver Changing From Info in eMail! 78675 by: Thomas Edison Jr. 78677 by: Jim Lucas [jimphp] PHP4 and IB SS 6.01 78676 by: Todd Cary Re: Changing From Info in eMail! : SOLVED!!! 78678 by: Thomas Edison Jr. File Download 78679 by: Gerard Samuel Re: Table Problem] 78680 by: Phillip B. Bruce Re: PHP software tool 78681 by: Yoep faxing in PHP 78682 by: LDL Enterprise Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Basically I use the MVC (Model View Controller) architecture when building my php scripts. So all of my logic is handled by a controller which calls methods on functions, that way the php scritps that are used to display forms, tables etc. have little to no business logic to them at all. Now in the controller I woul find it pretty annoying if I had to reference either the $HTTP_POST_VARS or $HTTP_GET_VARS aarry, so to add to the fact that it would make the code look more messy than it needs to be. So all I wanted to know was is it possible to use 'global $GLOBAL' within a function? On Sun, 23 Dec 2001 18:35:33 -0600 Gaylen Fraley [EMAIL PROTECTED] wrote: Why aren't you using the $_POST or $HTTP_POST_VARS array? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Philip Maciver [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Does anyone know if it is possible to use the 'global $varName' function with the '$GLOBALS' array itself. I have been having some trouble with this. I have decieded to switch of register_globals in the php.ini file (seeing as it is now deprecated in version 4.1.0) I know that register_globals is still supported, but I would like to get used to not using it. But anyway, the problem I am having is that when I post data from a form to another page the data is not available globally, so I wrote a method to register them globally, it looks like this function globaliseVars($varArray) { global $GLOBALS; while (list($varName,$var) = each($varArray)) { $GLOBALS[trim($varName)] = trim($var); } } But doing 'global $GLOBALS' doesn't seem to make it refer to the actual '$GLOBALS' array, the only time it did work was when I place something into the '$GLOBALS' array on the page that calls the function. So /** * This doesn't work */ globaliseVars($HTTP_POST_VARS); /** * But this does */ $GLOBALS[ANYTHING] = anything; globaliseVars($HTTP_POST_VARS); If anyone could help me with this problem please could they get in touch, because its driving me crazy. Thanks! == Philip MacIver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,
[PHP] SNMP with 4.1.0
All, I am having terrible difficulty trying to build 4.1.0 as an Apache shared module. Without SNMP support, all is well. However, as soon as I add --with-snmp=..., I get the following at compile time: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory make[3]: *** [snmp.la] Error 1 make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext' make: *** [all-recursive] Error 1 This only happens when PHP is being compiled as a shared module, and only happens when SNMP support is compiled in. Anyone got any ideas? Festive wishes, Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] faxing in PHP
hylafax I am working on a project right now to set this up on a linux box. Should work great. Jim - Original Message - From: LDL Enterprise [EMAIL PROTECTED] To: *PHP-General mail list [EMAIL PROTECTED] Sent: Monday, December 24, 2001 12:15 PM Subject: [PHP] faxing in PHP Hi, Is there a way to send to a fax machine like you would a email address in PHP. Thanks for any help you can give. :-) -- PHP General Mailing List (http://www.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] faxing in PHP
Or use a commercial fax service, this may even be cheaper! http://www.jfax.com/ offers email to fax. bvr. On Mon, 24 Dec 2001 12:26:54 -0800, Jim Lucas [php] wrote: hylafax I am working on a project right now to set this up on a linux box. Should work great. Jim -- PHP General Mailing List (http://www.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: Prev ... Next
http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html Arcadius -- PHP General Mailing List (http://www.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] Fulltext-Search
htdig or mnogo At 10:13 PM 12/23/2001 +0100, Martin wrote: Hello! Does anybody know a good script to search the own web-server?! Would be nice if the script could display the whole sentence where the word was found... Martin -- PHP General Mailing List (http://www.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] Strings Question
Hi, I want to take something like the following: $row = 1; $ column = 1; if ( $pages = r$row$column) What I want to see is r1c1 as a string so I'm actually concatenating the strings together. Any ideas? -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac. - George Carlin*** -- PHP General Mailing List (http://www.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] Strings Question
On Mon, Dec 24, 2001 at 01:48:38PM -0800, Phillip B. Bruce wrote: I want to take something like the following: $row = 1; $ column = 1; if ( $pages = r$row$column) What I want to see is r1c1 as a string so I'm actually concatenating the strings together. if ($pages == r$row . c$column) -- PHP General Mailing List (http://www.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 compile Apache/PHP
* Miles Thompson ([EMAIL PROTECTED]) [Dec 24. 2001 08:45]: One little quirk. When you install MySQL from source the path to it is different than when you install it from an rpm. One of them, and I can't remember which, adds an extra directory layer. But really, go with the compile from source. In addition to this, Todd, the install docs at mysql.com (and the Linux notes), are quite good, so have a look there, too, if you run into problems. (Or was it Interbase that you wanted? Must be the egg nogg) -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 3 kinds of people: those who can count and those who can't. -- PHP General Mailing List (http://www.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] gd_installation
* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 24. 2001 09:47]: Hi , I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll extension . I can use other extensions succesfully (like php_mssql.dll ,php_pdf.dll etc.) . Did anyone can help me about this subject? Sincerely. What's the exact error you're getting? -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Hardware: The parts of a computer system that can be kicked. -- PHP General Mailing List (http://www.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] SNMP with 4.1.0
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 15:26]: I am having terrible difficulty trying to build 4.1.0 as an Apache shared module. Without SNMP support, all is well. However, as soon as I add --with-snmp=..., I get the following at compile time: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory Does libsnmp.so actually exist in /usr/local/snmp/lib? make[3]: *** [snmp.la] Error 1 make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext' -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Enter any 11 digit prime number to continue. -- PHP General Mailing List (http://www.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] Site running from MySQL
Out of interest, would it be possible to load a webpage as a record in a MySQL database, having another field as say a number or a unique name so that a whole site could be placed in a database with a couple of php files? Is there a limit on the size of a field in MySQL which would stop you doing this though and would it be noticeably slower that html / php files? I was only wondering as it would make full text searches an awful lot simpler -- PHP General Mailing List (http://www.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] SNMP with 4.1.0
Hi Brian On Mon, 24 Dec 2001, Brian Clark wrote: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory Does libsnmp.so actually exist in /usr/local/snmp/lib? Yes (a symlink to another file, which exists), and SNMP is detected fine through 'configure'. I have two theories. The first is that libsnmp.so is the name of the Apache module that is being compiled and it is being referenced incorrectly; the second is that a spurious .libs/ has appeared from somewhere. As I said in the first e-mail, it works fine when PHP is to be statically compiled in to Apache, which leads me to believe my first theory more than the second Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] relative path vs. INCLUDE() !!!!!
Hello ! I've just made a nice navavigation bar for my website The nav. bar is a php file (Templates/inc_nav.php)containing links to other pages of my site. the links has been made relatively to the file inc_nav.php; Now that I've included the inc_nav.php in other pages , my links no longer work ... it seems that PHP just copy the content of the nav bar into other pages so , links are now relavite to the current page and this of course doean't work !!! :-((( Is there any workaround or any othe way to include a nav bar in PHP without breaking the links ? I hope you understand what I mean ... Thanks Arcad. -- PHP General Mailing List (http://www.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] Fulltext-Search
Lauri, Very impressive. Merry Christmas - Miles Thompson At 03:03 AM 12/25/2001 +0200, Lauri Vain wrote: Hello Martin, At 10:13 PM 12/23/2001 +0100, Martin wrote: Hello! Does anybody know a good script to search the own web-server?! Would be nice if the script could display the whole sentence where the word was found... If you want to have more hands on fun then check out the following class/how-to: http://www.evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_MySQL/18/15 665/index.html Yours, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -- PHP General Mailing List (http://www.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] relative path vs. INCLUDE() !!!!!
This is a kind of a shit happens answer -- ummm... nope, there's no workaround. The only workaround is providing a global path variable and use that for all pages, but you probably already thought about that. Sorry for the bad news on Christmas! :-) Bogdan Arcadius A. wrote: Hello ! I've just made a nice navavigation bar for my website -- PHP General Mailing List (http://www.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] SNMP with 4.1.0
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 17:39]: Does libsnmp.so actually exist in /usr/local/snmp/lib? Yes (a symlink to another file, which exists), and SNMP is detected fine through 'configure'. I have two theories. The first is that libsnmp.so is the name of the Apache module that is being compiled and it is being referenced incorrectly; the second is that a spurious .libs/ has appeared from somewhere. OK, how about building the DSO via apxs manually and see if you get any errors? IIRC, you can then place it in the correct directory in the apache source and use --enable-shared=snmp in apache's configure *I think*. Why, let me ask Santa.. Yes, Santa says he believes that should work. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Sure FAT32 corrupts your files, but look how fast it is. -- PHP General Mailing List (http://www.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] SNMP with 4.1.0
* Brian Clark ([EMAIL PROTECTED]) [Dec 24. 2001 22:26]: OK, how about building the DSO via apxs manually and see if you get any errors? IIRC, you can then place it in the correct directory in the apache source and use --enable-shared=snmp in apache's configure *I think*. Why, let me ask Santa.. Yes, Santa says he believes that should work. Nevermind, I need to quit smoking the mistletoe. You're trying to build PHP with that configure option, which is *DUH* the point of this list. Just ignore everything I said.. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Why doesn't DOS ever say Excellent command or filename? -- PHP General Mailing List (http://www.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] faxing in PHP
There are many different fax daemons for unix and windows. Thier command line tools are differnt. In the past, I have sent a fax by opening a process to the command line tools provided by the fax software. I simply use PHP variables as arguments. Hope this helps. Steve On Mon, 24 Dec 2001, LDL Enterprise wrote: Hi, Is there a way to send to a fax machine like you would a email address in PHP. Thanks for any help you can give. :-) Thank you, Steve Maroney -- PHP General Mailing List (http://www.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] relative path vs. INCLUDE() !!!!!
There is also include_path in the php.ini file. Bogdan Stancescu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This is a kind of a shit happens answer -- ummm... nope, there's no workaround. The only workaround is providing a global path variable and use that for all pages, but you probably already thought about that. Sorry for the bad news on Christmas! :-) Bogdan Arcadius A. wrote: Hello ! I've just made a nice navavigation bar for my website -- PHP General Mailing List (http://www.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] gd_installation
Hi , Thanks for your interests . The error is (when IIS starting); Sincerely. --- A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly. Brian Clark brianj@fusionTo: PHP is not a drug. [EMAIL PROTECTED] werks.comcc: Subject: Re: [PHP] gd_installation 25.12.2001 00:11 * EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 24. 2001 09:47]: Hi , I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll extension . I can use other extensions succesfully (like php_mssql.dll ,php_pdf.dll etc.) . Did anyone can help me about this subject? Sincerely. What's the exact error you're getting? -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Hardware: The parts of a computer system that can be kicked. -- PHP General Mailing List (http://www.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] gd_installation
* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 25. 2001 01:47]: --- A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly. Oh my goodness, you gotta love Microsoft. You crash your car and the policeman asks, How did this happen? You then tell the policeman, I drove the car. I hit mailbox 1067. Full of detail, right? Unless someone else in this forum is using ISS and knows where to look for a more detailed error (like an error.log?), my guess is that the gd library needs something else and can't find it. gd requires libpng, zlib and jpeg-6b. Now whether or not that DLL already has that information built-in, I don't know. Is there a tool for Windows that will let you see a specific DLL's dependencies? How did you install all of this? Did you use this package? http://www.php.net/do_download.php?download_file=php-4.1.0-Win32.zip Or are you using an older build? Another thing I just noticed is the name of the file. Are you positive the file isn't supposed to be named php_gd.dll instead of ph_gd.dll? Try making a copy of it and renaming it php_gd.dll and try to load that version. If that doesn't work, try this DLL instead: http://php.weblogs.com/php_gd -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 How much deeper would the ocean be without sponges? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]