[PHP] Warning: Invalid argument supplied for foreach()

2003-07-06 Thread arnaud gonzales
Hi all,
I am getting crazy, can't understand what i missed!
Does anybody know?

$champs = array ("titre_art" => "h3" ,"nom" => "bleu", "prenom" => "green",
"resume" => "bold");

foreach($champs as $key => $value) {


echo "$row($key))";
 }

TIA.
zeg


[PHP] How to disable cache, image headers?

2003-04-01 Thread Arnaud De Bruyn
Hi,

I'm creating images on the fly. They are called as follows:



Where mypicture.php creates a png file, modified each time. Everything was
fine with IE, but then I tested it with Netscape and it didn't work anymore.
An old version of the picture was shown on the screen. I understand NS is
using a homemade cache system, so I tried the usual "Pragma: no-cache"
header, but it didn't seem to work either...

Any idea how I can force NS to update the image?

Thanks,
Arnaud

PS: I don't want to use a trick like adding a random number at the end of
the picture's url, it's for a professional application...



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



[PHP] Re: [PEAR-DEV] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Arnaud Limbourg
> Where's the PEAR context within the marketing text?

Please, don't start any troll/flame war.

Arnaud.

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




Re: [PHP] GD : Black background with imagecreatetruecolor

2002-11-21 Thread Arnaud
Yeah !!! It works

Thanks Morgan

Arnaud
"Morgan Hughes" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> On Thu, 21 Nov 2002, Arnaud wrote:
>
> > Hi everyone,
> > I'd like to use "imagecreatetruecolor" function in order to "cut and
paste"
> > JPG files on a white background. It seems not to work correctly.
>
>   This one bit me when I started working with GD 2.x as well.  Simply draw
>   a filled rectangle over your entire canvas in the color you want:
>
>$im=imagecreatetruecolor(50,50);
>   $COULEUR_BLANC=imagecolorallocate($im,255,255,255);
>   imagefilledrectangle($im,0,0,49,49,$COULEUR_BLANC);
>   header ("Content-type: image/png");
>   ImagePNG($im);
>   imagedestroy($im);
> ?>
>
>   The reason seems to be that when you create an indexed-color image
>   (imagecreate()) gd sets all pixels to index 0, and when you allocate
>   your first color, that's index 0.  Thus all background pixels magically
>   become that color.
>
>   When you use imagecreatetruecolor(), it sets all the pixels to black,
>   and you have to explicitly draw them in to get them white.
>
> --
>Morgan Hughes
>C programmer and highly caffeinated mammal.
>[EMAIL PROTECTED]
>ICQ: 79293356
>
>
>



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




[PHP] GD : Black background with imagecreatetruecolor

2002-11-21 Thread Arnaud
Hi everyone,

I'd like to use "imagecreatetruecolor" function in order to "cut and paste"
JPG files on a white background. It seems not to work correctly.

Here is my test scripts :

This one works perfectly :


I obtain a white image but using GD 2.x, the "imagecopy" function fails.

This other script doesn't work :


I'm getting a black image.

My configuration is PHP 4.2.3 with gd2 running on Windows XP (I've also
tested it on my web provider machine - Linux with PHP 4.2.2)

Any help would be great.

Thanks in advance

Arnaud



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




RE: [PHP] getimagesize or loop pblm

2002-10-06 Thread arnaud gonzales

So my code is clean ? There isn't a problem of infiny loop?
My server is free.fr.
How do u suggest i can cach the data?

-Message d'origine-
De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Envoye : lundi 7 octobre 2002 03:07
A : arnaud gonzales
Cc : Php-General
Objet : Re: [PHP] getimagesize or loop pblm


It could take a while.  Depends how fast your server's disk sub-system is.
Going to disk to stat and open an image and then parse through the initial
headers to get the sizing data can take some time.  I'd suggest caching
this data somewhere if you are going to need it on every request.

-Rasmus

On Mon, 7 Oct 2002, arnaud gonzales wrote:

> Hi all,
> Does anybody can tell me why i have this error :"Fatal error: Maximum
> execution time of 5 seconds exceeded in photos2.php on line 28"
> whith this
>
>
>   $tab_img = array();
>   $tab_img_size = array();
>   for($i=0;$i=56;$i++){
>   $tab_img[$i] = 
>"images/tof/real_size/techp02_".$i.".jpg";
>   $tab_img_size = array(
> /*line 28 */  $i => getimagesize($tab_img[$i]));
>   }
>
> Is the getimagesize function too long for making it 56 times??
> What do u think ?
> In fact i want to get all the image size to make a popup link on the
> thumnail at the real size of the image.Because images don't have the same
> size and i want to have a clean window whith the popup.
> I've ever tried this before :
>
>   $tab_img = array();
>   $tab_img_size = array();
>   for($i=0;$i=56;$i++){
>   $tab_img[$i] = 
>"images/tof/real_size/techp02_".$i.".jpg";
>   $tab_img_size[$i] = getimagesize($tab_img[$i]);
>   }
> Hope you understand.
> TIA.
> zeg
>
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] getimagesize or loop pblm

2002-10-06 Thread arnaud gonzales

Hi all,
Does anybody can tell me why i have this error :"Fatal error: Maximum
execution time of 5 seconds exceeded in photos2.php on line 28"
whith this


$tab_img = array();
$tab_img_size = array();
for($i=0;$i=56;$i++){
$tab_img[$i] = 
"images/tof/real_size/techp02_".$i.".jpg";
$tab_img_size = array(
/*  line 28 */  $i => getimagesize($tab_img[$i]));
}

Is the getimagesize function too long for making it 56 times??
What do u think ?
In fact i want to get all the image size to make a popup link on the
thumnail at the real size of the image.Because images don't have the same
size and i want to have a clean window whith the popup.
I've ever tried this before :

$tab_img = array();
$tab_img_size = array();
for($i=0;$i=56;$i++){
$tab_img[$i] = 
"images/tof/real_size/techp02_".$i.".jpg";
$tab_img_size[$i] = getimagesize($tab_img[$i]);
}
Hope you understand.
TIA.
zeg



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




[PHP] Export email addresses from Outlook Express with PHP

2002-10-03 Thread Arnaud Castéran

Do you think it is possible to export email addresses from Outook Express
with PHP.
I looking for a script using COM but i only found exemples for MSOutlook.
What i want to do is an address book for each members of my site
(www.universemail.net  a directory of email addresses) : if they have
Outlook Express, the site connect to Outlook and export addresses to add
them in their address book

Thanks for your help

Arnaud Castéran




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




[PHP] Re: [PHP-DEV] OOH Forms ?

2002-07-15 Thread Arnaud Limbourg

Hello,

There is such a library, you can find it in PEAR.

It needs some cleanup and improvements though.

Arnaud.

> Hi there
> 
> I came across with some reference indicating there was a library called OOH
> forms, wondering if anyone knows about the status of that lib, or has those
> features been incorporated into some others?  OR simply, Is there any
> similar one, thanks.
> 
> /dl

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




[PHP] fputs() pblm how write on a new line each time ?

2002-05-22 Thread arnaud gonzales

Hi all,
I' m searching how to write in a file on a new line each times whith
fputs().
Because i want read the file whith file() and so ,have one line per indice
in a table.
So i need to write  on a new line each time.



TIA.
    arnaud.


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




[PHP] copy after upload pblm (?path?)

2002-05-19 Thread arnaud gonzales

Hi all,
I' m trying to copy an uploaded file:

if(!empty($fichier)) {
$nom = $HTTP_POST_FILES["fichier"]["name"];
$type = $HTTP_POST_FILES["fichier"]["type"];
$taille = $HTTP_POST_FILES["fichier"]["size"];
$nom_tmp = $HTTP_POST_FILES["fichier"]["tmp_name"];
echo "nom : $nom  type : $type  taille : $taille  nom
temporaire : $nom_tmp;
if(!strpos($nom, .gif") === FALSE || !(strpos($nom, ".jpg") === 
FALSE)){
--->$res = copy($fichier,$nom);
if ($res != 0) {
$msg = " File save ";
}else{
$msg = " saving Error ";
}
}else{
  $msg = " wrong type ";
}
?>

and i get the error "Warning: open_basedir restriction in effect. File is in
wrong directory in d:\tsunami\zeg\9\exo4upload.php on line 5"
so is there any wrong path for  $res = copy($fichier,$nom);
should i use an absolute path?

TIA


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




[PHP] php fgets()

2002-05-14 Thread arnaud gonzales

Hi,
I'm newbie in php and i would like to clearly understand how can i use:
  LENGTH  in   string fgets ( int fp [, int length])

"Returns a string of up to length - 1 bytes read from the file pointed to by
fp. Reading ends when length - 1 bytes have been read, on a newline (which
is included in the return value), or on EOF (whichever comes first). If no
length is specified, the length defaults to 1k, or 1024 bytes."

-Can i have an example of the differents way for reading file with fgets
according to thedifferentes values of "length "?
-why '4096' is used as length for reading a file line by line ?

$fd = fopen ("/tmp/inputfile.txt", "r");
while (!feof ($fd)) {
 $buffer = fgets($fd, 4096);
 echo $buffer;
}
    fclose ($fd);

Is this any max for one line??

TIA.

arnaud G.


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




[PHP] Re: Can't add PHP4 module to Apache (win32)

2001-07-24 Thread Arnaud

try to move the php4ts.dll library in C:\winnt\system32


Andrew Kirilenko <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All!
>
> Just installed PHP4 & Apache.
> Apache has started well.
> Then I've added two strings from install.txt to the httpd.conf:
> LoadModule php4_module c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php4
> (I've PHP installed in c:\apps\PHP\)
>
> After Apache restart, I've got following message:
> Syntax error on line 203 of c:/apps/apache/conf/httpd.conf:
> Cannot load c:/apps/php/sapi/php4apache.dll into server: (126) The
specified
> module could not be found:
>
> Any suggestions?
>
> Best regards,
> Andrew Kirilenko.
>



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