RE: [PHP] Reading and using GIF files

2003-10-30 Thread BENARD Jean-philippe
>>> Fatal error: Call to undefined function: imagecreatefromgif() in ...

New GD version doen't include "imagecreatefromgif" api because of gif patent
...

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])

-Message d'origine-
De : Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 30 octobre 2003 14:53
À : BENARD Jean-philippe
Cc : [EMAIL PROTECTED]
Objet : Re: [PHP] Reading and using GIF files

BENARD Jean-philippe wrote:

> Hi,
> 
>   Now GD doesn't support GIF file format, how can I use imageXXX
> functions in order to resize/transform/... GIF files?
> Are there any tools transforming GIF to JPG/PNG/..?
> 
Use image functions in this order:
imagecreatefromgif - read the gif file
imagecreate - this will hold your resized image
imagecopyresampled - from the gif source to the new image
imagepng/imagejpeg - output the resampled image as png/jpg

-- 
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] Reading and using GIF files

2003-10-30 Thread BENARD Jean-philippe
Hi,

Now GD doesn't support GIF file format, how can I use imageXXX
functions in order to resize/transform/... GIF files?
Are there any tools transforming GIF to JPG/PNG/..?

Thks in advance.

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP] PHP 4.3.3 On Netscape WebServer

2003-10-24 Thread BENARD Jean-philippe
Hi,

I don't find anything about PHP module/integration for netscape
webserver. Does somebody has done it or know where I can found interesting
articles? (how to compile PHP, how to make a module, ...).

Many thanks in advance.

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



RE: [PHP] DB's on seperate server

2003-10-20 Thread BENARD Jean-philippe
Hi,

With Oracle I'm sure the answer is "YES". Once compiled, PHP needs
Oracle libs in order to use OCI. I don't know exactly which libs but I think
there's somewhere a list of all needed libs which you could copy on your web
server.

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])
-Message d'origine-
De : Ryan Thompson [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 20 octobre 2003 05:50
À : [EMAIL PROTECTED]
Objet : [PHP] DB's on seperate server

Quick yes or no question. My db's are running on a different server then my 
Webserver. I've temporarily mounted the directories from the db server to
the 
webserver to compile db access. Once PHP/Apache are compiled can they be 
safely unmounted or will it give me problems somewhere down the line? 

I guess in short. Once compiled does PHP need anything from the database 
install
directories?
-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

-- 
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] "const" in PHP

2003-10-16 Thread BENARD Jean-philippe
Hi,

With the ArcaAttributes class definition (see below) I've an arror
when trying to use one of the constants of this class as this :

echo ArcaAttributes::ATT_EMPLOYEENUMBER;

Parse error: parse error, expecting `'('' in
/dtpdev01/dtp/racine-web/arca_test/test.php on line 117

It seams waiting only functions when using "::".

Could someone help me ? How to define constant in a cless without the
"define()" function ? (I don't want to use the define function because it
makes the constant defined everywhere).

Many thanks in advance !

>>>
class ArcaAttributes {
/**
 * Liste des attributs à retourner
 * @var array
 */
var $attributes = array();
var $set = false;

const ATT_EMPLOYEENUMBER = 'uid';
const ATT_CN = 'cn';
const ATT_MAIL = 'mail';
const ATT_POSTALADDRESS = 'postofficebox';
const ATT_TELEPHONENUMBER = 'telephonenumber';

const ATT_DEFAULT_PERSON_ATTRIBUTES = array(
ArcaAttributes::ATT_EMPLOYEENUMBER,
ArcaAttributes::ATT_CN,
ArcaAttributes::ATT_MAIL,
ArcaAttributes::ATT_POSTALADDRESS,
ArcaAttributes::ATT_TELEPHONENUMBER
);

function ArcaAttributes($clearList = false) {
if ($clearList)
$this->attributes = array();
else
$this->setDefaultAttributes();
}

function addAttribute($attrib) {
array_push($this->attributes, $attrib);
}

function clearAttributes($clearList = false) {
if ($clearList) {
$this->set = false;
$this->attributes = array();
}
else
$this->setDefaultAttributes();
}

function setDefaultAttributes() {
$this->set = true;
$this->attributes =
ArcaAttributes::ATT_DEFAULT_PERSON_ATTRIBUTES;
}

function is_set() {
if ($this->set === true)
    return true;
else
return false;
}
}
<<<

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP] RE : [PHP] PHP & Rading excel files

2003-09-29 Thread BENARD Jean-philippe
I know exporting xls file to csv (or other tagged export) is not very
difficult but in order to make a « all-users » application we must
accept xls files.

 

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED]) 

-Message d'origine-
De : Kevin Bruce [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 29 septembre 2003 14:40
À : BENARD Jean-philippe
Objet : Re: [PHP] PHP & Rading excel files

 

I created a database dump that accepts tab delimited files. You'd have
to export your xls file to a tab delimited file (which is a no-brainer).

Here is the code (it was made to import into a user database, change it
to suite your purposes):


  There are currently 
entries in the 
   database.
  Choose your  Admin action from
the above 
  menu. 
Database Import
 

   Tab Delimited File Database Import 
  
  
  
  
   

" .
str_replace("\t"," ",$sample) . " \n";
$sample2 = "" .
str_replace("\t"," ",$sample2) . " \n";

//set the form variable to carry over into next form
$import = implode($fileC,"|");
?>

  
  
  

Match up the database fields with the sample entry
form this 
import 
There are - entries in this import.

 
   
 
  

echo $fieldrop
  
";
} 
?>

  
  
 

  
  
  
 


Send welcome email to imported entries.
(choosing this means it will take appximately - seconds to complete the import)
  
  
  

  

'')
{
$insert .= $line[value] . ",";
}
}

//remove last comma
$insertlength = strlen($insert);
$insert = substr($insert,0,$insertlength-1);

//here's the insert part of the query
$query = "INSERT INTO $tablename(nowelcomemail,user_level,$insert)
";

//set up the values part

//create main array
$import = explode("|",base64_decode($import));

//set the beginning of the query
$import2 = "VALUES ";

//how many entries in the main array
$maxfield = count($import)-1;
next($import);//skip the first line (the fields list)

//for each entry in main array, create an insert
for($n=0; $n<$maxfield;$n++)
{
$line = each($import);
//check to see if there is info in this entry
if($line[value] > '')
{
//turn entry into array
$entryarray = explode("\t",$line[value]);
$entrynum = count($entryarray); //how many fields in this
entry?
if($entrynum == $numfields) //if the field count matches our
field count, insert into DB
{
$import2 .= "('1','$category','";
//make sure the entry array has the same number of
fields that we designated in the previous form
$import2 .=
str_replace("\t","','",addslashes($line[value]));
$import2 .= "'), \n";// THERE! We have created the
'VALUES' part of the insert query
}
}
}
echo "Imported all entries";
$import2length = strlen($import2);
$import2 = substr($import2,0,$import2length-3);//get rid of last
comma

//Here is the actual importing
$query2 = $query . $import2;
mysql_query($query2,$dbh) OR die(mysql_error());

$query4 = "OPTIMIZE TABLE $tablename ";
mysql_query($query4,$dbh) OR die(mysql_error());

}

//function to list fields in database
function fieldrop($dbh,$DBname,$tablename)
{
$dbresult2 = mysql_list_fields($DBname,$tablename,$dbh);
$fields = "None\n";
for($i=2;$i$fieldname\n";
    }
    return $fields;
}
?>

> Hi !
> 
> It's possible to export data to excel (csv, xml, PEAR excel file
> writing, ...) but is it possible to import dat

[PHP] PHP & Rading excel files

2003-09-29 Thread BENARD Jean-philippe
Hi !

It's possible to export data to excel (csv, xml, PEAR excel file
writing, ...) but is it possible to import data from excel ? (i.e.: I
want to get the data which is in Cell "A1" of sheet "Toto" in the posted
.xls file).

Thanks in advance.

    (o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP] PHP class and extends

2003-09-23 Thread BENARD Jean-philippe
Hi !

I've got a problem with class extends. I've a "top" class which
name is cl_app. xxx_cl_app is an extend of cl_app. Cl_app define a
function called "ExecuteQuery". xxx_cl_app define this function too but
this one is obsolete. Now, I want to use the cl_app "ExecuteQuery"
function in my app but there is a problem :

In the cl_app class, "ExecuteQuery" function return 2 object : 
$return = array($nb_lines, $array_results)
and the xxx_cl_app defined this function as :
$return = array($array_results, $nb_lines)

I don't want to recode all others scripts and I don't want to put the
new function code in xxx_cl_app. So here is my question :

Is there something to do in order that when I use
xxx_cl_app->ExecuteQuery(), there's a function ExecuteQuery() in
xxx_cl_app that do something like this :

(xxx_cl_app.php)
function ExecuteQuery(x,y) {
$tmpResult = [herited_class]->ExecuteQuery(x,y);
return array($tmpResult[1], $tmpResult[0]);
}

Thanks in advance !

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP] RE : [PHP] Start php-script with exec()?

2003-09-23 Thread BENARD Jean-philippe
Maybe you'll need to add " >/dev/null &" at the end of your execution
command. Adding this will put your script to background and php wouldn't
wait for this script end before terminate http process (=> no browser
timeout).

For example : exec("/logiciel/php/bin/php /tmp/toto.php >/dev/null &");

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])

-Message d'origine-
De : Victor Spång Arthursson [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 22 septembre 2003 14:16
À : [EMAIL PROTECTED]
Objet : [PHP] Start php-script with exec()?

Is it possible?

I have a file that takes 5 minutes to run, and I would like to be able 
to start it when loading a page. But I can't include it because it 
forces the browser to timeout…

exec("script.php") doesn't seem to work…

Sincerely

Victor
-- 
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] RE : [PHP] PHP Editor - which to use?

2003-09-22 Thread BENARD Jean-philippe
Not a "php-must-have-editors" but useful ones, for example, are phpEd
and Zend Studio (text completion, functions library, ...). I found that
Zend Studio is a good one because of internal CVS connexions, work on
UNIX & Windows systems, Project managements, ... I think it's a good
choice for a professional use.

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])
-Message d'origine-
De : Ruessel, Jan [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 22 septembre 2003 11:00
À : [EMAIL PROTECTED]
Objet : RE: [PHP] PHP Editor - which to use?

well, i like to use dreamweaver mx or textpad with the syntax
highlighting file you additionally have to download. i dunno if there
are special "php-must-have-editors".
grtz
jan

-Original Message-
From: Binay [mailto:[EMAIL PROTECTED]
Sent: Montag, 22. September 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Editor - which to use?


Hi everybody!

Please suggest me  a good PHP editor like ( Microsoft's Interdev for
ASP) to write my php programs/scripts and get a visual feel.


Thanks 
Binay

-- 
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] SSO (Single Sign On) for multiple PHP apps

2003-09-18 Thread BENARD Jean-philippe
We have multiple PHP apps running on different servers. We have
an LDAP authentication based (today) on the apache .htpasswd file which
obliged users to log on. This solution is not very "clean". Because we
have different PHP servers (physical and logical), users must
authenticate many times in order to log on some applications of the same
"group".
Is there a solution for this situation? We are running PHP 4.3.1/4.3.3
over apache 1.3.27/1.3.28 on Sun systems (SunOS 5.6).
More over, there are some apps writed in JAVA (WebSphere & IBM HTTP SRV)
technologies which are in the same workgroup for political reason (We
can't imagine making them in PHP ...). If the first solution exist
(making a SSO for all PHP apps), is a second solution for PHP/JAVA SSO
could be imagined?

Many thanks in advance.

    (o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : 01-30-03-47-83 * Fax : 01-30-03-42-10

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