php-windows Digest 1 May 2001 02:57:48 -0000 Issue 573 Topics (messages 7155 through 7174): Re: Get the string between custom delimiters 7155 by: Joe Brown Re: PHP, network shares, and IIS5 7156 by: Dickerson, Monty 7158 by: Romeo, Domenic A 7159 by: Daniel Beulshausen Re: this is for you IIS 5 people 7157 by: Matthew Ralston session tracking across a server farm 7160 by: Kelvin Luck sticky sessions :: Load Balancing :: RE: session tracking across a server farm 7161 by: Dickerson, Monty Re: Hosting 7162 by: Toby Miller Re: Help on MYSQL Table design 7163 by: Toby Miller 7165 by: Toby Miller 7166 by: Toby Miller /pear/DB.php (with mssql)... docs? examples? usage help? thx!! 7164 by: Dickerson, Monty Please Help 7167 by: Robert Trembath Newbie question - Getting the path ? 7168 by: Dane Carlsson 7169 by: Tomasz Abramowicz 7170 by: Dane Carlsson PHP 4.0.5 Zip File corrupt 7171 by: SHAWN Win2000+Apache+PHP4+oracle help 7172 by: Jeff Brewster need help displaying random records 7173 by: r.gelstharp 7174 by: Chris Adams 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] ----------------------------------------------------------------------
That's pretty much what an xml parser does, isn't it? ""Matthew Ralston"" <[EMAIL PROTECTED]> wrote in message 9cjob9$cur$[EMAIL PROTECTED]">news:9cjob9$cur$[EMAIL PROTECTED]... > Is there a nice easy function that could be used to get a sub string that > lies in between two other sub strings in one big string. > > For example... get the text that lies in between "<title>" and "</title>" > (without the quotes) in the code of a web page. > > I'm after a function like: > > string getstring_between_customdelimiters(string source, string > open_delimiter, sting close_delimiter) > > Or something that could be easily be used in that manner. Case insensitive > if possible! > > Thanks, > > Matt > [EMAIL PROTECTED] > < www.mralston.co.uk /> > > > > -- > PHP Windows 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] >
Howdy Paul. You'd think that running scripts from a network share wouldn't be all that different from pulling static files, but, it is. Recall that the NT LocalSystem metauser under which IIS runs is not allowed to access network stuff for security reasons. Therefore for IIS to get to network stuff it has to use the username/pw you specify under the Directory Security tab in the IIS.MMC for the site (button called Anonymous Access I think). However, the ISAPI for PHP4 is not mature and performing advanced features like accessing network resources would require TIGHT integration with IIS. Consider switching to CGI instead of ISAPI. So basically, you can't do what you want to do, yet -- Not with PHP running under IIS. I may be wrong, so check the bug database at www.php.net to ensure that network shares access under the IIS sapi is indeed a limitation at this time. But, an old proverb of mine is: "If you run on the cutting edge, you're gonna bleed." Best of luck. montyd
Paul, I haven't been able to get a UNC path to work at all with any version of PHP 4 cgi or isapi. The last time it worked for me was with php 3.0.15 For now (until 4.0.6 is released) you can either map a permanent drive letter for your share. This is difficult to do with Windows 2000 Server when no one is logged in. Or run a mixed environment of php3 and php4 and use php 3 for things that require UNC. Dom -----Original Message----- From: Dickerson, Monty [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 11:00 AM To: [EMAIL PROTECTED] Cc: 'Paul Smith' Subject: RE: [PHP-WIN] PHP, network shares, and IIS5 Howdy Paul. You'd think that running scripts from a network share wouldn't be all that different from pulling static files, but, it is. Recall that the NT LocalSystem metauser under which IIS runs is not allowed to access network stuff for security reasons. Therefore for IIS to get to network stuff it has to use the username/pw you specify under the Directory Security tab in the IIS.MMC for the site (button called Anonymous Access I think). However, the ISAPI for PHP4 is not mature and performing advanced features like accessing network resources would require TIGHT integration with IIS. Consider switching to CGI instead of ISAPI. So basically, you can't do what you want to do, yet -- Not with PHP running under IIS. I may be wrong, so check the bug database at www.php.net to ensure that network shares access under the IIS sapi is indeed a limitation at this time. But, an old proverb of mine is: "If you run on the cutting edge, you're gonna bleed." Best of luck. montyd -- PHP Windows 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 11:05 30.04.2001 -0400, Romeo, Domenic A wrote: >Paul, > >I haven't been able to get a UNC path to work at all with any version of PHP >4 cgi or isapi. The last time it worked for me was with php 3.0.15 > >For now (until 4.0.6 is released) you can either map a permanent drive >letter for your share. This is difficult to do with Windows 2000 Server when >no one is logged in. Or run a mixed environment of php3 and php4 and use php >3 for things that require UNC. try http://www.mm4.de/php4win/download/php-unc.zip i don't know how long the server is up, because it's sheduled to go down today. daniel /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
huh...footers...yeah...like they worked!!! :( -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> "Voodoo Phreeek Boy" <[EMAIL PROTECTED]> wrote in message 9ciq41$ut4$[EMAIL PROTECTED]">news:9ciq41$ut4$[EMAIL PROTECTED]... > anybody know of a way to make IIS 5 footers (you know, that neet-o option) > into headers? > > plezzzzzz help > > [EMAIL PROTECTED] > > thaxz > > > > -- > PHP Windows 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 am just writing a user authentication system in php. I was planning to use session variables to track logged in users as they navigate the site... However, when the site is deployed it will be run on a server farm. Does this break session variables in php? If so does anyone know a way I can authenticate users that will work on a server farm and will allow me to use a html form to get users to log in (I know I could do it with $PHP_AUTH_USER but I believe this means that you have to allow the browser to pop up a default log in dialog?). thanks in advance for any help, Kelvin.
Kelvin, The trick you need is called 'sticky sessions'. Which are you using to balance the load on your server farm? . Cisco LocalDirector . Dell BigIP . An RFC2391-complaint LSNAT router . Linux 2.4 iptables . Redundant DNS entries (not effective) . Microsoft Windows 2000 Advanced Server's LB NAT util The Cisco LocalDirector ($$$) can do sticky sessions, i.e. keep a session going to one box behind it, by matching a cookie or a substring on the URL. Hey, HONK if anyone is doing sticky sessions with php4... pls! :) montyd > -----Original Message----- > From: Kelvin Luck [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 30, 2001 11:14 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] session tracking across a server farm > > > Hi, > I am just writing a user authentication system in php. I was > planning to use > session variables to track logged in users as they navigate > the site... > However, when the site is deployed it will be run on a server > farm. Does > this break session variables in php? > If so does anyone know a way I can authenticate users that > will work on a > server farm and will allow me to use a html form to get users > to log in (I > know I could do it with $PHP_AUTH_USER but I believe this > means that you > have to allow the browser to pop up a default log in dialog?). > thanks in advance for any help, > Kelvin. >
You could check out www.mybizhosting.com they have PHP4 and MySQL and they're decently priced with a really good network. I've been using them for a little while now and have been very happy with their services. ----- Original Message ----- From: "PHPWIN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 27, 2001 1:28 PM Subject: [PHP-WIN] Hosting Hi there I was wondering if anyone has had any of their sites hosted on dreamlink.net or hosting4all.com. Would like to have some opinion if so, coz wanna finda good host for php and mysql, slightly above the small size kinda site. Cheers Xon
John, No, you could just add another link table. So you would have the following tables: personal_info ------------------------------ ID -> unique id for family member NAME -> family members name family_info ------------------------------ ID -> unique id for family F_NAME -> family name personal_family_link ------------------------------ P_ID -> comes from personal_info.ID F_ID -> comes from family_info.ID RELATIONSHIP -> family members relationship All of these fields would be required (NOT NULL). Toby ----- Original Message ----- From: "John" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 29, 2001 8:57 AM Subject: [PHP-WIN] Help on MYSQL Table design > Hi Everybody, > > I have 2 tables: personal_info and family_info. > For example, in personal_info, I have ID and NAME as fields. In > family_info, I have ID, F_NAME and RELATIONSHIP as fields. > > The problem is in family_info, for each ID, I have several records. Do I > need to have another field, say, COUNT in family_info so that I > associate these records to each ID? > > > Thanks. > > -- > PHP Windows 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] >
John, No, you could just add another link table. So you would have the following tables: personal_info ------------------------------ ID -> unique id for family member NAME -> family members name family_info ------------------------------ ID -> unique id for family F_NAME -> family name personal_family_link ------------------------------ P_ID -> comes from personal_info.ID F_ID -> comes from family_info.ID RELATIONSHIP -> family members relationship All of these fields would be required (NOT NULL). Toby ----- Original Message ----- From: "John" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 29, 2001 8:57 AM Subject: [PHP-WIN] Help on MYSQL Table design > Hi Everybody, > > I have 2 tables: personal_info and family_info. > For example, in personal_info, I have ID and NAME as fields. In > family_info, I have ID, F_NAME and RELATIONSHIP as fields. > > The problem is in family_info, for each ID, I have several records. Do I > need to have another field, say, COUNT in family_info so that I > associate these records to each ID? > > > Thanks. > > -- > PHP Windows 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] >
John, No, you could just add another link table. So you would have the following tables: personal_info ------------------------------ ID -> unique id for family member NAME -> family members name family_info ------------------------------ ID -> unique id for family F_NAME -> family name personal_family_link ------------------------------ P_ID -> comes from personal_info.ID F_ID -> comes from family_info.ID RELATIONSHIP -> family members relationship All of these fields would be required (NOT NULL). Toby ----- Original Message ----- From: "John" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 29, 2001 8:57 AM Subject: [PHP-WIN] Help on MYSQL Table design > Hi Everybody, > > I have 2 tables: personal_info and family_info. > For example, in personal_info, I have ID and NAME as fields. In > family_info, I have ID, F_NAME and RELATIONSHIP as fields. > > The problem is in family_info, for each ID, I have several records. Do I > need to have another field, say, COUNT in family_info so that I > associate these records to each ID? > > > Thanks. > > -- > PHP Windows 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] >
Howdy! Is anybody using class DB.php (distributed in the pear directory of every php4 distribution)? If so, please point me to some documentation and examples of this well written class! I'm having trouble using it; When I run the following code ... >> <?php include_once('DB.php'); $db = DB::connect(mssql://user:pw@host/mydb'); $stmt = $db->prepare('SELECT * FROM Schools'); $result = $db->execute($stmt); $row = $db->fetchrow($result); // while($row = $db->fetchrow($result)) { foreach( $row as $field => $value ) { echo "$field: $value<br>\n"; } // } $db->disconnect(); ?> The output is ... >> error_message_prefix: error_prepend: error_append: mode: 1 level: 1024 code: -1 message: DB Error: unknown error debuginfo: SELECT * FROM Schools callback: And I do have Mssql client 7 installed on my machine; 'host' is a DNS name of the server computer, right?... thx, monty
Here's a sample of the code I'm having touble with. I get nothing but a blank page and my gas tank(brain) is running on fumes so to speak. It works fine without the if..else but with it I get nothing. I'm just trying to see if the variable exists, if it does I update the record, if it doesn't I create a new record and write the ID to $TransID. Robert //write session data to transactions database if ( isset( $TransID ) ) $link5 = mysql_pconnect( "64.0.182.176", $user, $pass ); mysql_select_db( $db ) or die ( "Couldn't open $db: ".mysql_error() ); $query5 = mysql_query( "UPDATE transactions set CustomerID = '$user_ID', SessionID = '$SID', Status = 'Incomplete' WHERE ID ='$TransID'") or die ( "Couldn't open $db: ".mysql_error() ); //write lane to database $link2 = mysql_pconnect( "64.0.182.176", $user, $pass ); mysql_select_db( $db ) or die ( "Couldn't open $db: ".mysql_error() ); $query2 = mysql_query( "INSERT INTO lanesdb ( ProjectID, LaneNo, Genus, Species, LCompare, Primer, Notes, SampleID, TransID ) values( '$gelID', '$LaneNo', '$Genus', '$Species', '$LCompare', '$Primer', '$Notes', '$SampleID', '$TransID' )") or die ( "Couldn't open $db: ".mysql_error() ); mysql_close( $link, $link1, $link2, $link5 ); header("Location:modify_gels.php?id=$gelID"); else $link3 = mysql_pconnect( "64.0.182.176", $user, $pass ); mysql_select_db( $db ) or die ( "Couldn't open $db: ".mysql_error() ); $query3 = mysql_query( "INSERT INTO transactions ( CustomerID, SessionID, Status ) values( '$user_ID', '$SessionID', 'Incomplete' )") or die ( "Couldn't open $db: ".mysql_error() ); session_register( "TransID" ); $TransID = mysql_insert_id( $query3 ); //write lane to database $link2 = mysql_pconnect( "64.0.182.176", $user, $pass ); mysql_select_db( $db ) or die ( "Couldn't open $db: ".mysql_error() ); $query2 = mysql_query( "INSERT INTO lanesdb ( ProjectID, LaneNo, Genus, Species, LCompare, Primer, Notes, SampleID, TransID ) values( '$gelID', '$LaneNo', '$Genus', '$Species', '$LCompare', '$Primer', '$Notes', '$SampleID', '$TransID' )") or die ( "Couldn't open $db: ".mysql_error() ); mysql_close( $link, $link1, $link2, $link3 ); header("Location:modify_gels.php?id=$gelID");
Hi, Is there a function to get the current path? I haven't be able to locate one in a quick browse over the documentation. Also are there php irc channels ? TIA
> Hi, > > Is there a function to get the current path? make a file with <? phpinfo(); ?> in it. You will get all the variables you can dream of includeing $DOCUMENT_ROOT and $PHP_SELF which you might find interesting. > I haven't be able to locate one in a quick browse over the documentation. if you know more or less what your looking for try www.php.net/term_to_find_out_about it will point either to the page of the function or will search the term for you. best thing since sliced bread. > Also are there php irc channels ? #php on EFnet. BUT. it may be just me, but the guys over there seem to like to tell you RTFM a lot... which kinda defeats the point of haveing people online to help you, but on the other hand, them telling you all the answers, kinda defeats the point of manuals? t.
thanks for the speedy reply your not wrong about phpinfo ill go tinker with it now :) ----- Original Message ----- From: Tomasz Abramowicz <[EMAIL PROTECTED]> To: Dane Carlsson <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 4:53 AM Subject: Re: [PHP-WIN] Newbie question - Getting the path ? > > Hi, > > > > Is there a function to get the current path? > > make a file with > > <? > > phpinfo(); > > ?> > > in it. You will get all the variables you can dream of includeing > $DOCUMENT_ROOT and $PHP_SELF which you might find > interesting. > > > I haven't be able to locate one in a quick browse over the documentation. > > if you know more or less what your looking for try > > www.php.net/term_to_find_out_about > > it will point either to the page of the function or will search the term for > you. > best thing since sliced bread. > > > Also are there php irc channels ? > > #php on EFnet. BUT. it may be just me, but the guys > over there seem to like to tell you RTFM a lot... > which kinda defeats the point of haveing people online > to help you, but on the other hand, them telling you all > the answers, kinda defeats the point of manuals? > > t. > >
Is anyone else getting errors when trying to extract the pre-compiled binary zip file for PHP 4.0.5? It still gives me errors when I try to fix the Zip. Are there any other sites that mirror php.net which might have a good copy? Thanks in Advance! Shawn Sellars
Hello, I've spent all day going through archive after archive of messages trying to find what all needs to be done to get PHP4 to remotely connect to OCI8. I'm downloading the client libraries from Oracle right now. www.php4win.de is down and I cannot get the distribution with OCI8 pre-compiled. Is there any alternative to getting this distribution? I saw some old messages from someone about writing a nice tutorial to get PHP4+Windows+Oracle working, but I never found a link to it. Does this exist? Sorry I'm really stressing today over many things but if anyone can provide any help I'd appreciate it. Thanks, Jeff
As a university degree student my final year project is a comparison on ASP v PHP. I have to make two identical sites in both languages, but am at the moment having trouble duplicating a function on my ASP pages in PHP. The default page in my ASP pages display random records from the database to the screen, but I'm having a bugger of a time trying to duplicate the effort in PHP. If I have a database called storeDBase, and want to display random records from the table Products, is there any kind of simple way of doing that? Matt Bridger a.k.a. "Stressed and Rapidly Becoming Mentally Destabilized Student"
On 30 Apr 2001 17:27:44 -0700, r.gelstharp <[EMAIL PROTECTED]> wrote: > As a university degree student my final year project is a comparison on ASP > v PHP. I have to make two identical sites in both languages, but am at the > moment having trouble duplicating a function on my ASP pages in PHP. > > The default page in my ASP pages display random records from the database to > the screen, but I'm having a bugger of a time trying to duplicate the effort > in PHP. Which database are you using? If you don't have an easy database (e.g. records from 1 to 100 allowing a simple select where ID=rand()), you'll probably need something database specific - for example, in SQL Server you should be able to do SELECT TOP 1 ... ORDER BY RAND(). Alternately, if you only have a small number of records, you could simply select all of the records and then pick a row from the resultset at random. Chris