php-windows Digest 18 May 2001 05:17:15 -0000 Issue 604 Topics (messages 7682 through 7705): doesn't work too 7682 by: M. Weller include paths 7683 by: mjrobey.maxoncorp.com 7684 by: Michael Kelley 7685 by: Netcom Mail 7703 by: Netcom Mail Re: PHP and Multiple databases 7686 by: andrew morton Re: extracting email addresses 7687 by: Svensson, B.A.T. 7693 by: afan 7697 by: Svensson, B.A.T. Re: PHP, network shares, and IIS5 7688 by: JayAchTee Re: My SQL 7689 by: Svensson, B.A.T. Why Blank Screen ? 7690 by: Calvin Chang 7692 by: Michael Kelley Re: Canceling a Query 7691 by: Svensson, B.A.T. 7694 by: Svensson, B.A.T. 7696 by: Brinkman, Theodore 7698 by: Svensson, B.A.T. 7702 by: Brinkman, Theodore PHP3 with mySQL 7695 by: Kim Littell Need help with Cookies 7699 by: Iván Milanez Castellanos Re: Trouble loading extension/module under win98 7700 by: Michel Meyers Exec() and Windows 2000 SP1 7701 by: Philip J. Murphy Some question about LDAP 7704 by: Lin Bill Re: .htaccess 7705 by: William Jay Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Thanks Guiseppe, I tried this class before and received this error which I cannot resolve. Warning: Bad Message destination in class.html.mime.mail.inc on line 285 Markus ""Giuseppe D'Ambrosio"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 008301c0deed$9371d460$[EMAIL PROTECTED]">news:008301c0deed$9371d460$[EMAIL PROTECTED]... > > > >I found this on PHP.net It works when you hardcode the values (where I > >have the value arrows.gif). I've been playing with it trying to modify > >it to do an upload and sending of an email with any kind of attachment. > > > ><? > > > >/* > > * Class mime_mail > > * Original implementation by Sascha Schumann <[EMAIL PROTECTED]> > > * Modified by Tobias Ratschiller <[EMAIL PROTECTED]>: > > * - General code clean-up > > * - separate body- and from-property > > * - killed some mostly un-necessary stuff > > */ > > > look at http://www.heyes-computing.net/scripts/ > > there's what you're looking for (I think) > > ** Author........: Richard Heyes <[EMAIL PROTECTED]> > ** Filename......: html_mime_mail.class > ** Last changed..: 28/01/01 > ** Notes.........: Based upon mime_mail.class > ** by Tobias Ratschiller <[EMAIL PROTECTED]> > ** and Sascha Schumann <[EMAIL PROTECTED]>. > > > also on my site > http://boltthrower.webhop.org/opensource/moom.html > ( a remote database interface (in the case Oracle) all via mail using that class) > > > > HTH, > bye, > Giuse, > http://boltthrower.webhop.org/ > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Greetings, I'm running Apache with the PHP mod under Windows 2000, but I seem to have a recurring problem with includes. Every time I try to view a page with an include() statement, it returns an error of the following sort: Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: \foxserv\www\home\en\index.php on line 5 I've tried placing the desired PHP file (menutop.php) in the same directory as the index.php, and it returns just fine, but I can't seem to get it to recognize any sort of path, as indicated by the error message. As far as I can tell, my syntax is correct in my php.ini: include_path = "d:\foxserv\www\include;." But I keep running into the same problem. I am running a dual boot on separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, perhaps that has something to do with it? If anyone has any insight into the problem it would be much appreciated. -Matthew Robey Maxon Corp.
my include looks like ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; include_path = \apache\includes do you have the quotes & ; & . in yours?? [EMAIL PROTECTED] wrote: > Greetings, > > I'm running Apache with the PHP mod under Windows 2000, but I seem to have > a recurring problem with includes. Every time I try to view a page with an > include() statement, it returns an error of the following sort: > > Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: > \foxserv\www\home\en\index.php on line 5 > > I've tried placing the desired PHP file (menutop.php) in the same directory > as the index.php, and it returns just fine, but I can't seem to get it to > recognize any sort of path, as indicated by the error message. As far as I > can tell, my syntax is correct in my php.ini: > > include_path = "d:\foxserv\www\include;." > > But I keep running into the same problem. I am running a dual boot on > separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, > perhaps that has something to do with it? If anyone has any insight into > the problem it would be much appreciated. > > -Matthew Robey > Maxon Corp. -- Michael Kelley [EMAIL PROTECTED] Programmer/Systems Analyst I New Mexico State University Information and Communication Technologies Work # (505)-646-1374 P.O. Box 30001 MSC: 3AT Las Cruces, NM 88003
----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 17, 2001 12:30 PM Subject: [PHP-WIN] include paths Try typing the include() line in your code like this: include($include_path."\SomeFilenameToInclude"); Alan > Greetings, > > I'm running Apache with the PHP mod under Windows 2000, but I seem to have > a recurring problem with includes. Every time I try to view a page with an > include() statement, it returns an error of the following sort: > > Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: > \foxserv\www\home\en\index.php on line 5 > > I've tried placing the desired PHP file (menutop.php) in the same directory > as the index.php, and it returns just fine, but I can't seem to get it to > recognize any sort of path, as indicated by the error message. As far as I > can tell, my syntax is correct in my php.ini: > > include_path = "d:\foxserv\www\include;." > > But I keep running into the same problem. I am running a dual boot on > separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, > perhaps that has something to do with it? If anyone has any insight into > the problem it would be much appreciated. > > -Matthew Robey > Maxon Corp. > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
On Thu, 17 May 2001 11:30:59 -0500, you wrote: On second thought (see my previous note), how exactly are you typing your include() in code? I realized after posting previously, that include() automatically traverses the path(s) set by the include_path variable, so as long as that is set up properly, simply using: include('someincludefile'); works like it should (at least it does for me). If that isn't the issue, then I can only suspect that there is a windows2000 issue involved. I'm using windows 98, so I can't check that. Alan >Greetings, > >I'm running Apache with the PHP mod under Windows 2000, but I seem to have >a recurring problem with includes. Every time I try to view a page with an >include() statement, it returns an error of the following sort: > >Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: >\foxserv\www\home\en\index.php on line 5 > >I've tried placing the desired PHP file (menutop.php) in the same directory >as the index.php, and it returns just fine, but I can't seem to get it to >recognize any sort of path, as indicated by the error message. As far as I >can tell, my syntax is correct in my php.ini: > >include_path = "d:\foxserv\www\include;." > >But I keep running into the same problem. I am running a dual boot on >separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, >perhaps that has something to do with it? If anyone has any insight into >the problem it would be much appreciated. > >-Matthew Robey >Maxon Corp.
Yes you can. I'd say the major annoyance is that each database has it's own functions that you have to learn. There are some projects to create a uniform database wrapper classes. andrew -----Original Message----- From: Scott Ellis [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 08:43 To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP and Multiple databases I am fairly new to PHP and have used it on a few sites but I have not been dealing with databases much (in PHP). I am wanting to know if a single instance of PHP can be configured to connect to multiple databases or does is a new instance required for each DB. The scenario is that I may be pulling content from multiple databases (Oracle, MySQL, SQL Server...) for a single web site. I am not looking for any involved explanations just a simple yes or no and any reference points you may have from experience on how (at a high level) and if there are any "tricky parts" that might make the process painful. Thanks, Scott -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
>there is my problem: I have a large text file with a lot of >email addresses included in text. I have to extract just email >addresses from a whole text. >What's the way to do that? They way to do it is first to do your homework: which simply is to develop some basic programming skills with your self, but don't expect us to learn you how to do programming. Secondly: since your file can be in any format, and you haven't specified what kind of format your file is in, it is impossible to tell for *anyone* here who to do it.
----- Original Message ----- From: "Svensson, B.A.T. " <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "afan" <[EMAIL PROTECTED]> Sent: Thursday, May 17, 2001 11:36 AM Subject: RE: [PHP-WIN] extracting email addresses > >there is my problem: I have a large text file with a lot of > >email addresses included in text. I have to extract just email > >addresses from a whole text. > > >What's the way to do that? > > They way to do it is first to do your homework: which simply > is to develop some basic programming skills with your self, > but don't expect us to learn you how to do programming. > > Secondly: since your file can be in any format, and you > haven't specified what kind of format your file is in, > it is impossible to tell for *anyone* here who to do it. > 1. I have "some" basic programming skills (see sites I already programmed by myself: http://www.realsimplenetwork.com/ , http://store.sprout.net/insideBio/index.php , http://www.rbclick.com/ , http://www.whataboutjoan.com , http://www.ricki.com/index.htm , http://www.theshowaboutnothing.com/ (Official Seinfeld Site) and some more sites...) BUT I expect to find here some people they will TEACH me something I still do not know (and, of course, there is a still a lot of things I do not know). 2. I'm sorry not being specific: the large text file is simply .txt file. A huge amount of text with email addresses within it. I never had a problem like this and just wanted some ideas, like Michael Kelly did it. 3. I found solution. Afan
>1. I have "some" basic programming skills >(see sites I already programmed by Well, quite nice design!, but... <yaaawn> what do you want for that? A medal or what? ;-) >and some more sites...) BUT I expect to find here some >people they will TEACH me something I still do not know >(and, of course, there is a still a lot of things I do not know). Isn't that true for each and every one... ;-) >2. I'm sorry not being specific: the large text file is simply .txt file. A >huge amount of text with email addresses within it. I never had a problem >like this and just wanted some ideas, like Michael Kelly did it. Well, you just don't get it: extracting information like that is regarded as a very basic trivial programming problem. If a programmer is not able to formulate a trivial problem like that in programming or meta-programming statements, then that programmer is not worth being named a programmer. But on the contrary: Most normal intelligent persons without any programming skills are able to put together a workable program if they only have a manual, because humans are creative beings. But then manage to make a program that works for a task doesn't mean that these guy can do programming! These fellows will usually construct programs that a experience programmer would, to put it nicely, call "unusual constructions". Probably these program will suffer from bad degrees of coupling and cohesion (aka: spaghetti programs in popular terms). >3. I found solution. Good! Regards, /Anders D.S. Your description above about the file with e-mail address is still not sufficient enough for a programmer to understand how (s)he should employ an algorithm to extract e-mail addresses from it. You suffer from the "general-customer-ignorance-problem", where the customer believes that programmers are mind reader and can extract all the details from a transcendental spiritual plane... Well, let me tell you this: programming haven't reached that state - yet. :) D.S.
Looks like a Zend error according to the PHP source code. Maybe they "improved" the engine to the point that it doesn't work any longer. I tried many different ways including "file" and "fopen" but to no avail. "Paul Smith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Not yet, but I want to stay with the \\computername\share > <file://\\computername\share> format if I can becuase then I can run the > same commands on any server without worrying about drive letters and drive. > Drive mappings are also made for the user, not the system which will cuase > me problems. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 29 April 2001 17:43 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] PHP, network shares, and IIS5 > > > > Have you tried mapping the drive, then accessing them like that? > > Hi, > > I've been using PHP4 and IIS5 on Win2k and IIS5 for ages now. I now need to > > host some of my files on a network share instead of on a local drive. All > that should need changing is the location on the files on IIS5, which is > \\computername\share\folder. All the non-php sites still work OK after I do > > this, but the php sites with the PHP4 isapi module just report > > Warning: Failed opening '\\sharename\web sites\mysite\default.php' for > inclusion (include_path='') in Unknown on line 0 > > The files are still there and if I change back to the local drive the php > module works fine. I's pretty sure it has nothing to do with security as > the share just points to the same files used on the local disk and all the > permissions are the same. Anyone have any idea if PHP isapi can handle > files on a network share? > > Thanks. > >
Well, I hardly believe it will work: I spotted some semantic faults in the SQL code... >-----Original Message----- >From: Zak Greant >Sent: Thursday, May 17, 2001 12:17 AM >To: Manesh Manickam; [EMAIL PROTECTED] >Subject: Re: [PHP-WIN] My SQL > > >Manesh, > >Don't be surprised that people are less than helpful when you >sent a huge (34k) message to the list! :) > >The command you need is this: > >mysql db_name < nuke.sql
When I try to execute my php file, the netscape brower only show blank screen. I have done all the necessary setup in window98 , apache, php4. Someone please help me to trouble-shoot this problem. Thanks a lot.
Have you copied your php.ini file to the C:Windows\system folder yet?? Calvin Chang wrote: > When I try to execute my php file, the netscape brower only show blank > screen. > > I have done all the necessary setup in window98 , apache, php4. Someone > please help me to trouble-shoot this problem. > > Thanks a lot. -- Michael Kelley [EMAIL PROTECTED] Programmer/Systems Analyst I New Mexico State University Information and Communication Technologies Work # (505)-646-1374 P.O. Box 30001 MSC: 3AT Las Cruces, NM 88003
Well, a query can be long running without having to return lots of rows!!! One can easliy construct a query that will run for hours, and just returning some few rows, even zero rows. First things is basically to drop all index on the database... ;-) And then start to make nested table scans... evaluation conditions in the were clause like 'where 1 = 2 ..' etc... :-) >-----Original Message----- >From: John Lim >Sent: Thursday, May 17, 2001 9:00 AM >To: [EMAIL PROTECTED] >Subject: Re: [PHP-WIN] Canceling a Query > > >Hello, > >This is a workaround. Can you use T-SQL's: SET ROWCOUNT ? > >This limits the number of rows returned by a query.
Dear Brinkman, First I wonder one thing: Why are the queries long running in the first place? Might it be because improper indexing of the attribute in the tables? Maybe it can be worth to have alook at this to see if you can increase performance this way. You might very well be able to speed up the execution of your queries by rewriting them and/or adding a few more new indexes to the table. I know that within the SQL server one are able to track user process, create new jobs, and delete jobs, and a thought around this - which is untried by me - might be to uses these facilities provided by SQL server, and build a kind of tracking system that keeps track of the users queries with a kind of "ticket", when a user sends a cancel request, you simply forward this cancel message with the proper "ticket" to SQL server, and then you lets the RDBMS do the killing of the long running process. How ever I haven't done this my self, and don't even know if it possible, but it might very well be worth in your case to have a lock at it. In the SQL help, you might start out by checking out sp_add_jobb and sp_delete_job. Cheers, /Anders >-----Original Message----- >From: Brinkman, Theodore >[mailto:[EMAIL PROTECTED]] >Sent: Wednesday, May 16, 2001 5:45 PM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] Canceling a Query > > >I'm working on an application for work where users will be querying the >database to get information back about processed documents. >I'm trying toset up a way for a user to cancel a query which is taking too >long. I'm using MS SQL Server 2000. The interface for the cancel is >easy enough, a form containing a button that says 'cancel' and a value or set >of values identifying the query being run. > >I've found 'KILL <SPID>', but the problem is that all the >connections to the >database are done through the web-server so they get the same >SPID, which >means that EVERY query being run by EVERY user gets killed. >(Obviously not >an acceptable solution.) Does anybody out there know of a way to >specifically kill a single query/stored procedure? We're >willing to track >as many values as necessary to do it. > >Thanks. > > - Theo > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: >[EMAIL PROTECTED] >
Well, the queries are taking a long time because they're searching through 8GB+ of database doing joins across multiple tables. The guy who did the database design and indexing has gotten the database to the fastest point he knows how. Any other indexes he's tried so far have actually SLOWED the queries. The most interesting thing is that the index which sped things up the most was on a field which isn't even a key. Other queries exacerbate the issue, because to return the desired data they MUST walk entire tables, so indexing doesn't buy anything there. (for example, the 'list accounts' query.) The main problem is that it's an interactive application where the database can grow to immense sizes, and the most common searches can return huge amounts of information. The first clue a user may have that they've accidentally entered the wrong parameter (not invalid, just not what they meant to) is when a search seems to be taking A LOT longer than usual. (i.e.: you mean to run the search against items between 1/1/2001 and 2/1/2001, but accidentally run it between 1/1/2000 and 12/1/2001). We can't limit the range, because we know there are perfectly valid reasons to do that same search across 7 years or more, but they just aren't that common. We've found a way to do it by going to asynchronous queries, but that requires changes to quite a few pages, and that's something I'm hoping to avoid if possible. - Theo -----Original Message----- From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 3:10 PM To: Brinkman, Theodore; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Canceling a Query Dear Brinkman, First I wonder one thing: Why are the queries long running in the first place? Might it be because improper indexing of the attribute in the tables? Maybe it can be worth to have alook at this to see if you can increase performance this way. You might very well be able to speed up the execution of your queries by rewriting them and/or adding a few more new indexes to the table. I know that within the SQL server one are able to track user process, create new jobs, and delete jobs, and a thought around this - which is untried by me - might be to uses these facilities provided by SQL server, and build a kind of tracking system that keeps track of the users queries with a kind of "ticket", when a user sends a cancel request, you simply forward this cancel message with the proper "ticket" to SQL server, and then you lets the RDBMS do the killing of the long running process. How ever I haven't done this my self, and don't even know if it possible, but it might very well be worth in your case to have a lock at it. In the SQL help, you might start out by checking out sp_add_jobb and sp_delete_job. Cheers, /Anders >-----Original Message----- >From: Brinkman, Theodore >[mailto:[EMAIL PROTECTED]] >Sent: Wednesday, May 16, 2001 5:45 PM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] Canceling a Query > > >I'm working on an application for work where users will be querying the >database to get information back about processed documents. >I'm trying toset up a way for a user to cancel a query which is taking too >long. I'm using MS SQL Server 2000. The interface for the cancel is >easy enough, a form containing a button that says 'cancel' and a value or set >of values identifying the query being run. > >I've found 'KILL <SPID>', but the problem is that all the >connections to the >database are done through the web-server so they get the same >SPID, which >means that EVERY query being run by EVERY user gets killed. >(Obviously not >an acceptable solution.) Does anybody out there know of a way to >specifically kill a single query/stored procedure? We're >willing to track >as many values as necessary to do it. > >Thanks. > > - Theo > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: >[EMAIL PROTECTED] >
Dear Brinkman, With out having seen the design, my objections below might be misplace, but: have the database been designed with respect of your queries? Even though the designer might have optimized the database for a special intention, your queries might be out of this scope, this is just a first reflection on your answer. Secondly: which normal form is the database in? If he have pushed the "academic way" to far, the design it self might very well be "bad" in respect of speed. A little bit of well chosen redundancy here and there might very well speed up things dramatically. Also introducing abstract attributes (with the only purpose to be used as indexed attributes) in the tables which splits the data of the same domain in smaller subdomains, might also help to increase the speed. For example I am building a database system which a "small" table in the system of 3,5 millions rows raw data, and it will increase to contain about 10 million rows (I am working with "bio-informatics" and we will not to soon deal with data in the Terror-byte :) range, so DBMS speed is also of great concern for me. Anyhow, searches in this table takes just mili seconds - and I don't have any reason to believe it will increase that much more when I continues to populate the database. What limits the response time is not the RDBMS, but the transfer rate of data over the network. Anyhow: But since I haven't seen the design, it is of course very hard for me to track down the actually problem. I don't even know what kind of queries you do! For ex, does it involves freetext searches? Anyhow2: I can identify one problem you have: Huge amount of information is gathered in the queries. The natural question to ask then is: Does the server provide enough memory to handle this data in main memory, or does it need to swap on disk to handle the amount of data? However you are dealing with an interesting problem, that I wouldn't mind to have a closer look into - unfortunately I am fully occupied with my database design work... ;) Finally: Maybe one also have to realize that some queries by there nature ARE long running, and one has to realize that a perpetual mobile actually is not possible to construct. Is it possible to introduce the ideas with the end user that some queries actually *will* take a long time to run? I hope it will work out for you in the end! Cheers, /Anders >-----Original Message----- >From: Brinkman, Theodore >[mailto:[EMAIL PROTECTED]] >Sent: Thursday, May 17, 2001 9:34 PM >To: [EMAIL PROTECTED] >Cc: Svensson, B.A.T. >Subject: RE: [PHP-WIN] Canceling a Query > > >Well, the queries are taking a long time because they're searching through >8GB+ of database doing joins across multiple tables. The guy who did the >database design and indexing has gotten the database to the fastest point he >knows how. Any other indexes he's tried so far have actually SLOWED the >queries. The most interesting thing is that the index which sped things up >the most was on a field which isn't even a key. > >Other queries exacerbate the issue, because to return the desired data they >MUST walk entire tables, so indexing doesn't buy anything there. (for >example, the 'list accounts' query.) > >The main problem is that it's an interactive application where the database >can grow to immense sizes, and the most common searches can return huge >amounts of information. The first clue a user may have that they've >accidentally entered the wrong parameter (not invalid, just not what they >meant to) is when a search seems to be taking A LOT longer than usual. >(i.e.: you mean to run the search against items between 1/1/2001 and >2/1/2001, but accidentally run it between 1/1/2000 and 12/1/2001). We can't >limit the range, because we know there are perfectly valid reasons to do >that same search across 7 years or more, but they just aren't >that common. > >We've found a way to do it by going to asynchronous queries, but that >requires changes to quite a few pages, and that's something I'm hoping to >avoid if possible. > > - Theo > >-----Original Message----- >From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] >Sent: Thursday, May 17, 2001 3:10 PM >To: Brinkman, Theodore; [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] Canceling a Query > > >Dear Brinkman, > >First I wonder one thing: Why are the queries long running >in the first place? Might it be because improper indexing >of the attribute in the tables? Maybe it can be worth to >have alook at this to see if you can increase performance >this way. You might very well be able to speed up the >execution of your queries by rewriting them and/or >adding a few more new indexes to the table. > >I know that within the SQL server one are able to track user >process, create new jobs, and delete jobs, and a thought around >this - which is untried by me - might be to uses these facilities >provided by SQL server, and build a kind of tracking system that >keeps track of the users queries with a kind of "ticket", when >a user sends a cancel request, you simply forward this cancel >message with the proper "ticket" to SQL server, and then you >lets the RDBMS do the killing of the long running process. > >How ever I haven't done this my self, and don't even know if >it possible, but it might very well be worth in your case to >have a lock at it. In the SQL help, you might start out by >checking out sp_add_jobb and sp_delete_job. > >Cheers, > /Anders > >>-----Original Message----- >>From: Brinkman, Theodore >>[mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, May 16, 2001 5:45 PM >>To: [EMAIL PROTECTED] >>Subject: [PHP-WIN] Canceling a Query >> >> >>I'm working on an application for work where users will be >querying the >>database to get information back about processed documents. >>I'm trying toset up a way for a user to cancel a query which >is taking too >>long. I'm using MS SQL Server 2000. The interface for the cancel is >>easy enough, a form containing a button that says 'cancel' >and a value or >set >>of values identifying the query being run. >> >>I've found 'KILL <SPID>', but the problem is that all the >>connections to the >>database are done through the web-server so they get the same >>SPID, which >>means that EVERY query being run by EVERY user gets killed. >>(Obviously not >>an acceptable solution.) Does anybody out there know of a way to >>specifically kill a single query/stored procedure? We're >>willing to track >>as many values as necessary to do it. >> >>Thanks. >> >> - Theo >> >>-- >>PHP Windows Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >>To contact the list administrators, e-mail: >>[EMAIL PROTECTED] >> >
The database is structured so that what we expect will be the most common queries will run as quickly as possible. Unfortunately, some of the queries which are expected to be run less often are also the longer-running queries which get data from lots of different tables. We're expecting 6,000 - 80,000 additional sets of data to be added to the database each day. Well, one of the longer searches does involve a freetext search--with a "LIKE '%???%'" none the less. (God help the poor fool who searches for 'a' once the database has grown.) However, it's the only one that does that sort of thing. As for Anyhow2, I don't think the server has managed to hit it's swap yet. I haven't been watching it too closely, but we'd expect to see a bit more HD activity on the Performance Monitor if it were. Instead it seems to hover around the same level of HD activity as it does during the search portion of the faster queries. As for the Finally, these longer queries can often start to monopolize SQL Server to the point that EVERY query gets significantly slower. We're trying to allow a user who has realized that their search is taking MUCH longer than expected to stop their search so it doesn't tie up the system for so long. The server in question is a Dual PIII 733 with 512MB of RAM, and software mirrored 10000RPM LVD SCSI drives. I had to push through a fair bit of inertia to get the company to look at a dual-processor configuration, and haven't quite gotten anybody in a purchase-approval position to go for hardware RAID yet. Before the dual-processor configuration it was a single processor 866 (I think), and SQL Server would regularly monopolize the processor to the point that NOBODY else could access the application until a query was done running. - Theo -----Original Message----- From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 4:29 PM To: Brinkman, Theodore; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Canceling a Query Dear Brinkman, With out having seen the design, my objections below might be misplace, but: have the database been designed with respect of your queries? Even though the designer might have optimized the database for a special intention, your queries might be out of this scope, this is just a first reflection on your answer. Secondly: which normal form is the database in? If he have pushed the "academic way" to far, the design it self might very well be "bad" in respect of speed. A little bit of well chosen redundancy here and there might very well speed up things dramatically. Also introducing abstract attributes (with the only purpose to be used as indexed attributes) in the tables which splits the data of the same domain in smaller subdomains, might also help to increase the speed. For example I am building a database system which a "small" table in the system of 3,5 millions rows raw data, and it will increase to contain about 10 million rows (I am working with "bio-informatics" and we will not to soon deal with data in the Terror-byte :) range, so DBMS speed is also of great concern for me. Anyhow, searches in this table takes just mili seconds - and I don't have any reason to believe it will increase that much more when I continues to populate the database. What limits the response time is not the RDBMS, but the transfer rate of data over the network. Anyhow: But since I haven't seen the design, it is of course very hard for me to track down the actually problem. I don't even know what kind of queries you do! For ex, does it involves freetext searches? Anyhow2: I can identify one problem you have: Huge amount of information is gathered in the queries. The natural question to ask then is: Does the server provide enough memory to handle this data in main memory, or does it need to swap on disk to handle the amount of data? However you are dealing with an interesting problem, that I wouldn't mind to have a closer look into - unfortunately I am fully occupied with my database design work... ;) Finally: Maybe one also have to realize that some queries by there nature ARE long running, and one has to realize that a perpetual mobile actually is not possible to construct. Is it possible to introduce the ideas with the end user that some queries actually *will* take a long time to run? I hope it will work out for you in the end! Cheers, /Anders >-----Original Message----- >From: Brinkman, Theodore >[mailto:[EMAIL PROTECTED]] >Sent: Thursday, May 17, 2001 9:34 PM >To: [EMAIL PROTECTED] >Cc: Svensson, B.A.T. >Subject: RE: [PHP-WIN] Canceling a Query > > >Well, the queries are taking a long time because they're searching through >8GB+ of database doing joins across multiple tables. The guy who did the >database design and indexing has gotten the database to the fastest point he >knows how. Any other indexes he's tried so far have actually SLOWED the >queries. The most interesting thing is that the index which sped things up >the most was on a field which isn't even a key. > >Other queries exacerbate the issue, because to return the desired data they >MUST walk entire tables, so indexing doesn't buy anything there. (for >example, the 'list accounts' query.) > >The main problem is that it's an interactive application where the database >can grow to immense sizes, and the most common searches can return huge >amounts of information. The first clue a user may have that they've >accidentally entered the wrong parameter (not invalid, just not what they >meant to) is when a search seems to be taking A LOT longer than usual. >(i.e.: you mean to run the search against items between 1/1/2001 and >2/1/2001, but accidentally run it between 1/1/2000 and 12/1/2001). We can't >limit the range, because we know there are perfectly valid reasons to do >that same search across 7 years or more, but they just aren't >that common. > >We've found a way to do it by going to asynchronous queries, but that >requires changes to quite a few pages, and that's something I'm hoping to >avoid if possible. > > - Theo > >-----Original Message----- >From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] >Sent: Thursday, May 17, 2001 3:10 PM >To: Brinkman, Theodore; [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] Canceling a Query > > >Dear Brinkman, > >First I wonder one thing: Why are the queries long running >in the first place? Might it be because improper indexing >of the attribute in the tables? Maybe it can be worth to >have alook at this to see if you can increase performance >this way. You might very well be able to speed up the >execution of your queries by rewriting them and/or >adding a few more new indexes to the table. > >I know that within the SQL server one are able to track user >process, create new jobs, and delete jobs, and a thought around >this - which is untried by me - might be to uses these facilities >provided by SQL server, and build a kind of tracking system that >keeps track of the users queries with a kind of "ticket", when >a user sends a cancel request, you simply forward this cancel >message with the proper "ticket" to SQL server, and then you >lets the RDBMS do the killing of the long running process. > >How ever I haven't done this my self, and don't even know if >it possible, but it might very well be worth in your case to >have a lock at it. In the SQL help, you might start out by >checking out sp_add_jobb and sp_delete_job. > >Cheers, > /Anders > >>-----Original Message----- >>From: Brinkman, Theodore >>[mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, May 16, 2001 5:45 PM >>To: [EMAIL PROTECTED] >>Subject: [PHP-WIN] Canceling a Query >> >> >>I'm working on an application for work where users will be >querying the >>database to get information back about processed documents. >>I'm trying toset up a way for a user to cancel a query which >is taking too >>long. I'm using MS SQL Server 2000. The interface for the cancel is >>easy enough, a form containing a button that says 'cancel' >and a value or >set >>of values identifying the query being run. >> >>I've found 'KILL <SPID>', but the problem is that all the >>connections to the >>database are done through the web-server so they get the same >>SPID, which >>means that EVERY query being run by EVERY user gets killed. >>(Obviously not >>an acceptable solution.) Does anybody out there know of a way to >>specifically kill a single query/stored procedure? We're >>willing to track >>as many values as necessary to do it. >> >>Thanks. >> >> - Theo >> >>-- >>PHP Windows Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >>To contact the list administrators, e-mail: >>[EMAIL PROTECTED] >> >
I'm in a tricky situation with a client and I was hoping to get some advice. Someone (old provider) wrote a php3 script that creates a mySQL database from a text file for access over the web. The problem is my client has switched providers and has decided to run on an NT server. Their new provider only allows ODBC connections for MS Access and SQL Server. Here are my options: 1. Edit the php3 program to create an MS Access or SQL server database instead of a mySQL database. 2. Rewrite the php3 program ( I have no PHP3 coding experience) to access MSAccess database. 3. If accessing an MSAccess or SQL server database is not feasible with PHP3 rewrite the whole program in ASP (which I have a little more experience with) and have it create the MSAccess/SQL server database. If someone could recommend which of the previous options will work that would be great. Thank you.
Hi: I have sucsessfuly installed PHP on my Win2k/IIS5/SQL Server 7 machine, and I moved an application that I had developed in my computer that has Win ME/Apache/PHP/SQL Server 7 to it. It all works fine except for one thing, I can't get the setcookie() function to work on this server, in my development machine it works fine and after having set the cookie my home page changes to reflect the information, but on the server when I call the form that sets the cookie nothing happens, the file that sets the cookie is called, all PHP code is parsed correctly, but the cookie doesn't get set can anybody help on this one??? thanx Iván Milanez Castellanos -------------------------------------------- Si alla donde tu te encuentras La luna brilla igual que aquí Posa en ella tus ojos un momento Y tan solo un momento piensa en mi _________________________________________________________________ El correo GRATUITO en tu idioma y con múltiples beneficios. Obtén tu CorreoWeb del Foco ahora en http://elfoco.correoweb.com
Yep, putting gnu_gettext.dll into c:\windows\system fixed it ... thanks a lot to everybody who replied. Greetings, Michel ""Liquidice"" <[EMAIL PROTECTED]> wrote in message 9ds97o$2s4$[EMAIL PROTECTED]">news:9ds97o$2s4$[EMAIL PROTECTED]... > your missing a dll file.. > i found that *.dll files.. alot of times require other dlls to function > right... > what i would do is open the dll file in wordpad > then hit ctrl+F (find) and look for ".dll" and write down each *.dll that's > referenced in the file. > then search for each one on your computer and make sure you have it. > this should fix it i'm positive :> > Liquidice > ""Michel Meyers"" <[EMAIL PROTECTED]> wrote in message > 9drv4n$m2r$[EMAIL PROTECTED]">news:9drv4n$m2r$[EMAIL PROTECTED]... > > Hi, > > > > I have a problem with PHP (both 4.0.4pl1 and 4.0.5) because I try to load > > the php_gettext.dll extension. > > > > Unfortunately all I get is: Unable to load dynamic library > > 'c:\php\extensions\php_gettext.dll' - One of the library files needed to > run > > this application cannot be found. This happens both when just running > > PHP.EXE and running apache with the php module. > > > > And I verified it, the file php_gettext.dll IS lying in C:\PHP\Extensions > > > > The relevant lines in PHP.INI are: > > > > ; Directory in which the loadable extensions (modules) reside. > > extension_dir = c:\php\extensions\ > > extension=php_gettext.dll > > > > Strangely the same settings/configuration work under Windows 2000. Can > > anybody help me or tell me what I'm doing wrong? > > > > Greetings, > > Michel > > [EMAIL PROTECTED] > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I have tried running the PHP funciton exec() on a Microsoft Windows 2000 (5.00.2195 Service Pack 1) box and it does not run. The cmd.exe process loads but just sits there, as if it either crashed quietly or is still waiting for something (like it doesn't know how to process the request). The same code runs fine on Windows Millenium Edition (4.90.3000). Does anyone have any ideas as to what's causing this? Is it a discrepancy between PHP calling command.com on Windows 9x and NT calling its closest equivalent cmd.exe? Better yet, how do I get around calling an external program from PHP in an NT box and get it to execute? Philip J. Murphy Charlotte, NC
Excuse me, I have some question about LDAP, need help! Thanks. What is LDAP? Does Windows 98 support LDAP? When I run my php program, a message seems to say: unable to load dynamic library 'C:\Windows\System\php_ldap.dll', cannot find files to execute this application. I am using PWS & PHP, I put php_ldap.dll in my C:\Windows\System, and in my php.ini file, I wrote this: ; Directory in which the loadable extensions (modules) reside. extension_dir = "C:\Windows\System\" extension=php_ldap.dll §Ú¬O¤p©¾©¾¡C
Rename any test text file to "tester.htaccess", open, choose open with, check always open with, notepad.exe, and Description of type may be httpd DIR OverRide Settings ... This will associate .htaccess with notepad and make life easier. ""Matt Hivner"" <[EMAIL PROTECTED]> wrote in message 9dr8f0$vd8$[EMAIL PROTECTED]">news:9dr8f0$vd8$[EMAIL PROTECTED]... | according to the manual (on the web)... | | "To configure Apache (with the PHP module installed) to PHP-process all the | HTML files in a given directory, add the following line to the file | ".htaccess" inside the directory: | | AddType application/x-httpd-php .html .htm | | It's OK if ".htaccess" contains only this line (i.e. the file did not | previously exist.)" | | I tried to add this file to my htdocs directory (assuming that that was the | given directory to writer was referring to) and windows will not let me name | a file .htaccess. | | I probably missed this in a read me somewhere, but could someone explain to | me a work around, or is there something else a windows user must do in this | situation. | | I know that in *NIX naming a file with a dot in front will simply hide it | from the ls command, but I am lost here in windows land... | | Matt | | | | | -- | PHP Windows Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] |