[PHP] PDF Generator
Hi, Can someone help me on how i could generate or create a pdf file an fill contents Rgds Krushna Kumar
[PHP] mySQL problem
I'm having a wierd problem with mySQL query. $Query = "SELECT UCASE(Company), Icons, ID, LogoD FROM feComps"; returns right amount of rows, but field Company is empty. $Query = "SELECT Company, Icons, ID, LogoD FROM feComps."; works fine. First query works great when I run it in shell. What could cause this? Niklas
Re: [PHP] year 2002 strtotime problem
I'm still running 4.0.5 because that is what my web host is running. Methinks there may be a problem here. In the meantime I've tried storing the dates in the array in the original format in lieu of the fully converted format. I then reformat the original from the array as required for each page display or time difference calculation. This works fine, so I might stick with it. In hindsight, it is probaly the way I should have gone in the first place as you pointed out. That way I can play with the date, month and year any way I want. Thanks for you input. John "Niklas lampén" <[EMAIL PROTECTED]> wrote in message 000401c1636f$fd37d960$ba93c5c3@Niklas">news:000401c1636f$fd37d960$ba93c5c3@Niklas... Great. :) I've got PHP 4.0.6 on linux. You? I think you should break the dates manually, it would be the most sure way to do it. Niklas -Original Message- From: John Clarke [mailto:[EMAIL PROTECTED]] Sent: 2. marraskuuta 2001 9:11 To: [EMAIL PROTECTED] Subject: Re: [PHP] year 2002 strtotime problem Even more funny... I cut and pasted your code and I got; Wed Dec 12 2001 Sat Mar 1 2003 2001-12-12 2001-03-01 What version of Php and OS are you using?? John "Niklas lampén" <[EMAIL PROTECTED]> wrote in message 000301c16369$6817a320$ba93c5c3@Niklas">news:000301c16369$6817a320$ba93c5c3@Niklas... > Funny, I quickly tried this: > > $date1 = "12/12/2001"; > $date2 = "15/01/2002"; > > $date1 = date("D M j Y", strtotime($date1)); > $date2 = date("D M j Y", strtotime($date2)); > > print $date1.""; > print $date2.""; > > print date("Y-m-d", strtotime($date1)).""; > print date("Y-m-d", strtotime($date2)).""; > ?> > > And the result was this: > " > Wed Dec 12 2001 > Sat Mar 1 2003 > 2001-12-12 > 2003-03-01 > " > > > Niklas > > > -Original Message- > From: John Clarke [mailto:[EMAIL PROTECTED]] > Sent: 2. marraskuuta 2001 8:17 > To: [EMAIL PROTECTED] > Subject: [PHP] year 2002 strtotime problem > > > I have this problem with Php 4.0.5 on both Win ME and Linus boxes, > where my year 2002 dates are converted back to 2001 when formating > with 'strtotime'. > > First I post the following variables from an html page to a php page > > $date1='12/12/2001' > $date2='15/01/2002' > > I then use date("D M j Y", strtotime($date1); and date("D M j Y", > strtotime($date2)); to store them in an array for screen display. > > As the users have the abilty to selected different dates I need to > check that 1 is before the other. To do this I have a script > timediff() that I pass the two dates to in the above format. > > All works fine until the year 2002 is selected. This is part of the > timediff() code with dispay statements and the result. > > function timediff($date1,$date2) { > >echo 'date1= '."$date1".' ';// displays 'Wed > December 12 > 2001' ... correct >echo 'date2= '."$date2".' '; // displays 'Tue > January 15 > 2002' ...correct, all fine so far > > $dd1=date("Ymd", strtotime($date1)); > $dd2=date("Ymd", strtotime($date2)); > >echo 'date1= '.$dd1.'';// displays '20011212' > ... > correct >echo 'date2= '.$dd2.' '; // displays '20010115 > ...WRONG > } > > It seem that by applying strtotime a 2nd time might cause this > problem, as the first application was fine. > > I have tested all possible combinations of strtotime but the year > 2002 always goes back to 2001 Have also tried just 'strtotime($date1)' > but same problem again. > > Any help or comments would be greatly appreciated as I thought I had > finished a booking program any now find this!! > > Thanks in anticipation > > > John Clarke > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] To > contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple array tutorial wanted
Hi Justin, That man page is pretty descriptive and contains many examples. It's sorta like a tutorial :) If there is information you (or anyone) feels is missing, please say so and it'll be looked into and perhaps added. Regards, Philip Olson On Fri, 2 Nov 2001, Justin French wrote: > U, I now how to use the manual, I was after a *tutorial*. > > Liz posted a VERY good link/tutorial though -- many thanks!!! > > Justin > > > > Jack Dempsey wrote: > > > > http://www.php.net/manual/en/language.types.array.php > > > > start with that > > > > -Original Message- > > From: Justin French [mailto:[EMAIL PROTECTED]] > > Sent: Friday, November 02, 2001 12:33 AM > > To: php > > Subject: [PHP] simple array tutorial wanted > > > > Hi all, > > > > I really want to get me head around arrays, becuase > > I KNOW there's a better way to do some of the stuff > > i'm doing right now. > > > > I could mess with stuff for a few hours and probably > > get it, but i'd rather have a decent tutorial if > > anyone knows of one... > > > > Thanks, > > > > Justin French > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] submitting form to a page with frames
Matt, It sounds like you have a process where the user does this: page1.php -> fills out and submits form -> page2.php which builds a frameset -> menu.php and editor.php as the frames, you want menu.php to know what the submitted form values were. If you've got sessions going cram them into the session, which would be the easiest probably. But if you don't, I'd suggest tacking the variables on the end of the menu.php url something like this: If the amnount of data is too large to do via a get (I can't remember how much it is, several K at least), you'll have to use some alternative method to pass them around, a temp file would work, or stuff them into a database and pull them out again (making sure to pass how to find them to menu.php). --Brent [EMAIL PROTECTED] -- www.spek.org On Thu, 2001-11-01 at 15:08, Matt Fair wrote: > I have 2 pages page1.php and page2.php. I want to submit the form and > its values to page2.php. page2.php has frames: > > > > > How can I get the variables that were submitted from page1.php into the > menuFrame? When I do this it doesn't get any php variables, but if I > take it out of the frame it works fine. > Thanks in advance, > Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] year 2002 strtotime problem
Great. :) I've got PHP 4.0.6 on linux. You? I think you should break the dates manually, it would be the most sure way to do it. Niklas -Original Message- From: John Clarke [mailto:[EMAIL PROTECTED]] Sent: 2. marraskuuta 2001 9:11 To: [EMAIL PROTECTED] Subject: Re: [PHP] year 2002 strtotime problem Even more funny... I cut and pasted your code and I got; Wed Dec 12 2001 Sat Mar 1 2003 2001-12-12 2001-03-01 What version of Php and OS are you using?? John "Niklas lampén" <[EMAIL PROTECTED]> wrote in message 000301c16369$6817a320$ba93c5c3@Niklas">news:000301c16369$6817a320$ba93c5c3@Niklas... > Funny, I quickly tried this: > > $date1 = "12/12/2001"; > $date2 = "15/01/2002"; > > $date1 = date("D M j Y", strtotime($date1)); > $date2 = date("D M j Y", strtotime($date2)); > > print $date1.""; > print $date2.""; > > print date("Y-m-d", strtotime($date1)).""; > print date("Y-m-d", strtotime($date2)).""; > ?> > > And the result was this: > " > Wed Dec 12 2001 > Sat Mar 1 2003 > 2001-12-12 > 2003-03-01 > " > > > Niklas > > > -Original Message- > From: John Clarke [mailto:[EMAIL PROTECTED]] > Sent: 2. marraskuuta 2001 8:17 > To: [EMAIL PROTECTED] > Subject: [PHP] year 2002 strtotime problem > > > I have this problem with Php 4.0.5 on both Win ME and Linus boxes, > where my year 2002 dates are converted back to 2001 when formating > with 'strtotime'. > > First I post the following variables from an html page to a php page > > $date1='12/12/2001' > $date2='15/01/2002' > > I then use date("D M j Y", strtotime($date1); and date("D M j Y", > strtotime($date2)); to store them in an array for screen display. > > As the users have the abilty to selected different dates I need to > check that 1 is before the other. To do this I have a script > timediff() that I pass the two dates to in the above format. > > All works fine until the year 2002 is selected. This is part of the > timediff() code with dispay statements and the result. > > function timediff($date1,$date2) { > >echo 'date1= '."$date1".' ';// displays 'Wed > December 12 > 2001' ... correct >echo 'date2= '."$date2".' '; // displays 'Tue > January 15 > 2002' ...correct, all fine so far > > $dd1=date("Ymd", strtotime($date1)); > $dd2=date("Ymd", strtotime($date2)); > >echo 'date1= '.$dd1.'';// displays '20011212' > ... > correct >echo 'date2= '.$dd2.' '; // displays '20010115 > ...WRONG > } > > It seem that by applying strtotime a 2nd time might cause this > problem, as the first application was fine. > > I have tested all possible combinations of strtotime but the year > 2002 always goes back to 2001 Have also tried just 'strtotime($date1)' > but same problem again. > > Any help or comments would be greatly appreciated as I thought I had > finished a booking program any now find this!! > > Thanks in anticipation > > > John Clarke > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] To > contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Fri, 2 Nov 2001 15:09, Adrian D'Costa wrote: > On Thu, 1 Nov 2001, Jason Murray wrote: > > > > You'll also need to compile php as a standalone, and put as > > > > the first line of your php script > > > > > > > > #!/path/to/php -q > > > > > > What if we need both version?? > > > > There's nothing stopping you running both. > > How do you compile it for both? > > Adrian To do the cgi compile, use all the configure values you need EXCEPT anything apache related. The compile will produce an executable called, strangely, php. I think there are a few lines in the docs about it somewhere in the compile section. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA "I think someone electrified the corridor," Tom said haltingly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sending email to php script
On Thu, 1 Nov 2001, Jason Murray wrote: > > > You'll also need to compile php as a standalone, and put as > > > the first line of your php script > > > > > > #!/path/to/php -q > > > > What if we need both version?? > > There's nothing stopping you running both. How do you compile it for both? Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] year 2002 strtotime problem
Even more funny... I cut and pasted your code and I got; Wed Dec 12 2001 Sat Mar 1 2003 2001-12-12 2001-03-01 What version of Php and OS are you using?? John "Niklas lampén" <[EMAIL PROTECTED]> wrote in message 000301c16369$6817a320$ba93c5c3@Niklas">news:000301c16369$6817a320$ba93c5c3@Niklas... > Funny, I quickly tried this: > > $date1 = "12/12/2001"; > $date2 = "15/01/2002"; > > $date1 = date("D M j Y", strtotime($date1)); > $date2 = date("D M j Y", strtotime($date2)); > > print $date1.""; > print $date2.""; > > print date("Y-m-d", strtotime($date1)).""; > print date("Y-m-d", strtotime($date2)).""; > ?> > > And the result was this: > " > Wed Dec 12 2001 > Sat Mar 1 2003 > 2001-12-12 > 2003-03-01 > " > > > Niklas > > > -Original Message- > From: John Clarke [mailto:[EMAIL PROTECTED]] > Sent: 2. marraskuuta 2001 8:17 > To: [EMAIL PROTECTED] > Subject: [PHP] year 2002 strtotime problem > > > I have this problem with Php 4.0.5 on both Win ME and Linus boxes, > where my year 2002 dates are converted back to 2001 when formating with > 'strtotime'. > > First I post the following variables from an html page to a php page > > $date1='12/12/2001' > $date2='15/01/2002' > > I then use date("D M j Y", strtotime($date1); and date("D M j Y", > strtotime($date2)); to store them in an array for screen display. > > As the users have the abilty to selected different dates I need to check > that 1 is before the other. To do this I have a script timediff() that I > pass the two dates to in the above format. > > All works fine until the year 2002 is selected. This is part of the > timediff() code with dispay statements and the result. > > function timediff($date1,$date2) { > >echo 'date1= '."$date1".' ';// displays 'Wed > December 12 > 2001' ... correct >echo 'date2= '."$date2".' '; // displays 'Tue > January 15 > 2002' ...correct, all fine so far > > $dd1=date("Ymd", strtotime($date1)); > $dd2=date("Ymd", strtotime($date2)); > >echo 'date1= '.$dd1.'';// displays '20011212' > ... > correct >echo 'date2= '.$dd2.' '; // displays '20010115 > ...WRONG > } > > It seem that by applying strtotime a 2nd time might cause this > problem, as the first application was fine. > > I have tested all possible combinations of strtotime but the year > 2002 always goes back to 2001 Have also tried just 'strtotime($date1)' > but same problem again. > > Any help or comments would be greatly appreciated as I thought I had > finished a booking program any now find this!! > > Thanks in anticipation > > > John Clarke > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] To > contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] year 2002 strtotime problem
Funny, I quickly tried this: "; print $date2.""; print date("Y-m-d", strtotime($date1)).""; print date("Y-m-d", strtotime($date2)).""; ?> And the result was this: " Wed Dec 12 2001 Sat Mar 1 2003 2001-12-12 2003-03-01 " Niklas -Original Message- From: John Clarke [mailto:[EMAIL PROTECTED]] Sent: 2. marraskuuta 2001 8:17 To: [EMAIL PROTECTED] Subject: [PHP] year 2002 strtotime problem I have this problem with Php 4.0.5 on both Win ME and Linus boxes, where my year 2002 dates are converted back to 2001 when formating with 'strtotime'. First I post the following variables from an html page to a php page $date1='12/12/2001' $date2='15/01/2002' I then use date("D M j Y", strtotime($date1); and date("D M j Y", strtotime($date2)); to store them in an array for screen display. As the users have the abilty to selected different dates I need to check that 1 is before the other. To do this I have a script timediff() that I pass the two dates to in the above format. All works fine until the year 2002 is selected. This is part of the timediff() code with dispay statements and the result. function timediff($date1,$date2) { echo 'date1= '."$date1".' ';// displays 'Wed December 12 2001' ... correct echo 'date2= '."$date2".' '; // displays 'Tue January 15 2002' ...correct, all fine so far $dd1=date("Ymd", strtotime($date1)); $dd2=date("Ymd", strtotime($date2)); echo 'date1= '.$dd1.'';// displays '20011212' ... correct echo 'date2= '.$dd2.' '; // displays '20010115 ...WRONG } It seem that by applying strtotime a 2nd time might cause this problem, as the first application was fine. I have tested all possible combinations of strtotime but the year 2002 always goes back to 2001 Have also tried just 'strtotime($date1)' but same problem again. Any help or comments would be greatly appreciated as I thought I had finished a booking program any now find this!! Thanks in anticipation John Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] year 2002 strtotime problem
I have this problem with Php 4.0.5 on both Win ME and Linus boxes, where my year 2002 dates are converted back to 2001 when formating with 'strtotime'. First I post the following variables from an html page to a php page $date1='12/12/2001' $date2='15/01/2002' I then use date("D M j Y", strtotime($date1); and date("D M j Y", strtotime($date2)); to store them in an array for screen display. As the users have the abilty to selected different dates I need to check that 1 is before the other. To do this I have a script timediff() that I pass the two dates to in the above format. All works fine until the year 2002 is selected. This is part of the timediff() code with dispay statements and the result. function timediff($date1,$date2) { echo 'date1= '."$date1".' ';// displays 'Wed December 12 2001' ... correct echo 'date2= '."$date2".' '; // displays 'Tue January 15 2002' ...correct, all fine so far $dd1=date("Ymd", strtotime($date1)); $dd2=date("Ymd", strtotime($date2)); echo 'date1= '.$dd1.'';// displays '20011212' ... correct echo 'date2= '.$dd2.' '; // displays '20010115 ...WRONG } It seem that by applying strtotime a 2nd time might cause this problem, as the first application was fine. I have tested all possible combinations of strtotime but the year 2002 always goes back to 2001 Have also tried just 'strtotime($date1)' but same problem again. Any help or comments would be greatly appreciated as I thought I had finished a booking program any now find this!! Thanks in anticipation John Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple array tutorial wanted
U, I now how to use the manual, I was after a *tutorial*. Liz posted a VERY good link/tutorial though -- many thanks!!! Justin Jack Dempsey wrote: > > http://www.php.net/manual/en/language.types.array.php > > start with that > > -Original Message- > From: Justin French [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 02, 2001 12:33 AM > To: php > Subject: [PHP] simple array tutorial wanted > > Hi all, > > I really want to get me head around arrays, becuase > I KNOW there's a better way to do some of the stuff > i'm doing right now. > > I could mess with stuff for a few hours and probably > get it, but i'd rather have a decent tutorial if > anyone knows of one... > > Thanks, > > Justin French > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uncertainties about MySQL commands
Regarding your mysql_insert_id() function: I believe that it works on a connection by connection basis. Therefore, if you execute an insert, and then call that function, you are guarenteed to have the correct ID. Look up the LAST_INSERT_ID() function in the MySQL manual on www.mysql.com for more information. -Jason Garber IonZoft.com At 09:22 PM 11/1/2001 +0100, TD - Sales International Holland B.V. wrote: >Hey list, i'm new to php so bare with me... > >got some questions on mysql commands. I'd like to know how the >mysql_insert_id() function works exactly. >First of all how reliable is it? What happens this happens: >Table: (ID int unsigned primary key auto_increment, Stuff text, MoreStuff >text) >(my script) >insert into table values(NULL, "bla", "bla") >(some other application) >insert into table values(NULL, "bleh", "bleh") >(my script) >$id = mysql_insert_id > >it's not likely that this will happen, but if the site is very/extremely >crowded it could be that there's an insert right after mine but before me >callind mysql_insert_id. As you might guess I'd like to know which ID will be >returned, the one my script created or the one from the other application? > >Also what happens if my table is like this: >Table: (Stuff text, ID int unsigned primary key auto_increment, OtherStuff >text) >Thus having the ID on column 2 instead of 1 >or like this >Table: (Bla int unsigned primary key auto_increment, Stuff text, Otherstuff >text) >Thus the ID not having the name ID >Or like this >Table: (bla int unsigned primary key auto_increment, id int unsigned primary >key auto_increment, stuff text, otherstuff text) >Thus having 2 auto_increment columns where the 2nd one is called ID (lower >case). > >I'm really uncertain about that and couldn't find it back in the manual >does it only read the first column? does this column have to be named ID, >what if ID is another column? what if there is more than 1 auto_increment >column in the table? what happens if some(one)/(thing) else inserts before >calling mysql_insert_id. > >One more question (pure curiosity this one) the return value from >mysql_query... is that ever gonna be higher than 1? I assume it can be if the >insert affects more than 1 line right? Also my book says that the return >value is TRUE or FALSE for every command except for an INSERT in which case >it would be 0 on failure and higher on succes. I think that's crap? I'm >guessing it will also return a number for UPDATE's and REPLACE's is that >correct? Are there others? > >OK just one more thing, this is for the people from troutworks if they're >monitoring this list. I think the translation of the PHP Bible is >crap! Please complain about it at the translator. The guy/girl >managed to translate (quotes) " to (comma's) , and there are a lot of other >wrongly translated things in there, luckily the examples in there got me on >the right path again over and over showing that the translation was incorrect >but it's just confusing like hell. The number of mistakes is unbelievable >(and i'm NOT talking about spelling errors, I'm talking about messy stuff >like calling quotes comma's) and I'm 100% certain it was NOT translated by a >programmer > >regards > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Can you AUTO "Post/Submit" on a mixed HTML/PHP form
Just a thought... Check out crescent internet toolkit by Progress Software. It has a control for VB that lets you post data to a script, rather than relying on an HTML form... Can you just use a query string? you may have to code your own urlencode() function in VB, but that may be an option. Maybe you can invoke cURL from vb. It's free, but I do not know if it has a Win32 version. Hope it helps. -Jason Garber IonZoft.com At 11:01 AM 11/1/2001 +, Arf wrote: >Like the "heredoc" thanx for that... > >The way that I am using VB will not support the VBscript option >unfortunately but a good suggestion. > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] simple array tutorial wanted
http://www.php.net/manual/en/language.types.array.php start with that -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:33 AM To: php Subject: [PHP] simple array tutorial wanted Hi all, I really want to get me head around arrays, becuase I KNOW there's a better way to do some of the stuff i'm doing right now. I could mess with stuff for a few hours and probably get it, but i'd rather have a decent tutorial if anyone knows of one... Thanks, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: simple array tutorial wanted
http://www.onlamp.com/pub/a/php/2001/06/07/php_foundations.html "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > I really want to get me head around arrays, becuase > I KNOW there's a better way to do some of the stuff > i'm doing right now. > > I could mess with stuff for a few hours and probably > get it, but i'd rather have a decent tutorial if > anyone knows of one... > > > Thanks, > > Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] simple array tutorial wanted
Hi all, I really want to get me head around arrays, becuase I KNOW there's a better way to do some of the stuff i'm doing right now. I could mess with stuff for a few hours and probably get it, but i'd rather have a decent tutorial if anyone knows of one... Thanks, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Binary file transfers
I am uploading .Jpegs and GIFS but they end up being all messed up when I try to view them after a file transfer. However, txt file transfers work ok. Someone told me this is because images need to be transfered as binary files, not ascii files (like txt). Is this true, and if so, how do I correct for this? Thanks. SOURCE CODE _ <% if ($Action == "Submit") { /* define and list important vars */ $Userfile = $HTTP_POST_FILES['Userfile']['name']; $Type = $HTTP_POST_FILES['Userfile']['type']; $Size = $HTTP_POST_FILES[Userfile][size]; $TempLoc = $HTTP_POST_FILES[Userfile][tmp_name]; $FinalLoc = "website_com/uploads/$Userfile"; echo " File: $Userfile | Type: $Type | Size: $Size | TempLoc: $TempLoc FinalLoc: $FinalLoc "; /* confirm file not too big and permitted type */ if ($Size > 20) $FileError = "File size greater than 200 kb."; if (($Type != "text/plain") && ($Type != "image/jpeg") && ($Type != "image/gif") && ($Type != "image/pjpeg")) $FileError = "File not correct type (txt, jpg, gif only)."; /* move file to final destination on server if no errors */ if (!$FileError) move_uploaded_file($TempLoc, $FinalLoc); } else { echo " Load page"; } if ($FileError) echo "FILE NOT ACCEPTED: $FileError"; %> PHP Send File Send me a file!!! Testing page 200 kbytes max. Text, Jpeg, and Gif's only. Send this file: <% echo "Browser and OS: $HTTP_USER_AGENT IP Addr: $REMOTE_ADDR"; %> View the upload directory to see if your file is there. View this page's full source code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: is there a commandline php.exe interpreter?
sure there is, get it at php.net goto download section and choose the cgi version. there you are. php.exe -- Chris Lee [EMAIL PROTECTED] "John A. Grant" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've installed ActivePerl, which gives me a way to run .pl files, > i.e. : > c:\> perl someprogram.pl > > Does the Win32 php installation give me a command-line > interpreter like that? > > Here's why I'm asking. I have a set of pages that I want to convert > to php, but I will also need to drop those pages onto a CD too. > I suppose I could view each page from the server and 'save as > HTML' locally, but I was thinking that I might be able to run a php > interpreter on the *.php pages and generate corresponding *.html > pages in batch mode as follows: > c:\> php index.php > index.html > c:\> php about.php > about.html > etc. > > Then I would have to run a batch search/replace program on the > *.html files to change all links to *.php pages to link to the > newly-generated *.html pages. > > Is there anything like that in the win32 install package or > just configure a web server? I started to install it, but it looked > like it was going to just install server stuff, so I cancelled it. > > -- > John A. Grant * I speak only for myself * (remove 'z' to reply) > Radiation Geophysics, Geological Survey of Canada, Ottawa > If you followup, please do NOT e-mail me a copy: I will read it here > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mysql & php prob...
put the mysql_db_query in an if() statement, more likley then not your select statement isnt returning any results. -- Chris Lee [EMAIL PROTECTED] "Sc" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi; > > i keep getting an error of: Warning: Supplied argument is not a valid MySQL > result resource in /datascripts/insertdata.php on line 17... > > Line 17 is: $row = mysql_fetch_assoc($test); > > and here is the rest of it (not all of it though): > > for ($p = 1; $p <= 24; $p++) { > $test = mysql_db_query("melbourne", "SELECT * FROM 'Port$p' WHERE > 'Port$p'.date='$yesterday'"); > $row = mysql_fetch_assoc ($test); > $yindata = $row['switchin']; > $youtdata = $row['switchout']; > $dinPort = '$inPort$p' - $yindata; > $doutPort = '$outPort$p' - $youtdata; > > Can anyone help me overcome this prob? i've prob missed something without > thinking but i cant seem to get it... > > Thx. > > sc > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: date problem
date() shoudl give you the time in your timezone, gmdate() should give you the time in the GMT timezone. I would check your server and make sure the timezone is correctly set. -- Chris Lee [EMAIL PROTECTED] "Steve Tsai" <[EMAIL PROTECTED]> wrote in message news:none... > For reference: > OS: OpenBSD 2.9 > Web Server: Apache1.3.19 > PHP Version: 4.0.6 > > My problem is that date() and all the other time functions return GMT instead > of localtime. system("date") returns the correct localtime. Those functions > used to return localtime since GMT. The problem seems to have started after > daylight savings time changed. I hope someone has an idea of what's wrong > and how to fix it. As for now, I'm adding time() - 3600 * 8 to all my > scripts right now. > > Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Distributed Data Base
I dont worry about it. why are you? -- Chris Lee [EMAIL PROTECTED] "Luis Corea" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > I want to Know how can I save information on a Data Bse that will be access > for many persons at the same time. > > I use Postgressql > > Thanks. > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Secure transfer
you dont need any unctions in php todo this. you need to install openssl and compile it into apache. port 80 = http (non-secure) port 443 = https (secure) http://www.somesite.com/index.php unsecure https://www.somesite.com/index.php same page, now everything is secure have fun. -- Chris Lee [EMAIL PROTECTED] "Orv î?÷inklÏ ²ørÏkîskî" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi php'ers > >I'm about to build a site that allows payment with credit card. >Of cause the card number, expiration date etc. should be secured >when transfered. How do I do that? >I've been looking at the OpenSSL functions in php, but they seem to >be unsatisfying. > > Kind regards, > Morten Winkler > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Destroying Ssessions
Actually I have had a couple people respond about the code order that I wrote, so I am going to try and see if that works. You're right I do store the username/passwd in the session, and I do encrypt both the session password and the database password. I am trying to make this very secure :) You cannot decrypt them either which is nice. I just don't like having a session file there for longer then it has to be. I do know about php's garbage collecting so I don't have to worry about that.. I think the problem is more the second choice you gave me :) I like cleanliness, since I am a designer gone coder, it needs to look good :) Everything works beautifully though and it doesnt matter all that much if I have to wait until the garbage collector comes by, but when a function doesnt do what it's supposed to do.. I try to find out why.. and if it's me that's screwing up or something else.. Thanks for your reply and I AM going to get this to work! *grin* Rick > destroying session vars never worked for me either. it hasnt for quite some > time. now why its important you destoy them other then cleanup, I dont know > your reasons. Im going to guess. > > - you store username/passwd in sessions and because httpd runs as nobody, > anyone on the server can read them. ans: chroot telnet, telnet, ftp, it > should be done anyhow. dont store passwd's in plain text, encypt them and > compare the encryped passwd to the storeed encrypted passwd on the server, > if correct, great. you should do it this way anyhow. > - your finatical about cleanlyness and code perfect. ans: so am I. I rip > hair out and call it a day. dont stress it. > - you think you *have* to do this just to get sessions working: ans: wrong > - you think these files will stay on the server forever and fill your HD. > ans: wrong, check php.ini for session_gc (garbage collection) > > email me any questions. > > -- > > Chris Lee > [EMAIL PROTECTED] > > > > "Richard Baskett" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Unusual that I didnt even get one response, so I shall try again! :) >> >> Ok why does this not work? >> >> session_name(adminid); >> session_start(); >> unset($sess); >> session_unset(); >> session_destroy(); >> session_write_close(); >> $sess = 0; >> >> etc etc etc etc etc etc.. >> >> After all that is executed I take a look at the session file and what do I >> see? All the session variables still there... and the file still there >> also! How can I get rid of them? >> >> Rick >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Crating program for access parallel
why? if your thinking the db may give the wrong answer, postgres does a bery good job of this. if your super worried, well use mysql, they lock the table when a field is being inserted, updated, or deleted. if you want todo this for some other strange reason, do it the easy way. -- Chris Lee [EMAIL PROTECTED] "Luz Lopez" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all > > I am creating a program PHP that will be access int the web for many > persons, this aplication will be permit to insert registry on a data base > Postgresql, When a person this inserting a registry I need to block that > table so that another user cannot to access the data base. Exists some form > in php to do this? > > I want to Know how can I save information on a Data Bse that will > be access > for many persons at the same time. > > Thanks in advanced for yuor advices !!! > > Regards, > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: print on printer
javascript javascript = client side php = server side unless you want to print on a printer on the server, your goign to need to use javascript. not only are you asking in the wrong forum, real answer is 'I dont know' sorry cant help ya bud. -- Chris Lee [EMAIL PROTECTED] "Luz Lopez" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi All > > I have a php that access to database and show the values in the browser, But > I need add hte option of print on printer, but that only print the table > with values. > > Somebody can help me? > > Thanks in Advanced, > > Regards, > > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Is there a way not to pop up the default login window?
if your using mod_auth then mod_auth will be called not mod_php. if you want mod_php to be called, dont use .htaccess (they are apart of mod_auth). sorry... -- Chris Lee [EMAIL PROTECTED] "Zhu George-Czz010" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? > > Thanks ahead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Destroying Ssessions
destroying session vars never worked for me either. it hasnt for quite some time. now why its important you destoy them other then cleanup, I dont know your reasons. Im going to guess. - you store username/passwd in sessions and because httpd runs as nobody, anyone on the server can read them. ans: chroot telnet, telnet, ftp, it should be done anyhow. dont store passwd's in plain text, encypt them and compare the encryped passwd to the storeed encrypted passwd on the server, if correct, great. you should do it this way anyhow. - your finatical about cleanlyness and code perfect. ans: so am I. I rip hair out and call it a day. dont stress it. - you think you *have* to do this just to get sessions working: ans: wrong - you think these files will stay on the server forever and fill your HD. ans: wrong, check php.ini for session_gc (garbage collection) email me any questions. -- Chris Lee [EMAIL PROTECTED] "Richard Baskett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Unusual that I didnt even get one response, so I shall try again! :) > > Ok why does this not work? > > session_name(adminid); > session_start(); > unset($sess); > session_unset(); > session_destroy(); > session_write_close(); > $sess = 0; > > etc etc etc etc etc etc.. > > After all that is executed I take a look at the session file and what do I > see? All the session variables still there... and the file still there > also! How can I get rid of them? > > Rick > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Strange include
this '/' method looks kinda neet, but some vars get messed, ie $PHP_SELF, just be carefull using it. Chris Lee [EMAIL PROTECTED] "OòkóöårzòËèkó" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sveiki, php-general, > > I have a file index.php . I include file menu.php in index.php ( I > write include('menu.php'); in index.php ) . I want to do like this: > > index.php/menu.php . That means, that index.php has to include menu.php > > index.php/second.php . That means, that index.php has to include > second.php . > > I think that you already know what I'm talkking about. So how could > I do it? > > Thank you > > > > > 2001.11.02, penktadienis > Marius Pertravèius > iCQ: #125733984 > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Problem with non us caracters and "strtr"
Rodrigo Peres wrote: > Hi list, > > I'm in a big trouble. I'm brazilian, so I've made a script to clean up the > special caracters from our language in order to not mess up my publisher, > but this script don't work in Macintosh (macos 9.1, IE 5, all in american > english). > > This is my code > > > function myclean(&$name) { > $name = strtolower(strtr($name, > "áéíóúàèìòùäëïöüâêîôûãçÁÉÍÓÚÀÈÌÒÙÄËÏÖÜÂÊÎÔÛÃÇ ", > "aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC")); > return $name; > } > $temp = myclean($name_actor); > echo($temp); > ?> > > What happens is if i try for example to clean up "São Paulo" it prints "são > paulo". Why?? > The "$name" will receive a string form a text field in a form. my html > charset is iso-8859-1 I think you are better to use recode extension for this. Check out recode manual page. -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini? - FORGET IT!
Sorry! I had a senior moment.! I have it. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite "Meir Kriheli" <[EMAIL PROTECTED]> wrote in message 20011101233857.HRNC958.fep2@there">news:20011101233857.HRNC958.fep2@there... > On Friday 02 November 2001 01:16, Gaylen Fraley wrote: > > Ok. I've installed php on linux and all is well! Been running for weeks > > now. Problem is, I never had to set up my php.ini . Got curious and am > > wondering where it is. Locate php.ini yields one in the pear/tests > > directory, but that's not it. Suggestions? > > If you don't have one, PHP will use defaults. In PHP's source directory > there's a file called php.ini-dist (or something similar) you can copy it to > where PHP expects to find it and rename it to php.ini. > > To find out where you should copy it create a php file containing phpinfo() > in it and access it with your browser. Examine the output to see where the > ini is expected (you can define this while running configure during the build > process) > > -- > Meir Kriheli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Destroying Ssessions
session_destroy() works fine for me - it deletes the session file after the script finishes. I have never used the session_name() function. I am wondering if it is possible that the server is confused about what session needs to be destroyed because of the way session_name() is being used here I am also curious about the session_write_close() call. What is left to write after the session_unset() call? Sorry I can't give you anything more specific. Kirk > -Original Message- > From: Richard Baskett [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 4:03 PM > To: PHP General > Subject: [PHP] Destroying Ssessions > > > Unusual that I didnt even get one response, so I shall try again! :) > > Ok why does this not work? > > session_name(adminid); > session_start(); > unset($sess); > session_unset(); > session_destroy(); > session_write_close(); > $sess = 0; > > etc etc etc etc etc etc.. > > After all that is executed I take a look at the session file > and what do I > see? All the session variables still there... and the file > still there > also! How can I get rid of them? > > Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini?
7.2 and I compiled PHP 4.0.6 myself. When I run phpinfo, it shows the configuration file path = /usr/local/lib/php.ini . there is no php.ini in the file. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite "Jim Lucas" <[EMAIL PROTECTED]> wrote in message 00bc01c1632b$b84bbf40$[EMAIL PROTECTED]">news:00bc01c1632b$b84bbf40$[EMAIL PROTECTED]... > most of my installs, Redhat linux 7.0 and 7.1, have placed the php.ini file > in the /etc/php.ini location. what version of linux are you using? > > Jim > - Original Message - > From: "Gaylen Fraley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, November 01, 2001 3:16 PM > Subject: [PHP] Where is my php.ini? > > > > Ok. I've installed php on linux and all is well! Been running for weeks > > now. Problem is, I never had to set up my php.ini . Got curious and am > > wondering where it is. Locate php.ini yields one in the pear/tests > > directory, but that's not it. Suggestions? > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > Home http://www.gaylenandmargie.com > > PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini?
On Friday 02 November 2001 01:16, Gaylen Fraley wrote: > Ok. I've installed php on linux and all is well! Been running for weeks > now. Problem is, I never had to set up my php.ini . Got curious and am > wondering where it is. Locate php.ini yields one in the pear/tests > directory, but that's not it. Suggestions? If you don't have one, PHP will use defaults. In PHP's source directory there's a file called php.ini-dist (or something similar) you can copy it to where PHP expects to find it and rename it to php.ini. To find out where you should copy it create a php file containing phpinfo() in it and access it with your browser. Examine the output to see where the ini is expected (you can define this while running configure during the build process) -- Meir Kriheli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] submitting form to a page with frames
The simplest way is to use sessions to hold the values, or you can loop through the post vars and add them to the menu.php line like src=menu.php?var1=&var2=xxx... which will get messy if you have a lot of fields. Tom At 09:08 AM 2/11/01, Matt Fair wrote: >I have 2 pages page1.php and page2.php. I want to submit the form and its >values to page2.php. page2.php has frames: > > > > >How can I get the variables that were submitted from page1.php into the >menuFrame? When I do this it doesn't get any php variables, but if I take >it out of the frame it works fine. >Thanks in advance, >Matt > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Strange include
Sveiki, php-general, I have a file index.php . I include file menu.php in index.php ( I write include('menu.php'); in index.php ) . I want to do like this: index.php/menu.php . That means, that index.php has to include menu.php index.php/second.php . That means, that index.php has to include second.php . I think that you already know what I'm talkking about. So how could I do it? Thank you 2001.11.02, penktadienis Marius Pertravèius iCQ: #125733984 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini?
most of my installs, Redhat linux 7.0 and 7.1, have placed the php.ini file in the /etc/php.ini location. what version of linux are you using? Jim - Original Message - From: "Gaylen Fraley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 01, 2001 3:16 PM Subject: [PHP] Where is my php.ini? > Ok. I've installed php on linux and all is well! Been running for weeks > now. Problem is, I never had to set up my php.ini . Got curious and am > wondering where it is. Locate php.ini yields one in the pear/tests > directory, but that's not it. Suggestions? > > -- > Gaylen > [EMAIL PROTECTED] > Home http://www.gaylenandmargie.com > PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Where is my php.ini?
Ok. I've installed php on linux and all is well! Been running for weeks now. Problem is, I never had to set up my php.ini . Got curious and am wondering where it is. Locate php.ini yields one in the pear/tests directory, but that's not it. Suggestions? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] submitting form to a page with frames
try using the $GLOBALS[variable_name] array. Jim - Original Message - From: "Matt Fair" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 01, 2001 3:08 PM Subject: [PHP] submitting form to a page with frames > I have 2 pages page1.php and page2.php. I want to submit the form and > its values to page2.php. page2.php has frames: > > > > > How can I get the variables that were submitted from page1.php into the > menuFrame? When I do this it doesn't get any php variables, but if I > take it out of the frame it works fine. > Thanks in advance, > Matt > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] submitting form to a page with frames
I have 2 pages page1.php and page2.php. I want to submit the form and its values to page2.php. page2.php has frames: How can I get the variables that were submitted from page1.php into the menuFrame? When I do this it doesn't get any php variables, but if I take it out of the frame it works fine. Thanks in advance, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Destroying Ssessions
Unusual that I didnt even get one response, so I shall try again! :) Ok why does this not work? session_name(adminid); session_start(); unset($sess); session_unset(); session_destroy(); session_write_close(); $sess = 0; etc etc etc etc etc etc.. After all that is executed I take a look at the session file and what do I see? All the session variables still there... and the file still there also! How can I get rid of them? Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Utility script: dates
Somewhere on my travels around the many PHP/script sites, I'm sure that at one time I noticed a date-display utility. I cannot find it again. Please would someone point the way... What I'm looking for: displays a form with a variety of date/time fields, user enters a date/time into various fields - utility returns with equivalent values/formats, eg timestamp to calendar, local to GMT, date to day of week, etc. Please advise, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail() extra headers not working
> I am trying to ad extra headers to email's I am sending through php. I > want to ad Reply-To: and Bounse-To: addresses. But when add them useing > the forth feild of the mail() funtion. > mail($recipient,$msubject,$message,"Reply-To: $sender"); > but for some reason when I send this e-mail it puts a newline befor this > header so it becomes part of the message not the headers. Any ideas on > what to do?? Byron, I had the same problem. Gave up! I recommend that you check out Richard Heyes' MIME and SMTP classes available from http://www.phpguru.org/. Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Question about MySQL, ORDER
SELECT Main.title, Replies.date FROM (Main LEFT JOIN Replies ON Main.id = Replies.main_id) ORDER BY Replies.date That should do it. Mike BlueBytes wrote: >http://paa.fragland.net/hosted/myquestion/ > >here you find my question, thx > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Help with an error I can't find!
Sounds like $HTTP_POST_VARS is not a valid array (to check do if(is_array($HTTP_POST_VARS)) { print "YUP"; } else { print "NOPE"; }) Check to make sure that track_vars is turned on in the PHP.ini. "Lic. Carlos A. Triana Torres" <[EMAIL PROTECTED]> wrote in message 005901c16324$1cf252e0$0301a8c0@RED">news:005901c16324$1cf252e0$0301a8c0@RED... > Can some one help fix this error? > > Warning: Variable passed to each() is not an array or object in > /usr/local/.test.php on line 14 > > Here is the line: > > while(list ($key, $mid) = each ($HTTP_POST_VARS)) { > > -- > Lic. Carlos A. Triana Torres. > Webmaster. Centro de Informacion y Gestion Tecnologica > Sancti Spiritus > Email: [EMAIL PROTECTED] > Tel: (53-41) 2 3956 > http://www.magon.cu > HamRadio: CO6TB > Locator: FL01GW > ICQ#: 137085816 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question about MySQL, ORDER
http://paa.fragland.net/hosted/myquestion/ here you find my question, thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Extensions problem
> I have mssql extensions working with the .dll in the extensions > directory of my PHP4 folder. > > I am trying to get curl to work but when I try to run php it says that > php_curl.dll was not found, But it is in the same dir as the mssql and > mssql is working great. I've never used curl, but I assume that there are some libraries you need to download and install. - Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Extensions problem
Hello, I have mssql extensions working with the .dll in the extensions directory of my PHP4 folder. I am trying to get curl to work but when I try to run php it says that php_curl.dll was not found, But it is in the same dir as the mssql and mssql is working great. Any IDEAS? Thanks Brandon
RE: [PHP] Help with an error I can't find!
> -Original Message- > From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 4:25 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Help with an error I can't find! > > > Can some one help fix this error? > > Warning: Variable passed to each() is not an array or object in > /usr/local/.test.php on line 14 > > Here is the line: > > while(list ($key, $mid) = each ($HTTP_POST_VARS)) { Is that line inside a function? If so, have a look through http://php.net/manual/en/language.variables.scope.php for information on how to access global-scope variables from inside a function. --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA| -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] email of listowner?
hi, i know it is very ungrateful but i am trying to stop my subscription to this list. I cannot confirm the unsubscribe because my ISP changes my email on the go and so the confirmation mail is not accepted, even if i try to mess with the sender address. The php-general-owner@ does not seem to be read. Reactions please without [PHP] in the subject to myself. thanks, Chris - --- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- - --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help with an error I can't find!
Can some one help fix this error? Warning: Variable passed to each() is not an array or object in /usr/local/.test.php on line 14 Here is the line: while(list ($key, $mid) = each ($HTTP_POST_VARS)) { -- Lic. Carlos A. Triana Torres. Webmaster. Centro de Informacion y Gestion Tecnologica Sancti Spiritus Email: [EMAIL PROTECTED] Tel: (53-41) 2 3956 http://www.magon.cu HamRadio: CO6TB Locator: FL01GW ICQ#: 137085816 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with non us caracters and "strtr"
Hi list, I'm in a big trouble. I'm brazilian, so I've made a script to clean up the special caracters from our language in order to not mess up my publisher, but this script don't work in Macintosh (macos 9.1, IE 5, all in american english). This is my code What happens is if i try for example to clean up "São Paulo" it prints "são paulo". Why?? The "$name" will receive a string form a text field in a form. my html charset is iso-8859-1 Thank's in advance Rodrigo Peres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail() extra headers not working
Hello, I am trying to ad extra headers to email's I am sending through php. I want to ad Reply-To: and Bounse-To: addresses. But when add them useing the forth feild of the mail() funtion. mail($recipient,$msubject,$message,"Reply-To: $sender"); but for some reason when I send this e-mail it puts a newline befor this header so it becomes part of the message not the headers. Any ideas on what to do?? Byron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Announcement: Smarty template engine 1.4.6 released
Homepage: http://www.phpinsider.com/php/code/Smarty/ Version 1.4.6 - - fixed bug with {assign ...} when passing an empty value. (Monte) - add more warning message fixes. (Monte, Tara Johnson) - documentation updates. (Monte) - update fetch function to give proper warning when fetching a non-readable or non-existant file. (Monte) - fixed problem with newline at the end of included templates (Monte, Andrei) - added feature to regenerate cache if compile_check is enabled and an involved template or config file gets modified. (Monte) - added DEBUG execution times to included files: REQUIRES updated debug.tpl file! (Monte) - added support for hidden config variables that cannot be read by templates. (Andrei) - added execution time to DEBUG console, total and inserts. (Monte) - fixed bug where DEBUG console would not appear with cached content. (Monte) - added support for postfilter functions that are applied to compiled template right after compilation. (Andrei) - fixed the name of clear_compile_tpl() API function to clear_compiled_tpl. (Andrei) - added fix for removing comments so that the line numbers are reported correctly in case of errors. (patch from Anders Janson) - made html_options output xhtml compatible code. (Monte, Arnaud Limbourg) -- Monte Ohrt <[EMAIL PROTECTED]> http://www.ispi.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Weekly reporting. How to?
[EMAIL PROTECTED] (Kraa De Simon) wrote: > Hello, > > I want to send a weekly report to a mailinglist. > > I would like to automate the process and use a cron job to execute 'php.exe > weekly.php' or something. > > I could gather the information, put it in a string and pass the string to > mail(). > > But...is it also possible to "grab" the html output of a .php file already > used in the application (some report) and e-mail it to someone? yeah fopen can open files over http also allowing you to get the output of a script and put it in a string. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: include("remote host") under w2k problem
Probably a permissions problem. Can't open a file if you don't have permission to do so. Mike "Marek Wysmulek" <[EMAIL PROTECTED]> wrote in message 03b201c16308$6b6d54e0$0201a8c0@dom">news:03b201c16308$6b6d54e0$0201a8c0@dom... > Hi all. > > I have searched almost everything on the net regarding php and windows > focusing on one thing. > How to include to php script started on apache on w2k external sript placed > on some URL. > Source of test script (http://mylocalhost/marek.php) > include("http://hermes.com.pl/test.php";); > ?> > > and answer viewed in browser > > "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion > (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" > > I know that parser sayes that include_path is not correctly set but, when > I'm trying do the same under Linux - works perfectly. So (I'm sure -because > Include_path has other adaptation) it is not the reason. > > Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) > > Marek. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Weekly reporting. How to?
Hello, I want to send a weekly report to a mailinglist. I would like to automate the process and use a cron job to execute 'php.exe weekly.php' or something. I could gather the information, put it in a string and pass the string to mail(). But...is it also possible to "grab" the html output of a .php file already used in the application (some report) and e-mail it to someone? Any ideas? Met vriendelijke groet / With kind regards, ICL Nederland B.V. Simon de Kraa e-Applications / Logistic Systems Systems Architect Het Kwadrant 1 Tel. +31 346 598865 Postbus 4000Fax +31 346 562703 3600 KA MAARSSEN The Netherlands mailto:[EMAIL PROTECTED] --- Progress 9.1c, Roundtable 9.1c, NuSphere Pro Advantage 2.3.1 @ MS Windows 2000 5.00.2195 SP 2 Progress 9.1b @ SCO UnixWare 7.1.1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Some facts about MsSQL/ODBC
Valentin, first, let us know exactly how you tested. second, i think it may have to do with the way the direct extension is written. the direct extension does batch fetches every time it does a physical read of the database. if all you're trying to get is a value from the first row in a multi-row result set, then it makes sense that this would be slower than a driver that does only single row fetches. Valentin V. Petruchek <[EMAIL PROTECTED]> wrote in message 031801c162fa$d09bebf0$[EMAIL PROTECTED]">news:031801c162fa$d09bebf0$[EMAIL PROTECTED]... > Hello everyone! > Here i'm not going to ask community about smth. > I would like to present results of one test speed. > > i perform the same query to MsSQL directly (using mssql_...) and through > ODBC (odbc_...) > In first case (direct connection) php works SLOWER than through ODBC. > > My server is on NT 5.1. > > Can anyone explain me why ODBC is faster than direct connection? > > Thnx, Valentin > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Text Editor with Highlighting
Check out UltraEdit for Windows it's great. Text highlighting for around 10 programming languages, auto-tabbing for brackets, all kinda things. www.ultraedit.com it's even got built in FTP functions so you can open a file from a server, and when you save it automatically uploads. great proggie :) -- Jason Wood Chief Technology Officer Expressive Tek, Inc. 407 Kehrs Mill Road Ballwin, MO 63011 Phone 636.256.1362 www.expressivetek.com "Td - Sales International Holland B.V." <[EMAIL PROTECTED]> wrote in message 01110122020108.00569@linux-testbank">news:01110122020108.00569@linux-testbank... > Hey there, > > I looked on the site for this but couldn't find anything about it. I'd like a > list of your favorite text editors (preferable for Linux/XFree) with > highlighting. I'm using beaver now, I tried cooledit but it's not me... too > much functions and looks like it came from an old 386 :-). I have kde 2.1.2 > which has kwrite, but it's kwrite does not yet support PHP, kde 2.2.1 does > but i don't wanna download the entire kde package. Besides i think it's still > in development I tried in on my laptop at home but it just makes things bold > instead of all kinds of different colors. also beaver colors for in plain > html and has some problems with correctly indentifying /* */ comments if you > use more of em. i'm also interested in windows though and i think more people > are interested so maybe somebody of the site might also want to keep track of > the list so it can be put online > > regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include("remote host") under w2k problem
Hi all. I have searched almost everything on the net regarding php and windows focusing on one thing. How to include to php script started on apache on w2k external sript placed on some URL. Source of test script (http://mylocalhost/marek.php) http://hermes.com.pl/test.php"); ?> and answer viewed in browser "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" I know that parser sayes that include_path is not correctly set but, when I'm trying do the same under Linux - works perfectly. So (I'm sure -because Include_path has other adaptation) it is not the reason. Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) Marek. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there a way not to pop up the default login window?
if (!isset ($PHP_AUTH_USER)) { header ("Location: http://mydomain.com/mypage";); } would probably do the trick Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:51 To: Jon Haworth; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Thanks for the suggestion. I think I didn't explain it clearly, what I really want to do is: whenever someone types any of the secured URL (it might be any secured php page or other files), how can we configure the server to automatically redirect to a customized PHP login page instead of popping up the default login window? Regards. -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 11:36 AM To: 'Zhu George-CZZ010'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Text Editor with Highlighting
I use Nedit, which for me works well. It's no (x)emacs, but it also doesn't have a vertical learning "curve", you can easily just start working in it with little chance of shooting your foot clean off. It's got syntax highlighting for PHP and other languages, it's small-ish (doesn't take 30 seconds to load off disk), fast, unlimited undo (woo!), brace/paren flashing, free (GPL'd), stable (I'll typicaly have it open for weeks if not months at a time). http://www.nedit.org --Brent [EMAIL PROTECTED] - www.spek.org TD - Sales International Holland B.V. wrote: > I looked on the site for this but couldn't find anything about it. I'd like a > list of your favorite text editors (preferable for Linux/XFree) with > highlighting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there a way not to pop up the default login window?
Thanks for the suggestion. I think I didn't explain it clearly, what I really want to do is: whenever someone types any of the secured URL (it might be any secured php page or other files), how can we configure the server to automatically redirect to a customized PHP login page instead of popping up the default login window? Regards. -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 11:36 AM To: 'Zhu George-CZZ010'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there a way not to pop up the default login window?
Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Some facts about MsSQL/ODBC
Hello everyone! Here i'm not going to ask community about smth. I would like to present results of one test speed. i perform the same query to MsSQL directly (using mssql_...) and through ODBC (odbc_...) In first case (direct connection) php works SLOWER than through ODBC. My server is on NT 5.1. Can anyone explain me why ODBC is faster than direct connection? Thnx, Valentin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is there a way not to pop up the default login window?
If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-WIN] 4.0.6 mssql.dll Extension load failure
Mike, > We have PHP installed as an ISAP module on our W2K IIS5 server and > its operational with no problems - phpinfo() runs just fine. > > But - When I uncomment the php_mssql.dll extension in php.ini I get an error > when PHP starts up saying it cannot find the .dll file. > > The extension directory is correctly set to, c:\php\extensions > and the actual file itself is in that directory as wells as > c:\winnt\system32 and MSSQL client libraries are loaded and operational. I found that PHP was adding the slash between the dir name and the extension's filename, and that caused a problem such as you have described - so did adding a slash as the final character. Here is the code that works on my WinNT4.0/Apache set up (watch the dir diff): extension_dir = C:/program files/php/extensions > Cant think of anything else I need to do - does the .dll file need > be registered with regsrvr or something ?? =no > Can anybody give me some pointers please this problem is driving me nuts - > I even tried reversing the slashes to the UNIX way ! =um, don't like the sound of that... =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Text Editor with Highlighting
Check the list archives, this topic gets covered almost weekly. But, for Linux (and various others): - Visual SlickEdit is awesome, but commercial (the cost is absolutely worth it, I'm extremely satisfied). It has function name completion, parameter completion (for PHP and many other langs), and just a ton of other features. Runs on Linux, FreeBSD, Windows, and many others. - Emacs as mentioned. - vim/gvim (this would be my second choice, vim and it's graphical version gvim do nice PHP syntax highlighting). Runs on probably every platform I can think of. - ActiveState Komodo (Linux and Windows). This is an IDE for PHP, Perl, Python, and more. Has a debugger, etc. - Glimmer and NEdit probably have PHP highlighting, but I'm not sure. -Original Message- From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 1:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Text Editor with Highlighting Hey there, I looked on the site for this but couldn't find anything about it. I'd like a list of your favorite text editors (preferable for Linux/XFree) with highlighting. I'm using beaver now, I tried cooledit but it's not me... too much functions and looks like it came from an old 386 :-). I have kde 2.1.2 which has kwrite, but it's kwrite does not yet support PHP, kde 2.2.1 does but i don't wanna download the entire kde package. Besides i think it's still in development I tried in on my laptop at home but it just makes things bold instead of all kinds of different colors. also beaver colors for in plain html and has some problems with correctly indentifying /* */ comments if you use more of em. i'm also interested in windows though and i think more people are interested so maybe somebody of the site might also want to keep track of the list so it can be put online regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem with fopen() when php is in safe_mode
> -Original Message- > From: Daniel Bergqvist [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 9:57 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Problem with fopen() when php is in safe_mode > > > if($dir = @opendir("/home/d5051/public_html/test")){ You're getting filenames from /home/d5051/public_html/test >$fd = fopen($file,"r"); > [snip] > > Warning: fopen("testar.txt","r") - No such file or directory in > /home/d5051/public_html/mail.php on line 17 But your script is apparently running in /home/d5051/public_html And trying to open the file in that same directory. Try changing the fopen line to $fd = fopen("test/$file","r"); Or $fd = fopen("/home/d5051/public_html/test/$file","r"); --- Mark Roedel | "The most overlooked advantage to owning a Systems Programmer| computer is that if they foul up there's no LeTourneau University | law against whacking them around a little." Longview, Texas, USA | -- Owen Porterfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with fopen() when php is in safe_mode
Hi! I'm having trouble with a script who should attach files to a mail. The script looks like this: from = $email; $mail -> to = $to_email; $mail -> subject = "Testing"; $mail -> body = "Testing"; if($dir = @opendir("/home/d5051/public_html/test")){ while ($file = readdir($dir)) { $content_type = "text/txt"; if ($file != "." && $file != ".."){ $fd = fopen($file,"r"); $data = fread($fd,filesize($file)); fclose($fd); $mail->add_attachement($data,$file,$content_type); } } closedir($dir); } $mail->send(); ?> And a get error messages like thoose below: Warning: Unable to access testar.txt in /home/d5051/public_html/mail.php on line 17 Warning: fopen("testar.txt","r") - No such file or directory in /home/d5051/public_html/mail.php on line 17 I know that the path to the file is correct and the file is set to -rwxrwxrwx. Also my ISP is running php in safe_mode Anyone who has any idea what might be wrong?? Cheers /daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Where are lists of PHP's predefined constants and keywords?
Thank you Jim, Mike, CC and Philip. Geez! I thought I did a search, but maybe I imagined that... LOL Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP4, NT Workstation, Xitami issue...
Hey All! I hit a snag yesterday on something I've done a million times before. Perhaps one of you might be able to lend a hand. Situation: I use a Dell Latitude laptop for development. It's got pretty much everything I need for my day to day needs. NT Workstation, mysql, mssql, odbc drivers galore, Xitami, etc... Until now I've had PHP3 on it. There's no particular reason that I haven't upgraded to PHP4. Lazy, I guess. Anyways, today I downloaded the PHP4.0.6 zip and did the install. We all know the drill. Unzip into the directory of choice (D:/Php4/), copy over the renamed php.ini file, copy over php4ts.dll, edit php.ini to suit, change Xiatmi's default.cfg (.phtml=D:\Php4\php.exe), double check permissions, fire up Xitami, test with a print("test"); or phpinfo();...done! Wrong. When I hit my test page with a web browser I get a blank screen. A check of the source shows: Xitami's status continues to show activity for 30 seconds after the page itself is done loading. My current max_execution time in php.ini is set to 240, in Xitami it's the same. The kicker is when I go to the command prompt I can fire off that page manually and get results. My test code of: gets me: D:\PHP4>php.exe -e -f D:\work\moskal\oracle\ora_test.php test This makes me think that, for some reason, Php4 and Xitami aren't really communicating. But I'm not getting any errors, even though my error reporting in php.ini is set to (error_reporting = E_ALL). Any ideas? - Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Text Editor with Highlighting
EditPlus (http://www.editplus.com) on windows HTML-Kit (http://www.chami.com/html-kit/) - Original Message - From: "Eugene Mah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 01, 2001 3:32 PM Subject: Re: [PHP] Text Editor with Highlighting > At 10:02 PM 11/01/2001 +0100, TD - Sales International Holland B.V. wrote: > >Hey there, > > > >I looked on the site for this but couldn't find anything about it. I'd like a > >list of your favorite text editors (preferable for Linux/XFree) with > >highlighting. > > emacs! > :) > > Eugene > > > -- > To put my contact info into your Palm device, click here: > http://signature.coola.com/?[EMAIL PROTECTED] > Personal Signature Coolet > - > Eugene Mah, M.Sc., DABR [EMAIL PROTECTED] > Medical Physicist/Misplaced Canuck[EMAIL PROTECTED] > Department of Radiology "For I am a Bear of Very Little > Medical University of South Carolina Brain, and long words Bother > Charleston, South Carolina me." Winnie the Pooh > http://home.netcom.com/~eugenem/ > PGP KeyID = 0x1F9779FD, 0x319393F4 > PGP keys available on request ICQ 3113529 O- > - > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] regular expression
Wow, there are some long and curly ways to use RegExp-s aren't there? I'm not very good at them (and I hear that they can be expensively inefficient) so I tend to look elsewhere. Check out pathinfo -- Returns information about a file path array pathinfo (string path) pathinfo() returns an associative array containing information about path. The following array elements are returned: dirname, basename and extension. - the basename result appears to give what you have requested: "with all entered directory names but NOT assigned their names to file name" However you then go on to talk about "qwert.txt.ru => qwert.txt.ru". I'm not sure what pathinfo() does in this situation with regard to its "extension" result. Perhaps you will test and advise!? Nor can I be sure that the previous contribution will address that part of the problem. Does having a filename containing multiple dots (placed in the appropriate directory) contravene the specification? =dn - Original Message - From: "Christian Reiniger" <[EMAIL PROTECTED]> To: "Galkov Vladimir" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 01 November 2001 11:50 Subject: Re: [PHP] regular expression On Thursday 01 November 2001 10:39, Galkov Vladimir wrote: > Need to remove all "../" "/.." from user inputing string to prevent > him walking and creating files&directories where I don't whant see > them/him... > > The string: > > $path = > eregi_replace('([..]{2,})|([./]{2})|([../]{3,})|([/.]{2})|([/..]{3})', > '', $path); > > works good with any combinations ( ../../..qwert.txt => qwert.txt) > untill somth like "/../asd/../qwert.txt" will be entered ... > (/../asd/../qwert.txt => asdqwert.txt). > So the qwestion is how upgrade regular expression to remove all this > correctly (with all entered directory names but NOT assigned their > names to file name... Here's what I use (take out the parts useful to you): function FixSrcURI ($SrcURI) { // remove script name $SrcURI = preg_replace ('#^/*{{$ Page.Source }}/*#', '', $SrcURI); // remove potentially harmful parts $SrcURI = preg_replace ('#/?\.\./?#', '/', $SrcURI); $SrcURI = preg_replace ('#/\./#', '/', $SrcURI); $SrcURI = preg_replace ('#/\.$#', '/', $SrcURI); $SrcURI = preg_replace ('#/{2,}#', '/', $SrcURI); $SrcURI = preg_replace ('#^/#', '', $SrcURI); if (preg_match ('#(\A|/)\.#', $SrcURI) || preg_match ('#CVS#', $SrcURI)) { pbHTTP_404 (); } if ($SrcURI == '') { return array ($SrcURI, -1, 'src'); } else { $matches = array (); if (preg_match ('#^[^/]+$#', $SrcURI)) { return array ($SrcURI, '', $SrcURI); } elseif (preg_match ('#^(.*)/([^/]*)$#', $SrcURI, $matches)) { return array ($SrcURI, $matches [1], $matches [2]); } else { pbHTTP_404 (); return false; } } } -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Text Editor with Highlighting
At 10:02 PM 11/01/2001 +0100, TD - Sales International Holland B.V. wrote: >Hey there, > >I looked on the site for this but couldn't find anything about it. I'd like a >list of your favorite text editors (preferable for Linux/XFree) with >highlighting. emacs! :) Eugene -- To put my contact info into your Palm device, click here: http://signature.coola.com/?[EMAIL PROTECTED] Personal Signature Coolet - Eugene Mah, M.Sc., DABR [EMAIL PROTECTED] Medical Physicist/Misplaced Canuck[EMAIL PROTECTED] Department of Radiology "For I am a Bear of Very Little Medical University of South Carolina Brain, and long words Bother Charleston, South Carolina me." Winnie the Pooh http://home.netcom.com/~eugenem/ PGP KeyID = 0x1F9779FD, 0x319393F4 PGP keys available on request ICQ 3113529 O- - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem writing to file, can't find the error
> -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 7:21 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Problem writing to file, can't find the error > > > I have this code in my program but I fail to find the error, > does anyone see it after a quick glance? > > if ($action == "save_filter") { > $fh = fopen ("./filters.data.php", "r+b") or die ("couldnt open"); > $file = fread($fh, filesize("./filters.data.php")); > $file = stripslashes($file); > $array = unserialize($file); > $array[] = array($filter, $name); > > $out = serialize($array); > fwrite($fh, $out) or die; > > fclose($fh); > > } > ?> Sorry...my internal PHP parser is just a little rusty. Does this code produce an error message? (If so, what does it say?) Or just not the results you were expecting? (In which case, what results were you expecting, and how did the actual results differ?) --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer| at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem with date_format() in indirect MySQL query...
> -Original Message- > From: Ryan Fischer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 5:37 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Problem with date_format() in indirect MySQL query... > > > $res = $this->query("select *, date_format(thedate, 'M d, Y') as dt, > date_format(thedate, 'l:i p') as tm from thetable where foo = > '$bar'"); > > Every other query I've executed in this fashion, I've been > successful in retrieving the results. But, when I try doing > something with the date_format function, when I try to print > out the formatted date and time returned, I get the formats > instead. > > Does anyone have any idea why, and any idea what I can do to rectify > this? TIA! :) Perhaps a quick re-read of the date_format() section of http://www.mysql.com/doc/D/a/Date_and_time_functions.html is in order? (Hint: the % characters mean something.) --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA| -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Text Editor with Highlighting
For Windows, hands down Homesite is the best Td - Sales International Holland B.V. wrote: > Hey there, > > I looked on the site for this but couldn't find anything about it. I'd like a > list of your favorite text editors (preferable for Linux/XFree) with > highlighting. I'm using beaver now, I tried cooledit but it's not me... too > much functions and looks like it came from an old 386 :-). I have kde 2.1.2 > which has kwrite, but it's kwrite does not yet support PHP, kde 2.2.1 does > but i don't wanna download the entire kde package. Besides i think it's still > in development I tried in on my laptop at home but it just makes things bold > instead of all kinds of different colors. also beaver colors for in plain > html and has some problems with correctly indentifying /* */ comments if you > use more of em. i'm also interested in windows though and i think more people > are interested so maybe somebody of the site might also want to keep track of > the list so it can be put online > > regards > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Text Editor with Highlighting
Hey there, I looked on the site for this but couldn't find anything about it. I'd like a list of your favorite text editors (preferable for Linux/XFree) with highlighting. I'm using beaver now, I tried cooledit but it's not me... too much functions and looks like it came from an old 386 :-). I have kde 2.1.2 which has kwrite, but it's kwrite does not yet support PHP, kde 2.2.1 does but i don't wanna download the entire kde package. Besides i think it's still in development I tried in on my laptop at home but it just makes things bold instead of all kinds of different colors. also beaver colors for in plain html and has some problems with correctly indentifying /* */ comments if you use more of em. i'm also interested in windows though and i think more people are interested so maybe somebody of the site might also want to keep track of the list so it can be put online regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL Questions
Hey there, part of my old question can be ignored since I just found out (stupid.) there can be only 1 auto_increment column in a table and by testing with PHP I also found out the position of the column doesn't matter nor it's name. I'd still like an answer on the rest tho' regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how do I use "<" and "<" with eval()?
"Stefan Rusterholz" <[EMAIL PROTECTED]> wrote in message 001001c162af$1fd842f0$3c01a8c0@quasimodo">news:001001c162af$1fd842f0$3c01a8c0@quasimodo... [...] > As you see, for PHP is some HTML-Code in the php-code-zone. To avoid this, > do it that way: > function somefunc($text,$n) > { > for($i=0;$i<$n;$i++){ > echo $text; > } > } > $string='xxx zzz'; > eval("?>$string"); > ?> > > Pay attention to the trailing "?>" in eval. That causes php to change to > HTML-Mode within the eval'd code. Yes, thanks - it works now. I can see that you have to exit php code mode before you encounter HTML 'xxx'. Then you enter php mode, run somefunc() and exit again so you can deal with HTML 'zzz'. But that leaves you outside php mode, right? If the next thing after eval() is more php code, don't you have to enter php mode again like this: eval("?>$string zzz'; eval("?>$string); echo "hello"; is equivalent to: ?>xxx zzz echo "hello"; So why doesn't it treat echo "hello" as HTML code in pass-through mode? In fact, it just prints "hello". -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 1 Nov 2001 13:28:22 -0000 Issue 969
php-general Digest 1 Nov 2001 13:28:22 - Issue 969 Topics (messages 73103 through 73150): Re: Text DB's & bbs lists 73103 by: Jack Dempsey paypal instant notification 73104 by: Sondra Russell 73110 by: CC Zona text into web db interface 73105 by: AAustin 73120 by: David Robley Re: sending email to php script 73106 by: Adrian D'Costa 73107 by: Jason Murray 73118 by: David Robley Dynamic update of content 73108 by: Martin 73109 by: Galkov Vladimir Re: need coments... 73111 by: Jason G. Re: show png in the browser 73112 by: Jason G. Re: question about variables... 73113 by: Jason G. run php in commandline 73114 by: JIM 73115 by: JIM 73119 by: Jason G. print on printer 73116 by: Luz Lopez Re: defending PHP mail function 73117 by: Jason G. Secure transfer 73121 by: Morten Winkler Jørgensen Week of month 73122 by: Sheni R. Meledath 73127 by: Jon Farmer 73130 by: Andrew Braund 73136 by: Matt Williams 73138 by: Jon Farmer Re: how do I use "<" and "<" with eval()? 73123 by: Stefan Rusterholz Re: setting member variables out of class 73124 by: Tim Ward Comparing strings 73125 by: phantom 73131 by: Michael Egan 73132 by: CC Zona 73135 by: phantom regular expression 73126 by: Galkov Vladimir 73142 by: liljim 73144 by: liljim 73145 by: liljim 73146 by: Christian Reiniger Can you AUTO "Post/Submit" on a mixed HTML/PHP form 73128 by: Arf 73134 by: CC Zona 73139 by: Arf fto_connect() failed?? 73129 by: JIM destroying sessions 73133 by: Richard Baskett Best PHP package for this kind of www site? 73137 by: web_fm Yes you can but 73140 by: Galkov Vladimir 73141 by: Arf Problem with date_format() in indirect MySQL query... 73143 by: Ryan Fischer Re: Detecting Languages... 73147 by: Tommy Gildseth 73148 by: Tommy Gildseth Problem writing to file, can't find the error 73149 by: Jeff Lewis Uncertainties about MySQL commands 73150 by: TD - Sales International Holland B.V. 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] -- Hi Arsen, I think that'd be a lot of work, and I'm not sure I understand why you can't use MySQL? I suppose you could do it, but i think you'll find once starting it, that its not worth the time it'll need... Jack -Original Message- From: ArsenKirillov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 7:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Text DB's & bbs lists does anybody hear about board(bbs or phorum) written oin php wihout using any kind of SQL DB ? I think of developing one in text db (separated by | fields in one line) Did anybody think of this is good idea ? (i have problem in my country - stupid admins can't run MySQL to be such stable as php4.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Hi guys! I'm going to use paypal with my site, and they have a cool "instant notification" feature which sends, to a page I preassign, information about a transaction as it happens. My script is supposed to: a) receive this information (as a "post") b) send it back to them with a sort of "is this really coming from you?" message c) get a confirmation from them, "yes, this came from us" d) take the post and insert it into my database or whatever else I'd like to do with it. They have provided a perl sample script (see below). Mostly I'm just trying to figure out how to replicate the whole "receiving", "sending", and "receiving again" thing in PHP. This is especially tricky since I apparently can't test my work without actually going through a transaction on paypal (and spending money). I sorta have to get it right the first time. Anyone done this before? Thanks again! Sondra sample perl script: # read the post from PayPal system and add 'cmd' read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; # post back to PayPal system to validate use LWP::UserAgent; $ua = new LWP::UserAgent; $req = new HTTP::Request 'POST','https://www.paypal.com/cgi-bin/webscr'; $req->content_type('application/x-www-form-urlencoded'); $req->content($query); $res = $ua->request($req); # split posted variables into pairs @pairs = split(/&/, $query); $count = 0; foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair)
[PHP] Uncertainties about MySQL commands
Hey list, i'm new to php so bare with me... got some questions on mysql commands. I'd like to know how the mysql_insert_id() function works exactly. First of all how reliable is it? What happens this happens: Table: (ID int unsigned primary key auto_increment, Stuff text, MoreStuff text) (my script) insert into table values(NULL, "bla", "bla") (some other application) insert into table values(NULL, "bleh", "bleh") (my script) $id = mysql_insert_id it's not likely that this will happen, but if the site is very/extremely crowded it could be that there's an insert right after mine but before me callind mysql_insert_id. As you might guess I'd like to know which ID will be returned, the one my script created or the one from the other application? Also what happens if my table is like this: Table: (Stuff text, ID int unsigned primary key auto_increment, OtherStuff text) Thus having the ID on column 2 instead of 1 or like this Table: (Bla int unsigned primary key auto_increment, Stuff text, Otherstuff text) Thus the ID not having the name ID Or like this Table: (bla int unsigned primary key auto_increment, id int unsigned primary key auto_increment, stuff text, otherstuff text) Thus having 2 auto_increment columns where the 2nd one is called ID (lower case). I'm really uncertain about that and couldn't find it back in the manual does it only read the first column? does this column have to be named ID, what if ID is another column? what if there is more than 1 auto_increment column in the table? what happens if some(one)/(thing) else inserts before calling mysql_insert_id. One more question (pure curiosity this one) the return value from mysql_query... is that ever gonna be higher than 1? I assume it can be if the insert affects more than 1 line right? Also my book says that the return value is TRUE or FALSE for every command except for an INSERT in which case it would be 0 on failure and higher on succes. I think that's crap? I'm guessing it will also return a number for UPDATE's and REPLACE's is that correct? Are there others? OK just one more thing, this is for the people from troutworks if they're monitoring this list. I think the translation of the PHP Bible is crap! Please complain about it at the translator. The guy/girl managed to translate (quotes) " to (comma's) , and there are a lot of other wrongly translated things in there, luckily the examples in there got me on the right path again over and over showing that the translation was incorrect but it's just confusing like hell. The number of mistakes is unbelievable (and i'm NOT talking about spelling errors, I'm talking about messy stuff like calling quotes comma's) and I'm 100% certain it was NOT translated by a programmer regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem writing to file, can't find the error
I have this code in my program but I fail to find the error, does anyone see it after a quick glance?
[PHP] Re: Detecting Languages...
"Tommy Gildseth" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Arcadius A." <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > How to detect the language setting of the the visitor's PC in order to > > redirect him to a specified content ? > > > > Accept: */* > Accept-Language: en-gb,no;q=0.5 > Host: www.gildseth.com > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) More specifically the variabel $HTTP_ACCEPT_LANGUAGE will tell you what languages the users browser will accept. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Detecting Languages...
"Arcadius A." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > HEllo ! > I have a website designed in several languages (En , Fr , Cz) > My question is : > How to detect the language setting of the the visitor's PC in order to > redirect him to a specified content ? > These are the HTTP headers my browser send along when I load a page from a webserver. I expect you can guess which one would be interesting for you :-) Accept: */* Accept-Language: en-gb,no;q=0.5 Host: www.gildseth.com User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] regular expression
On Thursday 01 November 2001 10:39, Galkov Vladimir wrote: > Need to remove all "../" "/.." from user inputing string to prevent > him walking and creating files&directories where I don't whant see > them/him... > > The string: > > $path = > eregi_replace('([..]{2,})|([./]{2})|([../]{3,})|([/.]{2})|([/..]{3})', > '', $path); > > works good with any combinations ( ../../..qwert.txt => qwert.txt) > untill somth like "/../asd/../qwert.txt" will be entered ... > (/../asd/../qwert.txt => asdqwert.txt). > So the qwestion is how upgrade regular expression to remove all this > correctly (with all entered directory names but NOT assigned their > names to file name... Here's what I use (take out the parts useful to you): function FixSrcURI ($SrcURI) { // remove script name $SrcURI = preg_replace ('#^/*{{$ Page.Source }}/*#', '', $SrcURI); // remove potentially harmful parts $SrcURI = preg_replace ('#/?\.\./?#', '/', $SrcURI); $SrcURI = preg_replace ('#/\./#', '/', $SrcURI); $SrcURI = preg_replace ('#/\.$#', '/', $SrcURI); $SrcURI = preg_replace ('#/{2,}#', '/', $SrcURI); $SrcURI = preg_replace ('#^/#', '', $SrcURI); if (preg_match ('#(\A|/)\.#', $SrcURI) || preg_match ('#CVS#', $SrcURI)) { pbHTTP_404 (); } if ($SrcURI == '') { return array ($SrcURI, -1, 'src'); } else { $matches = array (); if (preg_match ('#^[^/]+$#', $SrcURI)) { return array ($SrcURI, '', $SrcURI); } elseif (preg_match ('#^(.*)/([^/]*)$#', $SrcURI, $matches)) { return array ($SrcURI, $matches [1], $matches [2]); } else { pbHTTP_404 (); return false; } } } -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) /* you are not expected to understand this */ - from the UNIX V6 kernel source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regular expression
> Whooops, > > Pasted wrong line. This should do it: > > $string = preg_replace("/(\.*\/)+(.*?\.*\/)?/s", "", $string); Gah... Not.. enough... caffeine: Modification: $string = preg_replace("/(\.*\/)+(.*?\.*\/)?(\.*)?/s", "", $string); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regular expression
Whooops, Pasted wrong line. This should do it: $string = preg_replace("/(\.*\/)+(.*?\.*\/)?/s", "", $string); James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with date_format() in indirect MySQL query...
Hello! :) First off, please respond to me directly as I am not subscribed to the list. Thanks! :) Now then, I have a quick question I'm hoping someone can help me with. I have this class method: function query($sql, $type = 'obj') { if(!$result = @mysql_query($this->masl($sql))){ echo "Problem with query: $sql. " . mysql_error(); exit; } $objary = array(); if(@mysql_num_rows($result) > 0){ if($type == 'obj'){ while($object = @mysql_fetch_object($result)){ $objary[] = $object; } @mysql_free_result($result); }elseif($type == 'assoc'){ while($object = @mysql_fetch_assoc($result)){ $objary[] = $object; } @mysql_free_result($result); }else{ echo "Problem with type of query requested."; exit; } return $objary; }else{ return null; } } And this something like this query: $res = $this->query("select *, date_format(thedate, 'M d, Y') as dt, date_format(thedate, 'l:i p') as tm from thetable where foo = '$bar'"); Every other query I've executed in this fashion, I've been successful in retrieving the results. But, when I try doing something with the date_format function, when I try to print out the formatted date and time returned, I get the formats instead. Does anyone have any idea why, and any idea what I can do to rectify this? TIA! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regular expression
Hello, "Galkov Vladimir" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Need to remove all "../" "/.." from user inputing string to prevent him > walking and creating files&directories where I don't whant see them/him... > > The string: > > $path = > eregi_replace('([..]{2,})|([./]{2})|([../]{3,})|([/.]{2})|([/..]{3})', '', > $path); > > works good with any combinations ( ../../..qwert.txt => qwert.txt) untill > somth like "/../asd/../qwert.txt" will be entered ... (/../asd/../qwert.txt > => asdqwert.txt). > So the qwestion is how upgrade regular expression to remove all this > correctly (with all entered directory names but NOT assigned their names to > file name... > > Must do the operation: > /../asd//qwert.txt => qwert.txt > but not => /asd/qwert.txt or asdqwert.txt.ru > or > /../asd/../qwert.txt.ru => qwert.txt.ru > but not => /asd/qwert.txt.ru or asdqwert.txt.ru > Try this: May need some tweaking, let me know. ~James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Yes you can........ but....
Ummm... Like that where's me PHP editor. will let you know how it goes after I have had breakfast. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Yes you can........ but....
Yes you can... Ifif I rightly understand you only well... you whant submit information without clicking submit button? .. well then you have to imagine any suported event or use meta tag.. One problrm I don't use VB script Way one... ( this is example of 100% stupid code ... only to show the gate;-) ... will be usefull only if you find the way to abort/allow submit in you )