php-windows Digest 27 Apr 2001 01:40:54 -0000 Issue 566 Topics (messages 7059 through 7075): Re: Several " Constant already defined " errors. 7059 by: Florian Clever 7065 by: Joe Brown Re: Bandwidth for webhosts 7060 by: Svensson, B.A.T. 7061 by: Michael Rudel 7062 by: Svensson, B.A.T. 7063 by: Michael Rudel 7074 by: OoCobra97.aol.com NT4 + Apache problem 7064 by: Ermanno Iannacci Newbie-questionning: Errors in nearly every Downloaded Script 7066 by: Jochen Becker 7067 by: Schulz, Evan Long Execution Time 7068 by: akm 7069 by: Gregory_Griffiths.cargill.com 7070 by: Andrian Pervazov Exchange 7071 by: oifik [Help:] Problem with regex patterns when getting Title, Description and Keywords from HTML files... 7072 by: DHEA 7075 by: PHPWIN Re: php postgres module for windows 2000 7073 by: Paco Ortiz 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] ----------------------------------------------------------------------
This is probably a problem with IIS. Are you using persistant connections? I used to get the same error messages in my PHP/Oracle 8/IIS combination after PHP scripts terminated using exit() and not having freed all the Oracle handles and resources. These messages then also appeared on scripts without coding errors. I ended up using Apache on W2K and turning of persistant connections. cheers, Florian > >Von: > "Chipmaster" <[EMAIL PROTECTED]> > 07:42 > > Betreff: > Several " Constant already defined " errors. > An: > [EMAIL PROTECTED] > > > >I am trying to run PHP Nuke 5.0 beta 3 on a Windows 2000 Pro Machine with >IIS 5.0, PHP4 and MySQL Server. Each of the Systems works fine including PHP >but... When I run http://localhost/ the page loads including the MySQL >content and I get dozens and dozens of nice little error messages, which >state that many may constants are already defined on different line numbers >in the language/lang-english.php file. Well I admit I am not the brightest >in PHP, but I am trying my best and I sure would apreciate your help. > >Thx Guyz. -- Florian Clever [EMAIL PROTECTED] http://www.Clever-Software-Solutions.de/ PGP Key @ ldap://certserver.pgp.net/ The Heineken Uncertainty Principle: You can never be sure how many beers you had last night.
Actually, this is probably has something to do with the way Nuke is allocating memory on a threaded server. Threaded support is fairly new to PHP. If the module does not carefully observe memory allocations, Constants seem to be the first thing to get hosed. "Florian Clever" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This is probably a problem with IIS. > Are you using persistant connections? > > I used to get the same error messages in my PHP/Oracle 8/IIS combination > after PHP scripts terminated using exit() and not having freed all the > Oracle handles and resources. These messages then also appeared on > scripts without coding errors. > > I ended up using Apache on W2K and turning of persistant connections. > > cheers, > Florian > > > > >Von: > > "Chipmaster" <[EMAIL PROTECTED]> > > 07:42 > > > > Betreff: > > Several " Constant already defined " errors. > > An: > > [EMAIL PROTECTED] > > > > > > > >I am trying to run PHP Nuke 5.0 beta 3 on a Windows 2000 Pro Machine with > >IIS 5.0, PHP4 and MySQL Server. Each of the Systems works fine including PHP > >but... When I run http://localhost/ the page loads including the MySQL > >content and I get dozens and dozens of nice little error messages, which > >state that many may constants are already defined on different line numbers > >in the language/lang-english.php file. Well I admit I am not the brightest > >in PHP, but I am trying my best and I sure would apreciate your help. > > > >Thx Guyz. > > -- > > Florian Clever > > [EMAIL PROTECTED] > http://www.Clever-Software-Solutions.de/ > > PGP Key @ ldap://certserver.pgp.net/ > > The Heineken Uncertainty Principle: You can never be sure how many beers > you had last night. > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
>Hi there > was wondering if anyone could tell me what it means when a >web host says that you get something like 10GB bandwidth for >web visitors/hits? That's a very strange way to put things... I think that person who stated that actually need to explain what (s)he meant with that. >How do they calculate the bandwidth? Bandwidth is a measurement of how much information (theoretical) that could be put through a communication channel. It has the dimension <information bits>/<time units>. A communication channel can be something physical, like a copper or fiber cable or a little more abstract physical things like a transmission wave (electromagnetic waves, a.k.a. radio waves). But the bandwidth could also be referring to an abstract communication channel in a physical communication channel. This is done by dividing the physical channel into several subchannels, these subchannels will then have there own bandwidth. But the sum of the subchannels bandwidth can never exceed the total bandwidth of the physical channel. Hence bandwidth is the measurement of how much information you maximal can send through a communication channel of any sort. Just because the bandwidth could be measured to be X with a certain communication channel does NOT mean that you will have a TRANSMISSION rate of X. Normally you will suffer with the transmission rate, because of things like overhead information (like information that belongs to the transmission protocol and error correction performed by the transmission protocol). If you reach a transmission rate of about 90% of the bandwidth, then you should be happy. BUT this is not entirely true: some transmission protocol can compress data, and then you will have a VIRTUAL transmission rate that actually can exceed the bandwidth of the channel!! But the PHYSICAL transmission rate of the compressed data can NEVER exceed the bandwidth of the channel. Well, anyhow we have to relate this to your question too. You question was: 'How can they calculate this?' As you understand from my explanation, they CAN NOT calculate a bandwidth like that, since it violates the definition of what a bandwidth actually are. But they can, on the other hand, calculate a sort of "transmission rate" on the channel. And this might simply be calculated as: <number hits> * <number of bits to perform a hit> / <time> Regards, Anders - which are sorry for this off topic message
Oh, oh, oh =8) I really think they mean a Traffic of 10GB !! Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - _______________________________________________________________ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de _______________________________________________________________ > -----Original Message----- > From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 26, 2001 2:16 PM > To: [EMAIL PROTECTED]; PHPWIN > Subject: RE: [PHP-WIN] Bandwidth for webhosts > > > >Hi there > > was wondering if anyone could tell me what it means when a > >web host says that you get something like 10GB bandwidth for > >web visitors/hits? > > That's a very strange way to put things... I think that > person who stated that actually need to explain what > (s)he meant with that. > > >How do they calculate the bandwidth? > > Bandwidth is a measurement of how much information (theoretical) > that could be put through a communication channel. It has the > dimension <information bits>/<time units>. > > A communication channel can be something physical, like a > copper or fiber cable or a little more abstract physical > things like a transmission wave (electromagnetic waves, > a.k.a. radio waves). > > But the bandwidth could also be referring to an abstract > communication channel in a physical communication channel. > This is done by dividing the physical channel into several > subchannels, these subchannels will then have there own > bandwidth. But the sum of the subchannels bandwidth can > never exceed the total bandwidth of the physical channel. > > Hence bandwidth is the measurement of how much information > you maximal can send through a communication channel of > any sort. Just because the bandwidth could be measured > to be X with a certain communication channel does NOT > mean that you will have a TRANSMISSION rate of X. > > Normally you will suffer with the transmission rate, > because of things like overhead information (like > information that belongs to the transmission protocol > and error correction performed by the transmission > protocol). > > If you reach a transmission rate of about 90% of the > bandwidth, then you should be happy. BUT this is not > entirely true: some transmission protocol can compress > data, and then you will have a VIRTUAL transmission rate > that actually can exceed the bandwidth of the channel!! > But the PHYSICAL transmission rate of the compressed > data can NEVER exceed the bandwidth of the channel. > > Well, anyhow we have to relate this to your question too. > > You question was: 'How can they calculate this?' > > As you understand from my explanation, they CAN NOT > calculate a bandwidth like that, since it violates the > definition of what a bandwidth actually are. But they > can, on the other hand, calculate a sort of "transmission > rate" on the channel. > > And this might simply be calculated as: > > <number hits> * <number of bits to perform a hit> / <time> > > > Regards, > Anders - which are sorry for this off topic message > > -- > 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] >
>From: Michael Rudel >Sent: Thursday, April 26, 2001 2:45 PM >Oh, oh, oh =8) > >I really think they mean a Traffic of 10GB !! Let see. 10Giga Bits... How many Giga Bits Ethernet work does we have, how many ISP does supply with GigaBit communication on a WAN (Wide Area Network) scale? Not too many I guess... Of course they might have 10GB connection to there switch, but then after that... how high is the communication seed then? What speed do they have to their next door domain and/or do they got multiple separate communications lines to the next domain(s) to achieve this speed? I believe one should be very critical to those kind of numbers stated... and still the person who first stated the numbers need to explain what they meant with it... Best regards, Anders - still off topic...
Sorry, but I still mean a TRAFFIC of 10GB/month, not a Bandwidth of 10GB/sec !! [X] This thread is closed. Greetinx, Mike > -----Original Message----- > From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 26, 2001 2:45 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] Bandwidth for webhosts > > > >From: Michael Rudel > >Sent: Thursday, April 26, 2001 2:45 PM > > >Oh, oh, oh =8) > > > >I really think they mean a Traffic of 10GB !! > > Let see. 10Giga Bits... How many Giga Bits Ethernet > work does we have, how many ISP does supply with > GigaBit communication on a WAN (Wide Area Network) > scale? > > Not too many I guess... > > Of course they might have 10GB connection to there > switch, but then after that... how high is the > communication seed then? What speed do they have to > their next door domain and/or do they got multiple > separate communications lines to the next domain(s) > to achieve this speed? > > I believe one should be very critical to those kind > of numbers stated... and still the person who first > stated the numbers need to explain what they meant > with it... > > Best regards, > Anders - still off topic... >
Hello, What they actually mean is the amount of data transfered to your visitors, lets say your index page is 5kb in size, if 1000 people visit just that 1 page, then youve use 5000kb of your bandwidth. im not sure of the conversion rate, maybe someone else on this site knows it, but anyhow, you shouldnt worry, thats plenty of bandwidth for a small to medium site. ~Jeff In a message dated 4/26/2001 8:55:34 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: > >From: Michael Rudel > >Sent: Thursday, April 26, 2001 2:45 PM > > >Oh, oh, oh =8) > > > >I really think they mean a Traffic of 10GB !! > > Let see. 10Giga Bits... How many Giga Bits Ethernet > work does we have, how many ISP does supply with > GigaBit communication on a WAN (Wide Area Network) > scale? > > Not too many I guess... > > Of course they might have 10GB connection to there > switch, but then after that... how high is the > communication seed then? What speed do they have to > their next door domain and/or do they got multiple > separate communications lines to the next domain(s) > to achieve this speed? > > I believe one should be very critical to those kind > of numbers stated... and still the person who first > stated the numbers need to explain what they meant > with it... > > Best regards, > Anders - still off topic... >
I get a strange error when i use php with Apache on NT4 If i run phpinfo() i get this error: "Could not attach to the application win NT error code = 87" This happens only if php.ini is in win nt folder. Else i got no errors, but php doesn't load all the extensions. PHP run as module.
Hi There! I've got the following problem with nearly every downloaded Script, running on my server with Xitami Webserver v2.4d7 PHP Version 4.0.4pl1(win32) and MySql 3.23.36(win32) Everytime I use the scripts errors appeared like the following one: Warning: Undefined variable: cmd in c:/www-root/gbook/gbook.php on line 38 I know how to fix the other errors appearing in the usage of [...] instead of ['...'], but the variable declaration must be anywhere in the scripts, or? I and my server can't find them
Edit your php.ini. Find "error_reporting" and set it to something that will ignore notices. I like mine set as follows: error_reporting= E_ALL & ~(E_NOTICE | E_USER_NOTICE) ; Technically it is better to just have it at E_ALL for better coding and some might argue better security. You don't _have_ to declare all variables, though, and I think most people don't just looking at all of the scripts and full blown applications on the net. -----Original Message----- From: Jochen Becker [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 8:46 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Newbie-questionning: Errors in nearly every Downloaded Script Hi There! I've got the following problem with nearly every downloaded Script, running on my server with Xitami Webserver v2.4d7 PHP Version 4.0.4pl1(win32) and MySql 3.23.36(win32) Everytime I use the scripts errors appeared like the following one: Warning: Undefined variable: cmd in c:/www-root/gbook/gbook.php on line 38 I know how to fix the other errors appearing in the usage of [...] instead of ['...'], but the variable declaration must be anywhere in the scripts, or? I and my server can't find them -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi, just intalled PHP4 on Win2K IIS 5.0, and simple PHP forms are taking *WAY* too long to process, often exceeding the default 30 second timeout. Am I missing something? Doesn't seem like these little forms should be causing so much trouble...
Are you connecting to the server remotely or are you connecting to the local machine ? NN has some issues if you attempt the later. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 26 April 2001 16:20 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Long Execution Time > > > > Hi, just intalled PHP4 on Win2K IIS 5.0, and simple PHP forms > are taking > *WAY* too long to process, often exceeding the default 30 second > timeout. Am I missing something? Doesn't seem like these little forms > should be causing so much trouble... > > -- > 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] > >
akm wrote: > > Hi, just intalled PHP4 on Win2K IIS 5.0, and simple PHP forms are taking > *WAY* too long to process, often exceeding the default 30 second > timeout. Am I missing something? Doesn't seem like these little forms > should be causing so much trouble... My experience is that this behavior is not caused by PHP, but by the combination of the following conditions: - submitting any forms (even pure HTML) - the browser is running on the same machine as the server - the browser is Netscape If this is the case with you, just use Internet Explorer or call the script from another machine Andrian
I would like to know if with php we can manage exchange server (create account...) by using the imap librairies and if yes how we can doing it ? I can connect to my server (pop or imap), i can check mail but it's all. Tahnks and sor for my english.
Hello, I am trying to make a PHP script to index my site and insert into a MySQL DB the .htm files path, its Title (from the HTML tags <Title></Title>), its Description (from the meta tag <meta name="description" content="..."> ) and its Keywords (from the meta tag <meta name="keywords" content="..."> ). Well, I adapted this function to get the Title and it works great!!: /* * Given a raw html document (as string), return its title. * This function may need to be modified if your web pages use automatically * generated titles. */ function getTitle(&$doc) { if (eregi("<title>(.*)</title>", $doc, $titlematch)) $title = trim(eregi_replace("[[:space:]]+", " " , $titlematch[1])); else $title = ""; if ($title == "") $title = "Sem Título"; return $title; } I then tried to do something similar to get the Description: function getDescription(&$doc) { if (eregi('<meta name="description" content="(.*)">', $doc, $descr)) $descricao = trim(eregi_replace("[[:space:]]+", " " , $descr[1])); else $descricao = ""; if ($descricao == "") $descricao = "Sem Descrição"; return $descricao; } This doesn't work as intended... It returns the whole page starting after content=" and doesn't end at the end of the string (">). The funny thing is that if I add a space on the end of the string like this (" >) in both the PHP code and in the HTML file (<meta name="description" conten="test with a space" >), the function returns only the string of the description as intended... The same thing happens with the Keywords: function getKeywords(&$doc) { if (eregi('<meta name="keywords" content="(.*)">', $doc, $mykeys)) $keywords = trim(eregi_replace("[[:space:]]+", " " , $mykeys[1])); else $keywords = ""; if ($keywords == "") $keywords = "Sem Keywords"; return $keywords; } But this time I nedded two (2) spaces to make the function work!!! (<meta name="description" conten="test with 2 spaces" >), If I used one or no space it returned the whole page... with 2 spaces the function works... I concluded that the regex pattern (.*) doesn't stops looking on the "> and needs a space between them (" >). But why the second time it nedded 2 spaces!? I don't want to have to change all the HTM files from my site and add a space to the Descritpion Meta Tag and 2 spaces to the Keywords Meta... Is there a way to say to the (.*) to end the search at the "> ? Thanks for your attention Marco Ascensao
Maybe you should look out for if (eregi('<meta name="description" content="(.*)">', $doc, to: if (eregi("<meta name='description' content='(.*)'>", $doc,...)||eregi("<meta name=\"description\" content=\"(.*)\">", $doc,...)) like the first: if (eregi("<title>(.*)</title>", $doc, $titlematch)) but I don't know, just maybe :) ----- Original Message ----- From: "DHEA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 27, 2001 12:49 AM Subject: [PHP-WIN] [Help:] Problem with regex patterns when getting Title, Description and Keywords from HTML files... > Hello, > > I am trying to make a PHP script to index my site and insert into a > MySQL DB the .htm files path, its Title (from the HTML tags > <Title></Title>), its Description (from the meta tag <meta > name="description" content="..."> ) and its Keywords (from the meta > tag <meta name="keywords" content="..."> ). > > Well, I adapted this function to get the Title and it works great!!: > > /* > * Given a raw html document (as string), return its title. > * This function may need to be modified if your web pages use > automatically > * generated titles. > */ > > function getTitle(&$doc) > { > if (eregi("<title>(.*)</title>", $doc, $titlematch)) > $title = trim(eregi_replace("[[:space:]]+", " " , > $titlematch[1])); > else > $title = ""; > if ($title == "") > $title = "Sem Título"; > return $title; > } > > > I then tried to do something similar to get the Description: > > > function getDescription(&$doc) > { > if (eregi('<meta name="description" content="(.*)">', $doc, > $descr)) > $descricao = trim(eregi_replace("[[:space:]]+", " " , > $descr[1])); > else > $descricao = ""; > if ($descricao == "") > $descricao = "Sem Descrição"; > return $descricao; > } > > This doesn't work as intended... It returns the whole page starting > after content=" and doesn't end at the end of the string (">). > > The funny thing is that if I add a space on the end of the string like > this (" >) in both the PHP code and in the HTML file (<meta > name="description" conten="test with a space" >), the function returns > only the string of the description as intended... > > > The same thing happens with the Keywords: > > function getKeywords(&$doc) > { > if (eregi('<meta name="keywords" content="(.*)">', $doc, > $mykeys)) > $keywords = trim(eregi_replace("[[:space:]]+", " " , > $mykeys[1])); > else > $keywords = ""; > if ($keywords == "") > $keywords = "Sem Keywords"; > return $keywords; > } > > But this time I nedded two (2) spaces to make the function work!!! > (<meta name="description" conten="test with 2 spaces" >), If I used > one or no space it returned the whole page... with 2 spaces the > function works... > > I concluded that the regex pattern (.*) doesn't stops looking on the > "> and needs a space between them (" >). But why the second time it > nedded 2 spaces!? > > I don't want to have to change all the HTM files from my site and add > a space to the Descritpion Meta Tag and 2 spaces to the Keywords > Meta... Is there a way to say to the (.*) to end the search at the "> > ? > > Thanks for your attention > > Marco Ascensao > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Hi, just in case you are desperate: there is an ODBC driver for PosgreSQL under Windows, so perhaps php_odbc.dll would do (?!) Bye F.J.