Re: [PHP] fckeditor and PDF and pesky users

2005-10-18 Thread Torgny Bjers
Jochem Maas wrote: > and the next site that displays a PDF when I wasn't expecting it > and I have to spend the next five minutes waiting for the b'std to load > (with the alternative being to KILL the browser - losing all open pages > in the process) ... might just make me snap ;-) I agree, thos

Re: [PHP] Java editor

2005-10-18 Thread Robert Cummings
On Tue, 2005-10-18 at 23:52, John Taylor-Johnston wrote: > Is there a OS java (or other) html editor I can implement on a Web page. > I want a user to type text, use bold, italics, etc. > I would then store the html in a MySQl record and then use php to insert > the edited text. > I've seen some

[PHP] Java editor

2005-10-18 Thread John Taylor-Johnston
Is there a OS java (or other) html editor I can implement on a Web page. I want a user to type text, use bold, italics, etc. I would then store the html in a MySQl record and then use php to insert the edited text. I've seen some packaged, in Moodle for example. John -- PHP General Mailing List

[PHP] Re: Recommended Reading?

2005-10-18 Thread Oliver Grätz
>From a practical view: *For big web projects:* Make a plan! Do not start to write code before you exactly know what you want to do. An important concept in the development of large web applications is the MVC princinple (Model View Controller) which basically urges you to seperate the data and th

Re: [PHP] Re: How can I count the usage of mail function in scripts?

2005-10-18 Thread Oliver Grätz
Greg Donald schrieb: > On 10/18/05, Oliver Grätz <[EMAIL PROTECTED]> wrote: > >>Usually customers pay a fix fee for >>some free traffic and then must pay for traffic exceeding those limits. >>What they do with that traffic is none of your business. > > > You've obviously never been a hosting pro

[PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Oliver Grätz
Shaun schrieb: > $qid = mysql_query('INSERT INTO MYTABLE ( > column1, > column2, >) VALUES ( > "'.$value1.'", > "'.$value2.'" >

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] RE: [PHP] Recommended Reading?

2005-10-18 Thread Death Gauge
I've never read a book to do PHP or anything else. I simply google and go to site after site reading tutorials and docs then making a sample page with what I've read and learned. --Death Gauge "How do you gauge your death?!" Original Message Follows From: "Alan Lord" <[EMAIL PROT

[PHP] PHP and files Upload

2005-10-18 Thread feiticeir0
hello all. I've managed to create files uploads pages in the past (dont remember if alredy with php 5). till now, i havent need for testing or using. today, i've tried to test an upload page (a very simple one) with php 5.0.5 and i was unable to do it. the script always says it was sucessful t

[PHP] has anyone a script for generating dates to a rule?

2005-10-18 Thread Vizion
Hi OK I am being lazy but unnecessarily reinventing the wheel is not my idea of fun. I need a script to populate database fields for year, month, day of month, day of week to a rule e.g start year, month, day end year month day exclude [days of week] [from year, month, day to year, month, da

[PHP] LDAPS agaisnt Active Directory

2005-10-18 Thread Aaron Axelsen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I am trying to authenticate against an Active Directory 2003 server using LDAPS. I have the cert from the server, however i'm not exactly sure how to set it up so that php will recognize it. I have read the docs and googled a bit, but everyo

[PHP] Re: Recommended Reading?

2005-10-18 Thread Ben Litton
I liked Schlossnagle's 'Advanced PHP Programming' http://www.amazon.com/exec/obidos/tg/detail/-/0672325616/qid=1129664190/sr=8-1/ref=pd_bbs_1/002-6178615-3953615?v=glance&s=books&n=507846 It has a little primer on a variety of things but is for the php5 user. You might also want to read a boo

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Ben Litton
You're using two =='s for your assignment. On Tue, 18 Oct 2005 15:15:59 -0400, "Shaun" <[EMAIL PROTECTED]> wrote: Hi all, Thanks for your replies, rather than check each vaule by name I am trying to produce a more dynamic solution: foreach ($_POST as $key => $value) { if ($value == ''

Re: [PHP] White background with imagecreatetruecolor() [SOLVED]

2005-10-18 Thread John Nichel
John Nichel wrote: I'm diving into the gd functions for the first time, and I'm having a problem creating a white background for an image when using imagecreatetruecolor(). The manual says that this function will create a _black_ image, but looking at imagecolorallocate() it says that the fir

Re: [PHP] Recommended Reading?

2005-10-18 Thread Jordan Miller
Zandstra's "PHP 5 objects patterns practice" has been getting excellent reviews. i also recommend it. http://www.amazon.com/gp/product/1590593804/ On Oct 18, 2005, at 1:43 PM, Alan Lord wrote: Hi all, Forgive this long diatribe, a bit off-topic I know, but it might stimulate a good disc

[PHP] White background with imagecreatetruecolor()

2005-10-18 Thread John Nichel
I'm diving into the gd functions for the first time, and I'm having a problem creating a white background for an image when using imagecreatetruecolor(). The manual says that this function will create a _black_ image, but looking at imagecolorallocate() it says that the first call to this func

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread tg-php
Sorry everyone, I missed the "integer" requirement here. I apologize. And yes, '' isn't a good integer value and will throw an error. That's what I get for not reading thoroughly enough :) -TG = = = Original message = = = On Tue, October 18, 2005 12:42 pm, [EMAIL PROTECTED] wrote: > That sho

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Shaun
Hi all, Thanks for your replies, rather than check each vaule by name I am trying to produce a more dynamic solution: foreach ($_POST as $key => $value) { if ($value == '') { $_POST[$key] == 'NULL'; } } I was expecting $_POST[$key] to be the same as $key, however this isnt the case: $

Re: [PHP] fckeditor and PDF and pesky users

2005-10-18 Thread Richard Lynch
On Tue, October 18, 2005 8:30 am, Jochem Maas wrote: > and the next site that displays a PDF when I wasn't expecting it > and I have to spend the next five minutes waiting for the b'std to > load > (with the alternative being to KILL the browser - losing all open > pages > in the process) ... might

[PHP] Open Lampshade

2005-10-18 Thread Aaron Greenspan
Hi everyone, Just thought you might like to know that Lampshade, our previously closed PHP framework, is now open-source: http://www.thinkcomputer.com/corporate/news/pressreleases.html?id=24 Aaron Aaron Greenspan President & CEO Think Computer Corporation http://www.thinkcomputer.com -- PH

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Richard Lynch
On Tue, October 18, 2005 12:42 pm, [EMAIL PROTECTED] wrote: > That should work. You can set it so you can't have NULL, but dont > know of anything that tells the database not to accept '' as a value Any database, other than MySQL, is *NOT* going to accept '' as an integer value. Because '' is no

[PHP] Recommended Reading?

2005-10-18 Thread Alan Lord
Hi all, Forgive this long diatribe, a bit off-topic I know, but it might stimulate a good discussion... I have built a few small apps in PHP before and, whilst they work, I can't but help feeling that I go about the whole thing the WRONG way... I am not a professional software person (far from i

RE: [PHP] re: some problems with php form

2005-10-18 Thread Ford, Mike
On 18 October 2005 15:50, Bruce Gilbert wrote: > I think so Minuk. Here is the *entire* form code below. Maybe > someone can > also point out why the email regex validation code isn't working? TIA > /begin PHP form > code*/ > > $f

Re: [PHP] Inserting NULL Integer Values

2005-10-18 Thread Richard Lynch
$value2 = strlen($value2) ? $value2 : 'NULL'; On Tue, October 18, 2005 11:15 am, Shaun wrote: > Hi, > > Up to this point in time I used to construct my insert statements like > this > > $qid = mysql_query('INSERT INTO MYTABLE ( > column1, >

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Ben Litton
Good explanation but I think he wanted to avoid quoting the integers. I may be wrong, but I think not quoting integers is a decent practice because it makes it easier to port your SQL over to a different database if you later decide you must do so. Of course he could just add a single quote

[PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Ben Litton
Yes, but NULL is a special thing to MySQL. If you don't quote 'NULL' it just means 'empty' to mySQL. If your database schema allows NULLS (it's optional), your insert will go through. On Tue, 18 Oct 2005 13:10:32 -0400, "Shaun" <[EMAIL PROTECTED]> wrote: Hi Ben, Thanks for your reply, w

[PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Shaun
Hi Ben, Thanks for your reply, woudn't that insert a string with a value of'NULL';? ""Ben Litton"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Either cast your empty ints (which should make it zero) or do an if > (!isset($variable)) { $variable = 'NULL'; } > > Ben > > On Tue,

[PHP] Using .htaccess files with PHP CGI

2005-10-18 Thread Jason Kovacs
I am using PHP5 as a CGI and I can't seem to figure out how to set INI values through httpd.conf or .htaccess files. Since PHP isn't built as a module, the php_admin_value and php_value directives don't exist. If I had a module version of PHP along side the CGI, this would not help because as far

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread tg-php
What Ben said is correct, but I'd like to elaborate so you know why it's correct. The INSERT statement you're trying to end up with is: INSERT INTO MYTABLE (column1, column2) VALUES ('somevalue1', 'somevalue2') I'm not sure why it wouldn't work if you ended up with: INSERT INTO MYTABLE (column

[PHP] Re: php, expect and screen

2005-10-18 Thread Ben
Olivier Cant said the following on 10/18/05 02:53: Hi list, I'm wondering if any one has any experience at connecting to a screen session under linux with a PHP script, and reading the pty output (and maybe writing somme stuff as well) I have an interactive program runing under screen whic

[PHP] Re: Inserting NULL Integer Values

2005-10-18 Thread Ben Litton
Either cast your empty ints (which should make it zero) or do an if (!isset($variable)) { $variable = 'NULL'; } Ben On Tue, 18 Oct 2005 12:15:41 -0400, "Shaun" <[EMAIL PROTECTED]> wrote: Hi, Up to this point in time I used to construct my insert statements like this $qid = mysql_quer

[PHP] Re: asynchronous PHP to PHP call

2005-10-18 Thread Oliver Grätz
James schrieb: > I have a PHP script running on server 1. I want it to call another > script on server 2 to clean up some files. There may be tons of > files and I don't want to wait until the second script is finished. > > Is there a way to asynchronously call the second PHP script? > > Righ

Re: [PHP] Re: How can I count the usage of mail function in scripts?

2005-10-18 Thread Greg Donald
On 10/18/05, Oliver Grätz <[EMAIL PROTECTED]> wrote: > Usually customers pay a fix fee for > some free traffic and then must pay for traffic exceeding those limits. > What they do with that traffic is none of your business. You've obviously never been a hosting provider. -- Greg Donald Zend Cert

[PHP] Re: No redirect with header()

2005-10-18 Thread Oliver Grätz
Snippets are bad ;-) Please post a full example that is _not_ working on your server. Perhaps this is no PHP problem at all. OLLi Byers: "What proof do you have?" Bond: "I got this!" Byers: "You're on the phone, Jimmy!" [Lone Gunmen 09] -- PHP General Mailing List (http://www.php.n

[PHP] Inserting NULL Integer Values

2005-10-18 Thread Shaun
Hi, Up to this point in time I used to construct my insert statements like this $qid = mysql_query('INSERT INTO MYTABLE ( column1, column2, ) VALUES ( "'.$value1.'",

[PHP] Re: How can I count the usage of mail function in scripts?

2005-10-18 Thread Oliver Grätz
One more point: If I were your customer and you'd deploy such restrictions, I would leave you. Usually customers pay a fix fee for some free traffic and then must pay for traffic exceeding those limits. What they do with that traffic is none of your business. There are a lot of companies sending o

[PHP] Re: How can I count the usage of mail function in scripts?

2005-10-18 Thread Oliver Grätz
Cristea Adrian schrieb: > Hello peoples! > > short question: How can I count the usage of mail function in scripts? > > long description :D > > I have a webserver, and I want to limit the usage of mail function for > each host I have there.. Notice that i have a couple of hundrest of > virtual h

Re: [PHP] re: some problems with php form

2005-10-18 Thread Minuk Choi
Seems like you're using some sort of a template or something. I am not familiar with this type, so I'm afraid I can't be of much help... but if i had to guess, it seems that you have to use {} instead of So try this : replace from the with this /* * Do all the logic BEFORE the form layou

Re: [PHP] re: some problems with php form

2005-10-18 Thread Bruce Gilbert
I think so Minuk. Here is the *entire* form code below. Maybe someone can also point out why the email regex validation code isn't working? TIA /begin PHP form code*/ About You * First Name: " id="firstname" name="firstname" ty

Re: [PHP] re: some problems with php form

2005-10-18 Thread Minuk Choi
Can you post your Contact_Form_test.php? " id="firstname" name="firstname" type="text" value=""> should parse into HTML by PHP. This block, I am assuming is placed in a HTML tag and not in a Minuk, your revisions gives me an error: *Parse error*: parse error, unexpected T_ENCAPSED_AND_WHITESP

Re: [PHP] fckeditor and PDF and pesky users

2005-10-18 Thread Jochem Maas
Richard Lynch wrote: On Mon, October 17, 2005 3:56 pm, Torgny Bjers wrote: Also, when using you are weeding out those old browsers that If somebody else wants to weed out old browsers, that's all fine and good, but that's not me... Besides, if this is for an editor interface, for a speci

Re: [PHP] re: some problems with php form

2005-10-18 Thread Bruce Gilbert
Minuk, your revisions gives me an error: *Parse error*: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in * /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php * on line *63* -Bru

Re: [PHP] Uploaded CSV -> database

2005-10-18 Thread Brian Dunning
Amazing - it works! The uploaded file is always stored in the temp directory, so that issue was kind of moot. Here's my complete code, if anyone else has this same need: if(isset($_FILES['userfile']['tmp_name'])) { $csvfile = fopen($_FILES['userfile']['tmp_name'], "r"); if($csvfile ==

RE: [PHP] Invoking a DLL with PHP

2005-10-18 Thread Jay Blanchard
[snip] [snip] You can build your own dll -or use that older dll as you say-, assuming it have exported the necessary functions and calling them using the php_w32api extension, just register necessary types, functions and you're ready to go, without any kind of recompilation of php or any dll s

RE: [PHP] Invoking a DLL with PHP

2005-10-18 Thread Jay Blanchard
[snip] You can build your own dll -or use that older dll as you say-, assuming it have exported the necessary functions and calling them using the php_w32api extension, just register necessary types, functions and you're ready to go, without any kind of recompilation of php or any dll static li

Re: [PHP] How can I count the usage of mail function in scripts?

2005-10-18 Thread Jochem Maas
Cristea Adrian wrote: Hello peoples! short question: How can I count the usage of mail function in scripts? question: what does this have to do with php? (I gather you probably have lots of users mailing via php but that doesn't mean that php should responsible for managing send quotas, and if

[PHP] php, expect and screen

2005-10-18 Thread Olivier Cant
Hi list, I'm wondering if any one has any experience at connecting to a screen session under linux with a PHP script, and reading the pty output (and maybe writing somme stuff as well) I have an interactive program runing under screen which give me some status info, and I may also issue c

[PHP] How can I count the usage of mail function in scripts?

2005-10-18 Thread Cristea Adrian
Hello peoples! short question: How can I count the usage of mail function in scripts? long description :D I have a webserver, and I want to limit the usage of mail function for each host I have there.. Notice that i have a couple of hundrest of virtual hosts (domains and subdomains) there, and i

[PHP] Re: Re: can't get IIS to run php if the script is not directly under wwwroot

2005-10-18 Thread tony yau
it was the doc_root that was casuing the problem thanks anyway "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, October 17, 2005 6:24 am, tony yau wrote: > > the security for my 'Project' folder (aliases 'phpproject' where > > test.php > > is under) has > > A

[PHP] PHP DOM XHTML - let me set my own javascript from code

2005-10-18 Thread Petr Smith
Hi, I have problem with PHP DOM extension. How can I add my own javascript to javascript tag? I tried it using this code $html = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n" . "\n" . "http://www.w3.org/1999/xhtml\"; xml:lang=\"en\" lang=\"en\">\n" . "\n" . "\n" .

Re: [PHP] Uploaded CSV -> database

2005-10-18 Thread Mark Rees
This discussion is starting to go over my head, but fgetscv works with uploaded files (in PHP5 anyway). Here's some sample code: if(isset($_FILES['userfile']['tmp_name'])){ $csvfile=fopen($_FILES['userfile']['tmp_name'],"rb"); if($csvfile==FALSE){die('error opening file');}; while(($aryData=fge