Re: [PHP] Bug in DOMDocument schemaValidate() function?

2012-05-14 Thread Matijn Woudt
On Mon, May 14, 2012 at 1:39 PM, Voß, Marko marko.v...@fiz-karlsruhe.de wrote:
 Hello,

 I am validating user DOM against schema files using the following piece of 
 code:

 $valid = @$doc-schemaValidate($xsdFile);

 where $doc is of type DOMDocument and $xsdFile is the file location of the 
 XSD file.

 Everything worked fine until the following validation occured:

 A validation of a XML against the SRW/U schema 
 (http://www.loc.gov/standards/sru/sru1-1archive/xml-files/srw-types.xsd)
 failed.

 Here is the XML:

 -
 ?xml version=1.0 encoding=UTF-8?
 srw:explainResponse xmlns:srw=http://www.loc.gov/zing/srw/; 
 xmlns:zr=http://explain.z3950.org/dtd/2.0/;
   srw:version1.1/srw:version
   srw:record
     srw:recordSchemahttp://explain.z3950.org/dtd/2.0//srw:recordSchema
     srw:recordPackingXML/srw:recordPacking
     srw:recordData
       zr:explain
         zr:serverInfo wsdl=http://myserver.com/db; protocol=SRU 
 version=1.1
           hostmyserver.com/host
           port80/port
           databasesru/database
         /zr:serverInfo
         zr:databaseInfo
           title lang=en primary=trueSRU Test Database/title
           description lang=en primary=true My server SRU Test 
 Database/description
         /zr:databaseInfo
         zr:metaInfo
           dateModified27-11-2003/dateModified
         /zr:metaInfo
       /zr:explain
     /srw:recordData
   /srw:record
 /srw:explainResponse
 -

 This XML is valid. However, I keep getting the following libxml error:

 object(LibXMLError)#192 (6) {
     [level]=
     int(2)
     [code]=
     int(1871)
     [column]=
     int(0)
     [message]=
     string(133) Element '{http://www.loc.gov/zing/srw/}record': This element 
 is not expected. Expected is (
 {http://www.loc.gov/zing/srw/}version ).
 
     [file]=
     string(0) 
     [line]=
     int(0)
 }

 I think, the validator is unable to handle the xsd:extension part of the 
 schema:

 xsd:complexType name=explainResponseType
   xsd:complexContent
     xsd:extension base=responseType
       xsd:sequencexsd:element ref=record/
         xsd:element ref=echoedExplainRequest minOccurs=0/
         xsd:element ref=diagnostics minOccurs=0/
         xsd:element ref=extraResponseData minOccurs=0/
       /xsd:sequence
     /xsd:extension
   /xsd:complexContent
 /xsd:complexType

 The version-element exists and is at the right place. If I add another 
 version-element after the first one, it complains
 about expecting a record-element instead, which is correct. But it is not 
 correct to expect another version-element
 after the already existing one.

 Is this a bug? Or did I made a mistake somewhere and I am not able to see it 
 right now?


 Thank you for any help!

 Best regards,
 Marko


If you're 100% sure this XML is valid, then this is a bug. You should
report it at bugs.php.net, but it is most likely this bug is in
libXML, and needs to be fixed there.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in DOMDocument schemaValidate() function?

2012-05-14 Thread Voß , Marko
Hello,

I am sorry, but everything is ok here. I am performing an unmarshalling and 
marshalling unit test for every resource and 
the problem was, that after unmarshalling to the object, the marshalling of the 
object did not create the version 
element. I did not notice this in the first place.

So the validation error occured after the step of testing the marshalling and 
not before testing the unmarshalling.

Thank you anyways!

Best regards,
Marko

Am 14.05.2012 16:43, schrieb Matijn Woudt:
 On Mon, May 14, 2012 at 1:39 PM, Voß, Markomarko.v...@fiz-karlsruhe.de  
 wrote:
 Hello,

 I am validating user DOM against schema files using the following piece of 
 code:

 $valid = @$doc-schemaValidate($xsdFile);

 where $doc is of type DOMDocument and $xsdFile is the file location of the 
 XSD file.

 Everything worked fine until the following validation occured:

 A validation of a XML against the SRW/U schema 
 (http://www.loc.gov/standards/sru/sru1-1archive/xml-files/srw-types.xsd)
 failed.

 Here is the XML:

 -
 ?xml version=1.0 encoding=UTF-8?
 srw:explainResponse xmlns:srw=http://www.loc.gov/zing/srw/; 
 xmlns:zr=http://explain.z3950.org/dtd/2.0/;
srw:version1.1/srw:version
srw:record
  srw:recordSchemahttp://explain.z3950.org/dtd/2.0//srw:recordSchema
  srw:recordPackingXML/srw:recordPacking
  srw:recordData
zr:explain
  zr:serverInfo wsdl=http://myserver.com/db; protocol=SRU 
 version=1.1
hostmyserver.com/host
port80/port
databasesru/database
  /zr:serverInfo
  zr:databaseInfo
title lang=en primary=trueSRU Test Database/title
description lang=en primary=true  My server SRU Test 
 Database/description
  /zr:databaseInfo
  zr:metaInfo
dateModified27-11-2003/dateModified
  /zr:metaInfo
/zr:explain
  /srw:recordData
/srw:record
 /srw:explainResponse
 -

 This XML is valid. However, I keep getting the following libxml error:

 object(LibXMLError)#192 (6) {
  [level]=
  int(2)
  [code]=
  int(1871)
  [column]=
  int(0)
  [message]=
  string(133) Element '{http://www.loc.gov/zing/srw/}record': This 
 element is not expected. Expected is (
 {http://www.loc.gov/zing/srw/}version ).
 
  [file]=
  string(0) 
  [line]=
  int(0)
 }

 I think, the validator is unable to handle the xsd:extension part of the 
 schema:

 xsd:complexType name=explainResponseType
xsd:complexContent
  xsd:extension base=responseType
xsd:sequencexsd:element ref=record/
  xsd:element ref=echoedExplainRequest minOccurs=0/
  xsd:element ref=diagnostics minOccurs=0/
  xsd:element ref=extraResponseData minOccurs=0/
/xsd:sequence
  /xsd:extension
/xsd:complexContent
 /xsd:complexType

 The version-element exists and is at the right place. If I add another 
 version-element after the first one, it complains
 about expecting a record-element instead, which is correct. But it is not 
 correct to expect another version-element
 after the already existing one.

 Is this a bug? Or did I made a mistake somewhere and I am not able to see it 
 right now?


 Thank you for any help!

 Best regards,
 Marko


 If you're 100% sure this XML is valid, then this is a bug. You should
 report it at bugs.php.net, but it is most likely this bug is in
 libXML, and needs to be fixed there.

 - Matijn


---

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische 
Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: [PHP] Bug zlib.output_compression not normal work in IIS7.5

2012-03-28 Thread 小鱼虾
Because php5.4 compression not normal work. So I have to enable IIS7.5 system 
compression.  ok. now please check the www.ongod.org/test/phpinfo.php site. 
just now I have  close IIS compression. PHP5.4 sure can't work with 
zlib.output_compression.
windows php enable by default.
Now I have study try building php5.4 x64 by myself. but I can't building php 
ext. only building success php 5.4.1 main code.Who will tell me how building 
full php5.4.x ? 
-- Original --
From:  Simon Schicksimonsimc...@googlemail.com;
Date:  Wed, Mar 21, 2012 03:21 PM
To:  小鱼虾i...@xiaoyu.org; 
Cc:  php-generalphp-general@lists.php.net; 
Subject:  Re: [PHP] Bug zlib.output_compression not normal work in IIS7.5

 
2012/3/19 小鱼虾 i...@xiaoyu.org

 How I do fix it ?


 https://bugs.php.net/bug.php?id=61434


Hi,

I got a rough overview of the conversation in the bug-tracker ...

You were always talking about a tool you used to test the
gzip-compression ... but why not test it natively?
Using Firefox (with the extension Firebug) or Safari / Chrome for
example you can easily view the respond-header from the server and get
more info out of that.
Just press F12, click on the network-tab, select your request and
search in the response-header for Content-Encoding: ...

I would write my own small php-test-script where you just output some
text. Then you're sure that not other code is doing something strange.

Another possible problem: Is the extension zlib enabled at all? The
documentation says that it's disabled by default ...
http://www.php.net/manual/en/zlib.installation.php

Bye
Simon

Re: [PHP] Bug zlib.output_compression not normal work in IIS7.5

2012-03-21 Thread Simon Schick
2012/3/19 小鱼虾 i...@xiaoyu.org

 How I do fix it ?


 https://bugs.php.net/bug.php?id=61434


Hi,

I got a rough overview of the conversation in the bug-tracker ...

You were always talking about a tool you used to test the
gzip-compression ... but why not test it natively?
Using Firefox (with the extension Firebug) or Safari / Chrome for
example you can easily view the respond-header from the server and get
more info out of that.
Just press F12, click on the network-tab, select your request and
search in the response-header for Content-Encoding: ...

I would write my own small php-test-script where you just output some
text. Then you're sure that not other code is doing something strange.

Another possible problem: Is the extension zlib enabled at all? The
documentation says that it's disabled by default ...
http://www.php.net/manual/en/zlib.installation.php

Bye
Simon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug 51860

2012-01-18 Thread Matijn Woudt
On Wed, Jan 18, 2012 at 1:06 AM, Christian Grobmeier
grobme...@gmail.com wrote:
 Hello folks,

 any chance this one is ever fixed?
 https://bugs.php.net/bug.php?id=51860

 I am a customer of 11. They told me they will not upgrade until this
 one is fixed. Imagine that there are thousands of customers running
 php 5.2.17 just because of this issue. Unfortunately I am not able to
 fix this on myself - my C-fu is not good enough.

 Because big hosters like 11 do not upgrade, we (the Apache log4php
 team) cannot make use of newer PHP versions too. We have decided to
 use the features once we see the old hosters move on. Same is true for
 other projects of mine. If we would upgrade we loose all the people on
 the big hosting companies.

 I think it is in the interest of the PHP-dev team to see people moving
 on. Otherwise at someday software like phpBB, wordpress et al will not
 work on many hosts at some day in future.

 Not sure if there has been any plans on this issue - i am very much
 interested in this and would like know if it is already on the
 schedule.

 Thanks,
 Christian

This list is for users having problems with PHP scripts etc. If you
want to contact the devs, you're on the wrong mailing list (there's a
special one for it)

Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug?

2011-09-18 Thread Robert Stone





De: Igor Escobar titiolin...@gmail.com
Para: php-general@lists.php.net php-general@lists.php.net
Enviadas: Sexta-feira, 16 de Setembro de 2011 7:07
Assunto: [PHP] Bug?

Anyone can explain this?

https://gist.github.com/1220404

Part of the code are in portuguese so...
iguais = equal
diferentes = different

Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar


The person who posted this (andersonfraga) has set up four string comparison 
tests.

It was commented by augustohp who said:-


float_a.php
Existe uma configuração no php.ini da precisão de números de ponto flutuante. 
Acima desse número, todos são arredondados.

There is a configuration setting in php.ini that determines the precision of 
floating point numbers. A number greater than that setting causes rounding.

float_b.php
Com a bcmath você não está comparando tipos especializados 
de dados, mas sim dados binários. É mais demorado, mas é extremamente 
preciso, sempre.

With bcmath you are doing a binary comparison. It is slower but precise, always.

string_a.php
Quando você usa == você não compara os tipos, e não força o 
interpretador a respeitar o tipo de dado fornecido. O que acontece 
então!? O PHP converte o tipo para o tipo de dado mais apropriado em uma 
condição: boolean, inteiro, etc ...
Se você converter para inteiro, vai ver que os números são iguais.

When you use the == operator you don't compare data types and don't force the 
interpreter to respect the data type supplied. What happens then? PHP converts 
the type to the most appropriate data type and returns a boolean. (I assume he 
means casting. I always thought that you had to cast the variables implicitly 
in order to use ==.)
I think he is saying in the next sentence that if you cast them to integers, 
you'll see that the numbers are equal. Doesn't make any sense to me, but 
then, I'm no expert.

string_b.php
Aqui sim você compara strings, garante que elas não sofram cast para outro tipo 
de dado. Você pode atingir isso usando === também, sem essa função de 
comparação de strings.

Here you compare strings, and guarantee that they don't suffer casting to 
another data type. You can achieve the same thing by using the === operator 
also, without (using) this string comparison function.


Hope this helps.

Cheers,
Robert

Re: [PHP] Bug?

2011-09-15 Thread Daniel Brown
On Thu, Sep 15, 2011 at 17:07, Igor Escobar titiolin...@gmail.com wrote:
 Anyone can explain this?

 https://gist.github.com/1220404

 Part of the code are in portuguese so...
 iguais = equal
 diferentes = different

About this part are you confused?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug?

2011-09-15 Thread Igor Escobar
I'm confused about the output of the code... very disturbed. But
@*augustohphttps://gist.github.com/augustohp
*  already respond the question on the gist thread (in portuguese) and
explained why those results.


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar





On Thu, Sep 15, 2011 at 6:17 PM, Daniel Brown danbr...@php.net wrote:

 On Thu, Sep 15, 2011 at 17:07, Igor Escobar titiolin...@gmail.com wrote:
  Anyone can explain this?
 
  https://gist.github.com/1220404
 
  Part of the code are in portuguese so...
  iguais = equal
  diferentes = different

 About this part are you confused?

 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/



Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote:

 Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie:
 On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote:
 Hi,
 I have opend Bug #51739 in 2010. It was closed as bogus before my last
 question was answered. It would be fine to know what you think about
 that bug.
 In short:
 var_dump((float)8315e839da08e2a7afe6dd12ec58245d);
 results in float(INF)
 This is because 8315 is treated as base and
 e839da08e2a7afe6dd12ec58245d is treated as an exponent. My hint that
 e839da08e2a7afe6dd12ec58245d is not a valid exponent was not answered.
 What do you think about?
 cheers
 Daniel
 
 The cast to float is truncating the invalid characters and since your
 string contains a float that is INF (8315e839) before the truncation at
 the d, then it returns INF.  Makes perfect sense.
 
 This is what drives me crazy.
 
 If I use a string in PHP I don't want PHP to cut this string. Either it uses 
 this string as it is or it gives me an error/warning/false (what ever...). 
 But 
 silently(!!!) using a small piece of a string is not understandable.
 
 cheers
 Daniel

The manual clearly states this is how a string is converted into a number: 
http://php.net/manual/en/language.types.string.php#language.types.string.conversion

The value is given by the initial portion of the string. If the string starts 
with valid numeric data, this will be the value used. Otherwise, the value will 
be 0 (zero). Valid numeric data is an optional sign, followed by one or more 
digits (optionally containing a decimal point), followed by an optional 
exponent. The exponent is an 'e' or 'E' followed by one or more digits.

If you don't want the string turned into a number using the documented method, 
don't use it as one.
---
Simon Welsh
Admin of http://simon.geek.nz/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread magic-php
Simon J Welsh writes: 

On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote: 


Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie:

On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote:

var_dump((float)8315e839da08e2a7afe6dd12ec58245d);
results in float(INF)


The cast to float is truncating the invalid characters and since your
string contains a float that is INF (8315e839) before the truncation at
the d, then it returns INF.  Makes perfect sense.


If I use a string in PHP I don't want PHP to cut this string. Either it uses 
this string as it is or it gives me an error/warning/false (what ever...). But 
silently(!!!) using a small piece of a string is not understandable.


The manual clearly states this is how a string is converted into a number: http://php.net/manual/en/language.types.string.php#language.types.string.conversion 

The value is given by the initial portion of the string. If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero). Valid numeric data is an optional sign, followed by one or more digits (optionally containing a decimal point), followed by an optional exponent. The exponent is an 'e' or 'E' followed by one or more digits. 


If you don't want the string turned into a number using the documented method, 
don't use it as one.


Ok, then let's discuss the documented behavior ;-) 

Do you (not the document) really like this behavior? I mean if I am the 
only one wondering about that behavior it is ok for me. I just want to help 
PHP. 


cheers
Daniel

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Florian Lemaitre

Le 01/09/2011 10:43, magic-...@damage.devloop.de a écrit :

Simon J Welsh writes:

On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote:

Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie:

On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote:

var_dump((float)8315e839da08e2a7afe6dd12ec58245d);
results in float(INF)


The cast to float is truncating the invalid characters and since your
string contains a float that is INF (8315e839) before the 
truncation at

the d, then it returns INF.  Makes perfect sense.


If I use a string in PHP I don't want PHP to cut this string. Either 
it uses this string as it is or it gives me an error/warning/false 
(what ever...). But silently(!!!) using a small piece of a string is 
not understandable.


The manual clearly states this is how a string is converted into a 
number: 
http://php.net/manual/en/language.types.string.php#language.types.string.conversion 

The value is given by the initial portion of the string. If the 
string starts with valid numeric data, this will be the value used. 
Otherwise, the value will be 0 (zero). Valid numeric data is an 
optional sign, followed by one or more digits (optionally containing 
a decimal point), followed by an optional exponent. The exponent is 
an 'e' or 'E' followed by one or more digits.
If you don't want the string turned into a number using the 
documented method, don't use it as one.


Ok, then let's discuss the documented behavior ;-)
Do you (not the document) really like this behavior? I mean if I am 
the only one wondering about that behavior it is ok for me. I just 
want to help PHP.

cheers
Daniel


No professional programmer would like this kind of behavior.
But PHP want to be accessible for newbies so we have to deal with that.
Hope this will be fixed in the next generation...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
On 1/09/2011, at 8:43 PM, magic-...@damage.devloop.de wrote:

 Simon J Welsh writes: 
 On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote: 
 Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie:
 On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote:
 var_dump((float)8315e839da08e2a7afe6dd12ec58245d);
 results in float(INF)
 The cast to float is truncating the invalid characters and since your
 string contains a float that is INF (8315e839) before the truncation at
 the d, then it returns INF.  Makes perfect sense.
 If I use a string in PHP I don't want PHP to cut this string. Either it 
 uses this string as it is or it gives me an error/warning/false (what 
 ever...). But silently(!!!) using a small piece of a string is not 
 understandable.
 The manual clearly states this is how a string is converted into a number: 
 http://php.net/manual/en/language.types.string.php#language.types.string.conversion
  The value is given by the initial portion of the string. If the string 
 starts with valid numeric data, this will be the value used. Otherwise, the 
 value will be 0 (zero). Valid numeric data is an optional sign, followed by 
 one or more digits (optionally containing a decimal point), followed by an 
 optional exponent. The exponent is an 'e' or 'E' followed by one or more 
 digits. If you don't want the string turned into a number using the 
 documented method, don't use it as one.
 
 Ok, then let's discuss the documented behavior ;-) 
 Do you (not the document) really like this behavior? I mean if I am the only 
 one wondering about that behavior it is ok for me. I just want to help PHP. 
 cheers
 Daniel

Yes, I think the way it works is correct.

It follows similar conversions when changing from a data type that allows more 
data to one that allows less. Similar things happen when converting from a 
floating point to integral value.

It also directly correlates to the C functions for doing the same thing (atof, 
strtod, the like).
---
Simon Welsh
Admin of http://simon.geek.nz/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in mkdir?

2010-06-10 Thread Ashley Sheridan
On Thu, 2010-06-10 at 11:32 -0700, Mike Wright wrote:

 Hi all,
 
 Using 5.2.9
 
 I'm trying to create a directory but it is being created with incorrect 
 permissions.  I'm following the online manual.
 
 This is the command being used:
 
  mkdir('/srv/www/domain/data/R1276190214358/thumbs', 0770, true);
 
 This is what is created:
 
  drwxr-x--- 2 apache apache 4096 2010-06-10 10:33 R1276190214358
 
 Isn't that supposed to be 0770 instead of 0750?  Either the manual is 
 wrong, the command is broken, or I'm screwing it up (most likely).
 
 Thanks for any help,
 Mike Wright
 

Did the R1276190214358 directory already exist? If so, it will retain
the permissions it had, and only the thumbs sub-directory within it will
have the new permissions.

Also, is this on a shared hosting server? It could be that a security
restriction in-place is not allowing the permissions to be configured as
the directory is written, and you may have to manually update them with
the chmod() function.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] bug in mkdir? [SOLVED]

2010-06-10 Thread Mike Wright

Ashley Sheridan wrote:

On Thu, 2010-06-10 at 11:32 -0700, Mike Wright wrote:


Hi all,

Using 5.2.9

I'm trying to create a directory but it is being created with incorrect 
permissions.  I'm following the online manual.


This is the command being used:

 mkdir('/srv/www/domain/data/R1276190214358/thumbs', 0770, true);

This is what is created:

 drwxr-x--- 2 apache apache 4096 2010-06-10 10:33 R1276190214358

Isn't that supposed to be 0770 instead of 0750?  Either the manual is 
wrong, the command is broken, or I'm screwing it up (most likely).


Thanks for any help,
Mike Wright





Hi, Ash.  Thanks for the help.


Did the R1276190214358 directory already exist?


No.

 If so, it will retain

the permissions it had, and only the thumbs sub-directory within it will
have the new permissions.

Also, is this on a shared hosting server? It could be that a security
restriction in-place is not allowing the permissions to be configured as
the directory is written, and you may have to manually update them with
the chmod() function.


It's under my control.

Solution: run umask(000) first.  (of the 3 choices above it turned out 
to be #3 ;(



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug tracking system

2010-03-29 Thread Anshul Agrawal
There is something new based on Trac but written in PHP.

mtrack (http://bitbucket.org/wez/mtrack/wiki/Home)

It is written by one of the PHP Core Developers (Wez Furlong). May be you
want to try it out.

Best,
Anshul


On Sun, Mar 28, 2010 at 10:36 PM, Nathan Rixham nrix...@gmail.com wrote:

 shiplu wrote:
  I want to add with Andre.
  I am looking for a free hosted bug tracking solution. I can not afford
  to host it in my web server.
  So is there any free one??
  It should not be public. Only me and my clients will be able to see it.
 
  Thanks
 

 yes, for all cases, commercial or not; self hosted or remote; indefero
 [1] is a fantastic quick to use solution:

 [1] http://www.indefero.net/

 Many Regards,

 Nathan

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] bug tracking system

2010-03-29 Thread Jan G.B.
2010/3/29 Anshul Agrawal drinknder...@gmail.com

 There is something new based on Trac but written in PHP.

 mtrack (http://bitbucket.org/wez/mtrack/wiki/Home)

 It is written by one of the PHP Core Developers (Wez Furlong). May be you
 want to try it out.

 And there's something quite new that's aimed to be like trac : JotBug
http://code.google.com/p/jotbug/


Regards


Re: [PHP] bug tracking system

2010-03-29 Thread Anshul Agrawal
On Mon, Mar 29, 2010 at 5:30 PM, Jan G.B. ro0ot.w...@googlemail.com wrote:


 2010/3/29 Anshul Agrawal drinknder...@gmail.com

 There is something new based on Trac but written in PHP.

 mtrack (http://bitbucket.org/wez/mtrack/wiki/Home)

 It is written by one of the PHP Core Developers (Wez Furlong). May be you
 want to try it out.

 And there's something quite new that's aimed to be like trac : JotBug
 http://code.google.com/p/jotbug/


 Regards


I kept wondering for long time why PHP community doesn't have something at
least as cool as Trac. Times are changing :)

-- 
Anshul


Re: [PHP] bug tracking system

2010-03-28 Thread Ashley Sheridan
On Sun, 2010-03-28 at 16:28 +0300, Andre Polykanine wrote:

 Hello everyone,
 
 Can you recommend a bug tracking system to be installed on the site?
 Requirements: written in PHP (or maybe Perl); tickets system; e-mail
 notifications.
 -- 
 With best regards from Ukraine,
 Andre
 Http://oire.org/ - The Fantasy blogs of Oire
 Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
 jabber.org
 Yahoo! messenger: andre.polykanine; ICQ: 191749952
 Twitter: http://twitter.com/m_elensule
 
 


I think your best option is Mantis. It's written in PHP, does all that
you've asked, and it's pretty easy to use really.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] bug tracking system

2010-03-28 Thread Nilesh Govindarajan

On 03/28/2010 06:58 PM, Andre Polykanine wrote:

Hello everyone,

Can you recommend a bug tracking system to be installed on the site?
Requirements: written in PHP (or maybe Perl); tickets system; e-mail
notifications.


http://www.google.co.in/search?aq=0oq=php+bugsourceid=chromeie=UTF-8q=php+bug+tracker

--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug tracking system

2010-03-28 Thread Nathan Rixham
Ashley Sheridan wrote:
 On Sun, 2010-03-28 at 16:28 +0300, Andre Polykanine wrote:

 Can you recommend a bug tracking system to be installed on the site?
 Requirements: written in PHP (or maybe Perl); tickets system; e-mail
 notifications.
 
 
 I think your best option is Mantis. It's written in PHP, does all that
 you've asked, and it's pretty easy to use really.
 

agreed, unless IDE integration and familiarity is the name of the game,
in which case the usual suspects of trac, jira and bugzilla are worth
considering.

regards!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug tracking system

2010-03-28 Thread ebhakt
Use drupal with the bug tracking system
http://drupal.org/project/project_issue

On Sun, Mar 28, 2010 at 6:58 PM, Andre Polykanine an...@oire.org wrote:

 Hello everyone,

 Can you recommend a bug tracking system to be installed on the site?
 Requirements: written in PHP (or maybe Perl); tickets system; e-mail
 notifications.
 --
 With best regards from Ukraine,
 Andre
 Http://oire.org/ - The Fantasy blogs of Oire
 Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @
 jabber.org
 Yahoo! messenger: andre.polykanine; ICQ: 191749952
 Twitter: http://twitter.com/m_elensule


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Bhaskar Tiwari
GTSE Generalist
Directory Services
Microsoft


All we have to decide is what to do with the time that has been given to us


http://www.ebhakt.com/
http://fytclub.net/
http://ebhakt.info/


Re: [PHP] bug tracking system

2010-03-28 Thread Nilesh Govindarajan

On 03/28/2010 07:25 PM, ebhakt wrote:

Use drupal with the bug tracking system
http://drupal.org/project/project_issue
http://drupal.org/project/project_issue

On Sun, Mar 28, 2010 at 7:22 PM, Nilesh Govindarajan li...@itech7.com
mailto:li...@itech7.com wrote:

On 03/28/2010 06:58 PM, Andre Polykanine wrote:

Hello everyone,

Can you recommend a bug tracking system to be installed on the site?
Requirements: written in PHP (or maybe Perl); tickets system; e-mail
notifications.



http://www.google.co.in/search?aq=0oq=php+bugsourceid=chromeie=UTF-8q=php+bug+tracker

http://www.google.co.in/search?aq=0oq=php+bugsourceid=chromeie=UTF-8q=php+bug+tracker

--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com http://www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Bhaskar Tiwari
GTSE Generalist
Directory Services
Microsoft


All we have to decide is what to do with the time that has been given to us


http://www.ebhakt.com/
http://fytclub.net/
http://ebhakt.info/




Hey, I wasn't the one who put up the question.

--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug tracking system

2010-03-28 Thread shiplu
I want to add with Andre.
I am looking for a free hosted bug tracking solution. I can not afford
to host it in my web server.
So is there any free one??
It should not be public. Only me and my clients will be able to see it.

Thanks

-- 
Shiplu Mokaddim
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug tracking system

2010-03-28 Thread Nathan Rixham
shiplu wrote:
 I want to add with Andre.
 I am looking for a free hosted bug tracking solution. I can not afford
 to host it in my web server.
 So is there any free one??
 It should not be public. Only me and my clients will be able to see it.
 
 Thanks
 

yes, for all cases, commercial or not; self hosted or remote; indefero
[1] is a fantastic quick to use solution:

[1] http://www.indefero.net/

Many Regards,

Nathan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug or expected, mbstring.func_overload not changeable by .htaccess 5.2.8/5.2.9

2009-04-23 Thread Thodoris



Hello,


Besides the .htaccess which might be an apache configuration problem if
you use ini_set(mbstring.func_overload,2) in a script of this
directory does it work?

no, also the ini_set does not work for this Directive.


Sorry for the late reply.

The ini_set is meant to be used inside a php script not in an .htaccess 
file.

So perhaps you could test this in a script specific manner.





In addition to this heck your apache configuration to see if you allow
.htaccess to be parsed.


apache and .htaccess are ok
i added a scond line which changes mbstring.encoding_translation from 
off to on without problems:


Directive Local Value Master Value
mbstring.encoding_translation On Off
mbstring.func_overload 0 0

.htaccess:

php_value mbstring.func_overload 2
php_flag mbstring.encoding_translation On


IMHO this is not a good practice using .htaccess to alter php's behavior.
Perhaps you should consider ini_set after all.



Can you confirm or rebut this behavior?
Should we go to internals list?
Thanks,
Andre


Unfortunately I can confirm that.

This is a list with all the initial values you are allowed to change:

http://www.php.net/manual/en/ini.list.php

This is a script that shows all the mbstring extension values in an array:

?php
print pre;
print_r(ini_get_all('mbstring'));
?

This array contains the default,local values and access level for each one.

Note that according to the manual:

http://www.php.net/ini_get_all

The access levels for every value are:|

Constant   Value  Meaning
PHP_INI_USER  1  Entry can be set in user scripts
PHP_INI_PERDIR2  Entry can be set in php.ini, .htaccess or 
httpd.conf 
PHP_INI_SYSTEM4  Entry can be set in php.ini or httpd.conf 
PHP_INI_ALL   7  Entry can be set anywhere




|Although in the ini list the mbstring is supposed to have access level 
2 I've noticed that I have access level 4 for mbstring.func_overload.
Perhaps *this is the problem*. You have access level 4 so that is why 
you can't change the value using .htaccess.


I don't know if this is an expected behavior though. Can anyone else 
confirm this??


--
Thodoris



Re: [PHP] bug or expected, mbstring.func_overload not changeable by .htaccess 5.2.8/5.2.9

2009-04-23 Thread Andre Hübner

Hello,

Sorry for the late reply.

no problem.
The ini_set is meant to be used inside a php script not in an .htaccess 
file.

So perhaps you could test this in a script specific manner.

i know;) i do php/apache for some years...

i found out the problem in meanwhile.
http://bugs.php.net/bug.php?id=47187edit=1
Its not allowed anymore, just not documented.
formerly bug was fixed by deactivating ;) thats a pitty cause the patch for 
3rd party patch for ~5.2.6 for mentioned bug worked really good. :(


Thanks,
Andre 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug or expected, mbstring.func_overload not changeable by .htaccess 5.2.8/5.2.9

2009-04-16 Thread Andre Hübner

Hello,


Besides the .htaccess which might be an apache configuration problem if
you use ini_set(mbstring.func_overload,2) in a script of this
directory does it work?

no, also the ini_set does not work for this Directive.


In addition to this heck your apache configuration to see if you allow
.htaccess to be parsed.


apache and .htaccess are ok
i added a scond line which changes mbstring.encoding_translation from off to 
on without problems:


Directive Local Value Master Value
mbstring.encoding_translation On Off
mbstring.func_overload 0 0

.htaccess:

php_value mbstring.func_overload 2
php_flag mbstring.encoding_translation On

Can you confirm or rebut this behavior?
Should we go to internals list?
Thanks,
Andre 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug or expected, mbstring.func_overload not changeable by .htaccess 5.2.8/5.2.9

2009-04-15 Thread Thodoris



Hello,

following in my .htaccess works with php 5.2.6 (mod_php)

php_value mbstring.func_overload 2

Seems that since (5.2.7?) 5.2.8/5.2.9 this value is not any more 
accepted by php in .htaccess.
mbstring.func_overload should be changeable by PHP_INI_PERDIR which 
includes .htaccess
Other values are changeable by .htaccess so it should not be a general 
problem on my side.

Please someone could check this?

Thanks,
Andre




Besides the .htaccess which might be an apache configuration problem if 
you use ini_set(mbstring.func_overload,2) in a script of this 
directory does it work?


In addition to this heck your apache configuration to see if you allow 
.htaccess to be parsed.


--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php bug from 2003 still alive?! - UTF8 BOM

2009-03-30 Thread Merlin Morgenstern

Hello everybody,

has anybody an idea on how to fix this? Is it really necessary to 
recomplile for utf-8 BOM support?


Regards, Merlin

Merlin Morgenstern wrote:

Hello,

I am experiencing problems with utf-8 and php. There seems to be a 
problem with BOM.


Some postings say that I have to compile php with 
--enable-zend-multibyte. HOwever those postings are very old (2003!).

http://bugs.php.net/bug.php?id=22108

Is this still necessary with the newest php build? If yes, do you 
believe I will run into trouble on sites that are saved in ansi?


Thank you for any hint.

Merlin


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in array_key_exist?

2008-08-30 Thread Jochem Maas

Korgan schreef:

Korgan napsal(a):

Jim Lucas napsal(a):

Korgan wrote:

Hi,
I have a problem with array_key_exists in if statement.

I have a class with this function

class XXX {
private items = array();
...
...
...

public function addXXX($id, $count)
{
   $count = (int)$cout;


 Let me point at it 

Check your spelling

If error_reporting was set to E_ALL AND display_errors were turned 
on, you would see that you are using an undefined variable in your 
method called $cout, casting is as an int and assigning the resulting 
value (which would always be zero) to $count.


Sorry i didnt see it :). In the script is $count = (int)$count;



no point in anyone trying to help you then, because you don't post the code
you use, you post something else instead ... this is not [EMAIL PROTECTED]

btw there is practically no chance of a bug being in array_key_exists() and
you being the first to spot it, as a function it's used way too much to be
able to fly under the bug radar. jmho.



After add a item value is ok look at first B vardump which is on the end 
of the script.




No variable $count is mandatory so that is defined.
But its not main idea of my question...
Function add items correctly, but if go to next page, values in array 
change. Values are changed passing from one page to another one, why 
and where?



if (!array_key_exists($id, $this-items))
   $this-items[$id] = $count;
else
   $this-items[$id] += $count;
}

...
...

}

And I want to send instance of this class with SESSION.
If I add a item to the array, count is ok, but if i go to the next 
page count will change.



There is the code of index.php

 /** its loading classes ***/
 spl_autoload_register('loadClass');

 session_start();
 var_dump($_SESSION['XX']); /** A **/

 
 ...
 ...
 ...
 if ($_SESSION['XX'] instanceof XXX)
$x = $_SESSION['XX'];
  else
new...
  ..
  ..
  /** Do onzl this **/
  if 
$x-addXXX($id, $cnt);


  
  ...
  ...
  $_SESSION['XX'] = X;
  var_dump($_SESSION['XX']); /** B **/


There is a vardump if action addXXX exec:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(0) { } }

   B:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(1) } }


And than i will go to some page and vardums are:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } } 1 : 4


   B:
 object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } }


I am thinking that do both codes in if statement,
but $this-items[$id] += $count; exec after send page.



I am using PHP Version 5.2.6 and Smarty v.2.6.19

Thanks for help :)









--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in array_key_exist?

2008-08-27 Thread Korgan

Korgan napsal(a):

Jim Lucas napsal(a):

Korgan wrote:

Hi,
I have a problem with array_key_exists in if statement.

I have a class with this function

class XXX {
private items = array();
...
...
...

public function addXXX($id, $count)
{
   $count = (int)$cout;


 Let me point at it 

Check your spelling

If error_reporting was set to E_ALL AND display_errors were turned on, 
you would see that you are using an undefined variable in your method 
called $cout, casting is as an int and assigning the resulting value 
(which would always be zero) to $count.


Sorry i didnt see it :). In the script is $count = (int)$count;

After add a item value is ok look at first B vardump which is on the end 
of the script.




No variable $count is mandatory so that is defined.
But its not main idea of my question...
Function add items correctly, but if go to next page, values in array 
change. Values are changed passing from one page to another one, why and 
where?



if (!array_key_exists($id, $this-items))
   $this-items[$id] = $count;
else
   $this-items[$id] += $count;
}

...
...

}

And I want to send instance of this class with SESSION.
If I add a item to the array, count is ok, but if i go to the next 
page count will change.



There is the code of index.php

 /** its loading classes ***/
 spl_autoload_register('loadClass');

 session_start();
 var_dump($_SESSION['XX']); /** A **/

 
 ...
 ...
 ...
 if ($_SESSION['XX'] instanceof XXX)
$x = $_SESSION['XX'];
  else
new...
  ..
  ..
  /** Do onzl this **/
  if 
$x-addXXX($id, $cnt);


  
  ...
  ...
  $_SESSION['XX'] = X;
  var_dump($_SESSION['XX']); /** B **/


There is a vardump if action addXXX exec:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(0) { } }

   B:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(1) } }


And than i will go to some page and vardums are:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } } 1 : 4


   B:
 object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } }


I am thinking that do both codes in if statement,
but $this-items[$id] += $count; exec after send page.



I am using PHP Version 5.2.6 and Smarty v.2.6.19

Thanks for help :)






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in array_key_exist?

2008-08-26 Thread Jim Lucas

Korgan wrote:

Hi,
I have a problem with array_key_exists in if statement.

I have a class with this function

class XXX {
private items = array();
...
...
...

public function addXXX($id, $count)
{
   $count = (int)$cout;


 Let me point at it 

Check your spelling

If error_reporting was set to E_ALL AND display_errors were turned on, you would see that you are 
using an undefined variable in your method called $cout, casting is as an int and assigning the 
resulting value (which would always be zero) to $count.



if (!array_key_exists($id, $this-items))
   $this-items[$id] = $count;
else
   $this-items[$id] += $count;
}

...
...

}

And I want to send instance of this class with SESSION.
If I add a item to the array, count is ok, but if i go to the next page 
count will change.



There is the code of index.php

 /** its loading classes ***/
 spl_autoload_register('loadClass');

 session_start();
 var_dump($_SESSION['XX']); /** A **/

 
 ...
 ...
 ...
 if ($_SESSION['XX'] instanceof XXX)
$x = $_SESSION['XX'];
  else
new...
  ..
  ..
  /** Do onzl this **/
  if 
$x-addXXX($id, $cnt);


  
  ...
  ...
  $_SESSION['XX'] = X;
  var_dump($_SESSION['XX']); /** B **/


There is a vardump if action addXXX exec:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(0) { } }

   B:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  int(1) } }

And than i will go to some page and vardums are:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  int(4) 
} } 1 : 4


   B:
 object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  int(4) 
} }


I am thinking that do both codes in if statement,
but $this-items[$id] += $count; exec after send page.



I am using PHP Version 5.2.6 and Smarty v.2.6.19

Thanks for help :)





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in array_key_exist?

2008-08-26 Thread Korgan

Jim Lucas napsal(a):

Korgan wrote:

Hi,
I have a problem with array_key_exists in if statement.

I have a class with this function

class XXX {
private items = array();
...
...
...

public function addXXX($id, $count)
{
   $count = (int)$cout;


 Let me point at it 

Check your spelling

If error_reporting was set to E_ALL AND display_errors were turned on, 
you would see that you are using an undefined variable in your method 
called $cout, casting is as an int and assigning the resulting value 
(which would always be zero) to $count.


No variable $count is mandatory so that is defined.
But its not main idea of my question...
Function add items correctly, but if go to next page, values in array 
change. Values are changed passing from one page to another one, why and 
where?



if (!array_key_exists($id, $this-items))
   $this-items[$id] = $count;
else
   $this-items[$id] += $count;
}

...
...

}

And I want to send instance of this class with SESSION.
If I add a item to the array, count is ok, but if i go to the next 
page count will change.



There is the code of index.php

 /** its loading classes ***/
 spl_autoload_register('loadClass');

 session_start();
 var_dump($_SESSION['XX']); /** A **/

 
 ...
 ...
 ...
 if ($_SESSION['XX'] instanceof XXX)
$x = $_SESSION['XX'];
  else
new...
  ..
  ..
  /** Do onzl this **/
  if 
$x-addXXX($id, $cnt);


  
  ...
  ...
  $_SESSION['XX'] = X;
  var_dump($_SESSION['XX']); /** B **/


There is a vardump if action addXXX exec:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(0) { } }

   B:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(1) } }


And than i will go to some page and vardums are:
   A:
object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } } 1 : 4


   B:
 object(Kosik)#1 (1) { [zbozi:private]=  array(1) { [1]=  
int(4) } }


I am thinking that do both codes in if statement,
but $this-items[$id] += $count; exec after send page.



I am using PHP Version 5.2.6 and Smarty v.2.6.19

Thanks for help :)






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in SimpleXML?

2008-06-02 Thread Nathan Nobbe
On Mon, Jun 2, 2008 at 3:12 PM, Kyle Browning [EMAIL PROTECTED] wrote:

 I was working on a project for XML Parsing. I came across instances where
 my
 elements were completely missing.

 After further Digging into the issue, I found out, that when placing tags
 inside of an element with text, SimpleXML (and dom Document) ignore the
 added tags, and the text within.


thats a known limitation. i have written a workaround in some code for a
personal project, but it cant be great for performance.  anyway, another
option is to use DOM.


 ---output-
 SimpleXMLElement Object
 (
[Article] = SimpleXMLElement Object
(
[Title] = Is Your Face on Facebook?
[Subtitle] = Employ simple strategies to market your ?profile?
 using online social networking.
[Body] = Temp Testing Example of SimpleXML Bug.
[Folio] = Trying to just show Examples
)

 )


are you using print_r() or var_dump() to generate this output?  fyi, those
are explicitly not supported by simplexml.

-nathan


Re: [PHP] Bug in SimpleXML?

2008-06-02 Thread Nathan Nobbe
On Mon, Jun 2, 2008 at 4:32 PM, Kyle Browning [EMAIL PROTECTED] wrote:

 I used both print_r and var_dump.
 Whats supported for ultimate nesting prints of values and keys?, or in
 objects words, properties and values.


cc'ng the list again..

well var_dump() and print_r() just arent supported for simplexml, per the
manual,

http://php.oregonstate.edu/manual/en/function.simplexml-element-attributes.php

*Note*: SimpleXML has made a rule of adding iterative properties to most
methods. They cannot be viewed using
var_dump()http://php.oregonstate.edu/manual/en/function.var-dump.phpor
anything else which can examine objects.

basically, youre best bet w/ simplexml is asXML() ;)

-nathan


Re: [PHP] Bug with passing objects by reference and assigning a defeault null?

2007-04-06 Thread Robert Cummings
On Fri, 2007-04-06 at 12:19 -0400, Shu Chow wrote:
 Has anyone tried to assign a default value of null for an object passed 
 by reference in PHP4?
 
 Let's say I had this code:
 
$mObj = new testModel();
$mObj-msg = Bubba;
 
testFunc();
 
class testModel {
  var $msg;
}
 
function testFunc($msg=null) {
  echo $msg-msg;
}
 
 Under PHP5, this works fine.
 
 Under PHP4, the = will cause an error:  Parse error: syntax error, 
 unexpected '=', expecting ')'.  Removing the  in the parameter 
 definition makes it work.  I'm using 4.4.2 right now, but don't see 
 anything in the later change logs that say this was fixed.  I also don't 
 find any mention of it in the bugs list.  Is this a legit bug or am I 
 committing a big no-no?

Not a bug, it's a limitation of PHP4.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug? (_ENV in PHP v5.2.0)

2007-01-16 Thread Frank M. Kromann
Hi Eli,

Check variable_order in php.ini
(http://us2.php.net/manual/en/ini.core.php#ini.variables-order) if the E is
missing you will not get any environment variables.

- Frank

 Hi,
 
 System:
   Win32
   PHP 5.2.0
   Apache 2.0.54 (PHP in CGI mode)
 
 CGI vars are not automatically loaded into $_ENV global array. Only when

 calling getenv('var'), just then the variable appears in $_ENV.
 Besides, it seems that the env vars are loaded automatically into 
 $_SERVER. And $HTTP_ENV_VARS is always NULL.
 
 
 ?php
 echo before getenv...;
 echo br\$_ENV: ; var_dump($_ENV);
 echo br\$HTTP_ENV_VARS: ; var_dump($HTTP_ENV_VARS);
 
 getenv('SERVER_PROTOCOL');
 echo hrafter getenv...;
 echo br\$_ENV: ; var_dump($_ENV);
 echo br\$HTTP_ENV_VARS: ; var_dump($HTTP_ENV_VARS);
 ?
 
 === output:
 before getenv...
 $_ENV: array(0) { }
 $HTTP_ENV_VARS: NULL


 after getenv...
 $_ENV: array(1) { [SERVER_PROTOCOL]= string(8) HTTP/1.1 }
 $HTTP_ENV_VARS: NULL
 
 
 Is it a bug? Or this is the way it should work?
 
 
 -thanks, Eli
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug? (_ENV in PHP v5.2.0)

2007-01-16 Thread Eli

Frank M. Kromann wrote:

Hi Eli,

Check variable_order in php.ini
(http://us2.php.net/manual/en/ini.core.php#ini.variables-order) if the E is
missing you will not get any environment variables.

- Frank



Thanks, Frank.. That worked! :-)

-thanks, Eli

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in php 5.1.4

2006-06-30 Thread Thomas Munz
There must be a special code in your script that causes it like this bug:

http://bugs.php.net/bug.php?id=37926

on Friday 30 June 2006 11:39, Alain Roger wrote:
 Hi,

 I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new
 session everytime you refresh the same php page or that you switch from 1
 page to another page.
 I downgraded it to PHP 5.1.2 and it works correctly.
 It could be interesting to fix this bug.

 if you want moredetail, contact me.

 Alain

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in php 5.1.4

2006-06-30 Thread Jochem Maas
Alain Roger wrote:
 Hi,
 
 I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new
 session everytime you refresh the same php page or that you switch from 1
 page to another page.
 I downgraded it to PHP 5.1.2 and it works correctly.
 It could be interesting to fix this bug.

if it is a bug it sounds like it's rather critical!

 
 if you want moredetail, contact me.

you might want to post a small repro script to internals to illustrate the
problem... if you do you better off asking if it is a bug rather than declaring
it to be so.

chances are that you'll be asked to make a report at bugs.php.net if someone 
sees
merit in your observation.

 
 Alain
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug madness

2006-04-27 Thread Jeremy Schreckhise
Have you tried?

error_reporting(E_ALL^E_NOTICE); 

Jeremy Schreckhise, M.B.A.


-Original Message-
From: Dave Goodchild [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 10:37 AM
To: php-general@lists.php.net
Subject: [PHP] Bug madness

Hi all, I have been mashing my head trying to debug a web app I have
written, the deadline is tomorrow and after implementing some changes a
subtle and difficult-to-pin-down bug has emerged.

I am not going to include code as there is too much of it, but here is the
general issue:

The app consists of three linked forms and three modules that process the
data passed in from the forms. All was sweet and perfect before today. The
forms are self-reloading, and after the data is checked, validated and
entered into the database the form is supposed to display a thank you
section. As part of the processing process (!), the scripts assemble and
send multipart mails to the entrants.

Now, when I submit the forms, I see a blank page - nothing, no html, no
error messages. I have added debugging functions at each point to track the
logic and they inform me that the processing functions get to the end (where
the mails are sent) where they should return to the caller (ie the form).
This does not happen. I have display_errors enabled and cannot seem to
locate the source of this issue.

Ambiguous I know, but it may be a recognisable issue to many of you, in
which case any advice would be greatly appreciated.

I am extremely calm.

--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug madness

2006-04-27 Thread Paul Scott
On Thu, 2006-04-27 at 10:48 -0500, Jeremy Schreckhise wrote:
 Have you tried?
 
   error_reporting(E_ALL^E_NOTICE); 

Surely you mean error_reporting(E_ALL);?

If one of my team members ships code that does not pass through on E_ALL
(or E_STRICT), they get a beating.

Now, back to the problem at hand...

Are you 100% certain that your sendmail binary is available and the
correct path set? I presume you are using the native mail() function?
Thats probably where you are having issues. Also your script may be
timing out because sendmail can't resolve a FQDN or something?

--Paul

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug Apache/PHP/Oracle on Debian

2006-04-06 Thread Chris

David BERCOT wrote:

Hi,

I have a server with Apache 2, PHP 5.1.1 and Oracle Instant Client
10.2.0.1.
As I have a little bug [http://bugs.php.net/bug.php?id=29779], I've
tried the solution (in oci8.c) and recompiled ! But then, everything was
broken. So, I get the source of PHP 5.1.2 and recompiled again.
Everything seems ok, with Apache and PHP, but it was impossible to use
oci !!! I thought about an environment problem (LD_LIBRARY_PATH), but
after some manipulations, I can see this variable in phpinfo(), but
nothing about oci8 !!! I've looked into logs but I couldn't find any
problem. It was like Oracle was not installed !!!


You might be better off asking the internals list.

http://www.php.net/mailing-lists.php

They deal with this sort of stuff, we're more for general php help..

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug??

2005-08-30 Thread Scott Noyes
 for($i=1;$i13;$i++) {
 echo $i .  :: ;
 echo date('F', mktime(0, 0, 0, $i)) .  :: ;
 echo mktime(0, 0, 0, $i) . \n;
 }
 
 
 1 :: January :: 1107061200
 2 :: March :: 1109739600
 3 :: March :: 1112158800

Today is the 30th (in some parts of the world, anyway).  mktime fills
in the current time is no argument is provided.  So for Feb, the
equivalent is
mktime(0, 0, 0, 2, 30, 2005, true);
And the 30th day of Feb, 2005 is March 2nd.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug or programmer-error?

2005-08-06 Thread Frank de Bot

Rob Ziere wrote:


Dear PHP_friends,



I have found a strange behaviour of the include  function.



Here it is .



   // 1. this works fine 


   include (../../gps_info/fetch_fields.php);

   // 2. this works fine

   $doc_root=$_SERVER[DOCUMENT_ROOT];

   include
($doc_root./pages/gps_info/fetch_fields.php);

   // 3. this open the doc fetch_fields.php allright, but variables
that have been set outside fetchfields.php are not available within
fetch_fields.php
 



You could try calling a var with global first

global $variable

(reference: http://nl2.php.net/global )


   $root= 'webserver-2';

   include
($root./pages/gps_info/fetch_fields.php);





Does anybody have a clou as to what's wrong here?





Best regards/ Met vriendelijke groet,

Rob Ziere

Webmaster/beheerder GO-GPS.nl, alles over GPS en wandelen

http://www.go-gps.nl






 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing;downloading from a php script stops at exactly 2.000.000 bytes

2005-06-11 Thread Catalin Trifu
Hi,

There is not a big speed difference between the two.
The only thing is that it was frustrating to find out the limitations
on readfile.
I used it before with large files and it was ok; only to find out now
that on 5.0.4 it doesn't work as it used to.
As php manual states readfile should be the way to spit a file out
the wire.
btw:
$fp = fopen('somefile');
fpassthru($fp);
is also stopping at 2.000.000 bytes, which definetely drives me
to think there is a bug somewhere.


Catalin


Richard Lynch wrote:
 On Thu, June 9, 2005 4:12 pm, Catalin Trifu said:
 
  Tried it and it works indeed, but it's quite annoying to make such
tricks
and is not the best solution either; fopen and fread are expensive.
   I can't say if it's a bug in PHP or some config option.
 
 
 You may want to benchmark the difference between readfile and fopen/fread
 for a 1.9M file.
 
 If it ain't much, don't worry about it.
 
 One posible work-around:
 
 `cat filename`;
 
 This MIGHT be cheaper than fopen/fread -- Or not, since it has to build a
 shell of some kind, I think.
 
 PS File a bug report, if you haven't already.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Catalin Trifu
Hi,

   It can't be a memory limit problem. The server ha 2GB memory,
and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
same configs readfile works without fread tricks.

C.


Rory Browne wrote:
 It's probably something to do with maximum memory, or something like
 that, but taking into account that your method is stretching the
 resources, fopen/fread may be a better solution.
 
 I'd be curious to see the benchmarked differences  - but couldn't be
 bothered at this minute doing the benchmarking atm.
 
 On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
   Hi,

  Tried it and it works indeed, but it's quite annoying to make such tricks
and is not the best solution either; fopen and fread are expensive.
   I can't say if it's a bug in PHP or some config option.


C.


Rory Browne wrote:

I've never came across that problem, but try this

function output_file($filename){
$fp = fopen($filename, r);
while(!feof($fp)){
  echo fread($fp, 1024000);
}
}

On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:


Hi,

  I installed php5 using the configue below. I tried with apache2 as well 
 and same things.

'./configure' '--prefix=/usr/local/php5' 
'--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
'--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
'--enable-sockets' '--enable-exif'
'--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
'--enable-gd-native-ttf'
'--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
'--with-mysql=/usr'
'--with-xsl' '--with-libxml-dir=/usr'

  I have a script which generates a temporary catalog file, which is 
 generated correctly having
4.7MB on disk.
  Then I push up the wire with readfile($filname):

  header(Content-Type: text/csv);
  header(Content-Disposition: attachment; filename=somfilename.csv);
  header(Content-Length: . filesize($file));

  readfile($file);

  I also tried with fopen.
  If I try to download the file directly from apache it works, all 4.7MB 
 are received.

  As expected the browser starts the download and reports it is expecting a 
 file of 4.7MB.
  However, the download stops at 2.000.000 bytes no matter what browser I 
 use (normally i use
Firefox on Linux), no matter if php runs on apache2 or apache1.3

  Is there some php config option I missed ?
  Could this be from curlwrappers ?
  Where could this come from ?


Thanks,
Catalin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rory Browne
Check  out the readfile manual page. Someone made a user-contributed
comment about that.

As it happens they came up with pretty much the same solution as I did.

On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 Hi,
 
It can't be a memory limit problem. The server ha 2GB memory,
 and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
 same configs readfile works without fread tricks.
 
 C.
 
 
 Rory Browne wrote:
  It's probably something to do with maximum memory, or something like
  that, but taking into account that your method is stretching the
  resources, fopen/fread may be a better solution.
 
  I'd be curious to see the benchmarked differences  - but couldn't be
  bothered at this minute doing the benchmarking atm.
 
  On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
Hi,
 
   Tried it and it works indeed, but it's quite annoying to make such tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.
 
 
 C.
 
 
 Rory Browne wrote:
 
 I've never came across that problem, but try this
 
 function output_file($filename){
 $fp = fopen($filename, r);
 while(!feof($fp)){
   echo fread($fp, 1024000);
 }
 }
 
 On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
   I installed php5 using the configue below. I tried with apache2 as well 
  and same things.
 
 './configure' '--prefix=/usr/local/php5' 
 '--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
 '--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
 '--enable-sockets' '--enable-exif'
 '--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
 '--enable-gd-native-ttf'
 '--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
 '--with-mysql=/usr'
 '--with-xsl' '--with-libxml-dir=/usr'
 
   I have a script which generates a temporary catalog file, which is 
  generated correctly having
 4.7MB on disk.
   Then I push up the wire with readfile($filname):
 
   header(Content-Type: text/csv);
   header(Content-Disposition: attachment; filename=somfilename.csv);
   header(Content-Length: . filesize($file));
 
   readfile($file);
 
   I also tried with fopen.
   If I try to download the file directly from apache it works, all 4.7MB 
  are received.
 
   As expected the browser starts the download and reports it is expecting 
  a file of 4.7MB.
   However, the download stops at 2.000.000 bytes no matter what browser I 
  use (normally i use
 Firefox on Linux), no matter if php runs on apache2 or apache1.3
 
   Is there some php config option I missed ?
   Could this be from curlwrappers ?
   Where could this come from ?
 
 
 Thanks,
 Catalin
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rasmus Lerdorf
Didn't really follow this thread, but it sounds to me like you have

   upload_max_filesize = 2M

which also happens to be the default uploaded filesize limit.

-Rasmus

Catalin Trifu wrote:
   Hi,
 
It can't be a memory limit problem. The server ha 2GB memory,
 and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
 same configs readfile works without fread tricks.
 
 C.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rasmus Lerdorf
Uh, never mind.  I guess I should read the thread.  You are downloading,
not uploading.  I can't think of anything that would put an exact limit
on the download like that.

-Rasmus

Rasmus Lerdorf wrote:
 Didn't really follow this thread, but it sounds to me like you have
 
upload_max_filesize = 2M
 
 which also happens to be the default uploaded filesize limit.
 
 -Rasmus
 
 Catalin Trifu wrote:
 
  Hi,

   It can't be a memory limit problem. The server ha 2GB memory,
and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
same configs readfile works without fread tricks.

C.
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Richard Lynch
On Thu, June 9, 2005 4:12 pm, Catalin Trifu said:
   Tried it and it works indeed, but it's quite annoying to make such
 tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.

You may want to benchmark the difference between readfile and fopen/fread
for a 1.9M file.

If it ain't much, don't worry about it.

One posible work-around:

`cat filename`;

This MIGHT be cheaper than fopen/fread -- Or not, since it has to build a
shell of some kind, I think.

PS File a bug report, if you haven't already.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-09 Thread Rory Browne
I've never came across that problem, but try this

function output_file($filename){
$fp = fopen($filename, r);
while(!feof($fp)){
  echo fread($fp, 1024000);
}
}

On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 Hi,
 
I installed php5 using the configue below. I tried with apache2 as well 
 and same things.
 
 './configure' '--prefix=/usr/local/php5' 
 '--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
 '--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
 '--enable-sockets' '--enable-exif'
 '--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
 '--enable-gd-native-ttf'
 '--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
 '--with-mysql=/usr'
 '--with-xsl' '--with-libxml-dir=/usr'
 
I have a script which generates a temporary catalog file, which is 
 generated correctly having
 4.7MB on disk.
Then I push up the wire with readfile($filname):
 
header(Content-Type: text/csv);
header(Content-Disposition: attachment; filename=somfilename.csv);
header(Content-Length: . filesize($file));
 
readfile($file);
 
I also tried with fopen.
If I try to download the file directly from apache it works, all 4.7MB are 
 received.
 
As expected the browser starts the download and reports it is expecting a 
 file of 4.7MB.
However, the download stops at 2.000.000 bytes no matter what browser I 
 use (normally i use
 Firefox on Linux), no matter if php runs on apache2 or apache1.3
 
Is there some php config option I missed ?
Could this be from curlwrappers ?
Where could this come from ?
 
 
 Thanks,
 Catalin
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-09 Thread Catalin Trifu
   Hi,

  Tried it and it works indeed, but it's quite annoying to make such tricks
and is not the best solution either; fopen and fread are expensive.
   I can't say if it's a bug in PHP or some config option.


C.


Rory Browne wrote:
 I've never came across that problem, but try this
 
 function output_file($filename){
 $fp = fopen($filename, r);
 while(!feof($fp)){
   echo fread($fp, 1024000);
 }
 }
 
 On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
Hi,

   I installed php5 using the configue below. I tried with apache2 as well 
 and same things.

'./configure' '--prefix=/usr/local/php5' 
'--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
'--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
'--enable-sockets' '--enable-exif'
'--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
'--enable-gd-native-ttf'
'--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
'--with-mysql=/usr'
'--with-xsl' '--with-libxml-dir=/usr'

   I have a script which generates a temporary catalog file, which is 
 generated correctly having
4.7MB on disk.
   Then I push up the wire with readfile($filname):

   header(Content-Type: text/csv);
   header(Content-Disposition: attachment; filename=somfilename.csv);
   header(Content-Length: . filesize($file));

   readfile($file);

   I also tried with fopen.
   If I try to download the file directly from apache it works, all 4.7MB are 
 received.

   As expected the browser starts the download and reports it is expecting a 
 file of 4.7MB.
   However, the download stops at 2.000.000 bytes no matter what browser I 
 use (normally i use
Firefox on Linux), no matter if php runs on apache2 or apache1.3

   Is there some php config option I missed ?
   Could this be from curlwrappers ?
   Where could this come from ?


Thanks,
Catalin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-09 Thread Rory Browne
It's probably something to do with maximum memory, or something like
that, but taking into account that your method is stretching the
resources, fopen/fread may be a better solution.

I'd be curious to see the benchmarked differences  - but couldn't be
bothered at this minute doing the benchmarking atm.

On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
Hi,
 
   Tried it and it works indeed, but it's quite annoying to make such tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.
 
 
 C.
 
 
 Rory Browne wrote:
  I've never came across that problem, but try this
 
  function output_file($filename){
  $fp = fopen($filename, r);
  while(!feof($fp)){
echo fread($fp, 1024000);
  }
  }
 
  On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
 Hi,
 
I installed php5 using the configue below. I tried with apache2 as well 
  and same things.
 
 './configure' '--prefix=/usr/local/php5' 
 '--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
 '--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
 '--enable-sockets' '--enable-exif'
 '--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
 '--enable-gd-native-ttf'
 '--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
 '--with-mysql=/usr'
 '--with-xsl' '--with-libxml-dir=/usr'
 
I have a script which generates a temporary catalog file, which is 
  generated correctly having
 4.7MB on disk.
Then I push up the wire with readfile($filname):
 
header(Content-Type: text/csv);
header(Content-Disposition: attachment; filename=somfilename.csv);
header(Content-Length: . filesize($file));
 
readfile($file);
 
I also tried with fopen.
If I try to download the file directly from apache it works, all 4.7MB 
  are received.
 
As expected the browser starts the download and reports it is expecting 
  a file of 4.7MB.
However, the download stops at 2.000.000 bytes no matter what browser I 
  use (normally i use
 Firefox on Linux), no matter if php runs on apache2 or apache1.3
 
Is there some php config option I missed ?
Could this be from curlwrappers ?
Where could this come from ?
 
 
 Thanks,
 Catalin
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-07 Thread Jochem Maas

Matthew Weier O'Phinney wrote:

* Merlin [EMAIL PROTECTED]:


Hi there,

I am outputting an multidim. array. That works fine, except one thing. The first 
letter of the value inside dimension 1 always gets printed.


For example:

I fill the arrays:
while ($row = mysql_fetch_object($result)){ 
$cat[$row-main_id][name]= $row-main_name;   
$cat[$row-main_id][$row-sub_id][name] = $row-sub_name;   
   
}



First off, if you're creating associative arrays, you should quote the
keys:

$cat[$row-main_id]['name'] = $row-main_name;

If you don't do so, PHP assumes you're using a constant value for the
key name.



Then I output them:
foreach ($cat AS $maincat){
echo $maincat[name].':';



Quote your keys!



foreach($maincat AS $subcat){



You do realize that the above will also loop over the index 'name',
right?...



echo $subcat[name].$br;



and since it does, the first element in that array is 'name', which
isn't an array, but a string. Since the 'name' constant isn't defined,
it will interpret that as 'true', or 1, and so it takes the first
character of that string.


I think you'll find the 'name' constant evaluates to FALSE, which in turn
casts to zero, which will give you the first element of the given array,
but as you pointed out its a string not an array so you get the first
char (because php allows array-like access to the individual chars in
a string) ... if it had evaluated to TRUE you would be getting the second
char.

the rest of your explaination is spot on.





}
echo $br;
}

Which does result in:

Europe:E
Germany
UK

North America:N
US
CA

As you can see I get the extra letters N and E. Is this an php error or did I do 
something wrong?



So, what you should probably do is create an additional layer in your
multi-dimensional array for the subcategories, and have it of the form
sub_id = sub_name:

$cat[$row-main_id]['subs'][$row-sub_id] = $row-sub_name;

Then loop over that:

foreach ($cat as $main_cat) {
echo $maincat['name'] . :\n;
foreach ($maincat['subs'] as $sub_id = $sub_name) {
echo $sub_name$br; // could also use $sub_id here if
 // desired
}
}



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-06 Thread Matthew Weier O'Phinney
* Merlin [EMAIL PROTECTED]:
 Hi there,

 I am outputting an multidim. array. That works fine, except one thing. The 
 first 
 letter of the value inside dimension 1 always gets printed.

 For example:

 I fill the arrays:
 while ($row = mysql_fetch_object($result)){   
   $cat[$row-main_id][name]   = $row-main_name;  
   $cat[$row-main_id][$row-sub_id][name] = $row-sub_name;   
 
 }

First off, if you're creating associative arrays, you should quote the
keys:

$cat[$row-main_id]['name'] = $row-main_name;

If you don't do so, PHP assumes you're using a constant value for the
key name.

 Then I output them:
 foreach ($cat AS $maincat){
   echo $maincat[name].':';

Quote your keys!

   foreach($maincat AS $subcat){

You do realize that the above will also loop over the index 'name',
right?...

   echo $subcat[name].$br;

and since it does, the first element in that array is 'name', which
isn't an array, but a string. Since the 'name' constant isn't defined,
it will interpret that as 'true', or 1, and so it takes the first
character of that string.

   }
   echo $br;
 }

 Which does result in:

 Europe:E
 Germany
 UK

 North America:N
 US
 CA

 As you can see I get the extra letters N and E. Is this an php error or did I 
 do 
 something wrong?

So, what you should probably do is create an additional layer in your
multi-dimensional array for the subcategories, and have it of the form
sub_id = sub_name:

$cat[$row-main_id]['subs'][$row-sub_id] = $row-sub_name; 

Then loop over that:

foreach ($cat as $main_cat) {
echo $maincat['name'] . :\n;
foreach ($maincat['subs'] as $sub_id = $sub_name) {
echo $sub_name$br; // could also use $sub_id here if
 // desired
}
}

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-06 Thread Merlin

Matthew Weier O'Phinney wrote:

* Merlin [EMAIL PROTECTED]:


Hi there,

I am outputting an multidim. array. That works fine, except one thing. The first 
letter of the value inside dimension 1 always gets printed.


For example:

I fill the arrays:
while ($row = mysql_fetch_object($result)){ 
$cat[$row-main_id][name]= $row-main_name;   
$cat[$row-main_id][$row-sub_id][name] = $row-sub_name;   
   
}



First off, if you're creating associative arrays, you should quote the
keys:

$cat[$row-main_id]['name'] = $row-main_name;

If you don't do so, PHP assumes you're using a constant value for the
key name.



Then I output them:
foreach ($cat AS $maincat){
echo $maincat[name].':';



Quote your keys!



foreach($maincat AS $subcat){



You do realize that the above will also loop over the index 'name',
right?...



echo $subcat[name].$br;



and since it does, the first element in that array is 'name', which
isn't an array, but a string. Since the 'name' constant isn't defined,
it will interpret that as 'true', or 1, and so it takes the first
character of that string.



}
echo $br;
}

Which does result in:

Europe:E
Germany
UK

North America:N
US
CA

As you can see I get the extra letters N and E. Is this an php error or did I do 
something wrong?



So, what you should probably do is create an additional layer in your
multi-dimensional array for the subcategories, and have it of the form
sub_id = sub_name:

$cat[$row-main_id]['subs'][$row-sub_id] = $row-sub_name;

Then loop over that:

foreach ($cat as $main_cat) {
echo $maincat['name'] . :\n;
foreach ($maincat['subs'] as $sub_id = $sub_name) {
echo $sub_name$br; // could also use $sub_id here if
 // desired
}
}



This is very helpful and does work. However I did not understand it completley. 
What if I want to add another value, for example name2 or name3.

It looks like this example is limited to id and name.
Could I just add:
$cat[$row-main_id]['subs'][$row-sub_id] = $row-name2;   

Guess not. Can you tell me how to add other fields to the array?

Thank you in advance, Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-06 Thread Matthew Weier O'Phinney
* Merlin [EMAIL PROTECTED] :
 Matthew Weier O'Phinney wrote:
  * Merlin [EMAIL PROTECTED] :
   I am outputting an multidim. array. That works fine, except one thing. 
   The first 
   letter of the value inside dimension 1 always gets printed.
  
   For example:
  
   I fill the arrays:
   while ($row = mysql_fetch_object($result)){   
 $cat[$row- main_id][name]  = $row- main_name; 
 $cat[$row- main_id][$row- sub_id][name] = $row- sub_name;
   
   }
  
  First off, if you're creating associative arrays, you should quote the
  keys:
  
  $cat[$row- main_id]['name'] = $row- main_name;
  
  If you don't do so, PHP assumes you're using a constant value for the
  key name.
  
   Then I output them:
   foreach ($cat AS $maincat){
 echo $maincat[name].':';
  
  Quote your keys!
  
 foreach($maincat AS $subcat){
  
  You do realize that the above will also loop over the index 'name',
  right?...
  
  
 echo $subcat[name].$br;
  
  and since it does, the first element in that array is 'name', which
  isn't an array, but a string. Since the 'name' constant isn't defined,
  it will interpret that as 'true', or 1, and so it takes the first
  character of that string.
  
  
 }
 echo $br;
   }
  
   Which does result in:
  
   Europe:E
   Germany
   UK
  
   North America:N
   US
   CA
  
   As you can see I get the extra letters N and E. Is this an php error or 
   did I do 
   something wrong?
  
  So, what you should probably do is create an additional layer in your
  multi-dimensional array for the subcategories, and have it of the form
  sub_id = sub_name:
  
  $cat[$row- main_id]['subs'][$row- sub_id] = $row- sub_name;  
  
  Then loop over that:
  
  foreach ($cat as $main_cat) {
  echo $maincat['name'] . :\n;
  foreach ($maincat['subs'] as $sub_id = $sub_name) {
  echo $sub_name$br; // could also use $sub_id here if
   // desired
  }
  }
  

 This is very helpful and does work. However I did not understand it 
 completley. 
 What if I want to add another value, for example name2 or name3.
 It looks like this example is limited to id and name.
 Could I just add:
 $cat[$row- main_id]['subs'][$row- sub_id] = $row- name2;   

 Guess not. Can you tell me how to add other fields to the array?

You should probably do some studying up on multidimensional and/or
nested arrays so you can get a better handle on this stuff.

If you need to be able to add multiple names for a sub_id, do it as an
array:

$cat[$row-main_id]['subs'][$row-sub_id][] = $row-name1;
$cat[$row-main_id]['subs'][$row-sub_id][] = $row-name2;
$cat[$row-main_id]['subs'][$row-sub_id][] = $row-name3;

However, this will break your loop above -- you'll need another layer of
looping added in:

foreach ($cat as $main_cat) {
echo $maincat['name'] . :\n;
foreach ($maincat['subs'] as $sub_id = $names) {
foreach ($names as $name) {
echo $name$br; // could also use $sub_id here if
 // desired
}
}
}

Hope that helps.

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug in look-behind assertions in PCRE patterns ?

2005-03-23 Thread Michael Sims
Ian Thurlbeck wrote:
 Dear All

 Is this a bug ?
[...]
 $line = '$res = $bar(ddd, dfdf);';
 if (preg_match(/(?!\$)(bar)/, $line, $matches)) {
  echo Should NOT match \$bar, but found: .$matches[1];
 }
 

 In the first preg_match() is correctly ignores the foobar
 function name. However the second preg_match() does NOT
 ignore the $bar as I expected.

This is a quoting issue.  Above you are using double quotes, which interpolates
embedded PHP variables.  Therefore if you want a literal $ inside a 
double-quoted
string you have to escape it, as you have done.  However, the $ character is 
ALSO
a preg metacharacter (matches end of line).  This means that you must also 
escape it
for the preg parser as well, so you need to escape it twice, by putting another
literal backslash behind it:

if (preg_match(/(?!\\\$)(bar)/, $line, $matches)) {

Either that or you can use single quotes instead of double quotes:

if (preg_match('/(?!\$)(bar)/', $line, $matches)) {

Either one will work.

HTH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in str_split function?

2005-01-21 Thread Greg Donald
On Fri, 21 Jan 2005 12:07:34 -0600, chris [EMAIL PROTECTED] wrote:
  $test2=str_split($test);

Do echo 'pre'; print_r( $test2 ); right here and see if the $test2
array has the data you expect.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in str_split function?

2005-01-21 Thread chris
No good.

I made the change to this (note the echo ping statements)
/// start
?PHP
 $test='this is test';
 echo $test;
 echo 'brping 1br';
 $test2=str_split($test);
 echo 'ping 2br';
 echo 'pre';
 for($i=0;$icount($test2);$i++)
 {
  print_r($test2[$i]);
 }
 echo '/pre';
?
/// end

result is now
/
this is test
ping 1
/

Greg Donald [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Fri, 21 Jan 2005 12:07:34 -0600, chris [EMAIL PROTECTED] wrote:
  $test2=str_split($test);

 Do echo 'pre'; print_r( $test2 ); right here and see if the $test2
 array has the data you expect.


 -- 
 Greg Donald
 Zend Certified Engineer
 http://destiney.com/


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in str_split function?

2005-01-21 Thread Jochem Maas
chris wrote:
No good.
this should work, I rewrote you little test and no probs (as expected):
 php -r '
$test = this is test;
echo $test,\n;
$test2 = str_split($test);
foreach($test2 as $s) {
echo $s.\n;
}
'

I made the change to this (note the echo ping statements)
/// start
?PHP
 $test='this is test';
 echo $test;
 echo 'brping 1br';
 $test2=str_split($test);
long shot: try specifying the second param to str_split()
e.g.:
$test2=str_split($test,1);
if that doesn't do it you can probably consider you php install borked - 
in which case reinstall!

 echo 'ping 2br';
 echo 'pre';
 for($i=0;$icount($test2);$i++)
while we're at it - don't put the count statement inside the loop, they 
way you have it now count() gets called on every iteration - thats 
wasteful. also notice the foreach syntax I used above, it will save to 
time in typing :-) (I believe its faster for simple array iteration as 
well - anyone care to correct?)

 {
  print_r($test2[$i]);
 }
 echo '/pre';
?
/// end
result is now
/
this is test
ping 1
/
Greg Donald [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

On Fri, 21 Jan 2005 12:07:34 -0600, chris [EMAIL PROTECTED] wrote:
$test2=str_split($test);
Do echo 'pre'; print_r( $test2 ); right here and see if the $test2
array has the data you expect.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bug in str_split function?

2005-01-21 Thread chris
Still no goodI get the first echo but nothing after it.

:^(

What bothers me about this whole thing is the original code was working 
fine.
It was only today that this issue arose, when I was making documentation on 
my code.
Now, all of a sudden, it no longer works. After stepping through my code I 
was able to
isolate it to this function. I have not changed any of my settings, but then 
again other
people do have to my computer. But I could not think of anything that would 
just shutdown
a single function and not other too

If I can not get this resolve I will just make a work around

Chris



Jochem Maas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 chris wrote:
 No good.

 this should work, I rewrote you little test and no probs (as expected):

  php -r '

 $test = this is test;
 echo $test,\n;
 $test2 = str_split($test);
 foreach($test2 as $s) {
 echo $s.\n;
 }

 '



 I made the change to this (note the echo ping statements)
 /// start
 ?PHP
  $test='this is test';
  echo $test;
  echo 'brping 1br';
  $test2=str_split($test);

 long shot: try specifying the second param to str_split()
 e.g.:

 $test2=str_split($test,1);

 if that doesn't do it you can probably consider you php install borked - 
 in which case reinstall!

  echo 'ping 2br';
  echo 'pre';
  for($i=0;$icount($test2);$i++)

 while we're at it - don't put the count statement inside the loop, they 
 way you have it now count() gets called on every iteration - thats 
 wasteful. also notice the foreach syntax I used above, it will save to 
 time in typing :-) (I believe its faster for simple array iteration as 
 well - anyone care to correct?)

  {
   print_r($test2[$i]);
  }
  echo '/pre';
 ?
 /// end

 result is now
 /
 this is test
 ping 1
 /

 Greg Donald [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]

On Fri, 21 Jan 2005 12:07:34 -0600, chris [EMAIL PROTECTED] wrote:

 $test2=str_split($test);

Do echo 'pre'; print_r( $test2 ); right here and see if the $test2
array has the data you expect.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in str_split function?

2005-01-21 Thread Richard Lynch
chris wrote:
 No good.

 I made the change to this (note the echo ping statements)
 /// start
 ?PHP
  $test='this is test';
  echo $test;
  echo 'brping 1br';
  $test2=str_split($test);
  echo 'ping 2br';
  echo 'pre';
  for($i=0;$icount($test2);$i++)
  {
   print_r($test2[$i]);
  }
  echo '/pre';
 ?
 /// end

 result is now
 /
 this is test
 ping 1
 /

Most rational explanation:

Fact 1: str_split is only available in PHP 5, according to TFM.
Fact 2: It's *POSSIBLE* to set up error_reporting/error_log to not appear
in the browser.

Hypothesis:  You have an error message going somewhere telling you that
str_split is not a defined function, because you are running PHP 4 (or PHP
3, or even PHP 2, in theory)...

Lab Test: Does ?php phpinfo();? say you are running PHP 5?

-- 
Like Music?
http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in str_split function?

2005-01-21 Thread chris
Thanks to Richard who pointed me in the right direction. I failed to notice 
that the str_split function is only for use with php v5, I was run 
4.3.10...DOH!

In case anyone what the solution here is a rewrite.

?PHP
 $test='this is test';
 $test2=Array();
 echo $test;
 echo 'brping 1br';
 $strSize=strlen($test);
 for($i=0;$i$strSize;$i++)
 {
  array_push($test2,$test[$i]);
 }
 echo 'ping 2br';
 for($i=0;$i$strSize;$i++)
 {
  echo $test2[$i].'br';
 }
?


This will correctly produce

this is test
ping 1
ping 2
t
h
i
s

i
s

t
e
s
t

Jochem, thanks for pointing out the count inside the loop issue. This is a 
good point to remember...

Thank,
Chris

Jochem Maas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 chris wrote:
 No good.

 this should work, I rewrote you little test and no probs (as expected):

  php -r '

 $test = this is test;
 echo $test,\n;
 $test2 = str_split($test);
 foreach($test2 as $s) {
 echo $s.\n;
 }

 '



 I made the change to this (note the echo ping statements)
 /// start
 ?PHP
  $test='this is test';
  echo $test;
  echo 'brping 1br';
  $test2=str_split($test);

 long shot: try specifying the second param to str_split()
 e.g.:

 $test2=str_split($test,1);

 if that doesn't do it you can probably consider you php install borked - 
 in which case reinstall!

  echo 'ping 2br';
  echo 'pre';
  for($i=0;$icount($test2);$i++)

 while we're at it - don't put the count statement inside the loop, they 
 way you have it now count() gets called on every iteration - thats 
 wasteful. also notice the foreach syntax I used above, it will save to 
 time in typing :-) (I believe its faster for simple array iteration as 
 well - anyone care to correct?)

  {
   print_r($test2[$i]);
  }
  echo '/pre';
 ?
 /// end

 result is now
 /
 this is test
 ping 1
 /

 Greg Donald [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]

On Fri, 21 Jan 2005 12:07:34 -0600, chris [EMAIL PROTECTED] wrote:

 $test2=str_split($test);

Do echo 'pre'; print_r( $test2 ); right here and see if the $test2
array has the data you expect.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug-Tracking-System in PHP ?

2004-10-29 Thread Reinhart Viane
Dunno if this is ok:
http://www.mantisbt.org/

-Original Message-
From: Michelle Konzack [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 29 oktober 2004 5:31
To: [EMAIL PROTECTED]
Subject: [PHP] Bug-Tracking-System in PHP ?


Hello, 

Curently I create my website and I need for my development project a BTS
like this one from bugs.debian.org. 

I have only around 20 Debian Packages, so I do not need a big one of
BTS. 

Curently I use E-Mails from my Provider like:

package[EMAIL PROTECTED]

with procmail and some BASH scripts :-)
Does anyone know a better solution in PHP4 ?

Maybe Webinterface included ?

The BASH scripts are working fine, but they are too heavy

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug? ... ? ? and commenting them out

2004-09-15 Thread John Holmes
From: Stefan [EMAIL PROTECTED]
i've the dump feeling there's a bug in the parser (or in my mind =) since 
i tried to commenting out some code, containing ? ... ?.
http://us4.php.net/manual/en/language.basic-syntax.comments.php
Quote:The one-line comment styles actually only comment to the end of the 
line or the current block of PHP code, whichever comes first. This means 
that HTML code after // ? WILL be printed: ? skips out of the PHP mode and 
returns to HTML mode, and // cannot influence that. If asp_tags 
configuration directive is enabled, it behaves the same with // %.

Although maybe it should say even if ? is within a string to clear up any 
confusion?

---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Bug with mktime??

2004-08-30 Thread Jason Wong
On Tuesday 31 August 2004 05:53, John Clegg wrote:

 I have been using mktime() to determine the next 12 months for a
 program, and i have discovered what seems a bug in the function.

 The following code...

 ?php
 for($i=0;$i  12;$i++){

 $currentDate = date(d m Y,mktime(0, 0, 0,date(m)+$i , date(d),

Try using date('n'). Leading zeros are interpreted in octal.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You don't have to be nice to people on the way up if you're not planning on
coming back down.
-- Oliver Warbucks, Annie
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug with mktime??

2004-08-30 Thread Michal Migurski
 gives the following output:
$i : Month: Year
0 : 08 : 2004
1 : 10 : 2004
2 : 10 : 2004
3 : 12 : 2004
4 : 12 : 2004
5 : 01 : 2005
6 : 03 : 2005
7 : 03 : 2005
8 : 05 : 2005
9 : 05 : 2005
10 : 07 : 2005
11 : 07 : 2005
Your bug is being caused by short months. If you ask mktime() to give 
you the 31st day of november, it will assume you mean the 1st of 
december. You can see more clearly what's going on if you shorten your 
code, like so:

for($i=0;$i  12;$i++) {
echo {$i}: ;
echo date(d m Y,mktime(0, 0, 0,date(m)+$i , date(d), date(Y)));
echo 'br';
}
It's a good thing you're trying this today; if you had tried it a few 
days ago, you wouldn't have had any idea that your method wasn't 
working.

--
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread Jay Blanchard
[snip]
I have a form in a page 1, that POSTs a file and some hidden's to page
2. If 
the file size is bigger that the max in php.ini, in page 2,  $_POST is 
empty. 
[/snip]

Why, of course it is! The php.ini sets the max file size $_POST will be
empty because it would not be allowed to load. You have two choices;

A. increase the max file size in the php.ini
2. reduce the size of the file being uploaded.

It is not a bug.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread John W. Holmes
From: Jay Blanchard [EMAIL PROTECTED]
  [snip]
  I have a form in a page 1, that POSTs a file and some hidden's to page
  2. If
  the file size is bigger that the max in php.ini, in page 2,  $_POST is
  empty.
  [/snip]

 Why, of course it is! The php.ini sets the max file size $_POST will be
 empty because it would not be allowed to load. You have two choices;

 A. increase the max file size in the php.ini
 2. reduce the size of the file being uploaded.

 It is not a bug.

I understand what you're saying, and maybe the OP will agree with me here,
but does that seem like the natural way for it to be handled? Shouldn't
$_FILES be empty and $_POST still have the rest of the posted data? PHP
decides to reject the file, but why does it reject the rest of the post
data, also?

Maybe off-topic for this list, but if that's what the OP was talking about,
then I've got to kind of agree with him.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread DvDmanDT
Maybe the post_max_size is also exceeded, and therefore it's handled with
sense I think.. Otherwise I'm not sure I think this is handled the right
way, if it's only upload_max_filesize that's exceeded.

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
John W. Holmes [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 From: Jay Blanchard [EMAIL PROTECTED]
   [snip]
   I have a form in a page 1, that POSTs a file and some hidden's to page
   2. If
   the file size is bigger that the max in php.ini, in page 2,  $_POST is
   empty.
   [/snip]
 
  Why, of course it is! The php.ini sets the max file size $_POST will be
  empty because it would not be allowed to load. You have two choices;
 
  A. increase the max file size in the php.ini
  2. reduce the size of the file being uploaded.
 
  It is not a bug.

 I understand what you're saying, and maybe the OP will agree with me here,
 but does that seem like the natural way for it to be handled? Shouldn't
 $_FILES be empty and $_POST still have the rest of the posted data? PHP
 decides to reject the file, but why does it reject the rest of the post
 data, also?

 Maybe off-topic for this list, but if that's what the OP was talking
about,
 then I've got to kind of agree with him.

 ---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in PHP

2004-02-27 Thread Chris Shiflett
--- Kyle Goetz [EMAIL PROTECTED] wrote:
 i have a line of code
 include 'new_album.php';
 i keep getting a file not found error
 i KNOW the file is there
 i copy the code to a new file, and save it as 123.php and then change
 the line of code to include '123.php'; and voile! it works!
 it seems there is something wrong with using the name 'new_album.php'
 with include but i dunno why...

When things make no sense, it is almost always because of an erroneous
assumption. In this case, that assumption is probably that the name has
anything to do with whether PHP can include something.

Of course, if you use the wrong name (typo), that will cause a problem. In
addition, if the permissions are such that Apache can't read the file,
then that will also cause a problem.

You have all that you need to debug this problem yourself. You have
something that works and something that doesn't. As the Sesame Street song
says, One of these things is not like the other...

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] bug in PHP

2004-02-26 Thread Chris W. Parker
Kyle Goetz mailto:[EMAIL PROTECTED]
on Thursday, February 26, 2004 3:06 PM said:

 hey so i've been struggling with an apparent bug in and older version
 of PHP but i wouldn't know where to look about this bug, as it
 concerns the include function and there is no mention of a bug that i
 can find...

i'm not familiar with any bug like that (seems unlikely that there would
be a bug like that) so i'm just going to start at square one.

1. what exactly does your code look like?
2. what exactly is the error you're getting?



chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] BUG: fatal error uses html in cgi version (WAS: require_once() or die(); = fatal error)

2003-11-30 Thread Daevid Vincent
Hmm.. It's not turning it off for me. Hence the reason I tried to handle it
gracefully myself. ;-)

I get exactly what you see there below for the fatal error. This is from an
RPM package for RH8. perhaps it is fixed in a version since 4.2.2? 

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, November 29, 2003 10:48 PM
 To: Daevid Vincent
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] BUG: require_once() or die(); = fatal error
 
 By default the CLI version turns off the html in the error 
 messages.  And no, really, there is no bug here.  You are testing the
return code of 
 something that doesn't have one.  It doesn't make sense.
 
 -Rasmus
 
 On Fri, 28 Nov 2003, Daevid Vincent wrote:
 
  Hmm... Well Rasmus, I do see your point, however it still 
 seems to me it
  'should' at least compile and work as I expect it to.
  
  My way, the logic is that the file *is* 'required' (whereas 
 I view 'include'
  files as optional), and I want to exit the program with a 
 graceful message
  instead of the fatal error (which doesn't really doesn't 
 tell me what the
  problem is -- Failed opening required '1' doesn't mean 
 anything to me or
  the user) that is shown. My intent was to put a  
 @require_once() so that I
  could do just that. Especially since I'm running my script 
 on the command
  line, and your stock fatal error message uses HTML tags.
  
  Not a critical bug or a show stopper, but I do still feel 
 it is a bug.
  
   -Original Message-
   From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
   Sent: Wednesday, November 26, 2003 8:55 PM
   To: Daevid Vincent
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] BUG: require_once() or die(); = fatal error
   
   This code doesn't make much sense.  By definition, if require 
   cannot open
   a file it throws a fatal error, so you would never hit 
 the or case
   anyway.  Hence there is no return code from require and you 
   can't write
   code like this.  If you want to test the return code you 
 need to use
   'include' instead.
   
   -Rasmus
   
   On Wed, 26 Nov 2003, Daevid Vincent wrote:
   
Using PHP 4.2.2 on Linux RH8:
   
In a PHP script run from command line,
   
require_once(gibberator_data.php) or die(No Data 
   file found\n);
   
Causes:
   
[EMAIL PROTECTED] gibberator]# ./gibberator.php
br /
bFatal error/b:  Failed opening required '1'
(include_path='.:/php/includes;/usr/share/phpwebtools') in
b/home/gibberator/gibberator.php/b on line b13/bbr /
   
However
   
require_once(gibberator_data.php);
   
Works just fine.
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] BUG: require_once() or die(); = fatal error

2003-11-29 Thread Rasmus Lerdorf
By default the CLI version turns off the html in the error messages.  And 
no, really, there is no bug here.  You are testing the return code of 
something that doesn't have one.  It doesn't make sense.

-Rasmus

On Fri, 28 Nov 2003, Daevid Vincent wrote:

 Hmm... Well Rasmus, I do see your point, however it still seems to me it
 'should' at least compile and work as I expect it to.
 
 My way, the logic is that the file *is* 'required' (whereas I view 'include'
 files as optional), and I want to exit the program with a graceful message
 instead of the fatal error (which doesn't really doesn't tell me what the
 problem is -- Failed opening required '1' doesn't mean anything to me or
 the user) that is shown. My intent was to put a  @require_once() so that I
 could do just that. Especially since I'm running my script on the command
 line, and your stock fatal error message uses HTML tags.
 
 Not a critical bug or a show stopper, but I do still feel it is a bug.
 
  -Original Message-
  From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, November 26, 2003 8:55 PM
  To: Daevid Vincent
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] BUG: require_once() or die(); = fatal error
  
  This code doesn't make much sense.  By definition, if require 
  cannot open
  a file it throws a fatal error, so you would never hit the or case
  anyway.  Hence there is no return code from require and you 
  can't write
  code like this.  If you want to test the return code you need to use
  'include' instead.
  
  -Rasmus
  
  On Wed, 26 Nov 2003, Daevid Vincent wrote:
  
   Using PHP 4.2.2 on Linux RH8:
  
   In a PHP script run from command line,
  
 require_once(gibberator_data.php) or die(No Data 
  file found\n);
  
   Causes:
  
   [EMAIL PROTECTED] gibberator]# ./gibberator.php
   br /
   bFatal error/b:  Failed opening required '1'
   (include_path='.:/php/includes;/usr/share/phpwebtools') in
   b/home/gibberator/gibberator.php/b on line b13/bbr /
  
   However
  
 require_once(gibberator_data.php);
  
   Works just fine.
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] BUG: require_once() or die(); = fatal error

2003-11-28 Thread Daevid Vincent
Hmm... Well Rasmus, I do see your point, however it still seems to me it
'should' at least compile and work as I expect it to.

My way, the logic is that the file *is* 'required' (whereas I view 'include'
files as optional), and I want to exit the program with a graceful message
instead of the fatal error (which doesn't really doesn't tell me what the
problem is -- Failed opening required '1' doesn't mean anything to me or
the user) that is shown. My intent was to put a  @require_once() so that I
could do just that. Especially since I'm running my script on the command
line, and your stock fatal error message uses HTML tags.

Not a critical bug or a show stopper, but I do still feel it is a bug.

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 26, 2003 8:55 PM
 To: Daevid Vincent
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] BUG: require_once() or die(); = fatal error
 
 This code doesn't make much sense.  By definition, if require 
 cannot open
 a file it throws a fatal error, so you would never hit the or case
 anyway.  Hence there is no return code from require and you 
 can't write
 code like this.  If you want to test the return code you need to use
 'include' instead.
 
 -Rasmus
 
 On Wed, 26 Nov 2003, Daevid Vincent wrote:
 
  Using PHP 4.2.2 on Linux RH8:
 
  In a PHP script run from command line,
 
  require_once(gibberator_data.php) or die(No Data 
 file found\n);
 
  Causes:
 
  [EMAIL PROTECTED] gibberator]# ./gibberator.php
  br /
  bFatal error/b:  Failed opening required '1'
  (include_path='.:/php/includes;/usr/share/phpwebtools') in
  b/home/gibberator/gibberator.php/b on line b13/bbr /
 
  However
 
  require_once(gibberator_data.php);
 
  Works just fine.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BUG: require_once() or die(); = fatal error

2003-11-28 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
 My way, the logic is that the file *is* 'required' (whereas I view 'include'
 files as optional), and I want to exit the program with a graceful message
 instead of the fatal error (which doesn't really doesn't tell me what the
 problem is -- Failed opening required '1' doesn't mean anything to me or
 the user) that is shown. My intent was to put a  @require_once() so that I
 could do just that. Especially since I'm running my script on the command
 line, and your stock fatal error message uses HTML tags.

Remove your 'or die()' and the message required opening required
'1' will show up properly.

About the html errors:
1. Use the php parameter -dhtml_errors=off
2. create a php-cli.ini in the location were php reads current php.ini
3. Use the -c parameter to tell php to use a different ini file
   to read.
 
 Not a critical bug or a show stopper, but I do still feel it is a bug.

If your car does'nt float in the water is it the manufacturer's
fault?


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BUG: require_once() or die(); = fatal error

2003-11-26 Thread Rasmus Lerdorf
This code doesn't make much sense.  By definition, if require cannot open
a file it throws a fatal error, so you would never hit the or case
anyway.  Hence there is no return code from require and you can't write
code like this.  If you want to test the return code you need to use
'include' instead.

-Rasmus

On Wed, 26 Nov 2003, Daevid Vincent wrote:

 Using PHP 4.2.2 on Linux RH8:

 In a PHP script run from command line,

   require_once(gibberator_data.php) or die(No Data file found\n);

 Causes:

 [EMAIL PROTECTED] gibberator]# ./gibberator.php
 br /
 bFatal error/b:  Failed opening required '1'
 (include_path='.:/php/includes;/usr/share/phpwebtools') in
 b/home/gibberator/gibberator.php/b on line b13/bbr /

 However

   require_once(gibberator_data.php);

 Works just fine.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BUG: sprintf(%u) and ip2long

2003-10-14 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
 Could be my not understanding of something, but I think there is a bug in
 using ip2long() and sprintf(%u) as indicated on this page:
 http://us4.php.net/manual/en/function.ip2long.php

What version of php? It works find in 4.3.3.

echo long2ip(3232304168);
---
192.169.12.40

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] BUG: sprintf(%u) and ip2long

2003-10-14 Thread Daevid Vincent
Good point...

v4.1.2, Linux stripples.devel.redhat.com 2.4.18-11smp #1 SMP Thu Aug 15
06:41:59 EDT 2002 i686 unknown
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies
with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend
Technologies
Apache/1.3.22

Also, if you notice, in my example, the problem was using the sprintf (%u)
as per the example on the php website. Just doing like you did works for me
too...

 -Original Message-
 From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 14, 2003 2:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] BUG: sprintf(%u) and ip2long
 
 * Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
  Could be my not understanding of something, but I think 
 there is a bug in
  using ip2long() and sprintf(%u) as indicated on this page:
  http://us4.php.net/manual/en/function.ip2long.php
 
 What version of php? It works find in 4.3.3.
 
 echo long2ip(3232304168);
 ---
 192.169.12.40

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BUG: sprintf(%u) and ip2long

2003-10-14 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
 Good point...
 
 v4.1.2, Linux stripples.devel.redhat.com 2.4.18-11smp #1 SMP Thu Aug 15
 06:41:59 EDT 2002 i686 unknown
 This program makes use of the Zend Scripting Language Engine:
 Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies
 with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend
 Technologies
 Apache/1.3.22
 
 Also, if you notice, in my example, the problem was using the sprintf (%u)
 as per the example on the php website. Just doing like you did works for me
 too...

still works using sprintf() with 4.3.3
  http://zirzow.dyndns.org/html/php/tests/string/ip2long.php


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Bug Problems

2003-10-02 Thread Richard Baskett
on 10/1/03 7:50 PM, Richard Baskett at [EMAIL PROTECTED] wrote:

 Well I saw a post on a forum talking about a certain bug that PHP has for Mac
 OS X.. so I thought.. Im on OS X, I should see if that bug is real since on
 bugs.php.net they say it's bogus which you can view here:
 
 http://bugs.php.net/bug.php?id=25394
 
 So I tried it out.. at first I created a loop that assigned $x = 1; a whole
 bunch of times, but that didn¹t crash anything..  I then read the authors post
 a little closer and I realized it was a number of lines problem.. so I crated
 a php file that had a whole bunch of $x = 1; commands in it.. 7996 to be
 exact.. add the opening and closing php tag.. that made 7998 lines.. the
 script still worked.. Now I added one more line so that there were 7999 lines
 and guess what?  Yep you got it.. my script didn¹t work anymore.  Which the
 author it looks like it took 8014 lines instead of my 7999 lines to break it.
 
 I thought this was strange and it looked like the author of the php bug report
 was indeed on the up-and-up and it wasn¹t a bogus bug as bugs.php.net had said
 it was.
 
 So I thought to myself.. well I should post to bugs.php.net and tell them that
 I to can reproduce the bug.  So I did.
 
 Well to make an already long story short.. it looks like after a couple of
 hours bugs.php.net has removed my post.
 
 My question to you is.. is there any reason why they would remove my post? For
 me.. since I do not write that many lines of code for one run of a script it
 really didn¹t matter much to me, but since they removed my post.. it's
 beginning to make me wonder what's going on..
 
 Hopefully someone can shed some light!

Well Eugene.. it looks like your post was removed also.  We are wondering if
it is automatic when a bug is deemed bogus or if there is some other
reason.. But then again it takes awhile for it to be removed.. so if it was
a script that does it, Im not sure why it would take that long to run..

I really have no clue of what's going on.. and so far only one person on OS
X, Mr. Blanchard himself, has not had this problem.. as far as I know.  So I
don't think they would be ignoring this.. I would be curious to hear what
Rasmus had to say.. since I think he would know the innerworkings of php
plus the bugs.php.net site..

Anyways hopefully something can be figured out!

Rick

Too much caution is bad for you. By avoiding things you fear, you may let
yourself in for unhappy consequences. It is usually wiser to stand up to a
scary-seeming experience and walk right into it, risking the bruises as hard
knocks. You are likely to find it is not as tough as you had thought.  Or
you may find it plenty tough, but also discover you have what it takes to
handle it. - Norman Vincent Peale

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug...

2003-08-28 Thread Jay Blanchard
[snip]
I run the script through a browser.  The overall script takes about 36
minutes to run.  I have changed the php.ini values to allow the script
to
run for longer than this.  The script runs, but I always end up with a
500
error.  
[/snip]

Have you also set your webserver software time accordingly? Apache, IIS,
and others come with a default time for a response.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug...

2003-08-28 Thread Jay Blanchard
And you get a 500 error?

First off, it is probably not a bug. If the first two reports get
generated there may be a problem in the code for the third report.

-Original Message-
From: Joe Privett [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2003 6:28 AM
To: Jay Blanchard
Subject: RE: [PHP] Bug...


In the httpd.conf file for Apache, I have changed the 'Timeout' to 7200
seconds.

Joe

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 28 August 2003 12:24
To: Joe Privett; [EMAIL PROTECTED]
Subject: RE: [PHP] Bug...


[snip]
I run the script through a browser.  The overall script takes about 36
minutes to run.  I have changed the php.ini values to allow the script
to
run for longer than this.  The script runs, but I always end up with a
500
error.  
[/snip]

Have you also set your webserver software time accordingly? Apache, IIS,
and others come with a default time for a response.

__
This message has been scanned for all viruses by BTnet VirusScreen.
The service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service,
please visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==


DISCLAIMER:
 This email is private and confidential and is for the addressee only.
If
misdirected, please notify us and confirm that it has been deleted from
your
system and any hard copies destroyed. You are strictly prohibited from
using, printing, distributing or disseminating it or any information
contained in it to save to the intended recipient.


__
This message has been checked for all viruses by BTnet VirusScreen.
The service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service,
please visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in Ereg?

2003-08-15 Thread Kris Yates
Just an addendum..   My parser has $colors=; right before the foreach 
loop.

Kris Yates wrote:

Hi,

I have a form with checkboxes that POSTs to a PHP script.

What is posted [ from phpinfo() ]:

_POST[color-1] on
_POST[color-4] on
_POST[color-6] on
Parser:
   foreach($_POST as $ThisVar=$ThisVal){
   if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
   $newVarA=explode(-, $ThisVar);
   $colors.=$newVarA[1]:;
   }
   }
Expected Output:

$colors=1:4:6:;

Real Output:

$colors=:1:4:6:;

I can work with the output I am getting, however, I am curious why I 
am not getting the expected output.  Can anyone shed light on this?  
I am using PHP 4.3.2 compiled under a unix environment.  Is this a bug 
in ereg or am I just not seeing something obvious in my foreach?

Thanks,

Kris





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Bug in Ereg?

2003-08-15 Thread Jennifer Goodie
 What is posted [ from phpinfo() ]:

 _POST[color-1]  on
 _POST[color-4]  on
 _POST[color-6]  on


 Parser:
 foreach($_POST as $ThisVar=$ThisVal){
 if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
 $newVarA=explode(-, $ThisVar);
 $colors.=$newVarA[1]:;
 }
 }

 Expected Output:

 $colors=1:4:6:;

 Real Output:

 $colors=:1:4:6:;

Do you have anything else in _POST that's equal to 1?  I didn't look up
order of operation, so I may be off here, but your if condition might not be
doing what you are expecting.  Try using parentheses to group it like this
if(ereg(color-, $ThisVar) AND ($ThisVal==on OR $ThisVal==1)){  (I'm
guessing that's what you want).  Why are you using ereg anyway?  You're not
using a regular expression so strstr would work just as well and be slightly
faster.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in Ereg?

2003-08-15 Thread Curt Zirzow
* Thus wrote Kris Yates ([EMAIL PROTECTED]):
 Hi,
 
 I have a form with checkboxes that POSTs to a PHP script.
 
 What is posted [ from phpinfo() ]:
 
 _POST[color-1]  on
 _POST[color-4]  on
 _POST[color-6]  on

There is more post data than this.

 
 
 Parser:
foreach($_POST as $ThisVar=$ThisVal){
if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
$newVarA=explode(-, $ThisVar);
$colors.=$newVarA[1]:;
}
}

Your logic, as jennifer pointed, isn't probably what your
expecting. You're POST data has a value of 1 somewhere.

Also, ereg is very expensive for doing exact string matches like
you are doing there, best to use the str* functions avaible to do
tasks like this.  ie:

if ('color-' == substr($ThisVar, 0, 6))
 
And then no need to explode into an array and then extract the
value (more overhead).. since the format is known you can do
something like:

$colors .= substr($ThisVar, 6);

HTH,

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug in Ereg?

2003-08-15 Thread Marek Kilimajer
Kris Yates wrote:
   if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
this condition reads
if( (ereg(color-, $ThisVar) AND $ThisVal==on) OR $ThisVal==1)
It is called operator precedence.
www.php.net/manual/en/language.operators.html#language.operators.precedence
You have POST var with value of 1 somewhere before.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Bug in Ereg?

2003-08-15 Thread Wouter van Vliet
Hope I can be of any help again .. what you are doing seems rather
complicated... what if you have your checkboxes like:

input type=checkbox name=checkbox[colors][1] value=on
input type=checkbox name=checkbox[colors][4] value=on
input type=checkbox name=checkbox[colors][6] value=on

and the recieving script just doing:

if (isset($_POST['colors'])  is_array($_POST['colors'])) $colors =
join(':', $_POST['colors']);

PHP will only register indexes in the $_POST['colors'] array for the boxes
that are checked, all your colors are in one array, so one simple join would
do the trick .. won't it? The if in front of it is just to prevent any
undefined index notices .. might you have E_ALL set as error level.

.. wait .. getting a message .. yeah, there's a better way

$colors = (isset($_POST['colors'])  is_array($_POST['colors'])) ? $colors
= join(':', $_POST['colors']) : '';

now your $colors variable will always be set with a string value.

Grtz,
Wouter

Ps. anybody knows when syntax highlighting is gonna be an option in MS
Outlook? Would be neat, wouldn't it?

-Oorspronkelijk bericht-
Van: Kris Yates [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 15 augustus 2003 23:53
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Bug in Ereg?


Hi,

I have a form with checkboxes that POSTs to a PHP script.

What is posted [ from phpinfo() ]:

_POST[color-1]on
_POST[color-4]on
_POST[color-6]on


Parser:
foreach($_POST as $ThisVar=$ThisVal){
if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
$newVarA=explode(-, $ThisVar);
$colors.=$newVarA[1]:;
}
}

Expected Output:

$colors=1:4:6:;

Real Output:

$colors=:1:4:6:;

I can work with the output I am getting, however, I am curious why I am
not getting the expected output.  Can anyone shed light on this?  I am
using PHP 4.3.2 compiled under a unix environment.  Is this a bug in
ereg or am I just not seeing something obvious in my foreach?

Thanks,

Kris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Bug in Ereg?

2003-08-15 Thread Wouter van Vliet
ow .. this script won't work ..

checkboxes like this:
input type=checkbox name=colors[1] value=on

or var calling like this:
$_POST['checkbox']['colors']

would do better ;) of course :D:D

-Oorspronkelijk bericht-
Van: Wouter van Vliet [mailto:[EMAIL PROTECTED]
Verzonden: zaterdag 16 augustus 2003 1:06
Aan: Kris Yates; [EMAIL PROTECTED]
Onderwerp: RE: [PHP] Bug in Ereg?


Hope I can be of any help again .. what you are doing seems rather
complicated... what if you have your checkboxes like:

input type=checkbox name=checkbox[colors][1] value=on
input type=checkbox name=checkbox[colors][4] value=on
input type=checkbox name=checkbox[colors][6] value=on

and the recieving script just doing:

if (isset($_POST['colors'])  is_array($_POST['colors'])) $colors =
join(':', $_POST['colors']);

PHP will only register indexes in the $_POST['colors'] array for the boxes
that are checked, all your colors are in one array, so one simple join would
do the trick .. won't it? The if in front of it is just to prevent any
undefined index notices .. might you have E_ALL set as error level.

.. wait .. getting a message .. yeah, there's a better way

$colors = (isset($_POST['colors'])  is_array($_POST['colors'])) ? $colors
= join(':', $_POST['colors']) : '';

now your $colors variable will always be set with a string value.

Grtz,
Wouter

Ps. anybody knows when syntax highlighting is gonna be an option in MS
Outlook? Would be neat, wouldn't it?

-Oorspronkelijk bericht-
Van: Kris Yates [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 15 augustus 2003 23:53
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Bug in Ereg?


Hi,

I have a form with checkboxes that POSTs to a PHP script.

What is posted [ from phpinfo() ]:

_POST[color-1]on
_POST[color-4]on
_POST[color-6]on


Parser:
foreach($_POST as $ThisVar=$ThisVal){
if(ereg(color-, $ThisVar) AND $ThisVal==on OR $ThisVal==1){
$newVarA=explode(-, $ThisVar);
$colors.=$newVarA[1]:;
}
}

Expected Output:

$colors=1:4:6:;

Real Output:

$colors=:1:4:6:;

I can work with the output I am getting, however, I am curious why I am
not getting the expected output.  Can anyone shed light on this?  I am
using PHP 4.3.2 compiled under a unix environment.  Is this a bug in
ereg or am I just not seeing something obvious in my foreach?

Thanks,

Kris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in code - can't find it!

2003-08-14 Thread Chris Sherwood
INPUT TYPE=checkbox NAME=? echo $search_result2['user_cd'];?
VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
$search_result2[a.retired_flag]?
}

well for starters checkboxes dont have a size and maxlength
 you may want to try that and see if it works...



- Original Message -
From: Amanda McComb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 2:47 PM
Subject: [PHP] bug in code - can't find it!


 Ok, after all of the discussion on posting, I'm afraid to post.
 Unfortunately, no one I know is a programmer, and I am a beginner.  I can
 normally figure out what I've done wrong, but I'm missing something here.

 Ok, here is my query and the bit of code I can't figure out:

 $query = SELECT * from apt_user_t a, apt_company_t b ;
 $query .= WHERE a.user_cd = b.user_cd ;
 $query .= ORDER BY a.username;

  $search_results = mysql_query($query) or die(Select
 Failed!);
 while ($search_result2 = mysql_fetch_array($search_results))
 {
 INPUT
 TYPE=checkbox
 NAME=? echo $search_result2['user_cd'];?
 SIZE=20
 MAXLENGTH=50
 VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
$search_result2[a.retired_flag]?
 }
 Nothing shows up with the echo or the value.  I only included this
 checkbox, but all of the other values show up fine.  Can someone give me a
 hint?




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] bug in code - can't find it!

2003-08-14 Thread Jennifer Goodie

 Ok, here is my query and the bit of code I can't figure out:

 $query = SELECT * from apt_user_t a, apt_company_t b ;
 $query .= WHERE a.user_cd = b.user_cd ;
 $query .= ORDER BY a.username;

  $search_results = mysql_query($query) or die(Select
 Failed!);
 while ($search_result2 = mysql_fetch_array($search_results))
 {
 INPUT
 TYPE=checkbox
 NAME=? echo $search_result2['user_cd'];?
 SIZE=20
 MAXLENGTH=50
 VALUE=?if ($search_result2[a.retired_flag] ==
 1){?CHECKED?}? ?echo $search_result2[a.retired_flag]?
 }
 Nothing shows up with the echo or the value.  I only included this
 checkbox, but all of the other values show up fine.  Can someone give me a
 hint?

Mysql does not prefix returned columns with table_name., so there's probably
no a.retired_flag index in your array.  A simple way to check this would
be to print_r($search_result2).  If you have a column named retired_flag in
both table a and table b and you specifically want the one from table a in
your result set you are going to have to alias it to a different name in
your query, i.e. SELECT *, a.retired_flag as r_flag



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in code - can't find it!

2003-08-14 Thread John W. Holmes
AciD wrote:

just a little point; u can replace
?echo $search_result2[a.retired_flag]?
by ?=$search_result2[a.retired_flag]?
which is better imho.
and you're entitled to it, but it's not better. Shorter isn't always better.

Your code will break if enable_short_open_tags is disabled in php.ini or 
an .htaccess file. Sure, it's on by default, but some people turn it 
off, especially when dealing with XML a lot.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bug in code - can't find it!

2003-08-14 Thread AciD
just a little point; u can replace
?echo $search_result2[a.retired_flag]?
by ?=$search_result2[a.retired_flag]?
which is better imho.

AciD


On Wed, 6 Aug 2003 14:57:23 -0700, Jennifer Goodie 
[EMAIL PROTECTED] wrote:


Ok, here is my query and the bit of code I can't figure out:

$query = SELECT * from apt_user_t a, apt_company_t b ;
$query .= WHERE a.user_cd = b.user_cd ;
$query .= ORDER BY a.username;
$search_results = mysql_query($query) or die(Select
Failed!);
while ($search_result2 = mysql_fetch_array($search_results))
{
INPUT
TYPE=checkbox
NAME=? echo $search_result2['user_cd'];?
SIZE=20
MAXLENGTH=50
VALUE=?if ($search_result2[a.retired_flag] ==
1){?CHECKED?}? ?echo $search_result2[a.retired_flag]?
}
Nothing shows up with the echo or the value.  I only included this
checkbox, but all of the other values show up fine.  Can someone give me 
a
hint?
Mysql does not prefix returned columns with table_name., so there's 
probably
no a.retired_flag index in your array.  A simple way to check this 
would
be to print_r($search_result2).  If you have a column named retired_flag 
in
both table a and table b and you specifically want the one from table a 
in
your result set you are going to have to alias it to a different name in
your query, i.e. SELECT *, a.retired_flag as r_flag





--
www.cpm-fr.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bug in code - can't find it!

2003-08-08 Thread Marek Kilimajer
Is it realy so? I remember someone noting on this list it also work if 
short tags are off.
I have never tested it and I'm not going to restart our server now, but 
I will try it at home.

John W. Holmes wrote:

AciD wrote:

just a little point; u can replace
?echo $search_result2[a.retired_flag]?
by ?=$search_result2[a.retired_flag]?
which is better imho.


and you're entitled to it, but it's not better. Shorter isn't always 
better.

Your code will break if enable_short_open_tags is disabled in php.ini or 
an .htaccess file. Sure, it's on by default, but some people turn it 
off, especially when dealing with XML a lot.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bug in code - can't find it!

2003-08-08 Thread Chris Sherwood
silly me

upon further looking

INPUT TYPE=checkbox NAME=? echo $search_result2['user_cd'];?
VALUE=? echo $search_result2[a.retired_flag];?
?if ($search_result2[a.retired_flag] == 1) echo  CHECKED; ?
?echo $search_result2[a.retired_flag]?

- Original Message -
From: Amanda McComb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 2:47 PM
Subject: [PHP] bug in code - can't find it!


 Ok, after all of the discussion on posting, I'm afraid to post.
 Unfortunately, no one I know is a programmer, and I am a beginner.  I can
 normally figure out what I've done wrong, but I'm missing something here.

 Ok, here is my query and the bit of code I can't figure out:

 $query = SELECT * from apt_user_t a, apt_company_t b ;
 $query .= WHERE a.user_cd = b.user_cd ;
 $query .= ORDER BY a.username;

  $search_results = mysql_query($query) or die(Select
 Failed!);
 while ($search_result2 = mysql_fetch_array($search_results))
 {
 INPUT
 TYPE=checkbox
 NAME=? echo $search_result2['user_cd'];?
 SIZE=20
 MAXLENGTH=50
 VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
$search_result2[a.retired_flag]?
 }
 Nothing shows up with the echo or the value.  I only included this
 checkbox, but all of the other values show up fine.  Can someone give me a
 hint?




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in code - can't find it!

2003-08-07 Thread Amanda McComb
Oh, yeah.  Well, I just copied and pasted that from another form.  Taken
out, it still doesn't work.  Even the echo, which is on no way related to
the checkbox.

Thanks!


On Wed, 6 Aug 2003, Chris Sherwood wrote:

 INPUT TYPE=checkbox NAME=? echo $search_result2['user_cd'];?
 VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
 $search_result2[a.retired_flag]?
 }
 
 well for starters checkboxes dont have a size and maxlength
  you may want to try that and see if it works...
 
 
 
 - Original Message -
 From: Amanda McComb [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 06, 2003 2:47 PM
 Subject: [PHP] bug in code - can't find it!
 
 
  Ok, after all of the discussion on posting, I'm afraid to post.
  Unfortunately, no one I know is a programmer, and I am a beginner.  I can
  normally figure out what I've done wrong, but I'm missing something here.
 
  Ok, here is my query and the bit of code I can't figure out:
 
  $query = SELECT * from apt_user_t a, apt_company_t b ;
  $query .= WHERE a.user_cd = b.user_cd ;
  $query .= ORDER BY a.username;
 
   $search_results = mysql_query($query) or die(Select
  Failed!);
  while ($search_result2 = mysql_fetch_array($search_results))
  {
  INPUT
  TYPE=checkbox
  NAME=? echo $search_result2['user_cd'];?
  SIZE=20
  MAXLENGTH=50
  VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
 $search_result2[a.retired_flag]?
  }
  Nothing shows up with the echo or the value.  I only included this
  checkbox, but all of the other values show up fine.  Can someone give me a
  hint?
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in addslashes command?

2003-07-22 Thread Robert Cummings
I recently upgraded from 4.1.2 all the way to 4.3.2 without a single
bump -- your experience may vary :)

Cheers,
Rob.

On Tue, 2003-07-22 at 16:11, Merlin wrote:
 there is definatelly a bug in 4.2.1 since this sentence:
 
 Argostoli is the 'capitol' of Kefalonia / Kefallinia. One of the Greek
 Ionian islands.
 
 will be escaped by - instead of  \
 
 other examples run fine.
 
 Does anybody know if there are any serious changes between the new php
 version and 4.2.1
 Can I upgrade without feering loosing functionality?
 
 Thanx for your help,
 
 Merlin
 
 David Nicholson [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
 Hello,
 
 This is a reply to an e-mail that you wrote on Tue, 22 Jul 2003 at
 20:51, lines prefixed by '' were originally written by you.
  Hello there,
  I am running php 4.2.1 on a linux machine. Not sure, but I think
 there
  might
  be a bug in there.
  While putting data into the db I do get an error in a verry rar
 case.
  All
  values are escaped by addslashes commands.
  This is the original string:
  the 'capitol-' of Kefalonia
  This is the string after addslashes:
  the 'capitol-' of Kefalonia
  Which leaves the last ' unescaped.
 
 On my PHP 4.3.2 installation, echo addslashes(the 'capitol-' of
 Kefalonia); displays:
 the 'capitol-' of Kefalonia
 which appears to be correct.
 
 David.
 
 --
 phpmachine :: The quick and easy to use service providing you with
 professionally developed PHP scripts :: http://www.phpmachine.com/
 
   Professional Web Development by David Nicholson
 http://www.djnicholson.com/
 
 QuizSender.com - How well do your friends actually know you?
  http://www.quizsender.com/
 (developed entirely in PHP)
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bug in addslashes command?

2003-07-22 Thread David Nicholson
Hello,

This is a reply to an e-mail that you wrote on Tue, 22 Jul 2003 at
20:51, lines prefixed by '' were originally written by you.
 Hello there,
 I am running php 4.2.1 on a linux machine. Not sure, but I think
there
 might
 be a bug in there.
 While putting data into the db I do get an error in a verry rar
case.
 All
 values are escaped by addslashes commands.
 This is the original string:
 the 'capitol-' of Kefalonia
 This is the string after addslashes:
 the 'capitol-' of Kefalonia
 Which leaves the last ' unescaped.

On my PHP 4.3.2 installation, echo addslashes(the 'capitol-' of
Kefalonia); displays:
the 'capitol-' of Kefalonia
which appears to be correct.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >