Re: [PHP] real simple regex
From: Jack Dempsey <[EMAIL PROTECTED]> Date: Mon, Sep 17, 2001 at 09:41:07PM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: RE: [PHP] real simple regex > you actually don't need regex... > if you take a few minutes you can do it all with strpos and substr, adn > it'll be faster than regex. Not realy the very best solution to use strpos and substr. You'll have to loop through the "From-string" and look for the next address each time. You can have more than one address in the From-field! And then again... what would you do with addresses that are not between < and >? Eg.: Renze Munnik <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Using strpos and substr won't realy make you're live any simpler. I suggest you use something like the following RE: $emlchars = "[a-z0-9.-]+"; $RE = "/($emlchars@$emlchars)/i"; I've put the allowed characters for the email-address in a separate string in order to make it read easier. You can add all characters to that string that are also allowed, because I don't believe these are the only allowed characters in an email-address. How to use? See the following example code: --- PHP Code --- , [EMAIL PROTECTED], Mr Nobody <[EMAIL PROTECTED]>"; $emlchars = "[a-z0-9.-]+"; $RE = "/($emlchars@$emlchars)/i"; if (preg_match_all ($RE, $from, $matches)) { print ("Matched!\n\n"); print_r ($matches); } else { print ("Didn't match!"); } ?> --- End of PHP Code --- -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem: ereg doesn't work ok (?).
From: Lic. Rodolfo Gonzalez Gonzalez <[EMAIL PROTECTED]> Date: Mon, Sep 17, 2001 at 05:13:04PM -0500 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Problem: ereg doesn't work o > Hello, > > I have a problem with ereg: following the example from the documentation > (see the ereg page in the manual), I'm using it to parse a -MM-DD date > and get DD-MM-, but with well formed -MM-DD it doesn't match!. Is > this a bug?. > > Regards, > Rodolfo. > > php-4.0.8-dev (maybe the problem is due to the "dev", but I'd like to > confirm it). It would help if you send the code you're using, 'cause we can't see what you're doing now. FAFAIK it should just be possible. See the following example: --- PHP Code Example --- Matched!\n\n"); printf ("Year : %4d\nMonth: %02d\nDay : %02d\n", (integer)$matches[1], (integer)$matches[2], (integer)$matches[3]); } else { print ("Didn't match!"); } ?> --- End of PHP Code Example --- -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can I use Microsoft Access as a database?
Thanks, but since I am unfamiliar using this kind of database connection, I was hoping you could help me out some more. I did the following. In the ODBC Data Source Administrator of Windows 98 I have created a new file DSN. This DSN is configured to use a certain Access 2000 database on one of my harddisks. The DSN is called 'phpodbc.dsn'. Then, in the file odbc.php I do the following: When I access this PHP file with Internet Explorer, I get the following error message: Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Inetpub\wwwroot\odbc.php on line 3. Any ideas? Thanks, Alex "Niklas lampén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I think that ODBC is your solution. > > > Niklas > > -Original Message- > From: A. op de Weegh [mailto:[EMAIL PROTECTED]] > Sent: 15. syyskuuta 2001 13:05 > To: [EMAIL PROTECTED] > Subject: [PHP] Can I use Microsoft Access as a database? > > > Hi all, > for testing purposes in a school environment, I would like to use a > Microsoft Access database with PHP. I know how to connect to and use a MySQL > database, but I can't find any functions for accessing Microsoft Access > databases. > > Can anyone help me out here? > > Thankx, > Alex > > -- > PS: Replace the underscore (_) in my e-mail address with a minus sign (-). > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
From: hue micheal <[EMAIL PROTECTED]> Date: Mon, Sep 17, 2001 at 09:51:07PM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Print current page with no printer dialog box - How ? > Do you know how to create a button to print current page without > bringing up the printer dialog box? I just print to the default printer. > > And also how do I insert a page break ? > > Thanks. > Huem FAFAIK it's not possible to print a page client-side without showing the printer dialog box. And it shouldn't be either. You don't want people to just be able to do all kinds of things on your computer without being prompted for them. Page breaks are not part of HTML. Simply because HTML was never designed for that kind of puposes. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Print current page with no printer dialog box - How ?
FYI-- Page breaks can be designated with CSS (style sheets)... Although that's not a completely cross-platform method. -Original Message- From: * R&zE: [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 4:01 AM To: hue micheal; [EMAIL PROTECTED] Subject: Re: [PHP] Print current page with no printer dialog box - How ? From: hue micheal <[EMAIL PROTECTED]> Date: Mon, Sep 17, 2001 at 09:51:07PM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Print current page with no printer dialog box - How ? > Do you know how to create a button to print current page without > bringing up the printer dialog box? I just print to the default > printer. > > And also how do I insert a page break ? > > Thanks. > Huem FAFAIK it's not possible to print a page client-side without showing the printer dialog box. And it shouldn't be either. You don't want people to just be able to do all kinds of things on your computer without being prompted for them. Page breaks are not part of HTML. Simply because HTML was never designed for that kind of puposes. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
From: Matthew Loff <[EMAIL PROTECTED]> Date: Tue, Sep 18, 2001 at 04:11:34AM -0400 Message-ID: <017f01c14019$887d5600$0ce60281@bang> Subject: RE: [PHP] Print current page with no printer dialog box - How ? > > FYI-- Page breaks can be designated with CSS (style sheets)... > Although that's not a completely cross-platform method. Yep... that's what I said; You can't use pagebreaks. First... they're not part of HTML. Second; like you said yourself... it's not cross-platform... and like everyone knows; creating sites/pages that only some part of the users can see/use is not realy every very great solution. You build sites in order make as many people visit/use/see them as possible. Not just that one part of the world that uses the browser that you like. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can I use Microsoft Access as a database?
Try: $odbcId = odbc_connect("phpodbc.dsn", "admin", ""); Niklas -Original Message- From: A. op de Weegh [mailto:[EMAIL PROTECTED]] Sent: 18. syyskuuta 2001 10:57 To: [EMAIL PROTECTED] Subject: Re: [PHP] Can I use Microsoft Access as a database? Thanks, but since I am unfamiliar using this kind of database connection, I was hoping you could help me out some more. I did the following. In the ODBC Data Source Administrator of Windows 98 I have created a new file DSN. This DSN is configured to use a certain Access 2000 database on one of my harddisks. The DSN is called 'phpodbc.dsn'. Then, in the file odbc.php I do the following: When I access this PHP file with Internet Explorer, I get the following error message: Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Inetpub\wwwroot\odbc.php on line 3. Any ideas? Thanks, Alex "Niklas lampén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I think that ODBC is your solution. > > > Niklas > > -Original Message- > From: A. op de Weegh [mailto:[EMAIL PROTECTED]] > Sent: 15. syyskuuta 2001 13:05 > To: [EMAIL PROTECTED] > Subject: [PHP] Can I use Microsoft Access as a database? > > > Hi all, > for testing purposes in a school environment, I would like to use a > Microsoft Access database with PHP. I know how to connect to and use a MySQL > database, but I can't find any functions for accessing Microsoft Access > databases. > > Can anyone help me out here? > > Thankx, > Alex > > -- > PS: Replace the underscore (_) in my e-mail address with a minus sign (-). > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
[EMAIL PROTECTED] (* R&Ze:) wrote in news:20010918101659.I17452@pro- pain.telemediair.nl: > > Yep... that's what I said; You can't use pagebreaks. First... > they're not part of HTML. Second; like you said yourself... it's not > cross-platform... and like everyone knows; creating sites/pages that > only some part of the users can see/use is not realy every very > great solution. You build sites in order make as many people > visit/use/see them as possible. Not just that one part of the world > that uses the browser that you like. > However, using CSS to insert page breaks causes no problem at all in older browsers. HTML (and related technologies) have been designed so that newer features do not cause problems on older clients. Of course not everyone will use the newer features in such a way but that does not mean that they cannot be used correctly. In theory a document written in XHTML should display (to some extent) on a text only browser which only supports HTML 1. -- Chris Lambert [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
From: Chris Lambert <[EMAIL PROTECTED]> Date: Tue, Sep 18, 2001 at 08:52:46AM - Message-ID: <[EMAIL PROTECTED]> Subject: Re: [PHP] Print current page with no printer dialog box - How ? > However, using CSS to insert page breaks causes no problem at all in older > browsers. HTML (and related technologies) have been designed so that newer > features do not cause problems on older clients. Of course not everyone > will use the newer features in such a way but that does not mean that they > cannot be used correctly. In theory a document written in XHTML should > display (to some extent) on a text only browser which only supports HTML 1. FYI; pagebreaks are added CSS2. Not available in CSS1, so not compatible with older versions of browsers (opposite to what you say). Btw; another example of non-compatibility: background-color Try using that in eg older versions of IE. It's just ignored. Eg. IE3 uses bgcolor io background-color. The browsers have been made backwards-compatible (mostly anyway), and not forwards-compatible (like you say). Pages made for the older browsers still work (usualy... not always) on the newer browsers. But pages made for newer browsers hardly ever work fine on older browsers. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
[EMAIL PROTECTED] (* R&Ze:) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: > FYI; pagebreaks are added CSS2. Not available in CSS1, so not > compatible with older versions of browsers (opposite to what you > say). I know that. I did not say it would work - I said it would not cause any problems. > > The browsers have been made backwards-compatible (mostly anyway), > and not forwards-compatible (like you say). Pages made for the older > browsers still work (usualy... not always) on the newer browsers. > But pages made for newer browsers hardly ever work fine on older > browsers. > The HTML specification says that clients/browsers should ignore any tags they don't understand. Therefore any old browser coming across a STYLE="..." will ignore it. Pages made solely for newer browsers will probably look awful in older browsers. However, web pages can be written that use the newer features of newer browsers (such as CSS, Javascript, DHTML, Tables!, etc.) and are still accessible to older browsers. -- Chris Lambert [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] Compiling PHP with Apache
I want to compile Apache with PHP built-in instead of being loaded as an external module. Can anyone help me with this? I have Visual C++ 6.0 and Windows 2000. -Jobarr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can someone help me parse XML? - Challenge
On Monday 17 September 2001 16:42, Jeff Lewis wrote: > I have an XML file that I need to parse. I had the base of a perl > script written but wasn't completely functioning and was hoping someone > could give me a hand with making it parse and do what it's supposed to > but in PHP. The perl file looked like this: http://php.net/manual/en/ref.xml.php -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola. - LAN Times -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
> I know that. I did not say it would work - I said it would not cause any > problems. > > The HTML specification says that clients/browsers should ignore any tags > they don't understand. Therefore any old browser coming across a > STYLE="..." will ignore it. Pages made solely for newer browsers will > probably look awful in older browsers. However, web pages can be written > that use the newer features of newer browsers (such as CSS, Javascript, > DHTML, Tables!, etc.) and are still accessible to older browsers. Ahhh... well, I'm sorry... I misunderstood. I thought (/think) that stuff that doesn't work _is_ a problem, but that just a matter of oppinion obviously. If I write some code and a browser doesn't show/use it, I believe I've got a real problem, but obviously not everyone thinks that way (...) I think it's pretty irritating when a browser ignores my tags, but that will just be me, then. Btw; JavaScript written for newer browsers will not always just be ignored by older browsers. They can really choke in it. But that just aside. And for the HTML specification part... Yes... specifications can say things like that indeed. The problem, though, is that browsers not always stick to the specification. IE is a good example for that. Yet it's used by over 90% of all users, so just sticking to the specifications (like I used to do) isn't much of an option anymore. Ofcourse you should at any point it's possible, but writing pages only based on the specifications will not show up in many browsers they way you intended it. It's a damn shame, but true. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include question
Hi ! I'm using include() function to print html code nested in a function in the included file when a link is selected. I was wondering if the whole php file that is included gets loaded, or the server just sends the code from desired finction? Can I put more than one function full of html code in one file without fear that each time user will have to wait for the whole php to load ? exp: if(){ include("file.php")//is the whole file.php loaded, or just the function() ? function_with_html_code_in_it(); } Thanks Nikola -- 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] Replacing datafile with array
Hi, i am trying to replace a datafile wich contains the contents of a directory with an array. I am reading the directory and am trying to pass the value to an array. What am i doing wrong? Shouldn´t $retVal contain the direcory info? Also, is there a way to use the content of an array without getting the word 'Array' at the start? $handle=opendir('.'); while (false !== ($file = readdir($handle))) if ($file != "." && $file != ".." && ereg(".jpg",$file)) { $retVal[count($retVal)] = $file; } # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Replacing datafile with array
works like a charm just initializet the $retVal function... $retVal = array(); rest of script here "Daniel alsén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > i am trying to replace a datafile wich contains the contents of a directory > with an array. > I am reading the directory and am trying to pass the value to an array. What > am i doing wrong? Shouldn´t $retVal contain the direcory info? > > Also, is there a way to use the content of an array without getting the word > 'Array' at the start? > > $handle=opendir('.'); > while (false !== ($file = readdir($handle))) > > if ($file != "." && $file != ".." && ereg(".jpg",$file)) { > > $retVal[count($retVal)] = $file; > > } > > # Daniel Alsén| www.mindbash.com # > # [EMAIL PROTECTED] | +46 704 86 14 92 # > # ICQ: 63006462 | # > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regular expression help
This should do (but ofcourse you might want to play a bit with it) $mem = ' http://www.mydomain.com/mypage.php";>something is fine http://www.yourdomain.com/yourpage.php";>something is wrong http://www.yourdomain.com/yourpage.php";>something is fine http://www.lgwm.org/";>lgwm http://www.google.com"; onclick="javascript:alert(\'hello\');">Google! '; function handler($theTag, $theDomain) { if (!strstr($theDomain, "mydomain.com")) { $theTag = strstr($theTag, " "); $theTag = "]*>/eis"; $t = preg_replace($re, "handler('\\0', '\\2')" ,$mem); echo $t; //greetings R&Ze! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi all, > > I have some user-supplied text on a content driven site. > I am allowing tags inside the main text, BUT I want > any links to external sites (not on the chosen domain) > to include a ' TARGET="_new" ' element. > > So, > > http://www.mydomain.com/mypage.php";>something is fine > http://www.yourdomain.com/yourpage.php";>something is wrong > http://www.yourdomain.com/yourpage.php"; > TARGET="_new">something is fine > > And of course there are all the variants with and without > the www, and with and without sub directories and pages. > > I'[d also like to make sure the dopey people have put a > close tag in. > > > I've got a few ideas on how it might be done, but I need > to do it the right way, avoiding slight human errors etc. > > > Has anyone got something written, or can point me in the > right direction? > > > Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Speeding up program
How big difference does it make in speed in these: or So actually I'm asking how much more/less it takes time to do the comparing against mysql_num_rows() insted of comparing against a variable. Niklas
[PHP] R: Handling sessions between servers?
You have to pass the SID between servers and change the directory in which you store session files to a common location. You can pass the SID only once, after that the second server will set a cookie... in the first page you can put something like this -- Federico [EMAIL PROTECTED] -- Michael Champagne <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED] > Is it possible to handle sessions with PHP between separate web servers? We > have 2 Apache servers and would like to share session data between them. If > we keep the session data on an NFS mounted drive -- will this work? Would it > be better to write custom session handlers to store session data in a database > accessible from both servers? It seems like this should be possible, but I'm > not quite sure how to go about doing it. Also, this is on 2 separate > platforms. One is RedHat Linux 7.1 and the other server is on AIX 4.3.3. > > Thanks in advance for any replies, > Mike > > > > ** > This communication is for informational purposes only. It is not > intended as an offer or solicitation for the purchase or sale of > any financial instrument or as an official confirmation of any > transaction, unless specifically agreed otherwise. All market > prices, data and other information are not warranted as to > completeness or accuracy and are subject to change without > notice. Any comments or statements made herein do not > necessarily reflect the views or opinions of Capital Institutional > Services, Inc. Capital Institutional Services, Inc. accepts no > liability for any errors or omissions arising as a result of > transmission. Use of this communication by other than intended > recipients is prohibited. > ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Warning: stat failed - Why does it appear?
Hi folks. I have a project with over 270 is_dir, is_file and file-exists function calls. On unix there are no problems. On windows (WINNT/PHP Version 4.0.7-dev) these functions may return a warning like: Warning: stat failed for log.txt (errno=2 - No such file or directory) in D:\wwwroot\testsite-32b2\tslib\class.tslib_fe.php on line 711 This warning is typically returned if I check whether a file exists but it turns out that not only the file does not exist, the path does not exist! Now, there are two solutions I can't use: 1) I will not set error_reporting to exclude warnings, because PHP should to the best of my knowledge not at all bother about these things 2) I will not place a @ in front of every function which would potentially return this error. And furthermore I'm puzzled why this error apparently is only on Windows, not on Unix and certainly has not always been there since I remember earlier when this project did not impose any problems. So what's up here? Why is this warning justified? And how do I avoid it? Thanks a lot (Kasper Skårhøj, Typo3 developer) Best regards and God's blessings - kasper o - Were you taught the Earth was flat? Not so! See --->>> www.answersInGenesis.org Check www.typo3.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can I use Microsoft Access as a database?
First you have to define a *system* data source (DSN) with the ODBC control panel applet - e.h. with the name "accessdb". Be sure, that *other* applications are able to use this data source as well, before you try to access via PHP (e.g. with Excel, which comes with a data query tool to import data from ODBC data sources or MSQUERY). Then you open the connection as follows, *without* user or pw: The error "Data source name not found and not default..." means, that the name of the given data source was not found in the system DSNs. It has to be a system DSN, because PHP runs within another user context (e.h. IUSR_... if you use PHP and IIS or the System Account, if you use PHP and Apache), which does not have the *user* DSNs, which you as a user defined for yourself. Hope this helps, Arno -- 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] Undefined Variable in formular... what happens???
hello i am using win2000 xitami, php and access. so my problem is that the script couldn't find the variable.. . so i cant save the user changed buttons and editfields... is that a known problem with xitami and php? when i try to run the script on a real webserver with .php installed, it works fine. thanx ingo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Replacing datafile with array
Hmm... it still doesn´t work. If i echo $retVal i just get the word 'Array' (the same number of times that the number of files in the directory). If i echo $file i get the file listing...however, it doesn´t pass on the content to the rest of my script. Maybe someone could help me out with the whole script? I downloaded this from some script archive and it works if i use the list.photos datafile. But i don´t want to change that file every time a new photo is uploaded. I am trying to read the directory and use the directory handle listing instead. If anyone wants to help me out making this databasedriven instead youre very welcome :) \n"; } //initialize variables //$data_file = "list.photos"; $thumbnail_dir = "thumbs/"; $num_rows = 3; $photos_per_row = 3; $photos = file($retVal); //$retVal used to be $data_file $total_photos = sizeof($photos); $photos_per_page = $num_rows * $photos_per_row; //check to see if the start variable exists in the URL. //If not, then the user is on the first page - set start to 0 if(!isSet($start)){ $start = 0; } //init i to where it needs to start in the photos array $i = $start; $prev_start = $start - $photos_per_page; $next_start = $start + $photos_per_page; for ($row=0; $row < $num_rows; $row++){ print("\n"); for ($col=0; $col < $photos_per_row; $col++){ if($i < $total_photos){ $thumbnail = $thumbnail_dir.trim($photos[$i]); $thumb_image_size = getimagesize($thumbnail); $image_size = getimagesize(trim($photos[$i])); print(" \n"); } else { print("\n"); } $i++; } print("\n"); } //Clean up directory array closedir($handle); return $retVal; //end table ?> > -Original Message- > From: _lallous [mailto:[EMAIL PROTECTED]] > Sent: den 18 september 2001 13:46 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Replacing datafile with array > > > works like a charm > > just initializet the $retVal function... > > $retVal = array(); > rest of script here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Replacing datafile with array II
Woops! I actually got the listing to work by replacing $photos = file($retVal); with $photos = $retVal; :) But, there´s still a problem. The script doesn´t seem to be able to use the navigation part (print out the next and previous links). That part of the script looks like this: next page 0) && ($next_start < $total_photos)){ //you're in the middle of the photo gallery ?> « prev page | next page » $total_photos)){ //you're in a photo gallery with only one page of photos ?> « prev page > -Original Message- > From: _lallous [mailto:[EMAIL PROTECTED]] > Sent: den 18 september 2001 13:46 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Replacing datafile with array > > > works like a charm > > just initializet the $retVal function... > > $retVal = array(); > rest of script here > > "Daniel alsén" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > > > i am trying to replace a datafile wich contains the contents of a > directory > > with an array. > > I am reading the directory and am trying to pass the value to an array. > What > > am i doing wrong? Shouldn´t $retVal contain the direcory info? > > > > Also, is there a way to use the content of an array without getting the > word > > 'Array' at the start? > > > > $handle=opendir('.'); > > while (false !== ($file = readdir($handle))) > > > > if ($file != "." && $file != ".." && ereg(".jpg",$file)) { > > > > $retVal[count($retVal)] = $file; > > > > } > > > > # Daniel Alsén| www.mindbash.com # > > # [EMAIL PROTECTED] | +46 704 86 14 92 # > > # ICQ: 63006462 | # > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Replacing datafile with array Sorry... .)
Sorry, It seems like every time i posted a question i was able to solve it myself :) Something strange going on in my problem solving part of the brain. I got the whole script to work. The navigation part solved itself when i moved the 'cleaning up' part to the very end of the script. Still, if anyone wants to help out, or has a good solution, to make this databasedriven - please e-mail me. Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Replacing datafile with array
Man, you can't do echo Array! you have to walk through an array! dump the array and see its content via: var_dump($retVal) for example, refer yourself to the array functions in PHP's manual, "Daniel alsén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hmm... > > it still doesn´t work. > > If i echo $retVal i just get the word 'Array' (the same number of times that > the number of files in the directory). > > If i echo $file i get the file listing...however, it doesn´t pass on the > content to the rest of my script. > > Maybe someone could help me out with the whole script? I downloaded this > from some script archive and it works if i use the list.photos datafile. But > i don´t want to change that file every time a new photo is uploaded. > I am trying to read the directory and use the directory handle listing > instead. > > If anyone wants to help me out making this databasedriven instead youre very > welcome :) > > > $retVal = array (); > //Load Directory Into Array > $handle=opendir('.'); > while (false !== ($file = readdir($handle))) > > if ($file != "." && $file != ".." && ereg(".jpg",$file)) { > > $retVal [count($retVal)] = $file; > > echo "$retVal \n"; > > } > > //initialize variables > //$data_file = "list.photos"; > $thumbnail_dir = "thumbs/"; > $num_rows = 3; > $photos_per_row = 3; > $photos = file($retVal); //$retVal used to be $data_file > $total_photos = sizeof($photos); > $photos_per_page = $num_rows * $photos_per_row; > //check to see if the start variable exists in the URL. > //If not, then the user is on the first page - set start to 0 > if(!isSet($start)){ > $start = 0; > } > //init i to where it needs to start in the photos array > $i = $start; > $prev_start = $start - $photos_per_page; > $next_start = $start + $photos_per_page; > > > for ($row=0; $row < $num_rows; $row++){ > print("\n"); > for ($col=0; $col < $photos_per_row; $col++){ > if($i < $total_photos){ > $thumbnail = $thumbnail_dir.trim($photos[$i]); > $thumb_image_size = getimagesize($thumbnail); > $image_size = getimagesize(trim($photos[$i])); > print(" > href=\"javascript:photo_open('photo_display.php?photo=".trim($photos[$i])."' > ,'".$image_size[0]."','".$image_size[1]."');\"> ".$thumb_image_size[3]." border=\"0\">\n"); > } else { > print("\n"); > } > $i++; > } > print("\n"); > } > > > //Clean up directory array > closedir($handle); > return $retVal; > > > //end table > ?> > > > -Original Message- > > From: _lallous [mailto:[EMAIL PROTECTED]] > > Sent: den 18 september 2001 13:46 > > To: [EMAIL PROTECTED] > > Subject: [PHP] Re: Replacing datafile with array > > > > > > works like a charm > > > > just initializet the $retVal function... > > > > $retVal = array(); > > rest of script here > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] May I ask sql question here??
I know that, this is a newsgroup for PHP, but can I ask some SQL question here? Or, would you mind point me to a suitable newsgroup for SQL question? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: May I ask sql question here??
Man...you could have asked already and you might have got an answer from others and "NO" from others... I might answer you if your question is in the range of my knowledge. "Zenith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I know that, this is a newsgroup for PHP, but can I ask some SQL question > here? > Or, would you mind point me to a suitable newsgroup for SQL question? > > -- 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] fwd: INCREASING GAS PRICES
"Oil prices have jumped amid concerns that U.S. retaliation for this week's terrorist attacks could hurt supplies from the Middle East. Brent Crude futures for November delivery jumped 61 cents, or 2.2 percent, to $28.96 in mid-morning trade on London's International Petroleum Exchange." It's a Fact! Experts are saying that by the end of the year gas prices can be over $2.50 per gallon! Increase Your Gas Mileage up to 27%! http://www.e-webhostcentral.com/ch8/gas-001.html remove at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Get the beginning array number
reset($array); list(, $value) = each($array); this will give you first value in $value "Brandon Orther" <[EMAIL PROTECTED]> wrote in message !~[EMAIL PROTECTED]">news:!~[EMAIL PROTECTED]... > Hello, > > I have an array sent to my script that starts at different numbers each > time. Here is an example > > > $array[5] through $array[23] will have values but [0]-[4] will not. > > Is there a way for me to find the first element of an array with a value? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMS with php
Due to all the questions I am posting replies to this thread to a single message. > I'm very intruiged how you have got this to work it was my > understanding you needed to be running a server, such as kannel, and have a > contract with an smsc? No, you don't need anything special. > could U list the URL > http://www.radio.net/rfc1861.txt?number=1861 > http://www.ietf.org/rfc/rfc1568.txt?number=1568 This is old, Don't use it. The reason is not that any of the commands are unusable but there is no reason to go through the trouble of programming to do it to an out of date rfc. > Thats the standard, but because of the other systems involved in delivering > msgs then I don't think it possible just to do that without the > co-operation of a third party smsc. You don't need any third party anything. It is exactly like sending a request to a web server (get, post, header, etc...) except the port number will be different and the commands are different. But, the premise is the same. OPen a socket, send request, process response, send request . I know the browser is usually doing a lot of this for you but the point is that if a company has a gateway out there you can send messages to it. > for those who are interested there is a good wap/sms server, open source > and generally funky kannel (kannel.3glabs.org) Not neccessary. You can do it with PHP, Perl, Python, C or anything else you can bind to a port. It is really not that difficult. If you own a wireless company and need to make the actual gateway all the pieces are available to stitch together. PHP or some other language for the internet gateway, RTNPP that will communicate with the actual terminal. Time is required but not a lot of money. > Yes, but if you don't have a lot of traffic you can use a GSM modem as > SMS-C. Anyway, any single message will costs as by contract with the > carrier. > I was not aware that any carrier would attempt to charge someone trying to contact one of their subscribers. Surely I misunderstood you here. I will talk to my employer about releasing the code I have. I am currently rewriting it for another application so I am not sure when it would be in a state to be released. It currently only has been tested with US based companies like skytel, Verizon, AT&T, and the like. -- Lewis Bergman Texas Communications 4309 Maple St. Abilene, TX 79602-8044 915-695-6962 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMS with php
> > could U list the URL > > > http://www.radio.net/rfc1861.txt?number=1861 This URL doesn't exist. Please check it... -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- 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] html anchors and form variables again
Hi all, Several days ago I asked for help with this problem and you gave me information on the output control functions, which was much appreciated and solved some of my problems. However, I can't seem to find away around the following one: I need to pass a variable value from one page to the next via a link. I need to pass it through the querystring for several reasons, the first being that I need to provide underlined links to click on, not submit buttons. The second, though less important, is that I'd like users to be able to bookmark the resulting page and later access it directly with the variable included. In addition to passing the variable I need to pass an anchor name, so that the resulting page loads to the correct place. I can't seem to make this work correctly. Either the variable gets lost or the anchor doesn't work in IE (depending on where I put the quotes in my referrring page). Does anyone know how to make this work, or how to pass a variable to a form without the querystring and without a submit button? Thanks so much in advance, Rebecca _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fwd: Re: [PHP] SMS with php
http://www.ietf.org/rfc/rfc1861.txt?number=1861 There. How is that. You should still try google. You might turn up more to help you. -- Lewis Bergman Texas Communications 4309 Maple St. Abilene, TX 79602-8044 915-695-6962 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMS with php
> http://www.ietf.org/rfc/rfc1861.txt?number=1861 > There. How is that. A lot better :) -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Is it *really* an associative array?
> what are you trying to do? > why do you want to diffirentiate between "99" as a string or > as a number? Because if it is a string, more than likely it means that the key was user defined and is not PHP defined as an element number. Again, consider the differences between these two arrays: array( "This", "That", "Other" ); PHP more or less turns this into an associative arrays because, as far as I know, all arrays are associative. If you loop through this array, you get the following key/value pairs Key Value 0 This 1That 2Other The keys are numbers, integers. They are also the element numbers. Now, the second type of array: array( "1" => "this", "2" => "that", "few" => "other" ); Looping through this array, you get the following key/value pairs: Key Value 1 this 2 that few other Funkiness exists that PHP also sees "1" and "2" as element numbers. So if you loop (pseudo)for( $i = 1 to 5 ) and print out those elements, it will print out only "this" and "that", ignoring "other". But that is neither here nor there for the most part, just something that I need to take into consideration and something that prevents me from just checking to see if the the key is the same as the element number because in some cases, it legitimately can be. Alas. As for what I am trying to do, I am looking for a way to determine if an array is a user defined associative array or not. I.E., I want to come up with an algorithm to differentiate between the two arrays defined above - the normal array and the associative array. Again, any help or insight would be greatly appreciated. Zeev? Rasmus? Chris
[PHP] Re: Get the beginning array number
At 4:12 PM +0200 9/18/01, _lallous wrote: >reset($array); >list(, $value) = each($array); >this will give you first value in $value ...and according to http://www.php.net/manual/en/function.reset.php reset() returns the first element of the array, so you could shorten this to $value = reset($array); But if you need the key value as well, you (I think) WILL have to do it _lallous' way: reset($array); list($key, $value) = each($array); For more info, see http://www.php.net/manual/en/ref.array.php -steve > >"Brandon Orther" <[EMAIL PROTECTED]> wrote in message >!~[EMAIL PROTECTED]">news:!~[EMAIL PROTECTED]... >> Hello, >> >> I have an array sent to my script that starts at different numbers each >> time. Here is an example >> >> >> $array[5] through $array[23] will have values but [0]-[4] will not. >> >> Is there a way for me to find the first element of an array with a value? >> >> Thank you, >> >> >> Brandon Orther >> WebIntellects Design/Development Manager >> [EMAIL PROTECTED] >> 800-994-6364 >> www.webintellects.com >> > > >> -- + Open source questions? + | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- http://pgfsun.ucdavis.edu/open-source-tools.html ---+ -- 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] replace with display function
Hi, I am working on replacing strings in a navigation file. I need to be able to assemble the left navigation from a table. My problem is the function code gets placed above where it should appear in the template. Here is what I have: $temp5 = str_replace("[LEFT NAV]",call_leftnav(),$temp4); echo $temp5; function call_leftnav() { print (" "); $connection = mssql_connect("localhost","webuser",""); $db = mssql_select_db("wmn_test",$connection); $sql = "select bp_section_id,bp_section_name from bp_sections order by bp_section_name"; $sql_result = mssql_query($sql); while ($row = mssql_fetch_array($sql_result)){ $bp_section_id = $row["bp_section_id"]; $bp_section_name = $row["bp_section_name"]; print ("$bp_section_name"); }; print (""); }; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: INCREASING GAS PRICES
Hehhere and just now the gas price rasied to $2 per 20 Litter <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Oil prices have jumped amid concerns that U.S. > retaliation for this week's terrorist attacks > could hurt supplies from the Middle East. > > Brent Crude futures for November delivery jumped > 61 cents, or 2.2 percent, to $28.96 in mid-morning > trade on London's International Petroleum Exchange." > > > It's a Fact! > Experts are saying that by the end of the year > gas prices can be over $2.50 per gallon! > > > Increase Your Gas Mileage up to 27%! > > http://www.e-webhostcentral.com/ch8/gas-001.html > > > > > > > > remove at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: INCREASING GAS PRICES
Hehhere (Lebanon) the gas price rasied to $2 per 20 Litters already! <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Oil prices have jumped amid concerns that U.S. > retaliation for this week's terrorist attacks > could hurt supplies from the Middle East. > > Brent Crude futures for November delivery jumped > 61 cents, or 2.2 percent, to $28.96 in mid-morning > trade on London's International Petroleum Exchange." > > > It's a Fact! > Experts are saying that by the end of the year > gas prices can be over $2.50 per gallon! > > > Increase Your Gas Mileage up to 27%! > > http://www.e-webhostcentral.com/ch8/gas-001.html > > > > > > > > remove at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chewing up apache logs
> I've just changed ISPs, and my old ISP used webalizer to report > usuage/everything else stats about a website. The new ISP offers a > simular product for a cost, but it looks very clumsy and bloated. I had the same problem... I used to host my own and then had to switch to a hosting service with a log analyzer I didn't like. Being a fan of webalizer.. heres what I did. I wrote a perl script to download my raw log file to my local machine, process it with webalizer, and then upload the webalizer files to my server. The file is attached. Note that the code is set up to grab log data from .logs/data so you may have to change that and also it is set up to process 3 websites since I am runnning one main site and 2 virtual hosts. Just trim that stuff out. Hope that helps! -- - Marc Swanson MSwanson Consulting Phone: (603)868-1721 Fax:(603)868-1730 Mobile: (603)512-1267 [EMAIL PROTECTED] http://www.mswanson.com - logger.pl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Print current page with no printer dialog box - How ?
> Do you know how to create a button to print current page without > bringing up the printer dialog box? I just print to the default printer. > > And also how do I insert a page break ? Yes, to both questions. See http://www.meadroid.com/scriptx It is an ActiveX component that allows pretty much FULL control over the printing environment. It is designed for IE but they have a product called "Neptune" that allows you to run ActiveX stuff in netscape.. on windows platforms only :-/ As far as the page breaks go use CSS. BTDT recently on an intranet application where the users are chained to IE anyway HTH -- - Marc Swanson MSwanson Consulting Phone: (603)868-1721 Fax:(603)868-1730 Mobile: (603)512-1267 [EMAIL PROTECTED] http://www.mswanson.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Problem: lost session id when htaccess'ing.
- you have cookie support on or off ? - you using any header redirects ? (you have to manually add the SID to URI's) send some src and a link. lets see whats going on. -- Chris Lee [EMAIL PROTECTED] "Lic. Rodolfo Gonzalez Gonzalez" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I have a problem with sessions: I have php with sessions autostarting, > compiled with transid support. I have a homepage with a link to another > page protected via Apache's htaccess. Well, the href's in the homepage get > the correct SID=, then I click the link, I give login and > password, Apache checks and accepts the data, but then in the next page I > get a new session_id value!! (as if the SID passed in the URL were being > lost!). I guess this is not normal. What can I do?. > > Many thanks in advanced. > Rodolfo. > > P.S. apache-1.3.20, custom mod_mysql_auth, php-4.0.8-dev (latest snapshot, > 4.0.6 had a bug in the imap code, and I haven't returned to 4.0.5 yet). > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What is PHP's equivalent?
correct me if Im wrong, but I wanted to add a note saying that php supports loading .COM and .NET only if the server is windows based. -- Chris Lee [EMAIL PROTECTED] "Sterling Hughes" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Mon, 17 Sep 2001, Eric Lebetsamer wrote: > > > What is PHP's equivalent to ASP/COM or JSP/EJB? Basically, I want to get an > > idea of what methods there are of having multi tier development in PHP. Any > > information or links are appreciated. > > > > Not that PHP needs an equivalent, but... PHP supports loading of > COM, .NET and Java objects into its source code, you can also write > PHP extensions in C (much faster than COM, .NET or EJB). > > -Sterling > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Getting data over https?
php doesnt support https url-wrappers. grab the data with an external app maybe, it'll be ugly. exec('lynx -source https://www.pilotmedia.fi/ > /tmp/somefile.txt'); fopen('/tmp/somefile.txt', 'r'); unlink('/tmp/somefile.txt'); -- Chris Lee [EMAIL PROTECTED] "Ville Mattila" <[EMAIL PROTECTED]> wrote in message 000b01c13fa0$fe139ce0$0100a8c0@ville">news:000b01c13fa0$fe139ce0$0100a8c0@ville... Hi there, Is there a way to get data over https-protocol as can be done with file("http://www.pilotmedia.fi/";) -function with normal http-protocol? Or some other way? - Ville . Ville Mattila Ikaalinen, Finland [EMAIL PROTECTED] www.pilotmedia.fi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can i show my table 5 record by five record ?
I dont understand, so Im going to make up a question and then answer it. "how do I make a table five elements wide dynamically ?" echo " "; foreach( $db->select_array('', 'product', '') as $pos => $val ) { if ( !(@$counter++ % 5) ) echo " "; echo " {$val['product_name']} "; } echo " "; there you go every five products you get a new line. -- Chris Lee [EMAIL PROTECTED] "Alawi Albaity" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > how can i show my record to user to view it five > record by fifve record by click link > > > __ > Terrorist Attacks on U.S. - How can you help? > Donate cash, emergency relief information > http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Handling sessions between servers?
using mysql is an excelent choice, if your not using a db Ive seen people pass the data raw echo " mediawaveonline.com "; then session_decode(base64_decode($session_data)); its ugly, but it works. -- Chris Lee [EMAIL PROTECTED] "Josh Hoover" <[EMAIL PROTECTED]> wrote in message E973048AB322D411AE99009027E32DF685CD83@FRAZ">news:E973048AB322D411AE99009027E32DF685CD83@FRAZ... > You can use NFS shares, but I've read that it is too slow for most > situations. My suggestion would be to use a database and use a custom PHP > session handler. A really good tutorial (including working code) on how to > write custom PHP session handlers utilizing a database can be found at the > following URL: > > http://www.phpbuilder.com/columns/ying2602.php3 > > I've tested this code and it worked fine utilzing MySQL. You can apply the > same concepts to just about any datasource you want. > > Josh Hoover > KnowledgeStorm, Inc. > [EMAIL PROTECTED] > > Searching for a new IT solution for your company? Need to improve your > product marketing? > Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify > the process for you. > KnowledgeStorm - Your IT Search Starts Here > > > From: Michael Champagne [mailto:[EMAIL PROTECTED]] > > > > Is it possible to handle sessions with PHP between separate > > web servers? We > > have 2 Apache servers and would like to share session data > > between them. If > > we keep the session data on an NFS mounted drive -- will this > > work? Would it > > be better to write custom session handlers to store session > > data in a database > > accessible from both servers? It seems like this should be > > possible, but I'm > > not quite sure how to go about doing it. Also, this is on 2 separate > > platforms. One is RedHat Linux 7.1 and the other server is > > on AIX 4.3.3. > > > > Thanks in advance for any replies, > > Mike > -- 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] when logic fails, PHP randomly skips execution of lines
Hello everbody, I have noticed something quite strange, i have a piece of code that looks like, i removed some of it to make it readable: there are no statements in the code that would cause the termination of the method before reaching the last line, no return, die or whatever. This thing is part of a object method, which is called repeatedly. There absolutely NO way 'end' could be printed here without 'swp2' being printed, right, but it does. Also i have occurences of 'swap' without a matching 'end' or 'swp2', like this: (the garbage is the content of '$enc', removing it from the output causes the error to dissappear) -output- Begin swap: 0064277255621244332329528893584643078166114004540827;5>862126663:629;888;;58 664307819;fX$reJxre|"yuw%iVft$rhyuujlnnçm5wi(vkq#ch|ij&fj2 .25C18U8oej|kf!py~3364e\tj||whi(goxk07;2iYximee~%vo~2y82X:nebyif#qwuvwwg swp2: ft$rhyuujlnnçm5wi(vkq#ch|ij&fj2 .25C18U8oej|kf!py~3364e\tj||whi(goxk07;2iYximee~%vo~2y82X:nebyif#qwuvwwg0064 277255621244332329528893584643078166114004540827;5>862126663:629;888;;586643 07819;fX$reJxre|"yuw%iV end Begin swap: 0054716330009693653323102831238781328247354221531537080463:95@4734928:223572 1<2823<8\:nhig#gfM{vo#wsk rk)qkGwvpdudkm#mgg(zmnvppemskhrgC!lxtj3F06H;xokwzj3z33N:|fi|xd7v28TBegin swap: 0034211011257391046799446105509563315163822007167287673;775?=69<<91<;601553< 161375F8eqa"oe"ufd!sæItp{fny&nnwrr&uar%n~fnf1!3/6B92t2tv!keUvlio3g27k;senhQ) omy{0e65e;brfxV%wzdv7g70i2ýrfoY%jrni swp2: !sæItp{fny&nnwrr&uar%n~fnf1!3/6B92t2tv!keUvlio3g27k;senhQ)omy{0e65e;brfxV%wz dv7g70i2ýrfoY%jrni0034211011257391046799446105509563315163822007167287673;77 5?=69<<91<;601553<161375F8eqa"oe"ufd end Begin swap: 00549629613229801512122201313670455389527981851464=:2:4997727A;:21981;306703 59349588`7mlmkvmF!pkk{lgv"g}|hg%sþf"pk fhXexmeèqmf(nzc'ovJmyovzin|ukpk9B02G?qsuxtf1270gEnqwl34=5jK}f17=8vXzpmotn swp2: pkk{lgv"g}|hg%sþf"pk fhXexmeèqmf(nzc'ovJmyovzin|ukpk9B02G?qsuxtf1270gEnqwl34=5jK}f17=8vXzpmotn005 49629613229801512122201313670455389527981851464=:2:4997727A;:21981;306703593 49588`7mlmkvmF! end Begin swap: 002471894193230257221322567045301134119648109371:9=1>6238:5:52136656>3457011 4;bNmtpmjlÿn5sL)rG"hiMxyjeohf"xgz rn#dnBueoftgvqdsnk5omTqfth AnZjesh2#66H7erhruu#stj)z26@.9382qTwsqfkoöm5y22B6238:5:52136656>34570114;bNm tpmjlÿn5sL)rG"hiMxyjeohf"xgz r end Begin swap: 00547198053854516883507941428066511232699173281113A7>::84385:<7:0<>51<640:68 192521?3I9qnyN"ojlm)zcxupjm%ckl(qtRhv$o*"}qzu\15>6dYt|ujdznlpikxtx2581xPetv n8782uLifn{0x38G=rvxmvdxg swp2: pjm%ckl(qtRhv$o*"}qzu\15>6dYt|ujdznlpikxtx2581xPetvn8782uLifn{0x38G=rvxmvdxg 00547198053854516883507941428066511232699173281113A7>::84385:<7:0<>51<640:68 192521?3I9qnyN"ojlm)zcxu end-output- Multiple cases of malfunction in this output, After 2nd Begin: method was not executed properly, even though script continued afterwards. The next Blocks seem to miss either the \n before begin or the \n after end in the fourth block, swap and end are displayed while swp2 is not When i start to reduce the code by either removing $enc from the output or deleting the loops that manipulate the string before, the echos come in the right order and ammount... What can i do, nothing crashed so i dont have a gdb backtrace for an bug report. I cant provide all the code, neither can i reduce the code without the error do disappear The problem occured on PHP 4.04pl1 on Apache 1.3.x on Linux PHP 4.04 on Apache 1.3.x on Linux PHP 4.06 on Apache 1.3.x on W2K thanks Jens
RE: [PHP] when logic fails, PHP randomly skips execution of lines
How about: $enc="abcdefe"; echo "swap: ".$enc."\n"; // swap 1st and 2nd half of string $len= (int)strlen($enc)/2; $enc=substr($enc,$len).substr($enc,0,$len); echo "swp2: ".$enc."\n"; echo "end\n"; Your /2 system wont' work when strlen is an odd number. Sean -Original Message- From: Jens Kisters [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 19 September 2001 2:43 AM To: [EMAIL PROTECTED] Subject: [PHP] when logic fails, PHP randomly skips execution of lines Hello everbody, I have noticed something quite strange, i have a piece of code that looks like, i removed some of it to make it readable: there are no statements in the code that would cause the termination of the method before reaching the last line, no return, die or whatever. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Undefined Variable in formular... what happens???
Most likely it has to do with your error_reporting setting. See : http://uk.php.net/manual/en/phpdevel-errors.php#internal.e-notice http://uk.php.net/manual/en/features.error-handling.php Level E_NOTICE produces Warnings such as "Undefined Variable", so, doing the following : echo $iamnotset; Produces such a Error/Warning. Any "direct" use of $iamnotset will, which is why functions such as isset() and empty() exist : if (isset($var)) echo $var; I am guessing either you have : if ($submit) { // process form and no Warnings as $submit is set } else { // show form and WILL show the Warnings as $submit is not set } Consider : if (isset($submit)) { It's not uncommon to have E_NOTICE off but good little PHP developers develop with error_reporting turned up full blast, E_ALL in da house! Second, perhaps you expect register_globals to be on, see the following : http://uk.php.net/manual/en/configuration.php#ini.register-globals http://uk.php.net/manual/en/security.registerglobals.php If off, foo.php?fruit=apple will not create $fruit but rather, you'd go through a predefined variable like : $HTTP_GET_VARS['fruit']. http://uk.php.net/manual/en/language.variables.predefined.php Regards, Philip Olson On Tue, 18 Sep 2001, Ingo wrote: > hello > i am using win2000 xitami, php and access. so my problem is that the script > couldn't find the variable.. . > so i cant save the user changed buttons and editfields... > > is that a known problem with xitami and php? when i try > to run the script on a real webserver with .php installed, it works fine. > > thanx ingo > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] MySQL tutorials?
Simple Connection to MySQL with PHP : http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=11 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 2:09 AM To: [EMAIL PROTECTED] Subject: [PHP] mySQL tutorials? Are there any tutorials that teach you from scratch for mySQL connections with php and using php-myADMIN? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] SPEED: Apache module vs. compiled?
Does anyone have any benchmarks or proof of a speed difference between compiling PHP as an Apache APXS module, versus compiling it right into Apache? I'm going to be using it on a virtual webhost with 400 domains on one server, and good amount of traffic. PHP used for *everything*. Module would be easier to upgrade, (and is the default OpenBSD install), but I've heard it affects performance slightly. Any proof? Or is this a myth? Thanks! -- Camille Davis OpenBSD + PHP fan [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] manipulating graphics
Hello everyone- I've been looking at the php manual to see what functions are available to resize images. I was wondering if there was a function that Constrained the Proportions of the image or am I going to have to write that function? Thanks, jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What is PHP's equivalent?
As much as I love PHP, if you are going to use com, I suggest you stick to ASP/COM :). No other language than the one MS it self wrote will have the compatibility to COM and the OS like ASP. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 12:26 AM To: Eric Lebetsamer Cc: [EMAIL PROTECTED] Subject: Re: [PHP] What is PHP's equivalent? Hi Eric, You can use COM in PHP if your scripts run on Windows 32. You can also use Java clases directly from yor php scripts. - Frank > What is PHP's equivalent to ASP/COM or JSP/EJB? Basically, I want to get an > idea of what methods there are of having multi tier development in PHP. Any > information or links are appreciated. > > > > Thanks, > > Eric Lebetsamer > > > > > > -- > 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] 4.0.7 = when?
Any clue when PHP 4.0.7 is coming out? I need the "open_basedir" option that 4.0.7 has added. I've downloaded snapshots from snaps.php.net but those are 4.0.8-dev and acting weird. (IE gives many "page not found" errors. Refreshing the screen sometimes finds the page again.) Is there a place to download a 4.0.7-rc source, even if it's not officially released? Thanks! -- Camille Davis OpenBSD + PHP fan [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] PHP 4.07 and Solaris Sun Package
Yes, I would like to see RC1 of PHP4.0.7 available and not in CVS fashion. And one more thing, is it possible to make PHP into a sun package ?http://www.sunfreeware.com/pkgadd.html -Original Message- From: Camille Davis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 10:15 AM To: [EMAIL PROTECTED] Subject: [PHP] 4.0.7 = when? Any clue when PHP 4.0.7 is coming out? I need the "open_basedir" option that 4.0.7 has added. I've downloaded snapshots from snaps.php.net but those are 4.0.8-dev and acting weird. (IE gives many "page not found" errors. Refreshing the screen sometimes finds the page again.) Is there a place to download a 4.0.7-rc source, even if it's not officially released? Thanks! -- Camille Davis OpenBSD + PHP fan [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] New to PHP, just looking for resources is all =)
mod_auth_mysql - mod_auth_mysql was written in order to allow users to use the blazing quick speed of MySQL in order to store authentication information for their apache web servers. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=558 or : http://www.weberdev.com/index.php3?GoTo=search.php3%3Fsearch%3Dauth%26se archtype%3Dtitle Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: B. van Ouwerkerk [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 4:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] New to PHP, just looking for resources is all =) >I am not asking for any one-on-one help here(I realize most of you have >lives and dont have the time for that, although I would most certainly >appreciate it, Forget it, to much fun to figure it our yourself. :-) > Any links or references you could provide would be >MOST helpful. Also any good books on PHP and building database driven >websites using PHP and mySQL. http://www.php.net/links.php MySQL written by Paul DuBois PHP4 bible written by Tim Converse and Joyce Park Professional PHP programming, Wrox Don't forget to check this lists archive. Do a search for books and you'll find much much more. Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 4.0.7 = when?
open_basedir has been around for years. It is not a new 4.0.7 feature. And you can get the latest RC from http://www.php.net/~zeev/php-4.0.7RC2.tar.gz -Rasmus On Tue, 18 Sep 2001, Camille Davis wrote: > Any clue when PHP 4.0.7 is coming out? > > I need the "open_basedir" option that 4.0.7 has added. > > I've downloaded snapshots from snaps.php.net but those are 4.0.8-dev and > acting weird. (IE gives many "page not found" errors. Refreshing the > screen sometimes finds the page again.) > > Is there a place to download a 4.0.7-rc source, even if it's not officially > released? > > Thanks! > > -- > Camille Davis > OpenBSD + PHP fan > [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.07 and Solaris Sun Package
> Yes, I would like to see RC1 of PHP4.0.7 available and not in CVS fashion. > And one more thing, is it possible to make PHP into a sun package > ?http://www.sunfreeware.com/pkgadd.html Go for it. We don't distribute binaries with the only exception being the Windows build. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: include question
I'm afraid you have not understood me completely: My only concern on this topic is: Will the user be forced to wait for the whole included php file to load, or the server will just take the desired function from that file? My goal here is to call different fragments of html code depending on user selection by using functions that have the echo command. I am only afraid of all functions from included file beeing loaded, and not only the called one. Is this the right way to approach this problem, or you would suggest smth else? Thanks Nikola 9/18/01 6:25:49 PM, "Chris Lee" <[EMAIL PROTECTED]> wrote: >include() has two different workings depnding on how it is called. > >include('include/test.php'); >php will open the file and litterally take everything in that and paste into >where the include() is, just like when you open the file in an editor, the >file is un-parsed raw src. functions, comments, whitespaces, html, etc, etc, >etc. > >include('http://www.e-tankless.com/products.php'); >php will make a http request to that file, just like if you typed it into >your browser, ie the remote server will parse the file and only send you the >parsed data, not the source code, obviously though, how could you get >someone elses code right? > > Chris Lee > [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: include question
include loads the entire file. I do something similar with my functions (Keep them in a seperate file, and include them when needed) I will usually have multiple function files, grouped by function... for example, I have one file for error reporting functions, one file for authentication functions, one file for database manipulation functions, etc etc then, I just include whatever file holds the needed function where it is needed. My reason for doing this is to keep everything modular. (I have multiple domains, and like to reuse my code.. it's easier to have files for specific function sets, than to maintain a single large file) BUT, keep in mind: The server loads the entire file into memory, which is done extremely fast, and the processes it based on your control structures, etc... The user will only download the output that is sent, not the entire contents of your include file. The user shouldn't notice any slowdown caused by your include. - Original Message - From: "Nikola Veber" <[EMAIL PROTECTED]> To: "Chris Lee" <[EMAIL PROTECTED]>; "php forum" <[EMAIL PROTECTED]> Sent: Monday, September 17, 2001 10:34 PM Subject: [PHP] Re: include question > I'm afraid you have not understood me completely: > My only concern on this topic is: Will the user be forced to wait for the whole included php file to load, or the server > will just take the desired function from that file? My goal here is to call different fragments of html code depending > on user selection by using functions that have the echo command. I am only afraid of all functions from included file > beeing loaded, and not only the called one. Is this the right way to approach this problem, or you would suggest smth > else? > > Thanks > Nikola > 9/18/01 6:25:49 PM, "Chris Lee" <[EMAIL PROTECTED]> wrote: > > >include() has two different workings depnding on how it is called. > > > >include('include/test.php'); > >php will open the file and litterally take everything in that and paste into > >where the include() is, just like when you open the file in an editor, the > >file is un-parsed raw src. functions, comments, whitespaces, html, etc, etc, > >etc. > > > >include('http://www.e-tankless.com/products.php'); > >php will make a http request to that file, just like if you typed it into > >your browser, ie the remote server will parse the file and only send you the > >parsed data, not the source code, obviously though, how could you get > >someone elses code right? > > > > Chris Lee > > [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] exclamation points appearing from nowhere in the mail() function...
hey, could anyone help me with the mail function? in my script, its sintax is right... when i use the mail() function it works normaly... but when somebody receives the email sent by the mail(), some exclamation points appear from nowhere and the strangest thing is that the excamation points appear in diferent places everytime... could anyone tell me if there is some kind of bug in this mail() function??? thanx -- 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] PHP + NT + Weird line break??
On NT, I have recently run into this problem. However, this is only as of today. When using include(); at the top of a page: HTML... There is a line break before my page most of the time, but not always. Removing the include file and copy-pasting it's contents into the top of the HTML file gets rid of the space. However, I really need to be able to use includes without it breaking things. Has anyone run into such a problem? I tried deleting my included file and recreating it, just in case it was corrupt, or something odd like that. That didn't help at all. Has anyone ever seen such a strange thing happen? PHP 4.0.6 is installed on this server with IIS 4.0. Any ideas would be much appreciated. Thanks, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SPEED: Apache module vs. compiled?
On Tue, 18 Sep 2001 10:12:05 -0700 Camille Davis <[EMAIL PROTECTED]> wrote: > Does anyone have any benchmarks or proof of a speed difference between > compiling PHP as an Apache APXS module, versus compiling it right into Apache? > > I'm going to be using it on a virtual webhost with 400 domains on one > server, and good amount of traffic. PHP used for *everything*. > > Module would be easier to upgrade, (and is the default OpenBSD install), > but I've heard it affects performance slightly. > > Any proof? Or is this a myth? I think its myth. Anyway, if speed is your concern, Apache may not be the best option. I believe Zeus is much faster, and I know thttpd is faster (though not as configurable) I think probably the best thing to do if you are looking for free server software is to use Apache 2.x beta- I haven't yet, but I believe php builds against it just fine, and Apache 2.x has a lot of speed advantages over 1.3.x (or so I've been led to believe) *snip* -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters http://24.5.29.77:10080/ -- 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] Warning: stat failed - Why does it appear?
Hi folks. I have a project with over 270 is_dir, is_file and file-exists function calls. On unix there are no problems. On windows (WINNT/PHP Version 4.0.7-dev) these functions may return a warning like: Warning: stat failed for log.txt (errno=2 - No such file or directory) in D:\wwwroot\testsite-32b2\tslib\class.tslib_fe.php on line 711 This warning is typically returned if I check whether a file exists but it turns out that not only the file does not exist, the path does not exist! Now, there are two solutions I can't use: 1) I will not set error_reporting to exclude warnings, because PHP should to the best of my knowledge not at all bother about these things 2) I will not place a @ in front of every function which would potentially return this error. And furthermore I'm puzzled why this error apparently is only on Windows, not on Unix and certainly has not always been there since I remember earlier when this project did not impose any problems. So what's up here? Why is this warning justified? And how do I avoid it? Thanks a lot (Kasper Skårhøj, Typo3 developer) Best regards and God's blessings - kasper o - Were you taught the Earth was flat? Not so! See --->>> www.answersInGenesis.org Check www.typo3.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help with escaping the # sign
I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store "Hello, I need # help" in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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] Describing mysql table
Im trying to get results from a mysql command (describe tablename;) into php. I know about the php functions, but I would like the mysql nameing instead. Im trying like so $query = "DESCRIBE users"; $result = mysql_query($query); $array = mysql_fetch_array($result); foreach ($array as $data) { echo "$data[0], $data[1], $data[2]"; } Im not getting the expected results like the mysql command line. What am I doing wrong... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Array question
Ok, I think I have my template and includes problem worked out, but making an array out of the data returned. My question is how do I make an array out of a returned result. Here is the code: $sql = "select bp_section_id,bp_section_name from bp_sections order by bp_section_name"; $sql_result = mssql_query($sql); while ($row = mssql_fetch_array($sql_result)){ $bp_section_id = $row["bp_section_id"]; $bp_section_name = $row["bp_section_name"]; $ln = "$bp_section_name"; }; I need to create an array of the data returned and store it in a variable that I can call. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Array question
Try this. $sql = "select bp_section_id,bp_section_name from bp_sections order by bp_section_name"; $sql_result = mssql_query($sql); while ($row = mssql_fetch_array($sql_result)){ $bp_section_id = $row["bp_section_id"]; $bp_section_name = $row["bp_section_name"]; $ln = "$bp_section_name"; $new_data[] = $variable_or_array[element]; }; -- 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] Need help. please
I'm sorry for those who my have responded to my last email. I thought I had plenty of room in my email client, but I forgot to delete my trash, so I did not get any responses. So, I'm going to restate my initial problem. Any help will be greatly appreciated. Thanks again I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store "Hello, I need # help" in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need help. please
John Holcomb wrote: > I'm sorry for those who my have responded to my last > email. I thought I had plenty of room in my email > client, but I forgot to delete my trash, so I did not > get any responses. So, I'm going to restate my initial > problem. Any help will be greatly appreciated. > > Thanks again > > I have a text input field in my form. I need the user > to be able to enter something like: Hello, I need # > help. After which they click on a submit button. The > succeeding page then takes this text and tries to > display it and tries to store "Hello, I need # help" > in a varchar field in a mysql table column. The > mysql database is truncating the # sign and the text > succeeding the # sign. Also, absolutly no text is check to see if the field where the info is going into is long enough. ie varchar(50). anything more than 50 get cut off. > being diplayed on the succeeding web page. I've tried what did you name the textfield? You should be able to echo "$string"; if you named the textfield string > using addslashes() and I was warned against using > htmlentities(). Also, I'm not sure if I'm dealing > with 2 issues: A mysql issue and a html issue. Or, am > I dealing with one issue: A mysql issue or an HTML > issue. > > Thank you, > > John > > > > __ > Terrorist Attacks on U.S. - How can you help? > Donate cash, emergency relief information > http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > -- 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] How do I tell the mail function that the message content is HTML?
Greetings to You: How do I tell the mail function that the message content is HTML? Regards, Salty
Re: [PHP] Describing mysql table
Hey I figured out my problem. Instead of using a foreach loop, I used a while loop and everything is cool man :). UPDATED CODE: $query = "DESCRIBE mpn_users"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)){ echo "$data[0], $data[1], $data[2]"; } Gerard Samuel wrote: > Im trying to get results from a mysql command (describe tablename;) > into php. I know about the php functions, but I would like the mysql > nameing instead. Im trying like so > > > $query = "DESCRIBE users"; > $result = mysql_query($query); > $array = mysql_fetch_array($result); > foreach ($array as $data) { > echo "$data[0], $data[1], $data[2]"; > } > > > Im not getting the expected results like the mysql command line. > What am I doing wrong... > Thanks > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] For the RegExps gurus!
On Mon, 17 Sep 2001 13:15:08 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: >Ehhh... hai! > Halo! Good to see you back:) >I've been away on vacation, so it's a bit late, but anyway... > Indeed late.. Had a good one? > >> You didn't. Actually please expose - tell i tell i:). I am all ears:) > >I meant I improved my own versions, not you're version. That's why >you can't find the improvement on you're code. If that's what you >meant... > Hmm, Why R U not employing smilers, why you after 'humor':) Of course, I meant, that the WAY your code is made is not better, not that you _litteraly_ improved my code (The later case would be a breakage of ownership, so you wouldn't admit it, unless you R a Skliarov' type:) > >> ? RE ? Sorry, I am not a club insider:) > >Not realy any kind of club... just lazy typing; RE stands for >Regular Expression. > Guess wat? I use RegExp abbr. Thats why. Silly me. Now I know that this is not a developer's kit:) TnX a lot. And, BTW, I agree with your thoughts about clarity and simplicity (causing performance 'optimality') of expressions. Not though - that it should be done at the expense of functionality. In the discussed case, your approach is just an approach to solution, sorry, whereus mine include practicaly allowed by standard symbols. May be I am missing something too, but at least do not include, what is not allowed, i hope. Correct me if I am wrong. >-- > >* R&zE: > > >-- >-- Renze Munnik >-- DataLink BV -- Best Regards. i Leonid PS: Have you seen a bike/pilot helmeted guy, speaking of unix advantages, lately? - in your 'dream'. I did - in mine (submitted to me actually:) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Getting data over https?
Thanks Chris, but I'm using Win32 at the moment... The solution should anyway be compatible with Win32 as well as Linux/Unix. But anyway mainly with Win32. - Ville "Chris Lee" <[EMAIL PROTECTED]> kirjoitti viestissä [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > php doesnt support https url-wrappers. grab the data with an external app > maybe, it'll be ugly. > > exec('lynx -source https://www.pilotmedia.fi/ > /tmp/somefile.txt'); > fopen('/tmp/somefile.txt', 'r'); > unlink('/tmp/somefile.txt'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Warning: stat failed - Why does it appear?
I am using 4.0.7-dev and I too now get this error on unix (FreeBSD 4.3-STABLE). So it's happening all over. I think it's a good thing cause it helps remind you that you're trying to stat something that doesn't exist... and if you're doing that on a file that might or might not exist then your code should take the proper steps to silence any warnings (ie. the @). That way it's clear that you are ignoring it. just my 2 cents. -philip On Tue, 18 Sep 2001, [ISO-8859-1] "Kasper Skårhøj" wrote: > Hi folks. > > I have a project with over 270 is_dir, is_file and file-exists function calls. > > On unix there are no problems. > On windows (WINNT/PHP Version 4.0.7-dev) these functions may return a warning like: > > Warning: stat failed for log.txt (errno=2 - No such file or directory) in >D:\wwwroot\testsite-32b2\tslib\class.tslib_fe.php on line 711 > > This warning is typically returned if I check whether a file exists but it turns out >that not only the file does not exist, the path does not exist! > > Now, there are two solutions I can't use: > > 1) I will not set error_reporting to exclude warnings, because PHP should to the >best of my knowledge not at all bother about these things > 2) I will not place a @ in front of every function which would potentially return >this error. > > And furthermore I'm puzzled why this error apparently is only on Windows, not on >Unix and certainly has not always been there since I remember earlier when this >project did not impose any problems. > > So what's up here? Why is this warning justified? And how do I avoid it? > > Thanks a lot > > (Kasper Skårhøj, Typo3 developer) > > > Best regards and God's blessings > > - kasper > o - > Were you taught the Earth was flat? Not so! See --->>> www.answersInGenesis.org > Check www.typo3.com > > > -- > 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] help please with # sign
I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store "Hello, I need # help" in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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] ...::: Vacation on us! :::...
You have been specially selected to qualify for the following: Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below: http://wintour.my163.com Confirmation Number#Lh340 Please confirm your entry within 24 hours of receipt of this confirmation. Wishing you a fun filled vacation! If you should have any additional questions or cann't connect to the site do not hesitate to contact me direct: mailto:[EMAIL PROTECTED]?subject=Help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ...::: Vacation on us! :::...
All of us? WoW! Well, if we win, how do we decide who gets to go? - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 18, 2001 8:06 AM Subject: [PHP] ...::: Vacation on us! :::... > You have been specially selected to qualify for the following: > > Premium Vacation Package and Pentium PC Giveaway > To review the details of the please click on the link > with the confirmation number below: > > http://wintour.my163.com > > Confirmation Number#Lh340 > Please confirm your entry within 24 hours of receipt of this confirmation. > > Wishing you a fun filled vacation! > If you should have any additional questions or cann't connect to the site > do not hesitate to contact me direct: > mailto:[EMAIL PROTECTED]?subject=Help! > > > -- > 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] The Salty Marine's eMail eMuster Subscription
Thank you for subscribing to the Salty Marine's eMail eMuster newsletter, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] The Salty Marine's eMail eMuster Subscription
On 18 Sep 2001 [EMAIL PROTECTED] wrote: > > Thank you for subscribing to the Salty Marine's eMail eMuster newsletter, Ooh.. some other mad list that doesn't have validation of subscribed accounts. Or someone being bored. -- Sapere aude My mind not only wanders, it sometimes leaves completely. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] The Salty Marine's eMail eMuster Subscription
Greetings to Duncan and all those on the list: Lol, I've removed the [EMAIL PROTECTED] address from the distribution list. Sorry for the error, I must remember to lay off the mountain dew and twinkies and get some sleep after thirty hours, lol. Regards, Salty -Original Message- From: Duncan Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 7:30 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] The Salty Marine's eMail eMuster Subscription On 18 Sep 2001 [EMAIL PROTECTED] wrote: > > Thank you for subscribing to the Salty Marine's eMail eMuster newsletter, Ooh.. some other mad list that doesn't have validation of subscribed accounts. Or someone being bored. -- Sapere aude My mind not only wanders, it sometimes leaves completely. -- 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] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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] PHP Site
is it just me, or is php.net down right now?
[PHP] Is there no one who can help me out there.
I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store "Hello, I need # help" in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. I know think my problem is that when I pass text to another page with the # sign, it's interpreting it as a comment. Is their any way to somehow escape the # sign. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Site
The net is slow right now as there is another Microsoft IIS worm/virus floating around. This one is worse than Code Red in the amount of traffic it generates, something to effect of 10 requests a second, compared to one with Code Red. While php.net is not running IIS, it is subject to these probes and it is bringing traffic to a crawl. I have two servers here, one runs IIS for my ASP clients and the other runs Mandrake for the real work. The IIS box is (while not affected) getting hammered, but the Mandrake box just ignores it, still it is traffic we don't need. At 04:28 PM 9/18/2001 -0700, Jason Bell wrote: >is it just me, or is php.net down right now? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
John, someone did reply to you alread. here let me snip from that email oOoOoOoOoOoO Gerard Samuel Said: oOoOoOoOoOoO check to see if the field where the info is going into is long enough. ie varchar(50). anything more than 50 get cut off. > being diplayed on the succeeding web page. I've tried what did you name the textfield? You should be able to echo "$string"; if you named the textfield string oOoOoOoOoOoO End of Gerard's Words oOoOoOoOoOoO - Original Message - From: "John Holcomb" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 18, 2001 4:29 PM Subject: [PHP] Is there no one who can help me out there. > I have a text input field in my form. I need the user > to be able to enter something like: Hello, I need # > help. After which they click on a submit button. The > succeeding page then takes this text and tries to > display it and tries to store "Hello, I need # help" > in a varchar field in a mysql table column. The > mysql database is truncating the # sign and the text > succeeding the # sign. Also, absolutly no text is > being diplayed on the succeeding web page. I've tried > using addslashes() and I was warned against using > htmlentities(). Also, I'm not sure if I'm dealing > with 2 issues: A mysql issue and a html issue. Or, am > I dealing with one issue: A mysql issue or an HTML > issue. > > I know think my problem is that when I pass text to > another page with the # sign, it's interpreting it as > a comment. Is their any way to somehow escape the # > sign. > > > > > Thank you, > > John > > __ > Terrorist Attacks on U.S. - How can you help? > Donate cash, emergency relief information > http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Site
Thanks. I suppose really need to download the docs to my machine. :) - Original Message - From: "Scott" <[EMAIL PROTECTED]> To: "Jason Bell" <[EMAIL PROTECTED]>; "PHP Users" <[EMAIL PROTECTED]> Sent: Tuesday, September 18, 2001 4:34 PM Subject: Re: [PHP] PHP Site > The net is slow right now as there is another Microsoft IIS worm/virus floating > around. This one is worse than Code Red in the amount of traffic it > generates, something to effect of 10 requests a second, compared to one > with Code Red. While php.net is not running IIS, it is subject to these > probes and it is bringing traffic to a crawl. I have two servers here, one > runs IIS for my ASP clients and the other runs Mandrake for the real work. > The IIS box is (while not affected) getting hammered, but the > Mandrake box just ignores it, still it is traffic we don't need. > > At 04:28 PM 9/18/2001 -0700, Jason Bell wrote: > >is it just me, or is php.net down right now? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
John, I had a similar problem when passing # from one page to another as an html anchor. What worked for me was separating the # in quotes as follows: echo "?id=" . $row[0] . "#" . strtolower($row[1]) . '">'; When I did this I had no problem passing the entire string without the end being interpreted as a comment. Rebecca >From: John Holcomb <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: [PHP] Is there no one who can help me out there. >Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) > >I have a text input field in my form. I need the user >to be able to enter something like: Hello, I need # >help. After which they click on a submit button. The >succeeding page then takes this text and tries to >display it and tries to store "Hello, I need # help" >in a varchar field in a mysql table column. The >mysql database is truncating the # sign and the text >succeeding the # sign. Also, absolutly no text is >being diplayed on the succeeding web page. I've tried > using addslashes() and I was warned against using >htmlentities(). Also, I'm not sure if I'm dealing >with 2 issues: A mysql issue and a html issue. Or, am >I dealing with one issue: A mysql issue or an HTML >issue. > >I know think my problem is that when I pass text to >another page with the # sign, it's interpreting it as >a comment. Is their any way to somehow escape the # >sign. > > > > > Thank you, > >John > >__ >Terrorist Attacks on U.S. - How can you help? >Donate cash, emergency relief information >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Site
http://www.zend.com/manual/ At 04:37 PM 9/18/2001 -0700, Jason Bell wrote: >Thanks. I suppose really need to download the docs to my machine. :) > > >- Original Message - >From: "Scott" <[EMAIL PROTECTED]> >To: "Jason Bell" <[EMAIL PROTECTED]>; "PHP Users" ><[EMAIL PROTECTED]> >Sent: Tuesday, September 18, 2001 4:34 PM >Subject: Re: [PHP] PHP Site > > > > The net is slow right now as there is another Microsoft IIS worm/virus >floating > > around. This one is worse than Code Red in the amount of traffic it > > generates, something to effect of 10 requests a second, compared to one > > with Code Red. While php.net is not running IIS, it is subject to these > > probes and it is bringing traffic to a crawl. I have two servers here, >one > > runs IIS for my ASP clients and the other runs Mandrake for the real work. > > The IIS box is (while not affected) getting hammered, but the > > Mandrake box just ignores it, still it is traffic we don't need. > > > > At 04:28 PM 9/18/2001 -0700, Jason Bell wrote: > > >is it just me, or is php.net down right now? > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
Thank you. This has been the biggest help so far. But, if it's a user entered string is their anyway to do this without having to parse the string and looking for the # sign and then reconstructing the string. That would be very difficult to do. I would appreciate any comments you might have. Thanks again John --- Rebecca Donley <[EMAIL PROTECTED]> wrote: > > John, > I had a similar problem when passing # from one page > to another as an html > anchor. What worked for me was separating the # in > quotes as follows: > > echo "?id=" . $row[0] . "#" . strtolower($row[1]) . > '">'; > > > When I did this I had no problem passing the entire > string without the end > being interpreted as a comment. > Rebecca > > > >From: John Holcomb <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: [PHP] Is there no one who can help me out > there. > >Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) > > > >I have a text input field in my form. I need the > user > >to be able to enter something like: Hello, I need > # > >help. After which they click on a submit button. > The > >succeeding page then takes this text and tries to > >display it and tries to store "Hello, I need # > help" > >in a varchar field in a mysql table column. The > >mysql database is truncating the # sign and the > text > >succeeding the # sign. Also, absolutly no text is > >being diplayed on the succeeding web page. I've > tried > > using addslashes() and I was warned against using > >htmlentities(). Also, I'm not sure if I'm dealing > >with 2 issues: A mysql issue and a html issue. Or, > am > >I dealing with one issue: A mysql issue or an HTML > >issue. > > > >I know think my problem is that when I pass text to > >another page with the # sign, it's interpreting it > as > >a comment. Is their any way to somehow escape the > # > >sign. > > > > > > > > > > Thank you, > > > >John > > > >__ > >Terrorist Attacks on U.S. - How can you help? > >Donate cash, emergency relief information > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > >To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > > _ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
What about writing a function to change all the # characters to something else (maybe something you would never see in the input) and then another to change them back again before entry into your db? I'm pretty new to PHP so I'm not sure what string functions are available but in ASP you could just use a "replace" function. Rebecca >From: John Holcomb <[EMAIL PROTECTED]> >To: Rebecca Donley <[EMAIL PROTECTED]> >Subject: Re: [PHP] Is there no one who can help me out there. >Date: Tue, 18 Sep 2001 16:48:29 -0700 (PDT) > >Thank you. This has been the biggest help so far. > >But, if it's a user entered string is their anyway to >do this without having to parse the string and looking >for the # sign and then reconstructing the string. >That would be very difficult to do. > >I would appreciate any comments you might have. > >Thanks again > >John > > >--- Rebecca Donley <[EMAIL PROTECTED]> wrote: > > > > John, > > I had a similar problem when passing # from one page > > to another as an html > > anchor. What worked for me was separating the # in > > quotes as follows: > > > > echo "?id=" . $row[0] . "#" . strtolower($row[1]) . > > '">'; > > > > > > When I did this I had no problem passing the entire > > string without the end > > being interpreted as a comment. > > Rebecca > > > > > > >From: John Holcomb <[EMAIL PROTECTED]> > > >To: [EMAIL PROTECTED] > > >Subject: [PHP] Is there no one who can help me out > > there. > > >Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) > > > > > >I have a text input field in my form. I need the > > user > > >to be able to enter something like: Hello, I need > > # > > >help. After which they click on a submit button. > > The > > >succeeding page then takes this text and tries to > > >display it and tries to store "Hello, I need # > > help" > > >in a varchar field in a mysql table column. The > > >mysql database is truncating the # sign and the > > text > > >succeeding the # sign. Also, absolutly no text is > > >being diplayed on the succeeding web page. I've > > tried > > > using addslashes() and I was warned against using > > >htmlentities(). Also, I'm not sure if I'm dealing > > >with 2 issues: A mysql issue and a html issue. Or, > > am > > >I dealing with one issue: A mysql issue or an HTML > > >issue. > > > > > >I know think my problem is that when I pass text to > > >another page with the # sign, it's interpreting it > > as > > >a comment. Is their any way to somehow escape the > > # > > >sign. > > > > > > > > > > > > > > > Thank you, > > > > > >John > > > > > >__ > > >Terrorist Attacks on U.S. - How can you help? > > >Donate cash, emergency relief information > > > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > > > >-- > > >PHP General Mailing List (http://www.php.net/) > > >To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > >For additional commands, e-mail: > > [EMAIL PROTECTED] > > >To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > >_ > > Get your FREE download of MSN Explorer at > > http://explorer.msn.com/intl.asp > > > > >__ >Terrorist Attacks on U.S. - How can you help? >Donate cash, emergency relief information >http://dailynews.yahoo.com/fc/US/Emergency_Information/ _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Thank you Rebecca
Excellent idea Rebecca. I guess I'll have to resort to this because no one else out there seems to have ever had this problem. You've been a big help. Thank you for your ideas. John --- Rebecca Donley <[EMAIL PROTECTED]> wrote: > What about writing a function to change all the # > characters to something > else (maybe something you would never see in the > input) and then another to > change them back again before entry into your db? > I'm pretty new to PHP so > I'm not sure what string functions are available but > in ASP you could just > use a "replace" function. > Rebecca > > > >From: John Holcomb <[EMAIL PROTECTED]> > >To: Rebecca Donley <[EMAIL PROTECTED]> > >Subject: Re: [PHP] Is there no one who can help me > out there. > >Date: Tue, 18 Sep 2001 16:48:29 -0700 (PDT) > > > >Thank you. This has been the biggest help so far. > > > >But, if it's a user entered string is their anyway > to > >do this without having to parse the string and > looking > >for the # sign and then reconstructing the string. > >That would be very difficult to do. > > > >I would appreciate any comments you might have. > > > >Thanks again > > > >John > > > > > >--- Rebecca Donley <[EMAIL PROTECTED]> wrote: > > > > > > John, > > > I had a similar problem when passing # from one > page > > > to another as an html > > > anchor. What worked for me was separating the # > in > > > quotes as follows: > > > > > > echo "?id=" . $row[0] . "#" . > strtolower($row[1]) . > > > '">'; > > > > > > > > > When I did this I had no problem passing the > entire > > > string without the end > > > being interpreted as a comment. > > > Rebecca > > > > > > > > > >From: John Holcomb <[EMAIL PROTECTED]> > > > >To: [EMAIL PROTECTED] > > > >Subject: [PHP] Is there no one who can help me > out > > > there. > > > >Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) > > > > > > > >I have a text input field in my form. I need > the > > > user > > > >to be able to enter something like: Hello, I > need > > > # > > > >help. After which they click on a submit > button. > > > The > > > >succeeding page then takes this text and tries > to > > > >display it and tries to store "Hello, I need # > > > help" > > > >in a varchar field in a mysql table column. > The > > > >mysql database is truncating the # sign and the > > > text > > > >succeeding the # sign. Also, absolutly no text > is > > > >being diplayed on the succeeding web page. > I've > > > tried > > > > using addslashes() and I was warned against > using > > > >htmlentities(). Also, I'm not sure if I'm > dealing > > > >with 2 issues: A mysql issue and a html issue. > Or, > > > am > > > >I dealing with one issue: A mysql issue or an > HTML > > > >issue. > > > > > > > >I know think my problem is that when I pass > text to > > > >another page with the # sign, it's interpreting > it > > > as > > > >a comment. Is their any way to somehow escape > the > > > # > > > >sign. > > > > > > > > > > > > > > > > > > > > Thank you, > > > > > > > >John > > > > > > > > >__ > > > >Terrorist Attacks on U.S. - How can you help? > > > >Donate cash, emergency relief information > > > > > > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > > > > > >-- > > > >PHP General Mailing List (http://www.php.net/) > > > >To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > >For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > >To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > >_ > > > Get your FREE download of MSN Explorer at > > > http://explorer.msn.com/intl.asp > > > > > > > > >__ > >Terrorist Attacks on U.S. - How can you help? > >Donate cash, emergency relief information > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > _ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Thank you Rebecca
Glad to be of help John. Wish I could think of something a little more elegant. The # seemed like an odd choice to me for a comment line because it's a well used character in both html and common text. I'm surprised it hasn't given a lot of people trouble. Rebecca >From: John Holcomb <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: [PHP] Thank you Rebecca >Date: Tue, 18 Sep 2001 17:00:06 -0700 (PDT) > >Excellent idea Rebecca. I guess I'll have to resort >to this because no one else out there seems to have >ever had this problem. You've been a big help. Thank >you for your ideas. > >John > > >--- Rebecca Donley <[EMAIL PROTECTED]> wrote: > > What about writing a function to change all the # > > characters to something > > else (maybe something you would never see in the > > input) and then another to > > change them back again before entry into your db? > > I'm pretty new to PHP so > > I'm not sure what string functions are available but > > in ASP you could just > > use a "replace" function. > > Rebecca > > > > > > >From: John Holcomb <[EMAIL PROTECTED]> > > >To: Rebecca Donley <[EMAIL PROTECTED]> > > >Subject: Re: [PHP] Is there no one who can help me > > out there. > > >Date: Tue, 18 Sep 2001 16:48:29 -0700 (PDT) > > > > > >Thank you. This has been the biggest help so far. > > > > > >But, if it's a user entered string is their anyway > > to > > >do this without having to parse the string and > > looking > > >for the # sign and then reconstructing the string. > > >That would be very difficult to do. > > > > > >I would appreciate any comments you might have. > > > > > >Thanks again > > > > > >John > > > > > > > > >--- Rebecca Donley <[EMAIL PROTECTED]> wrote: > > > > > > > > John, > > > > I had a similar problem when passing # from one > > page > > > > to another as an html > > > > anchor. What worked for me was separating the # > > in > > > > quotes as follows: > > > > > > > > echo "?id=" . $row[0] . "#" . > > strtolower($row[1]) . > > > > '">'; > > > > > > > > > > > > When I did this I had no problem passing the > > entire > > > > string without the end > > > > being interpreted as a comment. > > > > Rebecca > > > > > > > > > > > > >From: John Holcomb <[EMAIL PROTECTED]> > > > > >To: [EMAIL PROTECTED] > > > > >Subject: [PHP] Is there no one who can help me > > out > > > > there. > > > > >Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) > > > > > > > > > >I have a text input field in my form. I need > > the > > > > user > > > > >to be able to enter something like: Hello, I > > need > > > > # > > > > >help. After which they click on a submit > > button. > > > > The > > > > >succeeding page then takes this text and tries > > to > > > > >display it and tries to store "Hello, I need # > > > > help" > > > > >in a varchar field in a mysql table column. > > The > > > > >mysql database is truncating the # sign and the > > > > text > > > > >succeeding the # sign. Also, absolutly no text > > is > > > > >being diplayed on the succeeding web page. > > I've > > > > tried > > > > > using addslashes() and I was warned against > > using > > > > >htmlentities(). Also, I'm not sure if I'm > > dealing > > > > >with 2 issues: A mysql issue and a html issue. > > Or, > > > > am > > > > >I dealing with one issue: A mysql issue or an > > HTML > > > > >issue. > > > > > > > > > >I know think my problem is that when I pass > > text to > > > > >another page with the # sign, it's interpreting > > it > > > > as > > > > >a comment. Is their any way to somehow escape > > the > > > > # > > > > >sign. > > > > > > > > > > > > > > > > > > > > > > > > > Thank you, > > > > > > > > > >John > > > > > > > > > > > >__ > > > > >Terrorist Attacks on U.S. - How can you help? > > > > >Donate cash, emergency relief information > > > > > > > > > > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > > > > > > > >-- > > > > >PHP General Mailing List (http://www.php.net/) > > > > >To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > >For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > >To contact the list administrators, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > >_ > > > > Get your FREE download of MSN Explorer at > > > > http://explorer.msn.com/intl.asp > > > > > > > > > > > > >__ > > >Terrorist Attacks on U.S. - How can you help? > > >Donate cash, emergency relief information > > > >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > > > > > > >_ > > Get your FREE download of MSN Explorer at > > http://explorer.msn.com/intl.asp > > > > >__ >Terrorist Attacks on U.S. - How can you help? >Donate cash, emergency relief information >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > >-- >PHP Gen
Re: [PHP] real simple regex
but can imap replace my old mail() calls? Don't I have to get a server that supports it or something?? the regex thing I already got working... thanks... At 21:53 17/9/2001 -0700, Frank M. Kromann wrote: >Take a look at http://php.net/manual/en/function.imap-rfc822-parse-adrlist.php > >This function will do the trick. You can also have a look at >http://php.net/manual/en/function.imap-mail.php. This is an extended mail >function and it works on both WIndows and *nix. > >- Frank > > > I had to write my own mail() function cuz PHP's does not work in Windows > > very well.. > > > > But I suck at regex and I need to get the email address from the field > from > > that can be something like: > > $from = "Christian Dechery <[EMAIL PROTECTED]>"; > > > > so what I want is: > > the string between '<' and '>' or the last 'word' of the 'sentence' (for > > something like "\"Christian Dechery\" [EMAIL PROTECTED]"). > > > > thanks... > > > > p.s: meu novo email é [EMAIL PROTECTED] > > > > . Christian Dechery (lemming) > > . http://www.tanamesa.com.br > > . Gaita-L Owner / Web Developer > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Print current page with no printer dialog box - How ?
Thanks everyone for ideas and suggestions. In short, it is no easy way, but there are work arounds by using scripting, CSS etc, but it may not be portable. I guess people can always use the browser's print button, but this has some limitation on pages that use frames etc. Regards, Huem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
On Wed, 19 Sep 2001 08:59, John Holcomb wrote: > I have a text input field in my form. I need the user > to be able to enter something like: Hello, I need # > help. After which they click on a submit button. The > succeeding page then takes this text and tries to > display it and tries to store "Hello, I need # help" > in a varchar field in a mysql table column. The > mysql database is truncating the # sign and the text > succeeding the # sign. Also, absolutly no text is > being diplayed on the succeeding web page. I've tried > using addslashes() and I was warned against using > htmlentities(). Also, I'm not sure if I'm dealing > with 2 issues: A mysql issue and a html issue. Or, am > I dealing with one issue: A mysql issue or an HTML > issue. > > I know think my problem is that when I pass text to > another page with the # sign, it's interpreting it as > a comment. Is their any way to somehow escape the # > sign. > Works OK for me in an INPUT TYPE=TEXT. Perhaps a bit of your code and the table structure might help? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Sorry, I don't date outside my species. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there no one who can help me out there.
On Tue, 18 Sep 2001 16:29:21 -0700 (PDT), John Holcomb wrote: >I have a text input field in my form. I need the user >to be able to enter something like: Hello, I need # >help. After which they click on a submit button. The >succeeding page then takes this text and tries to >display it and tries to store "Hello, I need # help" >in a varchar field in a mysql table column. The >mysql database is truncating the # sign and the text >succeeding the # sign. Also, absolutly no text is >being diplayed on the succeeding web page. try error_reporting(15) at the top of the script. that might show you what error you're getting. > I've tried > using addslashes() and I was warned against using >htmlentities(). Also, I'm not sure if I'm dealing >with 2 issues: A mysql issue and a html issue. Or, am >I dealing with one issue: A mysql issue or an HTML >issue. > >I know think my problem is that when I pass text to >another page with the # sign, it's interpreting it as >a comment. well this might be true if you're eval()'ing the string...? >Is their any way to somehow escape the # sign. you don't have to, it's not a special character in mysql. try calling mysql_error() after the query. if you're still having trouble you can probably get more help on this list if you post the relevant code, and the output from 'describe $tablename' in mysql -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speeding up program
On Tue, 18 Sep 2001 20:56, Niklas Lampén wrote: > How big difference does it make in speed in these: > > for ($i = 0; $i < mysql_num_rows($Results); $i++) { > blah > }; > ?> > > or > > $n = mysql_num_rows($Results); > for ($i = 0; $i < $n; $i++) { > blah > }; > ?> > > So actually I'm asking how much more/less it takes time to do the > comparing against mysql_num_rows() insted of comparing against a > variable. > > > Niklas Will deppend on the environment in which you are running it. to test it on your environment, try running each say ten thousand times in a loop, and use a timer like microtime to check how long it takes.\ Then you can let us all know the answer. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Why can't we just spell it orderves? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem: ereg doesn't work ok (?).
On Tue, 18 Sep 2001, * R&zE: wrote: > > and get DD-MM-, but with well formed -MM-DD it doesn't match!. Is > > this a bug?. > It would help if you send the code you're using, 'cause we can't see > what you're doing now. FAFAIK it should just be possible. See the Sure: --- start --- $datenews = urldecode($datenews); // just in case, but it's the same // without this line and the one below. $datenews = trim($datenews); if (!ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $datenews, $regs)) { echo "Duh! that is not a date, u kiddie: $datenews."; exit; } else echo "Cool! it is a date. Continue the proggie."; --- end --- where $datenews is passed as a get variable, which is obtained with this: --- start --- // the $regs array comes from the ereg expression above (the one which // doesn't work as expected). $timestamp = mktime(0,0,0,$regs[2],$regs[3],$regs[1]); $yesterday = $timestamp - 86400; // one day before... that's yesterday :) $yesternews = date("Y-m-d",$yesterday); // here I pass the new datenews to myself: print "Older news\n"; --- end --- This sometimes work, but sometimes it doesn't randomly, even with the same date both times, and the worst thing is that the "failure notice" prints the right date in the right format. Now I went back to php-4.0.6 (apache-1.3.20, rh-7.1) and it's the same. Any help is appreciated. Thank you. Regards. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Problem: lost session id when htaccess'ing.
On Tue, 18 Sep 2001, Chris Lee wrote: > - you have cookie support on or off ? > - you using any header redirects ? (you have to manually add the SID to > URI's) Sorry for the lenght of this mail. PHP compiled with --enable-trans-id, so PHP adds SID to the URL. session.use_cookies = 0, session.referer_check =, session.auto_start = 1, session.name = SID Having this doc tree: /index.html | \___ systems/index.html |___ .htaccess --- /index.html --- Enter --- /index.html --- Now: --- systems/index.html --- --- systems/index.html --- Do I need to use the SID constant with session_id() to set the first session ID? (I mean, the one from the href who taked me to the systems/ directory). Thanks, Rodolfo. -- 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]