php-general Digest 25 Apr 2001 10:16:05 -0000 Issue 648 Topics (messages 50201 through 50264): Re: File Transfer over HTTPS 50201 by: Rasmus Lerdorf ereg_replace 50202 by: Wade 50203 by: J. Jones Re: Very important. 50204 by: Plutarck 50244 by: Maxim Maletsky Re: getting rows from separate tables stacked in a single array ? (newbie, mysql) 50205 by: Steve Lawson 50221 by: Nicolas Mermet 50226 by: Steve Lawson 50248 by: Maxim Maletsky 50257 by: Tim Ward Re: checking if e-mail address and syntax are valid 50206 by: Plutarck 50233 by: Felix Kronlage Re: checking url 50207 by: Plutarck 50247 by: Maxim Maletsky Re: Newline in a guestbook 50208 by: Plutarck MSIE on Windows can't open PDF via SSL 50209 by: DAve Goodrich last modified 50210 by: Kasten, Holger 50242 by: Maxim Maletsky 50245 by: CC Zona Re: Parse Error for a weirdo! 50211 by: Yasuo Ohgaki Re: DOCUMENT_ROOT 50212 by: Yasuo Ohgaki 50250 by: Maxim Maletsky 50262 by: Jordan Elver user login names/values 50213 by: Dennis Gearon New uses please help mysql query problem 50214 by: Greg Kelly 50241 by: Maxim Maletsky Help php ICQ function 50215 by: Greg Kelly Can I install Lihnux on My Windows 95 machine ? 50216 by: Manisha 50217 by: Jack Dempsey 50218 by: Wade DeWerff 50219 by: Kath 50220 by: Manisha 50222 by: Manisha 50227 by: Yasuo Ohgaki 50228 by: Manisha 50234 by: Manisha 50235 by: Yasuo Ohgaki 50236 by: Brian Clark 50237 by: B. van Ouwerkerk random letters and numbers 50223 by: Randy Johnson 50224 by: Steve Lawson 50225 by: J. Jones Directory Alias Problems with Apache1.3/PHP4 50229 by: Vivre Draco hello 50230 by: SuiteNet Operations Manager 50240 by: Maxim Maletsky 50243 by: Ralph Guzman Re: .inc location security 50231 by: Avetis Avagyan unable to parse php 50232 by: Brendan_Caulfield.fujisawa.com 50239 by: elias Re: Precedence question- cookie value over form value? 50238 by: Rasmus Lerdorf the SkyBiz matrix|downline program using PHP & mySQL 50246 by: Thomas Edison Jr. Re: Lines 50249 by: Maxim Maletsky 50251 by: Jason Murray 50252 by: Maxim Maletsky 50255 by: Jason Murray Re: Newbie question about Classes 50253 by: Maxim Maletsky PHP --with-imap 50254 by: Calin Rotaru 50256 by: Alexander Wagner Re: Is there such an array like $array[][]? 50258 by: Tim Ward payment verification... 50259 by: elias PHP Binaries aside from Windows 50260 by: Kyutums 50261 by: Alexander Wagner PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER? 50263 by: Daniel BI Font? 50264 by: bpx 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] ----------------------------------------------------------------------
> If I wanted to use this utility to copy a file from a users (Windows) > workstation to my (Linux) webserver, how would I do this? The program on > the users workstation will create a file called "info.txt" and place it in > c:\wow. I want it to go to my server upload.mydomain.com. How do I get the > file c:\wow\info.txt from the user to my web server over https? You'll need the user to run some program that sends it. Like the curl thing if it actually works on Windows. -Rasmus
I am attempting to do an ereg_replace(), but the charachter I want to replace is a \. Any Ideas how I make the following work? $F_name = ereg_replace ("\", "", $acc_fname); echo $F_name; Thanks, Wade
On Tue, Apr 24, 2001 at 06:21:20PM -0400, Wade wrote: > I am attempting to do an ereg_replace(), but the charachter I want to > replace is a \. Any Ideas how I make the following work? > > $F_name = ereg_replace ("\", "", $acc_fname); > echo $F_name; > > Thanks, > Wade > use \\
I responded to the message which included the attachment, and here it is for those who missed it: Goody, a virus. LOL Note: According to the Virus scanner used on php.net (or on the mailing list. whichever) Emanuel.exe is a virus. Here is the URL for information on it: http://vil.mcafee.com/dispVirus.asp?virus_k=98881& Gotta hate when that happens. ----- end old message ----- -- Plutarck Should be working on something... ...but forgot what it was. ""Padraic Tynan"" <[EMAIL PROTECTED]> wrote in message 008701c0cd05$a0e274a0$[EMAIL PROTECTED]">news:008701c0cd05$a0e274a0$[EMAIL PROTECTED]... Hi. Yesterday an email-virus entitled Emanuel was sent out over this list, and I am not sure by who. It came in the form of Emanuel.exe, and had an icon resembling that of a standalone flash projector file (pink diamond with a white multi-pointed asterisk-type thing in the middle). This virus appears to be a backorifice or netbus style virus, and adds something to a system file that makes it so that *every* time you try to launch a program, it launches "Wintask.exe", which is *not* an official task, despite the name. It puts a green ICQ flower in your taskbar, and if you click it, a button pops up that says "Nunca <bla bla> esta button". The <bla bla> is because I forget the word for "push" in spanish, and I'm not about to open this program again -- It translates to "NEVER PUSH THE BUTTON" -- and trust me, *don't*, this, i have found, is what activates the virus. I may have lost several weeks of work to this virus, and I advise you all to watch out, as it was likely sent inadvertantly.
This virus was reply to each email sent. I, that day, have posted a reply here to someone. It reached some poor php-general list subscriber and it's outlook (or whatever) has replied to me personally with that .EXE file attached. I didn't open it of course since I receive such a staff at least twice a day (no kidding, I am subscribed to dozens of lists) I think, removing the guy of the list would help us to avoid meeting the virus on this list again. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Padraic Tynan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 6:29 AM To: [EMAIL PROTECTED] Subject: [PHP] Very important. Hi. Yesterday an email-virus entitled Emanuel was sent out over this list, and I am not sure by who. It came in the form of Emanuel.exe, and had an icon resembling that of a standalone flash projector file (pink diamond with a white multi-pointed asterisk-type thing in the middle). This virus appears to be a backorifice or netbus style virus, and adds something to a system file that makes it so that *every* time you try to launch a program, it launches "Wintask.exe", which is *not* an official task, despite the name. It puts a green ICQ flower in your taskbar, and if you click it, a button pops up that says "Nunca <bla bla> esta button". The <bla bla> is because I forget the word for "push" in spanish, and I'm not about to open this program again -- It translates to "NEVER PUSH THE BUTTON" -- and trust me, *don't*, this, i have found, is what activates the virus. I may have lost several weeks of work to this virus, and I advise you all to watch out, as it was likely sent inadvertantly.
Sup, It can be done...but it will be complicated. First off. You should check out the extract() php command. http://php.net/extract This function makes entries in an array into local variables. Let's say your row array has 2 columns, title and duration. You can do: while( $row = mysql_fetch_assoc($result) ) { extract( $row , EXTR_PREFIX_ALL , "qt_"); // last parameter is a prefix to add onto the var names echo "title = $qt_title , duration = $qt_duration<BR>"; } --- Now onto the mysql goodness. I don't know of any way to stack rows from different tables. It really wouldnt work because the column names would probably be different. Doing a join isn't going to work either because the tables will probably not contain the same number of rows. I suggest selecting just the row id and creation time from each of your tables. Like: $result1 = mysql_query(); $result2 = mysql_query(); $result3 = mysql_query(); Then while( !$dead1 || !$dead2 || !$dead3 ) { if(!$row1 && !$dead1) $row1 = mysql_fetch_assoc() or $dead1 = true; if(!$row2 && !$dead2) $row2 = mysql_fetch_assoc() or $dead2 = true; if(!$row3 && !$dead3) $row3 = mysql_fetch_assoc() or $dead3 = true; // compare all 3 times, find nearest one // store winning row id into a temp var, like win_id; // have a list of table names which corresponds to the rows. row1 = blah_tbl , row2 = eh_tbl , row3 = wow_tbl // store table name from winning row, store in win_table; // and finally set the winning row to 0, so that row will be fetched next time through the loop $each_result = mysql_query("select * from $win_table where id = $win_id"); Output_my_Result( $each_result ); } It sure ain't pretty, but that's how I could do it...Hopefull all that helps you somehow. SL. ----- Original Message ----- From: "Nicolas Mermet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 2:42 PM Subject: [PHP] getting rows from separate tables stacked in a single array ? (newbie, mysql) > Hi. > > This will probably sound simple to all of you but I am hitting my head on > a brick wall so far :-). > > I need to generate a list (sorted by descending time) of different objects > referenced in multiple tables. All those objects share a key related to a > project. > > > This works splendidly from a single table : > > > > > $sql="select * from storyboards, where spot_id = \"$spot_id\" order by > date_posted desc"; > $result=MySQL_query($sql,$db); > while($row=MySQL_fetch_array($result)) > { > $qt_title = $row["title"]; > $qt_duration = $row["duration"]; > $qt_date_posted = $row["date_posted"]; //(timestamp) > $qt_description = $row["description"]; > $qt_id = $row["quicktime_id"]; > > > } > > Is there a mysql query that would allow me to stack complete rows in > multiple tables at once (It seems more elegant because I can sort them > while extracting them) or is there a way in PHP to concatenate results in > a single array and then sort them by time... ? > > I tried to use a join query, wich produced an invalid query error. (I > think it tries to produce a table with merged data, not just a stack of > rows). > > > $sql4="select * from quicktimes, other_images, storyboards, where > quicktimes.spot_id, other_images.spot_id, storyboards.spot_id = > \"$spot_id\" order by date_posted desc"; > > thank you for your help ! > nicolas > > -- > 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] >
Thanks a bunch, SL. I was expecting some heavy manipulation of that sort. Wouldnt have been able to write that code. (yet ! ;-). I will try that tomorow. This afternoon In despair I ended tweaking the db and creating an extra table to link all the desired tables with a time indice, temporarily solving my problem but promising future headaches when I devellop the db admin page. Here is how I dit it: table "all_items" item_id (id of the items in their original tables) date_posted (original item post date) table_name (where the item comes from) spot_id (key to the project) It works with this code: //connecting to the link table to get time-ordered list of relevant items, their origin and their keys $sql4="select DATE_FORMAT(date_posted, '%a %m/%d/%y at %l:%i %p.'), item_id, item_table from spot_items where spot_id = \"$spot_id\" order by date_posted desc"; $result4=MySQL_query($sql4); while($spotitems=MySQL_fetch_array($result4)) { list($items_date_posted, $items_id, $items_table) = $spotitems ; //linking to the real tables to get the real item info $sql5="select * from $items_table where item_id = \"$items_id\""; $result5=MySQL_query($sql5); while($items=MySQL_fetch_array($result5)) { $items_title = $items["title"]; $items_description = $items["description"]; $items_duration = $items["duration"]; } //outputing in fonction of the item origin if ($items_table == "movie") echo "$items_title (Quicktime, duration: $items_duration) $items_date_posted<br>$items_description<br"; if ($items_table == "storyboard") echo "$items_id\ $items_title (Storyboard) $items_date_posted<br> $items_description<br>"; if ($items_table == "picture") echo "$items_title(Picture) $items_date_posted <br>$items_description<br>"; } thanks again, Nicolas.
Doh, I shoulda thought of that, a temp table is the best way to do it. Altho, I don't see why you have a spot_id as a key for that table. Your are probably never going to access that table via that arbitrary number. If anything, you should make item_id the key. The id on your other tables should also be keys. SL. ----- Original Message ----- From: "Nicolas Mermet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 8:50 PM Subject: Re: [PHP] getting rows from separate tables stacked in a single array ? (newbie, mysql) > > Thanks a bunch, SL. I was expecting some heavy manipulation of that sort. > Wouldnt have been able to write that code. (yet ! ;-). I will try that > tomorow. > > This afternoon In despair I ended tweaking the db and creating an extra > table to link all the desired tables with a time indice, temporarily > solving my problem but promising future headaches when I devellop the db > admin page. Here is how I dit it: > > > > table "all_items" > item_id (id of the items in their original tables) > date_posted (original item post date) > table_name (where the item comes from) > spot_id (key to the project) > > > It works with this code: > > > > > //connecting to the link table to get time-ordered list of relevant items, > their origin and their keys > > $sql4="select DATE_FORMAT(date_posted, '%a %m/%d/%y at %l:%i %p.'), > item_id, item_table from spot_items where spot_id = \"$spot_id\" order by > date_posted desc"; > $result4=MySQL_query($sql4); > while($spotitems=MySQL_fetch_array($result4)) > { > list($items_date_posted, $items_id, $items_table) = $spotitems ; > > //linking to the real tables to get the real item info > > > $sql5="select * from $items_table where item_id = \"$items_id\""; > $result5=MySQL_query($sql5); > while($items=MySQL_fetch_array($result5)) > { > $items_title = $items["title"]; > $items_description = $items["description"]; > $items_duration = $items["duration"]; > } > > //outputing in fonction of the item origin > > if ($items_table == "movie") > echo "$items_title (Quicktime, duration: $items_duration) > $items_date_posted<br>$items_description<br"; > > if ($items_table == "storyboard") > echo "$items_id\ $items_title (Storyboard) $items_date_posted<br> > $items_description<br>"; > > if ($items_table == "picture") > echo "$items_title(Picture) $items_date_posted <br>$items_description<br>"; > > > } > > > > > > > > > > > > > > > > > thanks again, > Nicolas. > > -- > 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] > >
hey, why not to have one single query? or.. INSERT INTO tmp_table SELECT * FROM first_table; INSERT INTO tmp_table SELECT * FROM second_table; ... do a query on tmp_table, DELETE FROM tmp_table; but, isn't it better to have one table only? - you'll skipp three steps. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 5:42 AM To: [EMAIL PROTECTED] Subject: [PHP] getting rows from separate tables stacked in a single array ? (newbie, mysql) Hi. This will probably sound simple to all of you but I am hitting my head on a brick wall so far :-). I need to generate a list (sorted by descending time) of different objects referenced in multiple tables. All those objects share a key related to a project. This works splendidly from a single table : $sql="select * from storyboards, where spot_id = \"$spot_id\" order by date_posted desc"; $result=MySQL_query($sql,$db); while($row=MySQL_fetch_array($result)) { $qt_title = $row["title"]; $qt_duration = $row["duration"]; $qt_date_posted = $row["date_posted"]; //(timestamp) $qt_description = $row["description"]; $qt_id = $row["quicktime_id"]; } Is there a mysql query that would allow me to stack complete rows in multiple tables at once (It seems more elegant because I can sort them while extracting them) or is there a way in PHP to concatenate results in a single array and then sort them by time... ? I tried to use a join query, wich produced an invalid query error. (I think it tries to produce a table with merged data, not just a stack of rows). $sql4="select * from quicktimes, other_images, storyboards, where quicktimes.spot_id, other_images.spot_id, storyboards.spot_id = \"$spot_id\" order by date_posted desc"; thank you for your help ! nicolas -- 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]
how about something like: $count = 0; $list = array(); $sql[]="select * from storyboards, ... "; $sql[]="select * from storyboard2, ... "; $sql[]="select * from storyboard3, ... "; $sql[]="select * from storyboard4, ... "; foreach ($sql as $thissql) { $result=MySQL_query($thissql,$db); while($row = MySQL_fetch_array($result)) $list[$row["field_to_sort_by"] . "***" . ++$count] = $row; } ksort($list) I haven't tried this precisely but the principle should work, and I have tried this method of sorting arrays by an element of the member arrays. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 24 April 2001 21:42 > To: [EMAIL PROTECTED] > Subject: getting rows from separate tables stacked in a single array ? > (newbie, mysql) > > > Hi. > > This will probably sound simple to all of you but I am > hitting my head on > a brick wall so far :-). > > I need to generate a list (sorted by descending time) of > different objects > referenced in multiple tables. All those objects share a key > related to a > project. > > > This works splendidly from a single table : > > > > > $sql="select * from storyboards, where spot_id = \"$spot_id\" order by > date_posted desc"; > $result=MySQL_query($sql,$db); > while($row=MySQL_fetch_array($result)) > { > $qt_title = $row["title"]; > $qt_duration = $row["duration"]; > $qt_date_posted = $row["date_posted"]; //(timestamp) > $qt_description = $row["description"]; > $qt_id = $row["quicktime_id"]; > > > > } > > Is there a mysql query that would allow me to stack complete rows in > multiple tables at once (It seems more elegant because I can sort them > while extracting them) or is there a way in PHP to > concatenate results in > a single array and then sort them by time... ? > > I tried to use a join query, wich produced an invalid query error. (I > think it tries to produce a table with merged data, not just > a stack of > rows). > > > $sql4="select * from quicktimes, other_images, storyboards, where > quicktimes.spot_id, other_images.spot_id, storyboards.spot_id = > \"$spot_id\" order by date_posted desc"; > > thank you for your help ! > nicolas >
I'll save everyone the trouble and skip ahead to the anti-climactic end to the email validation problem: you can't. You can filter blatantly invalid email addresses (but do not go strictly from the RFC, because some very weird emails end up being valid regardless). You can resolve hosts. You can send a probe. You can develop a parrellel-process tri-layer error corrected neural-network driven logic filter. You can ask nicely. You can ask nicely twice. You can beg and plead and threaten and pout. But you can't be sure. The way I do my email validation is inform the user that if they don't give a valid email they can't activate their account. I send them an email without doing much of anything in the way of parsing their address. I include a url which they need only visit in their browser to confirm their account. But you know what? No matter how clearly I tell them that they can't activate their account without a valid email, that doesn't stop them from giving a clearly invalid email address. Go figure. The answer comes down to "don't even bother to be clever". It will just slowly drive you insane. So the moral of the story is: verify, verify, verify. -- Plutarck Should be working on something... ...but forgot what it was. "Szii" <[EMAIL PROTECTED]> wrote in message 003801c0cd06$30d46e60$[EMAIL PROTECTED]">news:003801c0cd06$30d46e60$[EMAIL PROTECTED]... > Actually, you can check the validity of the SMTP port to semi-validate the > domain. The name of the recipient would be harder, but again, through > your standard "user does not exist" error messages/codes, you could > tell if the domain is valid, but the user is not. > > Checking to see if it's "syntactically correct" is trivial. Validating the > domain > is rather simple as well (check the retcode on a whois lookup.) Validating > the user would require interpretation of the return mail message(s). > > Again, it's not "real-time" validation of anything except the > existance/validity > of the domain - not the user. > > 'Luck > > -Szii > > > ----- Original Message ----- > From: "christopher hamilton" <[EMAIL PROTECTED]> > To: "Martin Skjoldebrand" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Tuesday, April 24, 2001 1:39 PM > Subject: RE: [PHP] checking if e-mail address and syntax are valid > > > > > > I'd like to add to that, before someone spends a lifetime searching for an > > answer ... > > > > "Solution: There isn't one. You cannot do real-time validation of mail > > addresses. You must pick from a number of compromises." > > > > The section goes on describing how many RFC-valid addresses are > > undeliverable and on the opposite side of the coin, some RFC-invalid > > addresses are perfectly deliverable. > > > > "Our best advice for verifying a person's mail address is to have them > enter > > their address twice, just as you would when changing a password." > > > > - Chris > > > > > > I would like to know if anyone has or know any PHP code to verify if a > > > > form entered e-mail address is valid? > > > > > > > > I would like that things like 4$%^%$@@.com.br could not be sent. I > only > > > > has to verify the syntax of it, the existance I believe should be > harder > > > > to verify but if it is possible I would be glad if anyone could point > me > > > > the way. > > > > > > This is taken from PHP Developers Cookbook. Don't ask me exactly what it > > > does, because I don't know. I think I can grasp the basics of it though. > > > > It isn't fool proof tho. > > > > > > > > > if (!eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$", > > > $users)) die ("Invalid email"); > > > > > > -- > > 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, Apr 24, 2001 at 02:33:18PM -0700, Szii wrote: > Checking to see if it's "syntactically correct" is trivial. Validating the > domain is rather simple as well (check the retcode on a whois lookup.) Which is not as trivial as it sounds, since whois does not really have "return-codes". You need to know in advance how this particular whois-server is responding. (since most whois-server just serve a few TLD you might not even use only one whois-server). Even the output of a general whois-server like whois.thur.de (you can query pretty much everything on it) differs from TLD to TLD (since all whois.thur.de is, is asking the actual whois-server for that TLD.) It's probably much easier for validating a domain to use the mx-record-function. > Again, it's not "real-time" validation of anything except the > existance/validity of the domain - not the user. If your php-scripts looksup the mx-record for the domain and delivers directly to the mx for the domain, you might be able to verify in real-time, since you will get the return-codes of the mx. However not all mx'es deliver locally. As soon, as the mx passes the mail onto a different host for delivery (and there quiet a few of these around...) you can't verify. So basically, yes, you can lookup the domain, verify that the domain as a valid mx, but that's pretty much it. -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 |
How do you mean, "check"? Do you want to use a regular expression to see if it's a valid URL, or do you want to open a connection to it and see if the site actually exists? -- Plutarck Should be working on something... ...but forgot what it was. "Dmitry" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all. > Can you tell me, how can I check url address? > Also I want to know error, which return. > Dmitry > > > > -- > 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] >
well, you can try fsockopen. see it on php.net/fsockopen it will even return you an error if not connected. start from the example describing the function on PHP.net/fsockopen (did I misspelled it?) Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Dmitry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 5:44 AM To: [EMAIL PROTECTED] Subject: [PHP] checking url Hello all. Can you tell me, how can I check url address? Also I want to know error, which return. Dmitry -- 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 can also use the strlen() function. -- Plutarck Should be working on something... ...but forgot what it was. "Jimmy Bäckström" <[EMAIL PROTECTED]> wrote in message 000a01c0cd06$351f1060$[EMAIL PROTECTED]">news:000a01c0cd06$351f1060$[EMAIL PROTECTED]... Hey guys! I'm writing a guestbook with mysql. My probblem is that when user enter at long word like blablablablablablablablablablablabla my html-tables gets screwed up. If someone is just fooling around the whole page design can be destroyed. I want to know how I can make sure that no word is longer than x characters. If a word should be longer than that, I would like the word divided into smaller parts with a - character at the end of the first word like this: "this is a text in the guestbook. if there is a really long word like blablablablablablablabla- blablabla it is divided into smaller parts and a - char is added to the first word." I thought about reading the whole message into an array, and then loop through it and for each word check whether it is larger than x chars, and if so, change it. But couldn't that be a very memory consuming script if it should do that for every message? Anyone knows how I could do this?
First off I'm aware of the service pack, installed it, no fix. Currently we build a PDF for download to represent a hardcopy of our customers data. It works very well so far and will likely become a standard feature. We experienced no problems with cross-platform use until we moved into a mod_ssl server. The PDFs are no served from within the SSL realm. We changed no code but now MSIE on W2K and NT cannot get a PDF, MSIE complains that the file "cannot be found". The ssl_request log shows no error and the file was served completely. All Macs, Unixes, and NAV on wintel platforms work fine. This works: Dynamic PDF (built with php) over http MSIE/NAV PC/MAC Dynamic PDF (built with php) over https MSIE/NAV MAC and NAV PC Static PDF over http MSIE/NAV PC/MAC Static PDF over https MSIE/NAV PC/MAC This doesn't: Dynamic PDF (built with php) over https MSIE on PC Param strings on the URL make no difference (think sessions), failure still occurs with the same message. That was why I tested static PDFs, just to be sure. We are running -> Apache 1.3.12 PHP 4.0.0 CPDF 2.02-r1-2 The code in question is as follows, <?php session_start(); $cpdf = cpdf_open(0); <build pdf things here> cpdf_finalize($cpdf); header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=Results.pdf"); header("Content-Description: PHP Generated PDF" ); cpdf_output_buffer($cpdf); cpdf_close($cpdf); ?> Any thoughts, suggestions, WAGs would be appreciated. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com
Hello, how can I check the last modified date of a website. I mean not my own site, I mean other sites. Thanx, Holger
my own 2c: fopen: fwrite into a file of yours, when doing a check: fopen compare the buffer size to the file size you have saved. or the whole HTML code as a string. But, I guess it is very unreliable since there are such things as banner rotations etc... Maybe there's another way to do it I never heard of. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Kasten, Holger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] last modified Hello, how can I check the last modified date of a website. I mean not my own site, I mean other sites. Thanx, Holger -- 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 article <FA432D4D6C2EC1498940A59C494F153873335B@stca207a>, [EMAIL PROTECTED] ("Kasten, Holger") wrote: > how can I check the last modified date of a website. I mean not my own site, > I mean other sites. Use fsockopen(), send a HEAD request, get back (sometimes*) a Last-Modified header. *See RFC 2616 for more info on the inherent limitation of depending on Last-Modified. -- CC
Are you using short tag? or asp tag? What happen if you use "<?php ?>"? Regards, -- Yasuo Ohgaki ""ouarz.net"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hiya, > > I am not a weirdo (at least I think so) ;) > > Considere this (Notice the line number): > ======================================================================= > > Parse error: parse error in test_the_bug.php on line 1 > > ======================================================================= > > Seem normal, isn't it... but i is not!!! > > Since I last re-builted PHP, > all, error messages do not return the correct line number... > It is always saying line 1! > > What I have done?!? I can't work it out... > > I have rebuilt PHP many time now but with no success... > Apart that every thing work fine :( but it is quiete ennoying to track and > debug all my php errors :( > > So my config is Linux RedhaT with PHP Version 4.0.4pl1 > './configure' '--with-mysql' '--with-apxs' '--with-gd=/usr/local' > '--with-jpeg-dir=/usr/local' '--enable-ftp' '--with-imap' '--with-zlib' > '--with-gettext' > > PLEASE HELP! > Thanks in advance! > Franck > > > -- > 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] >
If you are using Apache virtual host, it will set virtual host's document root. Is this what you want? Regards, -- Yasuo Ohgaki "Jordan Elver" <[EMAIL PROTECTED]> wrote in message 01042417535900.00987@localhost">news:01042417535900.00987@localhost... > Hi, > Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my home > machine but it should return /usr/local/htdocs/sitename or where ever I put > it, but on my production machine it return what it should like > /usr/local/sitename or whatever? > > I'm trying to use it to help include files in different directories (see my > previous post, site structure). Got any ideas about this? > > Cheers, > > Jord > > -- > 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] >
Open your apache's httpd.conf file: see anything like this on VHost configuration of the site in question? #### JI Admin Database <VirtualHost 1.0.0.10> ServerAdmin [EMAIL PROTECTED] DocumentRoot D:/JI_admin ServerName admin ErrorLog logs/JI_admin-error.log CustomLog logs/JI_admin-access.log common </VirtualHost> that DocumentRoot D:/JI_admin is exactly what your $DOCUMENT_ROOT should be returning. I think that is where your problem. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 2:54 AM To: PHP General Mailing List Subject: [PHP] DOCUMENT_ROOT Hi, Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my home machine but it should return /usr/local/htdocs/sitename or where ever I put it, but on my production machine it return what it should like /usr/local/sitename or whatever? I'm trying to use it to help include files in different directories (see my previous post, site structure). Got any ideas about this? Cheers, Jord -- 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]
Thanks for the reply, I'm not using virtual hosts on my local machine but I am on the production machine. What should DOCUMENT_ROOT return? I though it returns the directory of the current script. So if I had a site in /usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to return /usr/local/apache/htdocs/cha/, is that right? Is it posible to setup a virtual host on localhost? Cheers, Jord On Wednesday 25 April 2001 01:05, you wrote: > If you are using Apache virtual host, it will set virtual host's document > root. Is this what you want? > > Regards, > -- > Yasuo Ohgaki > > > "Jordan Elver" <[EMAIL PROTECTED]> wrote in message > 01042417535900.00987@localhost">news:01042417535900.00987@localhost... > > > Hi, > > Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my > > home machine but it should return /usr/local/htdocs/sitename or where > > ever I put it, but on my production machine it return what it should like > > /usr/local/sitename or whatever? > > > > I'm trying to use it to help include files in different directories (see > > my previous post, site structure). Got any ideas about this? > > > > Cheers, > > > > Jord > > > > -- > > 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've been on many sites, like most of us. Which do the members of this list like better, email address for an identifier, or some combination of their input/some routine's output? %like% as in: A/ for security, programming, our jobs/hobby usage, -or- B/ as a user/member our/your-self?
I am having a problem inserting users info info into the mysql database. When I check mysql log it shows the query I tried to run. But when I go check the mysql database the info doesn't appear, I checked the permissions on the user I have setup and he has all the proper rights. If anyone have any suggestions .. please help.. mysql_query("INSERT INTO members (email, uname, fname, lname, city, state, phone, address)VALUES('$email','$uname','$fname','$lname','$city','$state',' $phone','$address'");
try the query like this: mysql_query("INSERT INTO members (email, uname, fname, lname, city, state, phone, address)VALUES('$email','$uname','$fname','$lname','$city','$state',' $phone','$address'") or DIE("ERROR : ".mysql_errno() ." <b>".mysql_error()."</b>"); But, honestly I think you're missing few spaces to surround ')VALUE(', hey, it thinks it's a funciton or something. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Greg Kelly [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 12:59 PM To: [EMAIL PROTECTED] Subject: [PHP] New uses please help mysql query problem I am having a problem inserting users info info into the mysql database. When I check mysql log it shows the query I tried to run. But when I go check the mysql database the info doesn't appear, I checked the permissions on the user I have setup and he has all the proper rights. If anyone have any suggestions .. please help.. mysql_query("INSERT INTO members (email, uname, fname, lname, city, state, phone, address)VALUES('$email','$uname','$fname','$lname','$city','$state',' $phone','$address'"); -- 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 am a newuser to php , I am setting up a site with user authenication and I would like to setup a ICQ function some my users will know if other users are online can someone please guide me in the right direction.. Thank You
Hi all, I am having my own personal computer running on windows 95. I have C / D / E / F / G drives with FAT 32 file system with lot of information on it. I can format one drive out of these. Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I want to load Apache also on it. Is it feasible ? Any information about this on web ? If I format one drive and load Linux whether other drive info will get affected ? manisha
Yes, that's the idea behind having multiple drives ( or partitions ). If you format F and load Linux on it, then that won't affect any other partition... -jack Manisha wrote: > > Hi all, > > I am having my own personal computer running on windows 95. I have C / D / > E / F / G drives with FAT 32 file system with lot of information on it. I > can format one drive out of these. > > Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I > want to load Apache also on it. > > Is it feasible ? Any information about this on web ? If I format one drive > and load Linux whether other drive info will get affected ? > > manisha > > -- > 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]
its much more than that however, I have Linux, 98, win2k and NT server on my box..which has 2 physical hard drives and 5-6 partitions. However I strongly suggest you read up on this subject of multi-boot. You have to take into consideration that most operating systems require up to the first 4-8 mg of the hard drive and the boot files for NT OS's require to be on the first physical hard drive at the first 2mg. Keep in mind also that LILO, the Linux booting file cannot exist on same partition with any NT OS's. It appears you only have 95 at this time so it wont be quite as complicated at this time. You will have to get a boot manager that will handle partitioning different partition types-NTFS, FAT16, FAT32, LINUX. One that will partition these without messing up the others that you have already. -----Original Message----- From: Jack Dempsey <[EMAIL PROTECTED]> To: Manisha <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Tuesday, April 24, 2001 8:43 PM Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ? >Yes, that's the idea behind having multiple drives ( or partitions ). >If you format F and load Linux on it, then that won't affect any other >partition... > >-jack > >Manisha wrote: >> >> Hi all, >> >> I am having my own personal computer running on windows 95. I have C / D / >> E / F / G drives with FAT 32 file system with lot of information on it. I >> can format one drive out of these. >> >> Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I >> want to load Apache also on it. >> >> Is it feasible ? Any information about this on web ? If I format one drive >> and load Linux whether other drive info will get affected ? >> >> manisha >> >> -- >> 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]
This isn't really the list for this. Read the docs here: http://www.linuxdoc.org/HOWTO/Linux+Windows-HOWTO/index.html http://www.linuxdoc.org/HOWTO/mini/Linux+Win95/index.html You also might want to read the NHFs here: http://www.linuxnewbie.org/nhf/intel/index.html - Kath ----- Original Message ----- From: "Manisha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 9:10 PM Subject: [PHP] Can I install Lihnux on My Windows 95 machine ? > Hi all, > > I am having my own personal computer running on windows 95. I have C / D / > E / F / G drives with FAT 32 file system with lot of information on it. I > can format one drive out of these. > > Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I > want to load Apache also on it. > > Is it feasible ? Any information about this on web ? If I format one drive > and load Linux whether other drive info will get affected ? > > manisha > > > > > -- > 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 have Pentium II Processor with 64 MB RAM. The drive which I am thinking of converting into Lihnux (F:) has 2.92 GB hard disk space. Current file system is FAT 32. I am thinking of loading Red Hat Linux (may be latest version) and Appache web server by formating that drive. I know I can have appache on Windows, but as my client's environment is different and as I have urge to learn Linux I want to install Linux on my m/c itself. Whether above mentioned hardware is ok to install Linux ? manisha At 08:58 PM 4/24/01 -0500, Wade DeWerff wrote: >its much more than that however, I have Linux, 98, win2k and NT server on my >box..which has 2 physical hard drives and 5-6 partitions. However I >strongly suggest you read up on this subject of multi-boot. You have to take >into consideration that most operating systems require up to the first 4-8 >mg of the hard drive and the boot files for NT OS's require to be on the >first physical hard drive at the first 2mg. Keep in mind also that LILO, the >Linux booting file cannot exist on same partition with any NT OS's. It >appears you only have 95 at this time so it wont be quite as complicated at >this time. You will have to get a boot manager that will handle partitioning >different partition types-NTFS, FAT16, FAT32, LINUX. One that will partition >these without messing up the others that you have already. > > > >-----Original Message----- >From: Jack Dempsey <[EMAIL PROTECTED]> >To: Manisha <[EMAIL PROTECTED]> >Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> >Date: Tuesday, April 24, 2001 8:43 PM >Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ? > > > >Yes, that's the idea behind having multiple drives ( or partitions ). > >If you format F and load Linux on it, then that won't affect any other > >partition... > > > >-jack > > > >Manisha wrote: > >> > >> Hi all, > >> > >> I am having my own personal computer running on windows 95. I have C / D >/ > >> E / F / G drives with FAT 32 file system with lot of information on it. I > >> can format one drive out of these. > >> > >> Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I > >> want to load Apache also on it. > >> > >> Is it feasible ? Any information about this on web ? If I format one >drive > >> and load Linux whether other drive info will get affected ? > >> > >> manisha > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
Thanks a lot to all of you for your info. Now I will try to do it. manisha
Although, this is nothing to do with PHP. You have several options to use Win and Linux - Multi-boot with separate partitions - Multi-boot with umsdos (You can install Linux in windows partition with this) - Virtual machine - use VMWare for example. You can use windows and Linux at the same time. Slow though. (VMWare works really well with my W2K box. I don't use it often, but it's really useful sometimes) You also can change partition size without deleting contents. Linux Documentation Project web site has a lot of documents. http://www.linuxdoc.org/ For further questions, ask in Linux related news or mailing list. Regards, -- Yasuo Ohgaki "Manisha" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have Pentium II Processor with 64 MB RAM. The drive which I am thinking > of converting into Lihnux (F:) has 2.92 GB hard disk space. Current file > system is FAT 32. I am thinking of loading Red Hat Linux (may be latest > version) and Appache web server by formating that drive. > > I know I can have appache on Windows, but as my client's environment is > different and as I have urge to learn Linux I want to install Linux on my > m/c itself. > > Whether above mentioned hardware is ok to install Linux ? > > manisha > > > > > At 08:58 PM 4/24/01 -0500, Wade DeWerff wrote: > >its much more than that however, I have Linux, 98, win2k and NT server on my > >box..which has 2 physical hard drives and 5-6 partitions. However I > >strongly suggest you read up on this subject of multi-boot. You have to take > >into consideration that most operating systems require up to the first 4-8 > >mg of the hard drive and the boot files for NT OS's require to be on the > >first physical hard drive at the first 2mg. Keep in mind also that LILO, the > >Linux booting file cannot exist on same partition with any NT OS's. It > >appears you only have 95 at this time so it wont be quite as complicated at > >this time. You will have to get a boot manager that will handle partitioning > >different partition types-NTFS, FAT16, FAT32, LINUX. One that will partition > >these without messing up the others that you have already. > > > > > > > >-----Original Message----- > >From: Jack Dempsey <[EMAIL PROTECTED]> > >To: Manisha <[EMAIL PROTECTED]> > >Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > >Date: Tuesday, April 24, 2001 8:43 PM > >Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ? > > > > > > >Yes, that's the idea behind having multiple drives ( or partitions ). > > >If you format F and load Linux on it, then that won't affect any other > > >partition... > > > > > >-jack > > > > > >Manisha wrote: > > >> > > >> Hi all, > > >> > > >> I am having my own personal computer running on windows 95. I have C / D > >/ > > >> E / F / G drives with FAT 32 file system with lot of information on it. I > > >> can format one drive out of these. > > >> > > >> Can I install Linux on it ? (i.e. format F:\ and load Linux). Later on I > > >> want to load Apache also on it. > > >> > > >> Is it feasible ? Any information about this on web ? If I format one > >drive > > >> and load Linux whether other drive info will get affected ? > > >> > > >> manisha > > >> > > >> -- > > >> PHP General Mailing List (http://www.php.net/) > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > >-- > > >PHP General Mailing List (http://www.php.net/) > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: [EMAIL PROTECTED] > > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > 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 ? Current my Hard disk space for drive F:\ is 2.92 GB which is just fine for the time being. Do you mean to say that I can increase from 2.9 GB to let us say 4GB by taking it from some other drive may be D:\ ? Can you explain some more ? At 12:54 PM 4/25/01 +0900, Yasuo Ohgaki wrote: >You also can change partition size without deleting contents. At 12:54 PM 4/25/01 +0900, Yasuo Ohgaki wrote: >Although, this is nothing to do with PHP. > >You have several options to use Win and Linux > - Multi-boot with separate partitions > - Multi-boot with umsdos (You can install Linux in windows partition > with this) > - Virtual machine - use VMWare for example. You can use windows and Linux at >the same time. Slow though. > (VMWare works really well with my W2K box. I don't use it > often, but >it's really useful sometimes) > >You also can change partition size without deleting contents. > >Linux Documentation Project web site has a lot of documents. >http://www.linuxdoc.org/ > >For further questions, ask in Linux related news or mailing list. > >Regards, >-- >Yasuo Ohgaki > > >"Manisha" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have Pentium II Processor with 64 MB RAM. The drive which I am thinking > > of converting into Lihnux (F:) has 2.92 GB hard disk space. Current file > > system is FAT 32. I am thinking of loading Red Hat Linux (may be latest > > version) and Appache web server by formating that drive. > > > > I know I can have appache on Windows, but as my client's environment is > > different and as I have urge to learn Linux I want to install Linux on my > > m/c itself. > > > > Whether above mentioned hardware is ok to install Linux ? > > > > manisha > > > > > > > > > > At 08:58 PM 4/24/01 -0500, Wade DeWerff wrote: > > >its much more than that however, I have Linux, 98, win2k and NT server > on my > > >box..which has 2 physical hard drives and 5-6 partitions. However I > > >strongly suggest you read up on this subject of multi-boot. You have > to take > > >into consideration that most operating systems require up to the first 4-8 > > >mg of the hard drive and the boot files for NT OS's require to be on the > > >first physical hard drive at the first 2mg. Keep in mind also that > LILO, the > > >Linux booting file cannot exist on same partition with any NT OS's. It > > >appears you only have 95 at this time so it wont be quite as > complicated at > > >this time. You will have to get a boot manager that will handle > partitioning > > >different partition types-NTFS, FAT16, FAT32, LINUX. One that will > partition > > >these without messing up the others that you have already. > > > > > > > > > > > >-----Original Message----- > > >From: Jack Dempsey <[EMAIL PROTECTED]> > > >To: Manisha <[EMAIL PROTECTED]> > > >Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > >Date: Tuesday, April 24, 2001 8:43 PM > > >Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ? > > > > > > > > > >Yes, that's the idea behind having multiple drives ( or partitions ). > > > >If you format F and load Linux on it, then that won't affect any other > > > >partition... > > > > > > > >-jack > > > > > > > >Manisha wrote: > > > >> > > > >> Hi all, > > > >> > > > >> I am having my own personal computer running on windows 95. I have > C / D > > >/ > > > >> E / F / G drives with FAT 32 file system with lot of information > on it. I > > > >> can format one drive out of these. > > > >> > > > >> Can I install Linux on it ? (i.e. format F:\ and load Linux). > Later on I > > > >> want to load Apache also on it. > > > >> > > > >> Is it feasible ? Any information about this on web ? If I format one > > >drive > > > >> and load Linux whether other drive info will get affected ? > > > >> > > > >> manisha > > > >> > > > >> -- > > > >> PHP General Mailing List (http://www.php.net/) > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > >> To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > > > > >-- > > > >PHP General Mailing List (http://www.php.net/) > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > >-- > > >PHP General Mailing List (http://www.php.net/) > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: [EMAIL PROTECTED] > > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > > 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]
Hi all, Again I am here asking the same question as I got confused because of my colleague's comment. I asked my colleague (who is in charge of all network administrator - setups - hardware configurations etc etc etc)). I asked the same question that I am having 4 drives, I want one drive to be converted into Linux. He is saying that if I want to format one drive (F:) out of total 4 drives and install Linux, then I need to do lot of configurations. According to him I need to change BIOS set up of windows so that it will understand 2 boot sections. Currently my window system is recognising only one boot system and some predefined partitions. So if I want to remove one partition and change to Linux, I need to repartition i.e. format again. That means lot of info which is on other drivers will be wiped off.????? Is there any remedy for this ? I want my all other drives running properly whenever I am in Windows and I should be able to use Linux commands when I am in Linux system. Can any body comment ? manisha
Obviously, not all file systems cannot be resized w/o loosing contents. You can use GNU parted, FIPS, etc to resize partitions w/o loosing contents. GNU parted supports resizing FAT16, FAT32, ext2 and Linux-swap. You should have unused spaces to shrunk partition size obviously. Tools like Norton Ghost is also handy to upgrade/change partition size. I use Ghost to get larger partition than 4GB for WinNT system drive. It works for me to get 8GB system drive for WinNT4 Server at least. I use tar for Linux, but Ghost supports ext2 also. Ghost could also be used to change partition size, if you have extra HDD/tape drive/etc what ever Ghost supports. They might still have trial version on Symantec web site. For further questions, ask in Tool, Hardisk or Linux related news or mailing list. Regards, -- Yasuo Ohgaki "Manisha" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it ? > > Current my Hard disk space for drive F:\ is 2.92 GB which is just fine for > the time being. Do you mean to say that I can increase from 2.9 GB to let > us say 4GB by taking it from some other drive may be D:\ ? > > Can you explain some more ? > > > > At 12:54 PM 4/25/01 +0900, Yasuo Ohgaki wrote: > >You also can change partition size without deleting contents. > > > > At 12:54 PM 4/25/01 +0900, Yasuo Ohgaki wrote: > >Although, this is nothing to do with PHP. > > > >You have several options to use Win and Linux > > - Multi-boot with separate partitions > > - Multi-boot with umsdos (You can install Linux in windows partition > > with this) > > - Virtual machine - use VMWare for example. You can use windows and Linux at > >the same time. Slow though. > > (VMWare works really well with my W2K box. I don't use it > > often, but > >it's really useful sometimes) > > > >You also can change partition size without deleting contents. > > > >Linux Documentation Project web site has a lot of documents. > >http://www.linuxdoc.org/ > > > >For further questions, ask in Linux related news or mailing list. > > > >Regards, > >-- > >Yasuo Ohgaki > > > > > >"Manisha" <[EMAIL PROTECTED]> wrote in message > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I have Pentium II Processor with 64 MB RAM. The drive which I am thinking > > > of converting into Lihnux (F:) has 2.92 GB hard disk space. Current file > > > system is FAT 32. I am thinking of loading Red Hat Linux (may be latest > > > version) and Appache web server by formating that drive. > > > > > > I know I can have appache on Windows, but as my client's environment is > > > different and as I have urge to learn Linux I want to install Linux on my > > > m/c itself. > > > > > > Whether above mentioned hardware is ok to install Linux ? > > > > > > manisha > > > > > > > > > > > > > > > At 08:58 PM 4/24/01 -0500, Wade DeWerff wrote: > > > >its much more than that however, I have Linux, 98, win2k and NT server > > on my > > > >box..which has 2 physical hard drives and 5-6 partitions. However I > > > >strongly suggest you read up on this subject of multi-boot. You have > > to take > > > >into consideration that most operating systems require up to the first 4-8 > > > >mg of the hard drive and the boot files for NT OS's require to be on the > > > >first physical hard drive at the first 2mg. Keep in mind also that > > LILO, the > > > >Linux booting file cannot exist on same partition with any NT OS's. It > > > >appears you only have 95 at this time so it wont be quite as > > complicated at > > > >this time. You will have to get a boot manager that will handle > > partitioning > > > >different partition types-NTFS, FAT16, FAT32, LINUX. One that will > > partition > > > >these without messing up the others that you have already. > > > > > > > > > > > > > > > >-----Original Message----- > > > >From: Jack Dempsey <[EMAIL PROTECTED]> > > > >To: Manisha <[EMAIL PROTECTED]> > > > >Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > > >Date: Tuesday, April 24, 2001 8:43 PM > > > >Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ? > > > > > > > > > > > > >Yes, that's the idea behind having multiple drives ( or partitions ). > > > > >If you format F and load Linux on it, then that won't affect any other > > > > >partition... > > > > > > > > > >-jack > > > > > > > > > >Manisha wrote: > > > > >> > > > > >> Hi all, > > > > >> > > > > >> I am having my own personal computer running on windows 95. I have > > C / D > > > >/ > > > > >> E / F / G drives with FAT 32 file system with lot of information > > on it. I > > > > >> can format one drive out of these. > > > > >> > > > > >> Can I install Linux on it ? (i.e. format F:\ and load Linux). > > Later on I > > > > >> want to load Apache also on it. > > > > >> > > > > >> Is it feasible ? Any information about this on web ? If I format one > > > >drive > > > > >> and load Linux whether other drive info will get affected ? > > > > >> > > > > >> manisha > > > > >> > > > > >> -- > > > > >> PHP General Mailing List (http://www.php.net/) > > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > >> To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > >-- > > > > >PHP General Mailing List (http://www.php.net/) > > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > >-- > > > >PHP General Mailing List (http://www.php.net/) > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi Manisha, @ 1:48:35 AM on 4/25/2001, Manisha wrote: ... > Can any body comment ? This isn't the list for that. You need to start here: http://www.linux.org/dist/index.html Pick a distribution, visit its site, join their user discussion list, and ask those questions there. Or at the very least: http://www.linuxdoc.org/ Most distributions have their own sites, and I'd be willing to bet that each of them have whole sections about installation (probably even the goriest of details). Most even answer questions like "Can I dual boot Windows and Linux?" Just _try_ it. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.
>Current my Hard disk space for drive F:\ is 2.92 GB which is just fine >for the time being. Do you mean to say that I can increase from 2.9 GB to >let us say 4GB by taking it from some other drive may be D:\ ? > >Can you explain some more ? Partitionmagic is the SW you need to do this. It might be a better solution to buy a cheap Celeron based PC and build your Linux server. Buy 2 nics, one goes into the server, the other into your current system. I don't understand why you're having so many partitions. Unless you've got a good reason for this I would reinstall the lot with less partitions and install Linux as part of the process. Anyway.. if you don't have any experience with Linux you're going to see some problems.. Bye, B.
Is there a way to generate a random set of characters ranging from 8 to 12 characters and numbers where it is crucial that the letters and numbers are truly random because I need to create temporary files for people to download information. Any links/suggestions would be greatly appreciated Thanks Randy
Sup, I made this and have been using it for about 6 months without problem. mt_rand() is 4 times faster than normal rand(), remember to use mt_srand() to seed. The 8 in the while controls how long the $password will be... $count = 0; mt_srand( (double) microtime() * 1000000); while( $count < 8 ) { $randval = mt_rand(48 , 122); $timeout++; // currently allows 0-9 and a-z (lowercase), add 65-90 for uppercase if(($randval > 47 && $randval < 58) || ($randval > 96 && $randval < 123)) { $password .= chr($randval); $count++; } } SL. ----- Original Message ----- From: "Randy Johnson" <[EMAIL PROTECTED]> Cc: "Php-General" <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 12:10 AM Subject: [PHP] random letters and numbers > Is there a way to generate a random set of characters ranging from 8 to 12 > characters and numbers where it is crucial that the letters and numbers are > truly random because I need to create temporary files for people to download > information. > > Any links/suggestions would be greatly appreciated > > Thanks > > Randy > > > -- > 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 Mon, Apr 23, 2001 at 11:10:48PM -0700, Randy Johnson wrote: > Is there a way to generate a random set of characters ranging from 8 to 12 > characters and numbers where it is crucial that the letters and numbers are > truly random because I need to create temporary files for people to download > information. > > Any links/suggestions would be greatly appreciated > > Thanks > > Randy > Also check out the tempnam() and tmpfile() functions, as this is exactly what they were made for ;)
Recently, I decided to convert my personal homepage to PHP. For simplicity, I do development on my home Windows 2000 box running Apache 1.3 and PHP 4, then FTP the code to the actual Linux-based web server (also running Apache/PHP 4). Since dealing with relative paths and included files in PHP is such a hassle, I decided to use absolute paths for everything (with the paths set in variables in my codebase.php so they're easy to change en masse later if I move my site). The problem is, I'm using a slightly different base directory structure on my development system than on the actual server. The URL of my homepage on the actual server is <http://www.paganpaths.org/~cfc/> (though technically stored in /usr/cfc/public_html/ or something to that effect), whereas on my local development system it's stored under <C:\webwork\home\>, which gets me a URL of <http://hotaru/home/>. The domain doesn't matter since I'm not using it in my paths, so the solution to this seemed simple enough. I created a directory alias in my httpd.conf: Alias /~cfc "C:/webwork/home/" This should allow me to access my local copy of my homepage at <http://hotaru/~cfc>; however, when I attempt to access it, I get a 500 Internal Server Error. Apache's error log says this about the problem: "Premature end of script headers: c:/program files/webserver/php4/php.exe". This leads me to believe that Apache's handling the directory alias, finding the index.phtml file, and then passing it to PHP, all as it should; but for some reason, PHP is choking on accessing the file in the aliased directory... I don't know why it isn't working, but my best guess is that Apache doesn't translate the URL before passing it to PHP, so it tells PHP to open "/~cfc/index.phtml", and since PHP ignores Apache's configuration/access directives, it doesn't know that "~cfc" = "home" and can't find the file. This would seem to fit the symptoms. I get an Error 500 when I try to open a PHP file that I know doesn't exist too, and if I use the non-aliased URL, everything works fine. So, my question is this... How can I get the aliased URL to work, without changing the real name of my local directory? And for that matter, since Unix servers use aliases for user web directories, am I going to run into this same problem when I upload it to the actual server? Is there some way around this? Any suggestions would be greatly appreciated; and they'll be appreciated even more if they're CC'd to me at <[EMAIL PROTECTED]>, since I check my email more often than I check this newsgroup ;) Thanks! -Corey
Im looking to set-up a customer based control panel for my servers. Running linux/apache. I was wondering if you had any advice on ware to look for programs or scripts that might help me to do this. I tried looking. And I have not found anything any help would be highly appreciated thank you. -- Regards Herb McDonald SuiteNet Comm Inc., Operations Manager http://www.suite.net/ PLEASE MAKE A NOTE THANK YOU ! Support has been changed from 1-954-971-4025 TO 1-561-784-9407 Order/New Account Info Only 1-800-510-1936 <<>><<>><<>><<>><<>><<>> MESSAGE SEPARATOR <<>><<>><<>><<>><<>><<>>
what about Webmin? it's wuite cool, it has it all. (don't remember the URL, it comes with Linux Mandrake 7.2 for sure) try searching on google Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: SuiteNet Operations Manager [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 1:59 PM To: php-general Subject: [PHP] hello Im looking to set-up a customer based control panel for my servers. Running linux/apache. I was wondering if you had any advice on ware to look for programs or scripts that might help me to do this. I tried looking. And I have not found anything any help would be highly appreciated thank you. -- Regards Herb McDonald SuiteNet Comm Inc., Operations Manager http://www.suite.net/ PLEASE MAKE A NOTE THANK YOU ! Support has been changed from 1-954-971-4025 TO 1-561-784-9407 Order/New Account Info Only 1-800-510-1936 <<>><<>><<>><<>><<>><<>> MESSAGE SEPARATOR <<>><<>><<>><<>><<>><<>> -- 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://www.webmin.com -----Original Message----- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 12:10 AM To: 'SuiteNet Operations Manager'; php-general Subject: RE: [PHP] hello what about Webmin? it's wuite cool, it has it all. (don't remember the URL, it comes with Linux Mandrake 7.2 for sure) try searching on google Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: SuiteNet Operations Manager [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 1:59 PM To: php-general Subject: [PHP] hello Im looking to set-up a customer based control panel for my servers. Running linux/apache. I was wondering if you had any advice on ware to look for programs or scripts that might help me to do this. I tried looking. And I have not found anything any help would be highly appreciated thank you. -- Regards Herb McDonald SuiteNet Comm Inc., Operations Manager http://www.suite.net/ PLEASE MAKE A NOTE THANK YOU ! Support has been changed from 1-954-971-4025 TO 1-561-784-9407 Order/New Account Info Only 1-800-510-1936 <<>><<>><<>><<>><<>><<>> MESSAGE SEPARATOR <<>><<>><<>><<>><<>><<>> -- 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]
You can consider also <Files *.inc> Order allow,deny Deny from all </Files> <Files> sections are processed in the order they appear in the configuration file, after the <Directory> sections and .htaccess files are read, but before <Location> sections. Note that <Files> can be nested inside <Directory> sections to restrict the portion of the filesystem they apply to. Regards, Avetis Jason Dulberg wrote: > I have about 20 virtual hosts on my server and all of them have shtml and > some php files that look to a directory /includes/ which is aliased (in the > srm.conf file) over to a main includes directory under the root dir. > > Alias /includes/ /usr/local/etc/httpd/htdocs/includes/ > > If I change this alias to a directory above the root dir, I can still view > all of my .inc files in a browser even if I rename them to .inc.php > > These .inc files are just plain text that get included into all .shtml files > on the virtual hosts. > > I tried to do the deny *.inc but doing so just made it so the browser can't > even include them. So that won't do the trick. > > Is there any way that I can make these .inc files not readable by viewing > them directly in the browser and still be able to include them into > documents? Same goes for the php config stuff. If I put a config.php script > above the root, how can I get the php script to read it -- is it the same > 'ol /usr/etc/httpd/ sort of thing like cgi? > > My main concern is to get this stuff more secure while still allowing all of > the virtual hosts to use the files. The contents of the files isn't exactly > top secret, its just a matter of a piece of mind. > > Any ideas to sort this out are greatly appreciated! Thanks. > __________________ > Jason Dulberg > Extreme MTB > http://extreme.nas.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- [EMAIL PROTECTED] ICT Specialist UNDP, Armenia
Anyone able to shed some light on this error? Warning: Failed opening '/usr/local/apache/htdocs/php/test/test.php' for inclusion (include_path='') in Unknown on line 0 thanks, brendan
you're trying to include test.php w/o specifiying it's correct location in your other PHP script. that's how it looks from here... -elias http://eassoft.cjb.net <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Anyone able to shed some light on this error? > > Warning: Failed opening '/usr/local/apache/htdocs/php/test/test.php' > for inclusion (include_path='') in Unknown on line 0 > > thanks, brendan > > > -- > 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] >
> If I have a script that checks to see if a variaable is defined. The > variaable is from a form and is sent to the script. There is also a > cookie that may be set with a name as the same name as from the form. > When the script checks and assuming the cookie is set and a value sent > from the form , which value does the variable take on? This is determined by your "variables_order" directive in your php.ini file. By default it is set to "EGPCS" which means that variables are parsed and inserted into the symbol table in the order: Environment - GET - POST - Cookie - Server That is, the later ones override the earlier ones. So in your case the cookie variable would take precedence. The one from the form (the POST one) would of course still be available in the $HTTP_POST_VARS array. -Rasmus
we're trying to develop an exact replica of the SkyBiz downline|Matrix system program. But it's getting so complicated & niether is the logic coming out. we're in need of help. Anyone familiar with the skybiz matrix, please help!! It's a 2 X 2 matrix system where a person can have only two legs below him - Left & Right = and thus the chain grows. Each person sponsors 2 people below him. They can be directly below him or somewhere down the line. But keeping a count of how many people o one's right & left is getting impossible logically. please help! Cheers, T. Edison jr. ===== Rahul S. Johari (Director) ****************************************** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 ******************************************* __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Is there any chance for you to use a database? these thing would become MUCH, MUCH easier. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Rafael Faria [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 4:59 AM To: [EMAIL PROTECTED] Subject: [PHP] Lines Hey Guys, it's my first post on this list, and my doubt is... how can i take a file.txt and 1 - know how many lines i have in this text 2 - print line 5 until 10 ? can someone help me? --- [ r a f a e l f a r i a] _____________________ [EMAIL PROTECTED] WebMaster Universo Online - http://www.uol.com.br Phone # +55 11 3038-8665 -- 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]
> > it's my first post on this list, and my doubt is... > > > > how can i take a file.txt and > > > > 1 - know how many lines i have in this text > > 2 - print line 5 until 10 > Is there any chance for you to use a database? > these thing would become MUCH, MUCH easier. Actually, this is really easy without using a database. 1. <? $filename = "/path/to/file"; $filedata = file($filename); $linesinfile = count($filedata); ?> 2. <? $startline = 5; $stopline = 10; for ($i = $startline; $i < $stopline; $i++ ) { echo $filedata[$i-1]; } ?> (Use $i-1 because the first line is actually "0"). Jason
I know, it was already answered before me (you), I just though that an SQL database is a good advice for these who are trying to do this kind of jobs. It is obvious that the reason to use this function is to manage a stored data in files. then why not a database, if possible? Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Jason Murray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 4:52 PM To: Maxim Maletsky; 'Rafael Faria'; [EMAIL PROTECTED] Subject: RE: [PHP] Lines > > it's my first post on this list, and my doubt is... > > > > how can i take a file.txt and > > > > 1 - know how many lines i have in this text > > 2 - print line 5 until 10 > Is there any chance for you to use a database? > these thing would become MUCH, MUCH easier. Actually, this is really easy without using a database. 1. <? $filename = "/path/to/file"; $filedata = file($filename); $linesinfile = count($filedata); ?> 2. <? $startline = 5; $stopline = 10; for ($i = $startline; $i < $stopline; $i++ ) { echo $filedata[$i-1]; } ?> (Use $i-1 because the first line is actually "0"). Jason
> I know, it was already answered before me (you), > > I just though that an SQL database is a good advice for these > who are trying to do this kind of jobs. It is obvious that the > reason to use this function is to manage a stored data in files. > then why not a database, if possible? I didn't see the purpose (I'm tired) - I just answered the q cos I had a heart attack when I saw an answer of "use a database" for counting line numbers ;) Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "What'll Scorpy use wormhole technology for?" 'Faster pizza delivery.'
you should be starting to program from C++ :-) Classes are described in many manuals on the web. Try downloading phplib (phplib.netuse.de) to see then "alive" phplib is one the most magnificent examples of classes use in PHP. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: SED [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 1:47 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question about Classes Hi, I have now been 3-4 months writing PHP-codes and read the PHP manual throughout. But there is one thing I can't figure out properly (I think it's not covered enough in the manual): Classes! When and why would I use it? Is it only to group certain functions or does it have a special function? Thanks! Regards, Sumarlidi Einar Dadason SED - Graphic Design ------------------------------------------ Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage: www.sed.is <- New Homepage! ------------------------------------------ -- 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. I have a problem with PHP. I want to use imap functions. I receive a message that imap function is not defined. I compiled PHP again with --with-imap option , but I've got an error message at Apache compilation. What is realy happening? Thanks Calin
Calin Rotaru wrote: > I want to use imap functions. I receive a message that imap function > is not defined. I compiled PHP again with --with-imap option , but > I've got an error message at Apache compilation. > What is realy happening? What error-message do you get? regards Wagner -- "In place of infinity we usually put some really big number, like 15." - Anonymous Computer Science professor
A multi dimensional array is a matrix. if $array[1][2][3] was an element of a multi-dimensional array then it would directly accessible as an element of $array. It isn't. $array (and $array[n]) only contain arrays. If $array was a 3-d array then ... $array[1][2][3] = "fred"; if (in_array("fred", $array)) echo "fred found"; // prints "fred found" Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Robert V. Zwink [mailto:[EMAIL PROTECTED]] > Sent: 24 April 2001 15:20 > To: Tim Ward > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Is there such an array like $array[][]? > > > I don't understand your different definitions: "muti-dimensional" and > "array of arrays" > > From the manual: > Multi-Dimensional Arrays > Multi-dimensional arrays are actually pretty simple. For each > dimension of > the array, you add another [key] value to the end: > > > Tim Ward wrote: > > <snip> > > What looks like a 2d array is fact an array of arrays (and so > > on). If it's built right this can be treated as a multi-d > array in many > > ways ... but not all. > > I wonder if you can help me understand this concept by giving > an example of > what is possible with 1-dim arrays, but not with 3-dim arrays? > > From my point of view the only difference is writing a custom > comparison > function when sorting, though this does seem logical considering the > additional complexity of multiple dimensions. > > Thanks for your help. > > Robert Zwink > > > -----Original Message----- > From: Tim Ward [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 24, 2001 9:54 AM > To: 'Robert V. Zwink' > Subject: RE: [PHP] Is there such an array like $array[][]? > > > my point was that what appear to be multi-dimensional arrays > in php are not > that at all. What looks like a 2d array is fact an array of > arrays (and so > on). If it's built right this can be treated as a multi-d > array in many ways > ... but not all. > > There seem to be a lot of queries from people confused about > how to deal > with arrays of arrays and this often stems from a > misconception that they > are actually multi-d arrays. > > Tim Ward > Senior Systems Engineer > > Please refer to the following disclaimer in respect of this message: > http://www.stivesdirect.com/e-mail-disclaimer.html > > > > -----Original Message----- > > From: Robert V. Zwink [mailto:[EMAIL PROTECTED]] > > Sent: 24 April 2001 14:33 > > To: Tim Ward; [EMAIL PROTECTED] > > Subject: RE: [PHP] Is there such an array like $array[][]? > > > > > > I have used the function usort() to sort multi-dimensional > > arrays before. > > It might be a challenge to write the comparison function, but it is > > possible. I use 3-dim arrays all of the time. Makes for a > > bit cleaner code > > IMHO. > > > > I suppose one thing to consider, is that if you have an > enormous 3-dim > > array, you are probably doing something wrong. Generating a > > really big > > array can be resource intense, and can slow you page down > > exponentially. > > Select only parts of the recordset, or smaller chuck of the > > file for better > > execution, but if your application requires a large 3-dim > > array, it works > > just fine for me. > > > > Robert Zwink > > > > -----Original Message----- > > From: Tim Ward [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 18, 2001 8:06 AM > > To: '[EMAIL PROTECTED]' > > Subject: RE: [PHP] Is there such an array like $array[][]? > > > > > > 1. there are no multi-dimensional arrays in php, just > single dimension > > arrays each element of which may be an array (or any other > > variable type). > > If you make every element of an array an array of size x, you > > will get what > > can be used as a multi-dimensional array. But if you forget > > what it really > > is, you'll run into problems like expecting to be able to sort > > $array[$x][$y] by $y. > > 2. because of this you can have as many levels of an array as > > you want. > > > > try : > > $array[][][][] = "fred"; > > foreach($array as $level1) > > foreach($level1 as $level2) > > foreach($level2 as $level3) > > foreach($level3 as $value) > > echo($value); > > > > Tim Ward > > Senior Systems Engineer > > > > Please refer to the following disclaimer in respect of this message: > > http://www.stivesdirect.com/e-mail-disclaimer.html > > > > > > > -----Original Message----- > > > From: Plutarck [mailto:[EMAIL PROTECTED]] > > > Sent: 17 April 2001 17:42 > > > To: [EMAIL PROTECTED] > > > Subject: Re: [PHP] Is there such an array like $array[][]? > > > > > > > > > PHP can be a tad screwy with how it handles multi-dimensional > > > arrays, but > > > yes PHP handles them. No real speed problems with them either. > > > > > > But you may just want to use an associative array like: > > > > > > $loc = array("y" => $y, "x" => $x); > > > > > > Then just use $loc["y"] and $loc["x"]. > > > > > > Just another option, but feel free to use multi-dimensional > > > arrays. Just be > > > aware that PHP supports only two dimensions (so $array[][][] > > > will not work), > > > and if you try and get fancy with sort() and count() you are > > > going to give > > > yourself a migraine. > > > > > > > > > -- > > > Plutarck > > > Should be working on something... > > > ...but forgot what it was. > > > > > > > > > "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > yes, that's a multi-dimensional array, which is fine in php (and > > > > everything else i can think of =P)... > > > > > > > > -jack > > > > > > > > Scott Fletcher wrote: > > > > > > > > > > Hi! I am wondering if there is such a php array that can > > > take care of > > > the x > > > > > and y axis data. I figure that using this array type, > > > $axis[$x][$y] > > > would > > > > > do the trick. Would it work? If not, then education me > > > on what would > > > work! > > > > > Thanks! > > > > > > > > > > Scott > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > >
hello, i'm building an online payment form.... the only thing is that i can't rely on the MOD10 CC validation algo... any one knows any company that provides CC validation (checks if account exists, and the money is enough to pay the price) ... ? I only need a company with such validation issue.... All hints would be appriciated. -elias
I tried looking for other PHP binaries at http://www.php.net/downloads.php. All it displayed was one from Windows. What happened to the versions for Linux? Does it have a version for Solaris? - Andres Montiel
Kyutums wrote: > I tried looking for other PHP binaries at > http://www.php.net/downloads.php. All it displayed was one from > Windows. What happened to the versions for Linux? Does it have a > version for Solaris? Just grab the source and compile. This will work on most Unices, including Linux and Solaris. regards Wagner -- "In place of infinity we usually put some really big number, like 15." - Anonymous Computer Science professor
Did anybody have the same error? I have this simple script: =============== <? session_start() ; ?> <FORM METHOD=POST NAME="form1" ENCTYPE="multipart/form-data" ACTION="another_script.php"> <SELECT NAME="sel" onChange='hidden_filed.value=this.value<<3"> <OPTION VALUE=1> First option </SELECT> <INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0> ================ on a computer the output is perfect, on the second computer, there is a strange error, I've ever seen in my life! the output on the second computer, in the 'select' line, is this: <SELECT NAME="sel" onChange='hidden_filed.value=this.value< <3"> as you can see, there is a space between the two " < ", and some times there it show some garbage between those two " < " . this only disappears when I remove the " session_start " statement! ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out how to fix that!.. I need sessions, I cannot just give it up! the first computer is a Pentium II, on linux RH 6.1 with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1 and it's working just fine! but... the second computer is Pentium III on linux RH 7.0, same configuration, but with php-4.0.1pl2, (purchased!!!...) and it does yeld that error. I tried with the php-4.0.1pl1 (as with the first computer) but curiously... it does act the same wrong way.. it seems to be something about sessions, but independently of the php version... I compiled the apache server with the 'public' UID, 'guest' GUID, and they are present in my linux user and group list. the session does actually write any info correctly. (i tried a session_register('blabla') and it works)... the error only disappears when I remove the " session_start " statement! ANY help or idea would be greatly appreciated! thanx, Daniel BI
Anyone know what font is used in the PHP logo? :)