[PHP] Re: Reading from a COM port in Windows blows up

2009-03-14 Thread Manuel Lemos
Hello, on 03/15/2009 01:56 AM Matt Neimeyer said the following: > $ComPort = fopen("COM1", "wb+"); I suspect all this does is opening a file named COM1 . Shouldn't that be "COM1:" instead of just COM1? -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP

Re: [PHP] Summary Report With Details - Newbie Question

2009-03-14 Thread Paul M Foster
On Fri, Mar 13, 2009 at 03:29:00PM -0700, revDAVE wrote: > Hi Folks, > > I would like to make a summary report with details for a products inventory > list - so it could list: > > A - the product & a few summaries like total count on 1 line > B - --- below that: the details of a multi line s

[PHP] Reading from a COM port in Windows blows up

2009-03-14 Thread Matt Neimeyer
I just recently got a new Onkyo TX-SR706 Audio Receiver that has an RS232 interface and I thought... cool... Build a Web Interface so I can control it from several rooms away. The code below works using PHP 5.2.8 under Apache (XAMPP) on Windows XP to change the current input of my Audio Receiver.

[PHP] Problem with passing and Area in a $_POST

2009-03-14 Thread Richard Kurth
I have a script that is passing a area in a $_POST and it does not pass the data. When I try to look at the data with $_POST['fieldorder'] it its empty but when I look at it with $_REQUEST['fieldorder'] the data is there. This seams very strange to me. It has been working for about 6 months with n

Re: [PHP] Knowledge Base software - looking for opinions

2009-03-14 Thread haliphax
On Sat, Mar 14, 2009 at 4:34 AM, mike wrote: > Or, a very simple CMS so I don't have to code it that has the concept > of basic ACLs (user-based or group-based is fine) > > Hierarchial directory of documents > > Allow anyone with the right privileges to edit it > > Keep an audit of who edited it,

Re: [PHP] left join does not work, why?

2009-03-14 Thread Daniel Brown
On Sat, Mar 14, 2009 at 19:51, PJ wrote: > $sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, > b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- > CONCAT_WS(' ', first_name, last_name) AS Author > FROM book AS b > LEFT JOIN book_author AS ab ON b.id = ab.bookI

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Martin Zvarík
Jan G.B. napsal(a): 2009/3/15 Martin Zvarík : "The browser will only execute script in source files from the white-listed domains and will disregard everything else, including embedded and inline scripts. " wtf, can't you just take care of the INPUT and type strip_tags($_GET['my_name']) ?? Thi

[PHP] left join does not work, why?

2009-03-14 Thread PJ
$sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- CONCAT_WS(' ', first_name, last_name) AS Author FROM book AS b LEFT JOIN book_author AS ab ON b.id = ab.bookID LEFT JOIN author AS a ON ab.authID=a.id LEFT JOIN

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Jan G.B.
2009/3/15 Martin Zvarík : > "The browser will only execute script in source files from the white-listed > domains and will disregard everything else, including embedded and inline > scripts. " > > wtf, can't you just take care of the INPUT and type > strip_tags($_GET['my_name']) ?? > > This won't b

[PHP] Re: Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Thank you to everybody, turns out that in the godaddy control panel, you have the option of php4 or php5, and they have 4 as the default. A call to gd and I was able to switch and it now works. Thanks again for all your help! Gary ""Gary"" wrote in message news:d1.a0.60648.83beb...@pb1.pair

Re: [PHP] Fatal error: Call to undefined function:mysqli_connect()in

2009-03-14 Thread Shawn McKenzie
Shawn McKenzie wrote: > revDAVE wrote: >> On 3/14/2009 10:36 AM, "Gary" wrote: >> >>> Can anyone enlighted me as to what I am not doing correctly? >> >> Hi Gary, >> >> I am hosted using a basic cpanel interface ... There's a button = Remote >> MySQL which brings up a page: Remote Database Access H

Re: [PHP] Fatal error: Call to undefined function:mysqli_connect() in

2009-03-14 Thread Shawn McKenzie
revDAVE wrote: > On 3/14/2009 10:36 AM, "Gary" wrote: > >> Can anyone enlighted me as to what I am not doing correctly? > > > Hi Gary, > > I am hosted using a basic cpanel interface ... There's a button = Remote > MySQL which brings up a page: Remote Database Access Hosts > > And I put in my

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Martin Zvarík
Michael A. Peters napsal(a): Martin Zvarík wrote: What's the point? The point is detailed on the (not fully complete) description page I just put up - http://www.clfsrpm.net/xss/ Yeah, I just had a quick look... "The browser will only execute script in source files from the white-listed

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread revDAVE
On 3/14/2009 10:36 AM, "Gary" wrote: > Can anyone enlighted me as to what I am not doing correctly? Hi Gary, I am hosted using a basic cpanel interface ... There's a button = Remote MySQL which brings up a page: Remote Database Access Hosts And I put in my HOME IP and all works fine now ...

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Jochem Maas
Martin Zvarík schreef: > Jochem Maas napsal(a): >> Martin Zvarík schreef: >> >>> What's the point? >>> >>> If user puts in a search input something like alert('I am super >>> hacker'); >>> >>> And the website outputs: >>> You are searching for: >>> >>> then what? it shows an alert(), who ca

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Shawn McKenzie
Gary wrote: > Thanks again to everyone. > > I have just checked the servers phpinfo, and turns out they are running PHP > Version 4.3.11 while I have verstion 5.2.8, could this change any of the > advice? Yes, the mysqli extension is only available for PHP5. Use the mysql_x() functions or mov

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Thanks again to everyone. I have just checked the servers phpinfo, and turns out they are running PHP Version 4.3.11 while I have verstion 5.2.8, could this change any of the advice? ""Jan G.B."" wrote in message news:c9a09d00903141132i19597e73g2271955d1ac14...@mail.gmail.com... Gary, you

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Ok.. I have added [MySQL] ;Gary, this is the code from the forum. extension=mysqli.so to the php.ini file on my machine, I saved the file. Is there anything else I need to do? Thanks again. "Per Jessen" wrote in message news:gpgu1t$ho...@saturn.local.net... Gary wrote: > I had the code

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Ok.. I have added [MySQL] ;Gary, this is the code from the forum. extension=mysqli.so to the php.ini file on my machine, I saved the file. Is there anything else I need to do? Thanks again. "Per Jessen" wrote in message news:gpgu1t$ho...@saturn.local.net... Gary wrote: > I had the code

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Per Jessen
Gary wrote: > I had the code written the way you suggested, but changed it to the > way the hosting company suggested. I think your hosting company might be smoking something they shouldn't be. Your way is the right one. > I am unclear. I have php 5.2.8.8 on my local machine, I also have > MyS

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Jan G.B.
2009/3/14 Jan G.B. : > One side node.. you should apply addslashes() also to > $_SERVER['REMOTE_ADDR'), because an evil person could manipulate the > value of that variable to execute SQL-Injections. forget that part - i didn't see that this var is only used in the email, not in the query. -- PH

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Jan G.B.
Gary, you can check this by either creating a file containing this: and putting it up on your webserver, then open in with your browser, or you could look at the output of "php -i | less" on the command line. After you enabled the mysqli extension on your host, you might change mysqli_connect('$v

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
I had the code written the way you suggested, but changed it to the way the hosting company suggested. I am unclear. I have php 5.2.8.8 on my local machine, I also have MySQL 5.1.30 set up locally as well. I am using godaddy.com as a host. I assumed that the php was running on the host server

Re: [PHP] Anyone fancy getting paid to improve my PHP in London?

2009-03-14 Thread Kevin Kinsey
Robert Cummings wrote: You forgot to configure the auto_prepend: php.ini: auto_prepend = "robs_harem.php" chmod($wife,0600); while ($n<$days) { fputs($rob,$couch); sleep(28800); } } ?> Good luck, buddy ;-) Kevin Kinsey PS > why are all the trolls in this thread named so

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Per Jessen
Gary wrote: > Ok, I know how to access the php.ini for the local host, is this the > same file that would control the remote server? Or do I need to look > for it on my remote host? The php.ini you need to look at is the one one the server where you're running your PHP code. The remote host is

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Ok, I know how to access the php.ini for the local host, is this the same file that would control the remote server? Or do I need to look for it on my remote host? Again, thanks for your help. "Per Jessen" wrote in message news:gpgr6o$hc...@saturn.local.net... Gary wrote: > Thanks for your

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Per Jessen
Gary wrote: > Thanks for your quick reply, but I do not know what that means... > Where would I find this out and how would I accomplish this if it is > not done? > > Thanks again. Hi Gary see what phpinfo() says - if the extension is loaded, it'll show up there. To load the extension, add "ex

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
Thanks for your quick reply, but I do not know what that means... Where would I find this out and how would I accomplish this if it is not done? Thanks again. "Per Jessen" wrote in message news:gpgq8i$h5...@saturn.local.net... Gary wrote: > I am recieving a fatal error trying to connect to my

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Daniel Brown
On Sat, Mar 14, 2009 at 13:41, Per Jessen wrote: > > Check if the mysqli extension has been loaded. Also check this page: http://us.php.net/manual/en/mysqli.connect.php For some of the mirrors, trying to hit http://php.net/mysqli_connect erroneously takes you to the mysql_connec

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Per Jessen
Gary wrote: > I am recieving a fatal error trying to connect to my server/mysql. > This is my first attempt at connecting to a remote server, have been > successful with localhost (apache). I had the variation of not putting > the hostname & others into a variable, but that did not work either. >

[PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Gary
I am recieving a fatal error trying to connect to my server/mysql. This is my first attempt at connecting to a remote server, have been successful with localhost (apache). I had the variation of not putting the hostname & others into a variable, but that did not work either. I have also generic

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Michael A. Peters
Martin Zvarík wrote: What's the point? The point is detailed on the (not fully complete) description page I just put up - http://www.clfsrpm.net/xss/ Namely, a lot of people who have web sites do not have the technical capability to prevent their site from being used as an XSS vector to a

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Shawn McKenzie
Shawn McKenzie wrote: > Jochem Maas wrote: >> Martin Zvarík schreef: >>> What's the point? >>> >>> If user puts in a search input something like alert('I am super >>> hacker'); >>> >>> And the website outputs: >>> You are searching for: >>> >>> then what? it shows an alert(), who cares? >> rep

[PHP] Issues with mcrypt (Rijndael 128) and external C application.

2009-03-14 Thread Brad Broerman
Hi, I am trying to encode a string using Rijndael-128 using a C application that I wrote, based on the BSD crypt/rijndael libarary and decode it in PHP using mcrypt_decrypt. Each part of the program works separately (I can encrypt with the c app, and decrypt with it, and I can encrypt with mcrypt_e

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Martin Zvarík
Jochem Maas napsal(a): Martin Zvarík schreef: What's the point? If user puts in a search input something like alert('I am super hacker'); And the website outputs: You are searching for: then what? it shows an alert(), who cares? replace the alert() with some code that passes th

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Shawn McKenzie
Jochem Maas wrote: > Martin Zvarík schreef: >> What's the point? >> >> If user puts in a search input something like alert('I am super >> hacker'); >> >> And the website outputs: >> You are searching for: >> >> then what? it shows an alert(), who cares? > > replace the alert() with some code

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Jochem Maas
Martin Zvarík schreef: > What's the point? > > If user puts in a search input something like alert('I am super > hacker'); > > And the website outputs: > You are searching for: > > then what? it shows an alert(), who cares? replace the alert() with some code that passes the cookie to a hac

[PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Martin Zvarík
What's the point? If user puts in a search input something like alert('I am super hacker'); And the website outputs: You are searching for: then what? it shows an alert(), who cares? I, as an owner of this website, don't mind AT ALL. Aha, forget to mention the XSS on MySQL or

Re: [PHP] Anyone fancy getting paid to improve my PHP in London?

On Fri, 2009-03-13 at 17:39 -0500, Shawn McKenzie wrote: > Tom Chubb wrote: > > 2009/3/13 Robert Cummings > > > >> On Fri, 2009-03-13 at 17:16 +, Tom Chubb wrote: > >>> Do any experienced PHP programmers in London fancy helping me improve my > >>> PHP? > >>> I'd like to know where my code cou

Re: [PHP] Knowledge Base software - looking for opinions

Or, a very simple CMS so I don't have to code it that has the concept of basic ACLs (user-based or group-based is fine) Hierarchial directory of documents Allow anyone with the right privileges to edit it Keep an audit of who edited it, when, and the previous content I really don't want to have

Re: [PHP] htmlentities is incomplete: does not cover rsquo etc

On Sat, Mar 14, 2009 at 12:18 AM, Lester Caine wrote: > This probably one of the reasons some of us think that getting a stable PHP6 > based on unicode out of the door would probably be a lot more use to people > than PHP5.3 ;) +1 I cannot wait for full unicode. mbstring, iconv, all this wacky

Re: [PHP] htmlentities is incomplete: does not cover rsquo etc

Heddon's Gate Hotel wrote: Thanks Jan, it's much clearer now. My knowledge about character encodings has multiplied 100-fold in the last 24 hours' research. Would it be a good idea for the PHP Manual to address some of these issues, by explaining good practice in encoding arbitrary user input