[PHP-DEV] PHP 4.0 Bug #9198 Updated: ocassional session blackouts

2001-02-09 Thread cnewbill

ID: 9198
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *Session related
Assigned To: 
Comments:

Can you include the [Session] section from your php.ini file?

Previous Comments:
---

[2001-02-09 18:02:13] [EMAIL PROTECTED]
My application used to run PHPLIB for the sake of session variables. After migrating 
to PHP4, I made it use the PHP4 integreted session support (using cookies) and it 
seems to be working fine for most of the time.
Nevertheless, it will ocassionally loose the infromation contained within the session 
and get all active users disconnected and unable to log in again for a while.
I cannot say when it is going to happen again (it is unpredictable) but the fact is 
that it happens...

Thanks in advance,
Jakub Jermar



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9198edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9466 Updated: Eval With return doesn't work

2001-02-26 Thread cnewbill

ID: 9466
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

It does work with a CVS snapshot.

?php

$eval = "return 123;";

$e = eval("$eval");

var_dump($e);

?

OUTPUT

int(123)

You also did not have a ";" terminating your return 0 line.  Fix your code and try 
again.  If the problem persists try a CVS snapshot from http://snaps.php.net and 
reopen this report.

Previous Comments:
---

[2001-02-26 13:32:53] [EMAIL PROTECTED]
When i create a piece of code with eval like :

eval = "if (!isset($$value)) {";
eval .= "  return 0; "
eval .= "}";
eval("$eval");

The return statement doesn't work.
It works with earlier versions of php. (php3).

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9466edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9471 Updated: Warning: $CS is not an object in /www/wwwx/index.phtml on line 25

2001-02-26 Thread cnewbill

ID: 9471
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

[USER NOTES via Email]
I don't know why, our web site visabrc.com was working for years and problem
occurred on last Saturday. No body changed any include files or so.

However,

In /usr/local/lib/php/class.Visitor.inc, we had $CS declared:

?php
class Visitor extends Service {
var $visitorid, $vpromo, $CS, $promoCS;
...

Thanks,
Ed

Previous Comments:
---

[2001-02-26 18:00:04] [EMAIL PROTECTED]
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9471edit=2

Use the bug interface to update this please.

Where is $CS actually given a value, the contstructor?  And have you gone through each 
step where $CS might be modified?  Do you keep your code in CVS or something similar 
so you can track possibly overlooked changes?

---

[2001-02-26 17:35:29] [EMAIL PROTECTED]
$CS seems not to be an instantiated object of a defined class. You should provide us 
with your class definition, if this is the cause of your problems.


---

[2001-02-26 17:29:18] [EMAIL PROTECTED]
Warning: $CS is not an object in /www/wwwx/index.phtml on line 25
Warning: $CS is not an object in /www/wwwx/index.phtml on line 26
Warning: $CS is not an object in /www/wwwx/index.phtml on line 28
Fatal error: Member function used on a non-object in /www/wwwx/index.phtml on line 28

===
[custroot@ripvisaweb01 wwwx]# ls -l index.phtml
-rw-rw-r--   1 root other827 Jun 30  2000 index.phtml

(Line 25-28 of /www/wwwx/index.phtml)

 $V-CS-sckey = "speed";
$V-CS-scval = "";

if ( $V-CS-searchCSKey("speed") == "" ) {
==
Warning: $CS is not an object in brc_speedcheck.inc on line 3
Warning: $CS is not an object in brc_speedcheck.inc on line 4
Warning: $CS is not an object in brc_speedcheck.inc on line 5
Fatal error: Member function used on a non-object in brc_speedcheck.inc on line 5

/usr/local/lib/php

[custroot@ripvisaweb01 php]# head brc_speedcheck.inc
?php

$V-CS-sckey = "speed";
$V-CS-scval = "";
if ( $V-CS-searchCSKey("speed") == "" ) { header("Location: 
/sysdoc.phtml?1006ref"); }

?[custroot@ripvisaweb01 php]# ls -l brc_speedcheck.inc
-rw-rw-r--   1 root other148 Aug 23  2000 brc_speedcheck.inc


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9471edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9519 Updated: Incorrect output from date function

2001-03-02 Thread cnewbill

ID: 9519
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Feedback
Bug Type: Date/time related
Assigned To: 
Comments:

Jani,

I believe he is refering to the fact the dates are wrong numerically not 
typographically.

I get this same result too on PHP 4.0.4pl1 and 4.0.5-dev.

-Chris


Previous Comments:
---

[2001-03-02 09:28:58] [EMAIL PROTECTED]
It's not wrong, it's exactly what it should be outputting.
Please read the manual page for date:

http://www.php.net/date

where it says:

n - month without leading zeros; i.e. "1" to "12"


--Jani


---

[2001-03-02 02:44:32] [EMAIL PROTECTED]
the n option for date gives wrong value

date ("l, F d, Y") outputs Friday, March 02, 2001
date ("l, F n, Y") outputs Friday, March 3, 2001


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9519edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9519 Updated: Incorrect output from date function

2001-03-02 Thread cnewbill

ID: 9519
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Bogus
Bug Type: Date/time related
Assigned To: 
Comments:

My bad disregard...month...oops.

Previous Comments:
---

[2001-03-02 11:16:16] [EMAIL PROTECTED]
Jani,

I believe he is refering to the fact the dates are wrong numerically not 
typographically.

I get this same result too on PHP 4.0.4pl1 and 4.0.5-dev.

-Chris


---

[2001-03-02 09:28:58] [EMAIL PROTECTED]
It's not wrong, it's exactly what it should be outputting.
Please read the manual page for date:

http://www.php.net/date

where it says:

n - month without leading zeros; i.e. "1" to "12"


--Jani


---

[2001-03-02 02:44:32] [EMAIL PROTECTED]
the n option for date gives wrong value

date ("l, F d, Y") outputs Friday, March 02, 2001
date ("l, F n, Y") outputs Friday, March 3, 2001


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9519edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9601 Updated: MySQL connects to wrong database

2001-03-07 Thread cnewbill

ID: 9601
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: MySQL related
Assigned To: 
Comments:

Couple stupid questions.

1) When you compiled PHP, did you just use --with-mysql instead of 
--with-mysql=/path/to/mysql?

2) Does the mysql command line tool connect? i.e. mysql -u ceres -p ceres_test

-Chris

Previous Comments:
---

[2001-03-07 09:34:33] [EMAIL PROTECTED]
MySQL: 3.22.32-beta
Apache: 1.3.14

MySQL is connecting to the wrong database:

I have two databases:

ceres
ceres_test

The ceres database is the live database and the user "ceres" is granted permissions on 
it.

The ceres_test database is a database that is identical, but I use for testing 
purposes.

The mysql user "ceresdb" has permissions to access the "ceres" database ONLY.

However, if I execute:

mysql_pconnect("localhost","ceresdb", "password");
mysql_select_db("ceres_test");

It actually connects to the "ceres" database instead. I should have recieved and error 
that it was unable to connect.

We have verified this several ways.

Also, if I change the username/password to the root user or a user that has 
permissions on ALL databases, it works fine.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9601edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9601 Updated: MySQL connects to wrong database

2001-03-07 Thread cnewbill

ID: 9601
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: MySQL related
Assigned To: 
Comments:

Please use the bug system when replying.  Thanx.

Well it looks like you don't have the Grant Tables setup properly OR you didn't flush 
them after changing them.

Do a `mysqladmin reload` and try again, if it still doesn't connect then you need to 
fix your grant tables.

See http://www.mysql.com/documentation/index.html for information on how to do this.

I haven't seen it cause any problems, but just to be safe you should recompile PHP 
using --with-mysql=/path/to/mysql so PHP is aware of what version you are actually 
using.

If for some reason your grant tables are not the problem simply reopen this report.

-Chris


Previous Comments:
---

[2001-03-07 10:45:31] [EMAIL PROTECTED]
Couple stupid questions.

1) When you compiled PHP, did you just use --with-mysql instead of 
--with-mysql=/path/to/mysql?

2) Does the mysql command line tool connect? i.e. mysql -u ceres -p ceres_test

-Chris

---

[2001-03-07 09:34:33] [EMAIL PROTECTED]
MySQL: 3.22.32-beta
Apache: 1.3.14

MySQL is connecting to the wrong database:

I have two databases:

ceres
ceres_test

The ceres database is the live database and the user "ceres" is granted permissions on 
it.

The ceres_test database is a database that is identical, but I use for testing 
purposes.

The mysql user "ceresdb" has permissions to access the "ceres" database ONLY.

However, if I execute:

mysql_pconnect("localhost","ceresdb", "password");
mysql_select_db("ceres_test");

It actually connects to the "ceres" database instead. I should have recieved and error 
that it was unable to connect.

We have verified this several ways.

Also, if I change the username/password to the root user or a user that has 
permissions on ALL databases, it works fine.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9601edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9601 Updated: MySQL connects to wrong database

2001-03-07 Thread cnewbill

ID: 9601
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: MySQL related
Assigned To: 
Comments:

USER NOTES FROM EMAIL:

I just used --with-mysql

AND

ERROR 1045: Access denied for user: 'ceresdb@localhost' (Using password:
YES)

When executing the mysql command from a bash shell.

Greg

Previous Comments:
---

[2001-03-07 10:59:01] [EMAIL PROTECTED]
Please use the bug system when replying.  Thanx.

Well it looks like you don't have the Grant Tables setup properly OR you didn't flush 
them after changing them.

Do a `mysqladmin reload` and try again, if it still doesn't connect then you need to 
fix your grant tables.

See http://www.mysql.com/documentation/index.html for information on how to do this.

I haven't seen it cause any problems, but just to be safe you should recompile PHP 
using --with-mysql=/path/to/mysql so PHP is aware of what version you are actually 
using.

If for some reason your grant tables are not the problem simply reopen this report.

-Chris


---

[2001-03-07 10:45:31] [EMAIL PROTECTED]
Couple stupid questions.

1) When you compiled PHP, did you just use --with-mysql instead of 
--with-mysql=/path/to/mysql?

2) Does the mysql command line tool connect? i.e. mysql -u ceres -p ceres_test

-Chris

---

[2001-03-07 09:34:33] [EMAIL PROTECTED]
MySQL: 3.22.32-beta
Apache: 1.3.14

MySQL is connecting to the wrong database:

I have two databases:

ceres
ceres_test

The ceres database is the live database and the user "ceres" is granted permissions on 
it.

The ceres_test database is a database that is identical, but I use for testing 
purposes.

The mysql user "ceresdb" has permissions to access the "ceres" database ONLY.

However, if I execute:

mysql_pconnect("localhost","ceresdb", "password");
mysql_select_db("ceres_test");

It actually connects to the "ceres" database instead. I should have recieved and error 
that it was unable to connect.

We have verified this several ways.

Also, if I change the username/password to the root user or a user that has 
permissions on ALL databases, it works fine.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9601edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9601 Updated: MySQL connects to wrong database

2001-03-07 Thread cnewbill

ID: 9601
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Feedback
Bug Type: MySQL related
Assigned To: 
Comments:

Okay.

Can anybody else comment on this?  All the machines I use have newer versions of both 
MySQL and PHP.  They also work for this situation.

You may still want to try the --with-mysql=/path/to/mysql recompile if you can, and 
while you are recompiling grab the latest snapshot of PHP from http://snaps.php.net.

-Chris

Previous Comments:
---

[2001-03-07 12:13:05] [EMAIL PROTECTED]
The grant tables are fine. Perhaps we misunderstood ourselves.

If I use "mysql" to connect to the live database using a user name and password that 
is in the grant tables, it works fine.

If I use "mysql" to connect to the test database using a user name and password that 
DOES NOT HAVE PRIVILEGES to this database, authentication fails, as it should.

If I use PHP to connect to the live database using a user name and password that is in 
the grant tables, it works fine.

If I use PHP to connect to the test database using the SAME user name and password 
that works for the live database, it connects to the LIVE database instead of the test 
database.

We found this by accident when setting up a test web site that duplicates a live site. 
When I changed the database name in the connection object, it didn't fail, it just 
connected to the live database.

---

[2001-03-07 10:59:54] [EMAIL PROTECTED]
USER NOTES FROM EMAIL:

I just used --with-mysql

AND

ERROR 1045: Access denied for user: 'ceresdb@localhost' (Using password:
YES)

When executing the mysql command from a bash shell.

Greg

---

[2001-03-07 10:59:01] [EMAIL PROTECTED]
Please use the bug system when replying.  Thanx.

Well it looks like you don't have the Grant Tables setup properly OR you didn't flush 
them after changing them.

Do a `mysqladmin reload` and try again, if it still doesn't connect then you need to 
fix your grant tables.

See http://www.mysql.com/documentation/index.html for information on how to do this.

I haven't seen it cause any problems, but just to be safe you should recompile PHP 
using --with-mysql=/path/to/mysql so PHP is aware of what version you are actually 
using.

If for some reason your grant tables are not the problem simply reopen this report.

-Chris


---

[2001-03-07 10:45:31] [EMAIL PROTECTED]
Couple stupid questions.

1) When you compiled PHP, did you just use --with-mysql instead of 
--with-mysql=/path/to/mysql?

2) Does the mysql command line tool connect? i.e. mysql -u ceres -p ceres_test

-Chris

---

[2001-03-07 09:34:33] [EMAIL PROTECTED]
MySQL: 3.22.32-beta
Apache: 1.3.14

MySQL is connecting to the wrong database:

I have two databases:

ceres
ceres_test

The ceres database is the live database and the user "ceres" is granted permissions on 
it.

The ceres_test database is a database that is identical, but I use for testing 
purposes.

The mysql user "ceresdb" has permissions to access the "ceres" database ONLY.

However, if I execute:

mysql_pconnect("localhost","ceresdb", "password");
mysql_select_db("ceres_test");

It actually connects to the "ceres" database instead. I should have recieved and error 
that it was unable to connect.

We have verified this several ways.

Also, if I change the username/password to the root user or a user that has 
permissions on ALL databases, it works fine.


---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9601edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9945 Updated: Support for UDB/DB2?

2001-03-22 Thread cnewbill

ID: 9945
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 
Comments:

Oops, forgot your other question.  I could be wrong but I am positive it runs faster 
as an server module, as it doesn't need to be loaded into memory each time like the 
CGI.

-Chris

Previous Comments:
---

[2001-03-22 21:07:58] [EMAIL PROTECTED]
See http://www.php.net/manual/en/ref.odbc.php

The following databases are supported by the Unified ODBC functions: Adabas D, IBM 
DB2, iODBC, Solid, and Sybase SQL Anywhere. 

Note: There is no ODBC involved when connecting to the above databases. The functions 
that you use to speak natively to them just happen to share the same names and syntax 
as the ODBC functions. 
SNIP

-Chris

---

[2001-03-22 20:11:41] [EMAIL PROTECTED]
Hello,

Let me start by saying I am a huge fan and love PHP! What a wonderful piece of work. I 
use it on my personal website and I am now looking into using it at work in a Fortune 
200 company!

Our corprate enterprise environment is Window NT/2000 running IIS 4/5 and using IBM's 
DB2/UDB for a database.

My question is do you intend to support DB2/UDB in the near future? Please say 
"YES"!!!

Also, one quick question about using PHP with IIS...is it faster used as a module with 
ISAPI or as CGI?

Thanks guys, keep up the great work!

Chris Streeter
[EMAIL PROTECTED]

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9945edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9973 Updated: See below

2001-03-25 Thread cnewbill

ID: 9973
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

This is browser-specific behavior.  IE 5 will not send the other two, because they 
have no value and it would be inefficient to do so.  Same with Netscape 6, don't have 
that crud Netscape 4 around to test. So, c[2] is actually c[0] because the other two 
don't exist.

If you want them in a specific order you should hardcode the indexes.  c[0], c[1], 
c[2], etc.

As for Mindspring, gripe, gripe, gripe.  It still probably won't get you anywhere.

-Chris

Previous Comments:
---

[2001-03-24 15:58:53] [EMAIL PROTECTED]
In an HTML form, I have created an array of check boxes with the name c[] for each 
box.  

I checked the third box on the form.  I expected c[0] and c[1] to be undefined, and 
c[2] to be "ON".  What happened was that only c[0] was defined.  A really cool 
approach now won't work.  

How do I work around this?

Related Topic:  How do I convince Mindspring to upgrade to PHP 4?

BTW:  Love PHP!!!

Thanks

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9973edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10057 Updated: Multidimensional arrays passed to function using func_get_args

2001-03-29 Thread cnewbill

ID: 10057
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

Here's my quickie test.

?php

function test()
{
  var_dump(func_get_arg(0));
}

$mya = array( array(1,2,3), array(3,4,5) );

test("$mya");
test($mya);

?

string(5) "Array"
array(2) {
  [0]=
  array(3) {
[0]=
int(1)
[1]=
int(2)
[2]=
int(3)
  }
  [1]=
  array(3) {
[0]=
int(3)
[1]=
int(4)
[2]=
int(5)
  }
}

As you can see it works just fine( 4.0.2), you just can't put quotes around it (it 
isnt a string after all), which you may be doing.

-Chris

Previous Comments:
---

[2001-03-29 10:50:43] [EMAIL PROTECTED]
please include a shortest possible self-contained script that reproduces the behavior

---

[2001-03-29 10:38:51] [EMAIL PROTECTED]
When passing an array to a function declared without arguments, the contents of the 
array are replaced with 'Array'.  It appears somewhere PHP is assigning the argument 
to itself literally, which isn't nice :)

thanks,

Dave

System Linux arthur 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown

Configure Command './configure' '--with-sybase-ct' 
'--with-apache=/usr/local/src/packages/apache_1.3.12' '--enable-track-vars' 
'--with-config-path-file=/etc' '--with-pgsql' '--with-mysql=/usr/local/mysql' 





---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10057edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10079 Updated: Header Function Within IF construct

2001-03-30 Thread cnewbill

ID: 10079
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Use the web interface, do not reply to these emails.

I did not try it because i did not have the time.  I just  tried it and did not get 
those same results.

After the first login it did create the file, I deleted, refreshed, no file...did what 
it is supposed to.

I am however using a CVS version of 4.0.5, have you tried it with the CVS version?

-Chris


Previous Comments:
---

[2001-03-30 12:34:38] [EMAIL PROTECTED]
Are you running Apache as standalone or inetd?

If I remember right, PHP/Apache/inetd likes to lose env variables.

-Chris

---

[2001-03-30 11:38:36] [EMAIL PROTECTED]
?php

// Header("WWW-Authenticate: Basic realm="Realm"");

if (!$PHP_AUTH_USER) {
exec("");
Header("WWW-Authenticate: Basic realm="Realm"");
Header("HTTP/1.0 401 Unauthorized");
} else
echo "else";

?


Compiler: gcc 2.95.2
Make: GNU 3.79
FSU Pthreads: 3.8

Apache: 1.3.19
MySQL: 3.23.36
PHP: 4.0.4pl1
Freetype: 2.0
LibPNG: 1.0.9
LibJPEG: 6b
Libgd: 1.8.4

PHP is compiled as an Apache module with the following options:

--with-mysql --with-apache --with-pdflib --with-gd --with-trans-sid 
--enable-track-vars --enable-sysvsem --enable-sysvshm

Description of problem:

Both sides of the IF construct are being executed when testing the $PHP_AUTH_USER 
variable AND issuing the header function. I posted this question in the general mail 
list but have received any reponse from anyoneso

Using the script list above, follow the steps shown below to produce this problem:

1. Close all instances of your browser (I am using IE-5.01 and I have not tried any 
other browsers). However I don't believe it is a browser issue.

2. Run the script shown above.

3. Enter some user ID and password... Everything so far works fine.

4. Look in the directory where the script is stored. There should be a file called 
. This indicates that $PHP_AUTH_USER was NOT set.

5. Remove the file .

6. Refresh the browser. Look for the file . Notice that  is present; which 
should only happen if $PHP_AUTH_USER is NOT setYET "else" was printed on screen 
which indicates that $PHP_AUTH_USER IS set.

7. Uncomment the commented "header" line and notice that a user ID and password prompt 
is always issued in this case.


My questions are:

1. Why are both sides of the conditional "If (!isset($PHP_AUTH_USER))" being executed?

2. Why, when $PHP_AUTH_USER is not set, the 'exec("")' runs on subsequent 
refreshes, but no prompt for a new user ID and password is issued?

3. Why, if a authenticate header is sent before testing, a user ID and password prompt 
is issued?




Thanks for taking a look at this.


Dean

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10079edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10079 Updated: Header Function Within IF construct

2001-03-30 Thread cnewbill

ID: 10079
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Open - Feedback

That's rather annoying that the state is not saved, is anyone working on this?  I know 
there is a new system coming, but not for a while.  Or where is it located in CVS and 
I'll fix it.

-Chris

Previous Comments:
---

[2001-03-30 15:10:11] [EMAIL PROTECTED]
Use the web interface, do not reply to these emails.

I did not try it because i did not have the time.  I just  tried it and did not get 
those same results.

After the first login it did create the file, I deleted, refreshed, no file...did what 
it is supposed to.

I am however using a CVS version of 4.0.5, have you tried it with the CVS version?

-Chris


---

[2001-03-30 12:34:38] [EMAIL PROTECTED]
Are you running Apache as standalone or inetd?

If I remember right, PHP/Apache/inetd likes to lose env variables.

-Chris

---

[2001-03-30 11:38:36] [EMAIL PROTECTED]
?php

// Header("WWW-Authenticate: Basic realm="Realm"");

if (!$PHP_AUTH_USER) {
exec("");
Header("WWW-Authenticate: Basic realm="Realm"");
Header("HTTP/1.0 401 Unauthorized");
} else
echo "else";

?


Compiler: gcc 2.95.2
Make: GNU 3.79
FSU Pthreads: 3.8

Apache: 1.3.19
MySQL: 3.23.36
PHP: 4.0.4pl1
Freetype: 2.0
LibPNG: 1.0.9
LibJPEG: 6b
Libgd: 1.8.4

PHP is compiled as an Apache module with the following options:

--with-mysql --with-apache --with-pdflib --with-gd --with-trans-sid 
--enable-track-vars --enable-sysvsem --enable-sysvshm

Description of problem:

Both sides of the IF construct are being executed when testing the $PHP_AUTH_USER 
variable AND issuing the header function. I posted this question in the general mail 
list but have received any reponse from anyoneso

Using the script list above, follow the steps shown below to produce this problem:

1. Close all instances of your browser (I am using IE-5.01 and I have not tried any 
other browsers). However I don't believe it is a browser issue.

2. Run the script shown above.

3. Enter some user ID and password... Everything so far works fine.

4. Look in the directory where the script is stored. There should be a file called 
. This indicates that $PHP_AUTH_USER was NOT set.

5. Remove the file .

6. Refresh the browser. Look for the file . Notice that  is present; which 
should only happen if $PHP_AUTH_USER is NOT setYET "else" was printed on screen 
which indicates that $PHP_AUTH_USER IS set.

7. Uncomment the commented "header" line and notice that a user ID and password prompt 
is always issued in this case.


My questions are:

1. Why are both sides of the conditional "If (!isset($PHP_AUTH_USER))" being executed?

2. Why, when $PHP_AUTH_USER is not set, the 'exec("")' runs on subsequent 
refreshes, but no prompt for a new user ID and password is issued?

3. Why, if a authenticate header is sent before testing, a user ID and password prompt 
is issued?




Thanks for taking a look at this.


Dean

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10079edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop

2001-04-03 Thread cnewbill

ID: 5226
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Reclassifying as a feature request, regardless of whether it happens anytime soon. :)

-Chris

[EMAIL PROTECTED] adds...

This is a repeat of 5226, but I couldn't add anything without a password, which I 
didn't have.

In that bug, [EMAIL PROTECTED] didn't understand the example that was given. What 
happens is this: if you have

$a[5]="five"; 
$a[6]="six";

and then do array_pop($a), you now have $a[0]="five", not $a[5]="five", as I would 
expect.

Despite not understanding the example, stas answered the question: that's the way the 
zend engine works. But you don't see that as a problem?


Previous Comments:
---

[2000-06-28 10:20:19] [EMAIL PROTECTED]
Presently, all splice-derived functions reorder numeric keys.
There's not much to do about it, since it's the way Zend Engine handles numeric hash 
keys.
Changing it either way won't bring more consistent  functionality, so in the meantime 
it is just as it is.

---

[2000-06-25 19:01:02] [EMAIL PROTECTED]
AFAIU that's exactly what pop should do - pop element from array.
Why should it insert empty element on top?

---

[2000-06-25 18:56:19] [EMAIL PROTECTED]
?
  $A[1] = 'A';
  $A[2] = 'B';
  $A[3] = 'C';
  
  $DUMP = array_pop($A);
  
  for ($i=0; $i=sizeof($A); $i++) {
print "$i = ".$A[$i]."brn";
  }
?

returns:

0 = A
1 = B
2 = 

but should return 

0 =
1 = A
2 = B


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=5226edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop

2001-04-03 Thread cnewbill

ID: 5226
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Analyzed
Old-Bug Type: Scripting Engine problem
Bug Type: Feature/Change Request
Assigned To: 
Comments:

oops, forgot feature request.

-Chris

Previous Comments:
---

[2001-04-04 00:49:25] [EMAIL PROTECTED]
Reclassifying as a feature request, regardless of whether it happens anytime soon. :)

-Chris

[EMAIL PROTECTED] adds...

This is a repeat of 5226, but I couldn't add anything without a password, which I 
didn't have.

In that bug, [EMAIL PROTECTED] didn't understand the example that was given. What 
happens is this: if you have

$a[5]="five"; 
$a[6]="six";

and then do array_pop($a), you now have $a[0]="five", not $a[5]="five", as I would 
expect.

Despite not understanding the example, stas answered the question: that's the way the 
zend engine works. But you don't see that as a problem?


---

[2000-06-28 10:20:19] [EMAIL PROTECTED]
Presently, all splice-derived functions reorder numeric keys.
There's not much to do about it, since it's the way Zend Engine handles numeric hash 
keys.
Changing it either way won't bring more consistent  functionality, so in the meantime 
it is just as it is.

---

[2000-06-25 19:01:02] [EMAIL PROTECTED]
AFAIU that's exactly what pop should do - pop element from array.
Why should it insert empty element on top?

---

[2000-06-25 18:56:19] [EMAIL PROTECTED]
?
  $A[1] = 'A';
  $A[2] = 'B';
  $A[3] = 'C';
  
  $DUMP = array_pop($A);
  
  for ($i=0; $i=sizeof($A); $i++) {
print "$i = ".$A[$i]."brn";
  }
?

returns:

0 = A
1 = B
2 = 

but should return 

0 =
1 = A
2 = B


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=5226edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10229 Updated: buffer error in fread

2001-04-07 Thread cnewbill

ID: 10229
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Filesystem function related
Assigned To: 
Comments:

Can't reproduce with CVS version.  Try upgrading to the newest release 4.04pl1 or grab 
a CVS snapshot from http://snaps.php.net/

What URL is it that is doing this? Or is it every URL?

-Chris

Previous Comments:
---

[2001-04-07 19:25:09] [EMAIL PROTECTED]
While running the following code, I got weird results in my mailbox.  It seemed like I 
got the entire buffer of 10 bytes mailed, instead of only the length of the result 
of the url.  And those mails contained php code from another site hosted at the same 
server.  This worries me, and I think this needs a serious checkup.
The bug is reproducible :)

---start---
$fp = fopen("http://someurl/", "r");
$content = fread($fp, 10);
mail("someone@somehost", "test", $content);
---stop---

Additional info:
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' 
'--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' 
'--with-ttf=/usr/lib/libttf.so' '--enable-track-vars' '--enable-xml' '--disable-debug' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap'

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10229edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10229 Updated: buffer error in fread

2001-04-07 Thread cnewbill

ID: 10229
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Filesystem function related
Assigned To: 
Comments:

I ran it through a couple hundred times and absolutely no PHP code whatsoever.

The only problem I see here is $content is never cleaned up properly and contains BOTH 
of the fread()s jumbled.  Which is very strange.

$fp = fopen("http://www.newsplanet.be/", "r");
while (!feof($fp)) $content .= fread($fp, 4000);
fclose($fp);

You would be better off using the above as it works properly.

Whomever is handling the fopen-wrappers should probably look at this.

-Chris

Previous Comments:
---

[2001-04-07 20:17:03] [EMAIL PROTECTED]
I've been testing a bit more and have a clear reproducible codesnippet, it yields the 
same results in php 4.0.4p1, so I changed the PHP version for this bugreport.

---start---
$fp = fopen("http://www.newsplanet.be/", "r");
$content = fread($fp, 10);
fclose($fp);

$fp = fopen("http://www.google.com/", "r");
$content = fread($fp, 10);

mail("me@host", "topic", $content);
---stop---

In this mail, I see the sourcecode from google.com followed by the rest of the code 
from newsplanet.be.  This does occur in about 1/3 of the mails I try, although I'm 
unable to see why this isn't always the case.


---

[2001-04-07 19:46:47] [EMAIL PROTECTED]
Can't reproduce with CVS version.  Try upgrading to the newest release 4.04pl1 or grab 
a CVS snapshot from http://snaps.php.net/

What URL is it that is doing this? Or is it every URL?

-Chris

---

[2001-04-07 19:25:09] [EMAIL PROTECTED]
While running the following code, I got weird results in my mailbox.  It seemed like I 
got the entire buffer of 10 bytes mailed, instead of only the length of the result 
of the url.  And those mails contained php code from another site hosted at the same 
server.  This worries me, and I think this needs a serious checkup.
The bug is reproducible :)

---start---
$fp = fopen("http://someurl/", "r");
$content = fread($fp, 10);
mail("someone@somehost", "test", $content);
---stop---

Additional info:
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' 
'--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' 
'--with-ttf=/usr/lib/libttf.so' '--enable-track-vars' '--enable-xml' '--disable-debug' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap'

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10229edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10234 Updated: if (... != ...) does not work properly with strings

2001-04-08 Thread cnewbill

ID: 10234
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

For string comparison use !== for NOT and === for EQUALS.

-Chris

Previous Comments:
---

[2001-04-08 14:58:54] [EMAIL PROTECTED]
?php
/*
I want to compare two strings and if they are equal show a message on the screen.
But I discovered that it's imposible, because PHP think that they are equal anyway 
:(((

Example of script
*/

//EX 1. something wrong
$qqq = "00041001001001001001001001001001001002000";
$xxx = "00041001001001001";

# with != just the same effect as 
if ($qqq  $xxx)
 echo "hr$qqqbr b!=/b br$xxxhr"; //it should be on the screen, but 
... 
else 
echo "hr$qqqbr b=/b br$xxx hr"; //it's appear every time on the 
screen :(((

if ($qqq != $xxx) 
echo "hr$qqqbr b!=/b br$xxx";
else
echo "hr$qqqbr b=/b br$xxx hr";

//(strval($qqq) != strval($xxx)) does not work too 
if (strval($qqq) != strval($xxx))
 echo "hr$qqqbr b!=/b br$xxxhr";
else
 echo "hr$qqqbr b=/b br$xxx hr";

//EX 2  - all OK

$qqq = "000410010";
$xxx = "00041001001001001001001001001001001002000";

# with != just the same effect as 
if ($qqq  $xxx)
echo "$qqqbr b!=/b br$xxx";
else 
echo "$qqqbr b=/b br$xxx hr";

if ($qqq != $xxx)
echo "$qqqbr b!=/b br$xxx";
else 
echo "$qqqbr b=/b br$xxx hr";

?

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10234edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10298: Not receiving emails from PHP-DEV

2001-04-11 Thread cnewbill

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0 Latest CVS (11/04/2001)
PHP Bug Type: *General Issues
Bug description:  Not receiving emails from PHP-DEV

Just curious what's going on with PHP-DEV, haven't received an email in 24 hours.

-Chris


-- 
Edit Bug report at: http://bugs.php.net/?id=10298edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10311 Updated: parse error generated for comment

2001-04-12 Thread cnewbill

ID: 10311
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

This is expected behavior.  Not a bug.

The part of the expression that is causing the problem is ?.  Try just having // ?, 
it will do the same thing.  PHP interprets this as the end of the code block.

An example of why this is so:

?php print $value; // print value ?

-Chris

Previous Comments:
---

[2001-04-12 15:50:12] [EMAIL PROTECTED]
//$line = preg_replace("/?[ _0-9A-Za-z$?"=;]+QBUYURLQ[ _0-9A-Za-z$?"=;]+?/", 
$buyurl, $line);

ok pretend thats all one line. the problem is that when using c++ style comments, I 
get a parse error @ line [length of file + 1]. using c style comments makes it go 
away. the point of the code it was to replace the php part of a line that contained 
QBUYURLQ in it w/ just the url. it's no longer needed, but took a while to figure out 
that a comment was generating a parse error :)

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10311edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10350 Updated: OCIResult doesn't return time for an Oracle Date field

2001-04-16 Thread cnewbill

ID: 10350
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Open
Bug Type: Feature/Change Request
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

Seeing how it's a feature request, I guess it can't be Bogus or can it?

-Chris

Previous Comments:
---

[2001-04-16 17:48:13] [EMAIL PROTECTED]
Joe Brown says:

This is not a PHP bug.

Consider setting NLS_DATE_FORMAT.

The manual states OCIResult() returns everything as a string.
NLS_DATE_FORMAT may not be appropriate for your needs.

There are quite a few places you can set NLS_DATE_FORMAT.
* Environment variables (or windows registry on win32)
* orclSID.ora
* on a per session basis; execute this statement after logon:

$cursor=OCIParse($connection, "ALTER SESSION SET NLS_DATE_FORMAT='-MM-DD
HH24:MI:SS'");
OCIExecute($cursor);
OCIFreeCursor($cursor);


---

[2001-04-16 16:07:54] [EMAIL PROTECTED]
The Oracle Date fields are actually DateTime fields.  Your OCIResult routinue returns 
the date only.
As this point, you can't change what OCIResult does because you'd break existing code.
I request that you add a new function allowing the recovery of the time value of an 
Orcale Date field.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10350edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10444 Updated: parseurl

2001-04-22 Thread cnewbill

ID: 10444
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: *URL Functions
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

There are lots of reasons it could not parse the URL, and none of them are really bugs 
with PHP.

If you don't care about that content, either remove it from you file or prepend the 
function with an @, this will not display the warning.

-Chris

Previous Comments:
---

[2001-04-22 14:23:51] [EMAIL PROTECTED]
bWarning/b:  unable to parse url (file:///D%7C/TEKNOWHORE/PUBLIC_HTML/index1.html) 
in b/web/com/digitekdesign/dev/spyder/html.lib/b on line b165/bbr

Above is an warning I get now and then.  It's not really a problem since I have no 
interest on what is on someone's local drive, but the function probably should be able 
to parse it anyway.  Just a thought.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10444edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10529 Updated: for() error

2001-04-27 Thread cnewbill

ID: 10529
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

I'm not even sure that is supposed to work like that.  Guys?

Why don't you use this instead?

for ($i = ord('A'); $i = ord('Z'); $i++) {
 echo chr($i).br;
}


Previous Comments:
---

[2001-04-27 15:06:25] [EMAIL PROTECTED]
Trying to make a script that showed the letters from A to Z using the following code:

   for ($i = 'A'; $i = 'Z'; $i++) {
  echo $ibr;  
   }

I saw that the script outputted the first letters (A-Z) but then it started to display 
AA, AB, AC [...] YZ.
Replacing the 'Z' above to 'Y' (or any other letter between B and Y) makes the script 
show correctly the letters from A to that letter. 
Replacing letters to lowercase and/or single quotation marks to double causes the same 
error.

This happened both in PHP 4.0.4pl1 under Windows and in PHP 4.0.1pl1 under Linux.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10529edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10229 Updated: buffer error in fread

2001-04-27 Thread cnewbill

ID: 10229
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

I assume this is a dead issue.  If not reopen.

-Chris

Previous Comments:
---

[2001-04-08 05:04:10] [EMAIL PROTECTED]
I have only seen php code once, and I was't able to reproduce it.  I suppose it was a 
case where php code was stored in a variable (for online editing or something).  This 
is only a guess, as it's not my code that I see, but code from someone else on the 
same server.

---

[2001-04-07 20:51:58] [EMAIL PROTECTED]
I ran it through a couple hundred times and absolutely no PHP code whatsoever.

The only problem I see here is $content is never cleaned up properly and contains BOTH 
of the fread()s jumbled.  Which is very strange.

$fp = fopen(http://www.newsplanet.be/;, r);
while (!feof($fp)) $content .= fread($fp, 4000);
fclose($fp);

You would be better off using the above as it works properly.

Whomever is handling the fopen-wrappers should probably look at this.

-Chris

---

[2001-04-07 20:17:03] [EMAIL PROTECTED]
I've been testing a bit more and have a clear reproducible codesnippet, it yields the 
same results in php 4.0.4p1, so I changed the PHP version for this bugreport.

---start---
$fp = fopen(http://www.newsplanet.be/;, r);
$content = fread($fp, 10);
fclose($fp);

$fp = fopen(http://www.google.com/;, r);
$content = fread($fp, 10);

mail(me@host, topic, $content);
---stop---

In this mail, I see the sourcecode from google.com followed by the rest of the code 
from newsplanet.be.  This does occur in about 1/3 of the mails I try, although I'm 
unable to see why this isn't always the case.


---

[2001-04-07 19:46:47] [EMAIL PROTECTED]
Can't reproduce with CVS version.  Try upgrading to the newest release 4.04pl1 or grab 
a CVS snapshot from http://snaps.php.net/

What URL is it that is doing this? Or is it every URL?

-Chris

---

[2001-04-07 19:25:09] [EMAIL PROTECTED]
While running the following code, I got weird results in my mailbox.  It seemed like I 
got the entire buffer of 10 bytes mailed, instead of only the length of the result 
of the url.  And those mails contained php code from another site hosted at the same 
server.  This worries me, and I think this needs a serious checkup.
The bug is reproducible :)

---start---
$fp = fopen(http://someurl/;, r);
$content = fread($fp, 10);
mail(someone@somehost, test, $content);
---stop---

Additional info:
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' 
'--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' 
'--with-ttf=/usr/lib/libttf.so' '--enable-track-vars' '--enable-xml' '--disable-debug' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap'

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10229edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8671 Updated: Random Warning: Failed opening...

2001-04-27 Thread cnewbill

ID: 8671
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *General Issues
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

It is advised to upgrade.

It is also advised that you do not display warnings and errors on a production site.  
Append your include()'s and require()'s with an @.  Or turn off reporting of warnings 
in php.ini.

-Chris

Previous Comments:
---

[2001-01-12 05:07:57] [EMAIL PROTECTED]
we are running php 4.03pl1  iplanet 4.0. will upgrading to 4.04pl1 help?

---

[2001-01-12 05:05:17] [EMAIL PROTECTED]
We have a most annoying problem on our site. The Warning: Failed opening... error 
message appears on a random basis, thus it is not related to rights on the system 
level. Can anybody advise a workaround on this? I have checked bug reports with 
similar problems, but none seems to contain the answer.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8671edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10355 Updated: PHP-DEV Mailing list is flaky

2001-04-27 Thread cnewbill

ID: 10355
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *General Issues
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

Closing since no one has interest.

-Chris

Previous Comments:
---

[2001-04-16 20:35:05] [EMAIL PROTECTED]
Okay, this last week my PHP-DEV subscription stopped working.  Other people reported 
it was working fine for them, so I resubscribed.  Today it started working again so 
now I am receiving two copies (I resubscribed under a different address).  This is 
pretty ridiculous and it is obvious something is not right with the list server(s).

Wez Furlong reported similar problems with the CVS list about the time I started 
having problems.

Can someone please look into this.

Thanks,
-Chris

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10355edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10571 Updated:

2001-04-30 Thread cnewbill

ID: 10571
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Other web server
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

Not enough information.

See http://www.php.net/bugs-dos-and-donts.php

-Chris

Previous Comments:
---

[2001-05-01 00:32:46] [EMAIL PROTECTED]


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10571edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10698 Updated: nl2br produces br / instead of br

2001-05-06 Thread cnewbill

ID: 10698
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

This was changed quite a while ago to be XHTML (strict) compliant.

Not a PHP bug.

-Chris

Previous Comments:
---

[2001-05-07 07:00:13] [EMAIL PROTECTED]
$t2 = nl2br ($t1);

module was compiled with:
--with-apxs=/opt/apache/bin/apxs
--with-mysql=/mysql

php.ini was not changed from original

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10698edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10752 Updated: infinite loops prevents pages from loading

2001-05-10 Thread cnewbill

ID: 10752
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: *Programming Data Structures
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

This sounds like an unreliable way to accomplish your goal, as you are finding out.

Don't you think it would be better to simply have a META tag refresh the chat session 
(could be a frame or what not) every X seconds?  Could have the user list in a 
seperate frame and the message entry area in another.

-Chris

Previous Comments:
---

[2001-05-10 07:45:16] [EMAIL PROTECTED]
This is going to be used for a chat board, there will be an infinite loop which reads 
from a mySQL db and flushes the output. 

I tought there was something wrong with my db access code however I realised that, the 
code was not working altough I have simplified it as I have posted.

I have tried with different os and web server software. I have tried Linux  Apache 
and Win2k  IIS5.

When I open the page, it works fine. When I open the same page in another window at 
the same computer it still works fine however if I try to open a third browser window 
(private chat with 3 person for instance) the browser window freezes and if I close 
one of the previous browser windows the third window starts working.

Thank you,

Argun

---

[2001-05-09 10:42:15] [EMAIL PROTECTED]
1.) Why are you doing an infinite loop in the first place?

2.) This is working just fine for me on my linux machine with 4.0.5.

-Chris

---

[2001-05-09 10:01:38] [EMAIL PROTECTED]
html

head
meta http-equiv=Content-Type content=text/html; charset=windows-1254
titleLoop/title
/head
body
?
for($value=1; $value0; $value++){
echobr$value;

flush();
sleep(1);
}
?
/body

/html

The code above does not work when opened in more than two browsers on the same 
computer. 

Any ideas?

Thank you. 

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10752edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10882 Updated: nl2br function now instead of replacing \n to br replaces \b to br /

2001-05-15 Thread cnewbill

ID: 10882
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Strings related
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

Not a bug, is simply XHTML compliant now.

-Chris

Previous Comments:
---

[2001-05-15 11:54:31] [EMAIL PROTECTED]


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10882edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11070 Updated: '@' does not turn off error checking in foreach()

2001-05-23 Thread cnewbill

ID: 11070
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

Use

if (is_array($a))
foreach ($a as $key = $val) {
/* Do something */
}

until it is added, which it may not be.

-Chris

Previous Comments:
---

[2001-05-23 18:47:32] [EMAIL PROTECTED]
it would be nice to see the '@' turn off error reporting on the foreach() command. ie.

?php
  foreach($test as $pos = $val)
  {

  }
?
gives an error because $test is not set.

?php
  foreach(@$test as $pos = $val)
  {

  }
?
gives an error because its the wrong data type.

?php
  @foreach($test as $pos = $val)
  {

  }
?
gives a syntax error. it would be nice if this last command worked :)

  Chris Lee
  [EMAIL PROTECTED]



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11070edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11564 Updated: Passing variables using the GET method

2001-06-19 Thread cnewbill

ID: 11564
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

This is a browser issue, since it uses # as the key that it needs to go that 
particular anchor of a page.

Use urlencode when passing variables in the URL like that.

?
if($name) {
 echo $name;
 }else{
 echo a href=\$PHP_SELF?name=.urlencode(#asdf).\Click me/a;
 }
?

-Chris

Previous Comments:
---

[2001-06-19 12:18:54] [EMAIL PROTECTED]
?
if($name) {
 echo $name;
 }else{
 echo a href=$PHP_SELF?name=#asdfClick me/a;
 }
?

When you click on 'Click Me', it displays the link again, when it should output 
'#asdf'. This does not happen using the POST method.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11564edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11889: string.c broken

2001-07-04 Thread cnewbill

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 7.0
PHP version:  4.0 Latest CVS (2001-07-04)
PHP Bug Type: Compile Failure
Bug description:  string.c broken

string.c: In function `php_minit_nl_langinfo':
string.c:280: `ERA_YEAR' undeclared (first use in this function)
string.c:280: (Each undeclared identifier is reported only once
string.c:280: for each function it appears in.)
string.c:285: `INT_CURR_SYMBOL' undeclared (first use in this function)
string.c:292: `MON_DECIMAL_POINT' undeclared (first use in this function)
string.c:293: `MON_THOUSANDS_SEP' undeclared (first use in this function)
string.c:294: `MON_GROUPING' undeclared (first use in this function)
string.c:295: `POSITIVE_SIGN' undeclared (first use in this function)
string.c:296: `NEGATIVE_SIGN' undeclared (first use in this function)
string.c:297: `INT_FRAC_DIGITS' undeclared (first use in this function)
string.c:298: `FRAC_DIGITS' undeclared (first use in this function)
string.c:299: `P_CS_PRECEDES' undeclared (first use in this function)
string.c:300: `P_SEP_BY_SPACE' undeclared (first use in this function)
string.c:301: `N_CS_PRECEDES' undeclared (first use in this function)
string.c:302: `N_SEP_BY_SPACE' undeclared (first use in this function)
string.c:303: `P_SIGN_POSN' undeclared (first use in this function)
string.c:304: `N_SIGN_POSN' undeclared (first use in this function)
string.c:317: `GROUPING' undeclared (first use in this function)

Looking at CVS, this looks to be the handy work of Wez Furlong about 10 hours ago.

-Chris



-- 
Edit Bug report at: http://bugs.php.net/?id=11889edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11889 Updated: string.c broken

2001-07-05 Thread cnewbill

ID: 11889
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Compile Failure
Operating system: 
PHP Version: 4.0 Latest CVS (2001-07-04)
Assigned To: 
Comments:

oops forgot to close.

-Chris

Previous Comments:
---

[2001-07-05 13:26:49] [EMAIL PROTECTED]

Grabbed today's CVS and yeah the ifdefs fixed it.

-Chris

---

[2001-07-05 06:49:04] [EMAIL PROTECTED]

I've added loads of ifdefs to help prevent this.
Please let me know if it works.

--Wez.

---

[2001-07-05 06:12:38] [EMAIL PROTECTED]

It's broken on some platforms including the most modern ones. Please leave this bug 
report open until Wez fixes it.

---

[2001-07-04 20:47:59] [EMAIL PROTECTED]

works for me just fine.


---

[2001-07-04 16:15:02] [EMAIL PROTECTED]

string.c: In function `php_minit_nl_langinfo':
string.c:280: `ERA_YEAR' undeclared (first use in this function)
string.c:280: (Each undeclared identifier is reported only once
string.c:280: for each function it appears in.)
string.c:285: `INT_CURR_SYMBOL' undeclared (first use in this function)
string.c:292: `MON_DECIMAL_POINT' undeclared (first use in this function)
string.c:293: `MON_THOUSANDS_SEP' undeclared (first use in this function)
string.c:294: `MON_GROUPING' undeclared (first use in this function)
string.c:295: `POSITIVE_SIGN' undeclared (first use in this function)
string.c:296: `NEGATIVE_SIGN' undeclared (first use in this function)
string.c:297: `INT_FRAC_DIGITS' undeclared (first use in this function)
string.c:298: `FRAC_DIGITS' undeclared (first use in this function)
string.c:299: `P_CS_PRECEDES' undeclared (first use in this function)
string.c:300: `P_SEP_BY_SPACE' undeclared (first use in this function)
string.c:301: `N_CS_PRECEDES' undeclared (first use in this function)
string.c:302: `N_SEP_BY_SPACE' undeclared (first use in this function)
string.c:303: `P_SIGN_POSN' undeclared (first use in this function)
string.c:304: `N_SIGN_POSN' undeclared (first use in this function)
string.c:317: `GROUPING' undeclared (first use in this function)

Looking at CVS, this looks to be the handy work of Wez Furlong about 10 hours ago.

-Chris


---

The remainder of the comments for this report are too long.
To view the rest of the comments, please
view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11889edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12075 Updated: Merge all db functions

2001-07-11 Thread cnewbill

ID: 12075
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux  HP-UX
PHP Version: 4.0.6
New Comment:

This is what PEAR::DB does.

http://pear.php.net/

-Chris

Previous Comments:


[2001-07-11 19:11:29] [EMAIL PROTECTED]

See http://www.php.net/manual/en/ref.dbx.php :)



[2001-07-11 18:59:18] [EMAIL PROTECTED]

CHANGE FEATURE

Merge all DB functions, the distinction for DB must no longer be in php scripts but in 
php source.

mysql_query, sybase_query, etc.. = db_query
etc..etc..

I know it's a big work (php 5.0 ?), but after, when
you add a functionality, the synergy become more
efficient and all db who can support this feature
become ready.

@++
JC





ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12075edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12075 Updated: Merge all db functions

2001-07-11 Thread cnewbill

ID: 12075
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: 
Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux  HP-UX
PHP Version: 4.0.6
New Comment:

PEAR can be used in module form...it is seperate from PHP.

Previous Comments:


[2001-07-11 19:43:02] [EMAIL PROTECTED]

A :))

so please add sybase_ct support in dbx :))

PEAR::DB is only for cgi no ? (I don't use php
in cgi mode now (only when apache 2.0 will be done))

@++
JC



[2001-07-11 19:18:11] [EMAIL PROTECTED]

This is what PEAR::DB does.

http://pear.php.net/

-Chris



[2001-07-11 19:11:29] [EMAIL PROTECTED]

See http://www.php.net/manual/en/ref.dbx.php :)



[2001-07-11 18:59:18] [EMAIL PROTECTED]

CHANGE FEATURE

Merge all DB functions, the distinction for DB must no longer be in php scripts but in 
php source.

mysql_query, sybase_query, etc.. = db_query
etc..etc..

I know it's a big work (php 5.0 ?), but after, when
you add a functionality, the synergy become more
efficient and all db who can support this feature
become ready.

@++
JC





ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12075edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12301 Updated: include() in included file should check included file's directory

2001-07-21 Thread cnewbill

ID: 12301
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.0.6
New Comment:

No you're not the only one who does this.

You just need to modify your php.ini include_path setting.

By default it is .:/usr/local/lib/php/, i.e. check the current directory then check 
/usr/local/lib/php/.

So you would want yours to be .:/usr/local/lib/php/:/path/to/scripts.  Then you 
could do this.

?php

include(main.php);
include(admin/tools.php);
include(include/process.inc);
include(include/lib.inc);

// rest of code here

?

-Chris


Previous Comments:


[2001-07-21 15:29:09] [EMAIL PROTECTED]

When using include(), it should check the current file's directory. Currently PHP 
start from the script's directory.

Say you have the following files:
scripts/main.php
scripts/admin/tools.php
scripts/include/process.inc
scripts/include/lib.inc

If process.inc wants to include lib.inc, you would need to know from where it was 
included. If you started off from main.php, main.php would have 
include('include/process.inc') and process.inc would have include('include/lib.inc'). 
If you started off from tools.php, tools.php would have 
include('../include/process.inc') and process.inc would have 
include('../include/lib.inc').

Which is very silly, IMO. process.inc needs lib.inc, and i can make sure they're 
together in the same directory, so i can simply use include('lib.inc') in process.inc. 
why should i have to care what script and in what directory included process.inc?

I can't believe this feature isn't there. I checked all over the place but it seems it 
isn't. Am I the only one who uses more than one directory for my scripts?

If this feature breaks some old scripts, you could have an option in the config file 
to turn it on or off.







Edit this bug report at http://bugs.php.net/?id=12301edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12301 Updated: include() in included file should check included file's directory

2001-07-21 Thread cnewbill

ID: 12301
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.0.6
New Comment:

I guess I should clarify this.

The behavior is that when an include()/require() is issued it checks the include_path 
in the order specified.

So say my program is in /www and my scripts are in /www/scripts.  My include_path has 
been modified to include /www/scripts/.

if I do include(main.php) in /www/index.php , then php first checks the working 
directory which is /www, it sees I have no main.php here so it checks the next entry 
in include_path /usr/local/lib/php/...still no dice, finally it checks 
/www/scripts...voila it finds it and includes it without me having to know the path.

-Chris

Previous Comments:


[2001-07-21 15:57:26] [EMAIL PROTECTED]

No you're not the only one who does this.

You just need to modify your php.ini include_path setting.

By default it is .:/usr/local/lib/php/, i.e. check the current directory then check 
/usr/local/lib/php/.

So you would want yours to be .:/usr/local/lib/php/:/path/to/scripts.  Then you 
could do this.

?php

include(main.php);
include(admin/tools.php);
include(include/process.inc);
include(include/lib.inc);

// rest of code here

?

-Chris




[2001-07-21 15:29:09] [EMAIL PROTECTED]

When using include(), it should check the current file's directory. Currently PHP 
start from the script's directory.

Say you have the following files:
scripts/main.php
scripts/admin/tools.php
scripts/include/process.inc
scripts/include/lib.inc

If process.inc wants to include lib.inc, you would need to know from where it was 
included. If you started off from main.php, main.php would have 
include('include/process.inc') and process.inc would have include('include/lib.inc'). 
If you started off from tools.php, tools.php would have 
include('../include/process.inc') and process.inc would have 
include('../include/lib.inc').

Which is very silly, IMO. process.inc needs lib.inc, and i can make sure they're 
together in the same directory, so i can simply use include('lib.inc') in process.inc. 
why should i have to care what script and in what directory included process.inc?

I can't believe this feature isn't there. I checked all over the place but it seems it 
isn't. Am I the only one who uses more than one directory for my scripts?

If this feature breaks some old scripts, you could have an option in the config file 
to turn it on or off.







Edit this bug report at http://bugs.php.net/?id=12301edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12310 Updated: $SCRIPT_FILENAME

2001-07-22 Thread cnewbill

ID: 12310
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Variables related
Operating System: WinNT IIS
PHP Version: 4.0.6
New Comment:

Ouch Andy, that seemed pretty harsh.

Anyways,  do you have a page up I can look at with phpinfo() in it?  If not just make 
a quick page like so

?php
phpinfo();
?

-Chris

Previous Comments:


[2001-07-22 20:19:45] [EMAIL PROTECTED]

Michael, I think you should devote some time to read the PHP documentation. You're 
trying to make orange juice from apples. That won't work.

Also, next time you think you've found a bug, please check that it's not a PEBKAC.

Last, give only accurate, and TRUE!!! info in bug reports. I could easily see that 
your bug report was bogus, but with something more complicated or subtle, your claim 
that it works on other machines could mislead a developer, and cost them a lot of 
their time. I'm sure that would not be your goal.

Andi, I didn't get your remark about Linux. The behavior he was seeing is completely 
platform independent.



[2001-07-22 20:10:04] [EMAIL PROTECTED]

Ok...

I can't help you anymore.  This is totally bogus.

The linux thing was a joke, because nothing like this would happen with linux.

(*Andy*)



[2001-07-22 20:08:15] [EMAIL PROTECTED]

If i replace $SCRIPT_FILENAME with $HTTP_SERVER_VARS[SCRIPT_NAME] the dirname 
function only returns the path from the inet_root but not from the harddrive root.

if i type in the whole path manualy and the inclusion woks, i see that

$REQUEST_URI 

is also empty... so my whole project could not work at my server...

I think its a general configuration problem, but what sholud i do?


--By the way, get Linux. - later... i have no experience with Linux



[2001-07-22 19:56:17] [EMAIL PROTECTED]

Sorry about that...

replace $SCRIPT_FILENAME with $HTTP_SERVER_VARS[SCRIPT_NAME]

if that doesn't work, I am stumped.

--By the way, get Linux.

(*Andy*)



[2001-07-22 19:53:23] [EMAIL PROTECTED]

If i use:
$path=dirname($HTTP_SERVER_VARS[SCRIPT_FILENAME]);

i get:
Warning: Undefined index: SCRIPT_FILENAME 



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=12310


Edit this bug report at http://bugs.php.net/?id=12310edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12310 Updated: $SCRIPT_FILENAME

2001-07-22 Thread cnewbill

ID: 12310
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Variables related
Operating System: WinNT IIS
PHP Version: 4.0.6
New Comment:

I'm assuming you want to be able to call these includes, and you think you need to 
know the path?

IMO, there is a much cleaner way that you can use regardless of your current working 
directory.

Create a directory where all your scripts will go, for example C:\Inetpub\php\.  
Modify your include_path to include our new directory C:\Inetpub\php.  Move your 
inc/ directory to this new directory.

Now your code can be
?php
include(inc/navi_d.inc);
?
no matter what directory you are in.  You just need to make sure you have your path 
setup in the order you want it processed in, otherwise if you have an inc/navi_d.inc 
in your current working dir it will use that one first.  Which is also good in some 
cases.

I've honestly never used $SCRIPT_FILENAME, I've always used $PHP_SELF or one of the 
HTTP_SERVER_VARS.

-Chris

Previous Comments:


[2001-07-22 21:24:03] [EMAIL PROTECTED]

Hi

i just made a page with

?php

phpinfo();

?


http://frifra.dtdns.net:8082/informatik/test.php





[2001-07-22 20:35:21] [EMAIL PROTECTED]

make sure you have a big mailbox if you subscribe to this mailing list.

You get lots of messages...



[2001-07-22 20:30:59] [EMAIL PROTECTED]

One last remark before I definitely leave this PR:
Michael, you might also want to subscribe to php-general@,
that can be done by sending an empty email to [EMAIL PROTECTED]



[2001-07-22 20:26:58] [EMAIL PROTECTED]

ya...

Sorry about my remark.

If you create a page like cnewbill said, you can see all of environmental
variables, server variables, etc... that PHP defines.

Also, as cynic said check out the documentation at

http://www.php.net/docs.php

Hopefully you can get it to work...



[2001-07-22 20:21:16] [EMAIL PROTECTED]

Ouch Andy, that seemed pretty harsh.

Anyways,  do you have a page up I can look at with phpinfo() in it?  If not just make 
a quick page like so

?php
phpinfo();
?

-Chris



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=12310


Edit this bug report at http://bugs.php.net/?id=12310edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12323 Updated: // comment tag does not work

2001-07-23 Thread cnewbill

ID: 12323
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Output Control
Operating System: Mac OS X
PHP Version: 4.0.6
New Comment:

The only situation I can think of where this would happen is

?php // print stuff; ?

i.e. one liners

If this is your case this is expected behavior IIRC.  Otherwsie submit a small script 
that reproduces the problem.

-Chris

Previous Comments:


[2001-07-23 17:19:38] [EMAIL PROTECTED]

When I use the // as the comment, the text behind the tag 
is displayed out to the user.  I can replace it with a /* 
and put a */ at the end to make it work.  But I was 
hoping I had missed some compile option or something that 
is causing this to not work.





To make the installs on my G3 PowerMac Laptop, I have used 
the instructions found at: http://www.devshed.com/
Server_Side/Administration/BuildingOnOSX/

Any suggestions are welcome.

Thanks,
Lael






Edit this bug report at http://bugs.php.net/?id=12323edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12323 Updated: // comment tag does not work

2001-07-23 Thread cnewbill

ID: 12323
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Output Control
Operating System: Mac OS X
PHP Version: 4.0.6
New Comment:

Okay it would happen on more than one liners.

basically if you have a ? on the same line as the // comment it will do this.

I know there is some other bugs on this same problem, but I don't have the numbers 
handy.

-Chris

Previous Comments:


[2001-07-23 18:31:24] [EMAIL PROTECTED]

The only situation I can think of where this would happen is

?php // print stuff; ?

i.e. one liners

If this is your case this is expected behavior IIRC.  Otherwsie submit a small script 
that reproduces the problem.

-Chris



[2001-07-23 17:19:38] [EMAIL PROTECTED]

When I use the // as the comment, the text behind the tag 
is displayed out to the user.  I can replace it with a /* 
and put a */ at the end to make it work.  But I was 
hoping I had missed some compile option or something that 
is causing this to not work.





To make the installs on my G3 PowerMac Laptop, I have used 
the instructions found at: http://www.devshed.com/
Server_Side/Administration/BuildingOnOSX/

Any suggestions are welcome.

Thanks,
Lael






Edit this bug report at http://bugs.php.net/?id=12323edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13241: round() failed elementary level math

2001-09-10 Thread cnewbill

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.x
PHP version:  4.0.6
PHP Bug Type: Math related
Bug description:  round() failed elementary level math

[Post from PHP-DEV]

?php

$x = 10.95;
$y = 0.70;

$e = $x*$y;

print Discounted price = $e\n;

var_dump($e);

$z = round($e, 2);

var_dump($z);

print Rounded Price = $z\n;

// this works grrr

$x = round(7.665, 2);

print Working example of round = $x\n;

?

Produces

[cnewbill@storm cnewbill]$ php -q t.php
Discounted price = 7.665
float(7.665)
float(7.66)
Rounded Price = 7.66
Working example of round = 7.67
[cnewbill@storm cnewbill]$ php -v
4.0.6

Which is wrong, it should be 7.67.  If I don't do the multiplication and
simply send round 7.665 it works right!!??

Any ideas?

-Chris

-- 
Edit bug report at: http://bugs.php.net/?id=13241edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13880 Updated: date(I) does not correctly identify daylight saving time

2001-10-30 Thread cnewbill

ID: 13880
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Date/time related
Operating System: Windows NT/XP
PHP Version: 4.0.6
New Comment:

Two obvious problems with your test script.

I should be in quotes, and = should be ==.  Make those changes and try again.

This works okay on Linux.

-Chris

Previous Comments:


[2001-10-30 19:25:30] [EMAIL PROTECTED]

There appears to be a bug in the date() function when using the I (capital i) format.  
Date(I) always returns 0 (zero) no matter what the date is.  Date(I) is used to 
determin if a date occurs during daylight saving time or not.  Here is the script I am 
using:

if (date(I, mktime(0,0,0,6,1,2001))=1) {
do this;
} else {
do that;
}

No mater what the date is it always returns zero.  I have tried setting date(I) to a 
variable outside of the if/then statement but it always sets the variable to zero.  I 
have tried setting the timestamp to a variable first and using it in date():

$ts = mktime(0,0,0,6,1,2001);
$ds = date(I, $ts);

That doesn't work either, returns zero. No matter what I do it just doesn't work.  
Does this part of date() even work?

Running PHP 4.05 with Zend Optimizer v1.1.0 on Windows NT 4.0 build 1381, CGI version, 
Apache/1.3.20 .  Also doesn't work on PHP 4.06 on Windows XP, CGI version, 
Apache/1.3.22.

Thank you for your consideration and hard work.  PHP is a great product.  Keep up the 
good work!

Bradford Plummer





Edit this bug report at http://bugs.php.net/?id=13880edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13880 Updated: date(I) does not correctly identify daylight saving time

2001-10-30 Thread cnewbill

ID: 13880
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Bogus
Bug Type: Date/time related
Operating System: Windows NT/XP
PHP Version: 4.0.6
New Comment:

Works on Windows XP as well with 4.0.6.

-Chris

Previous Comments:


[2001-10-30 19:33:48] [EMAIL PROTECTED]

Two obvious problems with your test script.

I should be in quotes, and = should be ==.  Make those changes and try again.

This works okay on Linux.

-Chris



[2001-10-30 19:25:30] [EMAIL PROTECTED]

There appears to be a bug in the date() function when using the I (capital i) format.  
Date(I) always returns 0 (zero) no matter what the date is.  Date(I) is used to 
determin if a date occurs during daylight saving time or not.  Here is the script I am 
using:

if (date(I, mktime(0,0,0,6,1,2001))=1) {
do this;
} else {
do that;
}

No mater what the date is it always returns zero.  I have tried setting date(I) to a 
variable outside of the if/then statement but it always sets the variable to zero.  I 
have tried setting the timestamp to a variable first and using it in date():

$ts = mktime(0,0,0,6,1,2001);
$ds = date(I, $ts);

That doesn't work either, returns zero. No matter what I do it just doesn't work.  
Does this part of date() even work?

Running PHP 4.05 with Zend Optimizer v1.1.0 on Windows NT 4.0 build 1381, CGI version, 
Apache/1.3.20 .  Also doesn't work on PHP 4.06 on Windows XP, CGI version, 
Apache/1.3.22.

Thank you for your consideration and hard work.  PHP is a great product.  Keep up the 
good work!

Bradford Plummer





Edit this bug report at http://bugs.php.net/?id=13880edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13888 Updated: Date + October

2001-10-31 Thread cnewbill

ID: 13888
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Bogus
Bug Type: Date/time related
Operating System: Red Hat 6.2
PHP Version: 4.0.4pl1
New Comment:

There is no Novemeber 31st, this is why it is returning December; it skips to the 
equivalent day which would be the 1st of Dec. Same with Septemeber.

This is desired behavior.

-Chris


Previous Comments:


[2001-10-31 12:07:52] [EMAIL PROTECTED]

might be daylight saving time related?

it's always better to use mktime(12,0,0,...
instead of mktime(0,0,0,... 
when you care about date only but not time ...



[2001-10-31 11:57:25] [EMAIL PROTECTED]

I have a problem with date() function;

In my PC, Today is 31-October-2001.
I would like to obtain precedent month and next month with this clause:

$month_before = date('m',  mktime(0,0,0,date(m)-1,date(d),date(Y)));

$month_next = date('m',  mktime(0,0,0,date(m)+1,date(d),date(Y)));

Surprisingly, I get this result:
$month_before is equal to 10
$month_next is equal to 12

This error just ocurrs this day 31-10-2001. Another day is ok.

I don't understand it !!!

Can anyone help me ??





Edit this bug report at http://bugs.php.net/?id=13888edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13888 Updated: Date + October

2001-10-31 Thread cnewbill

ID: 13888
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Date/time related
Operating System: Red Hat 6.2
PHP Version: 4.0.4pl1
New Comment:

Again same result and same reason.  What does April 30th and June 30th have to do with 
your problem??

Last I checked the calendar works like this

So you're telling me that 9/31 isn't the same calendar day as October 1st and 
Novemember 31st isn't the same calendar day as Dec 1st??

Sept   Oct  Nov  Dec
30 1 2 3 ... 31 1 2 3 ... 30 1 2 3

?php

print May\n;
print Before: .date(m, mktime(0,0,0,(5-1),31,2001)).\n;
print After: .date(m, mktime(0,0,0,(5+1),31,2001)). \n;

print October\n;
print Before: .date(m, mktime(0,0,0,(10-1),31,2001)).\n;
print After: .date(m, mktime(0,0,0,(10+1),31,2001)). \n;

?

[cnewbill@storm cnewbill]$ php -q t.php
May
Before: 05
After: 07
October
Before: 10
After: 12

-Chris

Previous Comments:


[2001-10-31 12:26:45] [EMAIL PROTECTED]

I'm disagree with cnewbill.

For example in 30 Apr, next was 01 May, and in 30 Jun next was 01 Jul.

Why in october doesn't it work?



[2001-10-31 12:11:16] [EMAIL PROTECTED]

There is no Novemeber 31st, this is why it is returning December; it skips to the 
equivalent day which would be the 1st of Dec. Same with Septemeber.

This is desired behavior.

-Chris




[2001-10-31 12:07:52] [EMAIL PROTECTED]

might be daylight saving time related?

it's always better to use mktime(12,0,0,...
instead of mktime(0,0,0,... 
when you care about date only but not time ...



[2001-10-31 11:57:25] [EMAIL PROTECTED]

I have a problem with date() function;

In my PC, Today is 31-October-2001.
I would like to obtain precedent month and next month with this clause:

$month_before = date('m',  mktime(0,0,0,date(m)-1,date(d),date(Y)));

$month_next = date('m',  mktime(0,0,0,date(m)+1,date(d),date(Y)));

Surprisingly, I get this result:
$month_before is equal to 10
$month_next is equal to 12

This error just ocurrs this day 31-10-2001. Another day is ok.

I don't understand it !!!

Can anyone help me ??





Edit this bug report at http://bugs.php.net/?id=13888edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13884 Updated: Arrays does not work good in objects

2001-10-31 Thread cnewbill

ID: 13884
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Class/Object related
Operating System: Win98
PHP Version: 4.0.6
New Comment:

RTFM
http://www.php.net/manual/en/language.oop.php

HINT: You should not be using a $

WRONG : $this-$items['foo']='test';
RIGHT : $this-items['foo']='test';

WRONG : echo $test-$items['bar']; (unless you had a global items array with 
items['bar'] = items['foo'])
RIGHT : echo $test-items['bar'];

-Chris

Previous Comments:


[2001-10-31 06:17:50] [EMAIL PROTECTED]

?
 class test{
  var $items;
  function test1(){
   $this-$items['foo']='test';   
  }
 }
 $test=new test;
 $test-test1();
 echo $test-$items['bar'];
?
last line will output test





Edit this bug report at http://bugs.php.net/?id=13884edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13900 Updated: date(I) does not correctly identify daylight saving time

2001-11-01 Thread cnewbill

ID: 13900
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Date/time related
Operating System: Windows NT/XP
PHP Version: 4.0.6
New Comment:

See http://bugs.php.net/bug.php?id=13888 for why the months are doubled.

Here is my result from first script

C:\phpphp t.php
X-Powered-By: PHP/4.0.6
Content-type: text/html

11

All 1's not 0's.

Second script 110

I have NO clue what it is doing on your box, mine is Windows XP RC2 I don't have 
access to any other windows version right now only Linux.  Can someone else verify 
this on NT4?  I am using the exact same PHP on XP as you.

-Chris

Previous Comments:


[2001-11-01 09:52:59] [EMAIL PROTECTED]

Bug id #13880
Status: Bogus  User Modify   Dev Modify 
From: [EMAIL PROTECTED] 
Reported: 2001-10-30 19:25:30 
Type: Date/time related 
OS: Windows NT/XP 
PHP Version: 4.0.6 
Summary: date(I) does not correctly identify daylight saving time 


[2001-10-30 19:25:30] [EMAIL PROTECTED]

There appears to be a bug in the date() function when using the I (capital i) format. 
Date(I) always returns 0 (zero) no matter what the date is.  Date(I) is used to 
determin
if a date occurs during daylight saving time or not.  Here is the script I am using:

if (date(I, mktime(0,0,0,6,1,2001))=1) {
do this;
} else {
do that;
}

No mater what the date is it always returns zero.  I have tried setting date(I) to a
variable outside of the if/then statement but it always sets the variable to zero.  I 
have
tried setting the timestamp to a variable first and using it in date():

$ts = mktime(0,0,0,6,1,2001);
$ds = date(I, $ts);

That doesn't work either, returns zero. No matter what I do it just doesn't work.  
Does
this part of date() even work?

Running PHP 4.05 with Zend Optimizer v1.1.0 on Windows NT 4.0 build 1381, CGI version,
Apache/1.3.20 .  Also doesn't work on PHP 4.06 on Windows XP, CGI version,
Apache/1.3.22.

Thank you for your consideration and hard work.  PHP is a great product.  Keep up the 
good
work!

Bradford Plummer
[2001-10-30 19:33:48] [EMAIL PROTECTED]

Two obvious problems with your test script.

I should be in quotes, and = should be ==.  Make those changes and try again.

This works okay on Linux.

-Chris
[2001-10-30 19:36:28] [EMAIL PROTECTED]

Works on Windows XP as well with 4.0.6.

-Chris
[2001-10-30 19:36:33] [EMAIL PROTECTED]

Works on Windows XP as well with 4.0.6.

-Chris
[2001-11-01 01:34:05] [EMAIL PROTECTED]

cnewbill said this:

Two obvious problems with your test script.
I should be in quotes, and = should be ==.  Make those changes and try again.
This works okay on Linux.
-Chris

--

First of all...
You are right.  I left the quotes out of my bug report.  I was, however, using them in 
the
actual script.  If you tested my script you may have also noticed that the following
commands return a zero on a Win32 system when they should return a one:

echo date(I, mktime(0,0,0,5,1,2001));
echo date(I, mktime(0,0,0,6,1,2001));
echo date(I, mktime(0,0,0,7,1,2001));
echo date(I, mktime(0,0,0,8,1,2001));
echo date(I, mktime(0,0,0,9,1,2001));
echo date(I, mktime(0,0,0,10,1,2001));

  Also returning a zero instead of a one are:

echo date(I, mktime(0,0,0,date(m)-1,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-2,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-3,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-4,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-5,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-6,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-7,date(d), 
date(Y)));

So it doesn't seem to matter how I format the original if/then statement because 
it
will always evaluate incorrectly because date() is doing something screwy on Win32.  
Also,
I found something else while working on this.  When using the M format, date() has a
problem figuring out what month name it is supposed to return.  Here is some example
script:

echo date(M, I, mktime(0,0,0,date(m)-1,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-2,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-3,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-4,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-5,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-6,date(d), 
date(Y)));
echo br;
echo date(M, I, mktime(0,0,0,date(m)-7,date(d), 
date(Y)));

  That script returns this on my Win32 system:

Oct, 0
Aug, 0
Jul, 0
Jul, 0
May, 0
May, 0
Mar, 0

  At least it did for my yesterday (31 Oct 2001).  Notice how Jul and May are 
doubled?
 What happened

[PHP-DEV] Bug #13900 Updated: date(I) does not correctly identify daylight saving time

2001-11-01 Thread cnewbill

ID: 13900
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Date/time related
Operating System: Windows NT/XP
PHP Version: 4.0.6
New Comment:

You said you were running it as a CGI therefore my test should be equivalent without 
me having to use Apache.

I don't see how the CGI being called through Apache could do this.  BUT jic, please 
try executing your PHP CGI from the command line against those test scripts and see if 
you get the same results.

-Chris

Previous Comments:


[2001-11-01 15:32:35] [EMAIL PROTECTED]

Well, I am getting zeros...  I get in on PHP 4.06 on Windows XP pro and I get zeros on 
PHP 4.05 on Windows NT 4.0.  both are running on Apache.  Maybe that is the issue.  
Are you running PHP on Apache?



[2001-11-01 14:13:27] [EMAIL PROTECTED]

See http://bugs.php.net/bug.php?id=13888 for why the months are doubled.

Here is my result from first script

C:\phpphp t.php
X-Powered-By: PHP/4.0.6
Content-type: text/html

11

All 1's not 0's.

Second script 110

I have NO clue what it is doing on your box, mine is Windows XP RC2 I don't have 
access to any other windows version right now only Linux.  Can someone else verify 
this on NT4?  I am using the exact same PHP on XP as you.

-Chris



[2001-11-01 09:52:59] [EMAIL PROTECTED]

Bug id #13880
Status: Bogus  User Modify   Dev Modify 
From: [EMAIL PROTECTED] 
Reported: 2001-10-30 19:25:30 
Type: Date/time related 
OS: Windows NT/XP 
PHP Version: 4.0.6 
Summary: date(I) does not correctly identify daylight saving time 


[2001-10-30 19:25:30] [EMAIL PROTECTED]

There appears to be a bug in the date() function when using the I (capital i) format. 
Date(I) always returns 0 (zero) no matter what the date is.  Date(I) is used to 
determin
if a date occurs during daylight saving time or not.  Here is the script I am using:

if (date(I, mktime(0,0,0,6,1,2001))=1) {
do this;
} else {
do that;
}

No mater what the date is it always returns zero.  I have tried setting date(I) to a
variable outside of the if/then statement but it always sets the variable to zero.  I 
have
tried setting the timestamp to a variable first and using it in date():

$ts = mktime(0,0,0,6,1,2001);
$ds = date(I, $ts);

That doesn't work either, returns zero. No matter what I do it just doesn't work.  
Does
this part of date() even work?

Running PHP 4.05 with Zend Optimizer v1.1.0 on Windows NT 4.0 build 1381, CGI version,
Apache/1.3.20 .  Also doesn't work on PHP 4.06 on Windows XP, CGI version,
Apache/1.3.22.

Thank you for your consideration and hard work.  PHP is a great product.  Keep up the 
good
work!

Bradford Plummer
[2001-10-30 19:33:48] [EMAIL PROTECTED]

Two obvious problems with your test script.

I should be in quotes, and = should be ==.  Make those changes and try again.

This works okay on Linux.

-Chris
[2001-10-30 19:36:28] [EMAIL PROTECTED]

Works on Windows XP as well with 4.0.6.

-Chris
[2001-10-30 19:36:33] [EMAIL PROTECTED]

Works on Windows XP as well with 4.0.6.

-Chris
[2001-11-01 01:34:05] [EMAIL PROTECTED]

cnewbill said this:

Two obvious problems with your test script.
I should be in quotes, and = should be ==.  Make those changes and try again.
This works okay on Linux.
-Chris

--

First of all...
You are right.  I left the quotes out of my bug report.  I was, however, using them in 
the
actual script.  If you tested my script you may have also noticed that the following
commands return a zero on a Win32 system when they should return a one:

echo date(I, mktime(0,0,0,5,1,2001));
echo date(I, mktime(0,0,0,6,1,2001));
echo date(I, mktime(0,0,0,7,1,2001));
echo date(I, mktime(0,0,0,8,1,2001));
echo date(I, mktime(0,0,0,9,1,2001));
echo date(I, mktime(0,0,0,10,1,2001));

  Also returning a zero instead of a one are:

echo date(I, mktime(0,0,0,date(m)-1,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-2,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-3,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-4,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-5,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-6,date(d), 
date(Y)));
echo date(I, mktime(0,0,0,date(m)-7,date(d), 
date(Y)));

So it doesn't seem to matter how I format the original if/then statement because 
it
will always evaluate incorrectly because date() is doing something screwy on Win32.  
Also,
I found something else while working on this.  When using the M format, date() has a
problem figuring out what month name it is supposed to return.  Here is some

[PHP-DEV] Bug #13909 Updated: Parsed .php as .html error when parsed .shtml as .html exist

2001-11-02 Thread cnewbill

ID: 13909
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: *Configuration Issues
Operating System: Linux RH 7
PHP Version: 4.0.6
New Comment:

I am pretty sure Apache 1.3.x only allows one processor for an extension.  There are 
convuleted (VERY) ways to do this, but why???  Why would you want this?? :)  
Everything shtml can do, so can PHP and more.

-Chris

Previous Comments:


[2001-11-02 13:23:11] [EMAIL PROTECTED]

AFAIK, you can't with 1.3.x. You can try 2.0, which is still in beta (or alpha?).



[2001-11-02 13:06:56] [EMAIL PROTECTED]

When both server-parse exist in httpd.conf, one will not work. How to make Apache to 
parse .php as .html and then follow by parsing .shtml as .html.

My conf is as followed:
 
AddType application/x-httpd-php .php .html
AddType application/x-httpd-php-source .phps

AddType text/html .shtml .html
AddHandler server-parsed .shtml .html

---

Help please,

Cheers,
Earnpin Lee, [EMAIL PROTECTED]





Edit this bug report at http://bugs.php.net/?id=13909edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13912 Updated: Array index references inside double quotes cause parse errors

2001-11-02 Thread cnewbill

ID: 13912
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Arrays related
Operating System: Redhat Linux - Kernel 2.4.12
PHP Version: 4.0.6
New Comment:

RTM
http://www.php.net/manual/en/migration4.strings.php

-Chris

Previous Comments:


[2001-11-02 17:38:38] [EMAIL PROTECTED]

A parse error results when an increment or decrement operator is used in an array 
index that falls between double quotes. 

For example:
?
$a = array(1 = un, deux, trois, quatre, cinq);
$i = 1;
while ($i  5) echo Number $i is $a[$i++]br /;
?

Yields - Parse error: parse error, expecting `']'' in public_html/testarray.php on 
line 4

While this works fine: 

while ($i  5) echo Number $i is . $a[$i++] .br /;

I think this is part of a larger issue of resolving references inside quoted array 
indexes. It seems an error occurs whenever using an index that's anything more 
complicated than a literal value or a simple variable. 

For example, given a function returnNumber() that simply returns whatever number you 
pass to it, this line produces a parse error:

echo Number 2 is $a[returnNumber(2)]br /;

While this one prints out the translation for the number 2, as expected:

echo Number 2 is .$a[returnNumber(2)].br /;






Edit this bug report at http://bugs.php.net/?id=13912edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13918 Updated: PHP can't find mysql.sock

2001-11-03 Thread cnewbill

ID: 13918
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: MySQL related
Bug Type: Feature/Change Request
Operating System: OS-X
PHP Version: 4.0.6
New Comment:

ehh so where's the bug?

-Feature Request

Previous Comments:


[2001-11-03 12:56:01] [EMAIL PROTECTED]

Hi,

OS-X stores this in /Private/tmp/mysql.sock - the configure script just needs to 
search that dir too. Any php script comes up with can't find /tmp/mysql.sock 
(unsurprisingly).

I recompiled and reinstalled with that added in and it works fine now.

Thanks,

John





Edit this bug report at http://bugs.php.net/?id=13918edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14088 Updated: help

2001-11-16 Thread cnewbill

ID: 14088
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: PHP options/info functions
Operating System: unix
PHP Version: 4.0.6
New Comment:

Please speak American on your site. :)

This is not a support forum, mail [EMAIL PROTECTED] with your problems.

-Chris

Previous Comments:


[2001-11-16 17:06:13] [EMAIL PROTECTED]

see bugs in my web page www.7lem.com
php bug





Edit this bug report at http://bugs.php.net/?id=14088edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14090 Updated: Good job guys

2001-11-16 Thread cnewbill

ID: 14090
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: *General Issues
Operating System: Windows 98
PHP Version: 4.0.6
New Comment:

Thanx from all.

Bogus though :)

-Chris

Previous Comments:


[2001-11-16 21:21:28] [EMAIL PROTECTED]

Relax I'm not reporting a bug, I just thought I'd congradulate you guys. I used to 
program with Perl until i discovered PHP. PHP is so much simpler and more powerful 
than Perl, especially when interfacing with mysql. And the transition from Perl to PHP 
was made simpler by the addition of functions like preg_split which allows you to use 
perl regular expression syntax. Incredible job guys, keep it up!





Edit this bug report at http://bugs.php.net/?id=14090edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14118 Updated: Upload file more than 1 Mb doesn´t work

2001-11-19 Thread cnewbill

ID: 14118
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: linux redhat 7.1
PHP Version: 4.0.4pl1
New Comment:

With an older 4.2.0-dev I can get up to about 6MB.

Local File: /tmp/php4Za1Aa 
Name: ecdc_v502b_up.exe 
Size: 5855275 
Type: application/octet-stream 

Like derick said please try latest CVS and report back.

You can grab it from http://snaps.php.net/.  I'll try it myself too.

-Chris


Previous Comments:


[2001-11-19 12:59:50] [EMAIL PROTECTED]


My apache version is: Apache/1.3.14
I use internet explorer 5.5 and netscape 4.75 but the problem persist
I erased the line INPUT TYPE=hidden name=MAX_FILE_SIZE
value=1024000 but doesn´t work.

If you see my script I print the upload variables, if I upload a file lower 2 Mb, the 
variables are printed, but if I transfer a higher file the variables aren´t printed 
and not copy the file in server.

Thanks







[2001-11-19 12:39:47] [EMAIL PROTECTED]

Should be fixed in CVS. Can you try a snapshot from snaps.php.net? Please reopen if 
the problem persists.

Derick



[2001-11-19 12:39:27] [EMAIL PROTECTED]

Maybe I am pointing out the obvious here, but this line would prevent you from doing 
so.

INPUT TYPE=hidden name=MAX_FILE_SIZE value=1024000

Cause I believe it OVERRIDES php.ini value.

So if for some reason I am not stating the obvious remove this line and try again.

-Chris




[2001-11-19 12:34:19] [EMAIL PROTECTED]

Which version of Apache runs you?
I note same problem with IE 5.x. Try you script with 
Netscape. I think its a problem with your Browser.



[2001-11-19 11:55:38] [EMAIL PROTECTED]

I have a little script for uploading files, all work fine with files lower than 1 mb 
but if I try to upload a higher file I get the next browser error The page cannot be 
displayed.

My script is:

? //check for file upload
if ($set==go)
{
if (is_uploaded_file($UploadedFile))
{
print(Local File: $UploadedFile BR\n);
print(Name: $UploadedFile_name BR\n);
print(Size: $UploadedFile_size BR\n);
print(Type: $UploadedFile_type BR\n);
print(HR\n);
 }
}
?

FORM ENCTYPE=multipart/form-data
ACTION=test.php METHOD=POST
INPUT TYPE=hidden name=MAX_FILE_SIZE
value=1024000
INPUT NAME=UploadedFile TYPE=file
INPUT TYPE=hidden name=set value=go
INPUT TYPE=submit VALUE=Upload
/FORM
/BODY
/HTML

My php.ini has a very higher configuration limits.

The parameters are:
max_execution_time = 3000
memory_limit = 16M
post_max_size   =   80M  

; File Uploads ;

file_uploads= On
upload_tmp_dir  = /tmp  
upload_max_filesize = 80M   


I read that the solution is upgrade php, I´m hoping that there are other solutions.

Thanks

Mauricio






Edit this bug report at http://bugs.php.net/?id=14118edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14118 Updated: Upload file more than 1 Mb doesn´t work

2001-11-19 Thread cnewbill

ID: 14118
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: Unknown/Other Function
Operating System: linux redhat 7.1
PHP Version: 4.0.4pl1
New Comment:

Doesn't outright die anymore with today's (11/19) snapshot, but it still doesn't work. 
 Just doesn't POST anything now.

My max size 2GB, should be more than enough to cover the 9MB+ file(s) I am using to 
test.

-Chris

Previous Comments:


[2001-11-19 13:21:19] [EMAIL PROTECTED]

With an older 4.2.0-dev I can get up to about 6MB.

Local File: /tmp/php4Za1Aa 
Name: ecdc_v502b_up.exe 
Size: 5855275 
Type: application/octet-stream 

Like derick said please try latest CVS and report back.

You can grab it from http://snaps.php.net/.  I'll try it myself too.

-Chris




[2001-11-19 12:59:50] [EMAIL PROTECTED]


My apache version is: Apache/1.3.14
I use internet explorer 5.5 and netscape 4.75 but the problem persist
I erased the line INPUT TYPE=hidden name=MAX_FILE_SIZE
value=1024000 but doesn´t work.

If you see my script I print the upload variables, if I upload a file lower 2 Mb, the 
variables are printed, but if I transfer a higher file the variables aren´t printed 
and not copy the file in server.

Thanks







[2001-11-19 12:39:47] [EMAIL PROTECTED]

Should be fixed in CVS. Can you try a snapshot from snaps.php.net? Please reopen if 
the problem persists.

Derick



[2001-11-19 12:39:27] [EMAIL PROTECTED]

Maybe I am pointing out the obvious here, but this line would prevent you from doing 
so.

INPUT TYPE=hidden name=MAX_FILE_SIZE value=1024000

Cause I believe it OVERRIDES php.ini value.

So if for some reason I am not stating the obvious remove this line and try again.

-Chris




[2001-11-19 12:34:19] [EMAIL PROTECTED]

Which version of Apache runs you?
I note same problem with IE 5.x. Try you script with 
Netscape. I think its a problem with your Browser.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14118


Edit this bug report at http://bugs.php.net/?id=14118edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13940 Updated: mysql_select_db doesn't honor resource_identifier param

2001-11-20 Thread cnewbill

ID: 13940
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Bogus
Status: Duplicate
Bug Type: MySQL related
Operating System: RedHat 7.1
PHP Version: 4.2.0-dev
New Comment:

Ehh not bogus.  Like you said is a dupe.  Even though I reported it before 14137.

Oh well,
-Chris

Previous Comments:


[2001-11-20 18:42:25] [EMAIL PROTECTED]

This is basically a dup of #14137, bogusifying this one.



[2001-11-05 19:42:17] [EMAIL PROTECTED]

I can already hear the lame 'expected behavior, use mysql_select_db() before each 
query, blah, blah' excuses coming, but...

If you are able to set properties per connection resource, one would think that 
those properties stay with that connection resource and do not get overriden by 
setting properties for other connection resources.  This implementation seems rather 
misleading.  Not sure where to point the finger here, Zend Resource Management???

-Chris

yes I am aware I copy+pasted passwords, they are changed , not that you can access 
that server anyways :) 



[2001-11-05 19:19:30] [EMAIL PROTECTED]

I need multiple connections to the same MySQL server to two different databases and 
mysql_select_db() is not honoring the resource_identifier, it is using the one of that 
last connection opened.

//script
?php

// test mysql_select_db with two active connections

$conn1 = mysql_connect(localhost, root ,#rain!);

if (!$conn1) {
print Could not connect to server one\n;
} else {
if (!mysql_select_db(st2, $conn1))
print Could not select DB on server one .mysql_error($conn1).\n;
}

$conn2 = mysql_connect(localhost, root ,#rain!);

if (!$conn2) {
print Could not connect to server two\n;
} else {
if (!mysql_select_db(commercesys, $conn2))
print Could not select DB on server two .mysql_error($conn2).\n;
}

if (!mysql_query(select * from user, $conn1)) {
print Could not issue query to conn1 .mysql_error($conn1).\n;
}

if (!mysql_query(select * from customer, $conn2)) {
print Could not issue query to conn2 .mysql_error($conn2).\n;
}

?

OUTPUT:
Could not issue query to conn1 Table 'commercesys.user' doesn't exist

If you flip the connect blocks you get:
Could not issue query to conn2 Table 'st2.customer' doesn't exist

I'll look at the source, but this is not too cool.

-Chris






Edit this bug report at http://bugs.php.net/?id=13940edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13831 Updated: Assigning to multi-dimensional $HTTP_SESSION_VARS array not restored

2001-11-26 Thread cnewbill

ID: 13831
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: FreeBSD 4.2
PHP Version: 4.0.6
New Comment:

Maybe you should appreciate the fact that this is a free service and if your time is 
so valuable that you can't put in a percentage of what you get out then you are more 
than welcome to pay for commercial support 
http://www.zend.com/store/products/zendsupport.php.  

Freeloaders,

Sigh

Previous Comments:


[2001-11-27 00:17:30] [EMAIL PROTECTED]

I am not paid to be your QA person.  You test in the latest CVS.  I don't even have 
the latest CVS installed, nor would I take the time to install it at my cost.

The concise code example is already given in my original post.  It says that the 
variable is not restored.  Put it in a session and see if it is restored.  Simply and 
that is your job sniper, not mine.

Please appreciate the people who come here to spend their valuable time to help you by 
reporting by a bug.  Or disrespect us by marking a bug as closed because we won't do 
your job for you.

Sigh.




[2001-11-24 20:09:09] [EMAIL PROTECTED]

Please try the latest CVS snapshot from 
http://snaps.php.net/ and if you can reproduce this with 
it, add a complete but short example script into this report.





[2001-10-25 20:42:44] [EMAIL PROTECTED]

Further searching reveals this may be a duplicate or related to Bug id #12859.

Perhaps my example/explanation is more concise.




[2001-10-25 19:42:08] [EMAIL PROTECTED]

I did:

session_register( SESSION );

The following array element is not restored on session_start() of next page:

$HTTP_SESSION_VARS[SESSION][class_name] = new ClassName();

Whereas any of the following are restored (each tested independently):

$SESSION[class_name] = new ClassName();
$GLOBALS[SESSION][class_name] = new ClassName();
$HTTP_SESSION_VARS[SESSION] = new ClassName();

I also have a question which I have not tested.  Obviously this question affects 
whether I can work around this bug with register_globals off.  When register_globals 
is turned off, will $GLOBALS[SESSION] still represent the same registed session 
variable?  Or am I forced to use $HTTP_SESSION_VARS in that case?  The Sessions 
documentation does not mention $GLOBALS and seems to imply strongly the latter where 
it says:

Quoted from http://www.php.net/manual/en/ref.session.php:

If track_vars is enabled and register_globals is disabled, only members of the global 
associative array $HTTP_SESSION_VARS can be registered as session variables. The 
restored session variables will only be available in the array $HTTP_SESSION_VARS.








Edit this bug report at http://bugs.php.net/?id=13831edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14244 Updated: A bug about integer operation /

2001-11-26 Thread cnewbill

ID: 14244
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Variables related
Operating System: linux
PHP Version: 4.0.6
New Comment:

RTM http://www.php.net/manual/en/language.operators.php

The division operator (/) returns an integer value (the result of an integer 
division) if the two operands are integers (or strings that get converted to integers) 
and the quotient is an integer. If either operand is a floating-point value, or 
the operation results in a non-integer value, a floating-point value is returned.

-Chris

Previous Comments:


[2001-11-27 01:06:51] [EMAIL PROTECTED]

Here is a short test program :
?
#test.php of integer operation by /
  $total=13;
  printf (total %d  type %sBR,$total,gettype($total));
  $each=10;
  printf (each %d  type %sBR,$each,gettype($each));
  $page=$total/$each;
  print (Page is $page);
?

The output is 1.3
not as the expect 1
-
configure command

./configure --with-apache=/home/zlq/bin/apache_1.3.22
--with-mysql=/mysql
--with-xml
--with-charset=gb2312
--disable-debug
--enable-ftp


---
INIT_VERSION :sysinit-2.78
HOSTTYPE:i386






Edit this bug report at http://bugs.php.net/?id=14244edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14244 Updated: A bug about integer operation /

2001-11-27 Thread cnewbill

ID: 14244
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Variables related
Operating System: linux
PHP Version: 4.0.6
New Comment:

Yes, did you read the part in ?  Obviously not.

If either operand is a floating-point value, or the operation results in a 
non-integer value, a floating-point value is returned.

The operation 13/10 will result in 1.3 which is a float, so a floating point value is 
returned.

-Chris

Previous Comments:


[2001-11-27 04:08:33] [EMAIL PROTECTED]

Again:

If either operand is a
floating-point value, or the operation results in a non-integer value, a
floating-point value is returned.

The division returns a floatingpoint value.



[2001-11-27 02:17:50] [EMAIL PROTECTED]

Bug Database [EMAIL PROTECTED] 

Did you see my program?,and dir you run them?
obviously, the two operands are ***integers ***.



[2001-11-27 01:16:50] [EMAIL PROTECTED]

RTM http://www.php.net/manual/en/language.operators.php

The division operator (/) returns an integer value (the result of an integer 
division) if the two operands are integers (or strings that get converted to integers) 
and the quotient is an integer. If either operand is a floating-point value, or 
the operation results in a non-integer value, a floating-point value is returned.

-Chris



[2001-11-27 01:06:51] [EMAIL PROTECTED]

Here is a short test program :
?
#test.php of integer operation by /
  $total=13;
  printf (total %d  type %sBR,$total,gettype($total));
  $each=10;
  printf (each %d  type %sBR,$each,gettype($each));
  $page=$total/$each;
  print (Page is $page);
?

The output is 1.3
not as the expect 1
-
configure command

./configure --with-apache=/home/zlq/bin/apache_1.3.22
--with-mysql=/mysql
--with-xml
--with-charset=gb2312
--disable-debug
--enable-ftp


---
INIT_VERSION :sysinit-2.78
HOSTTYPE:i386






Edit this bug report at http://bugs.php.net/?id=14244edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13831 Updated: Assigning to multi-dimensional $HTTP_SESSION_VARS array not restored

2001-11-27 Thread cnewbill

ID: 13831
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: FreeBSD 4.2
PHP Version: 4.0.6
New Comment:

Yes, it is the way he and most of the people who volunteer their time goes about it.  
The source is constantly changing and chances are pretty good if you've found a bug; 
one of the millions of other PHP users has found it as well and it's already been 
fixed or is known of.

So if you could take 10 minutes of your valuable time and perform a simple, concise 
test, then we would know if it is indeed still present in the code.

It may not be the most efficient system, but it works better if everyone does what 
they can.  If you're persistent on being anal about this, send me 
([EMAIL PROTECTED]) your script(s) and I will test it myself.

-Chris

Previous Comments:


[2001-11-27 00:51:08] [EMAIL PROTECTED]

BTW, nothing is free.

Not even ignorance.




[2001-11-27 00:48:33] [EMAIL PROTECTED]

Who is freeloading?

I reported the bug already and gave a concise example.

Now sniper wants to mark it closed so he asked me to do more work, knowing if I don't 
respond he will mark it closed.  I've seen his pattern in other bugs.

Seems like sniper is the active person here, so I assume he must be the QA guy in 
charge here.  If he wants to find out if it was fixed in latest CVS, he should test 
it, not order me to do more work.

I made a contribution by taking the time to make the concise bug report.  I don't need 
the bug fixed.  I posted the bug to help out by giving a more concise example of a bug 
posted by another person.

I was trying to help sniper test it more quickly.  He shows his appreciation by 
ordering me to test it.

Sigh 2x




[2001-11-27 00:29:10] [EMAIL PROTECTED]

Maybe you should appreciate the fact that this is a free service and if your time is 
so valuable that you can't put in a percentage of what you get out then you are more 
than welcome to pay for commercial support 
http://www.zend.com/store/products/zendsupport.php.  

Freeloaders,

Sigh



[2001-11-27 00:17:30] [EMAIL PROTECTED]

I am not paid to be your QA person.  You test in the latest CVS.  I don't even have 
the latest CVS installed, nor would I take the time to install it at my cost.

The concise code example is already given in my original post.  It says that the 
variable is not restored.  Put it in a session and see if it is restored.  Simply and 
that is your job sniper, not mine.

Please appreciate the people who come here to spend their valuable time to help you by 
reporting by a bug.  Or disrespect us by marking a bug as closed because we won't do 
your job for you.

Sigh.




[2001-11-24 20:09:09] [EMAIL PROTECTED]

Please try the latest CVS snapshot from 
http://snaps.php.net/ and if you can reproduce this with 
it, add a complete but short example script into this report.





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=13831


Edit this bug report at http://bugs.php.net/?id=13831edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14200 Updated: remote navigation problem

2001-11-27 Thread cnewbill

ID: 14200
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: *General Issues
Operating System: Windows XP Pro
PHP Version: 4.0.6
New Comment:

By default the firewall is not enabled.

But JIC you can check by doing this (may be faster way)

Control Panel-Network Connections
  Right Click on Network Bridge
  Choose Properties
  Choose TCP/IP From Items List
  Click Properties
  Click Advanced
  Click Options
  Highlight TCP/IP Filtering
  Click Properites
  Either Allow Port 80 if Filtering is enabled and Port 80 is blocked or disable 
filtering.

-Chris
  
  

Previous Comments:


[2001-11-27 10:22:47] [EMAIL PROTECTED]

I might be mistaken, but AFAIK you point Apache via httpd.conf to php4apache.dll. You 
can put that dll anywhere you want, as long as Apache knows the right path.
php4ts.dll on the contrairy, should be located in your windows/system32 directory.

But I don't think that solves your problem. I think the problem is that XP has some 
kind of firewall built in, which probably denies any incoming connections. You should 
open port 80 somewhere in your controlpanel... don't ask my where as I don't have XP 
yet...



[2001-11-26 14:48:18] [EMAIL PROTECTED]

Try the new 4.1.0 release which will be available withing a day or two.

Feedback.



[2001-11-26 14:17:08] [EMAIL PROTECTED]

I have overwritten php4apache.dll with new version...but apache tell me i can't find 
php4apache.dll (it can't use new file) I have also tried to insert php4apache in 
system32 and windows directories but doesn't work!
Where is the problem? 



[2001-11-24 07:48:56] [EMAIL PROTECTED]

Put your php4apche.dll in the same directory as apache (might work) or in the sytem32 
directory (should work).

Feedback.



[2001-11-24 07:46:55] [EMAIL PROTECTED]

Scuse me .. but i've tried to install new version
php-4.1.0RC3-win32
overwriting files with new version but when i try to restart Apache fails and give an 
error:
can't found php4apache.dll in c:/ but I've overwrite old version with new!
I have also seen that are many new files that are not present in old version ( *.pdb 
*.ilk and a file php4apahe2filter.dll and .ilk)..
How I can install this version correctly?
Tnx



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14200


Edit this bug report at http://bugs.php.net/?id=14200edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14278 Updated: % and / bug with INTEGERs!

2001-11-29 Thread cnewbill

ID: 14278
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Math related
Operating System: Linux 2.2.19
PHP Version: 4.0.6
New Comment:

E:\phpphp -v
4.0.6

E:\phpphp -q test.php
101110 22
3888 14
149 19
5 5
0 0
0 0
AAFTOW

No matter how many times I run this script I always get this.  Also tested it on Linux 
(2.4), with PHP 4.2.0-dev and it works.

Please try a newer version and see if that fixes the problem you're having. 
http://www.php.net/~zeev/php-4.1.0RC3.tar.gz or 
http://snaps.php.net/php4-latest.tar.gz

-Chris


Previous Comments:


[2001-11-29 05:27:51] [EMAIL PROTECTED]

Sometimes (1 - 10 times a day) I get a strange error on one of my production servers. 
See this function:

function MakeHash($num) {
  $ret = ;
  $ca = array();
  for ($i = 0; $i  6; $i++) {
$c = $num % 26;
$ca[] = $num $c;   
$ret = sprintf(%c, 65+$c).$ret;
$num = ($num-$c)/ 26;
  }
  // Send $ca array via email to me (removed)
  return $ret;
}

Sometimes calling this function with an INT it calculates wired results... If that 
happens I mail the $ca array to myself and see what it does:

101110 19  (MEANS: 101110 % 26 is 19!? That's wrong, it is 22)
3588 24   (MEANS 101110 / 26 is 3588, but it is 3888)
1495714 12...
57527 15
2212 2
85 7

What goes wrong? In the beginning the % result is wrong, and then the division result 
is wrong too...  any suggestions!?

 /mike





Edit this bug report at http://bugs.php.net/?id=14278edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #15315 Updated: german special chars

2002-02-01 Thread cnewbill

ID: 15315
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: MSSQL related
Operating System: W2K Pro
PHP Version: 4.0.6
New Comment:

No bug = Bogus :)


Previous Comments:


[2002-02-01 13:04:07] [EMAIL PROTECTED]

Sorry, not really a bug.



[2002-01-31 10:11:10] [EMAIL PROTECTED]

PHP doesn't return german special chars like ä,ö,ü which comes from
MSSQL server, it prints  instead.





Edit this bug report at http://bugs.php.net/?id=15315edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #15396 Updated: Unable to Launch Java Application (ZDE)

2002-02-05 Thread cnewbill

 ID:   15396
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Performance problem
 Operating System: WIN2k Professional
 PHP Version:  4.1.1
 New Comment:

Zend Commercial Products !== PHP.

Goto http://www.zend.com/store/products/support.php for support of Zend
products.

-Chris


Previous Comments:


[2002-02-05 23:07:03] [EMAIL PROTECTED]

Hi,

I dowloaded PHP Zend Development Environment 2.0. I have Java1.4
installed. When I open ZDE the following error occured!! 

TIA.
sarose


 = REPORT START  =

Unable to Launch Java Application 

Unable to locate the application  'main' class. The class
'com.zend.ide.desktop.ApplicationComponent' must be public and have a
'public static void main(String [])' method. (LAX)




Application Exception Details
==
java.lang.NoClassDefFoundError: java/util/HashMap
at com/zend/ide/customization/C524.init (C524)
at com/zend/ide/customization/C524.q (C524)
at com/zend/ide/customization/C524.n (C524)
at com/zend/ide/customization/C524.p (C524)
at com/zend/ide/util/ResourceHolder.clinit (ResourceHolder)
at com/zend/ide/util/ResourceHolder.c (ResourceHolder)
at com/zend/ide/desktop/ApplicationComponent.clinit
(ApplicationComponent)
at java/lang/Class.forName (Class.java)
at com/zerog/lax/LAX.launch
at com/zerog/lax/LAX.main



 = REPORT END  =






-- 
Edit this bug report at http://bugs.php.net/?id=15396edit=1


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




[PHP-DEV] Bug #13675 Updated: SQL 7 Issues

2002-02-07 Thread cnewbill

 ID:   13675
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Advanced Server
 PHP Version:  4.0.6
 New Comment:

If BOGUS then needs to be marked as so.  I would mark it as Feedback so
we can make sure this resolves their problem, but it's been nearly 4
months since this was opened.

-Chris


Previous Comments:


[2002-02-07 23:49:54] [EMAIL PROTECTED]

You use mssql.dll not mssql70.dll (from the same PHP version) as it
changed (the name of the DLL for the extention).

So this is a BOGUS report.



[2001-10-15 16:20:53] [EMAIL PROTECTED]

Okay, i have gone through all the bug fixes relating to the missing
php_mssql70.dll and none of the fixes have worked. I have installed PHP
4.06, I have copied over the php_mssql70.dll from my older version of
php (4.04) I have put the ntwdblib.dll in c:\winnt\system32 i have put
the extension=php_msssql70.dll pointer in the php.ini, i have made sure
it is in the directory that the extension_dir is set to. I have done
everything. Please help - i keep getting this cannot load specified
procedure 'php_mssql70.dll' error. 

I have sql 7 and IIS 5




-- 
Edit this bug report at http://bugs.php.net/?id=13675edit=1


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




[PHP-DEV] Bug #15441 Updated: Cookie is set to %00 instead of erased

2002-02-08 Thread cnewbill

 ID:   15441
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Documentation problem
 Operating System: Solaris 7
 PHP Version:  4.1.1
 New Comment:

This bug has been fixed in CVS.


Previous Comments:


[2002-02-08 10:00:26] [EMAIL PROTECTED]

On the documentation page it says:

When deleting a cookie you should assure that the 
expiration date is in
the past, to trigger the removal mechanism in your 
browser.

However, since the first delete cookie example doesn't have 
any value for the expire argument, it is implied that if 
called with only the variable name, PHP will automatically 
assure that the expiration date is in the past.

The code you provided works, of course.  There is 
definately a difference in the way that PHP 4.1.x handles 
this than previous versions.

I guess this is now a documentation problem. From the 
setcookie documentation, under setcookie() delete examples, 
the first listed is:

setcookie (TestCookie);

Which in PHP 4.1.x just sets the cookie to %00 as the 
original bug stated.  I suggest removing that example.

Also the function definition should no longer suggest that 
setcookie only requires one argument.





[2002-02-08 00:51:59] [EMAIL PROTECTED]

From the setcookie page.

When deleting a cookie you should assure that the expiration date is
in the past, to trigger the removal mechanism in your browser.

Try this
setcookie($username_cookie, '', time()-3600);

-Chris




[2002-02-08 00:26:56] [EMAIL PROTECTED]

Using PHP 4.1.x, the following code, which is intended to 
delete a cookie, instead replaces the value with %00 (ascii 
entity null?)

Cookies are set with the following:

setcookie($username_cookie,'username');
setcookie($password_cookie,md5('password'));

Cookies are deleted with the following:

setcookie($username_cookie);
setcookie($password_cookie);

Yes, the $username_cookie and $password_cookie variables 
have values.

The above is case (a) in the documentation, the simplest 
case.

I've tried this on all the systems I have access to.

Affected: 
Solaris 7, PHP 4.1.0
Red Hat 7.1, PHP 4.1.1

Not Affected: 
Red Hat 7.1, PHP 4.04pl1
Mac OS X 10.1.2, PHP 4.0.6
Solaris 7, PHP 4.06

One affected system that I've used is on a web host 
(communitech.net, who just very recently moved to PHP 4.1.0 
from 3.0.9, Solaris 7).  The other is on the freshly setup 
intranet server at my employer (Linux 4.1.1).

Here's the configuration line (Solaris 7, PHP 4.1.0):

 './configure' '--with-mysql=/usr/local/mysql' '--with-
curl=/root/src/curl/curl-7.9.3' '--with-xml' '--with-
apache=/root/src/apache/apache-fp_1.3.3'

And the one from Red Hat 7, PHP 4.1.1:

'./configure' '--prefix=/usr/local' '--with-apache=/usr/
local/src/apache/Apachetoolbox-1.5.50/apache_1.3.22' '--
enable-exif' '--enable-track-vars' '--with-calendar=shared' 
'--enable-safe-mode' '--enable-magic-quotes' '--enable-
trans-sid' '--enable-wddx' '--enable-ftp' '--with-gd=/usr/
local' '--with-zlib' '--enable-gd-native-tt' '--with-t1lib=
/usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '-
-with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/
usr' '--with-imap=/usr/local' '--with-openssl=/usr' '--
with-mysql=/usr/local/mysql' '--with-pgsql' '--with-ldap'

The same code works in previous versions of PHP to 4.1, as 
indicated above.  I've tried the code in three different 
browsers so I don't think it is browser dependent.

The actual piece of code is part of a larger system.  I can 
give you the code or access to one of the servers if 
necessary.

Thanks in advance.

Paul Burney
Webmaster
Concord Consortium and UCLA GSEIS





-- 
Edit this bug report at http://bugs.php.net/?id=15441edit=1


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




[PHP-DEV] Bug #15468 Updated: problem with array_key_exists

2002-02-09 Thread cnewbill

 ID:   15468
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux d2 2.2.20-ow1-procmax-smp
 PHP Version:  4.1.1
 New Comment:

$pole = array(1 = ap, aa, dd);
  |
  |
 Key

$pole = array(ap = 1, aa = 2, dd = 3);
   |  |  |
   |  |  |
  KeyKeyKey

This is what he means, ap is NOT a KEY in the first array it is a
VALUE.

The function you want is in_array() -
http://www.php.net/manual/en/function.in-array.php

-Chris



Previous Comments:


[2002-02-09 14:14:25] [EMAIL PROTECTED]

for [EMAIL PROTECTED]: Can you explain me your words:

Simple because 'ap' is NOT a key in the first case.

?

Just don't know, what you mean...



[2002-02-09 13:55:52] [EMAIL PROTECTED]

first case:

array(3) { [1]= string(2) ap [2]= string(2) aa [3]= string(2)
dd } 


second case:

array(3) { [ap]= int(1) [aa]= int(2) [dd]= int(3) } 

Why is this different? Shouldn't this be the same?

as Array() definition says: 

Syntax index = values, separated by commas, define index and values.
index may be of type string or numeric. When index is omitted, a
integer index is automatically generated, starting at 0. If index is an
integer, next generated index will be the biggest integer index + 1.
Note that when two identical index are defined, the last overwrite the
first.

So I have used in first case the Example 3. 1-based index with
array():

$firstquarter  = array(1 = 'January', 'February', 'March');

I thing, that the second case definition is wrong and should return
error, but as I see, the function array_key_exists works with this...
I'm I mad or what???



[2002-02-09 13:39:15] [EMAIL PROTECTED]

Simple because 'ap' is NOT a key in the first case. See yourself with
var_dump($pole); how the array looks like.



[2002-02-09 13:20:25] [EMAIL PROTECTED]

Hello,

I'm trying function array_key_exists in this sample script, but doesn't
work:

?
$a=ap;
$pole = array(1 = ap, aa, dd);
if (array_key_exists($a, $pole)):
echo The element is in the array;
endif;
?

but when using:

$pole = array(ap = 1, aa = 2, dd = 3);

it's working. Can somebody look at this problem?

Thanks,
Pavel Hrabal




-- 
Edit this bug report at http://bugs.php.net/?id=15468edit=1


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