php-general Digest 10 Apr 2001 13:20:50 -0000 Issue 619 Topics (messages 47911 through 48019): Re: huge PHP file, hardcore processing 47911 by: Yasuo Ohgaki 47912 by: Christian Dechery 47915 by: Lindsay Adams 47916 by: Christian Dechery 47974 by: Plutarck 48004 by: Christian Dechery 48005 by: Christian Dechery 48011 by: Michael Kimsal Re: populating dropdown list problems 47913 by: David Robley while loop 47914 by: Jacky 47917 by: Lindsay Adams 47919 by: David Robley 47920 by: Michael Hall 47947 by: Zeus 47949 by: Jason Murray 47951 by: David Robley 47952 by: Zeus 47953 by: Jacky 47955 by: Brian Clark 47956 by: Brian Clark 47957 by: Jack Dempsey 47958 by: Jacky 47959 by: Brian Clark 47961 by: Zeus 47967 by: Jack Dempsey 47972 by: Philip Olson 47979 by: Yasuo Ohgaki Re: <?xml version="1.0"?> & PHP 47918 by: Brian Clark 47930 by: trogers Re: Controlling just size with regular expressions 47921 by: CC Zona 47993 by: Christian Reiniger WHAT IF I DONT WANT TO USE ZEND......(help) 47922 by: Dallas K. Empting all variables 47923 by: Nathan Roberts 47996 by: Christian Reiniger last three characters of a string 47924 by: Joseph Bannon 47926 by: Brian Clark 47927 by: David Robley 47928 by: Jack Dempsey Re: Array Sort? 47925 by: Chris Anderson Libcurl problems 47929 by: Jason Murray Edit crontab to set schedule.. 47931 by: E K L 47932 by: Lewis Bergman 47935 by: E K L 47945 by: Brian Clark Re: HELP...Installation of PHP on Debian Linux! 47933 by: Wayne Topa Re:HTML front end for building page logic online 47934 by: Dennis Gearon what could cause the maximum execution time exceeded? 47936 by: Jacky 47937 by: trogers 47939 by: David Robley 47970 by: B. van Ouwerkerk 47980 by: Rahul Bhide Re: Why a javascript have problem if it is dynamic load? 47938 by: Carfield Yim Another Select question 47940 by: Peter Houchin 47941 by: Alvin Tan 47942 by: Jason Murray 47943 by: Peter Houchin Back Button Dilemma's 47944 by: RealGM 47976 by: Plutarck 47985 by: Robert Vetter Re: login & security 47946 by: David Minor Re: Adding GD for win PHP 47948 by: elias Re: Supplied argument is not a valid MySQL result resource 47950 by: elias 47973 by: Plutarck Zend IDE 1.10 and Debugger Mini-review 47954 by: John page counter 47960 by: Wen Ni 47962 by: Jack Dempsey 47963 by: Brian Clark 47964 by: Brian Clark 47965 by: Keyur Kalaria 47968 by: Chris Aitken 47969 by: Jack Dempsey 47988 by: Jean-Arthur Silve test 47966 by: Ralph Guzman Re: Finer points of debugging: vardump vs. print_r 47971 by: John Re: I am SO confused (help with references!) (could be a bug?) 47975 by: \[Intent A/S\] Tais M. Hansen 47977 by: Plutarck 47978 by: \[Intent A/S\] Tais M. Hansen $8/mo php hosting on 24/7, OC3+ web server 47981 by: Jeffrey Greer Re: Why my php page will reply "session expire" when the use press back button? 47982 by: Carfield Yim Re: Sorry - Way OT but I need help 47983 by: Andy Woolley php -> html 47984 by: ewoong 47986 by: Renze Munnik 48002 by: Yasuo Ohgaki can't restart apache, help needed 47987 by: Thomas Angst 47989 by: Felix Kronlage 47990 by: Alexander Wagner 47994 by: Thomas Angst what does this error means? 47991 by: Jacky 47995 by: Keyur Kalaria 48000 by: Taylor, Stewart php.ini 47992 by: Michael Hall php site down? 47997 by: Michael Hall 47999 by: Nick Davies 48012 by: Zeus Re: Upload file from my local C: 47998 by: Christian Reiniger 48001 by: Keyur Kalaria Turn display_errors on and off 48003 by: Greig, Euan 48007 by: elias register_shutdown_function - uses for 48006 by: Greig, Euan 48014 by: elias Inserting time + date entry into mySQL DB 48008 by: Zeus 48010 by: Michael Hall 48016 by: elias 48019 by: Zeus Re: L? 48009 by: bill 48013 by: Michael Hall Parse error 48015 by: Mike 48018 by: elias MySql: Default values 48017 by: elias 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] ----------------------------------------------------------------------
IIS ISAPI(PHP4.0.4pl1 and PHP4.0.5RC1) does not work well for me and too many problems. So I switched to Apache. However, ob_implicit_flush() seems slows things down on W2K/Apache/PHP4.0.4RC1 also. (ob_implicit_flush() may slow things down, but it's more apparent than my Linux/Apache box) You may get better result on UNIX/Apache. Someone mentioned he/she does not have any problem with W2K/IIS ISAPI/PHP4.0.3pl1 with more than 250,000 hits/day. You may want to down grade your PHP to 4.0.3pl1. Regards, -- Yasuo Ohgaki "Christian Dechery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a huge (at least I think, for a script anyway) PHP script... it is > over 1.000 lines of code. > And it updates (do an entire DELETE-ALL / LOAD-ALL) an SQL Server database > (over 35MB). It runs for over an hour (sometimes 2hs)... and I divided it > into steps... so each step is a function in the script that when is over > calls a javascript function that reloads the script to the next step. > > I was wondering if this is enough to get a good 'memory-cleaning'. Or it > would be better to have lots of files (in total, there are 27 separate > steps). I began noticing some processing slowness after the first 35 > mins... it get's 'tired'. The script starts running and with > ob_implicit_flush() on, the output is flushed almost at real time... but > after 10 or 12 steps it starts to get slow and do NO FLUSHING at all... > only showing the entire output at once after the whole step has ended. > Should I split it into files? Is because it's running on (eek!) IIS? Maybe > the size of the file is getting in the way? > > Can someone help me out? > > Ah... one other thing. Has anybody experienced very weird behaviours of PHP > with IIS? Sometimes I press 'stop' at the browser but PHP is still running. > I can see it eating up memory in the TaskManager. And it won't stop until I > kill it. And the most weird part is, as soon as I call a script (any > script) PHP returns to the TaskManager with the same amount of memory it > had when it was running tha massive script mentioned above. Does IIS really > suck, or is there something very wrong with my config? > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer > > > -- > 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] >
At 10:23 10/4/2001 +0900, you wrote: >IIS ISAPI(PHP4.0.4pl1 and PHP4.0.5RC1) does not work well for me and too many >problems. So I switched to Apache. However, ob_implicit_flush() seems slows >things down on W2K/Apache/PHP4.0.4RC1 also. (ob_implicit_flush() may slow >things >down, but it's more apparent than my Linux/Apache box) > >You may get better result on UNIX/Apache. > >Someone mentioned he/she does not have any problem with W2K/IIS >ISAPI/PHP4.0.3pl1 with more than 250,000 hits/day. You may want to down grade >your PHP to 4.0.3pl1. but how can I access an MS SQL database from Apache??? ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
On 4/9/01 6:38 PM, "Christian Dechery" <[EMAIL PROTECTED]> wrote: > At 10:23 10/4/2001 +0900, you wrote: >> IIS ISAPI(PHP4.0.4pl1 and PHP4.0.5RC1) does not work well for me and too many >> problems. So I switched to Apache. However, ob_implicit_flush() seems slows >> things down on W2K/Apache/PHP4.0.4RC1 also. (ob_implicit_flush() may slow >> things >> down, but it's more apparent than my Linux/Apache box) >> >> You may get better result on UNIX/Apache. >> >> Someone mentioned he/she does not have any problem with W2K/IIS >> ISAPI/PHP4.0.3pl1 with more than 250,000 hits/day. You may want to down grade >> your PHP to 4.0.3pl1. > > but how can I access an MS SQL database from Apache??? > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer > with PHP Apache/PHP combo will run just fine on Windows, and you should be able use PHP's ODBC functions to access Access databases. see: http://www.php.net/manual/en/ref.odbc.php
At 18:40 9/4/2001 -0700, you wrote: >On 4/9/01 6:38 PM, "Christian Dechery" <[EMAIL PROTECTED]> wrote: > > > At 10:23 10/4/2001 +0900, you wrote: > >> IIS ISAPI(PHP4.0.4pl1 and PHP4.0.5RC1) does not work well for me and > too many > >> problems. So I switched to Apache. However, ob_implicit_flush() seems > slows > >> things down on W2K/Apache/PHP4.0.4RC1 also. (ob_implicit_flush() may slow > >> things > >> down, but it's more apparent than my Linux/Apache box) > >> > >> You may get better result on UNIX/Apache. > >> > >> Someone mentioned he/she does not have any problem with W2K/IIS > >> ISAPI/PHP4.0.3pl1 with more than 250,000 hits/day. You may want to > down grade > >> your PHP to 4.0.3pl1. > > > > but how can I access an MS SQL database from Apache??? > > ____________________________ > > . Christian Dechery (lemming) > > . http://www.tanamesa.com.br > > . Gaita-L Owner / Web Developer > > >with PHP > >Apache/PHP combo will run just fine on Windows, and you should be able use >PHP's ODBC functions to access Access databases. sorry... I did not make myself clear. I don't intend to switch from IIS to Apache, cuz I can't. The server runs a whole site in ASP... this is the only PHP script that runs on it, I was thinking more of running it in Linux... can I access a MS SQL server from within Apache/PHP under Linux??? ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
Note: if you hit the stop button and php doesn't stop, that probably means it's either in the middle of a query and can't stop, or more likely it means that "ignore.user.abort" has been set to true. Turn off ignore user abort in your php.ini, and that should solve your problem. As for accessing any database on any system configuration, yes PHP can do it. You can have a DB running on a Super Nintendo accessed by PHP on a FreeBSD box, and it should work fine. ;) In other words it doesn't matter what platform it's running on...in a perfect world. -- Plutarck Should be working on something... ...but forgot what it was. "Christian Dechery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a huge (at least I think, for a script anyway) PHP script... it is > over 1.000 lines of code. > And it updates (do an entire DELETE-ALL / LOAD-ALL) an SQL Server database > (over 35MB). It runs for over an hour (sometimes 2hs)... and I divided it > into steps... so each step is a function in the script that when is over > calls a javascript function that reloads the script to the next step. > > I was wondering if this is enough to get a good 'memory-cleaning'. Or it > would be better to have lots of files (in total, there are 27 separate > steps). I began noticing some processing slowness after the first 35 > mins... it get's 'tired'. The script starts running and with > ob_implicit_flush() on, the output is flushed almost at real time... but > after 10 or 12 steps it starts to get slow and do NO FLUSHING at all... > only showing the entire output at once after the whole step has ended. > Should I split it into files? Is because it's running on (eek!) IIS? Maybe > the size of the file is getting in the way? > > Can someone help me out? > > Ah... one other thing. Has anybody experienced very weird behaviours of PHP > with IIS? Sometimes I press 'stop' at the browser but PHP is still running. > I can see it eating up memory in the TaskManager. And it won't stop until I > kill it. And the most weird part is, as soon as I call a script (any > script) PHP returns to the TaskManager with the same amount of memory it > had when it was running tha massive script mentioned above. Does IIS really > suck, or is there something very wrong with my config? > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer > > > -- > 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] >
At 12:06 10/4/2001 +0900, you wrote: >You should be able to use ODBC under UNIX. I guess. > >Source code for MS SQL Server modules seems it does not compile under UNIX. I >guess it may work with Apache under Windows. > > From mssql_win32_howto.txt in PHP source. > >24 Start Visual Studio, load php_modules.dsw, select the MSSQL projects, > 25 configuration and build it. > 26 > 27 This module requires ntwdblib.dll and one or more of the following dll's > 28 > 29 dbmsadsn.dll > 30 dbmsrpcn.dll > 31 dbmsshrn.dll > 32 dbmssocn.dll for tcp/ip connections > 33 dbmsspxn.dll for ipx/spx connections > 34 dbmsvinn.dll > 35 dbnmpntw.dll for netbios connections > >Sorry I don't use MS SQL Server. well... I don't have Visual Studio here... so I guess I'm stuck with shitty-old IIS... :( ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
At 12:06 10/4/2001 +0900, you wrote: >You should be able to use ODBC under UNIX. I guess. > >Source code for MS SQL Server modules seems it does not compile under UNIX. I >guess it may work with Apache under Windows. > > From mssql_win32_howto.txt in PHP source. > >24 Start Visual Studio, load php_modules.dsw, select the MSSQL projects, > 25 configuration and build it. > 26 > 27 This module requires ntwdblib.dll and one or more of the following dll's > 28 > 29 dbmsadsn.dll > 30 dbmsrpcn.dll > 31 dbmsshrn.dll > 32 dbmssocn.dll for tcp/ip connections > 33 dbmsspxn.dll for ipx/spx connections > 34 dbmsvinn.dll > 35 dbnmpntw.dll for netbios connections > >Sorry I don't use MS SQL Server. well... I don't have Visual Studio here... so I guess I'm stuck with shitty-old IIS... :( ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
Yes - look at freetds.org. > > sorry... I did not make myself clear. I don't intend to switch from IIS to > Apache, cuz I can't. The server runs a whole site in ASP... this is the > only PHP script that runs on it, I was thinking more of running it in > Linux... can I access a MS SQL server from within Apache/PHP under Linux??? > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer >
On Tue, 10 Apr 2001 04:37, Jason Dulberg wrote: > I would like to populate a dropdown list from a particular field of a > bunch of records. > Here's what I have so far on the modify page but it doesn't list stuff > from the database, all it prints is the number 1 which isn't in any of > the records. > > One version of this will be on an add page and another will be on a > modify page which has the current field selected. For the add script, > I'd just lose all the selected stuff that's on there now. > > print "<select name=\"owner\">"; > $result = mysql_query("SELECT owner,agent FROM homes;"); > while($a_row = mysql_fetch_array($result)) > { > printf('<option name="owner" > value="'.$a_row[owner].'">'.$a_row[owner].'</option>', $a_row[owner], > ($owner == $a_row[owner]) ? "selected" : "", $a_row[owner]); > } > print "</select>"; > > What am I doing wrong in this code? Even when I take out the selected > stuff, I still get a value of 1 in the list instead of the actual > contents of the field. > > Any help is greatly appreciated! > __________________ > Jason Dulberg > Extreme MTB > http://extreme.nas.net First guess - try referencing the field values as $a_row["owner"] to avoid possible ambiguity; owner without the quotes could be a constant. Also, you can use extract to get the row values and stick them in variables named as the field names - makes your code a bit easier to read. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
Hi people I am more like ASP programmer and new to PHP, In ASP, when we want to take all records in dayabase to display. After we did do the query, we call " Do while not RS.EOF ( mean do while not end of record file) , and display record accroding to the query. Is there anything that do teh same in PHP?? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
On 4/10/01 6:22 AM, "Jacky" <[EMAIL PROTECTED]> wrote: > Hi people > I am more like ASP programmer and new to PHP, In ASP, when we want to take all > records in dayabase to display. After we did do the query, we call " Do while > not RS.EOF ( mean do while not end of record file) , and display record > accroding to the query. > Is there anything that do teh same in PHP?? > cheers > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for yourself" > sure, while ($row = ODBC_fetch_into($result) {} will loop through every result record found, putting the contents of each record into an array, $row. see the www.php.net/manual for a general overview of the language
On Tue, 10 Apr 2001 22:52, Jacky wrote: > Hi people > I am more like ASP programmer and new to PHP, In ASP, when we want to > take all records in dayabase to display. After we did do the query, we > call " Do while not RS.EOF ( mean do while not end of record file) , > and display record accroding to the query. Is there anything that do > teh same in PHP?? > cheers While - have a look at the example for mysql_fetch_array for the concept. If you aren't using mysql, check the functions for the DB you are using for specific examples. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
$query = mysql_query("some SQL here"); while ($row = mysql_fetch_array($query)) { do stuff; } Mick On Tue, 10 Apr 2001, Jacky wrote: > Hi people > I am more like ASP programmer and new to PHP, In ASP, when we want to take all >records in dayabase to display. After we did do the query, we call " Do while not >RS.EOF ( mean do while not end of record file) , and display record accroding to the >query. > Is there anything that do teh same in PHP?? > cheers > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for yourself" >
> $query = mysql_query("some SQL here"); > while ($row = mysql_fetch_array($query)) { > do stuff; > } Isn't this suppose to be an infinite loop? while ($row is assigned to mysql_fetch_array($query)) { do stuffs; } someone correct me if I'm wrong? Zeus
> Isn't this suppose to be an infinite loop? > > while ($row is assigned to mysql_fetch_array($query)) { > do stuffs; > } > > someone correct me if I'm wrong? They key here is that there's a single "=" in the condition. <? while ($row = mysql_fetch_array($query)) { } ?> ... this is actually "while 'row equals the result of mysql_fetch_array($query)' returns true, do this..." mysql_fetch_array returns false when you run out of rows. Jason
On Tue, 10 Apr 2001 15:16, Zeus wrote: > > $query = mysql_query("some SQL here"); > > while ($row = mysql_fetch_array($query)) { > > do stuff; > > } > > Isn't this suppose to be an infinite loop? > > while ($row is assigned to mysql_fetch_array($query)) { > do stuffs; > } > > someone correct me if I'm wrong? > > Zeus Consider yourself corrected :-) mysql_fetch-array returns an array corresponding to the fetched row, or _false if there are no more rows_ So as soon as there are no more rows, $row = mysql_fetch_array($query) evaluates to false and the while exits. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
Isn't the '=' operator suppose to be used for assigning and not for evaluation. I thought '==' should be used in this context? Zeus ----- Original Message ----- From: David Robley <[EMAIL PROTECTED]> To: Zeus <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; Jacky <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, 10 April, 2001 1:53 PM Subject: Re: [PHP] while loop > On Tue, 10 Apr 2001 15:16, Zeus wrote: > > > $query = mysql_query("some SQL here"); > > > while ($row = mysql_fetch_array($query)) { > > > do stuff; > > > } > > > > Isn't this suppose to be an infinite loop? > > > > while ($row is assigned to mysql_fetch_array($query)) { > > do stuffs; > > } > > > > someone correct me if I'm wrong? > > > > Zeus > > Consider yourself corrected :-) mysql_fetch-array returns an array > corresponding to the fetched row, or _false if there are no more rows_ > > So as soon as there are no more rows, $row = mysql_fetch_array($query) > evaluates to false and the while exits. > > -- > David Robley | WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > AusEinet | http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA
Here I got this script: $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER BY start_date ASC"; $resultofrs = mysql_query($queryoffers, $connection) or die(mysql_error()); while($row = mysql_fetch_array($resultofrs)) $IsAva = $row[6]; } and it keep saying "maximum execution time exceeded 30 secs", am I doing something time consuming here? There are only 2 records in the table. cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Zeus <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; Jacky <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, April 10, 2001 12:58 AM Subject: Re: [PHP] while loop > Isn't the '=' operator suppose to be used for assigning and not for > evaluation. > > I thought '==' should be used in this context? > > Zeus > ----- Original Message ----- > From: David Robley <[EMAIL PROTECTED]> > To: Zeus <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; Jacky > <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, 10 April, 2001 1:53 PM > Subject: Re: [PHP] while loop > > > > On Tue, 10 Apr 2001 15:16, Zeus wrote: > > > > $query = mysql_query("some SQL here"); > > > > while ($row = mysql_fetch_array($query)) { > > > > do stuff; > > > > } > > > > > > Isn't this suppose to be an infinite loop? > > > > > > while ($row is assigned to mysql_fetch_array($query)) { > > > do stuffs; > > > } > > > > > > someone correct me if I'm wrong? > > > > > > Zeus > > > > Consider yourself corrected :-) mysql_fetch-array returns an array > > corresponding to the fetched row, or _false if there are no more rows_ > > > > So as soon as there are no more rows, $row = mysql_fetch_array($query) > > evaluates to false and the while exits. > > > > -- > > David Robley | WEBMASTER & Mail List Admin > > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > > AusEinet | http://auseinet.flinders.edu.au/ > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > > -- > 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 Jacky, @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote: > Here I got this script: > $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' > ORDER BY start_date ASC"; > $resultofrs = mysql_query($queryoffers, $connection) or die(mysql_error()); > while($row = mysql_fetch_array($resultofrs)) Are you missing the opening curly brace in the actual code? > $IsAva = $row[6]; > } ... -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Hi Zeus, @ 1:58:56 AM on 4/10/2001, Zeus wrote: > Isn't the '=' operator suppose to be used for assigning and not for > evaluation. In this case, it /is/ used for assignment. print $row['some_column']; ... >> > Isn't this suppose to be an infinite loop? >> > >> > while ($row is assigned to mysql_fetch_array($query)) { >> > do stuffs; >> > } >> > >> > someone correct me if I'm wrong? ... >> Consider yourself corrected :-) mysql_fetch-array returns an array >> corresponding to the fetched row, or _false if there are no more rows_ >> >> So as soon as there are no more rows, $row = mysql_fetch_array($query) >> evaluates to false and the while exits. >> >> -- >> David Robley | WEBMASTER & Mail List Admin ... -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Zeus wrote: > > Isn't the '=' operator suppose to be used for assigning and not for > evaluation. > yup. > I thought '==' should be used in this context? nope. Thing is, you ARE assigning. Here's a breakdown of the controlling part of the loop in english: --->while ($row = mysql_fetch_array($query)) { this can be thought of as this: 1. fetch an array from $query, which is a mysql result. 2. assign this value to $row 3. we do this AS LONG AS WE ARE ABLE TO FETCH THE ARRAY. that's the while part mysql_fetch_array keeps track of where it is in the array. after each while loop it moves a 'step ahead' in the result when it gets to the end, it can't fetch anymore information from your result. then it returns false. thus, it can't assign a value to $row. thus that statement is false. therefore the while loop exits > > > do stuffs; > > > } > > > > > > someone correct me if I'm wrong? > > > > > > Zeus > > > > Consider yourself corrected :-) mysql_fetch-array returns an array > > corresponding to the fetched row, or _false if there are no more rows_ > > > > So as soon as there are no more rows, $row = mysql_fetch_array($query) > > evaluates to false and the while exits. > > > > -- > > David Robley | WEBMASTER & Mail List Admin > > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > > AusEinet | http://auseinet.flinders.edu.au/ > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > 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]
Not in the actual code, sorry, I did not copy the opnneing bit, but there is one in the code. So the same question, I got error said, maximum execution time exceed, am I doing something time consuming here? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Brian Clark <[EMAIL PROTECTED]> To: PHP is not a drug. <[EMAIL PROTECTED]> Sent: Tuesday, April 10, 2001 1:05 AM Subject: Re: [PHP] while loop > > Hi Jacky, > > @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote: > > > Here I got this script: > > > $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' > > ORDER BY start_date ASC"; > > $resultofrs = mysql_query($queryoffers, $connection) or die(mysql_error()); > > > while($row = mysql_fetch_array($resultofrs)) > > Are you missing the opening curly brace in the actual code? > > > $IsAva = $row[6]; > > } > ... > > > -Brian > -- > PGP is spoken here: 0xE4D0C7C8 > Please do not carbon copy me on list replies. > > > > -- > 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 Jacky, @ 2:11:06 PM on 4/10/2001, Jacky@lilst wrote: > Not in the actual code, sorry, I did not copy the opnneing bit, but there is > one in the code. > So the same question, I got error said, maximum execution time exceed, am I > doing something time consuming here? Unless I'm blind this morning, I don't believe so. Try this and see what you get: <?php $query = "SELECT * FROM MiniOffers"; $result = @mysql_query($query, $connection) or die(mysql_error()); while($row = @mysql_fetch_array($result)) { $IsAva = $row[6]; } ?> ... >> @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote: >> >> > Here I got this script: >> >> > $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' >> > ORDER BY start_date ASC"; >> > $resultofrs = mysql_query($queryoffers, $connection) or > die(mysql_error()); >> >> > while($row = mysql_fetch_array($resultofrs)) >> >> Are you missing the opening curly brace in the actual code? >> >> > $IsAva = $row[6]; >> > } ... -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
That was detailed :) Thanks Jack, it fixed my misconception of the = and == operators. BUT ... > mysql_fetch_array keeps track of where it is in the array. > after each while loop it moves a 'step ahead' in the result the mysql_fetch_array fetches the results in an array but should it be an one time affair ?
Zeus wrote: > > That was detailed :) > > Thanks Jack, it fixed my misconception of the = and == operators. > > BUT ... > > > mysql_fetch_array keeps track of where it is in the array. > > after each while loop it moves a 'step ahead' in the result > > the mysql_fetch_array fetches the results in an array but should it be an > one time affair ? hey, i'm not sure i follow the 'should it be an one time affair' question... if should be a X time affair, where X is the amount of rows returned from mysql. if you're wondering about the = and it being a 'one time' thing...well, it is, but since its stuck in a while loop, it used 'once' again and again...if that's not TOO confusing... i think of it the same way as something like this: $count=0; while($count++<10){ echo "count is $count"; } the increment operater is a 'one time' operation, but used in a loop, it'll keep going... same if you had this... while(($count+=1)<10){ echo "count is $count"; } (except of course the second loop cuts off before 10...) this help?
What does this do : <?php error_reporting(E_ALL); $q = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER BY start_date ASC"; $r = mysql_query($q); if ($r == true) { while ($row = mysql_fetch_array($r)) { echo $row['start_date'] .'<br>'; } } else { echo ' no result '. mysql_error(); } ?> Regards, Philip On Tue, 10 Apr 2001, Jacky@lilst wrote: > Here I got this script: > > $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER > BY start_date ASC"; > $resultofrs = mysql_query($queryoffers, $connection) or die(mysql_error()); > > while($row = mysql_fetch_array($resultofrs)) > > > $IsAva = $row[6]; > } > > and it keep saying "maximum execution time exceeded 30 secs", am I doing > something time consuming here? There are only 2 records in the table. > cheers > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for > yourself" > ----- Original Message ----- > From: Zeus <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; > Jacky <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, April 10, 2001 12:58 AM > Subject: Re: [PHP] while loop > > > > Isn't the '=' operator suppose to be used for assigning and not for > > evaluation. > > > > I thought '==' should be used in this context? > > > > Zeus > > ----- Original Message ----- > > From: David Robley <[EMAIL PROTECTED]> > > To: Zeus <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; > Jacky > > <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Tuesday, 10 April, 2001 1:53 PM > > Subject: Re: [PHP] while loop > > > > > > > On Tue, 10 Apr 2001 15:16, Zeus wrote: > > > > > $query = mysql_query("some SQL here"); > > > > > while ($row = mysql_fetch_array($query)) { > > > > > do stuff; > > > > > } > > > > > > > > Isn't this suppose to be an infinite loop? > > > > > > > > while ($row is assigned to mysql_fetch_array($query)) { > > > > do stuffs; > > > > } > > > > > > > > someone correct me if I'm wrong? > > > > > > > > Zeus > > > > > > Consider yourself corrected :-) mysql_fetch-array returns an array > > > corresponding to the fetched row, or _false if there are no more rows_ > > > > > > So as soon as there are no more rows, $row = mysql_fetch_array($query) > > > evaluates to false and the while exits. > > > > > > -- > > > David Robley | WEBMASTER & Mail List Admin > > > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > > > AusEinet | http://auseinet.flinders.edu.au/ > > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > > > > > -- > > 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] >
> > On Tue, 10 Apr 2001 15:16, Zeus wrote: > > > > $query = mysql_query("some SQL here"); > > > > while ($row = mysql_fetch_array($query)) { This line is the same as do while( ($row = mysql_fetch_array($query)) == TRUE) { Common coding style in C/C++ and PHP :) Regards, -- Yasuo Ohgaki ""Zeus"" <[EMAIL PROTECTED]> wrote in message 00b601c0c183$55647f60$4f7618d2@zeus">news:00b601c0c183$55647f60$4f7618d2@zeus... > Isn't the '=' operator suppose to be used for assigning and not for > evaluation. > > I thought '==' should be used in this context? > > Zeus > ----- Original Message ----- > From: David Robley <[EMAIL PROTECTED]> > To: Zeus <[EMAIL PROTECTED]>; Michael Hall <[EMAIL PROTECTED]>; Jacky > <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, 10 April, 2001 1:53 PM > Subject: Re: [PHP] while loop > > > > On Tue, 10 Apr 2001 15:16, Zeus wrote: > > > > $query = mysql_query("some SQL here"); > > > > while ($row = mysql_fetch_array($query)) { > > > > do stuff; > > > > } > > > > > > Isn't this suppose to be an infinite loop? > > > > > > while ($row is assigned to mysql_fetch_array($query)) { > > > do stuffs; > > > } > > > > > > someone correct me if I'm wrong? > > > > > > Zeus > > > > Consider yourself corrected :-) mysql_fetch-array returns an array > > corresponding to the fetched row, or _false if there are no more rows_ > > > > So as soon as there are no more rows, $row = mysql_fetch_array($query) > > evaluates to false and the while exits. > > > > -- > > David Robley | WEBMASTER & Mail List Admin > > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > > AusEinet | http://auseinet.flinders.edu.au/ > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > > -- > 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 osium, @ 4:23:17 PM on 4/9/2001, [EMAIL PROTECTED] wrote: > I dunno if this is of any help, but when I use XML and php on the same page, > what I do to bypass that is just have php echo the XML. > echo "<?xml version="1.0"?>"; ... I think you meant: <?php echo '<?xml version="1.0"?>'; ?> -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Hi I do it this way: <? echo '<?xml version="1.0"?>' ; ?> must use single quotes Tom At 04:38 PM 9/04/01 -0400, Gary wrote: >Hi All, > When using the dtd below on a page that has a form with php. I get a > parser error for <?xml version="1.0"?> am I going to have to go back to a > HTML 4.01 dtd or can I do something like escape the ? ? > ><?xml version="1.0"?> ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >TIA Gary -- 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]
[quotes restored to bottom-posting order for clarity] In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Johnson, Kirk") wrote: > > I need a regular expression that accepts *anything* without > > restrictions, > > only that the size of the string should be between (for > > instance) 0 and 9 > > characters. I know the {0,9} trick, but how do I accept > > *anything* in a form > > field? > I think [.]{0,9} will get it. That would accept any string containing a substring of 0-9 literal periods in a row. The regex for a string of exactly 0-9 characters of any kind would be "^.{0,9}$". But FWIW using strlen() instead of a regex would probably be more efficient here... -- CC
On Monday 09 April 2001 23:37, you wrote: > Hi there, > > I need a regular expression that accepts *anything* without > restrictions, only that the size of the string should be between (for > instance) 0 and 9 characters. I know the {0,9} trick, but how do I > accept *anything* in a form field? "anything" = '.' => /^.{0,9}$/ will do the trick strlen () will be faster though -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) AAAAA - American Association Against Acronym Abuse
But I still want to encode my scripts.... AND have them run on all differant platforms AND run with little or no setup by the user??? What other alternatives are out there? I know about APC.... but it only seems to run on windows. I need somthing that I can show my client here soon..... so what could I use to encode my scripts, on differant server platforms, with little help from the user.?????? Thanks,
Is there a quick way to 'empty' all the variables I have set on a page? I need to clear everything before re-loading the page. Thanks Nathan
On Tuesday 10 April 2001 04:28, you wrote: > Is there a quick way to 'empty' all the variables I have set on a page? > I need to clear everything before re-loading the page. If you reload the page everything is cleared anyway (aside from session data) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) AAAAA - American Association Against Acronym Abuse
I need to examine the last 3 characters of a string. Is there code that does that? J
Hi Joseph, @ 10:48:03 PM on 4/9/2001, Joseph Bannon wrote: > I need to examine the last 3 characters of a string. Is there code > that does that? <?php $str = '[EMAIL PROTECTED]'; print substr($str,-3,3); ?> -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
On Tue, 10 Apr 2001 12:18, Joseph Bannon wrote: > I need to examine the last 3 characters of a string. Is there code that > does that? > > J You can extract them with substr - there are examples in the docs which demonstrate the use of negative start parameters to work backwards from the end of a string. You might want to trim the string first if you don't want any whitespace of EOL characters. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
echo "last 3 chars are " . substr($string,-3); Joseph Bannon wrote: > > I need to examine the last 3 characters of a string. Is there code that does > that? > > J > > -- > 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]
heh, sounds fun. Oh well Thanks ----- Original Message ----- From: "David Robley" <[EMAIL PROTECTED]> To: "Chris Anderson" <[EMAIL PROTECTED]>; "Chris Anderson" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: Monday, April 09, 2001 8:47 PM Subject: Re: [PHP] Array Sort? > On Fri, 6 Apr 2001 18:33, Chris Anderson wrote: > > Currently I am using the sort() command to sort an array. Unfortunately > > it uses the ascii number so all words starting with uppercase are > > before lowercase. Is there a case insensitive alphabetical sort that I > > don't know of? Thanks in advance ^_^ > > You might have to use usort and build a little case-insensitive sort > routine yourself. Remember that ASCII A + 32 = ASCII a and so forth. > -- > David Robley | WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > AusEinet | http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA >
Hi everyone, I'm having a few issues with libcurl. Judging from what I've seen in the PHP manual, this should work: <? $curlerrors = fopen("/tmp/curlerrors", "a"); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://www.inww.com"); // Destination URL curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // Output to a variable curl_setopt($curl, CURLOPT_POST, 1); // Use HTTP POST curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // Follow "Location: " hints. curl_setopt($curl, CURLOPT_STDERR, $curlerrors); // Error Log curl_setopt($curl, CURLOPT_HEADER, 0); // Include Headers curl_setopt($curl, CURLOPT_TIMEOUT, 20); // Default Timeout curl_setopt($curl, CURLOPT_POSTFIELDS, "a=b&c=d"); // Post Varaibles $data = curl_exec($curl); curl_close($curl); var_dump($data); ?> The problem is that this seems flaky. Sometimes it'll do something in the resulting page (I can tell this by whether the var_dump happens), other times I get absolutely nothing (not even the var_dump, which means it's bailing somewhere in the loop). I've looked in /tmp/curlerrors, and there's nothing. Can anyone help please? This is a tad frustrating... I'm sure I've just done something stupid. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
Hi all, I tried to edit the crontab file in this directory /etc to set schedule to run some programs. But, i failed to do so as the schedule doesn't work. I'm asking if anybody can help me to solve the problem. Below are the information: command written: 10 11 * * * root lynx -dump http://192.168.0.1/try1.php and i have this in mailbox when the scheduling failed: your terminal lacks the ability to clear the screen or position the cursor _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> and i have this in mailbox when the scheduling failed: > your terminal lacks the ability to clear the screen or position the > cursor wget has always worked well for me.
Then, what am i suppose to do to solve the problem? Please consult.... >From: Lewis Bergman <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >CC: [EMAIL PROTECTED] >Subject: Re: [PHP] Edit crontab to set schedule.. >Date: Mon, 9 Apr 2001 22:44:25 -0500 (CDT) > > > and i have this in mailbox when the scheduling failed: > > your terminal lacks the ability to clear the screen or position the > > cursor >wget has always worked well for me. > > >-- >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] > _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Hi E, @ 11:35:17 PM on 4/9/2001, E K L wrote: > I tried to edit the crontab file in this directory /etc to set > schedule to run some programs. Are you talking about /etc/cron.allow and /etc/cron.deny? If cron.allow exists, your login has to be there. If cron.deny exists, your login must not be in there. To add a cronjob, you need to use: shell> crontab -e Instead of editing the files directly. > But, i failed to do so as the schedule doesn't work. I'm asking if > anybody can help me to solve the problem. Below are the information: cron should be logging to a file somewhere. Locate that file and check it out. > command written: > 10 11 * * * root lynx -dump http://192.168.0.1/try1.php What is 'root' in the above for? It may be different on different systems, but this is typically the format: # minute hour mday month wday command And at the top, the PATH should be set. Either a) lynx has to be somewhere within your $PATH, or b) you must give the full path to lynx. > and i have this in mailbox when the scheduling failed: your terminal > lacks the ability to clear the screen or position the cursor Try: [all on one line] /path/to/lynx -dump http://192.168.0.1/try1.php > /full/path/to/output.txt [/all on one line] -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Subject: [PHP] HELP...Installation of PHP on Debian Linux! Date: Mon, Apr 09, 2001 at 11:48:17AM -0500 In reply to:Frank K Quoting Frank K([EMAIL PROTECTED]): > > I am having trouble installing PHP4 on my linux machine. I downloaded to source > and i did a ./configure then a make then a make install. That all went good. Why? > Now i am trying to find the libphp4.so file. I did a couple search commands but > it could not find it. Can anyone help me with finding this file...like where it > was installed on your machine. I uncompressed it in my home directory > /home/username > > Thanks, > -Frank On debian (2.0 and above) an 'apt-get install php4' is all you have to do. Apt-get installs all of the dependices. dpkg -S libphp4.so gives php4: /usr/lib/apache/1.3/libphp4.so no need to bother with getting the source, etc, on Debian. It's not like Slackware! -- Will the information superhighway have any rest stops? _______________________________________________________
I found something online that is an /*application*/ that does pretty close to what I'd like to see in my previous post. I'd like to have a front end that could put the pieces together into one file. The application is "libero", at http://www.imatix.com/. Libero does require that the user hand insert the code inside of the function/block/procedure stubs. I'd like to have the script outputting the pages that the page logic was entered on assemble the pieces. -- ----------------------------------------------------------------- Look lovingly upon the present, for it holds the only things that are forever true. ----------------------------------------------------------------- Sincerely, Dennis Gearon (Kegley)
Hi people I ran a PHP page and there was an error said below: Fatal error Maximum execution time of 30 seconds exceeded in include/getRoomDesc.php4 What could cause this?? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
Hi possibly a loop running endlessly.. Tom At 11:02 AM 10/04/01 -0500, Jacky wrote: >Hi people >I ran a PHP page and there was an error said below: >Fatal error Maximum execution time of 30 seconds exceeded in >include/getRoomDesc.php4 >What could cause this?? >Jack >[EMAIL PROTECTED] >"There is nothing more rewarding than reaching the goal you set for yourself"
On Wed, 11 Apr 2001 01:32, Jacky wrote: > Hi people > I ran a PHP page and there was an error said below: > Fatal error Maximum execution time of 30 seconds exceeded in > include/getRoomDesc.php4 What could cause this?? The script is running for more than 30 seconds. As to what causes it - look in your script. You may have an infinite loop, although if you're using Linux they should run in under 5 seconds :-) or you are doing something time consuming in the script. See the configuration section for ways to increase the timeout period if all is well in your script and you just need more time. There is also set_time_limit function that you can use on a per-script basis. Check the docs for more info. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
At 11:02 10-4-01 -0500, Jacky wrote: >Hi people >I ran a PHP page and there was an error said below: >Fatal error Maximum execution time of 30 seconds exceeded in >include/getRoomDesc.php4 >What could cause this?? The rain??!!.... HOW should we know without some code.. You can post it or put it in a .txt file and give us a link.. Uhm.. The problem might be caused by a slow response from the databaseserver.. seems to happen if an ISP's server is crowded. Could also happen if you try to connect to a remote source.. Bye, B.
Just wondering ---if your question means . Where is the time limit set ? then the answer is ---php.ini file (usually sitting in the /usr/local/lib directory) . please ignore if I interpreted the question wrong !!. bye, ~Rahul "B. van Ouwerkerk" wrote: > At 11:02 10-4-01 -0500, Jacky wrote: > >Hi people > >I ran a PHP page and there was an error said below: > >Fatal error Maximum execution time of 30 seconds exceeded in > >include/getRoomDesc.php4 > >What could cause this?? > > The rain??!!.... HOW should we know without some code.. You can post it or > put it in a .txt file and give us a link.. > > Uhm.. The problem might be caused by a slow response from the > databaseserver.. seems to happen if an ISP's server is crowded. > Could also happen if you try to connect to a remote source.. > > Bye, > > B. > > -- > 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]
Jean-Arthur Silve wrote: > Hi ! > > don't you think that the problem comes from : window.history.go(0); located > in your populateTown function ? > I guess that Netscape reload you page when you tell "history.go(0)" Thx, I have solve my problem
can some one tell me if this should work or not please? <option value="Ultra 1 <? if ($system == 'Ultra 1') { echo 'SELECTED'; }?>">Ultra 1</option> as i cant seem to get it working even if i change SELECTED to OPTION Peter
Try <option value="Ultra 1" <? if ($system == 'Ultra 1') { echo 'SELECTED'; }?>>Ultra 1</option> @lvin -----Original Message----- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 12:30 PM To: Php-General@Lists. Php. Net Subject: [PHP] Another Select question can some one tell me if this should work or not please? <option value="Ultra 1 <? if ($system == 'Ultra 1') { echo 'SELECTED'; }?>">Ultra 1</option> as i cant seem to get it working even if i change SELECTED to OPTION Peter
> <option value="Ultra 1 <? if ($system == 'Ultra 1') { echo > 'SELECTED'; }?>">Ultra 1</option> This shouldn't work. It will produce: <option value="Ultra 1 SELECTED">Ultra 1</option> Try moving your " and a space: <option value="Ultra 1"<? if ($system == 'Ultra 1') { echo ' SELECTED'; }?>>Ultra 1</option>
Thanks :> -----Original Message----- From: Alvin Tan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:32 PM To: Peter Houchin; Php-General@Lists. Php. Net Subject: RE: [PHP] Another Select question Try <option value="Ultra 1" <? if ($system == 'Ultra 1') { echo 'SELECTED'; }?>>Ultra 1</option> @lvin -----Original Message----- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 12:30 PM To: Php-General@Lists. Php. Net Subject: [PHP] Another Select question can some one tell me if this should work or not please? <option value="Ultra 1 <? if ($system == 'Ultra 1') { echo 'SELECTED'; }?>">Ultra 1</option> as i cant seem to get it working even if i change SELECTED to OPTION Peter
Hi Guys, I know everywhere it says that it is not possible to actually disable the back button, and people have offered some solutions that have not worked for me, this is why I am emailing this list. I have a form which displays the same page with new content (controlled by a counter) in a loop until an exit point is reached. When the user clicks back on the browser the counter still increments and the screen continues like the user pressed the continue button (which is the process I want the user to take). The problem is the user did not make a selection and this is where the problem lies (it takes the default, which throws the whole process out of whack). The question I am asking is how can I prevent the user trying to go back? Is there any code out there which can counter this action (and not cause my counter to increment, thus moving the user to the next screen)? Is there any way to detect that the back button/option has been selected and display a "warning" type page before going back to where the user is? The forward counter action does not really fix my problem. Thanks, Michael. Chief Information Officer, RealGM, Inc. http://www.realgm.com
If you know javascript, you might try something like history.go(20) on each page. It _should_ cause the user to catapult forward in their history list each time they load the page. If they haven't used their back button, then having javascript "push" their forward button should do nothing. That keeps them from going back and changing a selection. The other way is when someone submits the page, save that data so that if the person resubmits the page not only are the changes ignored, but they are redirected to the page they should be on. Or ideally you can just make the whole thing in one php page. When someone submits their info, save it and give them the next form. (the best way to do it) Or you could just use the good ole fashion flash applet, which breaks most people's back buttons :) (that can be gotten around, of course, and only happens on some peoples systems) -- Plutarck Should be working on something... ...but forgot what it was. ""RealGM"" <[EMAIL PROTECTED]> wrote in message 009901c0c17f$ed066300$9d14c9cb@m3g7o5">news:009901c0c17f$ed066300$9d14c9cb@m3g7o5... Hi Guys, I know everywhere it says that it is not possible to actually disable the back button, and people have offered some solutions that have not worked for me, this is why I am emailing this list. I have a form which displays the same page with new content (controlled by a counter) in a loop until an exit point is reached. When the user clicks back on the browser the counter still increments and the screen continues like the user pressed the continue button (which is the process I want the user to take). The problem is the user did not make a selection and this is where the problem lies (it takes the default, which throws the whole process out of whack). The question I am asking is how can I prevent the user trying to go back? Is there any code out there which can counter this action (and not cause my counter to increment, thus moving the user to the next screen)? Is there any way to detect that the back button/option has been selected and display a "warning" type page before going back to where the user is? The forward counter action does not really fix my problem. Thanks, Michael. Chief Information Officer, RealGM, Inc. http://www.realgm.com
RealGM wrote: > > Hi Guys, > > I know everywhere it says that it is not possible to actually disable the back >button, and people have offered some solutions that have not worked for me, this is >why I am emailing this list. > > I have a form which displays the same page with new content (controlled by a >counter) in a loop until an exit point is reached. When the user clicks back on the >browser the counter still increments and the screen continues like the user pressed >the continue button (which is the process I want the user to take). The problem is >the user did not make a selection and this is where the problem lies (it takes the >default, which throws the whole process out of whack). Before I can help you: How did you programm the counter? Do you forward it in a HTML-form to the PHP script? Or do you use the counter only server-side? Please attach the code. Robert
read this tutorial: http://www.zend.com/zend/tut/authentication.php also, I have implemented this and am very happy with it: http://phortify.sourceforge.net Best of luck, dm on 4/9/01 8:19 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > From: "kaab kaoutar" <[EMAIL PROTECTED]> > Date: Mon, 09 Apr 2001 17:00:31 -0000 > To: [EMAIL PROTECTED] > Subject: login & security > > Hi! > i have developped a site using php, but i'd like to add a login acess > for private pages, i mean only subscribed epople are allowed to access > certain pages , how can i do that and how can i overpass the problem of > showing the url , knowing that if someone saw the url he may open it > without loging > Thanks
Basically you need php_gd.dll then you need to modify your php.ini and un-comment the line which looks line: ;extension=php_gd.dll and it works fine. i'm running WinME+PWS. -elias http://www.kameelah.org/eassoft "Brandon Orther" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I am running PHP4, Apache 1.3, on Win2000. Can I download a dll and put > that in a directory to get GD working? Or what would I have to do to add it > to my PHP? > > ThankZ > Brandon > > > -- > 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] >
can you show me some code? basically when you provide an invalid link to any MySql function this error occur. -elias http://www.kameelah.org/eassoft ""Nathan Roberts"" <[EMAIL PROTECTED]> wrote in message 9atdps$kgv$[EMAIL PROTECTED]">news:9atdps$kgv$[EMAIL PROTECTED]... > I am trying to get to grips with managing data in mysql, am am currentky > working on deleting records > > I have worked through a turorial - no problems, but now I am trying to apply > it to my own database, I am getting the error > Warning: Supplied argument is not a valid MySQL result resource in .... on > line 14 > > I cannot see what is causing it - if anyone can it would be much > appreciated. > > thanks > > Nathan > > For clarity/brevity I have cut the page back to what i beleive to be the > relivant part. Code for page is:- > > <html> > > <body> > > <?php > > $db = mysql_connect("localhost", "username", "pasword"); > > mysql_select_db("catalogue",$db); > > > $result = mysql_query("SELECT * FROM SECTIONS",$db); > > while ($myrow = mysql_fetch_array($result)) { > > printf("<a href=\"%s?section_id=%s\">%s %s</a> \n", $PHP_SELF, > $myrow["section_id"], $myrow["section_name"], $myrow["section"]); > > printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a><br>", $PHP_SELF, > $myrow["section_id"]); > > } > > > ?> > > > > </body> > > </html> > > > SQL for the table is > > CREATE TABLE SECTIONS ( > section_name varchar(25) NOT NULL, > section_id tinyint(3) unsigned DEFAULT '0' NOT NULL auto_increment, > section char(1) NOT NULL, > PRIMARY KEY (section_id), > UNIQUE section (section_name, section_id, section) > > > > > -- > 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] >
That means that your mysql_query probably returned an error. It should do that only when you screw up your syntax. echo/print out the syntax used in your query, and post it here. That is probably the problem you are having. -- Plutarck Should be working on something... ...but forgot what it was. ""Nathan Roberts"" <[EMAIL PROTECTED]> wrote in message 9atdps$kgv$[EMAIL PROTECTED]">news:9atdps$kgv$[EMAIL PROTECTED]... > I am trying to get to grips with managing data in mysql, am am currentky > working on deleting records > > I have worked through a turorial - no problems, but now I am trying to apply > it to my own database, I am getting the error > Warning: Supplied argument is not a valid MySQL result resource in .... on > line 14 > > I cannot see what is causing it - if anyone can it would be much > appreciated. > > thanks > > Nathan > > For clarity/brevity I have cut the page back to what i beleive to be the > relivant part. Code for page is:- > > <html> > > <body> > > <?php > > $db = mysql_connect("localhost", "username", "pasword"); > > mysql_select_db("catalogue",$db); > > > $result = mysql_query("SELECT * FROM SECTIONS",$db); > > while ($myrow = mysql_fetch_array($result)) { > > printf("<a href=\"%s?section_id=%s\">%s %s</a> \n", $PHP_SELF, > $myrow["section_id"], $myrow["section_name"], $myrow["section"]); > > printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a><br>", $PHP_SELF, > $myrow["section_id"]); > > } > > > ?> > > > > </body> > > </html> > > > SQL for the table is > > CREATE TABLE SECTIONS ( > section_name varchar(25) NOT NULL, > section_id tinyint(3) unsigned DEFAULT '0' NOT NULL auto_increment, > section char(1) NOT NULL, > PRIMARY KEY (section_id), > UNIQUE section (section_name, section_id, section) > > > > > -- > 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] >
http://php.weblogs.com/zend_ide_debugger "But we didn't get the Zend IDE to do typing. We want to use it for the Debugger stuff. Now global and local variables are visible in the Variables tab. You can drill down into arrays and objects to look at their values."
I got an example from the internet about the PHP page counter. However after several testing on the coding, I still met the problem which I don't understand. Please help me. <? $counter_file = "/home/venus/public_html/qa/doccon/doc_distribution/count.txt"; $counter_file_line = file($counter_file); $counter_file_line[0]++; print "counter=$counter_file_line\n"; $cf = fopen($counter_file,"w"); fputs($cf, "$counter_file_line[0]"); fclose($cf); echo $counter_file_line[0]; ?> problems: Warning: fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w") - Permission denied in /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9 Warning: Unable to find file identifier 0 in /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 10 Warning: Unable to find file identifier 0 in /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 11 ################ Thanks from: Wendy
> Warning: > fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w") > - Permission denied in > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9 Check your permissions on the file. If its just a counter file, the easiest thing to do would be to make it world writeable. chmod 777 count.txt. you should then have the perms to write to it. -jack
Hi Wendy, @ 1:38:45 AM on 4/10/2001, Wen Ni wrote: > I got an example from the internet about the PHP page counter. However > after several testing on the coding, I still met the problem which I > don't understand. Please help me. ... > "/home/venus/public_html/qa/doccon/doc_distribution/count.txt"; ... > Warning: > fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w") > - Permission denied in > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9 The file: /home/venus/public_html/qa/doccon/doc_distribution/count.txt Has to be writable by the user the web server is running as. Typically www or nobody. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Hi Jack, @ 2:44:51 AM on 4/10/2001, Jack Dempsey wrote: ... > Check your permissions on the file. If its just a counter file, the > easiest thing to do would be to make it world writeable. chmod 777 > count.txt. you should then have the perms to write to it. 777 is world writable. Bad idea. Maybe not for a simple counter file, but I wouldn't get into the habit of doing that. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Hi wen, Make sure that the counter file is readable by the user apache or user nobody which ever is your default webserver user. If it is not then just chown it to nobody or chmod it to 777 and you are done. Keyur ----- Original Message ----- From: "Keyur Kalaria" <[EMAIL PROTECTED]> To: "Wen Ni" <[EMAIL PROTECTED]> Sent: Tuesday, April 10, 2001 12:25 PM Subject: Re: [PHP] page counter > Hi > > Make sure that the counter file is readable by the user apache or user > nobody which ever is your default webserver user. > If it is not then just chown it to nobody or chmod it to 777 and you are > done. > > Keyur > > > > > ----- Original Message ----- > From: "Wen Ni" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 10, 2001 11:08 AM > Subject: [PHP] page counter > > > > I got an example from the internet about the PHP page counter. However > > after several testing on the coding, I still met the problem which I > > don't understand. Please help me. > > > > <? > > $counter_file = > > "/home/venus/public_html/qa/doccon/doc_distribution/count.txt"; > > > > $counter_file_line = file($counter_file); > > > > $counter_file_line[0]++; > > > > print "counter=$counter_file_line\n"; > > $cf = fopen($counter_file,"w"); > > fputs($cf, "$counter_file_line[0]"); > > fclose($cf); > > > > echo $counter_file_line[0]; > > > > ?> > > > > problems: > > > > Warning: > > fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w") > > - Permission denied in > > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9 > > > > Warning: Unable to find file identifier 0 in > > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 10 > > > > Warning: Unable to find file identifier 0 in > > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 11 > > > > > > ################ > > > > Thanks > > > > from: Wendy > > > > > -------------------------------------------------------------------------- -- > ---- > > > > -- > > 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] >
At 12:28 PM 10/04/2001, you wrote: >Hi wen, > >Make sure that the counter file is readable by the user apache or user >nobody which ever is your default webserver user. If it is not then just >chown it to nobody or chmod it to 777 and you are done. The catch 22 is...... If you want security then its best to change the ownership to be the same as the webserver. But the problem is, if you dont have root permissions on the box, you cant change the ownership (or if you can, you cant change it back once its done). I have root access on the machines I work on so its not a problem, but a regular user may not have this ability to change it. Chris -- Chris Aitken - Webmaster/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 8888 fax: +61 2 4628 8890 -------------------------------------------- Unix -- because a computer's a terrible thing to waste!
yes yes, bad habit i know ;-) but tis only a counter file... sometimes it probably is just better to explain the SLIGHTLY more complex solution in favor of starting a bad habit :-) all the best, jack Brian Clark wrote: > > Hi Jack, > > @ 2:44:51 AM on 4/10/2001, Jack Dempsey wrote: > > ... > > Check your permissions on the file. If its just a counter file, the > > easiest thing to do would be to make it world writeable. chmod 777 > > count.txt. you should then have the perms to write to it. > > 777 is world writable. Bad idea. Maybe not for a simple counter file, > but I wouldn't get into the habit of doing that. > > -Brian > -- > PGP is spoken here: 0xE4D0C7C8 > Please do not carbon copy me on list replies. > > -- > 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]
In addition of all people said, I would add a lock to the file : >$cf = fopen($counter_file,"w"); flock($cf,LOCK_EX); >fputs($cf, "$counter_file_line[0]"); >fclose($cf); This to avoid another script attempt to read the file while you update it... I had the problem, so sometimes the counter return to zero... jean-arthur At 13:38 10/04/01 +0800, Wen Ni wrote: >I got an example from the internet about the PHP page counter. However >after several testing on the coding, I still met the problem which I >don't understand. Please help me. > ><? >$counter_file = >"/home/venus/public_html/qa/doccon/doc_distribution/count.txt"; > >$counter_file_line = file($counter_file); > >$counter_file_line[0]++; > >print "counter=$counter_file_line\n"; >$cf = fopen($counter_file,"w"); >fputs($cf, "$counter_file_line[0]"); >fclose($cf); > >echo $counter_file_line[0]; > >?> > >problems: > >Warning: >fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w") >- Permission denied in >/home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9 > >Warning: Unable to find file identifier 0 in >/home/venus/public_html/qa/doccon/doc_distribution/New.php on line 10 > >Warning: Unable to find file identifier 0 in >/home/venus/public_html/qa/doccon/doc_distribution/New.php on line 11 > > >################ > >Thanks > >from: Wendy >-- >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] ---------------------------------------------------------------- EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr ----------------------------------------------------------------
...
Hi Morgan, You tip is fantastic. Will post it (with your permission) at my weblog, http://php.weblogs.com/ tomorrow. Regards, John "Morgan Curley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I generally include the following function: > function dump( $label, $input ){ > echo( "<PRE>" ); > echo( "<H2>$label</H2>\n" ); > print_r( $input ); > echo( "</PRE>" ); > return 1; > } > > or if you like javascript this pops up an alert wherever you insert the > dump call in your page > function dump( $label, $input ){ > ob_start(); > print_r( $input ); > $gc = ob_get_contents(); > ob_end_clean(); > > $gc = preg_replace( "/'/", "\\'", $gc ); > $gc = preg_replace( '/\n/', '\\n', $gc ); > echo( "<script>alert( '$label\\n".$gc."' );</script>" ); > return 1; > } > > then for simple debugging I call > dump( "My Label", $my_var ); > > With the javascript you can do some cool things like having divs generated > per $label. > > morgan > > > > At 02:26 PM 4/9/2001, you wrote: > >Just a question that has been besetting me for a while: > > > >which is better for debugging -- vardump( ) or print( ) ? > > > >Does anyone have a preference? Why? Is one better than the other? > >Thanks for answering this prickly question! > > > >John Lim > > > > > > > >-- > >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, Well... I don't know if this is any help but I ran your code under PHP/4.0b4 and got: "<br><br>Inside2 <br>Inside2 <br>Inside2 " Seems right to me? -- -- Intent A/S Tais M. Hansen Web Developer ""Plutarck"" <[EMAIL PROTECTED]> wrote in message 9asamr$865$[EMAIL PROTECTED]">news:9asamr$865$[EMAIL PROTECTED]... > If I were any more confused my head would split open. This just plain makes > no sense, and I'm wondering if it's just a bug in PHP. > Consider the following code: > ...
Odd...well I still don't have a clue how to do what I wanted, but I recoded it and now it works. I just run HTTP_POST_VARS, HTTP_GET_VARS, and HTTP_COOKIE_VARS through a special function that refines all the data. No errors, no bugs, no problem :) Thanks anway...maybe I'll figure out what's going on some day, lol. -- Plutarck Should be working on something... ...but forgot what it was. ""[Intent A/S] Tais M. Hansen"" <[EMAIL PROTECTED]> wrote in message 9auc2k$e5c$[EMAIL PROTECTED]">news:9auc2k$e5c$[EMAIL PROTECTED]... > Hi, > > Well... I don't know if this is any help but I ran your code under PHP/4.0b4 > and got: > > "<br><br>Inside2 <br>Inside2 <br>Inside2 " > > Seems right to me? > > > -- > -- > Intent A/S > > Tais M. Hansen > Web Developer > > ""Plutarck"" <[EMAIL PROTECTED]> wrote in message > 9asamr$865$[EMAIL PROTECTED]">news:9asamr$865$[EMAIL PROTECTED]... > > If I were any more confused my head would split open. This just plain > makes > > no sense, and I'm wondering if it's just a bug in PHP. > > Consider the following 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] >
Actually I ran it under PHP/4.0.4pl1! Forgot which server I were using! ;) But great that you got it working! I too hate seemingly illogical errors! :) -- -- Intent A/S Tais M. Hansen Web Developer ""Plutarck"" <[EMAIL PROTECTED]> wrote in message 9auchs$jku$[EMAIL PROTECTED]">news:9auchs$jku$[EMAIL PROTECTED]... > Odd...well I still don't have a clue how to do what I wanted, but I recoded > it and now it works. > > I just run HTTP_POST_VARS, HTTP_GET_VARS, and HTTP_COOKIE_VARS through a > special function that refines all the data. No errors, no bugs, no problem > :) > > Thanks anway...maybe I'll figure out what's going on some day, lol.
Hello, I am offering php hosting with features at a price no one else has, as far as I know. I'm not going to create a giant web hosting service. I'm doing this to pay for my web portal. - This web portal has been operated by the same person (my partner) for over four years. I have been a co-administrator for about six months. - this is on a dedicated server with OC3+ connection, bandwidth is guaranteed - 24/7 uptime is guaranteed, last reboot was 2/12/01. This site will not be down for more than one hour per year. - The computer running this site is at a web server farm in a protected building. Any hardware that fails is replaced immediately. - no bandwidth sucking sites are allowed, e.g. porno, fileserver, video, etc. - php 4.02 is installed - perl 5.0x and DBI are installed - MySQL 3.23.32 and PostgreSQL 7.0.3 are set up - You get a total of two databases - You get five email addresses, telnet, ssh, and ftp access - I will set up your domain name for an extra $15 or you can put your site at www.singlesconnection.org/<your username> - you get 40MB of hd space - webserver is Apache 1.3.12 and Red Hat Linux with kernel 2.2.18 - hardware - Pentium II with 128MB ram, scsi hard drive My name is Jeffrey Greer. You can mail me at [EMAIL PROTECTED] You can view more info at http://www.singlesconnection.org/services/php_hosting.php -- Jeff Greer - B.S. computer science - Univ. MO - Rolla - web developer/software engineer, dedicated to the struggle against the fascist Microsoft hegemony
> > Why my php page will reply "session expire" when the use press back > > button? And then all the information in the form that user fill is lost, > > how can I fix this? thx > > > > Set your session.cache_limitter to private and set some reasonable expration > time for session.cache_expire. > The above solution solve my "session expire" problem long ago, but recent I discover there is another problem. If I set the session.cache_limitter to "private" or "public", I find that IE will cache the login message of each page incorrectly. i.e.: In every page of my site, I will put a message like: "Hi, user XXX" in the heading. But even the user is logout or login with other username like "YYY", there is still message "Hi, user XXX" is SOME of the pages. There is no such problem in Netscape, and the problem persist even if I set "check if there is newer version of page every time visit" in IE. How can I fix this problem?
RE: [PHP] Sorry - Way OT but I need helpIf you place something like: ErrorDocument 404 /errors/404.php inside your .htaccess file and then create a file called 404.php in the errors directory it should work. You can also echo plain text to he screen using ErrorDocument 404 "Error Message Goes Here....." HTH Andy Woolley www.databasewatch.com ----- Original Message ----- From: Boget, Chris To: 'Andy Woolley' ; [EMAIL PROTECTED] Sent: Monday, April 09, 2001 7:57 PM Subject: RE: [PHP] Sorry - Way OT but I need help > I know this has nowt to do with PHP so I'll keep it as short > as possible. > My problem is, I'd like to get 404 error redirecting to work > in IE under Apache. I've set the ErrorDocument in apache.conf > and in .htaccess. It works in Netscape et al but not in IE. > IE seems to be issuing it's own error page. I know there must > be a config somewhere other than the client side "Show friendly > error messages", but can't seem to find it. I have RTFM and > scanned the Web but still not found it. Hope you can help. > Once again I apologize for being Off Topic. Does someone have an example of how to do this within .htaccess? I've tried everything and all I ever get is an Internal Server Error when the .htaccess file is in place... :/ Chris
Hello.. ^^ I am trying to save results for php files. for example.. I create abc.php3 following as.. # abc.php3 <? echo ("hello"); ?> If I run abc.php3 , the results is .. hello. So.. How can I this results to save file. # abc.html hello
ewoong wrote: > > Hello.. ^^ > > I am trying to save results for php files. > > for example.. > > I create abc.php3 following as.. > > # abc.php3 > > <? > echo ("hello"); > ?> > > If I run abc.php3 , the results is .. > > hello. > > So.. > > How can I this results to save file. > > # abc.html > > hello > > -- > 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] Check the manual! "Filesystem functions" -- * R&zE: *************************** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 ***************************
It's not simple with PHP3. (I don't know better way to do this with PHP3. You can make a wrapper function for output functions and store output to files. If you must use PHP3) If you need to do this a lot, upgrade to PHP4. It's easy with PHP4, since PHP4 supports output buffering functions. ob_start(), ob_get_contents(), etc. Much easier, much faster. Regards, -- Yasuo Ohgaki ""ewoong"" <[EMAIL PROTECTED]> wrote in message 9auilj$9st$[EMAIL PROTECTED]">news:9auilj$9st$[EMAIL PROTECTED]... > Hello.. ^^ > > I am trying to save results for php files. > > for example.. > > I create abc.php3 following as.. > > # abc.php3 > > <? > echo ("hello"); > ?> > > If I run abc.php3 , the results is .. > > hello. > > > So.. > > How can I this results to save file. > > # abc.html > > hello > > > > -- > 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] >
Hello to all, I have SuSE 7.1 installed and PHP4 source downloaded from www.php.net after ./configure --with-axps=/usr/sbin/apxs make make install and /etc/init.d/apache restart is the http server no more starteable. what's going wrong here, I didn't have any problems with the older version of the suse linux and PHP4, if anyone has an idea how to rerun the apache without a completly new compilation of it please tell me thanks and best regards Thomas
On Tue, Apr 10, 2001 at 12:02:45PM +0200, Thomas Angst wrote: > /etc/init.d/apache restart > is the http server no more starteable. > what's going wrong here, I didn't have any problems with the older version > of the suse linux and PHP4, if anyone has an idea how to rerun the apache > without a completly new compilation of it please tell me what do the logs say? (error-log of apache) what does 'httpd -X' do? -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet |
Thomas Angst wrote: > ./configure --with-axps=/usr/sbin/apxs > make > make install and > /etc/init.d/apache restart > is the http server no more starteable. What is the exact error-message? What does /sbin/init.d/apache configtest say? regards Wagner -- Assumption is the mother of all fuck-ups.
I didn't get any further errors as this in /ver/log/httpd/error_log: PHP Warning: Function registration failed - duplicate name - define in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - defined in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - each in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - strlen in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - strcmp in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - strcasecmp in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - error_reporting in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - leak in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - function_exists in Unknown on line 0 PHP Warning: Basic Functions: Unable to register functions, unable to load in Unknown on line 0 and /sbin/init.d does no more exist Thomas
When Itried to insert a record into a table, It looks like the record was never inserted into table so I use mysql_error() and the error message show up: "Duplicate entry '10' for key 1" What does that tell me? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
Hi Jacky, This means that your key 1 i,e the first field in the table is a primary key and the table contains a record which has a value 10 in the first field. Hope this is clear. Keyur $$$$$$$ ----- Original Message ----- From: "Jacky@lilst" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 11, 2001 3:55 AM Subject: [PHP] what does this error means? > When Itried to insert a record into a table, It looks like the record was > never inserted into table so I use mysql_error() and the error message show > up: > "Duplicate entry '10' for key 1" > What does that tell me? > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for > yourself" > > > -- > 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] > >
You are trying to add a record whose primary key/unique index already exists in the database. -Stewart -----Original Message----- From: Jacky@lilst [mailto:[EMAIL PROTECTED]] Sent: 10 April 2001 23:25 To: [EMAIL PROTECTED] Subject: [PHP] what does this error means? When Itried to insert a record into a table, It looks like the record was never inserted into table so I use mysql_error() and the error message show up: "Duplicate entry '10' for key 1" What does that tell me? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- 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]
Is it possible to override the maximum script execution time as set in php.ini using an Apache directive like this in an .htaccess file?: php_value max_execution_time = 60 Thanks Mick
I've been trying to get to the annotated manual all afternoon but can't get through to www.php.net. Anyone else have the same problem? Mick
There seems to be some routing problem at ALTER.NET (from the uk anyway). Nick. On Tue, 10 Apr 2001, Michael Hall wrote: > I've been trying to get to the annotated manual all afternoon but can't > get through to www.php.net. Anyone else have the same problem? > > Mick > > >
If you want to view it now, you can try going to http://php.intermedia.com.sg - Its a mirror. ----- Original Message ----- From: Nick Davies <[EMAIL PROTECTED]> To: Michael Hall <[EMAIL PROTECTED]> Cc: PHP List <[EMAIL PROTECTED]> Sent: Tuesday, 10 April, 2001 6:46 PM Subject: Re: [PHP] php site down? > > There seems to be some routing problem at ALTER.NET (from the uk anyway). > > Nick. > > On Tue, 10 Apr 2001, Michael Hall wrote: > > > I've been trying to get to the annotated manual all afternoon but can't > > get through to www.php.net. Anyone else have the same problem? > > > > Mick > > > > > > > > > -- > 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] >
On Monday 09 April 2001 18:35, you wrote: > Christian > > Below is my script. > > <? > if (!copy($file,"1.dat")) { > echo "error"; } > else { > echo "successful"; > } > ?> > > NOTE: where $file is passed by other html using form. how? using a <input type='file'> ? Then re-read the file uploading chapter in the manual > > I use a command "copy" to upload a file from my local win machine to > > webserver. However, it is not successful. It prompts that "Warning: > > Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to > > know what is the problem -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) AAAAA - American Association Against Acronym Abuse
Hi Reiniger, try this : copy(addslashes($file),"1.dat") hope it is clear. keyur ----- Original Message ----- From: "Christian Reiniger" <[EMAIL PROTECTED]> To: "HK Woo" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, April 10, 2001 4:15 PM Subject: Re: [PHP] Upload file from my local C: On Monday 09 April 2001 18:35, you wrote: > Christian > > Below is my script. > > <? > if (!copy($file,"1.dat")) { > echo "error"; } > else { > echo "successful"; > } > ?> > > NOTE: where $file is passed by other html using form. how? using a <input type='file'> ? Then re-read the file uploading chapter in the manual > > I use a command "copy" to upload a file from my local win machine to > > webserver. However, it is not successful. It prompts that "Warning: > > Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to > > know what is the problem -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) AAAAA - American Association Against Acronym Abuse -- 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]
I would like to be able to turn on-screen errors on and off selectively within scripts. I have tried using the error_reporting() function but this stops error messages going to the log file, which I want always to happen. It seems to me that I want to set the display_errors configuration option within my scripts. Is this possible, or is there an other way to do what I want? TIA Euan Greig Technical Consultant BRANN DATA [EMAIL PROTECTED] 01285 645997 ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. **************************************************************************
Try this alt solution: whenever you don't want onscreen solution call your functions as: @function_name('adadasd'); and if you want warning call them normally. -elias http://www.kameelah.org/eassoft ""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I would like to be able to turn on-screen errors on and off selectively within scripts. I have tried using the error_reporting() function but this stops error messages going to the log file, which I want always to happen. It seems to me that I want to set the display_errors configuration option within my scripts. Is this possible, or is there an other way to do what I want? > > TIA > > Euan Greig > Technical Consultant > BRANN DATA > [EMAIL PROTECTED] > 01285 645997 > > > > > > ************************************************************************** > Any opinions expressed in this email are those of the individual and > not necessarily the Company. This email and any files transmitted with > it, including replies and forwarded copies (which may contain alterations) > subsequently transmitted from the Company, are confidential and solely for > the use of the intended recipient. If you are not the intended recipient > or the person responsible for delivering to the intended recipient, be > advised that you have received this email in error and that any use is > strictly prohibited. > > ************************************************************************** > > -- > 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] >
I was hoping that I could use this function to enable me to finish scripts tidily when they time out or are aborted by the user. eg display the message "script timed out". However this will not work as no output is allowed in the shutdown function. I can see other ways to do what I want (but suggestions would always be welcome) but the real point of this email is this: what sort of thing would you use register_shutdown_function to achieve? Euan Greig Technical Consultant BRANN DATA [EMAIL PROTECTED] 01285 645997 ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. **************************************************************************
Hmm so you can't print?! can you redirect? Header("Location: mymessage.html"); -elias http://www.kameelah.org/eassoft ""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I was hoping that I could use this function to enable me to finish scripts tidily when they time out or are aborted by the user. eg display the message "script timed out". However this will not work as no output is allowed in the shutdown function. I can see other ways to do what I want (but suggestions would always be welcome) but the real point of this email is this: what sort of thing would you use register_shutdown_function to achieve? > > Euan Greig > Technical Consultant > BRANN DATA > [EMAIL PROTECTED] > 01285 645997 > > > > > > ************************************************************************** > Any opinions expressed in this email are those of the individual and > not necessarily the Company. This email and any files transmitted with > it, including replies and forwarded copies (which may contain alterations) > subsequently transmitted from the Company, are confidential and solely for > the use of the intended recipient. If you are not the intended recipient > or the person responsible for delivering to the intended recipient, be > advised that you have received this email in error and that any use is > strictly prohibited. > > ************************************************************************** > > -- > 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, I know this has been brought up repeatedly but I couldn't find the archives website. I'm doing a news publishing script (something like newsphp \ php-nuke) but uses mySQL to store all the data instead of flat files. I would like to make it such that everytime I submit an news entry, the time\date will automatically be inserted in that row. Could someone give me some suggestions? --------------------------------- David Chua aka. Zeus ---------------------------------
Create a field in your table called something like 'date' and make its data type TIMESTAMP. MySQL will automatically add a timestamp with each new entry ... assuming you're using UNIX, I don't know about windows. Mick > I know this has been brought up repeatedly but I couldn't find the archives website. > I'm doing a news publishing script (something like newsphp \ php-nuke) but uses >mySQL to store all the data instead of flat files. > I would like to make it such that everytime I submit an news entry, the time\date >will automatically be inserted in that row. > Could someone give me some suggestions?
No under windows doesn't work. you have to enter a value in that field with value NOW() -elias http://www.kameelah.org/eassoft "Michael Hall" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Create a field in your table called something like 'date' and make its > data type TIMESTAMP. MySQL will automatically add a timestamp with each > new entry ... assuming you're using UNIX, I don't know about windows. > > Mick > > > I know this has been brought up repeatedly but I couldn't find the archives website. > > I'm doing a news publishing script (something like newsphp \ php-nuke) but uses mySQL to store all the data instead of flat files. > > I would like to make it such that everytime I submit an news entry, the time\date will automatically be inserted in that row. > > Could someone give me some suggestions? > > > -- > 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] >
I want it such that when a user reads the news, he sees something like --------------- Saturday 25th March 2001 New mirror up on PHP - posted by Zeus @ 00:00 GMT +8 news news news news news news news news news news news news news --------------- That sort of thing, how can I go about? ----- Original Message ----- From: elias <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, 11 April, 2001 7:23 AM Subject: Re: [PHP] Inserting time + date entry into mySQL DB > No under windows doesn't work. > you have to enter a value in that field with value NOW() > > -elias > http://www.kameelah.org/eassoft > > "Michael Hall" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > Create a field in your table called something like 'date' and make its > > data type TIMESTAMP. MySQL will automatically add a timestamp with each > > new entry ... assuming you're using UNIX, I don't know about windows. > > > > Mick > > > > > I know this has been brought up repeatedly but I couldn't find the > archives website. > > > I'm doing a news publishing script (something like newsphp \ php-nuke) > but uses mySQL to store all the data instead of flat files. > > > I would like to make it such that everytime I submit an news entry, the > time\date will automatically be inserted in that row. > > > Could someone give me some suggestions? > > > > > > -- > > 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] >
I think L is 50. bill Kurth Bemis wrote: > what does the roman numeral L mean? > > can someone point me to a page that has all of the roman numerals and their > English equivlents? > > i forgot? > > ~kurth > > -- > 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]
Yep ... I unit V 5 X 10 L 50 C 100 D 500 M 1000 no zero ... try doing maths with this system. Mick > I think L is 50. > > bill > > Kurth Bemis wrote: > > > what does the roman numeral L mean?
Im getting a "missing )" error on line 77 but cant seem to find it.Am I missing something else thats causing it? for ($i =1;$i<=15;$i++) { if(!(isset(${'R'.$i.'P'};))) // line 77 { ${'R'.$i.'P'};="NULL"; } } Thanks Mike [EMAIL PROTECTED]
I think it is because you put a ';' in the isset() after the '}' i believe if you remove it it will work. -elias http://www.kameelah.org/eassoft ""Mike"" <[EMAIL PROTECTED]> wrote in message 9av0j6$h2k$[EMAIL PROTECTED]">news:9av0j6$h2k$[EMAIL PROTECTED]... > Im getting a "missing )" error on line 77 but cant seem to find it.Am I > missing something else thats causing it? > > for ($i =1;$i<=15;$i++) > { > if(!(isset(${'R'.$i.'P'};))) // line 77 > { > ${'R'.$i.'P'};="NULL"; > } > } > > Thanks > Mike > [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] >
Can a default field value in MySql be a function? Like default value of a date field should be the built-in function NOW()? anything like what i'm asking for? -elias http://www.kameelah.org/eassoft