[PHP] Re: php on apache on win2k
on www.php.net you need to download the zip file for php, this will include the missing files... Vic [EMAIL PROTECTED] wrote in message 01c265e6$c3a2b920$a3a96518@jumpy">news:01c265e6$c3a2b920$a3a96518@jumpy... I used to have php 4.2.3 on iis on 200 and xp and it worked fine, but I decided o now go with apache for open source's sake and the sake of my sanity. Well right now my sanity is in question, php tells me that I have to manually config the apache conf file - no prob here done this many times; but it tells me to add theis line here: LoadModule php4_module c:/php/sapi/php4apache.dll Now I don't see php4apache.dll anywhere in sight. What I do see is: php4ts.dll; and I wonder if the documentation is outdated. - (or if I am a complete fool) Either way I get this error when running the apache test: Cannot load blah blah module blah blah LoadModule php4_module c:/php/sapi/php4apache.dll Not only that, but I see no sapi anywhere in c:/php/ Ok, cool, now what? Any help? - Victor - www.argilent.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002 __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parsing PHP to create HTML only page
Hi All, I'm really just looking for some advice! I am looking to build a website which users will be able to logon and have a template based website generated for them, the output will have to be HTML so that these sites can be indexed by search engines, it will also have to change Apache conf files and DNS records. Perhaps someone knows of a similar open source project or could point me in the right direction. My idea is to create the site using PHP, making use of a number of different templates which will be PHP pages that have the same includes i.e Navigation, Header, Footer, Content etc. Once the pages have been generated (view source) all you have is the HTML, this is what I would like to achieve, but I'm unsure how to pass the pages to give me only HTML from the databases. Any help or advice would be greatly appreciated. -- Tony Burgess -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Instalation problem
Hi! I'm installing PHP 4.2.3, I have already installed version 4.0.5 working without problems. Once installed version 4.2.3, I'm using the order phpinfo() and continues appearing the old version of PHP 4.0.5 how if it continued installed and it had not been updated. What can be happening? Thank you very much ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Instalation problem
Alicia Molina (ABS) wrote: Hi! I'm installing PHP 4.2.3, I have already installed version 4.0.5 working without problems. Once installed version 4.2.3, I'm using the order phpinfo() and continues appearing the old version of PHP 4.0.5 how if it continued installed and it had not been updated. What can be happening? Thank you very much ! Have you restarted the webserver? You don't tell us which webserver/OS. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: remote files to servers
From: Brad Bonkoski [EMAIL PROTECTED] Sure, see fopen() and fread() and fwrite() -Brad I Have looked through the manual at these and have got the general idea of it, but how do i join the commands to do the function i am after? -- Cheers - Simon Angell Canberra ACT www.canberra-wx.com - Member of: Australian Severe Weather Association. www.severeweather.asn.au - This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File. Simon Angell [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all. i was wondering if it is possible to use PHP to retrieve a remote file and then write a copy to my own server for quicker access? -- Cheers - Simon Angell Canberra ACT www.canberra-wx.com - Member of: Australian Severe Weather Association. www.severeweather.asn.au - This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php-Re: Remote files to servers
From: Brad Bonkoski [EMAIL PROTECTED] Sure, see fopen() and fread() and fwrite() -Brad I Have looked through the manual at these and have got the general idea of it, but how do i join the commands to do the function i am after? -- Cheers - Simon Angell Canberra ACT www.canberra-wx.com - Member of: Australian Severe Weather Association. www.severeweather.asn.au - This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File. Simon Angell [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all. i was wondering if it is possible to use PHP to retrieve a remote file and then write a copy to my own server for quicker access? -- Cheers - Simon Angell Canberra ACT www.canberra-wx.com - Member of: Australian Severe Weather Association. www.severeweather.asn.au - This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] setting .htaccess authentication with PHP
Hello Everyone, I've developed a feature which allows clients to upload files to a dir on the server. I want to allow clients to email a url to the file as follows :- http://www.mysite.com/clientX/file01.jpg I want to setup challenge / response authentication on the client folder so that when someone clicks the link they are prompted for a username / password. I'm thinking that apache .htaccess permissions are the best way to do this. The server is running Linux. My question is, can I write a PHP / shell script to automatically set folder access permissions and how would this be done? Thanks, Javier _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] php on apache on win2k
- Original Message - From: Sascha Braun [EMAIL PROTECTED] To: Vic [EMAIL PROTECTED] Sent: Friday, September 27, 2002 10:02 AM Subject: Re: [PHP] php on apache on win2k Hi Vic, the Apache DLL resides in the php/sapi folder. But if you use Apache Version 2000 and above you have to change load_module c:/php/sapi/php4apache.dll to c:/php/sapi/php4apache2.dll After that you only have to put the last following lines named in the install.txt in the httpd.conf. But it's not pobably working when you put these line direktly under the load_module option. Search thru the httpd.conf and find out where it may fit best. I had another problem when I installed PHP4.2.3 together with apache 2.0.42. Hole PHP did't work to an unchangable error. So at last I installed the CGI Version of PHP. If you are able to to this in a different way, please remind me and tell me how you did it and what Apache Version you used for it. Have it nice Sascha Braun I used to have php 4.2.3 on iis on 200 and xp and it worked fine, but I decided o now go with apache for open source's sake and the sake of my sanity. Well right now my sanity is in question, php tells me that I have to manually config the apache conf file - no prob here done this many times; but it tells me to add theis line here: LoadModule php4_module c:/php/sapi/php4apache.dll Now I don't see php4apache.dll anywhere in sight. What I do see is: php4ts.dll; and I wonder if the documentation is outdated. - (or if I am a complete fool) Either way I get this error when running the apache test: Cannot load blah blah module blah blah LoadModule php4_module c:/php/sapi/php4apache.dll Not only that, but I see no sapi anywhere in c:/php/ Ok, cool, now what? Any help? - Victor - www.argilent.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002 __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mobile number
-Original Message- From: Ryan A [mailto:[EMAIL PROTECTED]] Sent: 26 September 2002 17:26 Hey, It used to be that 07xxx = vodafone ... and 07yyy = orange - but now it could be anything. DAMN, that sounds bad, any fixed numbers in the UK atleast? My cousins number is +44 79320- so that could be any company right? Yes, right. Although the prefixes (07xxx) are initially allocated to specific providers, the UK has full number portability, which means that a user can change service providers and keep their original number -- several times, if they so wish! This is partially in response to an EC directive, so you'll have the same problem EC-wide eventually. And, in any case, each UK provider has a large number of prefixes allocated, not in any particular sequence, so the best you could do given a provider would be to offer a drop-down of all the possible prefixes. If you *really* want to know the full gory details, you can download the allocations list from http://www.oftel.gov.uk/ind_info/numbering/s7.xls, but a (very) short extract gives, for example: 07780Vodafone 07781Guernsey Telecoms 07782Hutchison 07785-07789 Vodafone 07790-07792 Orange 07795-07796 Vodafone 077977-8 Jersey Telecoms 07798-07799 Vodafone 07800Orange 07801-07803 O2 07808-07809 O2 In the US it's even worse, I think, as I believe it's still the case that mobile numbers are allocated out of the regular numbering space, so each provider has prefixes allocated for each geographic area code in which they operate. All in all, I guess this is a very long-winded way of saying don't even bother trying! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] what do you think?
about http://smanager.web1000.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Send mail in HTML
Hello, I use the mail function to send mail. On my development PC, I receive the mail in HTML, with the high priority,... I put the files on the production server, a linux machine, when I receive the mail is not in HTML but in plain text, I don't see the high priority. I receive that : Content-Type: text/html; charset=iso-8859-1 X-Priority: 1 X-Mailer: PHP / 4.2.3 Click on the link to activate the Could you tell me what can I do ? I use this code to send mail : $sender_name = MyWebsite; $sender_email = ; $contactemail = $Email1; $myreplyemail = ; $message = Click on the link to activate the account..'br'; $message .= http://www.website.com; $subject = TEST; $header = From: \.addslashes($sender_name).\ .$sender_email.\r\n; $header .= Reply-To: .$sender_email.\r\n; $header .= MIME-Version: 1.0\r\n; $header .= Content-Type: text/html; charset=iso-8859-1\r\n; $header .= X-Priority: 1\r\n; $header .= X-Mailer: PHP / .phpversion().\r\n; mail($contactemail, $subject, $message, $header); thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD Fonts
I've just started using the GD library in PHP to do some graphic manipulation/creation. I find myself quite confused about how to work with fonts. I believe that I have both FreeType TrueType enabled, since my phpinfo() says '--with-freetype-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' under GD it says FreeType Supportenabled FreeType Linkagewith freetype What I'm unclear on is how/where I can find fonts to use. Should I expect to find them already installed on the server somewhere? Or does one typically have to download install them as needed? Or am I just misunderstanding how fonts work? -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what do you think?
-Original Message- From: Arminas [mailto:[EMAIL PROTECTED]] Sent: 27 September 2002 11:38 about http://smanager.web1000.com/ I think the page needs a drastic proof-read and grammar check -- I have trouble understanding what some of it is even trying to say. And I haven't a clue what ASSAY TO INTEGRATE MANAGEMENT is supposed to mean! It looks like a nice product, but I wouldn't even evaluate it after looking at this because I'd be worried about having to spend too much time trying to decipher it's output. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Displaying full array contents
OK. Now I have something I can work with. Thanks everyone. Brad Brad Harriger wrote: I'm trying to write a function that will display the full contents of an array. If one of the keys contains a value that is an array, the full array (all indices) should be shown. As an example, given the following definitions: $Arr1[1] = Apple; $Arr1[2] = Banana; $Arr1[3] = $Arr2[]; $Arr2[1] = Carrot; $Arr2[2] = $Arr3[]; $Arr3[1] = Orange; $Arr3[2] = Peach; the output should be: Arr1:1:Apple Arr1:2:Banana Arr1:3:Arr2[] Arr1:3:Arr2:1:Carrot Arr1:3:Arr2:2:Arr3[] Arr1:3:Arr2:2:Arr3:1:Orange Arr1:3:Arr2:2:Arr3:2:Peach The closest I've come is: while (current($myArr)) { if(is_array(current($myArr))) { $arrKey = key(current($myArr)); echo Array ; echo nbsp=nbsp; $baseArray = key($myArr); echo key($myArr); echo BR\n; walkArray(current($myArr)); } else { $arrKey = key($myArr); if ($baseArray != ) { echo $baseArray; echo :; } echo $arrKey; echo nbsp=nbsp; echo current($myArr); echo BR\n; } next($myArr); } This code only echoes one dimension of a multi-dimension array. I can't find a way to reliably store more than that. Any suggestions? Thanks in advance, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Re: php on apache on win2k
snip Cannot load blah blah module blah blah LoadModule php4_module c:/php/sapi/php4apache.dll /snip This means you need to put php4ts.dll which will be PHPDir to Window/System(98) WinNt/System32(NT) directory. If you do that you wont get that error. Hope this helps. karthikeyan. - Original Message - From: Brian McGarvie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 1:31 PM Subject: [PHP] Re: php on apache on win2k on www.php.net you need to download the zip file for php, this will include the missing files... Vic [EMAIL PROTECTED] wrote in message 01c265e6$c3a2b920$a3a96518@jumpy">news:01c265e6$c3a2b920$a3a96518@jumpy... I used to have php 4.2.3 on iis on 200 and xp and it worked fine, but I decided o now go with apache for open source's sake and the sake of my sanity. Well right now my sanity is in question, php tells me that I have to manually config the apache conf file - no prob here done this many times; but it tells me to add theis line here: LoadModule php4_module c:/php/sapi/php4apache.dll Now I don't see php4apache.dll anywhere in sight. What I do see is: php4ts.dll; and I wonder if the documentation is outdated. - (or if I am a complete fool) Either way I get this error when running the apache test: Cannot load blah blah module blah blah LoadModule php4_module c:/php/sapi/php4apache.dll Not only that, but I see no sapi anywhere in c:/php/ Ok, cool, now what? Any help? - Victor - www.argilent.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002 __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what do you think?
Fully concur. mt At 01:26 PM 9/27/2002 +0100, Ford, Mike [LSS] wrote: -Original Message- From: Arminas [mailto:[EMAIL PROTECTED]] Sent: 27 September 2002 11:38 about http://smanager.web1000.com/ I think the page needs a drastic proof-read and grammar check -- I have trouble understanding what some of it is even trying to say. And I haven't a clue what ASSAY TO INTEGRATE MANAGEMENT is supposed to mean! It looks like a nice product, but I wouldn't even evaluate it after looking at this because I'd be worried about having to spend too much time trying to decipher it's output. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encrypted MySQL passwords
Rodolfo Gonzalez [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 26 Sep 2002, Brad Bonkoski wrote: also might be better then sending it in the clear. But I guess that the original poster wanted to know how to avoid the clear text session originated by the client-server dialog itself, not the passwords in a query (its easy to log the sessions using tcpdump, for example). BTW (and I have not checked the CVS/TODO, so I ask here), is there planned support for SSL MySQL 4.x.x in PHP?. That's right, I want to avoid the original clear text session from the start. Thanks for all the info. When I am ready to go online with my app, I will either recompile my MySQL 3.23.49 to use SSL, or if production MySQL 4.x.x is ready I'll switch to it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mobile Number - End of thread.
Hi all, well, time to explain, I am just practiceing my programming skills in PHP and was bored...so I wondered why not do the mobile thing as I have not seen it in any sites...now i know why...its coz its a pain in the ass as pointed out by so many of you. Thank you. Since I am not a person who looks logic in the eye and still does crap (unlike my ex girl heheheh) I have dropped the whole idea. Thanks go out to everyone who responded to my thread, cheers and have a great day. -Ryan.
Re: [PHP] parsing PHP to create HTML only page
You can use phpnuke or similar to achieve this, all you need is to decide which database to use (you may use Host: header, or directory). But sure, this won't change your dns records or Apache conf files. Tony Burgess wrote: Hi All, I'm really just looking for some advice! I am looking to build a website which users will be able to logon and have a template based website generated for them, the output will have to be HTML so that these sites can be indexed by search engines, it will also have to change Apache conf files and DNS records. Perhaps someone knows of a similar open source project or could point me in the right direction. My idea is to create the site using PHP, making use of a number of different templates which will be PHP pages that have the same includes i.e Navigation, Header, Footer, Content etc. Once the pages have been generated (view source) all you have is the HTML, this is what I would like to achieve, but I'm unsure how to pass the pages to give me only HTML from the databases. Any help or advice would be greatly appreciated. -- Tony Burgess -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bus Schedule / Time table
I have been given the task to program a site in php that displays the timetable of a local bus company Does any one have any suggestions into where to look for any info or advice? Thanks craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Update involving a list field
You mean enum column type? There is nothing special about it, besides you cannot change it to anything else. echo your update query and see what it looks like. Shiloh Madsen wrote: Hi, Im using a form that updates a database entry. In it one of my fields is a drop down/list field. Whenever the value in this field is changed, instead of updating it to the new item, it is deleted entirely. I have the same field in my entry page that inserts just fine, but for some reason the update deletes the info. Is there something special about updating a recordset off of a dropdown field that I am missing? if it matters, im pulling the initial value of the field from the value in the database row.I can send the code for the page to anyone who needs more info. Shiloh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Encrypted MySQL passwords (new info from MysQL list)
Hi Andrew and Richard, The password and connection info is scrambled up. You can look, If you want to check it out for your self look in the source code of ./mysql-3.23.XX/libmysql search for the following functions. especially in 'mysql_real_connect' function. It is not the best method, but it is not clear text! void hash_password(ulong *result, const char *password) void make_scrambled_password(char *to,const char *password) char *scramble(char *to,const char *message,const char *password, my_bool old_ver) See ya Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what do you think?
Ditto. Chase On Fri, 2002-09-27 at 07:34, Miles Thompson wrote: Fully concur. mt At 01:26 PM 9/27/2002 +0100, Ford, Mike [LSS] wrote: -Original Message- From: Arminas [mailto:[EMAIL PROTECTED]] Sent: 27 September 2002 11:38 about http://smanager.web1000.com/ I think the page needs a drastic proof-read and grammar check -- I have trouble understanding what some of it is even trying to say. And I haven't a clue what ASSAY TO INTEGRATE MANAGEMENT is supposed to mean! It looks like a nice product, but I wouldn't even evaluate it after looking at this because I'd be worried about having to spend too much time trying to decipher it's output. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PGP Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 signature.asc Description: This is a digitally signed message part
[PHP] Web Caching
Hi! Any web browsers that establish a SSL connection with Apache. What I understand is that any webpages through SSL would not be cache after the web browser received it. But I noticed that only any webpage that use html form tag follow by the method like Get or Post would effectively not be cached. It can be shown by pressing the back or forward button on the web browser. But not on any webpage that doesn't have html form tag. Is there a way for PHP to take care of that problem? I realized that PHP is on the server side and the web browser is on the client side. So, it wouldn't work that way. Anyone know? Suggestion? Recommendation? Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mysql fulltext search min word length = 3
Much to my dismay, I've learned that the mySQL minimum indexable/searchable word length is 3 characters. This is a real problem for me. Anybody know a workaround, or how to tweak mySQL to allow for matches of words 3 chars or less. From the online mysql docs (http://www.mysql.com/doc/en/Fulltext_Search.html) MySQL uses a very simple parser to split text into words. A ``word'' is any sequence of characters consisting of letters, numbers, `'', and `_'. Any ``word'' that is present in the stopword list or is just too short (3 characters or less) is ignored. Any thoughts, help would be terrific! Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 4.0.2 = 4.2.3, form vars are empty?
Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Actually, phpinfo() does show the variables and their values if I throw it in the .php file. But tailing the mysql log shows the following: SELECT * FROM users WHERE username='' AND password='' from this code. $query = mysql_query(SELECT * FROM users WHERE username='$username' AND password='$password'); Regards, Thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] exec issue - return value 127
hi all, i am having a problem with exec. every command i try to run returns 127 (seg fault i think) but no array with info. what could be causing this problem? i have tried running the complete path to the command e.g. usr/bin/ls -l etc but with no luck. could this be something to do with my php.ini settings? any help would be greatly appreciated! many thanks in advance, christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Instalation problem
Alicia Molina (ABS) wrote: Yes! I have restarted my server, my webserver and all. I have red hat 6.2 and Apache 1.3.20 Alicia Molina (ABS) wrote: I'm installing PHP 4.2.3, I have already installed version 4.0.5 working without problems. Once installed version 4.2.3, I'm using the order phpinfo() and continues appearing the old version of PHP 4.0.5 how if it continued installed and it had not been updated. Have you restarted the webserver? You don't tell us which webserver/OS. HTH Chris Either the configuration for apache remains pointed at the location of the old installation (and your new installation is somewhere different) or apache was compiled with php not as a module but built in. In the second case you would need to recompile apache. I suspect it is as a module though, Check /etc/httpd/conf/httpd.conf for the LoadModule line for php4 and check that the new libphp4.so is in that directory. It probably is not, so you need to move it there and restart apache. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 4.0.2 = 4.2.3, form vars are empty?
Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Turn register_globals = On in the php.ini file... HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.0.2 = 4.2.3, form vars are empty?
This is almost certainly due to the new superglobals arrays which are used in newer versions of php. in short, you will not be aqble to use the value 'name' from a posted form by simply refering to '$name', but should rather use '$_POST[name]'.See the php manual for more info. To solve this issue with your older app: edit php.ini find 'register_globals', this will probably be set to 'off' change it to 'register_globals = on' Cheers Scott Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Actually, phpinfo() does show the variables and their values if I throw it in the .php file. But tailing the mysql log shows the following: SELECT * FROM users WHERE username='' AND password='' from this code. $query = mysql_query(SELECT * FROM users WHERE username='$username' AND password='$password'); Regards, Thx -- //// // Scott Houseman // // Jam Warehouse http://www.jamwarehouse.com/ // // Smart Business Innovation // // +27 21 4477440 / +27 82 4918021// //// -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.0.2 = 4.2.3, form vars are empty?
I recently have experienced the same thing in upgrading from 4.0.0 to 4.2.3 All variables are now stored globally and can only be retrieved using $_POST['var'] or $_GET['var'] declarations i.e. $username = $_POST['username']; or get if your method was get in the form. On Fri, 27 Sep 2002, Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Actually, phpinfo() does show the variables and their values if I throw it in the .php file. But tailing the mysql log shows the following: SELECT * FROM users WHERE username='' AND password='' from this code. $query = mysql_query(SELECT * FROM users WHERE username='$username' AND password='$password'); Regards, Thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: 4.0.2 = 4.2.3, form vars are empty?
Erwin mailto:[EMAIL PROTECTED] scribbled; Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Turn register_globals = On in the php.ini file... HTH Erwin Or better yet, actually use the new $_GET[] and $_POST[] and leave that option off. -jesse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_SESSION[] and register_globals=on
A short question: My IP informed me that they have register_globals=on in their php.ini. Is this going to cause problems with my scripts that were written using $_POST, $_SESSION, etc? Tia, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql fulltext search min word length = 3
The only option is to recompile mysql ROBERT MCPEAK wrote: Much to my dismay, I've learned that the mySQL minimum indexable/searchable word length is 3 characters. This is a real problem for me. Anybody know a workaround, or how to tweak mySQL to allow for matches of words 3 chars or less. From the online mysql docs (http://www.mysql.com/doc/en/Fulltext_Search.html) MySQL uses a very simple parser to split text into words. A ``word'' is any sequence of characters consisting of letters, numbers, `'', and `_'. Any ``word'' that is present in the stopword list or is just too short (3 characters or less) is ignored. Any thoughts, help would be terrific! Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exec issue - return value 127 (more)
ok.. i found that i need to check the httpd error_log and it tells me that it can't find the file or directory for the command. how do i fix this? i tried a full pathname to the command but it still says it cannot find dir or file etc c. Christian Haines wrote: hi all, i am having a problem with exec. every command i try to run returns 127 (seg fault i think) but no array with info. what could be causing this problem? i have tried running the complete path to the command e.g. usr/bin/ls -l etc but with no luck. could this be something to do with my php.ini settings? any help would be greatly appreciated! many thanks in advance, christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting part of a string
I've got a situation where I need to pull a string from a variable but I can't seem to get it figured out. I.e. value of $a = /realtor/Remax/Ed/files/ I need to get the string between the second and third / (slash) What I need: Remax Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: $_SESSION[] and register_globals=on
Andre Dubuc [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... A short question: My IP informed me that they have register_globals=on in their php.ini. Is this going to cause problems with my scripts that were written using $_POST, $_SESSION, etc? No, if everything is setup correctly both will work now. Otherwise, a lot of websites would have many many problems with the transition phase between register_globals = on and register_globals = off. Grtz, Leon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 27 Sep 2002 15:32:45 -0000 Issue 1610
php-general Digest 27 Sep 2002 15:32:45 - Issue 1610 Topics (messages 117809 through 117859): Re: length function 117809 by: Smith, Benjamin 117816 by: . Edwin 117817 by: . Edwin 117818 by: . Edwin 117819 by: . Edwin no $PATH_INFO by using URLs with *.php/value and not *.php?value 117810 by: michael schoenboeck Re: Looking for a forum 117811 by: Chip Wiegand php on apache on win2k 117812 by: Vic 117823 by: Brian McGarvie 117830 by: Sascha Braun 117837 by: karthikeyan PHP mysql configuration for windows 117813 by: Uma Shankari T. parse html code 117814 by: Rodrigo 117820 by: Khalid El-Kary Date-problem? 117815 by: Gustavus Re: Finding out when a Web page has changed 117821 by: Vikram Vaswani 117822 by: Vikram Vaswani parsing PHP to create HTML only page 117824 by: Tony Burgess 117841 by: Marek Kilimajer Instalation problem 117825 by: Alicia Molina (ABS) 117826 by: Chris Hewitt 117850 by: Chris Hewitt Re: remote files to servers 117827 by: Simon Angell php-Re: Remote files to servers 117828 by: Simon Angell setting .htaccess authentication with PHP 117829 by: Javier Montserat Re: mobile number 117831 by: Ford, Mike [LSS] what do you think? 117832 by: Arminas 117835 by: Ford, Mike [LSS] 117838 by: Miles Thompson 117845 by: Chase Urich Send mail in HTML 117833 by: Christian Ista GD Fonts 117834 by: Jonathan Rosenberg Re: Displaying full array contents 117836 by: Brad Harriger Re: Encrypted MySQL passwords 117839 by: Richard Fox Mobile Number - End of thread. 117840 by: Ryan A Bus Schedule / Time table 117842 by: Craig Re: Update involving a list field 117843 by: Marek Kilimajer Re: Encrypted MySQL passwords (new info from MysQL list) 117844 by: Richard Fox Web Caching 117846 by: Scott Fletcher php mysql fulltext search min word length = 3 117847 by: ROBERT MCPEAK 117856 by: Marek Kilimajer 4.0.2 = 4.2.3, form vars are empty? 117848 by: Qmail List 117851 by: Erwin 117852 by: Scott Houseman 117853 by: ed.home.homes2see.com 117854 by: Jesse Cablek exec issue - return value 127 117849 by: christian haines $_SESSION[] and register_globals=on 117855 by: Andre Dubuc 117859 by: Leon Mergen Re: exec issue - return value 127 (more) 117857 by: christian haines Getting part of a string 117858 by: ed.home.homes2see.com 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--- http://www.php.net/manual/en/function.strlen.php -Original Message- From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] Sent: Friday, 27 September 2002 1:35 PM To: [EMAIL PROTECTED] Subject: [PHP] length function I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Why, can't you just use strlen()? http://www.php.net/manual/en/function.strlen.php Or, am I missing something? - E "Jeff Bluemel" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel ---End Message--- ---BeginMessage--- Why, can't you just use strlen()? http://www.php.net/manual/en/function.strlen.php Or, am I missing something? - E "Jeff Bluemel" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel ---End Message--- ---BeginMessage--- Why, can't you just use strlen()? http://www.php.net/manual/en/function.strlen.php Or, am I missing something? - E "Jeff Bluemel" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a function that will give me the number of characters of a string, or number. I tried
[PHP] FW: problem with new_xmldoc()
I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas??
Re: [PHP] Getting part of a string
reg_match('^/[^/]*/([^/]*)/',$a, $match) $match[1] should contain what you need [EMAIL PROTECTED] wrote: I've got a situation where I need to pull a string from a variable but I can't seem to get it figured out. I.e. value of $a = /realtor/Remax/Ed/files/ I need to get the string between the second and third / (slash) What I need: Remax Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting part of a string
I'm not an expert on regex but this seems to work:- ereg(^/[^/]*/([^/]*)/.*$, /realtor/Remax/Ed/files/, $regs); if (isset($regs[1])) { print $regs[1]; } Debbie - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 4:23 PM Subject: [PHP] Getting part of a string I've got a situation where I need to pull a string from a variable but I can't seem to get it figured out. I.e. value of $a = /realtor/Remax/Ed/files/ I need to get the string between the second and third / (slash) What I need: Remax Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mailing-list and forum combination?
hi, does anyone know of a php-based combined mailing list and bulletin board/forum? something like a php lovechild of majordomo and yabbse? any pointers greatly appreciated! taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] quick mysql question
where can i find info on setting up a mysql database on a remote server? i know how to set them up on a local machine, but i can't figure out how to get to the command line setting on a remote server... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FW: problem with new_xmldoc()
What does php_info() say, was php compiled --with-dom Davíð Örn Jóhannsson wrote: I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] quick mysql question
Hi Doug, where can i find info on setting up a mysql database on a remote server? i know how to set them up on a local machine, but i can't figure out how to get to the command line setting on a remote server... me@mybox:~$ ssh my.remote.server Or am I missing something? Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session cookies
Chris and I have been working on this through private emails, and we (I mean he) finally figured out what the problem was... session.cookie_path was set to /tmp instead of /. I wanted to thank him for taking the time to help me work through this... Jeff Chris Shiflett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jeff, One quick thought ... Is your cookie domain the same domain as the URL domain you are using to test this? If not, the browser will not send the cookie, so that is a potential reason for this behavior. If the domain is the same, I see no reason why this shouldn't work, but I have two ideas you can try. 1. Rather than using the name of the cookie, try this on the receiving page: pre ? print_r($_COOKIE); ? /pre This should dump the entire array to the screen and would reveal any naming problems. 2. View the HTTP transactions themselves to make sure the proper Set-Cookie and Cookie headers are being used. There are several utilities that can help do this, and I recently wrote one in PHP (it's a quick hack though) you can get at http://protoscope.org/. The messages of interest are the original HTTP response from your Web server (which should contain the Set-Cookie header) and any future HTTP request (which should contain the Cookie header). This is the most reliable way to really analyze these types of problems. Hopefully these ideas will help uncover something. Chris Jeff Bluemel wrote: ok - no cookie exists... I have Netscape set to accept all cookies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: length function
thanks Edwin... I had looked through the function list, but couldn't find the command... Jeff @ Edwin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why, can't you just use strlen()? http://www.php.net/manual/en/function.strlen.php Or, am I missing something? - E Jeff Bluemel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] quick mysql question
jon - thanks for the reply. i tried this: prompt ssh server.net i got an open failed: no such file or directoy does that mean that ssh is not enabled on the server? i pinged the server and it said it was alive... Jon Haworth wrote: Hi Doug, where can i find info on setting up a mysql database on a remote server? i know how to set them up on a local machine, but i can't figure out how to get to the command line setting on a remote server... me@mybox:~$ ssh my.remote.server Or am I missing something? Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting part of a string
-Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] I've got a situation where I need to pull a string from a variable but I can't seem to get it figured out. I.e. value of $a = /realtor/Remax/Ed/files/ I need to get the string between the second and third / (slash) What I need: Remax - Just explode the string with / as the delimiter, and then grab the [2] element, for instance: $dirnames = explode('/', $a); echo $dirnames[2]; Cheers! Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mailing-list and forum combination?
Well Phorum.org can sort of do it but its not very well documented. It has a script in the scripts dir called phroum mail. Which takes email in and posts it to the selected forum and you can then set the forum to email all posts to an address I have yet to get my head around it but I think this would do the tricksort of. John On Friday 27 Sep 2002 4:51 pm, taylor wrote: hi, does anyone know of a php-based combined mailing list and bulletin board/forum? something like a php lovechild of majordomo and yabbse? any pointers greatly appreciated! taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file truncation when generating tar file for download ...
Thanks in large part to some of the recent discussions on this list, I've finally implemented some stuff that allows me to select a bunch of files and tar them up. This works great for smaller archives. If the resulting archive is very large, the download begins normally, but halts at 40-41MB. After a while, Mozilla comes back telling me that the file could not be saved because the source file could not be read. (For the record, yes, I have plenty of room on the partition to which I'm downloading.) The only settings I could find in php.ini that *might* apply are max_execution_time = 30 and memory_limit = 8M. Any ideas on how to make this work for archives of arbitrary size? Here's the code snippet for the tar stuff (yes, I know my variable names are pretty atrocious) ... function set_tar_headers () { header(Content-Type: application/x-tar); header(Content-disposition: attachment; filename=foo.tar); } function create_file_list ($foo) { while (list ($key, $val) = each ($foo)) { $a.= $val; } $a = str_replace ($mp3_dir, , $a); return $a; } //$foo is an array of filenames if ($action == tar) { set_tar_headers(); $a = create_file_list ($foo); chdir ($mp3_dir); passthru (tar -cf - $a); } This is all part of a larger script that allows me to search my music collection, select the songs/playlists/directories I want to listen to, and create a playlist of URLs to my server, so that I can play my own music from any machine that has a decent connection. Tarring and zipping selections just seemed like a nice add-on to that functionality. Thank you very much in advance for any insight! -- monique -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FW: problem with new_xmldoc()
That's likely an old name, look at the docs Davíð Örn Jóhannsson wrote: Don't know it's a just downloaded the win32 binary package -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 27. september 2002 15:58 To: PHP Subject: Re: [PHP] FW: problem with new_xmldoc() What does php_info() say, was php compiled --with-dom Davíð Örn Jóhannsson wrote: I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Java: Type Casting
Hello, I am using php 4.2.3 with the jdk1.3.1_04 running on RedHat 7.2 and apache 1.3.22. The terms Factory and Proxy are similar to their respective design patterns. I have a java Factory that creates Proxy objects. The Factory returns a base interface that can be cast as the class that was actually instantiated. The problem is that after I call the Factory method simpleCreateObject() from php I need to cast the variable returned as a derived class from within php. In java I would just cast the return value as whatever class I requested like so: // java code to cast return type as derived class per = (GenericProxy)tcpb.simpleCreateObject(Person, 0, null); // php code used to call simpleCreateObject() $per = $tcpb-simpleCreateObject('Person', 1, null); How can I cast $per as a different class? Thank you, Gardner -- Gardner Lloyd Bickford III TriAxial Data Systems 36 Brennan Street Watsonville, CA 95076 Phone: (831) 763-3697 x101 Fax: (831) 763-3699 Please note that the views expressed in this message are the views of the author alone and not necessarily the views of TriAxial Data Systems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exec issue - return value 127 (more and more)
here is some more info i figured out the exec fails because php is running in safe mode. that is ok when i am at home developing (i can turn it off) however when i go to upload my app to my server which runs in safe mode.. what do i do then? is there a way around this? i tried using the ini_set function to turn safe mode off but this appears not to work suggestions would be great as this is driving me nuts! cheers c. Christian Haines wrote: ok.. i found that i need to check the httpd error_log and it tells me that it can't find the file or directory for the command. how do i fix this? i tried a full pathname to the command but it still says it cannot find dir or file etc c. Christian Haines wrote: hi all, i am having a problem with exec. every command i try to run returns 127 (seg fault i think) but no array with info. what could be causing this problem? i have tried running the complete path to the command e.g. usr/bin/ls -l etc but with no luck. could this be something to do with my php.ini settings? any help would be greatly appreciated! many thanks in advance, christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FW: problem with new_xmldoc()
I think the only way is to put the whole xml into a string and replace the first line Davíð Örn Jóhannsson wrote: Thanks but I found out what it was I just had to enable some dll's in the php.ini on my test enviroment. But You wouldn't have any Idea how to set encoding=iso-8859-1 whene you Have created a new_xmldoc with new_xmldoc(1.0); Thanks for your time. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 27. september 2002 16:28 To: PHP Subject: Re: [PHP] FW: problem with new_xmldoc() That's likely an old name, look at the docs Davíð Örn Jóhannsson wrote: Don't know it's a just downloaded the win32 binary package -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 27. september 2002 15:58 To: PHP Subject: Re: [PHP] FW: problem with new_xmldoc() What does php_info() say, was php compiled --with-dom Davíð Örn Jóhannsson wrote: I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: exec issue - return value 127 (more and more)
set *safe_mode_exec_dir *and put there your binaries christian haines wrote: here is some more info i figured out the exec fails because php is running in safe mode. that is ok when i am at home developing (i can turn it off) however when i go to upload my app to my server which runs in safe mode.. what do i do then? is there a way around this? i tried using the ini_set function to turn safe mode off but this appears not to work suggestions would be great as this is driving me nuts! cheers c. Christian Haines wrote: ok.. i found that i need to check the httpd error_log and it tells me that it can't find the file or directory for the command. how do i fix this? i tried a full pathname to the command but it still says it cannot find dir or file etc c. Christian Haines wrote: hi all, i am having a problem with exec. every command i try to run returns 127 (seg fault i think) but no array with info. what could be causing this problem? i have tried running the complete path to the command e.g. usr/bin/ls -l etc but with no luck. could this be something to do with my php.ini settings? any help would be greatly appreciated! many thanks in advance, christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: quick mysql question
If it's a linux or unix box use ssh or telnet to get a shell on the remote system then follow the instructions in http://www.mysql.com/documentation/mysql/full/index.html . If it's a windows box then you have to use pcAnywhere or go to the machine to set it up, unless there's a ssh or telnet server running on the box. Cheers, Gardner Doug Parker wrote: where can i find info on setting up a mysql database on a remote server? i know how to set them up on a local machine, but i can't figure out how to get to the command line setting on a remote server... -- Gardner Lloyd Bickford III TriAxial Data Systems 36 Brennan Street Watsonville, CA 95076 Phone: (831) 763-3697 x101 Fax: (831) 763-3699 Please note that the views expressed in this message are the views of the author alone and not necessarily the views of TriAxial Data Systems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and https no working recieving cookies and header info how to fix needed.
I am using PHP 4.2.3 with Apache-SSL 1.3.26 and need some advice on how to get my scripts to receive the cookies that I am setting along with the POST and GET values from the preceding form. How do I go about this task? My thanks in advance for any help offered as I am totally stumped. Jeff Means [EMAIL PROTECTED]
RE: [PHP] Encrypted MySQL passwords
On Thu, 26 Sep 2002, John Holmes wrote: BTW (and I have not checked the CVS/TODO, so I ask here), is there planned support for SSL MySQL 4.x.x in PHP?. Yes. More info in Chapter 4.3.9.1 of the MySQL manual. Nope, I mean: support for SSL+MySQL4 in PHP's mysql_connect. I know that MySQL 4.0 supports SSL, but I don't know if PHP has/will have support for MySQL connections using SSL in future versions. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple Inheritance Emulation
I don't fully understand OOP, so my snippet might be wrong. But I need to emulate Multiple Inheritance for a script, so I've made the following, which I ask for opinions since I am not so sure if it will always work. class multipleInheritance { function callClass($class_to_call) { return new $class_to_call(); } } class A { function insideA() { echo I'm inside A!br /; } } class B { function insideB() { echo I'm inside B!br /; } } class C extends multipleInheritance { function insideC() { $a = parent::callClass('A'); $a-insideA(); $b = parent::callClass('B'); $b-insideB(); } } $c = new C(); $c-insideC(); -- And it echo: I'm inside A! I'm inside B! -- Julio Nobrega http://gnet.inerciasensorial.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Encrypted MySQL passwords
- Message from [EMAIL PROTECTED] - Date: Fri, 27 Sep 2002 13:30:40 -0500 (CDT) From: Rodolfo Gonzalez [EMAIL PROTECTED] Reply-To: Rodolfo Gonzalez [EMAIL PROTECTED] Subject: RE: [PHP] Encrypted MySQL passwords To: John Holmes [EMAIL PROTECTED] On Thu, 26 Sep 2002, John Holmes wrote: BTW (and I have not checked the CVS/TODO, so I ask here), is there planned support for SSL MySQL 4.x.x in PHP?. Yes. More info in Chapter 4.3.9.1 of the MySQL manual. Nope, I mean: support for SSL+MySQL4 in PHP's mysql_connect. I know that MySQL 4.0 supports SSL, but I don't know if PHP has/will have support for MySQL connections using SSL in future versions. Thanks. Rodolfo (Tocayo!), MySQL uses mysql_real_connect with an int client_flag to enable SSL. According to: http://www.php.net/manual/en/function.mysql-connect.php The PHP mysql_connect will also use an int client_flag to enable SSL connections. It seems that they are going to implement the exact same flags. Note, it's planned for PHP v4.3.0 HTH. Cheers, Rodolfo -- The greatest and noblest pleasure which men can have in this world is to discover new truths; the next is to shake off old prejudices. - Frederick the Great -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Multiple Inheritance Emulation
LOL, thanks for the laugh on a friday afternoon =]. -Original Message- From: Julio Nobrega [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 3:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Multiple Inheritance Emulation Julio Nobrega em Friday 27 September 2002 15:40 foi agraciado com uma resposta por: I don't fully understand OOP, so my snippet might be wrong. But I need to emulate Multiple Inheritance for a script, so I've made the following, which I ask for opinions since I am not so sure if it will always work. Er.. list, nevermind. What I did doesn't make any sense at all. Sorry for wasting everybody time and bandwidth. -- Julio Nobrega http://gnet.inerciasensorial.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular expression help converting doc to xml
I have a fairly large html document that I need to convert to xml. The current format is is: DD A whole bunch of text DT Something else /DT (There is a new line in there before DT) Which I need to convert to DD A whole bunch of text /DD DT Something else /DT Any ideas?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] coding standards - control structures
Hey all. I've read the pear coding standards. I assume that if php has any official coding standards then the pear standards would be them, correct? Anyways, the pear docs on coding standards show examples of using controls structures like the following: if ( !$var ) { do_something(); } else { do_something_else(); } --- But I really don't like putting the opening brace on the same line as the control statement. I really prefer doing this: if ( $var ) { do_something(); } or if( $var ) { do_something(); } else { do_something_else(); } --- Putting the opening brace one line down on the same column that the control statement starts on seems to give me a much better visual cue, especially when dealing with nested control statements. Is doing it my preferred way acceptable? Will my code be looked down on? thanks, --ed __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] echo writes number of chars written
List, On my php.4.2.3, Apache 4.0.42 install my echo statements all output the number of characters written (in hex). So this code: echo addrone$id-addrone/addrone; echo addrtwo$id-addrtwo/addrtwo; echo city$id-city/city; Makes this XML: 1d addronePO BOX 698/addrone 13 addrtwo/addrtwo 1a cityABCDEF GHIJKL/city Couldn't see anything in the bug report, ideas? /B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and JavaScript on a form validation task
Hi every1 I'm buidin' up a form that should perform a couple of checks before submit. I used javascript but as the form has got option fields also and some field changes upon the checkbox chosen the script has to know when I'm just changing the option or when I'm tryin' 2 send the form... (in order to change the option or eventually perform the check). Can I do that on the same page? ..I mean can I pass a variable through javascript 2 php? The problem is that if I call the submit button ready2be_checked and I use an onclick(validate_the_form) handle, javascript works fine but it misses the variable ready2be_checked so the isset statement for ex. if(isset($ready2be_checked)){ } doesn't work! Using onsubmit instead, javascript performs the check and sends the form anyway cause the isset check finds the variable $ready2be_checked !! ? ? ? ? ? ? ? Sorry if I posted it twice Thanx in advance Ricky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorting Quesiton
Hello All. I have a small 'to-do list' that is working just fine. the db-table structor is close to this: id datetime (for date of doing the task) into (quick title/intro about task) text (guts of work I have to do) active (is task active or done) Here is the question I've got: My datestamp is simply m/d/y. (I need to keep that format) I would like to be able to move a specific to-do up-or-down the list, for the given days tasks. Adding a new table field is not a problem, I'm just not sure how to control the sort-order, or the re-arrange. I'm also not against using an array (as a friend suggested) but I'm not understanding what he was getting at. (quick conversation with him) Anyway, any ideas on this sort of thing would be great! Thanks. John B. Abela -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] coding standards - control structures
I believe the standards are for coding PEAR modules so all code is presented in the same style. It really has no influence on the language or community at large. I say code the way you feel most comfortable with and damb to anyone who complains. :) -Kevin - Original Message - From: ed [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 2:16 PM Subject: [PHP] coding standards - control structures Hey all. I've read the pear coding standards. I assume that if php has any official coding standards then the pear standards would be them, correct? Anyways, the pear docs on coding standards show examples of using controls structures like the following: if ( !$var ) { do_something(); } else { do_something_else(); } --- But I really don't like putting the opening brace on the same line as the control statement. I really prefer doing this: if ( $var ) { do_something(); } or if( $var ) { do_something(); } else { do_something_else(); } --- Putting the opening brace one line down on the same column that the control statement starts on seems to give me a much better visual cue, especially when dealing with nested control statements. Is doing it my preferred way acceptable? Will my code be looked down on? thanks, --ed __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and JavaScript on a form validation task
Instead of check for $ready2be_checked, use a hidden form field instead of relying on the submit button to be pressed. If the Javascript auto-submits the form the hidden field will still be there. -Kevin - Original Message - From: Riccardo Sepe [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Friday, September 27, 2002 2:19 PM Subject: [PHP] PHP and JavaScript on a form validation task Hi every1 I'm buidin' up a form that should perform a couple of checks before submit. I used javascript but as the form has got option fields also and some field changes upon the checkbox chosen the script has to know when I'm just changing the option or when I'm tryin' 2 send the form... (in order to change the option or eventually perform the check). Can I do that on the same page? ..I mean can I pass a variable through javascript 2 php? The problem is that if I call the submit button ready2be_checked and I use an onclick(validate_the_form) handle, javascript works fine but it misses the variable ready2be_checked so the isset statement for ex. if(isset($ready2be_checked)){ } doesn't work! Using onsubmit instead, javascript performs the check and sends the form anyway cause the isset check finds the variable $ready2be_checked !! ? ? ? ? ? ? ? Sorry if I posted it twice Thanx in advance Ricky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] coding standards - control structures
Kevin Stone wrote: I believe the standards are for coding PEAR modules so all code is presented in the same style. It really has no influence on the language or community at large. I say code the way you feel most comfortable with and damb to anyone who complains. :) -Kevin The best way for sure as I stand before God (if you believe in that) is as follows: if( $foo ) { // Do something. } else { // Do something else. } Of course you're welcome to disagree ;) Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] coding standards - control structures
No I totaly agree. That's exactly the way I code! *ROTFLMAO* -Kevin - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED] Cc: ed [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, September 27, 2002 2:40 PM Subject: Re: [PHP] coding standards - control structures Kevin Stone wrote: I believe the standards are for coding PEAR modules so all code is presented in the same style. It really has no influence on the language or community at large. I say code the way you feel most comfortable with and damb to anyone who complains. :) -Kevin The best way for sure as I stand before God (if you believe in that) is as follows: if( $foo ) { // Do something. } else { // Do something else. } Of course you're welcome to disagree ;) Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Keeping your published script safe?
I found a good working program that does the trick. It does, however, eliminate the process making mods or editing the source for good. I found just encrypting the copyright part works great. Here's the program: http://www.rssoftlab.com/ It's called PHP Encoder and I'm pretty sure it's 100% free. Thanks, Stephen http://www.melchior.us http://php.melchior.us :: -Original Message- :: From: David Buerer [mailto:[EMAIL PROTECTED]] :: Sent: Thursday, September 26, 2002 3:44 PM :: To: '[EMAIL PROTECTED]' :: Subject: RE: [PHP] Keeping your published script safe? :: :: :: www.zend.com :: :: :: -Original Message- :: From: Stephen Craton [mailto:[EMAIL PROTECTED]] :: Sent: Thursday, September 26, 2002 2:09 PM :: To: [EMAIL PROTECTED] :: Subject: [PHP] Keeping your published script safe? :: :: :: Hello, :: :: I have many scripts published at various script sites and I :: just got a report of an incident where the user has removed :: my copyright at the bottom of the script. We have reached an :: agreement thank heavens, they're going to go search for a :: script that doesn't require the copyright. :: :: Anyway, I was just wondering if there was any program or :: script that can keep your script safe from people removing :: the copyright. Please help! I'd really like to keep my :: scripts safe from those hacker people. :: :: Thanks, :: Stephen :: http://www.melchior.us :: http://php.melchior.us :: :: :: :: -- :: PHP General Mailing List (http://www.php.net/) :: To unsubscribe, visit: http://www.php.net/unsub.php :: :: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Encrypted MySQL passwords
On Fri, 27 Sep 2002, Rodolfo Segleau wrote: Nope, I mean: support for SSL+MySQL4 in PHP's mysql_connect. I know that MySQL 4.0 supports SSL, but I don't know if PHP has/will have support for MySQL connections using SSL in future versions. Rodolfo (Tocayo!), Hola!, The PHP mysql_connect will also use an int client_flag to enable SSL connections. It seems that they are going to implement the exact same flags. Note, it's planned for PHP v4.3.0 Those are real good news. Thanks a lot :) Regards, Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] $_SESSION[] and register_globals=on
My IP informed me that they have register_globals=on in their php.ini. Is this going to cause problems with my scripts that were written using $_POST, $_SESSION, etc? If you can turn it off via, .htaccess, you'd be better. The scripts will run fine with $_POST or whatever, but realize your open to the vulnerabilities that made OFF the default. If you use if($value) anywhere, that value could come from the user. Just something to be aware of. Also, with register_globals ON, unregistering a session variable is tricky. You have to use session_unregister(value) and unset($_SESSION['value']) and maybe even unset($value); If you don't ever unregister variables, then you won't have a problem. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] coding standards - control structures
LOL! Right! I figure that _I'm_ the one who has to look at my code the most. May as well leave it where I put it, how I put it. Thanks for the chuckle! B --- Kevin Stone [EMAIL PROTECTED] wrote: I believe the standards are for coding PEAR modules so all code is presented in the same style. It really has no influence on the language or community at large. I say code the way you feel most comfortable with and damb to anyone who complains. :) -Kevin - Original Message - From: ed [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 2:16 PM Subject: [PHP] coding standards - control structures Hey all. I've read the pear coding standards. I assume that if php has any official coding standards then the pear standards would be them, correct? Anyways, the pear docs on coding standards show examples of using controls structures like the following: if ( !$var ) { do_something(); } else { do_something_else(); } --- But I really don't like putting the opening brace on the same line as the control statement. I really prefer doing this: if ( $var ) { do_something(); } or if( $var ) { do_something(); } else { do_something_else(); } --- Putting the opening brace one line down on the same column that the control statement starts on seems to give me a much better visual cue, especially when dealing with nested control statements. Is doing it my preferred way acceptable? Will my code be looked down on? thanks, --ed __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Bill Farrell Multivalue and *nix Support Specialist Phone: (828) 667-2245 Fax: (928) 563-5189 Web: http://www.jwfarrell.com __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regular expression help converting doc to xml
I have a fairly large html document that I need to convert to xml. The current format is is: DD A whole bunch of text DT Something else /DT (There is a new line in there before DT) Which I need to convert to DD A whole bunch of text /DD DT Something else /DT $new_text = str_replace(\n\tDT,/DD\n\tDT,$your_text); Assuming there is a tab in there... You'd be better off getting an editor that'll do this for you. Textpad lets you search and replace with regular expressions. Other programs do too. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where's waldo
Well, I didn't really mean to imply anything about people's honesty and so forth... I just wanted to say that validating (anything) on the client side is not normally a good (and reliable) idea. Of course, as always mentioned, validation on the server side is always better. - E "Kenneth Love" [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... about the peeking at the code... yes, you could, unless the images were coded somehow. perhaps just numbers, not names. after a few tries they'd find "waldo" easily enough, but not at first. and besides. i'd like to give people credit for being more honest than that. "@ Edwin" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... True. Perhaps. But, I think, you can actually do something like that WITH php. Say PHP+Flash or PHP+Javascript... Of course, if you're able to do something like this just by using PHP+Javascript (and HTML only), most probably, you can just take a peek at the code and find out where "waldo" is... ;) - E On Thursday, September 26, 2002 12:12 AM Marek Kilimajer wrote: This is for java, javascript, or flash, not much to do for php. Kenneth Love wrote: hi all. i'm interested in creating a php game that generates a page of random (ish) images, one of which is waldo (or the like). when the player clicks on waldo, they're taken to the next, slightly harder level. anyone think that sounds fun? any pointers, tips, advice, criticisms? -- -- http://kennethlove.onewingedangel.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_SESSION[] and register_globals=on
Thanks John, I had been debating which IP Iwould use for my site. With the information you've provided, I will use the one that has register_globals=off. One re-write of all my code is enough. Besides, the purpose of the default 'off' behavior is precisely why I'm using $_SESSION's anyway. I really appreciate the advice, since I'm almost about to put my site on-line. . . . Just a few (hah!) last-minute-bugs (double-hah!) have to be cleared up first before 'InstantFame (tm) or was that shame???. : The last thing I need is another headache like the one I developed using CSS. Thanks again, Andre On Friday 27 September 2002 05:42 pm, John Holmes wrote: My IP informed me that they have register_globals=on in their php.ini. Is this going to cause problems with my scripts that were written using $_POST, $_SESSION, etc? If you can turn it off via, .htaccess, you'd be better. The scripts will run fine with $_POST or whatever, but realize your open to the vulnerabilities that made OFF the default. If you use if($value) anywhere, that value could come from the user. Just something to be aware of. Also, with register_globals ON, unregistering a session variable is tricky. You have to use session_unregister(value) and unset($_SESSION['value']) and maybe even unset($value); If you don't ever unregister variables, then you won't have a problem. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using CURL to post data to a search engine
I am trying to use curl to post data to a search engine and then return the results in a variable so I can manipulate it. I have tried this but it does not seam to work properly. This is just an example of how I am trying to do this I don't have to use google for the search engine just thought if I can get it working with this I can get it to work with others $ch = curl_init (http://www.google.com/;); curl_setopt ($ch, CURLOPT_POST, 1); $word=php; $args=action=/searchhl=enie=UTF-8oe=UTF-8q=$wordbtnG=Google Search; curl_setopt ($ch, CURLOPT_POSTFIELDS, $args); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($ch); curl_close ($ch); echo $data; There does not seam to be much info or examples on using curl with php is there anyplace that you know of that has more info than the manual -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Assigning data to fields
I am kind of new to PHP. I know how to use a select statement and a query to get data out of a table in MySQL, but how do I assign those fields to variables? I know this must be easy! Thanks in advance!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Assigning data to fields
I think this should be a good reference for you: http://www.php.net/manual/en/function.mysql-fetch-array.php HTH -Brad Ken wrote: I am kind of new to PHP. I know how to use a select statement and a query to get data out of a table in MySQL, but how do I assign those fields to variables? I know this must be easy! Thanks in advance!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP: Carriage returns don't display in HTML
Greetings folks. I need my carriage returns to show up in my HTML output from my text form field. There is a JavaScript function that will convert carriage return to BR tags, but is there a PHP function that will add BR or P tags to a text form field in place of the carriage returns a user might add. Thanks in advance! -NorthBayShane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] seeking data validation class
Hi, I looked at phpclasses but saw nothing as simple as I wanted. There's a Perl module which does just what I want and perhaps I'll have to port it. The class accepts an assoc array of name=value, and the key to another assoc array which describes the constraints for the assoc array I'm passing in. Here is an example of the assoc array (it's Perl) which contains all my forms and then the class returns 3 assoc arrays (valid, invalid,missing using the key names, and this makes it very easy to use in your templates e.g. if missing_name, or invalid_zipcode etc.). my %forms = ( confirm_email = { required = [ qw(emailaddress emailaddress_verified searchengine_accounts) ], constraints = { emailaddress_verified = email, emailaddress = email, }, filters = [ trim ], }, verify_contact_info = { required = [ qw(country lastname firstname phone state zipcode city company street) ], optional = [ qw(fax) ], constraints = { #phone = american_phone, #zipcode= '/^\s*\d{5}(?:[-]\d{4})?\s*$/', state = '/\w{2,}/', #fax= american_phone, }, filters = [ trim ], field_filters = { phone = [phone] }, }, The Perl module that does this is: HTML::FormValidator So far I'm find PHP stuff that does everything under the sun. Anyone know of something like this? Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting part of a string
Assuming that it will always be in this format (/something/what you want/...), explode() the string by '/' into an array, and get the right element back. ? $a = /realtor/Remax/Ed/files/ $aa = explode('/', $a); echo $aa[2]; ? Enjoy Justin French on 28/09/02 1:23 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: I've got a situation where I need to pull a string from a variable but I can't seem to get it figured out. I.e. value of $a = /realtor/Remax/Ed/files/ I need to get the string between the second and third / (slash) What I need: Remax Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: seeking data validation class
Hello, On 09/27/2002 09:50 PM, Peter J. Schoenster wrote: I looked at phpclasses but saw nothing as simple as I wanted. There's a Perl module which does just what I want and perhaps I'll have to port it. The class accepts an assoc array of name=value, and the key to another assoc array which describes the constraints for the assoc array I'm passing in. Here is an example of the assoc array (it's Perl) which contains all my forms and then the class returns 3 assoc arrays (valid, invalid,missing using the key names, and this makes it very easy to use in your templates e.g. if missing_name, or invalid_zipcode etc.). my %forms = ( confirm_email = { required = [ qw(emailaddress emailaddress_verified searchengine_accounts) ], constraints = { emailaddress_verified = email, emailaddress = email, }, filters = [ trim ], }, verify_contact_info = { required = [ qw(country lastname firstname phone state zipcode city company street) ], optional = [ qw(fax) ], constraints = { #phone = american_phone, #zipcode= '/^\s*\d{5}(?:[-]\d{4})?\s*$/', state = '/\w{2,}/', #fax= american_phone, }, filters = [ trim ], field_filters = { phone = [phone] }, }, The Perl module that does this is: HTML::FormValidator So far I'm find PHP stuff that does everything under the sun. Anyone know of something like this? Assumming that you tried the forms generation and validation class, what did you realize that was missing to match your needs? http://www.phpclasses.org/formsgeneration -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Send mail in HTML
Hello, On 09/27/2002 08:52 AM, Christian Ista wrote: I use the mail function to send mail. On my development PC, I receive the mail in HTML, with the high priority,... I put the files on the production server, a linux machine, when I receive the mail is not in HTML but in plain text, I don't see the high priority. I receive that : Content-Type: text/html; charset=iso-8859-1 X-Priority: 1 X-Mailer: PHP / 4.2.3 Click on the link to activate the Could you tell me what can I do ? I use this code to send mail : $sender_name = MyWebsite; $sender_email = ; $contactemail = $Email1; $myreplyemail = ; $message = Click on the link to activate the account..'br'; $message .= http://www.website.com; $subject = TEST; $header = From: \.addslashes($sender_name).\ .$sender_email.\r\n; $header .= Reply-To: .$sender_email.\r\n; $header .= MIME-Version: 1.0\r\n; $header .= Content-Type: text/html; charset=iso-8859-1\r\n; $header .= X-Priority: 1\r\n; $header .= X-Mailer: PHP / .phpversion().\r\n; mail($contactemail, $subject, $message, $header); The mail function is very problematic. Depending on the platform you are using, different reasons may lead to the problem you are experiencing. Maybe you would like to try this PHP class for composing and sending messages, including with HTML, that auto-detects the OS and tries to work around some problems automatically for you: http://www.phpclasses.org/mimemessage Just let me know if it does not avoid your problem. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP: Carriage returns don't display in HTML
Shane mailto:[EMAIL PROTECTED] scribbled; There is a JavaScript function that will convert carriage return to BR tags, but is there a PHP function that will add BR or P tags to a text form field in place of the carriage returns a user might add. nl2br() -jesse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP: Carriage returns don't display in HTML
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Try nl2br(http://www.php.net/nl2br). ~Pauly On Friday 27 September 2002 08:19 pm, Shane wrote: Greetings folks. I need my carriage returns to show up in my HTML output from my text form field. There is a JavaScript function that will convert carriage return to BR tags, but is there a PHP function that will add BR or P tags to a text form field in place of the carriage returns a user might add. Thanks in advance! -NorthBayShane - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9lQxPDyXNIUN3+UQRAplZAJsHW7SeDvHzESn+mqbXZhmobMw8IwCfcWry IzMWaMTsegPaXrBmvjl9vVQ= =sL/V -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Assigning data to fields
I used the examples you have lead me to and I get this error? I am stumped? mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pay.php on line 51 Have any idea what this means? Thanks! Brad Bonkoski [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I think this should be a good reference for you: http://www.php.net/manual/en/function.mysql-fetch-array.php HTH -Brad Ken wrote: I am kind of new to PHP. I know how to use a select statement and a query to get data out of a table in MySQL, but how do I assign those fields to variables? I know this must be easy! Thanks in advance!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using CURL to post data to a search engine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I don't think you'll get php to work with google unless you use the google api - I heard that google has filtered out the php(and others) user-agent. If you need more info on the google api just let me know. ~Pauly On Friday 27 September 2002 07:25 pm, [EMAIL PROTECTED] wrote: I am trying to use curl to post data to a search engine and then return the results in a variable so I can manipulate it. I have tried this but it does not seam to work properly. This is just an example of how I am trying to do this I don't have to use google for the search engine just thought if I can get it working with this I can get it to work with others $ch = curl_init (http://www.google.com/;); curl_setopt ($ch, CURLOPT_POST, 1); $word=php; $args=action=/searchhl=enie=UTF-8oe=UTF-8q=$wordbtnG=Google Search; curl_setopt ($ch, CURLOPT_POSTFIELDS, $args); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($ch); curl_close ($ch); echo $data; There does not seam to be much info or examples on using curl with php is there anyplace that you know of that has more info than the manual - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9lQ4TDyXNIUN3+UQRAgkDAJ4tTM2U/c0giejT1DzdDEg5HbQm0gCdE1Ht il6KWww8aId6IE9xpBage08= =2miE -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Assigning data to fields
I used the examples you have lead me to and I get this error? I am stumped? mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pay.php on line 51 You're query probably failed. Look at mysql_error(). www.php.net/mysql_error ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using CURL to post data to a search engine
Google uses GET anyway, not POST. A simple fopen() is all you need, but then you'll be parsing HTML. The API is better for reliability. Paul Nicholson wrote: I don't think you'll get php to work with google unless you use the google api - I heard that google has filtered out the php(and others) user-agent. If you need more info on the google api just let me know. On Friday 27 September 2002 07:25 pm, [EMAIL PROTECTED] wrote: I am trying to use curl to post data to a search engine and then return the results in a variable so I can manipulate it. I have tried this but it does not seam to work properly. This is just an example of how I am trying to do this I don't have to use google for the search engine just thought if I can get it working with this I can get it to work with others $ch = curl_init (http://www.google.com/;); curl_setopt ($ch, CURLOPT_POST, 1); $word=php; $args=action=/searchhl=enie=UTF-8oe=UTF-8q=$wordbtnG=Google Search; curl_setopt ($ch, CURLOPT_POSTFIELDS, $args); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($ch); curl_close ($ch); echo $data; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: seeking data validation class
On 27 Sep 2002 at 22:09, Manuel Lemos wrote: Assumming that you tried the forms generation and validation class, what did you realize that was missing to match your needs? http://www.phpclasses.org/formsgeneration Well that's the first thing I found and I downloaded it. It does much more than what I want, for instance here: $subscription-AddInput(array( TYPE=text, NAME=email, MAXLENGTH=100, Capitalization=lowercase, ValidateAsEmail=1, ValidationErrorMessage=It was not specified a valid e-mail address )); Those attributes already exist in the form. I create the forms on the fly only once afterwhich they are in the hands of the designers to manipulate. I pass back to the form a data structure that will have something like: missing_email invalid_email and the designer can check for this, lke this in smarty: {if $error.missing_email}Yo give me email{/if} {if $error.invalid_email}Please verify your email{/if} and I have a script that will generated those if statements so one doesn't need to do a lot of typing. I don't like generating the form programmatically all the time ... I leave that to the *view*. I just want to pass the input data I received, the definition of the form I'm using with this data and have the function return the 3 arrays : good, invalid, missing. I've been very happy with this in Perl. The formgen is very powerful, too powerful and too intrusive into the other things I'm doing. I only need a small part of it. What I want has nothing really to do with html forms, just data validation. Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 28 Sep 2002 03:33:23 -0000 Issue 1611
php-general Digest 28 Sep 2002 03:33:23 - Issue 1611 Topics (messages 117860 through 117915): Re: problem with new_xmldoc() 117860 by: Davíð Örn Jóhannsson 117865 by: Marek Kilimajer 117873 by: Marek Kilimajer 117876 by: Marek Kilimajer Re: Getting part of a string 117861 by: Marek Kilimajer 117862 by: debbie_dyer 117870 by: Ford, Mike [LSS] 117906 by: Justin French mailing-list and forum combination? 117863 by: taylor 117871 by: John Wards quick mysql question 117864 by: Doug Parker 117866 by: Jon Haworth 117869 by: Doug Parker 117878 by: Gardner Lloyd Bickford III Re: session cookies 117867 by: Jeff Bluemel Re: length function 117868 by: Jeff Bluemel file truncation when generating tar file for download ... 117872 by: Monique Y. Herman PHP/Java: Type Casting 117874 by: Gardner Lloyd Bickford III Re: exec issue - return value 127 (more and more) 117875 by: christian haines 117877 by: Marek Kilimajer PHP and https no working recieving cookies and header info how to fix needed. 117879 by: Jeffrey D. Means Re: Encrypted MySQL passwords 117880 by: Rodolfo Gonzalez 117882 by: Rodolfo Segleau 117895 by: Rodolfo Gonzalez Multiple Inheritance Emulation 117881 by: Julio Nobrega 117883 by: Julio Nobrega 117884 by: Steve Bradwell Regular expression help converting doc to xml 117885 by: Geoff 117898 by: John Holmes coding standards - control structures 117886 by: ed 117890 by: Kevin Stone 117892 by: Robert Cummings 117893 by: Kevin Stone 117897 by: Bill Farrell echo writes number of chars written 117887 by: David Busby PHP and JavaScript on a form validation task 117888 by: Riccardo Sepe 117891 by: Kevin Stone Sorting Quesiton 117889 by: php.johnabela.com Re: Keeping your published script safe? 117894 by: Stephen Craton Re: $_SESSION[] and register_globals=on 117896 by: John Holmes 117900 by: Andre Dubuc Re: where's waldo 117899 by: . Edwin using CURL to post data to a search engine 117901 by: rdkurth.starband.net 117912 by: Paul Nicholson 117914 by: Chris Shiflett Assigning data to fields 117902 by: Ken 117903 by: Brad Bonkoski 117911 by: Ken 117913 by: John Holmes Re: Carriage returns don't display in HTML 117904 by: Shane 117909 by: Jesse Cablek 117910 by: Paul Nicholson seeking data validation class 117905 by: Peter J. Schoenster 117907 by: Manuel Lemos 117915 by: Peter J. Schoenster Re: Send mail in HTML 117908 by: Manuel Lemos 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--- I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? ---End Message--- ---BeginMessage--- What does php_info() say, was php compiled --with-dom Davíð Örn Jóhannsson wrote: I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? ---End Message--- ---BeginMessage--- That's likely an old name, look at the docs Davíð Örn Jóhannsson wrote: Don't know it's a just downloaded the win32 binary package -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 27. september 2002 15:58 To: PHP Subject: Re: [PHP] FW: problem with new_xmldoc() What does php_info() say, was php compiled --with-dom Davíð Örn Jóhannsson wrote: I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas?? ---End Message--- ---BeginMessage--- I think the only way is to put the whole xml into a string and replace the first line Davíð Örn Jóhannsson wrote: Thanks but I found out what it was I just had to enable some dll's in the php.ini on my test enviroment. But You wouldn't have any Idea how to set encoding=iso-8859-1 whene you Have created a new_xmldoc with new_xmldoc(1.0); Thanks for your time. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 27. september 2002 16:28 To: PHP Subject: Re: [PHP] FW: problem with new_xmldoc() That's likely an old name, look at
[PHP] .htaccess to change browscap setting
AllowOverride is set to All in apache, and when I put this in a .htaccess file, it changes the value: IfModule mod_php4.c php_value upload_max_filesize 750 /IfModule however, when I put php_value browscap /home/user/php/browscap.ini in there, it doesn't change the setting. Is browscap not changeable from .htaccess, or am I doing something wrong? Thanks for the help!
Re: [PHP] Assigning data to fields
Thanks John! That was it! John W. Holmes [EMAIL PROTECTED] wrote in message 01c26698$1abbc290$7c02a8c0@coconut">news:01c26698$1abbc290$7c02a8c0@coconut... I used the examples you have lead me to and I get this error? I am stumped? mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pay.php on line 51 You're query probably failed. Look at mysql_error(). www.php.net/mysql_error ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] field size for common data
What amount of chars is reasonable and should I allow for each of the following fields in a database: company name: 30 chars address/street: 30 chars city: 30 chars Thanks.
[PHP] counting words in a string
I need to count how many times the word AVAILABLE appears in a string like this $string =AVAILABLE More Info AVAILABLE More Info; some time the string looks like this $string =UNAVAILABLE More Info AVAILABLE More Info; or $string =AVAILABLE More Info UNAVAILABLE More Info; when I use $srch=AVAILABLE; $count=substr_count(strtolower($string), strtolower($srch)); echo $count; it puts the count a 2 even when one of the words is UNAVAILABLE how can I make it only count AVAILABLE and not UNAVAILABLE or visa verse -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] field size for common data
I'm no expert on MySQL field types, but I'd be going for a varchar field of 50-ish (maybe more???)... the reason is that (from what I understand) varchar fields only take up as much room as the content, plus one or two bytes, so making them 50 vs 30 will offer no advantage, but may become a disadvantage down the track. It'd be worth checking the MySQL manual though. Justin on 28/09/02 3:24 PM, Pablo Oliva ([EMAIL PROTECTED]) wrote: What amount of chars is reasonable and should I allow for each of the following fields in a database: company name: 30 chars address/street: 30 chars city: 30 chars Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting words in a string
if this is your SPECIFIC problem, putting a space at the beginning of $srch will help, eliminating XAVAILABLE... but this will cause a problem with the word AVAILABLE appearing at the start of the string, so temporarily put a space at the start of the string: ? // UNTESTED $count = substr_count(' '.strtolower($string), strtolower(' '.$srch)); echo $count; ? this won't help if there are newlines and other white space instead of spaces, and won't help (so far) for a different set of circumstances... it would be nice to extend substr_count() could be extended to have an option. Justin on 28/09/02 3:41 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: I need to count how many times the word AVAILABLE appears in a string like this $string =AVAILABLE More Info AVAILABLE More Info; some time the string looks like this $string =UNAVAILABLE More Info AVAILABLE More Info; or $string =AVAILABLE More Info UNAVAILABLE More Info; when I use $srch=AVAILABLE; $count=substr_count(strtolower($string), strtolower($srch)); echo $count; it puts the count a 2 even when one of the words is UNAVAILABLE how can I make it only count AVAILABLE and not UNAVAILABLE or visa verse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php