Re: [PHP] Problems compiling PHP 5.0.0b1

2003-07-01 Thread Yann Larrivee
Humm from what i remember ( i saw a snap that did not work with dom
about last week).

In the help there was a not about dom5 i compiled with dom5 and it
worked for me.

But now in the latest snap dom5 option is gone. But compiling php with
dom support works well.

So try to compile --with-dom5 (if the option is there)



On Tue, 2003-07-01 at 13:11, Mauricio Cuenca wrote:
> Hello,
> 
> I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using
> this configure command:
> ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5
> 
> And I get the following error:
> configure: error: libxml2 version 2.5.1 or greater required.
> 
> Then, I downloaded and compiled  libxml 2.5.7 and the same error appears.
> 
> I've compiled several diffrent versions of PHP before without problems. Has
> anyone had a similar problem ?
> 
> TIA,
> 
> _
> Mauricio Cuenca
-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



[PHP] PHP application using gettext

2003-07-01 Thread Yann Larrivee
Hi ,  i have been looking for php web application that uses the Gettext
extension to facilitate the translation.

However i did not really find any.

Anybody as good example of application that uses it and an explanation
why people don't use it other then the fact that you need the extension
to be installed on the server in order for people to use your
application .

Thanks 


-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



Re: [PHP] .inc.php

2003-07-01 Thread Yann Larrivee
Yes beacause the real extension is .php


On Tue, 2003-07-01 at 17:38, Kyle Babich wrote:
> When .inc.php files are included they are also executed whenever the
> script is executed right?
> --
> Kyle
-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



Re: [PHP] outputting xml declaration

2003-07-02 Thread Yann Larrivee
Disable short open tags.

yann

On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote:
> Hello,
> 
> The folowing code gives an error:
> 
> print "";
> 
> This is probably because I print a questionmark? How can I avoid that an
> error is generated?
> 
> Besides it's not an error in the way that it gives an errorstring but it
> writes the output in the error_log of apache...
> 
> Greetings,
> 
> -- 
> Steven Apostolou <[EMAIL PROTECTED]>
-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



[PHP] php5 methode + num parameters

2003-07-07 Thread Yann Larrivee
Hi i have the fallowing code (simplified)

class FormElement {
private $element_id = null;
private $element_name = null;
private $element_type = null;
private $element_style = null;
private $element_string = null;


public function FormElement($properties)
{
$this->SetStyle($properties["default_style"],$properties["error_style"]);
}

private function SetStyle($element_style)
{
$this->element_style = $element_style;
}

}



Avisouly i pass it 2 parameters  and it is expecting only 1.
Usually PHP Bugs when this kind of thing happen right ? (php 4 anyways)
But not in PHP5 it seems.

Anybody else has experienced this problem ?

Thanks

-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



[PHP] __get, __set, __clone

2003-07-08 Thread Yann Larrivee
Hi, in the past 2 days i have been looking into php5 and it's new
features.

I am not a psecialiste of OOP (only been OOPing for 2 month)

For a moment i tought that __set would allow me not to have to define a
methode __set that would set a value to a member variable.

It seems like we have to define the class __set and __get.

for example i tought i would be able to do.

class a{
function __construct(){
$this->__set("var_name1","value1");
$this->__set("var_name2","value2");
}
}

I read these 2 tutorial
http://www.phpbuilder.com/columns/argerich20030411.php3?page=5 (the
explanation seems really bad to me and does not show any usefull way to
use these functions)

http://talks.php.net/show/php5intro/25
This one well i comes back to the same thing as if i code it my self.

So my big question is why , when , how do we use these features
(__get,__set) 
For a moment i tought i would save me time, but if i have to redefine
them what is the point ?

I guess i am somewhat confuse on this issue, any explanation would be
appreciated. 

Thanks


-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



[PHP] Re: __get, __set, __clone

2003-07-09 Thread Yann Larrivee
Hi Greg, thanks for the example. I think i now understand a bit more.

I just need a confirmation on this

$table->FirstName = 'Greg';
$table->LastName = 'Beaver';

This will actually call __set and it will create a member variable named
FristName with the value Greg.

And if you call $table->FirstName and it is not set it will return false
right ?

Honestly i find this way of coding no so clean.
Maybe it is because i am used to do all my sets by hand

$this->SetFirstName($first_name){
$this->first_name= $first_name;
}

$this->GetFirstName(){
if(!isset($this->first_name)){
return false;
}else{
return $this->first_name;
}
}

SO what are the advantages to use __get, __set.

Aviously the way i do it, i do it i have to re have to redoit for all my
variables.
But also i was told to never access a variable directly so i have the
feeling like i am doing a capital sin :D

Yann

On Wed, 2003-07-09 at 02:59, Yann Larrivee wrote:
> -Forwarded Message-
> 
> From: Greg Beaver <[EMAIL PROTECTED]>
> To: Yann Larrivee <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Subject: Re: __get, __set, __clone
> Date: 08 Jul 2003 22:13:37 -0400
> 
> Hi Yann,
> 
> What you are trying to do is possible in PHP 4, actually:
> 
>  class MyTester {
>  function MyTester()
>  {
>  $this->var_name1 = "value1";
>  $this->var_name2 = "value2";
>  }
> }
> 
> $test = new MyTester;
> var_dump($test); // shows two variables, $var_name1 and $var_name2
> ?>
> 
> Here is sample code that uses __set to allow you to transparently 
> declare an object that allows you to set database values just by setting 
> properties.
> 
>  class UsesSetForMysql {
>  private $_db;
>  private $_table;
>  private $_row;
>  private $_keyname;
>  function __construct($server, $user, $password, $database, $table, 
> $keyname, $keyvalue)
>  {
>   $this->_db = mysql_connect($server, $user, $password);
>   $this->_keyname = $keyname;
>   $this->_table = $table;
>   if ($this->_db) {
>   $test = mysql_select_db($this->_db, $database);
>   if ($test) {
>$a = mysql_query('SELECT * FROM ' . $this->_table . ' 
> WHERE ' . $this->_keyname . ' = "' . $keyvalue . '"');
>if ($a) {
> $this->_row = mysql_fetch_array($a, MYSQL_ASSOC);
>}
>   } else {
>mysql_close($this->_db);
>$this->_db = false;
>   }
>   }
>  }
> 
>  function __destruct()
>  {
>   if ($this->_db) {
>mysql_close($this->_db);
>$this->_db = false;
>   }
>  }
> 
>  function __set($name, $value)
>  {
>   if (isset($this->_row) && $this->_row) {
>   $this->_row[$name] = $value;
>   $a = mysql_query('UPDATE ' . $this->_table . " SET $name = 
> \"$value\" WHERE " . $this->_keyname . ' = "' . 
> $this->_row[$this->_keyname] . '"');
>   if ($a) {
>$keyvalue = $this->_row[$name];
>if ($name == $this->_keyname) {
> $keyvalue = $value;
>}
>$a = mysql_query('SELECT * FROM ' . $this->_table . ' 
> WHERE ' . $this->_keyname . ' = "' . $keyvalue . '"');
>$this->_row = mysql_fetch_array($a, MYSQL_ASSOC);
>   }
>   }
>  }
> 
>  function __get($name, &$value)
>  {
>  if (isset($this->_row) && is_array($this->_row)) {
>  if (isset($this->_row[$name])) {
>  $value = $this->_row[$name];
>  return true;
>  } else {
>  return false;
>  }
>  }
>  }
> }
> 
> $table = new UsesSetForMysql('localhost', 'dummy', 'madeup', 'mytable', 
> 'mykey', 6);
> $table->FirstName = 'Greg';
> $table->LastName = 'Beaver';
> // etc.
> ?>
> 
> :)
> Greg
> 
> Yann Larrivee wrote:
> > Hi, in the past 2 days i have been looking into php5 and it's new
> > features.
> > 
> > I am not a 

[PHP] preg, patern quantifier limit

2003-08-01 Thread Yann Larrivee
Hi, i did a standard preg [A-Za-z0-9]{1,65536}

What i am simply trying to do is to validate the a form that will insert
into my TEXT database field. So i just want to prevent a larger insert
then expected.


PHP trows me this error "preg_match(): Compilation failed: number too
big in {} quantifier at offset 19 ..."


So it appears that quantifiers are limited. Anybody knows what that
limit is ?


Thanks

-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



Re: [PHP] Re: PGP?

2003-06-07 Thread Yann Larrivee
Look up gpgext on 
http://freshmeat.net/projects/gpgext/?topic_id=44%2C809

Its a php extension that enable you to manage keys, encrypt, decrypt
with gpg and php.

Yann Larrivee
www.phpquebec.org

On Fri, 2003-06-06 at 18:44, Ryan Vennell wrote:
> chances are, if it's possible it'd be a plugin or script on the PGP homepage.  try 
> there.  or maybe try http://php.resourceindex.com/  they may have something of use 
> to you
> 
> -Ryan
> 
> 
> 
> 
> >>> Ben Cheng<[EMAIL PROTECTED]> 06/06/03 08:54AM >>>
> Any way in PHP to grab form info and then encrypt it with PGP before 
> sending it out as an email?
> 
> -Ben
> 
> 
> 
> 
> -- 
> 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] PHP getting values from XML

2003-06-01 Thread Yann Larrivee
Hi there are a couple projects done in php to go around these problemes
however it will cost you on performance.

Here are a couple projects you might want to look into (I never used
them, but since the book XML and PHP talk about them i guess they are
good proejcts)

eZXML (an alternative to PHP/Dom) 
PHP.XPATH http://sourceforge.net/projects/phpxpath/
PHP XML RPC http://sourceforge.net/projects/phpxmlrpc/
NuSOAP http://dietrich.ganx4.com/nusoap/index.php (befor it was named
SOAPx4)

There must be other projects also but i dont know them.

Yann Larrivée
www.phpquebec.org
www.protonicdesign.com


On Sat, 2003-05-31 at 22:52, [EMAIL PROTECTED] wrote:
> Hello All and Thanks in advance.
> 
> I'm developing a site PHP site.
> 
> I would like to define HTML code in XML and be able to get the HTML code using PHP.
> 
> I was hoping for a simple example.
> 
> I will not be able to update the version of PHP with any "modules" as my hosting 
> company (hostway.com) admins the PHP environment.
> 
> Cheers,
> 
> Ray
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 




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



[PHP] Evaluating defines

2003-06-05 Thread Yann Larrivee
Hi, i have a template system where the user can define some multilangual
defines, identified by {Label[My_define_name]} in the template.

Its one of the way i figured to go around the probleme of multilangual
websites.

Ok the function below parse the template and gets all the
{Lang[My_deifne]} and the My_define.

My probleme is that i need to return the value of my define and not its
name. My eval doesnt seem to work.

Any body as a sugestion , or a better way to do this without passing by
eval . 

Thanks

--
function ParseLabel(){
   
preg_match_all("/\{(Label)*\[([-A-Za-z_]*)]\}/",$this->GetTemplateString(),$out);

$j = count($out[2]);
for($i=0;$i<$j;$i++){
if(!defined($out[2][$i])){

$error_message = str_replace("{tag}", $out[0][$i],
NoMatchingLangLiteral);
   
$this->_err->ErrorHandler(NoMatchingLangLiteralErrorNumber,$error_message,__FILE__,__LINE__);
}else{
$to_replace[] = $out[0][$i];
->
$replace_by[] = eval("echo \$out[2][$i];");
<
}
}
$this->ReplaceTag($to_replace,$replace_by);
}
---




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



Re: [PHP] Evaluating defines

2003-06-05 Thread Yann Larrivee
I found the fonction constant that return the value of a constant if you
passe the name of the constant in parameter.

so it would now be

-
$replace_by[] = constant$out[2][$i]);
-

It should also be faster then eval

Thanks for the help

Yann Larrivee


On Thu, 2003-06-05 at 00:21, Ernest E Vogelsinger wrote:
> At 13:46 04.06.2003, Yann Larrivee said:
> [snip]
> >My probleme is that i need to return the value of my define and not its
> >name. My eval doesnt seem to work.
> >
> >Any body as a sugestion , or a better way to do this without passing by
> >eval . 
> >
> >$replace_by[] = eval("echo \$out[2][$i];");
> [snip] 
> 
> echo'ing the value wouldn't work here - you want the value part of your
> defined name in a variable. You need this assignment within the eval:
> 
> eval('$replace_by[] = ' . $out[2][$i] . ';');
> 
> After this eval, the $replace_by array will contain the correct value.
> 
> 
> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 
> 



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



Re: [PHP] PHP installation on RedHat

2003-06-14 Thread Yann Larrivee
Hi i made a tutorial on how to compile php, expath, libxml, sablotron 

It works well for me. I ran into many probleme so i made an faq page
where all errors are listed with an explanation, solution.
If anybody encounter other errors i will put them there too.

I compile on Suse 8.2 but i dont think it should make a difference.

Yann Larrivee
www.phpquebec.org
www.protonicdesign.com


On Sat, 2003-06-14 at 19:24, Info Best-IT wrote:
> Anyone know where I can get a better step by step how to for installation of PHP 
> with DOM, 
> XSLT, and XPATh support on Red Hat?  PHP.NET is not so hot...
> 
> /T
> 
> -- 
> 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] PHP installation on RedHat

2003-06-15 Thread Yann Larrivee
Oups sorry with a link it always works better ;)

http://protonicdesign.com/tutorial/sablot_and_php.php

Yann Larrivee
www.phpquebec.org
www.protonicdesign.com

Sorry the tutorial is not in french yet.
I will translate it soone.

On Sun, 2003-06-15 at 08:02, Tim Best wrote:
> Bonsoir Yann,
> 
> Je suis intriguer de votre 'tutorial'!  Mais je ne
> peux pas le trouver...  Ou est-it exactement?
> 
> Merci beaucoup pour votre assistance! (et ecriver en
> français, merci de votre patience avec moi. ;-)
> 
> /Tim Best
> Best IT
> cell: 504-231-1084
> fax: 206-338-6162
> [EMAIL PROTECTED]
> http://www.best-it.biz
> 
> PS: I am sorry for emailing to you from this different
> address.  I am having problems with my email account.
> 
> 
> 
> 
> on 6/11/03 10:56, Yann Larrivee at
> [EMAIL PROTECTED] wrote:
> 
> Hi i made a tutorial on how to compile php, expath,
> libxml, sablotron
> 
> It works well for me. I ran into many probleme so i
> made an faq page
> where all errors are listed with an explanation,
> solution.
> If anybody encounter other errors i will put them
> there too.
> 
> I compile on Suse 8.2 but i dont think it should make
> a difference.
> 
> Yann Larrivee
> www.phpquebec.org
> www.protonicdesign.com
> 
> 
> On Sat, 2003-06-14 at 19:24, Info Best-IT wrote:
> > Anyone know where I can get a better step by step
> how to for installation of PHP with DOM,
> > XSLT, and XPATh support on Red Hat?  PHP.NET is not
> so hot...
> >
> > /T
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 





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



[PHP] max_execution_time

2003-06-17 Thread Yann Larrivee
Hi, i made a major programing mistake this mornning. It probably helped
me to figure out a bug in PHP 5. But i would like to confirme with more
people...

class MyClass{
public MylClass(){
$this->MyFunc();
}

private MyFunc(){
$this->MyFunc();
}
}

Avisously this loops indefinitly :)

But the script never ended will i this it should have been right ?

I haven't seen any bug reports for PHP5 but anybody have experienced
this issu befor ?

Thanks





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



Re: [PHP] max_execution_time

2003-06-17 Thread Yann Larrivee
But i think that it should stop after 30 secondes no ?

Yann

On Tue, 2003-06-17 at 22:35, R'twick Niceorgaw wrote:
> doesn't sound like a bug to me ... after all there's something called
> recursive functions ?
> 
> - Original Message ----- 
> From: "Yann Larrivee" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 17, 2003 6:18 AM
> Subject: [PHP] max_execution_time
> 
> 
> > Hi, i made a major programing mistake this mornning. It probably helped
> > me to figure out a bug in PHP 5. But i would like to confirme with more
> > people...
> >
> > class MyClass{
> > public MylClass(){
> > $this->MyFunc();
> > }
> >
> > private MyFunc(){
> > $this->MyFunc();
> > }
> > }
> >
> > Avisously this loops indefinitly :)
> >
> > But the script never ended will i this it should have been right ?
> >
> > I haven't seen any bug reports for PHP5 but anybody have experienced
> > this issu befor ?
> >
> > Thanks
> >
> >
> >
> >
> >
> > -- 
> > 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] Zend Studio and DreamWeaver MX

2003-06-27 Thread Yann Larrivee


On Fri, 2003-06-27 at 14:26, Daniel J. Rychlik wrote:
> Hey guys,
> 
> Which is a better environment to write PHP code in?  Zend or Dreamweaver ?

Zend Studio all the way, dont let DW mess up your php code like it
messes up html !!!

>   Does zend provide a WYSIWYG for putting together a web page ?  
> 

No

> -Dan


It all depends what you want to do and what type of user you are.
Graphist will like DW because it provids an easy way to integrate php in
web pages.

Programmers will like Zend the debuger, and additional functionalities
that it can offer.

Honestly i use Vi for performance issue,its price and it those not messup my html code 
 !
 
-- 
Yann Larrivee <[EMAIL PROTECTED]>


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



[PHP] SQL injection

2003-10-16 Thread Yann Larrivee
Hi i read many thing on sql injection but i just cant sumarize all the
information.

Most site (PHPadvisory.com, phpsecure.info, other found on google) dont
talk to mutch on how to prevent SQL injection.

At some place, they mentionned having a badword list, but really in a
product description we can have about anyword (select, insert, update,
...) SO the badword liste is not really the solution i believe.


I did the fallowing single quoted all the queries, parameters (even if
numerical), did a mysql_real_eascape_string on all parameters befor they
are passed to mysql.

Also my Queries are always fairly long and no queries and by a parameter
(at least i try not too)

Do you guys have any other tips ?

Thanks

Yann

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



[PHP] Generating PDF

2003-12-31 Thread Yann Larrivee
Hi i am trying to generate a PDF with PHP5 (latest cvs) and PDFLib 5.0.2

I have this very basic example that i took from php.net and saw the same
code on http://www.sitepoint.com/article/1225/1



But the function pdf_begin_page always return this error messsage.


Fatal error: PDFlib error [2100] PDF_begin_page: Function must not be
called in 'object' scope in
/home/yann/public_html/test/pdf/OrderPdf.class on line 4


To me this example seems right, and the function calls seems alright
according to the docummentation.


Anybody else have seen this probleme befor ?


Thanks

Yann

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



Re: [PHP] Generating PDF

2004-01-07 Thread Yann Larrivee
Thanks, it was a permission issue. 

Yann

On Wed, 2003-12-31 at 11:13, Evan Nemerson wrote:
> On Wednesday 31 December 2003 09:29 am, Yann Larrivee wrote:
> > Hi i am trying to generate a PDF with PHP5 (latest cvs) and PDFLib 5.0.2
> >
> > I have this very basic example that i took from php.net and saw the same
> > code on http://www.sitepoint.com/article/1225/1
> >
> >  > $pdf = pdf_new();
> > pdf_open_file($pdf, "philosophy.pdf");
> > pdf_begin_page($pdf, 595, 842);
> > $arial = pdf_findfont($pdf, "Arial", "host", 1);
> > pdf_setfont($pdf, $arial, 10);
> > pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",
> > 50, 750);
> > pdf_end_page($pdf);
> > pdf_close($pdf);
> > ?>
> >
> > But the function pdf_begin_page always return this error messsage.
> >
> >
> > Fatal error: PDFlib error [2100] PDF_begin_page: Function must not be
> > called in 'object' scope in
> > /home/yann/public_html/test/pdf/OrderPdf.class on line 4
> >
> Do you have permissions to write to/create philosophy.pdf? Does pdf_begin_page 
> return TRUE or FALSE? What happens when you use "" for filename (ie create 
> the file in memory)?
> >
> > To me this example seems right, and the function calls seems alright
> > according to the docummentation.
> >
> >
> > Anybody else have seen this probleme befor ?
> >
> >
> > Thanks
> >
> > Yann

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



Re: [PHP] _("What does this do?")

2004-01-12 Thread Yann Larrivee
This is the equivalent to the function gettext
http://ca3.php.net/manual/en/function.gettext.php

Yann Larrivee
http://conf.phpquebec.com
http://protonicdesign.com


On Mon, 2004-01-12 at 12:42, Kelly Hallman wrote:
> I just ran across this syntax in someone else's code.
> I can't detect any difference between these two expressions:
> 
> _("String value") and "String value"
> 
> Is there a difference? What does _("xyz") do, and is it documented
> anywhere? I'm curious why this code (SquirrelMail) uses it in one place,
> but not another. What say you, PHP gurus? Gotta love the syntactic sugar!
> 
> --
> Kelly Hallman
> // Ultrafancy
-- 
Yann Larrivee <[EMAIL PROTECTED]>

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



Re: [PHP] MathML

2004-07-27 Thread Yann Larrivee
Hi,

I know there is an extension to render mathml with php4.
You can find more information about it here.
http://www.math.mcgill.ca/~drew/mathmlrender/

Yann Larrivee

On Tue, 2004-07-27 at 09:50, EE wrote:
> Dears,
> 
> I wounder if PHP support MathML? I not really not sure if actually if it
> is browser function or server-side function?

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



Re: [PHP] Re: oop too slow

2004-08-19 Thread Yann Larrivee
You could simply recall the constructor if the object exist.

This way you do not create the objects for every data entry you have and
aviously it will use less ressources.

Also like someone else told you, Get a Debuger! It will point out the
slow part of your code.

For example i had 30 000 lines of code in php5 oo (templating system +
e-com) to generate a page it would take 0.3 seconds.
I concider this as not too bad.


Yann


On Thu, 2004-08-19 at 07:26, Krzysztof Gorzelak wrote:
> > > Each object gets data from mysql by itself. The generation time of 1
> > > category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes as
> I
> > > said more than a 1s (on quite fast machine). How can this model be
> improved?
> >
> > Why are you doing 300(!!!) mysql queries?
> > I guess you can retrieve the same data with much less queries.
> > 300 queries are slow ... not OOP.
> >
> 
> Well, I changed my script a little for tests and turned off the queries. Now
> I'm setting some defaults data to those 300 objects but it's still too slow.
> I create for every value, key and product a different object so it's in fact
> 30*10*5 objects. Then I run __toString() method one by one and generate my
> page. Is it proper to creating a separate objects for all values ? It makes
> my code much more easy...
> 
> Krzysztof Gorzelak
> [EMAIL PROTECTED]

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



Re: [PHP] PHP Oficial Certification

2004-08-26 Thread Yann Larrivee
On Thu, 2004-08-26 at 18:07, Kevin Waterson wrote:
> This one time, at band camp, "Marcos Thiago M. Fabis" <[EMAIL PROTECTED]> wrote:
> 
> > I just saw that: http://www.phparch.com/cert/
> 
> What do they mean by 'official' certification?
> Is this sanctioned by php.net?
> 

Not at all.
I personally dont beleive in this. It is juste another way to make money
;) Every body in the indeustry should know that.

PHP.net has nothing to do with it, execpt that some people from the
php.net team help put it together.

Hostely, what kind of market value does the certification has? Go get
sun certified at least it has some sort of history and value.

Yann

> Kevin
> -
>  __  
> (_ \ 
>  _) )            
> |  /  / _  ) / _  | / ___) / _  )
> | |  ( (/ / ( ( | |( (___ ( (/ / 
> |_|   \) \_||_| \) \)
> Kevin Waterson
> Port Macquarie, Australia

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



Re: [PHP] PHP Oficial Certification

2004-08-26 Thread Yann Larrivee
Sorry another reply, there use to be the .geek php certification that
was annonced on php.net then was removed right off like 2 days after)

Was it cause of some pressure of a companie and group of people ? You
tell me.

It was not really professional according to me, but you cant kill the
competition like this , well at least not in opensource world.

Yann

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



Re: [PHP] PHP Oficial Certification

2004-08-26 Thread Yann Larrivee
What is a PHP certification anyway.

TO see if you know the modules/functions ? Or see if you know how to
programme well.

If you wanna show if you can programme well, sun would do the job.

Yann

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



Re: [PHP] PHP Oficial Certification

2004-08-26 Thread Yann Larrivee
Exactly it think that experience is probably the only valuable thing
there is.

For shure a beginner will benefit from this has it is problably give him
a salary increase compared to the guy that is not certified (we all know
that php developper are under paid) So this part is good.
It will also eliminate some people out of the market for shure at some
point. 


Yep emplyers will use it to evaluate people, but like i said i you want
to get good exprience just work on a open source software if you don't
have any work experience. 

Now has far has sun certification how it will help you get a php job.
Well depends what kind of job you are looking for. A job where you only
do php 24/7 or you do other stuff on the side (Java, C++, PHP, ...)

If so then beeing certified PHP just assure that you know PHP and some
principles.
If you thake the sun certification it is been there for a far longer
time ans since your job requires both in this case the sun certification
means more.

But certifications are just there to prove your level of understanding.

Yann

On Fri, 2004-08-27 at 00:23, John Nichel wrote:
> John Holmes wrote:
> > Yann Larrivee wrote:
> > 
> >> If you wanna show if you can programme well, sun would do the job.
> > 
> > 
> > I burn easily. HTF is a Sun certification going to help you get a PHP 
> > job? Like Curt said, take the practice test and then decide.
> > 
> 
> Know what helps me get php jobs?  A resume that details almost 6 years 
> of php programming.
> 
> That and the fact that I will work for hardware. ;)
> 
> -- 
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com

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



Re: [PHP] PHP Oficial Certification

2004-08-28 Thread Yann Larrivee
Well i think in a way that getting programmers certified is one thing. I
also think that there might be a need for software certification.
Where it would validate that the standars have been fallowed, check the
quality of the code, check for security, check for proper docummentation
(comments, uml, user docs)
Some what like the ISO 9002 certification but more software oriented.

I think this would help php be more accepted by large compagnies, banks
and gouvernements. It would also reassure the company that buy a
software. The problem with this it would requiert alot of work!

Certify programmers is just solving one part of the problem.
Certifying software and business is the big piece and where money will
be involed.!


On Sat, 2004-08-28 at 11:57, Chris Shiflett wrote:
> --- Yann Larrivee <[EMAIL PROTECTED]> wrote:
> > I personally dont beleive in this. It is juste another way to make
> > money ;) Every body in the indeustry should know that.
> 
> Disclaimer: I assisted in the creation of the Zend PHP Certification.
> 
> You're right - this is another way to make money. However, based on my
> interpretation of what you're suggesting, I think you're wrong about where
> Zend intends to make that money. You really think they're going to make a
> significant amount of money from people paying to take this certification?
> 
> Zend is a major company that will grow as PHP itself grows. This
> certification helps PHP in the enterprise and make it seem like a more
> legitimate option for companies looking to spend a lot of money on their
> Web infrastructure. It also helps the entire PHP community, whether we get
> certified or not. The more PHP is used, the more demand for PHP developers
> there will be, the higher the salaries will be, etc.
> 
> > PHP.net has nothing to do with it, execpt that some people from the
> > php.net team help put it together.
> 
> I assume you mean the PHP Group has nothing to do with it (php.net is a
> domain name with no other significance), and you're right. Of course, Zend
> is a much more appropriate entity for this. I'd prefer that the PHP Group
> spend their time making PHP better and better.
> 
> > Hostely, what kind of market value does the certification has? Go get
> > sun certified at least it has some sort of history and value.
> 
> You should think about that for a minute (apply some good common sense).
> 
> Chris
> 
> =
> Chris Shiflett - http://shiflett.org/
> 
> PHP Security - O'Reilly
>  Coming Fall 2004
> HTTP Developer's Handbook - Sams
>  http://httphandbook.org/
> PHP Community Site
>  http://phpcommunity.org/

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



Re: [PHP] PHP5 DOM

2005-02-22 Thread Yann Larrivee
Hi Sergio maybe you should have a look at importNode 
http://ca3.php.net/manual/en/function.dom-domdocument-importnode.php

I beleive this is what you need along with Normalize.

Good luck.
Yann

On Tuesday 22 February 2005 06:54, Sergio Gorelyshev wrote:
> Hi to all. I have a problem. I need to "glue" 2 or more DomDocument?
> objects to one. After hours of hard coding I've came to the conclusion that
> there is no possibility to use  PHP 5.3.0 to realize it.  Is there anybody
> who could break this conclusion and give me an appropriate solution?
>
> P.S. I did it with PHP 5.1.0 cvs version and I used a small trick.
>
> Thanks.
> --
> RE5PECT
> Sergio Gorelyshev

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



Re: [PHP] HOWTO read PHP source code into a textarea

2005-02-25 Thread Yann Larrivee
Hello

More precisy see 
http://ca.php.net/manual/en/ref.filesystem.php

Cheers,
Yann

On Friday 25 February 2005 18:56, Tyler Replogle wrote:
> Try php.net for flat file date basing. It should tell you how to read a
> line and write to a new line.
>
> >From: Tim Burgan <[EMAIL PROTECTED]>
> >To: "[php] PHP General List" 
> >Subject: [PHP] HOWTO read PHP source code into a textarea
> >Date: Fri, 25 Feb 2005 10:26:36 +1030
> >MIME-Version: 1.0
> >Received: from lists.php.net ([216.92.131.4]) by mc10-f12.hotmail.com with
> >Microsoft SMTPSVC(6.0.3790.211); Fri, 25 Feb 2005 09:20:40 -0800
> >Received: from ([216.92.131.4:17572] helo=lists.php.net)by pb1.pair.com
> >(ecelerity HEAD r(5124)) with SMTPid D9/58-51537-46E5F124 for
> ><[EMAIL PROTECTED]>; Fri, 25 Feb 2005 12:20:37 -0500
> >Received: (qmail 56201 invoked by uid 1010); 25 Feb 2005 16:23:57 -
> >Received: (qmail 29434 invoked by uid 1010); 25 Feb 2005 15:51:19 -
> >X-Message-Info: 6sSXyD95QpV9yk8eof5sDoBjj7rfuQB3oBBEJSBDxio=
> >Return-Path: <[EMAIL PROTECTED]>
> >X-Host-Fingerprint: 216.92.131.4 lists.php.net  Mailing-List: contact
> >[EMAIL PROTECTED]; run by ezmlm
> >Precedence: bulk
> >list-help: 
> >list-unsubscribe: 
> >list-post: 
> >Delivered-To: mailing list php-general@lists.php.net
> >Delivered-To: [EMAIL PROTECTED]
> >Delivered-To: [EMAIL PROTECTED]
> >X-Host-Fingerprint: 66.102.135.69 mx69a.mysite4now.com Windows 2000 SP4,
> > XP SP1
> >X-SmartMax-AuthUser: [EMAIL PROTECTED]
> >User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
> >X-Accept-Language: en-us, en
> >X-OriginalArrivalTime: 25 Feb 2005 17:20:40.0742 (UTC)
> >FILETIME=[546FDC60:01C51B5E]
> >
> >Hello,
> >
> >
> >I have a file 'nav.php', whose source code I want to load into the
> > textarea on page 'aaa.php', so the source can be edited and changed.
> >
> >Is there a resource that I can read to help me do this?
> >
> >
> >Thanks
> >
> >Tim
> >
> >--
> >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] xml -> xslt -> xsl:fo -> pdf

2004-05-24 Thread Yann Larrivee
 You need the pear packadge XML_fo2PDF

http://pear.php.net/package/XML_fo2pdf

Yann

On Mon, 2004-05-24 at 15:22, Ray Hunter wrote:
> On Mon, 2004-05-24 at 10:53, juan vazquez wrote:
> > Hi,
> > I am trying to transform a xsl:fo file to pdf.
> > I generate xml files from mysql and I can convert them to xsl:fo using xslt
> > but I can't find information for the last step (XSL:FO to PDF)
> > I just know that a formatter is needed but all what I found where java, jade
> > or .net based solutions.
> 
> Not sure if there is a php functionality for the fo transform...you
> might need to run it through like java and call a fop object on it.
> 
> --
> Ray

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



Re: [PHP] PHP Debugger 4 Linux?

2004-06-04 Thread Yann Larrivee
Xdebug, is free and works on unix and windows and it is a PHP extension.

www.xdebug.org

Yann

On Fri, 2004-06-04 at 09:51, Marco Schuler wrote:
> Am Fr, 2004-06-04 um 00.14 schrieb Nick Wilson:
> > Hi everyone, 
> > 
> > Can anyone recommend a good debugger for *nix?
> 
> Zend Studio
> 
> > Many thx!
> > -- 
> > Nick W
> 
> -- 
> Regards
>  Marco

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



Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Yann Larrivee
Hello,

Just use xdebug
www.xdebug.org

It's nice,  and IDE independant.
It also generate code profile (in case you need to optimise)

Has far has IDE wise. I know Komodo use xdebug for it's debugger and code step 
trough, so it must be good.

If you have more questions  regarding xdebug let me know. I will try to 
answer.

Cheers.
Yann

On Sunday 20 August 2006 23:55, Dave M G wrote:
> PHP List,
>
> For the last month I have been using Zend Studio and Zend Platform on
> the one month trial period. It works well enough that I was considering
> purchasing it.
>
> But it's only now that I realize that the one feature that makes it
> worthwhile for me, the "debug server" option, is only available in the
> professional edition.
>
> I'm just a lone PHP programmer doing web pages for mainly non-profit
> (not charitable, just extremely cash poor) organizations. The difference
> between the 100 US dollar standard edition and the 300 US dollar
> professional edition is a deal breaker.
>
> So I'm looking around for other debugging options.
>
> The best contender so far has been Quanta with the Gubed plug in. But it
> is buggy, and while I've had success in running it, I've also had as
> much trouble. Especially with some error messages that won't go away:
> http://forum.gubed.mccabe.nu/viewtopic.php?t=396&sid=5b76626496aab99293e062
>c494a7af2e
>
> After that PHPeclipse seems good. By "seems" I mean that I've installed
> Eclipse and PHPeclipse and can run them and see they have a sexy
> interface and all. But trying to download the DBG package that makes
> PHPeclipse interface with the server is near impossible.
>
> As I'm an Ubuntu user, I tried looking up distro-specific instructions
> for installing DBG, and the one forum entry on the topic I found:
> http://www.ubuntuforums.org/showthread.php?t=6672
> ... says to go to this web page:
> http://www.phpeclipse.de/tiki-index.php?page=DbgBasedDebugger
> ... where the installation instructions are for Windows!
>
> There's also a package called "NuSphere", which is paid software, but
> also rests on the DBG debugger technology. I'm very hesitant to
> encounter the same difficulties in installing DBG and having to pay for
> it as well.
>
> I asked once before on this list about which PHP editors people
> recommend, which is how I heard of Eclipse.
>
> However, now I'm asking:
>
> Does anyone know how to get a reliable PHP graphical debugger to
> actually install and work on Linux?
>
> Any tutorials or instructions available anywhere that are newbie
> friendly? After all, aren't the newbies the ones most likely to be the
> ones to use a GUI debugger?
>
> Any advice or help would be greatly appreciated.
>
> Thank you for your time.
>
> --
> Dave M G
> Ubuntu 6.06 LTS
> Kernel 2.6.17.7
> Pentium D Dual Core Processor
> PHP 5, MySQL 5, Apache 2

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



Re: [PHP] extract(filename)

2004-02-04 Thread Yann Larrivee
Check 

pathinfo()

http://ca3.php.net/manual/en/function.pathinfo.php


Yann
www.phpquebec.org

On Wed, 2004-02-04 at 12:56, John Taylor-Johnston wrote:
> In Borland Delphi, I can extract a filename from the paramstr(0)
> and then exchange out the extension.
> 
> ChangeFileExt(extractfilename(paramstr(0)), '.html');
> 
> Is there a way to extract the filename of "/home/www/calendars/february2004.html"
> and swap its extension for .htm?
> 
> february2004.htm is pure html. In february.html I include a header and a footer
> and then ("february2004.htm");
> 
> I would like to have some automatic code to do this instead of hand-coding 48 files.
> 
> Do-able? How? I know these variables (PHP Version 4.3.4) but don't know how to start?
> 
> $REQUEST_URI
> $_SERVER["REQUEST_URI"]
> $SCRIPT_NAME
> $_SERVER["SCRIPT_NAME"]
> $_SERVER["PHP_SELF"]
> $PHP_SELF
> 
> Thanks,
> J
-- 
Yann Larrivee <[EMAIL PROTECTED]>

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



Re: [PHP] CMS Templating with Standards Based HTML Delima...

2004-03-20 Thread Yann Larrivee
Hi,

There are a few steps to do befor you go ahead and choose a CMS.

One of them, is determining your needs.
Second is looking at the major projects and see how each of them answer
your needs.
The size of the community supporting the project.
Code quality (does it re-use existing code from the community ie: did
they recode their database abstraction layer or used PearDB)
How many database it support (mysql is good, but maybe you want to offer
the choice to your customer)
Is done in 00 ?
Does it have search engine friendly url by default (many cms generate
really long url)
Does it support many languages (in my case this is important to be able
to manage a multi-langual website).
And the most important one, Is it easy to modify and is their a good
user and programmer reference and manual.

Plus doing a set of bench mark might be interesting to do, to know how
many visitors the system can handle

If none answer exactly your need, (say 90%) why not code the 10% and
give it to the community instead of recoding the hole thing.

Coding such a system is complexe, and will require alot of energy, will
the community could provid most of the work.

Here are a couple website that could help you choose.
http://www.opensourcecms.com/
http://www.cmsreview.com/
http://www.cmsinfo.org/

Another quit way to get around the most popular CMS would be to attend
to our CMS debate (will be in french) at the PHP Quebec Conference.

In 2 hours we will go around the most critical needs that a CMS should
offer, and how the most popular project like :TikiWiki, Spip, Xoops,
Typo3, Zope, answer them.

Personally i use xoops for the PHP Quebec community website
http://www.phpquebec.org i also saw breifly tikiwiki seems a great
product.


Good luck.

Yann Larrivée


On Sat, 2004-03-20 at 18:01, Adam Reiswig wrote:
> I have just been to hotscripts.com looking under their php area for good 
> cms software.  The sheer number of choices is staggering to say the 
> least.  I found Smarty and it seems like it might make a good choice for 
> my needs.   I am really looking to fill two needs.
> 
> One, a robust cms in which I can create standards based web templates 
> (ie, table less layouts using xhtml strict and css)
> 
> and Two, an easy method in which my clients can still edit their own 
> content with out having to learn anything new, or at least as little as 
> possible.  Some sort of wysiwyg would be great if that's possible with 
> out conflicting with existing css styles and as long as it didn't insert 
> font tags and tables all over.
> 
> Is there a good open source php based cms system out there that can do 
> the above?  I'd sure like to know about it.  Thanks for any pointers!
> 
> -Adam R.

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



Re: [PHP] PHP5 Release

2004-03-22 Thread Yann Larrivee
RC's should never be used in production area, you can use them to teste
the new feautres and your software.


Yann

On Mon, 2004-03-22 at 20:45, [EMAIL PROTECTED] wrote:
> Hi there i noticed RC1 is released, it states not for critical use, does
> that mean for development purposes still ?

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