Re: [PHP] Printing
on 01/07/02 5:01 PM, Chris Kay ([EMAIL PROTECTED]) wrote: > You saying there is a way for the scripts to know what kind of browser u r > using? Yes, there are ways of determining the browser, but I believe what Jason was saying is that PHP happens on the server side (here we go again)... In other words, by the time it hits your browser, it's just HTML, combined with any JavaScript or CSS that you choose. So PHP can't interact with any client (browser)-side systems (like printing) at all. Printing a page is entirely up to the browser or client implementation. You may want to consider generating a multi-page RTF file or PDF which is generated on the fly, saved to disc, and printed upon your request. At least you only get the print window once. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] emulating enable_trans_sid
Hi It just so happens I have been playing with an html parser making an html to xml converter. I started with phpHTMLparse class but it couldn't cope with the html generated by microsoft so I have modified it to better handle carriage returns,white space,comments and embedded commands in the html. Your quite welcome to the files if it'll help. Tom At 04:03 PM 1/07/2002 +1000, Justin French wrote: >on 01/07/02 3:36 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: > > > Ok probably the easiest is just to add > > to the end of each url, if cookies are supported SID will be an empty > string. > >I want to avoid this, because it adds a level of complexity to the >construction of pages that I'm not comfortable with. With multiple writers, >designers and programmers passing stuff around, it'll be way too easy to >loose the session. > >I'm not really looking for "easiest", I'm looking for "the solution", >regardless of how long it take to perfect, because this will be a write-once >solution that I'll use over and over. > >It's quite possible that the end solution will require a decent HTML parser >or state engine. Fun fun :) > > >Justin French > > >-- >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] emulating enable_trans_sid
That'd be great -- for inspiration if nothing else :) Justin French on 01/07/02 6:35 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: > Hi > It just so happens I have been playing with an html parser making an html > to xml converter. I started with phpHTMLparse class but it couldn't cope > with the html generated by microsoft so I have modified it to better handle > carriage returns,white space,comments and embedded commands in the html. > Your quite welcome to the files if it'll help. > Tom > > At 04:03 PM 1/07/2002 +1000, Justin French wrote: >> on 01/07/02 3:36 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: >> >>> Ok probably the easiest is just to add >>> to the end of each url, if cookies are supported SID will be an empty >> string. >> >> I want to avoid this, because it adds a level of complexity to the >> construction of pages that I'm not comfortable with. With multiple writers, >> designers and programmers passing stuff around, it'll be way too easy to >> loose the session. >> >> I'm not really looking for "easiest", I'm looking for "the solution", >> regardless of how long it take to perfect, because this will be a write-once >> solution that I'll use over and over. >> >> It's quite possible that the end solution will require a decent HTML parser >> or state engine. Fun fun :) >> >> >> Justin French >> >> >> -- >> 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] php install
Hi, I'm trying to install PHP 4.2.1 on SuSE SLES 7.3 and I get the following error message checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up any ideas? Nigel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php install
On Monday 01 July 2002 11:20, Nigel George wrote: > Hi, I'm trying to install PHP 4.2.1 on SuSE SLES 7.3 and I get the > following error message > > checking lex output file root... ./configure: lex: command not found > configure: error: cannot find output from lex; giving up > > any ideas? install flex matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Globals bug??
Are you using any opcode cache? Are you sure it is another process or might it be another thread. Marek [EMAIL PROTECTED] wrote: >We are seeing a rare bug that seems to imply that there is a bug in PHP's >global variables across httpd processes. To make a long story short, it >appears that on rare occassions our script gets the value of a HTTP_GET_VARS >variable from another user's process. Is this possible? BTW, it seems to occur >when using HTTP_GET_VARS and the new 'super globals'. > >FWIW, we're using PHP 4.1.2 on (Red Hat) Linux 2.4.9 with Apache 1.3.12. > >Thanks! > >(please reply via email in addition to posting here if possible) > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keeping "Secrets" in PHP Files
On Sunday 30 June 2002 09:52, Justin French wrote: > on 29/06/02 3:20 AM, Tamas Arpad ([EMAIL PROTECTED]) wrote: > >> I was thinking if you use 90 character long filenames, assuming you > >> only use the letters of the alphabet and the digits then you would > >> have 62^90 different filenames, which is roughly 2E161 (2 followed by > >> 161 zeros), which is quite a bit. Hopefully the numbers involved > >> would make it infeasible for an attacker to loop through all the > >> permutations. > > > > But what if the attacker just knows one file's name, for example > > index.php or something that's in the url in the browser. Then he/she > > can stole that file, read it, and gets other filenames because of > > includes/requires. With some work he/she can get all the files without > > any bruteforce filename guessing. > [...] > If you adopt some of the practices (I think) included earlier in this > thread by me, you could restrict browser access to your inc files by the > use of smart file naming, dedicated directories and .htaccess files, > then this should cover the basics of people grabbing your included files > (with passwords etc) via http (browser). > > It doesn't cover people within the server (others on a shared server, > etc) though. Yes, but I think we were talking about the latter, when users have shell access on a shared server. Preventing from getting the php source through the web server is relatively easy, there are really a dozen of ways. Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strip_tags
I'm having a problem using strip_tags. When I try and run a table through strip_tags with the following vars, it looses everything after the first cell with content in, i.e: nothing after the first cell is returned, not even a can anyone help? is this a PHP bug? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with preg_replace()
ive been tryin to find a solution for this problem for some hours now, but i just dont know how to do it... so i ask for ur assistance. Lemme list some examples, so u can see what im tryin to do :) "word" = "word" >word = >| word | "word = >|word | "word it should replace it with >|word | and so on as u see from examples... any help or hints would be helpfull... thats what i have now: preg_replace("#^[<|>]?[^\"](.*?)[^\"]$#i", "| \\0 |", $string); .. but it doesnt work :P thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with menu
I have a table with id, pid(parent), title and page_name(url) fields. The vars provided to the script are the current page's title, id and pid(parent) When I am on the parent page I get this(Which is what I want): [ Chronological History ][ Website Chronological History ] When I am in the Child I get this: [ Website Chronological History ][ Website Chronological History ] What am I doing wrong??? I have stared at this two many times now and am probably missing the obvious function menu($id, $pid, $title) { $query = "select * from meta_data WHERE pid = '$id' OR pid = '$pid' && pid != 0"; $result = mysql_query($query); $num_results = mysql_num_rows($result); if($num_results != 0){ ?> '.$row['title'].' ]'; } } ?> http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Populate Popup Menu from Database
On Saturday, June 29, 2002, at 11:41 AM, Mike Tuller wrote: > What is here is beyond my understanding, and seems like it is a little > much > for what I need. > > Here is what my database table looks like: > > Departments > department_id > department_name > > I just want to list the department name in the popup. although I wrote this instruction in response to a question about integrating the listbox with javaScript, ignore the JS stuff, and you will see how to dynamically populate a listbox with database data: http://marc.theaimsgroup.com/?l=php-general&m=102503848224300&w=2 Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keeping "Secrets" in PHP Files
On Friday, June 28, 2002, at 06:14 PM, Lazor, Ed wrote: > The hosting provider could probably implement a solution... Alter the > FTP > configuration to automatically set the group permission to that of the > web > server when you transfer files. You wouldn't need to be in the group. > You're the owner and can modify your own files. World Read access > would be > unnecessary. Someone pointed out last week that a maleficant can write a script that reads other files' data [and does something evil with that], since it will be executed as the web server user and the web server user can read all those files. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
On Saturday, June 29, 2002, at 03:13 PM, Jed Verity wrote: > I can't find any information on passing JavaScript variables to PHP on > the > same page (i.e. not through the POST information of a submitted form). > Is > this because it's not possible? > > To take the load off the server, I'm trying to do a bunch of string > manipulations and loops in JavaScript and then hand that info off to PHP > once it's done. How will you communicate with PHP without submitting an HTTP request of some sort? So, really, you will need to submit -something-, though it could be GET data, POST data, or COOKIE data. You can't have JavaScript talk to PHP "within the same page" since the webserver/PHP "forgets" all information related to that page as soon as it shoots it to the user-agent. I'm assuming you know how to use JavaScript to set a cookie, and/or make a new request with GET or POST data attached. If not, let me know. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] creating multidimensional arrays
Hi All I want to create a multi dimensional arrays as below $result[$something]['$key_string_01] = value_01 $result[$something]['$key_string_02] = value_02 $result[$something]['$key_string_03] = value_03 $result[$something]['$key_string_04] = value_04 $result[$something][0] = value_06 $result[$something][1] = value_07 $result[$something][2] = value_08 . . . Here is what I did 1. use some assign statement $result[$something]['$key_string_0n'] = value_0n for the first four elements 2. for the fifth elements onward, I used this $result[$something] = preg_split(); However, as I test it with foreach loop, I am only getting $result[$something][0] = value_06 $result[$something][1] = value_07 $result[$something][2] = value_08 . . . I lost the first four elements!! Can anyone help on this please? Thanks /dl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Page rendering speed: PostNuke or PHP-Nuke
To those who have used these content management systems: which one renders pages faster, PostNuke or PHP-Nuke? I plan to set up a site on my Linux box and want to know which one I should use. :) Also, would anyone know of a PHP based content management system that does not have the usual 3 columns look? - Andoy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Win98, Apache, PHP Config Problem
Good morning! Over the weekend I attempted to set up another test platform on a Win98 laptop, running Apache as the server and MySQL as the database engine. Just want to use it for some testing locally. No matter what I attempted I could not get PHP to work. I followed suggestions from; http://www.php.net/manual/en/install.windows.php I tried some other experiments, and finally gave up. I would either get file not found messages, or a server error. Has anyone ever done this kind of install, and if so, is there something I can do to get it working? If not I am going to install Linux on the laptop. Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Keeping "Secrets" in PHP Files
Easy, http://www.zend.com/store/products/zend-encoder.php Dan -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 7:29 AM To: Lazor, Ed Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Keeping "Secrets" in PHP Files On Friday, June 28, 2002, at 06:14 PM, Lazor, Ed wrote: > The hosting provider could probably implement a solution... Alter the > FTP > configuration to automatically set the group permission to that of the > web > server when you transfer files. You wouldn't need to be in the group. > You're the owner and can modify your own files. World Read access > would be > unnecessary. Someone pointed out last week that a maleficant can write a script that reads other files' data [and does something evil with that], since it will be executed as the web server user and the web server user can read all those files. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- 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] Win98, Apache, PHP Config Problem
JB> Over the weekend I attempted to set up another test platform on a Win98 JB> laptop, running Apache as the server and MySQL as the database engine. JB> I tried some other experiments, and finally gave up. I would either get file JB> not found messages, or a server error. Has anyone ever done this kind of JB> install, All the time. Never had a problem. Tutorials here: http://www.thickbook.com/extra/index.html?t=in Installing MySQL on Windows is just an installer file. PHP is already configured to use it; nothing extra needed. - Julie --> Julie Meloni --> [EMAIL PROTECTED] --> www.thickbook.com Find "Sams Teach Yourself MySQL in 24 Hours" at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Win98, Apache, PHP Config Problem
Just went through - versions please? Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Win98, Apache, PHP Config Problem Importance: Low Good morning! Over the weekend I attempted to set up another test platform on a Win98 laptop, running Apache as the server and MySQL as the database engine. Just want to use it for some testing locally. No matter what I attempted I could not get PHP to work. I followed suggestions from; http://www.php.net/manual/en/install.windows.php I tried some other experiments, and finally gave up. I would either get file not found messages, or a server error. Has anyone ever done this kind of install, and if so, is there something I can do to get it working? If not I am going to install Linux on the laptop. Thanks! Jay -- 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] Win98, Apache, PHP Config Problem
[snip] Just went through - versions please? [/snip] Apache 1.3, PHP 4.1 Thx! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Win98, Apache, PHP Config Problem
[snip] All the time. Never had a problem. Tutorials here: http://www.thickbook.com/extra/index.html?t=in Installing MySQL on Windows is just an installer file. PHP is already configured to use it; nothing extra needed. [/snip] Yeah, I knew that about MySQL, I just couldn't get PHP working under Apache. Apparently I am missing one of the .dll's (php4apache.dll). Thanks for the insight, I will try to get it running again tonight using newer versions of all. Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 1 Jul 2002 14:21:29 -0000 Issue 1438
php-general Digest 1 Jul 2002 14:21:29 - Issue 1438 Topics (messages 104612 through 104661): checking date is not greater than today 104612 by: Timothy J. Luoma 104619 by: John Holmes 104621 by: Timothy J. Luoma 104627 by: Peter J. Schoenster 104628 by: Timothy J. Luoma emulating enable_trans_sid 104613 by: Justin French 104614 by: Tom Rogers 104620 by: Justin French 104630 by: Tom Rogers 104633 by: Justin French 104634 by: Martin Towell 104640 by: Tom Rogers 104641 by: Justin French Printing 104615 by: Chris Kay 104617 by: Jason Wong 104637 by: Chris Kay 104639 by: Justin French Re: Fast code to partially flatten an array based on several keys? 104616 by: Morgan Grubb 104618 by: Martin Towell Re: XML Problem 104622 by: Analysis & Solutions PHP with CSS 104623 by: Bruce Karstedt 104624 by: Martin Towell 104625 by: Peter 104629 by: Bruce Karstedt 104631 by: Martin Towell 104632 by: CC Zona Re: securing an 'includes' dir 104626 by: Steve Yates Increment 104635 by: Uma Shankari T. 104636 by: Martin Towell 104638 by: Mirza Muharemagic php install 104642 by: Nigel George 104643 by: Matt Williams Re: Globals bug?? 104644 by: Marek Kilimajer Re: Keeping "Secrets" in PHP Files 104645 by: Tamas Arpad 104652 by: Erik Price 104657 by: Dan Vande More strip_tags 104646 by: BB help with preg_replace() 104647 by: Gregor Jak¹a blob versus file 104648 by: andy Re: [PHP-DB] blob versus file 104649 by: Pierre-Alain Joye Problem with menu 104650 by: JJ Harrison Re: Populate Popup Menu from Database 104651 by: Erik Price Re: Javascript to PHP? 104653 by: Erik Price creating multidimensional arrays 104654 by: DoL Page rendering speed: PostNuke or PHP-Nuke 104655 by: Andres Montiel Win98, Apache, PHP Config Problem 104656 by: Jay Blanchard 104658 by: Julie Meloni 104659 by: Bruce Karstedt 104660 by: Jay Blanchard 104661 by: Jay Blanchard 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] -- --- Begin Message --- I am trying to compare a given date string (i.e. June 30, 2002 is 20020630). I want to make sure that the input string that is given is not greater than today (i.e. if today is June 30, and you ask for 20020701, I want to be able to throw an error). I'm a newbie, so I'm not sure the best way to do this. My thought was that if I take the year () and add on the day-of-year (i.e. Feb 10 = 041) then I would be able to compare them as you would any other numbers. The problem I have then run into is that strftime and date seem to have different opinions as to what day of the year it is. date z - day of the year; i.e. "0" to "365" strftime %j - day of the year as a decimal number (range 001 to 366) I have these variables defined $SEARCHYEAR = i.e 2002 $SEARCHMONTH = MM i.e. 06 $SEARCHDAY = DD i.e. 30 $TODAYCMP=date ("Yz"); $SEARCHCMP=strftime("%Y%j",mktime(0,0,0,$SEARCHMONTH,$SEARCHDAY,$SEARCHYEAR)); and then I tried it for today and got echo " "; as a result I get So I'm trying to figure out: A) Why strftime and date don't handle leap years the same way and (more importantly) B) The best way to make sure a given date MMDD is not greater than "today" I did some googling & php.net searching without luck. Thanks TjL --- End Message --- --- Begin Message --- $today = date("Ymd"); if($input_date > $today) { echo "Date must be before today!"; } It looks like you're dealing with MySQL dates. There are a ton of useful functions you can use in your queries that make any time manipulation in PHP unnecessary. Chapter 6, Date and Time Functions of the MySQL manual. ---John Holmes... > -Original Message- > From: Timothy J. Luoma [mailto:[EMAIL PROTECTED]] > Sent: Sunday, June 30, 2002 10:31 PM > To: PHP Mailing List > Subject: [PHP] checking date is not greater than today > > > I am trying to compare a given date string (i.e. June 30, 2002 is > 20020630). I want to make sure that the input string that is given is not > greater than today (i.e. if today is June 30, and you ask for 20020701, I > want to be able to throw an error). > > I'm a newbie, so I'm not sure the best way to do this. My thought wa
Re: [PHP] strip_tags
On Mon, Jul 01, 2002 at 12:35:53PM +0100, BB wrote: > I'm having a problem using strip_tags. Sounds like you're using it wrong. Re-read http://www.php.net/manual/en/function.strip-tags.php. Then fix your code accordingly. If that doesn't work, post a _sample_ of your HTML and PHP that don't work. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cURL in an exec()
I can do this; exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o cdrlist.html https://theserver.com/list.html";); but why can't I do this exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o ".$listline." https://theserver.com/download/ ".$listline.""); The only change is that I have now made the variable $listline available as there is a routine that steps through each file from the list. I can print the line out and it looks correct. Am I missing something? Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php & SMS (or phone contact)
Hi, i want to make a script, that monitors my server and if its down, sends an SMS, pager message, or rings the phone (lol) to contact me. Is it possible to send a message to a pager or an SMS to a handy with php? Or are there any scripts already out there? I tried to take a look around, but most scripts i found relied on services, which don't exist anymore, of who changed their service, so that its not possible to use from the outside. Regards, Hendrik
RE: [PHP] need to change $ char in string
Uli & others, Thanx for the suggestions. This works as stated but the data already exists in this format from an old database and I'm trying to parse it into logical fields. Originally the data in the field looked something like 1$General/ms1.zip#12$Another/xqy.zip#. I deleted the ending # then used explode to separate the information on the # and now I need to separate the info before the $ from what comes after it. I've tried everyone's suggestions but they only work if I'm testing and can define the string using single quotes. How can I split on a $ or change the $ to something else if I'm getting the information from a database (MySQL), not defining it using single quotes like in your example? Bev -Original Message- From: Uli B [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 11:56 AM To: PHP List Subject: Re: [PHP] need to change $ char in string use single quotes: double quotes would confuse php with variable names. it thinks that $General is a variable and replace it by it's empty content. single quotes prevent php from evaluating the string: $test_string = '1.2$General/ms1.zip'; single quotes on regex too (same reason). the backslash in this case (\$) refers to perl regular expression syntax but does not take care of php ! $new_string = preg_replace('/\$/', "%", $test_string); ub At 10:58 29.06.02 -0400, Beverly Steiner wrote: >I've tried everything I can think of to change a dallar sign in a string to >something else or to split the string on the $ but I can't the the >information that comes after the $. > >Typical string contains: 1.2$General/ms1.zip > >when I try: > $new_string = preg_replace("/\$/", "%", $test_string); > >or (trying to avoid specifying the $): > $new_string = preg_replace("/(\d\.\d{1,2})\D(\w.*$)/", "\1%\2", >$test_string); > >echo "new_string is $new_string"; prints new_string is 1.2 > >Has anyone solved this problem? > >Thanx, > >Bev > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- --- Ulrich Borchers Brandenberger Straße 18, 41065 Mönchengladbach fon +49-2161-175883 icq 1282868 --- -- 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] help with preg_replace()
On Mon, Jul 01, 2002 at 01:50:31PM +0200, Gregor Jak¹a wrote: > > "word" = "word" > >word = >| word | > >"word = >|word | > > preg_replace("#^[<|>]?[^\"](.*?)[^\"]$#i", "| \\0 |", $string); preg_replace('/^(<|>)+"?([^"]*)"?$/', '\\1| \\2 |', $string); I noticed that when there are quotes, you don't have a space between the " and the word. I didn't deal with that. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need to change $ char in string
On Monday 01 July 2002 22:47, Beverly Steiner wrote: > Uli & others, > > Thanx for the suggestions. This works as stated but the data already > exists in this format from an old database and I'm trying to parse it into > logical fields. Originally the data in the field looked something like > 1$General/ms1.zip#12$Another/xqy.zip#. I deleted the ending # then used > explode to separate the information on the # and now I need to separate the > info before the $ from what comes after it. I've tried everyone's > suggestions but they only work if I'm testing and can define the string > using single quotes. > > How can I split on a $ >or change the $ to something else if I'm getting the > information from a database (MySQL), not defining it using single quotes > like in your example? I think you're confused. There is nothing in MySQL which dictates strings as single-quoted or double-quoted. I think you had best post some code. Show us how you're retrieving the data from MySQL. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Two heads are better than one. -- John Heywood */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php & SMS (or phone contact)
On Monday 01 July 2002 22:46, Duncan wrote: > Hi, > > i want to make a script, that monitors my server and if its down, sends an > SMS, pager message, or rings the phone (lol) to contact me. Is it possible > to send a message to a pager or an SMS to a handy with php? Or are there > any scripts already out there? > I tried to take a look around, but most scripts i found relied on services, > which don't exist anymore, of who changed their service, so that its not > possible to use from the outside. Your service provider (pager or mobile) must provide a gateway. Do they? If not, you can't expect PHP (versatile as it may be) to magically interface to their network :) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The bug stops here. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cURL in an exec()
On Monday 01 July 2002 22:37, Jay Blanchard wrote: > I can do this; > > exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o > cdrlist.html https://theserver.com/list.html";); > > but why can't I do this > > exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o > ".$listline." https://theserver.com/download/ ".$listline.""); extra space here? ^ > The only change is that I have now made the variable $listline available as > there is a routine that steps through each file from the list. I can print > the line out and it looks correct. Am I missing something? I think you've got something extra rather than missing :) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Do you think that illiterate people get the full effect of alphabet soup? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php & SMS (or phone contact)
don't reinvent the wheel. (Unless you jsut REALLY want to) Try www.nagios.org It has support for SMS. (Be prepared to spend about 3-4 hours setting it up) =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Duncan [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: [PHP] php & SMS (or phone contact) Hi, i want to make a script, that monitors my server and if its down, sends an SMS, pager message, or rings the phone (lol) to contact me. Is it possible to send a message to a pager or an SMS to a handy with php? Or are there any scripts already out there? I tried to take a look around, but most scripts i found relied on services, which don't exist anymore, of who changed their service, so that its not possible to use from the outside. Regards, Hendrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] creating multidimensional arrays
On Mon, Jul 01, 2002 at 09:38:50PM +0800, DoL wrote: > Hi All > > I want to create a multi dimensional arrays as below > > $result[$something]['$key_string_01] = value_01 ^ Two things: | You didn't put a closing ' here - BUT, you probably don't want one, since it looks like you want that key to be a variable. Things between '' don't get evaluated. So the key would wind up literally being "$key_string_01" rather than the value of $key_string_01. Of course, this could be a typo as it looks like you retyped your code rather than direclty copying/pasting or importing the file into the email you were composing. If you want an accurate answer, provide an accurate example. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strip_tags
OK, this is a 3x3 table pasted in from word! This is the raw HTML this is A table pasted From a word document This is what happens to it after $txt = strip_tags($txt,""); this Cut off after the first cell Help Thanks in advance "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Mon, Jul 01, 2002 at 12:35:53PM +0100, BB wrote: > > I'm having a problem using strip_tags. > > Sounds like you're using it wrong. Re-read > http://www.php.net/manual/en/function.strip-tags.php. Then fix your code > accordingly. > > If that doesn't work, post a _sample_ of your HTML and PHP that don't > work. > > --Dan > > -- >PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cURL in an exec()
[snip] > but why can't I do this > > exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o > ".$listline." https://theserver.com/download/ ".$listline.""); extra space here? ^ I think you've got something extra rather than missing :) [/snip] Thanks Jason, I fixed that and still does not work. So I am trying this; $curlline("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o ".$listline." https://theserver.com/download/".$listline."";); print($curlline);
Re: [PHP] Javascript to PHP?
Thanks for the response, Erik! I think I will try passing the data in a cookie to a "hidden" frame, refreshing the frame, and then reading the data back. Many thanks to all for the suggestions! Cheers, Jed I liked it when Erik Price wrote this to me: > > On Saturday, June 29, 2002, at 03:13 PM, Jed Verity wrote: > >> I can't find any information on passing JavaScript variables to PHP on >> the >> same page (i.e. not through the POST information of a submitted form). >> Is >> this because it's not possible? >> >> To take the load off the server, I'm trying to do a bunch of string >> manipulations and loops in JavaScript and then hand that info off to PHP >> once it's done. > > How will you communicate with PHP without submitting an HTTP request of > some sort? So, really, you will need to submit -something-, though it > could be GET data, POST data, or COOKIE data. > > You can't have JavaScript talk to PHP "within the same page" since the > webserver/PHP "forgets" all information related to that page as soon as > it shoots it to the user-agent. > > I'm assuming you know how to use JavaScript to set a cookie, and/or make > a new request with GET or POST data attached. If not, let me know. > > > Erik > > > > > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strange url include problem
Hello, I'm having a little bit problems with including an url into my page... When I do this: include ("http://www.google.com/search?q=test&ie=UTF-8&oe=UTF8&hl=nl&lr=";); PHP returns an error: Warning: Failed opening 'http://www.google.com/search?q=test&ie=UTF-8&oe=UTF8&hl=nl&lr=' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site6/fst/var/www/html/search/reply.php on line 64 This certainly makes me wonder, since that page loads perfectly in my browser, and http://www.google.com/ works perfectly... anyone knows what I'm doing wrong? Thanks in advance, Leon Mergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php & SMS (or phone contact)
Hi again, thx for the replies. Well, nagios ... quite a story ... anyway, i spent more than 3-4 hours and still didn't get it to work. Maybe i should look into it again, if it supports that kind of stuff, which really would be just what i need :) Thanks a lot, Duncan
Re: [PHP] strip_tags
On Monday, July 1, 2002, at 11:09 AM, BB wrote: > OK, this is a 3x3 table pasted in from word! It is against the rules to post HTML code generated by Microsoft Word. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange url include problem
On Monday 01 July 2002 23:14, Leon Mergen wrote: > When I do this: > > include ("http://www.google.com/search?q=test&ie=UTF-8&oe=UTF8&hl=nl&lr=";); > > PHP returns an error: > > Warning: Failed opening > 'http://www.google.com/search?q=test&ie=UTF-8&oe=UTF8&hl=nl&lr=' for > inclusion (include_path='.:/php/includes:/usr/share/php') in > /home/virtual/site6/fst/var/www/html/search/reply.php on line 64 > > This certainly makes me wonder, since that page loads perfectly in my > browser, and http://www.google.com/ works perfectly... anyone knows what > I'm doing wrong? Probably choking on the cookie that Google is trying to send you. Try using cURL or similar. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Schshschshchsch. -- The Gorn, "Arena", stardate 3046.2 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reading MSWORD Doc File Comments
Is there a way to read the comments of a MSWord Doc file. I would like to get a directory listing of file in a directory that are mostly MSWORD docs. I would like to list the files with a description after each one. With HTML files I just read the file into a string and split it just after and then again before and display that. I am not sure if something can be done with a MSWORD doc. Thanks in advance to anyone that can help me or chooses to comment. Christopher J. Crane Network Operations Manager IKON Office Solutions 860.659.6464 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MCRYPT anybody anybody???
Does anybody know anything about mcrypt for windows??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cURL in an exec() MORE...
[snip] Thanks Jason, I fixed that and still does not work. So I am trying this; $curlline("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o ".$listline." https://theserver.com/download/".$listline."";); print($curlline);
Re: [PHP] cURL in an exec()
On Monday 01 July 2002 23:10, Jay Blanchard wrote: > print($curlline);exec($curline); Have you tried executing $curlline directly from a shell/command-line? This will determine whether it is a PHP problem or a cURL problem. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Jenkinson's Law: It won't work. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Encripted download
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi, My Apache is under SSL. Everything works Ok but when the user chooses to download a file or view a PDF document, the browser states that you are about to leave the secure conexion, so I guess the files are travelling withno encription. Questions: 1. Are the files actually travelling with no encription ? 2. How can I encript them but making it transparent to the user ? Thanks. Pedro. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MCRYPT anybody anybody???
On Monday 01 July 2002 23:09, charlesk wrote: > Does anybody know anything about mcrypt for windows??? http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-no-answers.html -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Then there was the Formosan bartender named Taiwan-On. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cURL in an exec()
[snip] > print($curlline);exec($curline); Have you tried executing $curlline directly from a shell/command-line? This will determine whether it is a PHP problem or a cURL problem. [/snip] That was the first thing I did, and I have gone back a couple of times now to make sure. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and PDF
hello everyone-- i'd like to know if this can be solved with php. i'll be creating a pdf form that'll be downloaded, filled and turned in. the form must have a unique NUMBER printed on it each time it is downloaded. i'd like to use php to update this NUMBER (ie. counter + 1) each time the form is accessed, and automatically print this NUMBER on the form that sits on the server. is this possible? thanks in advance. gregory [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strip_tags
On Mon, Jul 01, 2002 at 04:09:04PM +0100, BB wrote: Dude, c'mon! I asked for a "_sample_" for a reason. First, I didn't want to have to wade through a ton of HTML. Second, it'd help you isolate the problem so you could formulate an accurate question and/or figure out the answer for yourself. If you examined where the string got cut off, you'd be able to come up with a short sample like this: #! /usr/local/bin/php -q this sample; echo "$txt\n"; echo strip_tags($txt,""); echo "\n"; ?> The output from the sample is... this this So, clearly, the http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and PDF
if you're creating the form using PHP's PDF functions all you'd need to to is generate the number and add it using whatever command to add a line of text to the PDF document... Don't ask me how.. not used it yet personally. Would like to see a decent example of PHP/PDF creation anyway... > -Original Message- > From: Gregory Hernandez [mailto:[EMAIL PROTECTED]] > Sent: 01 July 2002 4:25 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP and PDF > > > hello everyone-- > > i'd like to know if this can be solved with php. > > i'll be creating a pdf form that'll be downloaded, filled and turned > in. > the form must have a unique NUMBER printed on it each time it is > downloaded. > > i'd like to use php to update this NUMBER (ie. counter + 1) each time > the form is > accessed, and automatically print this NUMBER on the form that sits on > the server. > > is this possible? > > thanks in advance. > > > gregory > [EMAIL PROTECTED] > > > > -- > 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] strip_tags
Well, this is the solution we are providing, I found the error to be because word is such a wonderful program it puts XML in the middle of HTML, so I preg'd that out and all was good again! Thanks anyway peeps "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Mon, Jul 01, 2002 at 04:09:04PM +0100, BB wrote: > > Dude, c'mon! I asked for a "_sample_" for a reason. First, I didn't want > to have to wade through a ton of HTML. Second, it'd help you isolate the > problem so you could formulate an accurate question and/or figure out the > answer for yourself. > > If you examined where the string got cut off, you'd be able to come up > with a short sample like this: > > #! /usr/local/bin/php -q > > $txt = << color=#00>this = "urn:schemas-microsoft-com:office:office" > /> > sample; > > echo "$txt\n"; > echo strip_tags($txt,""); > echo "\n"; > > ?> > > > The output from the sample is... > > face="Times New Roman">this "urn:schemas-microsoft-com:office:office" /> > > this > > > So, clearly, the arise in the setting of $txt because echoing $txt comes through fine. > Therefore the problem is with strip_tags(). > > Do you want to keep the XML or strip the XML? I'm guessing you want it > taken out. Now, it's time to ask the rest of the folks on the list: > > "strip_tags() is being tripped up by cause strip_tags() to stop processing the rest of the string. I want the > XML tags, along with all of the other unwanted HTML tags, ripped out. Is > this a bug in strip_tags() or do I need to go about this in anther way?" > > --Dan > > -- >PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching for string in text file help?
Hello, I'm hoping someone can help me as I' new to this and can't figure it out myself. PHP4.20 Win32 I'm trying to seach for a string that would occur about 10 lines into a text file. I don't want to search the entire file, and I just want to know if the string exsists or not, but I don't really know what I'm doing. This is what I was trying, it occurs inside a loop that is listing the files in a directory. $fp = fopen("$target_filename", "r"); $contents = fgets("$fp","4096"); if(strstr("$contents", "$search_str")) { echo ""; readfile("$target_filename"); echo ""; } Thanks Tim Loepp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] PHP and PDF
Hi Brian, i have made a pretty nice script for creating pdf files using database data. thats pretty easy. the only thing u have to care about is to calculate the document size. Mirza [EMAIL PROTECTED] 01.07.2002 17:39 > if you're creating the form using PHP's PDF functions all you'd need to to is >generate the number and add it using whatever command to add a line of text to the >PDF document... > Don't ask me how.. not used it yet personally. > Would like to see a decent example of PHP/PDF creation anyway... >> -Original Message- >> From: Gregory Hernandez [mailto:[EMAIL PROTECTED]] >> Sent: 01 July 2002 4:25 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] PHP and PDF >> >> >> hello everyone-- >> >> i'd like to know if this can be solved with php. >> >> i'll be creating a pdf form that'll be downloaded, filled and turned >> in. >> the form must have a unique NUMBER printed on it each time it is >> downloaded. >> >> i'd like to use php to update this NUMBER (ie. counter + 1) each time >> the form is >> accessed, and automatically print this NUMBER on the form that sits on >> the server. >> >> is this possible? >> >> thanks in advance. >> >> >> gregory >> [EMAIL PROTECTED] >> >> >> >> -- >> 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] Register globals off
I am learning PHP with version 4.2. (Win ME, Apache, MySQL) on a PC I have to understand the new "register globals off" methods and it seems like a good idea to learn that from the beginning but all the books and beginners guides gives examples the old way. Would it be true to say that every time an example is given where data is passed on (for forms and so forth) that I can simply replace the variable in the example with $_POST or $_GET? Or do I have to do more? eg if a simple PHP file for handling form input takes in the data using $LastName can I simply use $_POST["LastName"]?? It seems to work for a very simple example. But should I read the array into a variable first? And do I need to do any validation or declaring of variables etc?? [I did have a problem reading in a number - the solution was to put (int) before the POST array name though I don't understand why that was not needed with a string. I am also unclear what happens when you send something using header() - does that also go into an array - if so which one and how do I use it? This may all seem unecessarily complicated but I am not yet au fait with the whole thing. Regards Adrian Greeman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SMS Again, UK
Hi i'm from the uk, is there any free php scripts that will allow txt messages to be sent within the uk. Couldn't get the other one posted here to work either, Wanna do a similiar idea to what that other guy was doing, but when the UPS Kicks in send a txt, but also so i can goto my site and access it and send a txt for free, :-) Cheers Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Handling of constants in strings
Hi, when reading about constants (define('MY_CONSTANT', 'my value')) I got convinced that they are pretty usefull. But now it seems to me, that I can't use them inside a string: $my_string = "This is MY_CONSTANT and I love it!"; but that I must take them out: $my_string = "This is" . MY_CONSTANT . "and I love it!"; Isn't there a way around? And must I suspect more strange things to come with constants? greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Encripted download
Everything going through https is encrypted. Update links to download files and everything should go smoothly. -Original Message- Questions: 1. Are the files actually travelling with no encription ? 2. How can I encript them but making it transparent to the user ? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blob versus file
Hi andy, i tested it a few times, and there is actually no difference. why make it complicated, when it can be simple. my opinion is there is no difference. Mirza [EMAIL PROTECTED] 01.07.2002 14:17 > Hi there, > I am wondering if anybody has experiance in saving images to blob in mysql. > I do save images with 1 K and 4 KB to blob fields while I used to save them > to file. It seams to me that this is much slower accessing the files. The > images take a bit (really short but absolutly noticable) to show up on the > site. Is there a way to improve the performance, and why is this happening? > I thought the performance might even boost after storing them to blobs. > Thank you for any comments on that, > Andy > PS: I was planing to store all the other images (20 - 50 KB) to blobs as > well (thousands) but after this first experiance I am a bit confused if the > performance would even more suffer. Would you guys recommend this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Register globals off
AG> I have to understand the new "register globals off" methods and it seems AG> like a good idea to learn that from the beginning but all the books and AG> beginners guides gives examples the old way. give it 3 more weeks and 2nd edition of PHP Fast & Easy will be out...all register_global updated and everything. :) but that's 3 whole weeks. AG> eg if a simple PHP file for handling form input takes in the data using AG> $LastName can I simply use $_POST["LastName"]?? pretty much. If POST is the method. Substitute $_GET if GET is the method. Handling session variables is a little different than just using session_register() Also, when uploading files, the $_FILE assoc array behaves a wee bit differently. And there's always the use of $_SERVER[PHP_SELF] instead of just $PHP_SELF. It's all in the manual, but if you just start with understanding the $_POST and $_GET superglobals in relation to your forms, you've made a good first step. - Julie --> Julie Meloni --> [EMAIL PROTECTED] --> www.thickbook.com Find "Sams Teach Yourself MySQL in 24 Hours" at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Win98, Apache, PHP Config Problem
Hi, I just made the same (even on the same weekend) - it's working now. What exactly is going on and what have you done? With me one problem was (e.g.) that I forgot to set the document root properly in httpd.conf. Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Register globals off
On Monday, July 1, 2002, at 11:30 AM, Adrian Greeman wrote: > Would it be true to say that every time an example is given where data > is > passed on (for forms and so forth) that I can simply replace the > variable in > the example with $_POST or $_GET? Or do I have to do more? Pretty much. If the data was passed by a "get"-method form, or through the querystring, then the variable should be in the _GET array (such as $_GET['variablename']). Likewise for "post"-method forms, and any cookie variable names are now "$_COOKIE['variablename']". Server variables like $PHP_SELF are now $_SERVER['PHP_SELF'], and you can read the rest under "predefined variables" in the manual at the web site. > eg if a simple PHP file for handling form input takes in the data using > $LastName can I simply use $_POST["LastName"]?? It seems to work for a > very > simple example. But should I read the array into a variable first? Only if you want to -- you can always just refer to it as $_GET['variablename']. In fact this is probably better for memory use. > And do > I need to do any validation or declaring of variables etc?? [I did > have a > problem reading in a number - the solution was to put (int) before the > POST > array name though I don't understand why that was not needed with a > string. All POSTed or GETed data is string data, so if you for some reason explicitly need to cast the variable as an integer, then yes, you need to use (int). But in many cases PHP does this automatically. > I am also unclear what happens when you send something using header() - > does that also go into an array - if so which one and how do I use it? I'm assuming you mean sending some querystring data, like header("Location: http://domain.com/page.php?data=contents";); if so, then yes, you will end up with the string 'contents' in a variable called $_GET['data'] . Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Keeping "Secrets" in PHP Files
Dang. $2880 is kind of expensive! I wish they'd base licensing more on how many copies your encoded program you sell. -Original Message- http://www.zend.com/store/products/zend-encoder.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Page rendering speed: PostNuke or PHP-Nuke
Check SourceForge.com to see what content management systems are available. -Original Message- To those who have used these content management systems: which one renders pages faster, PostNuke or PHP-Nuke? I plan to set up a site on my Linux box and want to know which one I should use. :) Also, would anyone know of a PHP based content management system that does not have the usual 3 columns look? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uploading a file
anyone have some code they can send me that will successfully upload a file? I've got all the HTML correct, it's just that my PHP code ain't working. Thanks! Phil
[PHP] register_global, need some feedback
Hi! With the register_global turned off. I'm working on making the login to work again. So, I have a few questions. 1) $GLOBALS, Where does this come from and where does this goes to? I noticed there is no variable declaration for this, so I just know that it is part of PHP codes, although I haven't figure out what is it part of. 2) What would be the way to go to make it work, when changing it within this script with register_global turned on to turned off? --clip -- while (list($var, $value) = each($GLOBALS[HTTP_POST_VARS]) { $GLOBALS[$var] = stripslashes(trim($value)); } reset ($GLOBALS[HTTP_POST_VARS]); --clip-- I tried different ways to make it work and I kept getting the error saying " Variable passed to each() is not an array or object " " Variable passed to reset() is not an array or object " Thanks FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Searching for string in text file help?
Try it this way. "; readfile($file); echo ""; } ?> Christopher S. Cosby SciCare Software Services > -Original Message- > From: Tim Loepp [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 28, 2002 7:43 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Searching for string in text file help? > > > Hello, I'm hoping someone can help me as I' new to this and > can't figure it > out myself. > > PHP4.20 Win32 > > I'm trying to seach for a string that would occur about 10 > lines into a text > file. I don't want to search the entire file, and I just want > to know if the > string exsists or not, but I don't really know what I'm > doing. This is what > I was trying, it occurs inside a loop that is listing the files in a > directory. > > $fp = fopen("$target_filename", "r"); > $contents = fgets("$fp","4096"); > if(strstr("$contents", "$search_str")) > { > echo ""; > readfile("$target_filename"); > echo ""; > } > > Thanks > Tim Loepp > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > - - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
RE: [PHP] uploading a file
How do you know it ain't working? Send us your code, maybe we can fix it. -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 10:59 AM To: [EMAIL PROTECTED] Subject: [PHP] uploading a file anyone have some code they can send me that will successfully upload a file? I've got all the HTML correct, it's just that my PHP code ain't working. Thanks! Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] need to change $ char in string
Jason, Thank you, explode using single quotes and no backslashes works! Bev -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 10:57 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] need to change $ char in string On Monday 01 July 2002 22:47, Beverly Steiner wrote: > Uli & others, > > Thanx for the suggestions. This works as stated but the data already > exists in this format from an old database and I'm trying to parse it into > logical fields. Originally the data in the field looked something like > 1$General/ms1.zip#12$Another/xqy.zip#. I deleted the ending # then used > explode to separate the information on the # and now I need to separate the > info before the $ from what comes after it. I've tried everyone's > suggestions but they only work if I'm testing and can define the string > using single quotes. > > How can I split on a $ >or change the $ to something else if I'm getting the > information from a database (MySQL), not defining it using single quotes > like in your example? I think you're confused. There is nothing in MySQL which dictates strings as single-quoted or double-quoted. I think you had best post some code. Show us how you're retrieving the data from MySQL. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Two heads are better than one. -- John Heywood */ -- 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: RE: [PHP] PHP and PDF
hello again. thanks for the responses so far. let me change something from my prevoius post. let's say that i'm using an existing pdf form (i won't be creating a new one), is it still possible to use php to update a number that'll be printed on the pdf form each time it is accessed? again, thanks in advance. gregory [EMAIL PROTECTED] >>> "Brian McGarvie" <[EMAIL PROTECTED]> - 7/1/02 11:50 AM >>> Actually I just for a brilliant Free PDF library... www.fpdf.org Excellent tutorials/docs... Use PHP to dynamically generate your forms and include any info you wish from a database i.e. the ID and so on... > -Original Message- > From: Gregory Hernandez [mailto:[EMAIL PROTECTED]] > Sent: 01 July 2002 4:25 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP and PDF > > > hello everyone-- > > i'd like to know if this can be solved with php. > > i'll be creating a pdf form that'll be downloaded, filled and turned > in. > the form must have a unique NUMBER printed on it each time it is > downloaded. > > i'd like to use php to update this NUMBER (ie. counter + 1) each time > the form is > accessed, and automatically print this NUMBER on the form that sits on > the server. > > is this possible? > > thanks in advance. > > > gregory > [EMAIL PROTECTED] > > > > -- > 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] uploading a file
Hi Phil, your input file name should be "the_file" global $the_path_news, $the_file_name, $the_file, $the_path; if ($the_file_name) { if (!@move_uploaded_file($the_file, $the_path."/".$the_file_name)) { echo "something barfed."; exit; } else { echo "uploaded."; } } Mirza [EMAIL PROTECTED] 01.07.2002 17:59 > anyone have some code they can send me that will successfully upload a > file? I've got all the HTML correct, it's just that my PHP code ain't > working. > Thanks! > Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading a file
Upload.html === FileUpload function check() { document.upload.method = "POST"; document.upload.enctype='multipart/form-data' document.upload.action="upload.php"; document.upload.submit(); return true; } File & nbsp; Upload.php Your file $path_name has been uploaded!!!" ; } else { print "A problem was encountered during your file upload."; } ?> = -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 9:29 PM To: [EMAIL PROTECTED] Subject: [PHP] uploading a file anyone have some code they can send me that will successfully upload a file? I've got all the HTML correct, it's just that my PHP code ain't working. Thanks! Phil **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[3]: [PHP] PHP and PDF
Hi Gregory, u mean, u want to update an existing PDF file? no, thats not possible. Mirza [EMAIL PROTECTED] 01.07.2002 18:07 > hello again. > thanks for the responses so far. > let me change something from my prevoius post. > let's say that i'm using an existing pdf form (i won't be creating a > new one), is it still possible to use php to update a number that'll be > printed on the pdf form each time it is accessed? > again, thanks in advance. > gregory > [EMAIL PROTECTED] "Brian McGarvie" <[EMAIL PROTECTED]> - 7/1/02 11:50 AM > Actually I just for a brilliant Free PDF library... > www.fpdf.org > Excellent tutorials/docs... > Use PHP to dynamically generate your forms and include any info you > wish from a database i.e. the ID and so on... >> -Original Message- >> From: Gregory Hernandez [mailto:[EMAIL PROTECTED]] >> Sent: 01 July 2002 4:25 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] PHP and PDF >> >> >> hello everyone-- >> >> i'd like to know if this can be solved with php. >> >> i'll be creating a pdf form that'll be downloaded, filled and turned >> in. >> the form must have a unique NUMBER printed on it each time it is >> downloaded. >> >> i'd like to use php to update this NUMBER (ie. counter + 1) each > time >> the form is >> accessed, and automatically print this NUMBER on the form that sits > on >> the server. >> >> is this possible? >> >> thanks in advance. >> >> >> gregory >> [EMAIL PROTECTED] >> >> >> >> -- >> 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] Page rendering speed: PostNuke or PHP-Nuke
http://www.php-encoder.com/ Looks like beta is starting soon for this, so we should see it in a little bit. They have an option for per script charge. You upload the file and it gives you a compiled one. My guess it is the same thing as Zend encoder, just not as expensive. Dan -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 10:01 AM To: 'Andres Montiel'; PHP General Subject: RE: [PHP] Page rendering speed: PostNuke or PHP-Nuke Check SourceForge.com to see what content management systems are available. -Original Message- To those who have used these content management systems: which one renders pages faster, PostNuke or PHP-Nuke? I plan to set up a site on my Linux box and want to know which one I should use. :) Also, would anyone know of a PHP based content management system that does not have the usual 3 columns look? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- 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] Reading MSWORD Doc File Comments
There are some programs out there that'll take a word document and extract all of the text from it. Good for indexing database or making summaries. I can't remember the name of any, but search the usual Google, sourceforge, hotscripts.com, etc.. ---John Holmes... - Original Message - From: "Crane, Christopher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 11:20 AM Subject: [PHP] Reading MSWORD Doc File Comments > Is there a way to read the comments of a MSWord Doc file. I would like to > get a directory listing of file in a directory that are mostly MSWORD docs. > I would like to list the files with a description after each one. With HTML > files I just read the file into a string and split it just after and > then again before and display that. I am not sure if something can > be done with a MSWORD doc. Thanks in advance to anyone that can help me or > chooses to comment. > > Christopher J. Crane > Network Operations Manager > IKON Office Solutions > 860.659.6464 > > -- > 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] Gradients in PHP & GD
Over-complicating it? Yes, I must admit that's true. The problem however was not that I didn't understand the question, but that I apparently was hostile. For someone extra-sensitive, I think I could've looked like that, but I still don't think I was out of line with my original reply, which sparked the whole discussion. And yes, I agree that "Are you new to PHP" may sound like an insult - depending on the person, maybe even more than my reply. Bogdan Lazor, Ed wrote: >You guys are over-complicating this. If you want to help someone and don't >understand their question, just say so. People asking for help are usually >more than happy to provide additional information or rephrase their >question. > >Be careful when using the question, "Are you new to PHP?". It has an >implied, "That was an awfully silly question... are you new to PHP?". Some >may take that as an insult. Of course, it could be funny as well. Imagine >responding to Rasmus, "Are you new to PHP?" ;) hehe > > > > >>-Original Message- >>it could be augmented with questions like "Are you new to PHP?" and, >>in the specific case we've been discussing, "Are you trying to create >>a basic gradient or something unusual?", etc. >> >> > > >This message is intended for the sole use of the individual and entity to >whom it is addressed, and may contain information that is privileged, >confidential and exempt from disclosure under applicable law. If you are >not the intended addressee, nor authorized to receive for the intended >addressee, you are hereby notified that you may not use, copy, disclose or >distribute to anyone the message or any information contained in the >message. If you have received this message in error, please immediately >advise the sender by reply email and delete the message. Thank you very >much. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SMS Again, UK
Well, funnily enough, your question has much the same answer ... If you have a mobile phone and your service provider offers a web gateway, you can use it to send SMS messages. They will provide a script that you can use. If you have an Orange phone, see the Orange web site. If it's a Voda, see their web site, and so on. The charge is usually the same as it would be if you sent the message from your phone, but if you have a contract it may include "free" messages. There are services such as NovelSoft (http://www.sms-wap.com) that are independant of provider, but you have to pay for them too. Novelsoft is quite cheap, and there are PHP scripts on the site, but some providers don't accept their messages. I have a NovelSoft account, but I can't use it to send messages to my Orange phone. I read somewhere that this is because some of their customers used the service to send spam. Simon > -Original Message- > From: Andy Whittlestone [mailto:[EMAIL PROTECTED]] > Sent: 01 July 2002 16:49 > To: [EMAIL PROTECTED] > Subject: [PHP] SMS Again, UK > > > Hi i'm from the uk, is there any free php scripts that will allow txt > messages to be sent within the uk. > > Couldn't get the other one posted here to work either, > > Wanna do a similiar idea to what that other guy was doing, but > when the UPS > Kicks in send a txt, but also so i can goto my site and access it > and send a > txt for free, :-) > > Cheers Andy > > > > -- > 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] Keeping "Secrets" in PHP Files
Sorry, Wrong topic. http://www.php-encoder.com/ Looks like beta is starting soon for this, so we should see it in a little bit. They have an option for per script charge. You upload the file and it gives you a compiled one. My guess it is the same thing as Zend encoder, just not as expensive. Dan Dang. $2880 is kind of expensive! I wish they'd base licensing more on how many copies your encoded program you sell. -Original Message- http://www.zend.com/store/products/zend-encoder.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: [PHP-DB] blob versus file
There are benefits to this making the performance hit worthwhile in some instances. More info: http://www.zend.com/zend/trick/tricks-sept-2001.php -Original Message- Inserting images or whatever binary data in a database does not have much sense This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mySQL time = year 2038 [HELP]
Checked the archive and saw no difinitives... so... How come when I query my clients mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always comes up Jan 18, 2038? Is the clock not set properly, or am I misunderstanding some basic principal of the time stamp? My clients version pf PHP is 4+ on a Windows IIS server. Any clues??? Thanks -NorthBayShane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: register_global, need some feedback
Hi, try these: http://www.php.net/manual/en/language.variables.predefined.php#language.vari ables.predefined http://www.php.net/manual/en/reserved.variables.php greetings, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mcrypt again...
Where can I get mcrypt for windows and php 4.2.1? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SMS Again, UK
Oh yes, I forgot about email, which was mentioned in another answer to this FAQ. Some providers give you an email address with your phone, for example I believe that One2One (or whatever it's called today) give you @one2one.com. Email sent to that address arrives at your phone as an SMS. Somebody has to pay for the message, so it's probably you. By the way, there is no guarantees on how long it will take to deliver an SMS, or if it will ever arrive. Typically 1% never arrive, more if the network is very busy because something interesting has just happened on "Big Brother" and everybody below 35 in the UK is sending a text (to somebody who is busy sending them one). That means it's wise to send a text, wait a few minutes and send it again. Buy a UPS with plenty of capacity ... Oh yes, and don't forget to put all of the network access devices on the UPS - the router, the switch and so on. Otherwise when the power fails, you won't be able to access the message gateway across the web. Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and PDF
If you can edit the PDF file and have access to acrobat then you can use adobe's fdf format. Basically you just create a read-only text field on the original PDF and use php to fill in the value for it every time it's loaded here's some links http://www.php.net/manual/en/ref.fdf.php http://www.phpbuilder.com/columns/uwe20001116.php3 - good tutorial ---Original Message--- hello again. > thanks for the responses so far. > let me change something from my prevoius post. > let's say that i'm using an existing pdf form (i won't be creating a > new one), is it still possible to use php to update a number that'll be > printed on the pdf form each time it is accessed? > again, thanks in advance. > gregory > [EMAIL PROTECTED] "Brian McGarvie" <[EMAIL PROTECTED]> - 7/1/02 11:50 AM > Actually I just for a brilliant Free PDF library... > www.fpdf.org > Excellent tutorials/docs... > Use PHP to dynamically generate your forms and include any info you > wish from a database i.e. the ID and so on... >> -Original Message- >> From: Gregory Hernandez [mailto:[EMAIL PROTECTED]] >> Sent: 01 July 2002 4:25 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] PHP and PDF >> >> >> hello everyone-- >> >> i'd like to know if this can be solved with php. >> >> i'll be creating a pdf form that'll be downloaded, filled and turned >> in. >> the form must have a unique NUMBER printed on it each time it is >> downloaded. >> >> i'd like to use php to update this NUMBER (ie. counter + 1) each > time >> the form is >> accessed, and automatically print this NUMBER on the form that sits > on >> the server. >> >> is this possible? >> >> thanks in advance. >> >> >> gregory >> [EMAIL PROTECTED] >> >> >> >> -- >> 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] Security in phpmyadmin
Is this the place to address it? -- Member - Liberal International On 11 Sept 2001 the WORLD was violated. This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] Society MUST be saved! Extremists must dissolve. Beware of defining as intelligent only those who share your opinions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] need to change $ char in string
(After typing I see that the problem is solved. I send it anyway - hope you people don't mind the redundancy :-) Why don't you use explode() again on the $ like Jason suggested ? This does not even require single quotes :-) You might also want to have a look at split() and preg_split(). It should make no difference that the data comes from a database. The $ probably requires no quoting (\) then. So I don't think this will help but you might try to apply quotemeta() before splitting or replacing. I suggest that you take a close look at the data in you old database. Are there any additional special characters that might ruin the effort ? The preg_* functions can make use of pattern modifiers that change the way these functions handle newlines for example (see regular expressions). If all of the above does not help you can have MySQL handle it: select replace(str,'$','%') from table ...but that is not a preferable option imho because there seems to be a problem elsewhere. Uli At 10:47 01.07.02 -0400, Beverly Steiner wrote: >Uli & others, > >Thanx for the suggestions. This works as stated but the data already exists >in this format from an old database and I'm trying to parse it into logical >fields. Originally the data in the field looked something like >1$General/ms1.zip#12$Another/xqy.zip#. I deleted the ending # then used >explode to separate the information on the # and now I need to separate the >info before the $ from what comes after it. I've tried everyone's >suggestions but they only work if I'm testing and can define the string >using single quotes. > >How can I split on a $ or change the $ to something else if I'm getting the >information from a database (MySQL), not defining it using single quotes >like in your example? > >Bev > > >-Original Message- >From: Uli B [mailto:[EMAIL PROTECTED]] >Sent: Saturday, June 29, 2002 11:56 AM >To: PHP List >Subject: Re: [PHP] need to change $ char in string > > >use single quotes: double quotes would confuse php with variable names. >it thinks that $General is a variable and replace it by it's empty content. >single quotes prevent php from evaluating the string: > >$test_string = '1.2$General/ms1.zip'; > >single quotes on regex too (same reason). the backslash in this case >(\$) refers to perl regular expression syntax but does not take care of php >! > >$new_string = preg_replace('/\$/', "%", $test_string); > >ub > > >At 10:58 29.06.02 -0400, Beverly Steiner wrote: >>I've tried everything I can think of to change a dallar sign in a string to >>something else or to split the string on the $ but I can't the the >>information that comes after the $. >> >>Typical string contains: 1.2$General/ms1.zip >> >>when I try: >> $new_string = preg_replace("/\$/", "%", $test_string); >> >>or (trying to avoid specifying the $): >> $new_string = preg_replace("/(\d\.\d{1,2})\D(\w.*$)/", "\1%\2", >>$test_string); >> >>echo "new_string is $new_string"; prints new_string is 1.2 >> >>Has anyone solved this problem? >> >>Thanx, >> >>Bev >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php > >-- >--- > Ulrich Borchers > Brandenberger Straße 18, 41065 Mönchengladbach > fon +49-2161-175883 > icq 1282868 >--- > > >-- >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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] M$-SQL Access from RH7.3
List, I've a RH7.3 machine (just installed) and want to get PHP to access my M$ SQL database. I'm on a small time crunch here too. My M$ web server died and it's so hosed that I had to call support (ouch!). Anyways...they haven't fixed it yet and I thought it would be funny to get my RH7.3/Apache/PHP server to replace it before they could fix my machine ;>. I've done this once before (like last year or so) but I cannot finc my docs so any pointers would be great. TIA /B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mySQL time = year 2038 [HELP]
Perhaps the problem is in your translation. NOW() records a timestamp that is formated by MMDDHHMMSS. If you are translating this in PHP a function designed to take in a UNIX timestamp (that is "Unix Epoch" time , the number of seconds from some date 30 years ago) you will recieve a rather confusing result. This may not be the problem but it was just a thought. -Kevin - Original Message - From: "Shane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 10:38 AM Subject: [PHP] mySQL time = year 2038 [HELP] > Checked the archive and saw no difinitives... so... How come when I query my clients mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always comes up Jan 18, 2038? > > Is the clock not set properly, or am I misunderstanding some basic principal of the time stamp? > > My clients version pf PHP is 4+ on a Windows IIS server. > > Any clues??? > Thanks > -NorthBayShane > > -- > 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] uploading a file - here is the error message...
Here is the error I'm receiving when attempting to upload a file Warning: Unable to create 'temp/test.txt': Permission denied in /home/.../www/website/upload3.php on line 11 ..could it be that my web host isn't giving me permissions to upload files ?
RE: [PHP] uploading a file - here is the error message...
The web server needs write access to where you're trying to store the files. Check the directory permissions. Check with your ISP to make sure there are solutions other than making the directory world writeable. -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 10:13 AM To: [EMAIL PROTECTED] Subject: [PHP] uploading a file - here is the error message... Here is the error I'm receiving when attempting to upload a file Warning: Unable to create 'temp/test.txt': Permission denied in /home/.../www/website/upload3.php on line 11 ..could it be that my web host isn't giving me permissions to upload files ? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading a file - here is the error message...
That's always possible. Unless you have access to your temp directory you will not be able to update the permissions. At this point I would email your host and ask them about the situation. Good luck. -Kevin - Original Message - From: "Phil Schwarzmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 11:13 AM Subject: [PHP] uploading a file - here is the error message... > Here is the error I'm receiving when attempting to upload a file > > Warning: Unable to create 'temp/test.txt': Permission denied in > /home/.../www/website/upload3.php on line 11 > > > ..could it be that my web host isn't giving me permissions to upload > files ? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading a file - here is the error message...
Hi Phil, first thing u should do is to check permission of this directory (CHMOD). the 2nd one, u should replace function "copy" with "move_uploaded_file". than is should work. Mirza [EMAIL PROTECTED] 01.07.2002 19:13 > Here is the error I'm receiving when attempting to upload a file > Warning: Unable to create 'temp/test.txt': Permission denied in > /home/.../www/website/upload3.php on line 11 > ..could it be that my web host isn't giving me permissions to upload > files ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mySQL time = year 2038 [HELP]
Hi Shane, use SYSDATE(). Mirza [EMAIL PROTECTED] 01.07.2002 18:38 > Checked the archive and saw no difinitives... so... How come when I query my clients >mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always >comes up Jan 18, 2038? > Is the clock not set properly, or am I misunderstanding some basic principal of the >time stamp? > My clients version pf PHP is 4+ on a Windows IIS server. > Any clues??? > Thanks > -NorthBayShane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with regex in preg_match();
Hi people, I got this line that is relly giving me a pain..: if (preg_match("@siteUserList.cgi\?group=site177(&?)@", $QUERY_STRING)) As you can see it just matches the query string when it looks like this: siteUserList.cgi?group=site177& (with or without a "&") The thing is I need it to match also if after the "&" there is a number (that will have more than 1 digit) Ive tried many diffrent thing with \d+ but I can get it to work.. can somebody give me some light? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML Problem
I looked over the revised version of the document and unfortunately I still don't fully understand. I know that I have to save the data on each line, and then either display it or turn it into a variable. You put the data in an array and then implode it into a string, however I am not 100% certain about this process... Could you give me any advice? -Original Message- From: Analysis & Solutions [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 6:26 AM To: PHP List Subject: Re: [PHP] XML Problem Sire: On Sun, Jun 30, 2002 at 10:21:40PM +0200, Sebastian A. wrote: > > Later on, you make the $Cdata a string, $temp, and then the next time you > use it: $Temp = $Data['TRADE-DATETIME'] > You re-assign it again without using the data. Did I miss something? Yes. Further down was the default case, with the line: $Data[$Elem] = $Temp; But, that's not there any more. I reworked that file a bit to clarify that and add in more error checking. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- 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] uploading a file - here is the error message...
I took your advice first and tried "move_uploaded_file" and it kept saying "It barfed" (hehe). Then I switched to "copY" and got this new error. Thaks for your help!! >>> [EMAIL PROTECTED] 07/01/02 01:29PM >>> Hi Phil, first thing u should do is to check permission of this directory (CHMOD). the 2nd one, u should replace function "copy" with "move_uploaded_file". than is should work. Mirza [EMAIL PROTECTED] 01.07.2002 19:13 > Here is the error I'm receiving when attempting to upload a file > Warning: Unable to create 'temp/test.txt': Permission denied in > /home/.../www/website/upload3.php on line 11 > ..could it be that my web host isn't giving me permissions to upload > files ?
Re: [PHP] help with regex in preg_match();
Hi, something like this: $QUERY_STRING = "siteUserList.cgi?group=site177&2345"; if (preg_match("#siteUserList.cgi\?group=site177(&?[\d]*)#",$QUERY_STRING,$array11)) { echo "found: $array11[0]$array11[1]"; } Mirza [EMAIL PROTECTED] 01.07.2002 19:37 > Hi people, > I got this line that is relly giving me a pain..: > if (preg_match("@siteUserList.cgi\?group=site177(&?)@", > $QUERY_STRING)) > As you can see it just matches the query string when it looks like > this: siteUserList.cgi?group=site177& (with or without a "&") > The thing is I need it to match also if after the "&" there is a number > (that will have more than 1 digit) > Ive tried many diffrent thing with \d+ but I can get it to work.. can > somebody give me some light? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] viewing php predefined fucntions
Hi, at this link: http://www.php.net/manual/en/funcref.php i can see the categories of the available functions, But How can i see all the fucnctions in php together (in one screen)? Is there a way to do that. Thank You anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Query String...
Never have encountered this. When I include a query string on the URL line I can not access the variables. For example: www.tim.com?action=move I should be able to access the variable action. However I am currently not able to do this. I am not receiving an error of any kind, but nothing is being produced when I echo or print this as $action. Is there a setting that I've missed somewhere? Any help will be much appreciated. Thanks Tim Nields -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-DB] blob versus file
On Mon, 1 Jul 2002 09:35:37 -0700 "Lazor, Ed" <[EMAIL PROTECTED]> wrote: > There are benefits to this making the performance hit worthwhile in some > instances. Sure, the exceptions rules :). I am not sure about your answer. The article where you pointed me does not go against what we said, and show the different solutions we have to manage binary datas. I must precise that a path can be an url, this url points to the other server and do whatever you want there (except store images in a db ;))) ). hth pa > More info: > http://www.zend.com/zend/trick/tricks-sept-2001.php > > -Original Message- > Inserting images or whatever binary data in a database does not have much > sense -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] viewing php predefined fucntions
here is a quicky that I wrote up to do just that Jim Lucas - Original Message - From: "Anil Garg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 01, 2002 10:52 AM Subject: [PHP] viewing php predefined fucntions > Hi, > at this link: > http://www.php.net/manual/en/funcref.php > i can see the categories of the available functions, But > How can i see all the fucnctions in php together (in one screen)? > Is there a way to do that. > Thank You > anil > > > -- > 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] Query String...
On Tuesday 02 July 2002 04:45, Tim Nields wrote: > Never have encountered this. When I include a query string on the URL line > I can not access the variables. > > For example: www.tim.com?action=move > > I should be able to access the variable action. However I am currently not > able to do this. I am not receiving an error of any kind, but nothing is > being produced when I echo or print this as $action. > > Is there a setting that I've missed somewhere? register_globals RTFM and the archives. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Truth can wait; he's used to it. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php