Re: [PHP] Recommendations for the Zend PHP Certification

2005-11-12 Thread Gustavo Narea

Hello, Marco.

Thanks for your response!

Marco Kaiser wrote:

Hi Gustavo,

I want to take the ZPC test the next year and I am going to buy these books:
  - Zend PHP Certification Study Guide.
  - Zend PHP Certification Practice Test Book.

Take the Study Guide from php-architect. Its better than the Zend book.


Aren't they the same books?

I mean, I see the same authors, the same titles and the same pictures.

Cheers.

--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

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



[PHP] Seg fault in PHP 5.0.5

2005-11-12 Thread Dean Householder
Has anyone had any problems with PHP 5.0.5 getting seg faults when 
trying to replace extended ascii characters?


I'm trying to replace the following characters: Â °, with " degrees".  I 
am able to detect these characters in the string, but when I try 
replacing it, PHP seg faults.  I've tried both str_replace() as well as 
preg_replace().  I've tried replacing the characters by pasting them 
directly, using chr(176) & chr(194), and even \xC2 and \xB0.


I get the Segmentation fault both through Apache as well as CLI (command 
line interface) consistently.


Any ideas?

Thanks,
Dean Householder

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



Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene

Todd Cary wrote:

Yup!  It was the missing parentheses!  Works as planned.

Many thanks

The "application/text" gives the user the ability; "text/plain" does not 


The ability to...?

seem to do that.  I just tried "application/text" since I use 
"application/pdf" for other applications.


Whatever it's giving the user the ability to do, it's probably because 
the browser doesn't recognise the (invalid) MIME-Type.


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



Re: [PHP] Re: emailing MySQL list not working

2005-11-12 Thread Marco Kaiser
Hi Bruce,

first, there are just \n in your last header assignment. I think you
should test it a bit mir,
Try to send mails without the optional header. If this not work ask here again.

-- Marco

> >>> $headers .= "Mime-Version:1.0\n Content-Type: text/plain;
> >>> charset=\"iso-8859-1\nContent-Transfer-Encoding: 8bit\n";

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



Re: [PHP] Printing to a buffer

2005-11-12 Thread Todd Cary

Yup!  It was the missing parentheses!  Works as planned.

Many thanks

The "application/text" gives the user the ability; "text/plain" does not 
seem to do that.  I just tried "application/text" since I use 
"application/pdf" for other applications.


Todd

Jasper Bryant-Greene wrote:

Todd Cary wrote:

My client's new shared server does not allow printing to a file, so I 
want my print statement to print to a buffer, then I'll send it to the 
user via Headers.  This does not work since "print" does no go to the 
buffer, or at least appears not to: I get the errors from the header 
statements;





You're missing some parentheses on the ob_start function. I think you 
meant to write:


ob_start();


  print "This is a test";



You probably meant  in that string too.


  $buf = ob_get_contents();
  $len = strlen($buf);
  ob_end_clean();
  header("Content-type: application/text");



application/text isn't a MIME-Type, is it? Do you mean text/plain?


  header("Content-Length: $len");
  header("Content-Disposition: inline; filename=Sfyc.html");
  print($buf);
?>

Todd



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



RE: [PHP] Printing to a buffer

2005-11-12 Thread php-mail


-Original Message-
From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] 
[snip]
application/text isn't a MIME-Type, is it? Do you mean text/plain?
[/snip]

Or maybe text/html?

Sent: 12 November 2005 22:46
To: Todd Cary
Cc: php-general@lists.php.net
Subject: Re: [PHP] Printing to a buffer

Todd Cary wrote:
> My client's new shared server does not allow printing to a file, so I 
> want my print statement to print to a buffer, then I'll send it to the 
> user via Headers.  This does not work since "print" does no go to the 
> buffer, or at least appears not to: I get the errors from the header 
> statements;
> 
>ob_start;

You're missing some parentheses on the ob_start function. I think you 
meant to write:

ob_start();

>   print "This is a test";

You probably meant  in that string too.

>   $buf = ob_get_contents();
>   $len = strlen($buf);
>   ob_end_clean();
>   header("Content-type: application/text");

application/text isn't a MIME-Type, is it? Do you mean text/plain?

>   header("Content-Length: $len");
>   header("Content-Disposition: inline; filename=Sfyc.html");
>   print($buf);
> ?>
> 
> Todd
> 

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

__ NOD32 1.1284 (2005) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com

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



Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene

Todd Cary wrote:
My client's new shared server does not allow printing to a file, so I 
want my print statement to print to a buffer, then I'll send it to the 
user via Headers.  This does not work since "print" does no go to the 
buffer, or at least appears not to: I get the errors from the header 
statements;




You're missing some parentheses on the ob_start function. I think you 
meant to write:


ob_start();


  print "This is a test";


You probably meant  in that string too.


  $buf = ob_get_contents();
  $len = strlen($buf);
  ob_end_clean();
  header("Content-type: application/text");


application/text isn't a MIME-Type, is it? Do you mean text/plain?


  header("Content-Length: $len");
  header("Content-Disposition: inline; filename=Sfyc.html");
  print($buf);
?>

Todd



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



[PHP] Printing to a buffer

2005-11-12 Thread Todd Cary
My client's new shared server does not allow printing to a file, so I 
want my print statement to print to a buffer, then I'll send it to the 
user via Headers.  This does not work since "print" does no go to the 
buffer, or at least appears not to: I get the errors from the header 
statements;


";
  $buf = ob_get_contents();
  $len = strlen($buf);
  ob_end_clean();
  header("Content-type: application/text");
  header("Content-Length: $len");
  header("Content-Disposition: inline; filename=Sfyc.html");
  print($buf);
?>

Todd

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



RE: [PHP] php/linux user groups in the east bay area..

2005-11-12 Thread bruce
let me ask the question in a different way?

is there anyone in the bay area (dublin/san jose/santa clara/san
francisco/etc...) who would like to get together to talk code/work on
projects/etc...

checked out the existing user groups.. they look rather empty...

-bruce


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 12, 2005 12:58 PM
To: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] php/linux user groups in the east bay area..


Check the PHP.net site or PHPClasses.org -- they both have a good list of
these groups.

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



Re: [PHP] Re: emailing MySQL list not working

2005-11-12 Thread Jasper Bryant-Greene

Bruce Gilbert wrote:

I don't suppose you meant like this : $headers = "From: 
$sender";("\r\n").
or is it without the ( )?


I think you should read up on some basic PHP syntax (the manual is your 
friend. He meant like this:


$headers = "From: $sender\r\n";
$headers .= "Reply-To: $reply_to\r\n";

and so on. If the headers are all on one line then the MTAs and mail 
clients have no way of telling them apart.


Jasper


On 11/12/05, Marco Kaiser <[EMAIL PROTECTED]> wrote:

Hi,

try to add in your $headers linebreaks. ("\r\n").

-- Marco


$headers = "From: $sender";
$headers .= "Reply-To: $reply_to";
$headers .= "Return-Path: $return_path";
$headers .= "X-Sender: $x_sender";
$headers .= "X-Mailer: PHP4\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Mime-Version:1.0\n Content-Type: text/plain;
charset=\"iso-8859-1\nContent-Transfer-Encoding: 8bit\n";



--
::Bruce::



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



Re: [PHP] php/linux user groups in the east bay area..

2005-11-12 Thread Esteamedpw
Check the PHP.net site or PHPClasses.org -- they both have a good list of  
these groups.


[PHP] php/linux user groups in the east bay area..

2005-11-12 Thread bruce
hi..

anybody know of any php/linux/apache user groups in the east bay
(dublin/pleasanton/san ramon/etc...) area?

need to join one to find other like minded php/linux guys who are into
developing..

thanks

-bruce

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



Re: [PHP] Recommendations for the Zend PHP Certification

2005-11-12 Thread Marco Kaiser
Hi Gustavo,

> I want to take the ZPC test the next year and I am going to buy these books:
>- Zend PHP Certification Study Guide.
>- Zend PHP Certification Practice Test Book.

Take the Study Guide from php-architect. Its better than the Zend book.

> By the way, my skills are oriented to LAMP and according to what I read
> on the ZPC's FAQs that is not good. I must know the Standard SQL, not
> only MySQL. So, I have these questions:
>- Where can I find the Standard SQL? I've been googling for it, but I
> couldn't find it.
>- AFAIK, there are 3 versions of the Standard SQL (1993, 1999 and
> 2003), but, Which one am I going to need for this test?
>- Should I learn to use another HTTP server?

i'm certified and i can say, its not necessary that you learn the ANSI
SQL Standard.
Take your book start reading and i think you will pass the exam.

--
Marco Kaiser

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



Re: [PHP] php session in ie

2005-11-12 Thread sunaram patir
On 11/12/05, adriano ghezzi <[EMAIL PROTECTED]> wrote:
> to be redirected to login must have at least one of (
> if(!isset($_SESSION['student_username']) &&
> !isset($_SESSION['student_password'])) )
>
> not set, which one (or both) fail under i.e. ???
>
> hth
>
if both of them aren't set, the user is redirected. but it doesnot
relate to not working in ie or i don't understand what u are meaning.

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



[PHP] Re: emailing MySQL list not working

2005-11-12 Thread Bruce Gilbert
I don't suppose you meant like this : $headers = "From: 
$sender";("\r\n").
or is it without the ( )?

thanks

On 11/12/05, Marco Kaiser <[EMAIL PROTECTED]> wrote:
> Hi,
>
> try to add in your $headers linebreaks. ("\r\n").
>
> -- Marco
>
> > $headers = "From: $sender";
> > $headers .= "Reply-To: $reply_to";
> > $headers .= "Return-Path: $return_path";
> > $headers .= "X-Sender: $x_sender";
> > $headers .= "X-Mailer: PHP4\n"; //mailer
> > $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
> > $headers .= "Mime-Version:1.0\n Content-Type: text/plain;
> > charset=\"iso-8859-1\nContent-Transfer-Encoding: 8bit\n";
>


--
::Bruce::

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



Re: [PHP] php session in ie

2005-11-12 Thread adriano ghezzi
to be redirected to login must have at least one of (
if(!isset($_SESSION['student_username']) &&
!isset($_SESSION['student_password'])) )

not set, which one (or both) fail under i.e. ???

hth

ag.





2005/11/11, sunaram patir <[EMAIL PROTECTED]>:
> Hi, i am having problem with internet explorer. i am working on a
> project on building a website where i need to keep track of the users
> i.e. i use a login system in there in short. with the following code i
> check whether the user is logged in or not.
>  session_start();
>
> $_SESSION['myurl']=$_SERVER['PHP_SELF'];
> if(!isset($_SESSION['student_username']) &&
> !isset($_SESSION['student_password']))
>header("Location: login.php");
> ?>
>
> if the user is not logged in, it redirects to the login page login.php
> as is shown in the above code. now the user is allowed to log in
> through the following code:
>
>
>  session_cache_limiter('private_no_expire');
> session_set_cookie_params(0,"/","schools.zenrays.com");
> session_start();
>
>
>
> if(isset($_POST['submit'])){
>  include("../database.inc");
>  $login=trim($_POST['login']);
>  $pass=trim($_POST['pass']);
>  $Effectivelogin=strtoupper($login);
>  $auth=false;
>  $connection=mysql_connect($host,$user,$password);
>  mysql_select_db($database,$connection);
>  $query="SELECT password FROM students WHERE userID='$Effectivelogin'";
>  $result=mysql_query($query);
>  if(mysql_num_rows($result)){
>   while($row=mysql_fetch_array($result))
>  {
>
>   if($row[0]!=$pass)
> echo ("Wrong Username/Password!");
>else
>  $auth=true;
>  }
>  }
>
>
>  if($auth){
>$_SESSION["student_username"]=$Effectivelogin;
>$_SESSION["student_password"]=$pass;
>if(isset($_SESSION['myurl']))
>   header("Location: http://schools.zenrays.com".$_SESSION['myurl']);
>else
>   header("Location: http://schools.zenrays.com/students";);
>
>  }
>
>
> }
> ?>
> 
> 
> User Authentication
> 
> 
> 
> LoginID:
> 
> Password:
> 
> 
> 
>
>
> 
>
>
> 
>
> then the user is redirected back to the page he visited. it workd fine
> in firefox and msn explorer. in internet explorer, when i visit to a
> link in any page it asks for the login details again. could anyone
> please help me out?!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Re: php session in ie

2005-11-12 Thread sunaram patir
On 11/12/05, James Benson <[EMAIL PROTECTED]> wrote:
>
>
> sunaram patir wrote:
> > Hi, i am having problem with internet explorer. i am working on
> > $_SESSION['myurl']=$_SERVER['PHP_SELF'];
> > if(!isset($_SESSION['student_username']) &&
> > !isset($_SESSION['student_password']))
> >  header("Location: login.php");
> > ?>
>
>
> You should use an absolute path for the header redirection,
>
> header("Location: http://example.com/login.php";);
>
thanks, but it doesn't still solve the problem.

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



[PHP] Recommendations for the Zend PHP Certification

2005-11-12 Thread Gustavo Narea

Hello everybody.

I want to take the ZPC test the next year and I am going to buy these books:
  - Zend PHP Certification Study Guide.
  - Zend PHP Certification Practice Test Book.

Are these ones enough? Should I get other books?

By the way, my skills are oriented to LAMP and according to what I read 
on the ZPC's FAQs that is not good. I must know the Standard SQL, not 
only MySQL. So, I have these questions:
  - Where can I find the Standard SQL? I've been googling for it, but I 
couldn't find it.
  - AFAIK, there are 3 versions of the Standard SQL (1993, 1999 and 
2003), but, Which one am I going to need for this test?

  - Should I learn to use another HTTP server?

Do you have any other suggestion?

Thanks in advanced!

Cheers.

--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

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



[PHP] Re: php session in ie

2005-11-12 Thread James Benson



sunaram patir wrote:

Hi, i am having problem with internet explorer. i am working on a
project on building a website where i need to keep track of the users
i.e. i use a login system in there in short. with the following code i
check whether the user is logged in or not.




You should use an absolute path for the header redirection,

header("Location: http://example.com/login.php";);




if the user is not logged in, it redirects to the login page login.php
as is shown in the above code. now the user is allowed to log in
through the following code:


http://schools.zenrays.com".$_SESSION['myurl']);
 else
header("Location: http://schools.zenrays.com/students";);

   }


}
?>


User Authentication



LoginID:

Password:










then the user is redirected back to the page he visited. it workd fine
in firefox and msn explorer. in internet explorer, when i visit to a
link in any page it asks for the login details again. could anyone
please help me out?!


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



Re: [PHP] arrays question

2005-11-12 Thread Brian V Bonini
On Fri, 2005-11-11 at 15:25, cybermalandro cybermalandro wrote:
> I have this that looks like this
> 
> array(3) {
>   [0]=>
>   array(2) {
> [0]=>
> string(1) "1"
> [1]=>
> string(1) "2"
>   }
>   [1]=>
>   array(2) {
> [0]=>
> string(3) "492"
> [1]=>
> string(3) "211"
>   }
>   [2]=>
>   array(2) {
> [0]=>
> string(2) "11"
> [1]=>
> string(2) "20"
>   }
> }
> 
> I want to loop through so I can get and print "1","492","11" and
> "2","211","20" What is the best way to do this? I suck with arrays and
> I can't get my looping right.

$a = array(array(1,2),
   array(492,211),
   array(11,20)
 );

for($i=0;$i<2;$i++) {
foreach($a as $v) {
echo $v[$i] . "\n";
}

echo "==\n";
}

Prints:

1
492
11
==
2
211
20
==


-Brian
-- 

s/:-[(/]/:-)/g


BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Catch the WMV first frame picture in PHP script?

2005-11-12 Thread M
張 峰銘 wrote:
> Mr. M:
> Hello, thanks for your kind help.
> But my Linux system is Fedora Core 1 ,
> there isn't any totem-video-thumbnailer.
> What should I do?
>  
> Do I have to upgrade the Linux system to FC 3 or heigher  ?
> (the Totem  exists in FC3 )
> or Is there any  other method to solve this problem?

totem-video-thumbnailer should be in of totem rpm. install totem and you
are done.

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



Re: [PHP] emailing MySQL list not working

2005-11-12 Thread Marco Kaiser
Hi,

try to add in your $headers linebreaks. ("\r\n").

-- Marco

> $headers = "From: $sender";
> $headers .= "Reply-To: $reply_to";
> $headers .= "Return-Path: $return_path";
> $headers .= "X-Sender: $x_sender";
> $headers .= "X-Mailer: PHP4\n"; //mailer
> $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
> $headers .= "Mime-Version:1.0\n Content-Type: text/plain;
> charset=\"iso-8859-1\nContent-Transfer-Encoding: 8bit\n";

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