[PHP] Header problem

2009-10-03 Thread Kim Madsen
Hi PHP people I have a really strange and annoying problem. I've got a site, where members can download music. User clicks index.php (in index.php there's an iframe, that opens another file), if certain check are okay then a popup window opens download.php, where a mp3 file is fetched from the se

Re: [PHP] Header problem

2009-10-04 Thread Kim Madsen
Andrea Giammarchi wrote on 2009-10-03 13:40: > Do you want users download the file or the zip? They can choose between the two. > do you send other headers before the download? Header must come first (before you output anything) or you get a parse error, so I'm not sure what you mean here? You

Re: [PHP] Header problem

2009-10-04 Thread Kim Madsen
Hi kranthi kranthi wrote on 2009-10-03 16:21: > Thats a lot of headers to read.. > At a first glance I can see that you did not specify a content-length > header. this is a must and must be equal to the size of the file in > bytes I've noticed that too, but it's impossiple to determine the lengt

Re: [PHP] Header problem

2009-10-04 Thread Kim Madsen
Hello Andrea Andrea Giammarchi wrote on 2009-10-04 18:49: > Header must come first (before you output anything) or you get a parse > error I try to better explain ... HTTP works like this: you ask something, you receive something, html and texts are just one option. Got it so far Your e

Re: [PHP] Header problem

2009-10-05 Thread Kim Madsen
Hi Andrea Andrea Giammarchi wrote on 2009-10-04 19:36: Unless I am missing something, your page has too many if and it always ends up with print something ... but there is no exit after the download, so the zip will have extra output included without a reason ... which is an error, imho, dunno

Re: [Fwd: [PHP] Sessions in databases]

2009-10-06 Thread Kim Madsen
Sam Stelfox wrote on 2009-10-06 18:09: If you are distributing your application over multiple servers, using a database for session tracking allows a user to continue there session regardless of which server their request bounces too. It prevents the need for 'sticky' network connections which

Re: [PHP] Need unrounded precision

2009-10-15 Thread Kim Madsen
Hello Andre Dubuc wrote on 2010-01-02 02:20: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. Since no one came up with the simple solution: $num = "28.56018"; ereg("^[0-9]+\.([0-9]){1}", trim($num), $regs); if($regs[1]) $d

Re: [PHP] Header problem - "solved"

2009-10-16 Thread Kim Madsen
Andrea Giammarchi wrote on 2009-10-05 18:26: > There's a useful function called headers_sent() which checks to see if > the headers have already been sent to the browser. This might be a good > place to throw into your code at various points to check and see if > something is being written w

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-18 10:52: I assumed the reason you wanted to do escape the string so that you could perform DB operations. Yes, that is my intention. However, the function is found in an include file of functions used in many different scripts, each of which connect to a different

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-19 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-18 21:21: I thought that one could not test if a database connection is established or not, this is the most relevant thing that I found while googling that: http://bugs.php.net/bug.php?id=29645 from http://www.php.net/manual/en/function.mysql-connect.php $link =

Re: [PHP] Blocking video streaming

2009-10-19 Thread Kim Madsen
Hey Talawa wrote on 2009-10-19 18:29: Hello everyone, I post a message here because i didn't find any solution yet. I just finished video streaming service on my website. I use xmoov script (http://xmoov.com/xmoov-php/) to do that. It works like a charm, but I find an issue. When the video is

Re: [PHP] Please don't kick me!

2009-10-19 Thread Kim Madsen
Hi Philip Philip Thompson wrote on 2009-10-19 22:47: > Hi all. > > I know this question has been asked a thousand times on the list, but my searches in the archives are not being nice to me. So... please don't kick me. Why would anyone do that? We're PHPeople and PHfrinds (ho ho) > Currently

Re: [PHP] Header problem - SOLVED

2009-10-19 Thread Kim Madsen
This has been solved today. Talawa had a similar problem and came up with a solution to his problem, namely using session_write_close() before creating the headers. That stunt also solved my problem :-) -- Kind regards Kim Emax Kim Madsen wrote on 2009-10-03 13:30: Hi PHP people I have a

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-20 20:06: if(mysql_real_escape_string($variable) === false) { // create a default DB connection } Here, the key seems to be to turn the warning level down, which I do not have privileges to do on this server. But it fact this seems to be the key that I was mis

Re: [PHP] Spam opinions please

2009-10-20 Thread Kim Madsen
Hey Gary Gary wrote on 2009-10-20 20:31: I have several sites that are getting hit with form spam. I have the script set up to capture the IP address so I know from where they come. I see that a lot suggested CAPTCHA, I don't like those either. The IP solution will give you a constant main

Re: [PHP] Please don't kick me!

2009-10-20 Thread Kim Madsen
Philip Thompson wrote on 2009-10-20 21:58: I got it to draw the different background colors successfully. However, drawing borders is not as straight forward. I'm sure I could get it working as well... but I'd rather it work *out of the box*. Thanks for the suggestion. ;) Well, you're always

Re: [PHP] Spam opinions please

2009-10-20 Thread Kim Madsen
Gary wrote on 2009-10-20 22:55: I like that idea,so in other words they have to get to the form from another page on the site, and you set a time limit for a minimum amount of time they spend on the page(5-10 seconds)? I don't set any time, just the session to prevent direct hits from a spam

Re: [PHP] how call a variable in a text

2009-10-21 Thread Kim Madsen
Ashley Sheridan wrote on 2009-10-21 22:43: The {} only become really useful when you're trying to reference arrays within a string: $var = array('great', 'boring'); $text = "this is {$var[0]}."; Without the curly braces, PHP wouldn't be able to figure out whether you wanted the end string to

Re: [PHP] how call a variable in a text

2009-10-21 Thread Kim Madsen
Ashley Sheridan wrote on 2009-10-21 22:56: Try this though: Print "This is different from your previous example :-)"; -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sessions seems to kill db connection

2009-10-22 Thread Kim Madsen
Hi PHPeople I have an odd problem at my new work and wonder if it's some sort of odd setup that is causing this problem when using sessions: if($test) { $query = "SELECT count(*) FROM articles WHERE group1 = 'fp'";# AND group2 = 'login'"; $r = mysql_query($query) or die('Db error: ' . mys

Re: [PHP] Create a screenshot of a website

2009-10-22 Thread Kim Madsen
resea soul wrote on 2009-10-22 15:28: Hi, I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. Do you mean "I wanna make a screendump of _my_ website"? Then this is for you: http://dk2.php.net/manual/en/function.imagegrabscreen.php - It works

Re: [PHP] Sessions seems to kill db connection

2009-10-23 Thread Kim Madsen
Kim Madsen wrote on 2009-10-22 17:51: Hi PHPeople I have an odd problem at my new work and wonder if it's some sort of odd setup that is causing this problem when using sessions: Like I said, my new work and odd setup, an include file had a mysql_close() in the bottom Speaki

Re: [PHP] Fedora 11 PHP install problems

2009-10-23 Thread Kim Madsen
Ashley Sheridan wrote on 2009-10-23 19:29: On Fri, 2009-10-23 at 13:29 -0400, Israel Ekpo wrote: What about the error libphp5.so: undefined symbol: OnUpdateLong Are you still observing that error? [removed a bunch of old posting] Ashley, you quotefucker :-) Well, I'm not compiling from th

Re: [PHP] Sessions seems to kill db connection

2009-10-24 Thread Kim Madsen
Hi Kranthi kranthi wrote on 2009-10-24 07:27: Db error: Access denied for user 'www-data'@'localhost' (using password: NO) WTF? I´m not using a user called www-data for MySQL connections, but apache runs as this user in the case where $test is true there is an open mysql connection, but wh

[PHP] using mysql_close() = best practice?

2009-10-24 Thread Kim Madsen
Hi PHP closes an open db connection when the script is done. I've read somewhere that in PHP6 this behaviour will dissapear, is this true? In that case using mysql_close() would definetly be best practice in all current scripts, to make it portable. A nice solution would probably be adding a

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-24 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-23 22:40: But I think for the OP's purposes, he could simply DEFINE any word he wanted at the beginning of the conversation: "Listen up duder. When I say 'de-ref' you make hyphen and a greater-than sign. Capiche?". He could just as easily say, "Listen up duder. When I

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Kim Madsen
Michael Shadle wrote on 2009-10-26 06:48: Oct 25 22:00:01 sql02 php: PHP Warning: mysqli_connect(): (HY000/2013): Lost connection to MySQL server at 'sending authentication information', system error: 32 in /home/foo/web/foo.com/core.php on line 2394 It's either this or one or two others. What

Re: [PHP] PHP String convention

2009-10-28 Thread Kim Madsen
Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do the curly braces mean anything? 1) $string = "foo{$bar}"; 2)

Re: [PHP] It's not behaving. Error reporting, that is

2009-11-03 Thread Kim Madsen
Hi Philip Try to post a link to a page, that prints phpinfo() -- Kind regards Kim Emax Philip Thompson wrote on 2009-11-03 17:11: Hi all. This seems like a trivial issue to fix, but I'm having issues. I'm running a script via command line and it's throwing out PHP "notices." Well, I want to

[PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Kim Madsen
Hey I'm working on creating excel sheets from these classes: http://articles.sitepoint.com/article/pear-spreadsheet_excel_writer/3 http://pear.php.net/package/Spreadsheet_Excel_Writer/download/ Does anyone know how to create a combo box from PHP with these (or other classes)? By combobox I me

Re: [PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Kim Madsen
Jim Lucas wrote on 2009-11-13 17:06: Kim Madsen wrote: Hey I'm working on creating excel sheets from these classes: http://articles.sitepoint.com/article/pear-spreadsheet_excel_writer/3 http://pear.php.net/package/Spreadsheet_Excel_Writer/download/ Does anyone know how to create a comb

Re: [PHP] exec() problem

2009-11-14 Thread Kim Madsen
Ashley Sheridan wrote on 2009-11-15 00:23: Looked to all log...nothing! :-( What other logs did you look at? Then do this from a command line: su - "the user apache runs as" copy the command from the ph script and run it from commandline and let us see the error you recieve... -- Kind

Re: [PHP] processing html forms and keeping the values

2009-11-25 Thread Kim Madsen
Merlin Morgenstern wrote on 2009-11-24 18:38: This is not so easy. I am doing some checking with php on the values and if one failes php returns via GET to the form with the help of header location: $parameter = "&demo=this"; HEADER("Location:/test.html?error=1".$parameter);

Re: [PHP] Emergency! Performance downloading big files

2009-12-02 Thread Kim Madsen
Brian Dunning wrote on 2009-12-01 23:48: This is a holiday-crunch emergency. I'm dealing with a client from whom we need to download many large PDF docs 24x7, several thousand per hour, all between a few hundred K and about 50 MB. Their security process requires the files to be downloaded via

Re: [PHP] logic operands problem

2009-12-07 Thread Kim Madsen
Hey Merlin Merlin Morgenstern wrote on 2009-12-07 11:52: Hello everybody, I am having trouble finding a logic for following problem: Should be true if: page = 1 OR page = 3, but it should also be true if page = 2 OR page = 3 The result should never contain 1 AND 2 in the same time. This obvi

Re: [PHP] mysterious include problem

2009-12-07 Thread Kim Madsen
Hi Allen Allen McCabe wrote on 2009-12-07 21:03: I have been using includes for my content for a while now with no problems. Suddenly it has stopped working, and it may or may not be from some changes I made in my code structure. I use default.php for most or all of my pages within a given dire

Re: [PHP] mysterious include problem

2009-12-10 Thread Kim Madsen
LinuxManMikeC wrote on 2009-12-07 22:48: > Instead of hard coding cases you can validate and constrain the input > with a regex. Much more flexible when adding content. I would also > add code to make sure the file exists, otherwise fall through to the > default. In huge sites with a lot of inc

Re: [PHP] Highlighting image map on load

2009-12-16 Thread Kim Madsen
leledumbo wrote on 2009-12-14 13:37: I have image map with dynamic circle areas whose coordinates stored in database. I'd like to colorize these areas so that it's obvious to see them. Most solutions I found on the net highlights the area on mouse hover, while my needs is to do it once when the w

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Kim Madsen
Bob McConnell wrote on 21/12/2009 15:05: Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Then use fopen() to read a page you know exists? --

Re: [PHP] Checking for internet connection.

2009-12-23 Thread Kim Madsen
Hi Bob Bob McConnell wrote on 23/12/2009 14:35: From: Andy Shellam And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before mine. Too much o

Re: [PHP] Checking for internet connection.

2009-12-23 Thread Kim Madsen
Bob McConnell wrote on 23/12/2009 15:55: > The problem arises when too many of the relevant parts are also removed, > which happened far too often on this thread as well as others. When the > core context is not retained, the conversation drifts and quickly > becomes useless to either the early p

Re: [PHP] Checking for internet connection.

2009-12-23 Thread Kim Madsen
Kim Madsen wrote on 23/12/2009 17:01: Okay, explanation excepted, E-mails can easily be misunderstood :-) May you have a merry Christmas (grab another cup of choco, just in case ;-)) correction: accepted Now _I'M_ gonna get a cup of chocolate :-) -- Kind regards Kim Emax - mastermin

Re: [PHP] Merry Christmas!

2009-12-25 Thread Kim Madsen
Rene Veerman wrote on 25/12/2009 17:04: +1 from Amsterdam :) & a happy, productive & profitable new year to all a ya. Copenhagen sents kind regards too, may you all have some swell days. And C U at Queensday? :o) -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://

Re: [PHP] PHP uploaded files logs

2010-01-01 Thread Kim Madsen
Hi Manoj Singh wrote on 01/01/2010 08:07: Hi, Is PHP maintaining the logs regarding files uploaded? Actually I needed it because recently in my developed web site upload functionality seems to stop working even for the correct file and i want to check that which type of files are uploaded. Actu

Re: [PHP] PHP uploaded files logs

2010-01-01 Thread Kim Madsen
Daniel Egeberg wrote on 01/01/2010 17:10: No, Apache doesn't log POST data only the request. And even if it did, not all hosting companies give you access to your access and error log files... Making your own logfile is a good way to debug, for instance I had a problem with creating a zip

Re: [PHP] Display just 1 record in a query

2010-01-12 Thread Kim Madsen
deal...@gmail.com wrote on 12/01/2010 22:52: I did a query... then I display records like:   Q: but how I i just display a particular record with out the do / while loop? Just use extract($row_cur); before the table starts. That would give you first row onl

Re: [PHP] Display just 1 record in a query

2010-01-12 Thread Kim Madsen
Daevid Vincent wrote on 13/01/2010 00:00: Holy, Jesus, Marry and Joseph! You can't be serious with that?! So you're going to loop over potentially hundreds or thousands of records and only display one? Wow. Speechless. Either you're talking to dealtek or you didn't read my post very well: "An

Re: [PHP] strtotime

2010-01-14 Thread Kim Madsen
Hi guys I have a question: Ashley Sheridan wrote on 14/01/2010 19:20: MySQL uses a default "-00-00" value for date fields generally, but when converted into a timestamp, the string equates to a false value. In PHP, timestamps are numerical values indicating the seconds since Midnight of the

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Hey Haven't had the time to read up on the maillist, but here's my input. Mattias Thorslund wrote on 09/01/2010 02:26: To my eyes, ?> means "look there is more content coming", which seems kind of silly when there isn't. To mine it means, no more PHP code for now. I don't wanna make it diff

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
John Corry wrote on 12/01/2010 17:04: I leave ?> out. I'm pretty careful about my code formatting and whitespace. It's my opinion that if I can eliminate a potential problem by not including an optional closing tag...there's really no reason why I shouldn't. What is the difference between: W

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Ashley Sheridan wrote on 14/01/2010 23:30: What is the difference between: WHITESPACE and Plenty of differences, if you include the first one as a file, the whitespace gets sent to the browser because it is not part of the PHP, and so is assumed to be HTML. Once this happens, the headers

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Ashley Sheridan wrote on 14/01/2010 23:36: What has been said on this thread a few times is it is not always a developer error, but a bug with the editor, which is not something that will be picked up until it occurs. Once again I love my VIm :-) (with whitespace highlight if needed) -- Kind

Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Kim Madsen
Hi Gaurav Gaurav Kumar wrote on 15/01/2010 09:54: NO SMTP Any trusted SMTP software to install on local development machine and how to set it up with php to send an email? Also just providing the SMTP server details in php.ini will not work for me as this requires authentication/credentials e

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Kim Madsen
tedd wrote on 20/01/2010 16:11: At 10:26 AM -0500 1/19/10, Bob McConnell wrote: Some problems will fit into it, some don't. I teach OOP thinking at the local college and haven't run into a problem that doesn't fit. For example, in my last class I had a woman who wanted to pick out a blue dre

Re: [PHP] preg_replace help

2010-01-26 Thread Kim Madsen
Michael A. Peters wrote on 26/01/2010 14:18: $fixSrch[] = '/\n/'; $fixRplc[] = '[br]'; is what I need except I want it to leave anything between [code] and [/code] alone. I figured it out before but with but I don't even remember what I was working on when I did that and I can't for the li

Re: [PHP] SQL question

2010-01-26 Thread Kim Madsen
Michael A. Peters wrote on 26/01/2010 06:04: I use seconds from epoch in the database simply because it works so well with the php date() function. If you need something where Julian day really is better, I assume it isn't that hard to convert between posix and julian day, though it seems od

Re: [PHP] DirectoryIterator

2010-01-26 Thread Kim Madsen
Christoph Boget wrote on 26/01/2010 21:17: I've looked through the docs but was unable to find out if this is possible; I hope it is. Is there a way that you get the size/length of the collection to be iterated (e.g. the total number of files) without having to iterate through at least once? O

Re: [PHP] File Upload

2010-01-30 Thread Kim Madsen
Ali Reza Sajedi wrote on 30/01/2010 12:27: UPLOAD_ERR_NO_TMP_DIR Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3. Has anyone encountered such a problem or has a clue as to what the cause could be? What does "print phpinfo()"; tell you about the upload_tmp_dir?

Re: [PHP] Magento shopping cart

2010-02-01 Thread Kim Madsen
Skip Evans wrote on 01/02/2010 22:02: Hey all, Anyone ever use the Magento shopping cart? Pluses, minuses, opinions? I have a client that is pretty adamant about using it, but I've found over just about any I've used I can do a better service to the client by writing them from scratch. It's e

Re: [PHP] Mysql statement works in phpmyadmin but not in php page

2010-02-11 Thread Kim Madsen
james stojan wrote on 11/02/2010 22:21: $query="INSERT INTO upload_history (v_id,hour,visits,date) VALUES (".$v_id.",".$hour.",".$visits.",'$date1'".");"; The ,'$date1'"." is not correct syntax, change it to ,'".$date."' -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List

Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Kim Madsen
Michael Stroh wrote on 19/02/2010 19:19: I have a site I'm working on with some data that I want to be readable by anyone, but some files that I want to keep hidden from outside users. Here is an example of my file structure. /products/data1/item_1/data.txt > /products/data2/item_2/data.txt s

Re: [PHP] Advice on maintaining public and private files

2010-02-21 Thread Kim Madsen
Al wrote on 20/02/2010 19:30: I use Kim's solution and take it one step forward. Htacces files can get lost or corrupted, so No solution to that problem as I see it. In my config file I have the text string. I like the idea, but what if this file is never accessed? -- Kind regards Kim

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Kim Madsen
Hi Slack-Moehrle Slack-Moehrle wrote on 22/02/2010 21:39: Hi All, I have Forms that I submit for processing. I have seen examples of people using either $_POST or $_REQUEST. When would I choose one over the other? $_REQUEST['test'] is true on both $_GET['test'] and $_POST['test'] I use it

[PHP] obj in array?

2010-02-24 Thread Kim Madsen
Hi folks I'm hacking on a SOAP2 solution towards Magento and have retrieved the catalog in an array, but i'm having trouble accessing the values of the array cause there's an object in it. This is a var_dump of $my_array: array(14) { [0]=> object(stdClass)#2 (2) { ["set_id"]=> int

Re: [PHP] obj in array?

2010-02-24 Thread Kim Madsen
Kim Madsen wrote on 24/02/2010 14:02: how do I access for instance set_id in $my_array[0]? I tried declaring an instance of $my_array[0] but that fails too: "Fatal error: Cannot use object of type stdClass as array " $my_array[0]->set_id; did the trick -- Kind reg

[PHP] Magento & SOAP2

2010-02-25 Thread Kim Madsen
Hi Does anyone on the list have experience with the above? The documentation is only on SOAP1.x, but not on SOAP2 and the calls are completely different: SOAP1.x: http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product_attribute#example_1._getting_product_attribute_s_sets_

Re: [PHP] Header function

2010-03-01 Thread Kim Madsen
Ashley Sheridan wrote on 01/03/2010 07:13: The HTTP header doesn't treat quoteation marks in the same way that PHP does. It needs double quote marks to function correctly. How do you mean? And do you have a link to this information? Even if this is true, then the first Nick did should still b

Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-08 Thread Kim Madsen
Skip Evans wrote on 08/03/2010 23:21: D'oh! ...and I suppose there is just no way around that, eh? two public IPs pointing to the same server? ;o) -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Kim Madsen
Hi Make a $new_filename and put that in the header: $neW_filename = "downloadfile." . $filetype; header("Content-Disposition: attachment; filename=$new_filename"); (the content of the file is now in $content, so if you like you could also change the value of $filename if you preferrer that) Y

Re: [PHP] $_FILE array being truncated

2010-03-16 Thread Kim Madsen
Ashley Sheridan wrote on 16/03/2010 18:28: I really wouldn't rely on a form that contains more than 20 file upload boxes though. If someone uploads some large files, they're stuck with an extremely long wait which will slow down your server a bit as well if a lot of people are using the same for

Re: [PHP]Zip and text files generated are corrupted

2010-03-27 Thread Kim Madsen
Mike Roberts wrote on 25/03/2010 14:56: remove No :-) Use the proper unsubscribe method rather than spamming the list. -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Read From COM1 port

2005-03-03 Thread Kim Madsen
e what I need is a fwrite(), that doesn't return no of bytes, but the response from the device if any. Anyone got an idea? Or is this just mission impossible? This is just a small part of a much larger workflow, which runs in PHP, therefore it would be preferred if the configs of switches and r

SV: [PHP] Read From COM1 port

2005-03-04 Thread Kim Madsen
he correct way to fopen for read/write access. > 'wb+' would be a better answer, I think. I know, that´s how I´ve done it. During try&fail tests I´ve tried like everything. My mistake to not check the code properly before mailing it here... Have a nice weekend out there :o) -- Sincerly Kim Madsen Systemdeveloper / ComX - http://www.comx.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] A general question

2005-03-07 Thread Kim Madsen
open in a different software ? http://dk.php.net/manual/en/function.header.php > Please help very urgent :-) -- Sincerly Kim Madsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Newbie Question re substr

2005-03-08 Thread Kim Madsen
le['content'] = substr($article['content'], 0 200);"; } } with $content"; since I believe You want to print the content and not just assign it? Otherwise the makes no sense :-) > Can anyone help ? I hop that did the trick for You :-) -- Med venlig hilsen /

RE: [PHP] PHP5.0.3-3 on RedHat

2005-03-10 Thread Kim Madsen
uded and I can easily add new ones or remove unsued/unsage ones. Depending on the download time that is the part, that take most of the time or not ;-) -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler Naverland 31 DK-2600 Glostrup www.comx.dk Telefon: +45 70 25 74 7

RE: [PHP] free php live chat with visitor/customer script

2005-03-11 Thread Kim Madsen
nded chat sessions. I hope this will give You enough ideas to start Your project :-) Sincerely Kim Madsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Increase execution time

2005-03-11 Thread Kim Madsen
to 360 and setting set_time_limit(0); > nothing works. > I still get Fatal Error: maximum execution time of 60 seconds. Did You restart the webserver? Sincerely Kim Madsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] incrementing a number from a text file

2005-03-11 Thread Kim Madsen
d for, along with queries like: Select blablabla FROM t1,t2,t3 WHERE customers LIKE '%$s%' OR name LIKE '%$s%' OR domain LIKE '%$s%' OR email LIKE '%$s%' OR log LIKE '%$s%' AND t1.id = t2.t1_id AND t1.id = t3.t1_id Horror! Kind regards Kim Madsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Question about "shortening" a string

2005-03-16 Thread Kim Madsen
there´s all kinds of chararcters from language to language, in Denmark ÆæØøÅå, in sweden äÄöÖ and so on. Of course I could do something like: ereg("^(.+ ).* ?(.+)$", $name, $regs); // untested -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler Naverland 31 D

RE: [PHP] php 4 & php 5

2005-03-16 Thread Kim Madsen
g hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler Naverland 31 DK-2600 Glostrup www.comx.dk Telefon: +45 70 25 74 74 Telefax: +45 70 25 73 74 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] showing the decimal places

2005-03-16 Thread Kim Madsen
t? Have a look at gettype() http://dk2.php.net/manual/en/function.gettype.php $number += 2.00; Should convert the var to a float according to: http://dk2.php.net/manual/en/language.types.type-juggling.php#language.t ypes.typecasting -- Med venlig hilsen / best regards ComX Networks A/S K

RE: [PHP] PHP Classes

2005-03-16 Thread Kim Madsen
on. -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/Systemdeveloper Naverland 31 DK-2600 Glostrup www.comx.dk Telefon: +45 70 25 74 74 Telefax: +45 70 25 73 74 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How to access any function of a any class?

2005-03-17 Thread Kim Madsen
/ best regards ComX Networks A/S Kim Madsen Systemudvikler/Systemdeveloper Naverland 31 DK-2600 Glostrup www.comx.dk Telefon: +45 70 25 74 74 Telefax: +45 70 25 73 74 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] something stupid... split().

2005-03-17 Thread Kim Madsen
n, $none) = split('\.', ConvertTime($AcctSessionTime/90), 2); will do the trick for ya. -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/Systemdeveloper Naverland 31 DK-2600 Glostrup www.comx.dk Telefon: +45 70 25 74 74 Telefax: +45 70 25 73 74 E-mail: [EMAIL

RE: [PHP] php.ini file

2005-03-20 Thread Kim Madsen
--with-config-file-path=/usr/local/php.ini -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] fopen

2005-03-20 Thread Kim Madsen
to get warnings? $defaultfile = "ffmail.txt"; #default file to write to @ $results = fopen($datafilename, "a"); #open file and supress errors You set $defaultfile, but tries to open $datafilename? -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikl

RE: [PHP] php.ini file

2005-03-21 Thread Kim Madsen
regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php.ini file

2005-03-22 Thread Kim Madsen
few things. first, where should the php.ini file go?" I think You did indeed. And I´ll correct my self for the info: "If You compile PHP there´s a parameter to use: --with-config-file-path=/usr/local/php.ini" Skip the php.ini from the _path_ (doh!) -- Med venlig hilsen / be

RE: [PHP] remove space

2005-03-22 Thread Kim Madsen
ot;; > > The blank space needs to be removed from the string. How? Did You search? http://dk.php.net/manual-lookup.php?pattern=replace Str_replace, ereg_replace, preg_replace is just a few friends, that will help You. Php.net is Your best friend ;-) -- Med venlig hilsen / best regards Com

RE: [PHP] More about problems reading COM ports

2005-03-29 Thread Kim Madsen
ly after 8K bytes have arrived does fgets or fread see the > first. Won´t be a problem with fgetc() since You read char by char. > How does one get around this feature (or bug)? > > This is with php 5.0.2.2 on Windows XP. I´m using 4.3.10 -- Med venlig hilsen / best regards

[PHP] ISO encoding of subject in mail?

2005-03-29 Thread Kim Madsen
Alert: BAD HEADER Non-encoded 8-bit data (char E5 hex) in message header 'Subject': Subject: ADVARSEL: F\345 IP adresser ti... Any tips/ideas? -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.

RE: [PHP] Re: ISO encoding of subject in mail?

2005-03-29 Thread Kim Madsen
won´t work for me. Might just create my own function since it´s 6 chars that needs to be converted... > BTW, are you _the_ Kim Madsen of TKBMMemtable fame ? Hehe, I doubt that since I have NO clue what the heck You´re talking about :-) /Kim -- PHP General Mailing List (http://www.php

RE: [PHP] Re: ISO encoding of subject in mail?

2005-03-29 Thread Kim Madsen
> -Original Message- > From: M. Sokolewicz [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 29, 2005 6:09 PM > convert it to quoted-printable using eg. imap_8bit() That seems to be, what I want _but_ NO PHP is printed after I call this function. I turns out that we haven´t got PHP compi

RE: [PHP] ISO encoding of subject in mail?

2005-03-30 Thread Kim Madsen
> -Original Message- > From: Kim Madsen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 29, 2005 3:56 PM > I´d like to encode the subject in mails generated and sent by PHP, so > Danish letters like æ,ø and å can be used too... like this: > > Subject: Problemer

RE: [PHP] Generate random number

2005-03-30 Thread Kim Madsen
find... http://php.net/manual/en/function.rand.php -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] HELP!

2005-03-30 Thread Kim Madsen
ot;; This is untested, the ([0-9]+,)? Means that there _may_ be digits and then a komma, but itÂs not necessary, threfore $786.00 and $1.00 matches too. The () around all expressions means, that we save whatever is matched into $pricetag -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper

RE: [PHP] image_type

2005-03-30 Thread Kim Madsen
hp.net/manual/en/features.file-upload.php -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Session problem

2005-03-31 Thread Kim Madsen
uot;&$sn=$nn"; > > header("Location: $web"); > ?> > === > page2.php: > session_start(); > global $nfo; > > $uss=$nfo["fu"]; > > echo $uss; HERE $uss is empty! Yeah, cause that´s _not_ what the manual says: http:/

RE: [PHP] getting check box values into an array

2005-03-31 Thread Kim Madsen
t; due to > some JS reasons I do have to go that way. So is not an option? Cause that would be the smartest way to do it. In this way all the checked boxes are in $_POST['interests'] and can be seen with print var_dump($_POST['interests']) You create the checkboxes with a

  1   2   >