RE: [PHP] file upload problem

2002-05-18 Thread Rodney Davis
The purpose of the function is to upload a file. It fails to upload despite not generating an error. I went into the php.ini file and found that the max file size was defaulted to 2mb. I increased this and it fixed the problem. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROT

[PHP] Compressing my web pages?

2002-05-18 Thread Jason Caldwell
I'm using IIS5.0 -- and PHP 4.2.1 -- I think there is a compression setting within IIS whereby the pages (before they are sent) are compressed, to be decompressed and then displayed by the browser (pending, of course, if that browser supports the HTTP 1.1 compression standard) -- My questions are

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
I just upgraded from 4.1.1 to 4.2.1 -- didn't fix the problem. I'd be curious to know if other Windows users are having the same problem. Thanks. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php.net sloooooooowwww

2002-05-18 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jason Caldwell) wrote: > Is there some place else I can download release 4.2.1 ??? www.php.net is > dead slow, and us2.php.net is taking forever to prompt me for the > download -- I keep getting hit with the "Page Cannot be Displayed" error. Ha

[PHP] Re: php.net sloooooooowwww

2002-05-18 Thread Jason Caldwell
Is there some place else I can download release 4.2.1 ??? www.php.net is dead slow, and us2.php.net is taking forever to prompt me for the download -- I keep getting hit with the "Page Cannot be Displayed" error. Looking for the Win32 binary. Thanks. Jason -- PHP General Mailing List (http:/

Re: [PHP] php.net sloooooooowwww

2002-05-18 Thread mike
Seems to be an old main page on php.net too, us2.php.net shows 4.2.1 released, php.net doesn'.t :) Mike - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 19, 2002 1:35 AM Subject: Re: [PHP] php.net sl > On Sat, 18 May 2002

Re: [PHP] Read a var from stdin

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Rafael Perazzo wrote: > Is there any way to ask the user to type the value of > a variable from stdin ? (like read in Pascal, or scanf > in C). I'm using PHP from command line. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] php.net sloooooooowwww

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Jason Caldwell wrote: > Anyone know why http://www.php.net is s incredibly slow today > (all day) ??? Dunno, I've been doing my own armchair load balancing by typing us2.php.net instead of php.net all day. miguel -- PHP General Mailing List (http://www.php.net

Re: [PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
I figured it out. Change the last line to echo htmlspecialchars($b); and you'll get the proper output. Gerard Samuel wrote: > Im trying to get a final output to be '' but Im unable to get > working. Could someone point me where Im going wrong. > Thanks > > > $a = 'http://www.trini0.org";>';

Re: [PHP] Sessions

2002-05-18 Thread Miguel Cruz
On Sun, 19 May 2002, Navid Y. wrote: > Simple question: Will registering a variable twice, using > session_register(), reset the value of the variable to a different > value? session_register() adds a variable to the list of variables that are tracked by the session. If the variable has already b

[PHP] php.net sloooooooowwww

2002-05-18 Thread Jason Caldwell
Anyone know why http://www.php.net is s incredibly slow today (all day) ??? Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file upload problem

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Rodney Davis wrote: > I am trying to use the move_uploaded_file() function to upload files to > a specific directory. It works fine with small .jpgs .txt etc etc but > won't work with a large .mp3 file. Is this because it is too large? > What can I do? You can tell us what "

[PHP] Sessions

2002-05-18 Thread Navid Y.
Hello everyone, Simple question: Will registering a variable twice, using session_register(), reset the value of the variable to a different value? I just now started using the session_is_registered() function on all sessions to see if they have been registered already, before I register them ye

RE: [PHP] Augmenting an old date

2002-05-18 Thread SP
Wow this is a pretty cool function. I was playing with it and you can add like +30 days + 99 seconds together and it works. -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: May 19, 2002 1:07 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Augmenting an

[PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
Im trying to get a final output to be '' but Im unable to get working. Could someone point me where Im going wrong. Thanks http://www.trini0.org";>'; $b = preg_replace("/()/i", "$1" . "$3", $a ); echo $b; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] date functions

2002-05-18 Thread Miguel Cruz
On Sun, 19 May 2002, Josh Edwards wrote: > Does anyone know a good way to count the days between two dates. ie how > many Mondays fall between two dates. As a starting point I have calculated > the start and end dates and the no of days b/w them. Pretty much common sense, right? How about somet

Re: [PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Dennis Gearon
I think I will try to standardize on the '' version, then. thank you. Miguel Cruz wrote: > > On Sat, 18 May 2002, Dennis Gearon wrote: > > I appreciate all the good info on this subject, everybody. > > > > In looking the archives, I am still confused on one issue. Do **ALL** > > databases treat

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi A slightly more efficeint way :) "; ?> Tom At 02:03 PM 19/05/2002, Andre Dubuc wrote: >Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): >'start_date' and 'expiry_date'. What I cannot seem to figure out is how to >augment the 'expiry_date' either by 30 days, 60 days,

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi You need to use the strtodate function which converts to a time stamp a date string and you can offset it by a number of days or whatever something like this "; ?> Tom At 02:03 PM 19/05/2002, Andre Dubuc wrote: >Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): >'st

RE: [PHP] Augmenting an old date

2002-05-18 Thread SP
Here's a nice article all about dates http://www.phpbuilder.com/columns/akent2610.ph p3 On page 6 of that article it shows a function for adding years, months, days ... to a date. function DateAdd ($interval, $number, $date) { $date_time_array = getdate($date); $hours = $date_time_array[

[PHP] bug in SLEEP() function...

2002-05-18 Thread Jason Caldwell
Dunno if this has been mentioned or fixed in the latest release (I'm using PHP version 4.1.1) -- but, a script will not timeout until the sleep() function has finished it's duration -- for example: In my script, if I set "set_time_limit(30)" -- then later in the script I call a "sleep(45)" -- the

[PHP] Augmenting an old date

2002-05-18 Thread Andre Dubuc
Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I cannot seem to figure out is how to augment the 'expiry_date' either by 30 days, 60 days, or 1 year. I've tried the date function in PHP (getdate) but the problem is that it appears

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
It doesn't matter. I'm setting the output *not* to the browser, but to the command shell, where I am running the script from. If you look at the errors, you'll see 2 of them, one points to line 7, where the IF() command is -- the script terminates there... I've put error_log() and exec() functi

Re: [PHP] date functions

2002-05-18 Thread Tom Rogers
Hi I think this works :) "; else: echo "there are no Mondays between $date1 and $date2 "; endif; ?> Tom At 10:22 AM 19/05/2002, Josh Edwards wrote: >Does anyone know a good way to count the days between two dates. ie how >many Mondays fall between two dates. As a starting point I ha

Re: [PHP] Problem with

2002-05-18 Thread Richard Baskett
Well the ORDER BY is supposed to be after the WHERE statement.. Try that :) Rick "It is my ambition to say in ten sentences; what others say in a whole book." - Friedrich Nietzsche > From: [EMAIL PROTECTED] > Date: Sun, 19 May 2002 13:05:19 +1000 > To: <[EMAIL PROTECTED]> > Subject: [PHP] Probl

[PHP] Problem with

2002-05-18 Thread webmaster
I have the following code for a mySQL query in php:   $text = "sort_text"; $query = "SELECT code FROM links ORDER BY $text WHERE ".$text." like '".$l."%'"; $result = mysql_query($query) or die("Query failed"); When I do the query I get Query failed. When I remove the sort parameter they are

RE: [PHP] Classifieds Program

2002-05-18 Thread David Freeman
> I want to add a Classifieds script to my Website. Any recomendation? 1. http://www.google.com/ 2. "classifieds web php mysql" in the search box. 3. Click the "search" button. 4. The 3rd link on the resulting list looks good. 5. http://www.hotscripts.com/PHP/Scripts_and_Programs/Class

[PHP] Read a var from stdin

2002-05-18 Thread Rafael Perazzo
Is there any way to ask the user to type the value of a variable from stdin ? (like read in Pascal, or scanf in C). I'm using PHP from command line. Thanks Rafael Perazzo __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yaho

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jason Caldwell) wrote: > Here's my code: > > set_time_limit(1); > function clean_up() > { > if(connection_status() & TIMEOUT) >print("Script timed out.\n"); > } > register_shutdown_function("clean_up"); > while(1); >

[PHP] xml parsing

2002-05-18 Thread Gerard Samuel
I got this example from Beginning PHP 4. Unfortunately, I cant get to wrox's site to see if there were any errata updates for this piece of code, but for the life of me, I dont know whats wrong with it. All its displaying is '-'. If anyone could direct me to where its broken, Ill be very gr

[PHP] Classifieds Program

2002-05-18 Thread Andrés de la Varga
I want to add a Classifieds script to my Website. Any recomendation? Andrés -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] file upload problem

2002-05-18 Thread Rodney Davis
I am trying to use the move_uploaded_file() function to upload files to a specific directory. It works fine with small .jpgs .txt etc etc but won't work with a large .mp3 file. Is this because it is too large? What can I do? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
> list($usec,$sec)=explode(" ",microtime()); > mt_srand($sec * $usec); > $quotes = file("quotes"); > echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Yes!!! That works exactly! I love PHP! I love this list and look forward to the day when I can contribute something more than fascinating q

Re: [PHP] PHPBB2

2002-05-18 Thread Ashley M. Kirchner
r wrote: > Does anybody have any ideas on how i can make PHPBB's width a bit shorter? Use PHPBB2's forums for these kind of questions. -- H | "Life is the art of drawing without an eraser." - John Gardner + Ashley M. Ki

Re: [PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Evan Nemerson
list($usec,$sec)=explode(" ",microtime()); mt_srand($sec * $usec); $quotes = file("quotes"); echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Should do the trick nicely. -Evan -- All religions are founded on the fear of the many and the cleverness of the few. Stendhal -- PHP General Maili

Re: [PHP] date functions

2002-05-18 Thread Richard Baskett
Well you could do two str2time() calls like this: # Two Dates to Compare # $date1 = strtotime("Oct 18, 2002"); $date2 = strtotime("Jan 18, 2002"); # Assign the earliest date and laterdate to variables # $earlyDate = ($date1 < $date2) ? $date1 : $date2; $laterDate = ($earlyDate == $date1) ? $date

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
Here's my code: Here's the message I get: (I should get "Script timed out.") --- Fatal error: Maximum execution time of 1 second exceeded in C:\test999.php on line 14 Fatal error: Maximum execution time of 1 second exc

[PHP] Re: parsing CSV, updating MySQL table

2002-05-18 Thread Jason Morehouse
You could use mysql import / outfile: http://www.mysql.com/doc/S/E/SELECT.html See the section " * The SELECT ... INTO OUTFILE". Hope that helps. -J On Sat, 18 May 2002 20:41:39 +1200, Justin French wrote: > Hi, > > I have a client with an Excel file of products / prices / etc. For > argume

[PHP] date functions

2002-05-18 Thread Josh Edwards
Does anyone know a good way to count the days between two dates. ie how many Mondays fall between two dates. As a starting point I have calculated the start and end dates and the no of days b/w them. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

[PHP] Re: Comon guys, please help.

2002-05-18 Thread Jason Morehouse
I've used both Cybercash and PayFlow. Both work fine, however you'll still need a merchant account. Cheers, -J On Sat, 18 May 2002 14:42:04 +1200, R wrote: > Hi Guys, > Special greetings to all of you who have helped me in the past. > > As some of you know i just bought a PHP book called

[PHP] Re: How do I get rid of session id (test purposes)

2002-05-18 Thread Jason Morehouse
http://www.php.net/manual/en/function.session-destroy.php On Sun, 19 May 2002 01:15:15 +1200, Henry wrote: > Hello All > > Love Sessions! BUT > > how do I clear it so that when I execute session_start() again I get a > new one? Help. > > I'm sure I should have RTFM more but I'm a newbie. > >

[PHP] PHPBB2

2002-05-18 Thread r
Hi Guys and Girls, I have reciently set up PHPbb2 on our site, its great and no problems with the software but I am using frames so that a person can at any time jump out of the forum and came right back to the site but because of the frames the forum is pushed a lot to the right...(you ha

RE: [PHP] random order by id

2002-05-18 Thread David Freeman
> i have a db and a table with id and questions > now i want these questions to be listed in a random order, > is there a way to format my SQL query or do i need some PHP > work to? It's best achieved in sql: SELECT ID, Question FROM Questions WHERE Some = Condition ORDER BY RAND() LIMIT

[PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
I've been searching for some a little bit of PHP that will pull out one line from a flat text file and display it, changing it on reload. So far most of them use MySQL and the links that I did find all turn up 404... but one was called "PHP Vault: Random Quote Script" and it seemed like it would

Re: [PHP] Re: reindexing an array after unset()

2002-05-18 Thread Daniel Grace
"Erik Price" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > > On Wednesday, May 8, 2002, at 03:28 PM, Kyle Gibson wrote: > > >> What do you think? > > > > Try > > > > array_pop($array); > > > > array_pop() is perfect, except that I don't want to take the last > element off the

Re: [PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Dennis Gearon wrote: > I appreciate all the good info on this subject, everybody. > > In looking the archives, I am still confused on one issue. Do **ALL** > databases treat \' or \" as escaped? Isn't the SQL standard character to > escape with a ' ? I know that Oracle (at

Re: [PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, andy wrote: > I would like to validate a website adress. Unfortunatelly my eregi stmt does > not work: > > if (eregi("^@([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3}))", $website)){ // not a > link > > I am getting the error msg: > Warning: REG_ERANGE in extend.inc on line 94 > > do

Re: [PHP] How can I access the value in a variable whos name is ina string

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Henry wrote: > $variablename="variable"; > eval("\$".$variablename."=13;"); > echo $variable; > > This works fine!! It echoes "13"; > > But this doesn't -> > > echo eval("\"$variablename\""); > > Why?? Because a variable just standing there on its own doesn't have a retur

Re: [PHP] random order by id

2002-05-18 Thread Richard Baskett
If you are using MySQL try looking at this page for the function rand(): http://www.mysql.com/doc/M/a/Mathematical_functions.html Here's a little overview of what it says: "In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name ORDER BY RAND() This is useful to get a random sampl

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Thanks Rick, that's what I thinking. Thought I was missing something. -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 4:49 PM To: SP; PHP General Subject: Re: [PHP] passing ARRAYs through GET strings Well you can serialize an array using the seri

[PHP] random order by id

2002-05-18 Thread Jule
Hey guys, i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? i can ofcourse select a random one, that's no problem, but how do i make sure that that one does not get chosen a

[PHP] Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
I'm playing with the register_shutdown_function -- it's seems to work fine if I call exit() within my script -- however, it doesn't seem to work when the script times-out. Anyone know why? It's supposed to work in the event of an error, time-out, user-abort, or script-exit. Thanks Jason --

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Well you can serialize an array using the serialize function then pass it through the url then unserialize it on the next page using the unserialize function. If you check out http://www.php.net/serialize it will give you some examples. It is quite similar to sessions in that sessions also seria

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Rick, what exactly do you mean by using serialization without sessions? how do you do that? -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 4:31 PM To: [EMAIL PROTECTED]; PHP General Subject: Re: [PHP] passing ARRAYs through GET strings Hey no pro

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Hey cool, didn't know that. -Original Message- From: Navid Y. [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 3:45 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] passing ARRAYs through GET strings No need to serialize arrays in PHP 4.0. They work seamlessly, as if you've passed a regular var

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Hey no problem.. That's what this list is for.. Asking questions and answering them :) I just use sessions to pass a lot of variables to a lot of pages.. Or some variables to a lot of pages.. Usually for site authorization that's about it. When I just want to pass arrays to another page, I use s

RE: [PHP] Re: Using PHP for NULLs

2002-05-18 Thread Jason Soza
Thanks for the help! I spent more time looking at IFNULL() when I should've just been looking at IF(). Thanks again, sorry for the off-topic! Jason Soza -Original Message- From: Dan Koken [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
No need to serialize arrays in PHP 4.0. They work seamlessly, as if you've passed a regular variable through. Thanks for your help and patience :) -Original Message- From: SP [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 2:27 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject

[PHP] Re: CGI / Apache module session permissions

2002-05-18 Thread Steve Clay
Saturday, May 18, 2002, 1:05:30 PM, I wrote: SC> CGI, which works fine except that the CGI doesn't have permissions to SC> my sessions that were saved running under the Apache module. I Figured it out: from Apache mod script before CGI script: //allow CGI to access session $sess_file = session_

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Well Rick, Let's say I had a form with a text box and an textarea box. The text box won't contain that many strings, but the textarea box can contain thousands of characters, if the user wished to write that much. Both of the fields will be contained in a single array. If I send this array throug

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Okay let me clarify, if I had an array like this I would just use sessions this way: $myarray = array( array('1', '2'), array('3', '4') ); $_SESSION['myarray'] = serialize($myarray); Then you can use the array on any page the user goes to by doing this: $myarray = unserialize(

[PHP] Re: Using PHP for NULLs

2002-05-18 Thread Dan Koken
I do believe it is a MySql question!! What's wrong with the old standard way as: $result = mysql_query(" SELECT *, if (last_name is NULL,'zzz end',last_name) as last_name_sort FROM new_miatapix ORDER BY last_name_sort LIMIT $page, 20"); Good Luck.. HTH.. Dan.. ===

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Well what I normally do to pass very large arrays through strings.. when NOT using sessions, I use serialize, but it sounds like you didn¹t want to serialize.. If you give me an idea of what you are doing I might be able to figure out the best way to pass those variables :) And no you don't need

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Thanks SP and Richard, Well, I tested it and it works fine with sessions, without serializing it. The only problem with sending it through GET url strings is that you can only send about 255 characters of data through to the next page. I was just looking to see how others pass their array values

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Oh sorry I read your message wrong.. But the idea still stands.. Link Rick "Sir my concern is not whether God is on our side. My great concern is to be on God's side." - Abraham Lincoln > From: "Navid Y." <[EMAIL PROTECTED]> > Reply-To: <[EMAIL PROTECTED]> > Date: Sat, 18 May 2002 13:26:11 -05

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Hi Navid Don't you have to serialize it to put it in sessions? -Original Message- From: Navid Y. [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: [PHP] passing ARRAYs through GET strings Hello :) Can anyone suggest of another way, an easier way, t

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
In your html input just add [] to the name of your variable so for example: Rick "Not one of them who took up in his youth with this opinion that there are no gods, ever continued until old age faithful to his conviction." - Plato > From: "Navid Y." <[EMAIL PROTECTED]> > Reply-To: <[EMAIL PRO

[PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Hello :) Can anyone suggest of another way, an easier way, to send arrays through get strings, or through any other process, without having to serializing it? For example, would it be better to use sessions in this case? Any help would be greatful, thanks. :) Navid -- PHP General Mailing L

[PHP] Using PHP for NULLs

2002-05-18 Thread Jason Soza
I thought this was a MySQL question, or something that could be solved using a creative SQL string, but after looking through the MySQL manual, I don't think I can handle this with the database alone. According to the manual, MySQL always sorts NULL values first - I want them last. I have a last_n

Re: [PHP] header-sending misbehaving

2002-05-18 Thread Jason Wong
On Sunday 19 May 2002 00:54, erich wrote: > what is meant by output buffering? what PHP function(s) can > support output buffer? The standard behaviour of PHP is to output stuff to the browser as soon as it's ready (more or less). By using the "Output Control Functions" (see ma

[PHP] CGI / Apache module session permissions

2002-05-18 Thread Steve Clay
Hello, To perform a certain task I have to run one of my PHP scripts as a CGI, which works fine except that the CGI doesn't have permissions to my sessions that were saved running under the Apache module. I expected different permissions, but I thought my user would have /more/ permission to thos

RE: [PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread Jonathan Rosenberg
I'm a PHP amateur, but a quick perusal of Eval in the manual says In PHP 4, eval() returns FALSE unless return() is called in the evaluated code, in which case the value passed to return() is returned. In PHP 3, eval() does not return a value. > -Original Mess

RE: [PHP] Feelin' dumb...

2002-05-18 Thread Jason Soza
Thanks everyone for your help on this, this is the final code: if ($num_pages >= 2) { for ($i=0, $p=1; $i<$num_pages; $i++, $p++) { $j = ($i==0) ? $i : $j+20; printf("| Page %s | ", $j, $p);

Re: [PHP] header-sending misbehaving

2002-05-18 Thread erich
jason wong what is meant by output buffering? what PHP function(s) can support output buffer? thanks erich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Free Hosting /w PHP/MySQL {!?}

2002-05-18 Thread Olexandr Vynnychenko
Hello Liam, Monday, May 06, 2002, 6:00:07 AM, you wrote: LM> Free hosting for PHP Developers. LM> As many MySQL Databases as you need LM> PHP with all the bits http://scripts.operationenigma.net/phpinfo.php LM> FTP Access LM> Subdomain or Your own Domain LM> Tech Support over MSN if needed LM>

[PHP] Netscape6 and Javascript

2002-05-18 Thread wolf
Hi, I need help for an non-php-problem. I've a frameset with 2 frames. There is a TOPframe with the name "topframe" who contains an input-Field. in the form named "mainform". The BOTTOMframe contains a link. With the link I have to change the value of the input field in the TOPframe. The

[PHP] Whats the best way?

2002-05-18 Thread Gerard Samuel
Well this is the first time actually creating a regex. It works, but was wondering if the regex was created properly. HTTP_ACCEPT_LANGUAGE is 'en-us, en;q=0.75, nl;q=0.50, fr;q=0.25' /* Explode the browser report to get each language */ $foo = split(',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); /* P

Re: [PHP] Bundled php mysql library vs mysql extension

2002-05-18 Thread Rasmus Lerdorf
Nope, it isn't faster. You should use your own if you have one installed on your machine. Chances are your will match your server better than the bundled one. The typical mismatch being the location of the mysql unix-domain socket. We bundled one so that the default PHP install will always be

[PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Dennis Gearon
I appreciate all the good info on this subject, everybody. In looking the archives, I am still confused on one issue. Do **ALL** databases treat \' or \" as escaped? Isn't the SQL standard character to escape with a ' ? -- - Joy is

Re: [PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread andy
> "andy" <[EMAIL PROTECTED]> wrote: > > > Hi there, > > > > I would like to validate a website adress. Unfortunatelly my eregi stmt does > > not work: > > > > if (eregi("^@([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3}))", $website)){ // not a > > link > > > > I am getting the error msg: > > Warning: REG_ER

Re: [PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread The_RadiX
simple.. try this: echo eval($variablename); then again why are you eval()ing at all?? why can't you do this: $var1="var2"; $$var1=13; echo $var2; //or perhaps even better: //echo $$var1; seems simple enough.. haven't tested but theory is there I think.. HTH :

Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX
well personally I have never had a good time with mysql_num_rows.. dunno why.. never seemed to have worked the way it should for me.. anyway point is if it works for you good, otherwise do what I do to get a rowcount and just: $sql_count=mysql_fetch_array(mysql_query("SELECT count(*) FROM tabl

[PHP] Apache(webserver) question, sorry if somebody won't like it

2002-05-18 Thread Mantuks
Hey! i am having problems with my apache server. Im runnin PHPTriad thing with mysql and apache webserver..everything seems to be ok... but...the thing is that im runnin on my win2k platform which i also use for stuff...and i have webcam uploadin pic every sec..also java applet refreshing eve

Re: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread r
Hi, I tried to use ftp via the command prompt it didnt work, got a timed out error. Tried to use it via cuteFTPtimed out error..will try after 30 seconds5 minutes later...10 timeouts. Any ideas? -Ryan - Original Message - From: "Michael Geier" <[EMAIL PROTECTED]> To: "r" <[

[PHP] Re: How can I access the value in a variable whos name is in a string

2002-05-18 Thread Henry
I found one way I can do the following eval("\$val=\$".$variation.";"); echo $val; Is there a better way? Henry "Henry" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Dear All, > > $variablename="variable"; > eval("\$".$variablename."=13;"); > echo $variable

[PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread Henry
Dear All, $variablename="variable"; eval("\$".$variablename."=13;"); echo $variable; This works fine!! It echoes "13"; But this doesn't -> echo eval("\"$variablename\""); Why?? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX
Goody another easy to answer one :) no harm intended.. it's a perfectly good question Okay first is it sorted how you want? if so you can use the LIMIT start,len feature of mysql.. for example: select * from table_name order by col_name limit 5,10 will select records 5 to 15 (5+10) if of co

Re: [PHP] (newbi)mySQL query question

2002-05-18 Thread The_RadiX
try this: $query = "SELECT code FROM links WHERE sort_text LIKE '$letter%'"; Note there are now single quotes (') identifying the string of the LIKE operator and also the assignment operator (=) has been replaced with the proper LIKE mySQL operator that allows for string search arguments.

Re: [PHP] Bulletin Boards

2002-05-18 Thread Jeff Lewis
Never used Phorums as it didn't have what I was looking for. Tried phpBB but the admins ection is awful IMHO. I currently use YaBB SE which has a very fast development time. Jeff - Original Message - From: "Richard Baskett" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent:

[PHP] Complex(ish) Question for Newbie

2002-05-18 Thread webmaster
How can I return the last five lines of a mySQL database table?   JJ Harrison[EMAIL PROTECTED]www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How can I ammend the session_id

2002-05-18 Thread Henry
Dear All, I want to use the session id that session_start would create but I wish to modify it as well! Suggestions? I'm currently trying: $sessionID = uniqid(""); session_id($sessionID."u".$u."c".$c."z"); session_start(); where $u and $c are passed in the URL Thanks in advance Henry --

[PHP] (newbi)mySQL query question

2002-05-18 Thread webmaster
This doesn't have a huge amount to do with PHP but,   I have the following code for my SQL query: $query = "SELECT code FROM links WHERE sort_text = $letter*"; I get an error. What I want to do is be able to specify a letter and have the rest be undefined eg if $letter was t I would get TecE

[PHP] How do I get rid of session id (test purposes)

2002-05-18 Thread Henry
Hello All Love Sessions! BUT how do I clear it so that when I execute session_start() again I get a new one? Help. I'm sure I should have RTFM more but I'm a newbie. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general Digest 18 May 2002 13:00:44 -0000 Issue 1352

2002-05-18 Thread php-general-digest-help
php-general Digest 18 May 2002 13:00:44 - Issue 1352 Topics (messages 98197 through 98250): HTTP_ACCEPT_LANGUAGE 98197 by: Gerard Samuel 98199 by: Miguel Cruz Re: Alter table and add cell at a time. 98198 by: Miguel Cruz Re: Q:Anybody using PHP directly on Mac-OSX?

[PHP] Bundled php mysql library vs mysql extension

2002-05-18 Thread Pentothal
Which are the differences between the php bundled mysql library and the external "standard" extension? Is the bundled one faster? How much? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Newbie - create image error URGENT

2002-05-18 Thread Henry
Do you have GD Installed? "Dani" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi everyone! > > I'm still learning PHP and MYSQL using windows98, MYSQL, PHP 4 in my > local hard drive. > > I want to learn uploading image and resizing image in my local machine

Re: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread r
Hey, Thank you for replying. Nope am not using IIS, I just have a plain win2k machine that used to ftp without any problems before.now i cant even find ftp.dll but can find ftp://ftp.exe I am unable to connect to 5 sites owned by the company i work for but am able to connect to them when i go

[PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread andy
Hi there, I would like to validate a website adress. Unfortunatelly my eregi stmt does not work: if (eregi("^@([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3}))", $website)){ // not a link I am getting the error msg: Warning: REG_ERANGE in extend.inc on line 94 does anybody know whats wroong with that? T

RE: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread Dan Hardiker
>> I have reciently setup apache and PHP and now FTP does not work! I am >> running a win2k pro machine, is this because of PHP or >> APACHE or what? [..] > Unless you did something totally off the wall I seriously doubt Apache > or PHP are affecting your FTP server. Unless your using IIS to serv

RE: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread Craig Vincent
> I'm a newbie so please forgive the question, > I have reciently setup apache and PHP and now FTP does not work! > I am running a win2k pro machine, is this because of PHP or > APACHE or what? > am going crazy and have searched google like crap without any damn > answer...then went to microsoft.c

  1   2   >