php-general Digest 24 Jun 2007 22:04:59 -0000 Issue 4867

2007-06-24 Thread php-general-digest-help

php-general Digest 24 Jun 2007 22:04:59 - Issue 4867

Topics (messages 257722 through 257735):

Re: Strange Fatal Error Possibly Memory
257722 by: ecc

Re: foreach() using current() strange beahvior
257723 by: Julien Pauli

PHP not posting
257724 by: Pieter du Toit
257725 by: Stut
257726 by: Pieter du Toit
257727 by: Tijnema
257728 by: Mark Kelly
257729 by: Pieter du Toit
257731 by: Tijnema
257732 by: Tijnema

PHP, mbstring, UTF-8 and indexing strings
257730 by: delsvr

UI toolkit
257733 by: Darren Whitlen

Re: file_get_contents crash, if file is bigger than memory_limit
257734 by: Jochem Maas

Display paragraphs from a mysql db
257735 by: nitrox .

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---

Maybe this is an error/exception in the exception handeler... :-) Sometimes
we had this error in these cases!
-- 
View this message in context: 
http://www.nabble.com/Strange-Fatal-Error-Possibly-Memory-tf3960349.html#a11273616
Sent from the PHP - General mailing list archive at Nabble.com.
---End Message---
---BeginMessage---

Don't worry I know how variable work internaly into Zend Engine ( for those
who want more info, Derick Rethan's got a good pdf file explaining that
process here :
http://derickrethans.nl/files/phparch-php-variables-article.pdf , Derick, if
you here us, feel free to come in that conversation ;-) )

But as said, that is an internal PHP behavior that, in my opinion, should be
explained in the documentation.
Now consider this :

?php
$a = array(One,Two,Three);
$b = $a;

next($b); // go to the second key of $b

foreach ($a AS $k=$v) {

   if (current($a) == current($b)){ // I want you to stop on the second key
of $b
   var_dump(current($b)); // will never get echoed, as current($a)
always returns StringOne
   break;
   }

}
?

Due to COW, using current($a) makes PHP making a real copy of $a array to
work on it, and current($a) is always at its first place ( StringOne)
because PHP works on the real copy, and its own array iterator. In that
example, the if condition will never be satisfied.
Ok let's make it funnier now :

?php
$a = array(One,Two,Three);
$b = $a;
$c = $a;

next($b);

foreach ($a AS $k=$v) {

   if (current($a) == current($b)){
   var_dump(current($b)); // works : outputs StringTwo
   break;
   }

}

var_dump(current($a)); // output StringTwo
?

Aha, now if I hold a reference to $a variable ($c here ), it looks like COW
doesn't show the same behavior as before.
Foreach seems to keep working on a lazy copy of $a, and so it moves the
real $a internal iterator as shown here. The if condition is verified and
the last script line clearly shows that $a internal pointer has been
manipulated by the foreach loop.


We see here that working on internal iterators using foreach is not really
recommanded. I have never needed to do that in a real developpement as well,
I'm just experimenting PHP behavior, but I think that the official
documentation should warn users about such behaviors.

For information : it's actually tested, for me, on PHP 5.2.3 running on a
Windows server. Error Reporting is set to E_ALL.

cheers.
Julien (French)

2007/6/23, Nathan Nobbe [EMAIL PROTECTED]:


 On 6/23/07, Robert Cummings  [EMAIL PROTECTED] wrote:
 Regardless of additional documentation or not, I think it's rather poor
 choice of programming style to mix the foreach construct with the older,
 lower level, internal array manipulation and probing functions. I think
 that is what should be documented since you just might get weird
 results :)

i agree; at least i have never had a need to determine the current index
of the internal array pointer in nearly 3 years working w/ php.
although it is somewhat interesting to experiment w/ the language to see
how it behaves :)

-nathan


On 6/23/07, Robert Cummings  [EMAIL PROTECTED] wrote:

 On Sat, 2007-06-23 at 15:15 -0400, Nathan Nobbe wrote:
 
  in summary, COW or not; i think the documentation could be revised a
 bit to
  clarify these subtleties.

 Regardless of additional documentation or not, I think it's rather poor
 choice of programming style to mix the foreach construct with the older,
 lower level, internal array manipulation and probing functions. I think
 that is what should be documented since you just might get weird
 results :)

 Cheers,
 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, 

[PHP] Hi. I need your help here

2007-06-24 Thread J S
Hi. I came across your contact info at php.zend.com and was hoping you could 
help me out with this question.
  I recently installed Rubberwall10, a free software that protects from 
hotlinking and although I managed to installed the software correctly at my 
site, I came across the fact that when I tried to download an image from the 
site to my computer, the image came out with 0 kbs.
   
  Someone who also installed the software made a comment on the internet 
stating he solved the problem adding a trim function to three of the variables 
in the filescrapper.php file. 
   
  My question to you is, how can I do that. I am not familiar with php, 
although I have understood some minimal basics. Adding trim function to $ct, 
$webaddress and $wantedfilename seemed to have solved the problem according to 
the user who solved the problem but did not specify how he did it. Can you tell 
me how I can add trim function to the above three variables?. Your help is 
greatly appreciated. The code is below. Thanks. John
  /***
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***/
$allowed = 0;
include('config.php');
  if($allowblank  0) { if($_SERVER['HTTP_REFERER']==) { $allowed = 1; }}
  $domains = count($alloweddomains);
  for($y=0;$y$domains+1;$y++) {
 if((stristr($_SERVER['HTTP_REFERER'], $alloweddomains[$y]))) { $allowed = 1;}
}
  if($allowed  0) {
  $namenumberarray = file($webaddress.fileindex.txt);
  $numberoffiles = count($namenumberarray);
  $filenames = array();
  
  for($x=0;$x$numberoffiles+1;$x++) {
   $temporary = explode(:,$namenumberarray[$x]);
   $tempname = explode(\n,$temporary[1]);
   $filenames[$temporary[0]] = $tempname[0];
  }
  
  if(!isset($filenames[$_GET['serve']])) { 
   if($logging  0){
$status = ReqNF;
include('logit.php');
   }
   echo('That number wasnt found!');
   exit;
  }
  
  $wantedfilename = $filenames[$_GET['serve']];
  
  
  $extension = explode(., $wantedfilename);
  $numberinarray = count($extension);
  
  $lcext = strtolower($extension[$numberinarray-1]);
  
  //BEGIN CONTENT TYPES BLOCK. ADD OR REMOVE FILE TYPES HERE, AS SHOWN //
  //DON'T EDIT THIS UNLESS YOU KNOW WHAT YOU ARE DOING!//
  //MOST COMMON FILE TYPES ARE ALREADY INCLUDED//
  
  switch($lcext) {
   case ($lcext == swf): 
$commonname=flash; 
$ct = Content-type: application/x-shockwave-flash;
   break;
   case ($lcext == wmv): 
$commonname=wmv; 
$ct = Content-type: video/x-ms-wmv;
   break;
   case ($lcext == mov): 
$commonname=quicktime movie; 
$ct = Content-type: video/quicktime;
   break;
   case ($lcext == avi): 
$commonname=avi video; 
$ct = Content-type: video/avi;
   break;
   case ($lcext == rar): 
$commonname=winrar; 
$ct = Content-type: application/octet-stream;
   break;
   case ($lcext == zip): 
$commonname=zip; 
$ct = Content-type: application/octet-stream;
   break;
   case ($lcext == bmp): 
$commonname=bitmap; 
$ct = Content-type: image/bmp;
   break;
   case ($lcext == gif): 
$commonname=gif; 
$ct = Content-type: image/gif;
   break;
   case ($lcext == jpeg || $lcext == jpg || $lcext == jpe): 
$commonname=jpeg; 
$ct = Content-type: image/jpeg;
   break;
   case ($lcext == mpeg || $lcext == mpg || $lcext == mpe): 
$commonname=mpeg; 
$ct = Content-type: video/mpeg;
   break;
   case ($lcext == png): 
$commonname=png; 
$ct = Content-type: image/png;
   break;
   
   //END//
   
   default: 
$commonname=Generic Filetype; 
$ct = Content-type: application/octet-stream;

if($logging  0){
 $status = Generic_Filetype;
 include('logit.php');
}
   
  }
  
  $handle = fopen($webaddress.$wantedfilename, rb);
  header(Cache-Control: ); //keeps ie happy
  header(Pragma: ); //keeps ie happy
  header($ct); //content type as set above from explode();
  
  if(!stristr($lcext, swf)){//flash plays, it isnt downloaded as an 
actual file.
   header(Content-Disposition: attachment; 
filename=\.$wantedfilename.\);
  }
  
  header(Content-Length: .filesize($path.$wantedfilename));
  
  fpassthru($handle);
  if($logging  0){
   $status = Granted;
   include('logit.php');
  }
  exit;
}
  else {
 if($logging  

[PHP] Setting Different Temp Directory for Different Application Users

2007-06-24 Thread zareef

Hi All,


I want to set different temp directory to every users of my  
application. Is it possible. TEMP_DIR is only configurable at system  
level, so I can do it only in PHP.INI or in apache as PHP_VALUE.


Any Idea how this can be achieved using combination of things?

Thanks in Advance.

Zareef Ahmed

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



Re: [PHP] Hi. I need your help here

2007-06-24 Thread Alan Milnes

Here are a couple of links that will help you:-

http://uk2.php.net/trim

http://www.catb.org/~esr/faqs/smart-questions.html

Alan

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



[PHP] file_get_contents crash, if file is bigger than memory_limit

2007-06-24 Thread ecc

I really dont know, if this is the right board for this... but i think, i
have to write it down.

Please throw an error, if file_get_contents cant read a file because
memory_limit overflow!

I´ve programmed a tool parsing checksums from large files. Because i have to
manage header-offsets, i have to read the files using file_get_contents.
(This should be the fastest way for this task says the manual... right!)

The problem is, that if the memory_limit in the php.ini is set to 64MB, and
the file read in by file_get_contents is bigger than 64MB, file_get_contents
crashes without an EXCETPION. This crash cant be catched!

I want handle this this way:

try{
$data = file_get_contents($file);
}
catch (MemoryLimitReachedException $e){
// try the same using a while loop reading the data! (This works!)
}

Hope, there is a solution for this.

Thank you.
Andreas
http://www.php-gtk.eu/apps/emucontrolcenter

-- 
View this message in context: 
http://www.nabble.com/file_get_contents-crash%2C-if-file-is-bigger-than-memory_limit-tf3971711.html#a11273559
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] Strange Fatal Error Possibly Memory

2007-06-24 Thread ecc

Maybe this is an error/exception in the exception handeler... :-) Sometimes
we had this error in these cases!
-- 
View this message in context: 
http://www.nabble.com/Strange-Fatal-Error-Possibly-Memory-tf3960349.html#a11273616
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] foreach() using current() strange beahvior

2007-06-24 Thread Julien Pauli

Don't worry I know how variable work internaly into Zend Engine ( for those
who want more info, Derick Rethan's got a good pdf file explaining that
process here :
http://derickrethans.nl/files/phparch-php-variables-article.pdf , Derick, if
you here us, feel free to come in that conversation ;-) )

But as said, that is an internal PHP behavior that, in my opinion, should be
explained in the documentation.
Now consider this :

?php
$a = array(One,Two,Three);
$b = $a;

next($b); // go to the second key of $b

foreach ($a AS $k=$v) {

   if (current($a) == current($b)){ // I want you to stop on the second key
of $b
   var_dump(current($b)); // will never get echoed, as current($a)
always returns StringOne
   break;
   }

}
?

Due to COW, using current($a) makes PHP making a real copy of $a array to
work on it, and current($a) is always at its first place ( StringOne)
because PHP works on the real copy, and its own array iterator. In that
example, the if condition will never be satisfied.
Ok let's make it funnier now :

?php
$a = array(One,Two,Three);
$b = $a;
$c = $a;

next($b);

foreach ($a AS $k=$v) {

   if (current($a) == current($b)){
   var_dump(current($b)); // works : outputs StringTwo
   break;
   }

}

var_dump(current($a)); // output StringTwo
?

Aha, now if I hold a reference to $a variable ($c here ), it looks like COW
doesn't show the same behavior as before.
Foreach seems to keep working on a lazy copy of $a, and so it moves the
real $a internal iterator as shown here. The if condition is verified and
the last script line clearly shows that $a internal pointer has been
manipulated by the foreach loop.


We see here that working on internal iterators using foreach is not really
recommanded. I have never needed to do that in a real developpement as well,
I'm just experimenting PHP behavior, but I think that the official
documentation should warn users about such behaviors.

For information : it's actually tested, for me, on PHP 5.2.3 running on a
Windows server. Error Reporting is set to E_ALL.

cheers.
Julien (French)

2007/6/23, Nathan Nobbe [EMAIL PROTECTED]:


 On 6/23/07, Robert Cummings  [EMAIL PROTECTED] wrote:
 Regardless of additional documentation or not, I think it's rather poor
 choice of programming style to mix the foreach construct with the older,
 lower level, internal array manipulation and probing functions. I think
 that is what should be documented since you just might get weird
 results :)

i agree; at least i have never had a need to determine the current index
of the internal array pointer in nearly 3 years working w/ php.
although it is somewhat interesting to experiment w/ the language to see
how it behaves :)

-nathan


On 6/23/07, Robert Cummings  [EMAIL PROTECTED] wrote:

 On Sat, 2007-06-23 at 15:15 -0400, Nathan Nobbe wrote:
 
  in summary, COW or not; i think the documentation could be revised a
 bit to
  clarify these subtleties.

 Regardless of additional documentation or not, I think it's rather poor
 choice of programming style to mix the foreach construct with the older,
 lower level, internal array manipulation and probing functions. I think
 that is what should be documented since you just might get weird
 results :)

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





Re: [PHP] PHP not posting

2007-06-24 Thread Pieter du Toit
Nothing major here is the code:

?

if ($_POST['name']) {

echo name posted;

}

?

html

head

title/title

/head

body

form action=1.php method=post

Name:input type=text name=name

input type=submit value=submit

/form

/body

/html

Stut [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Pieter du Toit wrote:
 I installed PHP5 on iis and i can see hello world and phpinfo.

 When i right click the webpage and view source, i can see the php code, 
 and the form does not want to post the form details.

 Will appreciate any help.

 My amazing psychic abilities tell me that...

 ...you need to show us your code before we can have any chance of helping.

 -Stut

 -- 
 http://stut.net/ 

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



[PHP] PHP not posting

2007-06-24 Thread Pieter du Toit
Hi

I installed PHP5 on iis and i can see hello world and phpinfo.

When i right click the webpage and view source, i can see the php code, and 
the form does not want to post the form details.

Will appreciate any help. 

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



Re: [PHP] PHP not posting

2007-06-24 Thread Stut

Pieter du Toit wrote:

I installed PHP5 on iis and i can see hello world and phpinfo.

When i right click the webpage and view source, i can see the php code, and 
the form does not want to post the form details.


Will appreciate any help. 


My amazing psychic abilities tell me that...

...you need to show us your code before we can have any chance of helping.

-Stut

--
http://stut.net/

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



Re: [PHP] PHP not posting

2007-06-24 Thread Pieter du Toit
But why is the php code showing just like my code at the top when i right 
click the webpage and view source, i suspect this must be a php.ini setting 
or sonmething
Tijnema [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:
 Nothing major here is the code:

 ?
   ^^ Do you have short tags enabled?, try ?php

 if ($_POST['name']) {

 Not the right way to check, you should use:
 if(isset($_POST['name']) {


 echo name posted;

 }

 ?
 html code

 If that still doesn't work, try a var_dump($_POST) at top of your
 script, and see if there's anything inside.

 Tijnema


 Stut [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Pieter du Toit wrote:
  I installed PHP5 on iis and i can see hello world and phpinfo.
 
  When i right click the webpage and view source, i can see the php 
  code,
  and the form does not want to post the form details.
 
  Will appreciate any help.
 
  My amazing psychic abilities tell me that...
 
  ...you need to show us your code before we can have any chance of 
  helping.
 
  -Stut
 
  --
  http://stut.net/

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




 -- 
 Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info 

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



Re: [PHP] PHP not posting

2007-06-24 Thread Tijnema

On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:

Nothing major here is the code:

?

  ^^ Do you have short tags enabled?, try ?php


if ($_POST['name']) {


Not the right way to check, you should use:
if(isset($_POST['name']) {



echo name posted;

}

?

html code

If that still doesn't work, try a var_dump($_POST) at top of your
script, and see if there's anything inside.

Tijnema



Stut [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Pieter du Toit wrote:
 I installed PHP5 on iis and i can see hello world and phpinfo.

 When i right click the webpage and view source, i can see the php code,
 and the form does not want to post the form details.

 Will appreciate any help.

 My amazing psychic abilities tell me that...

 ...you need to show us your code before we can have any chance of helping.

 -Stut

 --
 http://stut.net/

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





--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



Re: [PHP] PHP not posting

2007-06-24 Thread Mark Kelly
On Sunday 24 June 2007 13:54, Pieter du Toit wrote:
 Hi

 I installed PHP5 on iis and i can see hello world and phpinfo.

 When i right click the webpage and view source, i can see the php code,
 and the form does not want to post the form details.

 Will appreciate any help.

I'm not really knowledgeable about IIS, but if you can see php code in the 
browser it usually means the web server hasn't been set up to execute php 
rather than just serving it. 

Check your config to make sure it knows to pass *.php requests through php5 
rather than just sending the page back directly. How you do this on IIS is 
beyond me I'm afraid.

HTH

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



[PHP] PHP, mbstring, UTF-8 and indexing strings

2007-06-24 Thread delsvr

Just a simple question (with a simple answer, hopefully): how can I access
character x of a utf-8 encoded string? i.e. how would I get this to work:

for($x=0; $x  strlen($utf8); $x++)
  echo character {$x}: . $utf8{$x};

Keep in mind that I have strlen overloaded by mbstring, and this is
necessary for my purposes because I need to do work on each character. Also,
by character I mean, for example: 我.

Thanks,
delsvr
-- 
View this message in context: 
http://www.nabble.com/PHP%2C-mbstring%2C-UTF-8-and-indexing-strings-tf3972397.html#a11275585
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] PHP not posting

2007-06-24 Thread Tijnema

On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:

In the php.ini?



Yes, short tags can be enabled in php.ini, and ?php is in your script ;)

Tijnema

ps. Please don't top-post

pps. When you reply to this list, add the PHP list in your Cc field.
Some mail clients have an  Reply to all button which does this
automatically:)


-Original Message-
From: Tijnema [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 24, 2007 5:42 PM
To: Pieter du Toit
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP not posting

On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:
 But why is the php code showing just like my code at the top when i right
 click the webpage and view source, i suspect this must be a php.ini
setting
 or sonmething

Yes, it might be.
That's why I asked you if you had short tags enabled or not, and that
you can better use ?php instead of ?.

Tijnema
 Tijnema [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:
  Nothing major here is the code:
 
  ?
^^ Do you have short tags enabled?, try ?php
 
  if ($_POST['name']) {
 
  Not the right way to check, you should use:
  if(isset($_POST['name']) {
 
 
  echo name posted;
 
  }
 
  ?
  html code
 
  If that still doesn't work, try a var_dump($_POST) at top of your
  script, and see if there's anything inside.
 
  Tijnema
 
 
  Stut [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Pieter du Toit wrote:
   I installed PHP5 on iis and i can see hello world and phpinfo.
  
   When i right click the webpage and view source, i can see the php
   code,
   and the form does not want to post the form details.
  
   Will appreciate any help.
  
   My amazing psychic abilities tell me that...
  
   ...you need to show us your code before we can have any chance of
   helping.
  
   -Stut
  
   --
   http://stut.net/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
  --
  Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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




--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info






--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



Re: [PHP] PHP not posting

2007-06-24 Thread Tijnema

On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:

But why is the php code showing just like my code at the top when i right
click the webpage and view source, i suspect this must be a php.ini setting
or sonmething


Yes, it might be.
That's why I asked you if you had short tags enabled or not, and that
you can better use ?php instead of ?.

Tijnema

Tijnema [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On 6/24/07, Pieter du Toit [EMAIL PROTECTED] wrote:
 Nothing major here is the code:

 ?
   ^^ Do you have short tags enabled?, try ?php

 if ($_POST['name']) {

 Not the right way to check, you should use:
 if(isset($_POST['name']) {


 echo name posted;

 }

 ?
 html code

 If that still doesn't work, try a var_dump($_POST) at top of your
 script, and see if there's anything inside.

 Tijnema


 Stut [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Pieter du Toit wrote:
  I installed PHP5 on iis and i can see hello world and phpinfo.
 
  When i right click the webpage and view source, i can see the php
  code,
  and the form does not want to post the form details.
 
  Will appreciate any help.
 
  My amazing psychic abilities tell me that...
 
  ...you need to show us your code before we can have any chance of
  helping.
 
  -Stut
 
  --
  http://stut.net/

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




 --
 Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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





--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



[PHP] UI toolkit

2007-06-24 Thread Darren Whitlen
I'm really looking into using PHP as an all-round scripting language. 
I'm looking for a native looking UI toolkit, which takes PHP-GTK out the 
question.


I've seen wxWidgets but I can't find any bindings for PHP, unless 
anybody knows of any that I can't find?


Or, if anybody knows of any other native UI toolkits available for PHP? 
At least native linux and windows look.


Darren

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



Re: [PHP] file_get_contents crash, if file is bigger than memory_limit

2007-06-24 Thread Jochem Maas
ecc wrote:
 I really dont know, if this is the right board for this... but i think, i
 have to write it down.

if your looking to post a feature request then there is no list for that
- the bug database would be the place to do it ... but please don't bother the
devs with your feature request - it won't happen for reasons that are public 
record.

 
 Please throw an error, if file_get_contents cant read a file because
 memory_limit overflow!

go read the archives of [EMAIL PROTECTED] for numerous reasons why that
it not going to happen.

 
 I´ve programmed a tool parsing checksums from large files. Because i have to
 manage header-offsets, i have to read the files using file_get_contents.

given that your own comment in the example below states while loop reading
the data! (This works!) I can't see why you *have* to use file_get_contents()

have you tried filesize() and chcked the result is less than memory_limit?

 (This should be the fastest way for this task says the manual... right!)
 
 The problem is, that if the memory_limit in the php.ini is set to 64MB, and
 the file read in by file_get_contents is bigger than 64MB, file_get_contents
 crashes without an EXCETPION. This crash cant be catched!

why do you think it should throw an exception? it won't, especially not a
particular class of exception that you made up o the spot.

php errors and exceptions are 2 different things, before going any
further you should read up on both so that you understand the difference.

 
 I want handle this this way:
 
 try{
 $data = file_get_contents($file);
 }
 catch (MemoryLimitReachedException $e){
 // try the same using a while loop reading the data! (This works!)
 }
 
 Hope, there is a solution for this.
 
 Thank you.
 Andreas
 http://www.php-gtk.eu/apps/emucontrolcenter
 

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



[PHP] Display paragraphs from a mysql db

2007-06-24 Thread nitrox .

hi all,
 I have a news section on a website that im coding that isnt displaying 
properly. Every paragraph in each news post is being displayed as one big 
paragraph. how can i display my paragraphs in proper form? The field the 
news story is stored in is set as longtext.

here is a link to view.
http://area51.chalkthree.com/index.php?pg=3

the first update shows what im having an issue with. each item in the 
numbered list should be on a seperate line. there are some line breaks as 
well for new paragraphs that arent displaying properly.


here is the code i have:

while($myrow = mysql_fetch_array($newsresults))
 {
 print br;
print $myrow['news_topic'];
print  ;
print $myrow['news_author'];
print;
 print $myrow['topic_date'];
 print br;
 print $myrow['news_message'];
print br\n;
 }

_
Who's that on the Red Carpet? Play  win glamorous prizes. 
http://club.live.com/red_carpet_reveal.aspx?icid=REDCARPET_hotmailtextlink3


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



[PHP] Re: file_get_contents crash, if file is bigger than memory_limit

2007-06-24 Thread Jochem Maas
it's difficult to read.
why?
don't top post.

oh and please post to the list.

[EMAIL PROTECTED] wrote:
 1. I dont know, if this is an feature request

well you're the only one who might.

 
 given that your own comment in the example below states while loop reading
 the data! (This works!) I can't see why you *have* to use 
 file_get_contents()
 
 Hm, strange answer, i think. Do you ever have used the file functions of php. 
 Why the developers of php say, that file_get_contents is the way to read 
 files? Maybe because its faster then a while contruct.

was it ever said that it's the only way?

 Or am i wrong?
 
 have you tried filesize() and chcked the result is less than memory_limit?
 Thats an good answer, but i think, the can also be done by php internally + 
 throwing an exception :-)

ah so you were there when php core developers decided that BC would be 
completely broken and
all core errors would be throw as exceptions? me, I must have missed that.
php exceptions are generally a user level construct - the php core generates 
error not exceptions
(with the exception of a few OO based php extensions [php intended])

you might consider that you probably need to work with a tool for a little 
longer than
5 minutes before being in a position to determine whether a change to the tool 
is possible or
desirable. php is used by 100,000's of people changing the language is not 
something
you do 'just like that'

 Maybe i have to read the [EMAIL PROTECTED] strange, this is like the 
 hitchhiker. Read the hidden manual! 
 Never head before of this internals 
 if you are a php core developer.  i´m not, 

I'm not a core developer either, but that doesn't stop me following development 
issues
and discussions on their mailing list.

 i´m a stupid little programmer!

you said it not me, guv.

 
 why do you think it should throw an exception? it won't, especially not a
 particular class of exception that you made up o the spot.

 Never head of Pseudocode, examples?? Dont know, how to name this Exception... 
 if you have an better name... WhateverException
 
 Ok, das musste raus... ist nicht so gemeint :-) 

I'm dutch, I don't speak german - I can guess at the meaning of the above but 
for the sake of
everyone else stick to english, the language used on this list, please.

 
 Gruß,
 Andreas
 
 quote author=Jochem Maas
 ecc wrote:
 I really dont know, if this is the right board for this... but i think, i
 have to write it down.
 
 if your looking to post a feature request then there is no list for that
 - the bug database would be the place to do it ... but please don't bother the
 devs with your feature request - it won't happen for reasons that are public 
 record.
 
 Please throw an error, if file_get_contents cant read a file because
 memory_limit overflow!
 
 go read the archives of [EMAIL PROTECTED] for numerous reasons why that
 it not going to happen.
 
 I´ve programmed a tool parsing checksums from large files. Because i have to
 manage header-offsets, i have to read the files using file_get_contents.
 
 given that your own comment in the example below states while loop reading
 the data! (This works!) I can't see why you *have* to use file_get_contents()
 
 have you tried filesize() and chcked the result is less than memory_limit?
 
 (This should be the fastest way for this task says the manual... right!)

 The problem is, that if the memory_limit in the php.ini is set to 64MB, and
 the file read in by file_get_contents is bigger than 64MB, file_get_contents
 crashes without an EXCETPION. This crash cant be catched!
 
 why do you think it should throw an exception? it won't, especially not a
 particular class of exception that you made up o the spot.
 
 php errors and exceptions are 2 different things, before going any
 further you should read up on both so that you understand the difference.
 
 I want handle this this way:

 try{
 $data = file_get_contents($file);
 }
 catch (MemoryLimitReachedException $e){
 // try the same using a while loop reading the data! (This works!)
 }

 Hope, there is a solution for this.

 Thank you.
 Andreas
 http://www.php-gtk.eu/apps/emucontrolcenter

 

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



Re: [PHP] PHP, mbstring, UTF-8 and indexing strings

2007-06-24 Thread Jochem Maas
delsvr wrote:
 Just a simple question (with a simple answer, hopefully): how can I access
 character x of a utf-8 encoded string? i.e. how would I get this to work:
 
 for($x=0; $x  strlen($utf8); $x++)
   echo character {$x}: . $utf8{$x};
 
 Keep in mind that I have strlen overloaded by mbstring, and this is
 necessary for my purposes because I need to do work on each character. Also,
 by character I mean, for example: 我.

substr() should do it.
I don't think you can loop through a multibyte string in the way you want.

$l = strlen($utf8);
for($x=0; $x  $l; $x++) echo char {$x}:.substr($utf8, $x, 1);


check here to figure out exactly which functions you
are currently overloading:

http://php.net/mb_string

 
 Thanks,
 delsvr

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



Re: [PHP] Display paragraphs from a mysql db

2007-06-24 Thread Ray
On Sunday 24 June 2007 4:03 pm, nitrox . wrote:
 hi all,
   I have a news section on a website that im coding that isnt displaying
 properly. Every paragraph in each news post is being displayed as one big
 paragraph. how can i display my paragraphs in proper form? The field the
 news story is stored in is set as longtext.
 here is a link to view.
 http://area51.chalkthree.com/index.php?pg=3

 the first update shows what im having an issue with. each item in the
 numbered list should be on a seperate line. there are some line breaks as
 well for new paragraphs that arent displaying properly.
Hello Nitrox,
I went to look at the site indicated, and as far as I can tell, your problem 
isn't with the php or the sql. It's with the html. to put each point on 
seperate lines, try using the list tags ordered or unordered list. 
http://www.w3schools.com/html/html_lists.asp just for one example.
Also browsers don't deal with white space the way a word processor does. Very 
roughly speaking, your browser will display only one space for one or more 
whitespace characters. if you want spaces, use css, nbsp; or br
HTH
Ray 
snip code

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



Re: [PHP] Display paragraphs from a mysql db

2007-06-24 Thread Miles Thompson

On 6/24/07, nitrox . [EMAIL PROTECTED] wrote:


hi all,
  I have a news section on a website that im coding that isnt displaying
properly. Every paragraph in each news post is being displayed as one big
paragraph. how can i display my paragraphs in proper form? The field the
news story is stored in is set as longtext.
here is a link to view.
http://area51.chalkthree.com/index.php?pg=3

the first update shows what im having an issue with. each item in the
numbered list should be on a seperate line. there are some line breaks as
well for new paragraphs that arent displaying properly.

here is the code i have:

while($myrow = mysql_fetch_array($newsresults))
  {
 print br;
 print $myrow['news_topic'];
 print  ;
 print $myrow['news_author'];
 print;
 print $myrow['topic_date'];
 print br;
 print $myrow['news_message'];
 print br\n;
 }



nl2br() as found at http://php.ca/nl2br, as well as the other functions on
that page.

Works well - although you may to futz a little bit with the variations on
break tags.

Cheers - Miles Thompson


[PHP] onphp

2007-06-24 Thread Nathan Nobbe

all,

has anyone used the onphp http://onphp.org/index.en.html framework?
if so what do you think of it?

thanks,

-nathan


Re: [PHP] PHP, mbstring, UTF-8 and indexing strings

2007-06-24 Thread delsvr

This works great. Thanks.


Jochem Maas wrote:
 
 delsvr wrote:
 Just a simple question (with a simple answer, hopefully): how can I
 access
 character x of a utf-8 encoded string? i.e. how would I get this to work:
 
 for($x=0; $x  strlen($utf8); $x++)
   echo character {$x}: . $utf8{$x};
 
 Keep in mind that I have strlen overloaded by mbstring, and this is
 necessary for my purposes because I need to do work on each character.
 Also,
 by character I mean, for example: 我.
 
 substr() should do it.
 I don't think you can loop through a multibyte string in the way you want.
 
 $l = strlen($utf8);
 for($x=0; $x  $l; $x++) echo char {$x}:.substr($utf8, $x, 1);
 
 
 check here to figure out exactly which functions you
 are currently overloading:
 
   http://php.net/mb_string
 
 
 Thanks,
 delsvr
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/PHP%2C-mbstring%2C-UTF-8-and-indexing-strings-tf3972397.html#a11280535
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] Aggressive PHP Smart Caching

2007-06-24 Thread Nathan Nobbe

Alexander,

sorry to see nobody has replied to your post, im sure you worked very hard
on the cache system and are eager for feedback..

so to me it looks like youve introduced a somewhat new style of caching here
(though im sure there are other such approaches); for instance i know of 2
main uses for caches at this time [as caching pertains to php].

  1. caching php intermediate code
  2. caching application variables

both of these caching techniques are designed to overcome limitations of the
language as it ships out of the box, more or less; afaik.
it appears you are interested in caching the output of php scripts, which
is, i suppose, a third technique that could be added to the list.
so i have a criticism about your system and a couple questions as well.
*criticism*

  - why cache script output on disk?  if a fast cache is your goal, why
  not store the result of script output in memory rather than on disk; that
  would be much faster

*questions*

  - how does your cache system know when cached output is stale and
  allow fresh contents to be delivered from the original script rather than
  being served from the cache?
  - why purge cache contents after 24 hours?  im on the memcached
  mailing list, and recently they were discussing artificially resetting the
  cache; several people said they let memcahe run for months on end.

-nathan

On 6/18/07, Alexander Romanovich [EMAIL PROTECTED] wrote:


I'm a PHP developer looking for feedback on a caching approach I put
together recently. It's informed by thoughts people have shared on this
newslist and other places over the years. My goal was to come up with an
extremely lightweight flat file caching system which solves various
concerns
about portability, speed, and specific feature implementations.


Included is a wishlist I generated to explain the approach. The code is
small, and documented, and easy to test for those interested. Feedback
form
attached to the following web page (but this newsgroup is as good a forum
as
any, too).


http://technologies.babywhale.net/cache/



Re: [PHP] Aggressive PHP Smart Caching

2007-06-24 Thread Robert Cummings
On Sun, 2007-06-24 at 23:55 -0400, Nathan Nobbe wrote:
 Alexander,
 
 sorry to see nobody has replied to your post, im sure you worked very hard
 on the cache system and are eager for feedback..
 
 so to me it looks like youve introduced a somewhat new style of caching here
 (though im sure there are other such approaches); for instance i know of 2
 main uses for caches at this time [as caching pertains to php].
 
1. caching php intermediate code
2. caching application variables
 
 both of these caching techniques are designed to overcome limitations of the
 language as it ships out of the box, more or less; afaik.

I presume you mean bytecode caching for #1.

As for application variables... the lack of application level variables
is a design choice to make it easier to scale your application
horizontally. This is usually referred to as the shared nothing
approach.

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

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



Re: [PHP] UI toolkit

2007-06-24 Thread Nathan Nobbe

Darren,

I recently discovered php5 bindings to qt4
http://www.php-qt.org

although qt is currently leveraged by kde primarily it has been converted to
a cmake build system instead of a make build system which supposedly will
enable cross platform capabilities.  kde apps will be running on windows and
what not.
though im not sure what sort of time line all that stuff is on, i know it is
in the works; and i personally prefer qt/kde over gtk/gnome :)

afaik there are no bindings available for windows ui scripting w/ php

-nathan

On 6/24/07, Darren Whitlen [EMAIL PROTECTED] wrote:


I'm really looking into using PHP as an all-round scripting language.
I'm looking for a native looking UI toolkit, which takes PHP-GTK out the
question.

I've seen wxWidgets but I can't find any bindings for PHP, unless
anybody knows of any that I can't find?

Or, if anybody knows of any other native UI toolkits available for PHP?
At least native linux and windows look.

Darren

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




Re: [PHP] Aggressive PHP Smart Caching

2007-06-24 Thread Nathan Nobbe

On 6/25/07, Robert Cummings [EMAIL PROTECTED] wrote:
I presume you mean bytecode caching for #1.

yes


As for application variables... the lack of application level variables
is a design choice to make it easier to scale your application
horizontally. This is usually referred to as the shared nothing
approach.


This is interesting; if the lack of application variables is a design
decision then why do people look to  memcached for performance gains?
afaik, the idea is to add support for application variables since php does
not provide it inherently.
also, other popular (possibly more so in the enterprise [fogive me if you
think thats cheesy]) languages namely java and .net have integrated
mechanisms to
support application variables.  this is often sighted as one of the greatest
shortcomings of php, in my personal experience.
i dont see how lacking support for application variables makes it easier to
scale horizontally either.  horizontal scaling could be achieved in the same
fashion even if the language did offer support for them, by simply choosing
not leverage them, if so desired.

-nathan

On 6/25/07, Robert Cummings [EMAIL PROTECTED] wrote:


On Sun, 2007-06-24 at 23:55 -0400, Nathan Nobbe wrote:
 Alexander,

 sorry to see nobody has replied to your post, im sure you worked very
hard
 on the cache system and are eager for feedback..

 so to me it looks like youve introduced a somewhat new style of caching
here
 (though im sure there are other such approaches); for instance i know of
2
 main uses for caches at this time [as caching pertains to php].

1. caching php intermediate code
2. caching application variables

 both of these caching techniques are designed to overcome limitations of
the
 language as it ships out of the box, more or less; afaik.

I presume you mean bytecode caching for #1.

As for application variables... the lack of application level variables
is a design choice to make it easier to scale your application
horizontally. This is usually referred to as the shared nothing
approach.

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




[PHP] undefined symbol:oci8_module_entry

2007-06-24 Thread jamal taweel
Hi, 
 
I have a problem when installing PHP 5 .2.3 with oracle 10.2.0, where as I do 
the following:
· ./configure --prefix=/usr/local/php5 
--with-apxs2=/opt/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib 
--with-zlib-dir=/usr/local/lib --with-gd --enable-soap --enable-sockets 
--with-jpeg-dir=/usr/ --enable-exif --enable-ftp 
--with-oci8=/u01/app/oracle/product/10.2.0 
--with-oracle=/u01/app/oracle/product/10.2.0
· Make
· Make test
 
I have  a fail on all OCIs issue.
· Make install
 
And after I restart the apache2, the following error was obtained:
“httpd: Syntax error on line 54 of /opt/apache2/conf/httpd.conf: Cannot load 
/opt/apache2/modules/libphp5.so into server: /opt/apache2/modules/libphp5.so: 
undefined symbol: oci8_module_entry”
 
Can you help?
 
Thanks,
jamal



Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.


 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food  Drink QA.
http://answers.yahoo.com/dir/?link=listsid=396545367

Re: [PHP] undefined symbol:oci8_module_entry

2007-06-24 Thread Chris

jamal taweel wrote:
Hi, 
 
I have a problem when installing PHP 5 .2.3 with oracle 10.2.0, where as I do the following:

· ./configure --prefix=/usr/local/php5 
--with-apxs2=/opt/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib 
--with-zlib-dir=/usr/local/lib --with-gd --enable-soap --enable-sockets 
--with-jpeg-dir=/usr/ --enable-exif --enable-ftp 
--with-oci8=/u01/app/oracle/product/10.2.0 
--with-oracle=/u01/app/oracle/product/10.2.0
· Make
· Make test
 
I have  a fail on all OCIs issue.


So why did you continue with something that didn't work?

What were the errors?

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

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



Re: [PHP] undefined symbol:oci8_module_entry

2007-06-24 Thread jamal taweel
The error was after i restarted the apache, a generated error was issued as the 
following (it will be fixed if i configure the php without OCI8):
httpd: Syntax error on line 54 of /opt/apache2/conf/httpd.conf: Cannot load 
/opt/apache2/modules/libphp5.so into server: /opt/apache2/modules/libphp5.so: 
undefined symbol: oci8_module_entry”
I made 
 # make test TESTS=ext/oci8
The following results were obtained:

Build complete.
Don't forget to run 'make test'.

=
CWD : /opt/php-5.2.3
PHP : /opt/php-5.2.3/sapi/cli/php
PHP_SAPI: cli
PHP_VERSION : 5.2.3
ZEND_VERSION: 2.2.0
PHP_OS  : Linux - Linux PDN-Serv 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 
EST 2005 i686
INI actual  : /opt/php-5.2.3
More .INIs  :
Extra dirs  :
=
Running selected tests.
FAIL oci_bind_array_by_name() and invalid values 1 
[ext/oci8/tests/array_bind_001.phpt]
FAIL oci_bind_array_by_name() and invalid values 2 
[ext/oci8/tests/array_bind_002.phpt]
FAIL oci_bind_array_by_name() and invalid values 3 
[ext/oci8/tests/array_bind_003.phpt]
FAIL oci_bind_array_by_name() and invalid values 4 
[ext/oci8/tests/array_bind_004.phpt]
FAIL oci_bind_array_by_name() and invalid values 5 
[ext/oci8/tests/array_bind_005.phpt]
FAIL oci_bind_array_by_name(), SQLT_CHR and default max_length 
[ext/oci8/tests/array_bind_006.phpt]
FAIL oci_bind_array_by_name() and invalid values 7 
[ext/oci8/tests/array_bind_007.phpt]
FAIL oci_bind_array_by_name() and invalid values 8 
[ext/oci8/tests/array_bind_008.phpt]
FAIL oci_bind_array_by_name() and invalid values 9 
[ext/oci8/tests/array_bind_009.phpt]
FAIL oci_bind_array_by_name() and invalid values 8 
[ext/oci8/tests/array_bind_010.phpt]
FAIL oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array 
[ext/oci8/tests/array_bind_011.phpt]
FAIL oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array 
[ext/oci8/tests/array_bind_012.phpt]
FAIL oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array 
[ext/oci8/tests/array_bind_013.phpt]
FAIL oci_bind_array_by_name() and NUMBERs [ext/oci8/tests/array_bind_014.phpt]
FAIL oci_bind_array_by_name() and SQLT_ODT [ext/oci8/tests/array_bind_date.phpt]
FAIL oci_bind_array_by_name() and SQLT_ODT 
[ext/oci8/tests/array_bind_date1.phpt]
FAIL oci_bind_array_by_name() and SQLT_FLT 
[ext/oci8/tests/array_bind_float.phpt]
FAIL oci_bind_array_by_name() and SQLT_FLT 
[ext/oci8/tests/array_bind_float1.phpt]
FAIL oci_bind_array_by_name() and SQLT_INT [ext/oci8/tests/array_bind_int.phpt]
FAIL oci_bind_array_by_name() and SQLT_INT [ext/oci8/tests/array_bind_int1.phpt]
FAIL oci_bind_array_by_name() and SQLT_AVC [ext/oci8/tests/array_bind_str.phpt]
FAIL oci_bind_array_by_name() and SQLT_AVC [ext/oci8/tests/array_bind_str1.phpt]
FAIL binding empty values [ext/oci8/tests/bind_empty.phpt]
FAIL bind LONG field [ext/oci8/tests/bind_long.phpt]
FAIL bind LONG RAW field [ext/oci8/tests/bind_long_raw.phpt]
FAIL bind RAW field [ext/oci8/tests/bind_raw.phpt]
FAIL Bug #26133 (ocifreedesc() segfault) [ext/oci8/tests/bug26133.phpt]
FAIL Bug #27303 (OCIBindByName binds numeric PHP values as characters) 
[ext/oci8/tests/bug27303.phpt]
FAIL Bug #27303 (OCIBindByName binds numeric PHP values as characters) 
[ext/oci8/tests/bug27303_2.phpt]
FAIL Bug #27303 (OCIBindByName binds numeric PHP values as characters) 
[ext/oci8/tests/bug27303_3.phpt]
FAIL Bug #27303 (OCIBindByName binds numeric PHP values as characters) 
[ext/oci8/tests/bug27303_4.phpt]
FAIL Bug #32325 (Can't retrieve collection using OCI8) 
[ext/oci8/tests/bug32325.phpt]
FAIL Bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB field) 
[ext/oci8/tests/bug35973.phpt]
FAIL Bug #36010 (Crash when executing SQL statment with lob parameter twice) 
[ext/oci8/tests/bug36010.phpt]
FAIL Bug #36096 (oci_result() returns garbage after oci_fetch() failed) 
[ext/oci8/tests/bug36096.phpt]
FAIL Bug #37581 (oci_bind_array_by_name clobbers input array when using 
SQLT_AFC, AVC) [ext/oci8/tests/bug37581.phpt]
FAIL Bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set the 
variable) [ext/oci8/tests/bug38161.phpt]
FAIL Bug #38173 (Freeing nested cursors causes OCI8 to segfault) 
[ext/oci8/tests/bug38173.phpt]
FAIL Bug #40078 (ORA-01405 when fetching NULL values using 
oci_bind_array_by_name()) [ext/oci8/tests/bug40078.phpt]
FAIL Bug #40415 (Using oci_fetchall with nested cursors) 
[ext/oci8/tests/bug40415.phpt]
FAIL connect/close/connect [ext/oci8/tests/close.phpt]
FAIL oci_new_collection() [ext/oci8/tests/coll_001.phpt]
FAIL oci_new_collection() + free() [ext/oci8/tests/coll_002.phpt]
FAIL oci_new_collection() + free() [ext/oci8/tests/coll_002_func.phpt]
FAIL collection methods [ext/oci8/tests/coll_003.phpt]
FAIL collection methods [ext/oci8/tests/coll_003_func.phpt]
FAIL oci_collection_assign() [ext/oci8/tests/coll_004.phpt]
FAIL 

Re: [PHP] Aggressive PHP Smart Caching

2007-06-24 Thread Robert Cummings
On Mon, 2007-06-25 at 00:49 -0400, Nathan Nobbe wrote:
  On 6/25/07, Robert Cummings [EMAIL PROTECTED] wrote:
  I presume you mean bytecode caching for #1.
 yes
 
  As for application variables... the lack of application level variables
  is a design choice to make it easier to scale your application
  horizontally. This is usually referred to as the shared nothing
  approach.
 
 This is interesting; if the lack of application variables is a design
 decision then why do people look to  memcached for performance gains?

Because they are ignorant, short-sighted, or understand their problem
enough to know they won't benefit from a shared nothing architecture.

 afaik, the idea is to add support for application variables since php does
 not provide it inherently.

Memcached is for far more than just application variables, but yes it
can be used to mimic app variables. But this takes more of a conscious
effort by someone to shoot themself in the foot.

 also, other popular (possibly more so in the enterprise [fogive me if you
 think thats cheesy]) languages namely java and .net have integrated
 mechanisms to support application variables.

You'll probably find that where there is a high need for scalability, or
potential scalability, developers are not using the feature.

 this is often sighted as one of the greatest shortcomings of php, in my 
 personal experience.

I guess it depends on who is doing the citing. If the unwashed masses
are doing the citing then perhaps they feel that way from having gotten
into bad habits.

 i dont see how lacking support for application variables makes it easier to
 scale horizontally either.  horizontal scaling could be achieved in the same
 fashion even if the language did offer support for them, by simply choosing
 not leverage them, if so desired.

Exactly, but by not having them by default it makes it harder for you to
accidentally make use of them. Either way, whether PHP holds your hand
or not, they made a design choice to not have application variables, and
as such that IS why they are not part of the language by default.

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

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



Re: [PHP] undefined symbol:oci8_module_entry

2007-06-24 Thread Chris

snip incredibly blinding html code

Turn OFF HTML in your mail program!



- Original Message 
From: Chris [EMAIL PROTECTED]
To: jamal taweel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, June 25, 2007 7:11:34 AM
Subject: Re: [PHP] undefined symbol:oci8_module_entry

jamal taweel wrote:
  Hi,
   
  I have a problem when installing PHP 5 .2.3 with oracle 10.2.0, where 
as I do the following:
  · ./configure --prefix=/usr/local/php5 
--with-apxs2=/opt/apache2/bin/apxs --with-libxml-dir=/usr/local/lib 
--with-zlib --with-zlib-dir=/usr/local/lib --with-gd --enable-soap 
--enable-sockets --with-jpeg-dir=/usr/ --enable-exif --enable-ftp 
--with-oci8=/u01/app/oracle/product/10.2.0 
--with-oracle=/u01/app/oracle/product/10.2.0

  · Make
  · Make test
   
  I have  a fail on all OCIs issue.



Every single test failed - why would you do a make install???

What failed when you ran configure /or make?


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

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