[PHP] Re: news php 5.0.5/5.1

2005-06-12 Thread JamesBenson

5.1.0 BETA, http://www.php.net/downloads.php






mbneto wrote:

Hi,

I've looked at php.net but could not find info regarding if/when are
we going to have further 5.0.x versions and what will change in php
5.1.

Any pointers (besides the php-devel) ?


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



Re: [PHP] PHP ImageCreateFrom.. malfunctioning in last PHP releases...

2005-06-12 Thread Richard Lynch
On Sun, June 12, 2005 7:37 pm, M said:
> I use ImageCreateFromString PHP functions to resize (thumbnails and so)
> dynamically my JPG images.
>
> I use third party WEB hosting provider , so I have no control about new
> releases and updates of server softwares.
>
> I have not changed my images in last 3 years (they are used for virtual
> stores), they appeared beautiful in these 3 years, but from some days
> ago, they are appearing with terrible filter colors (all blue for
> instance, some entirely black and so). When bypassing image PHP
> functions, images again appear beautiful in my page, but site
> performance to show product catalogs gets terrible, not to say
> impossible for customers browse on it.
>
> I wrote web provider to check what changed in their PHP environment, but
> I am afraid they will answer none has changed.
>
> I use the following sequence of commands to rebuild thumb images:
>
> $orimage = ImageCreateFromString(string) to get original image
> from opened JPG file
> $thumb =  ImageCreate(new-width, new-height) to create empty new
> thumbnail

Make this one be ImageCreateTrueColor()
http://php.net/imagecreatetruecolor

> ImageCopyResized($thumb,$origame,)  to fill thumbnail
> ImageJpeg($thumb)  to show thumbnail
>
> I checked by increasing 'quality' parameter  ImageJpeg($thumb,'',100)
> but result continue to be wrong.
>
> Is anobody else experiencing these problems lately?, how did you solve
> it?

I believe something changed in the GD library where lo-res internal images
were not promoted to hi-res or something like that...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] PHP ImageCreateFrom.. malfunctioning in last PHP releases...

2005-06-12 Thread M
Hello people,

I use ImageCreateFromString PHP functions to resize (thumbnails and so)
dynamically my JPG images.

I use third party WEB hosting provider , so I have no control about new
releases and updates of server softwares.

I have not changed my images in last 3 years (they are used for virtual
stores), they appeared beautiful in these 3 years, but from some days
ago, they are appearing with terrible filter colors (all blue for
instance, some entirely black and so). When bypassing image PHP
functions, images again appear beautiful in my page, but site
performance to show product catalogs gets terrible, not to say
impossible for customers browse on it.

I wrote web provider to check what changed in their PHP environment, but
I am afraid they will answer none has changed.

I use the following sequence of commands to rebuild thumb images:

$orimage = ImageCreateFromString(string) to get original image
from opened JPG file
$thumb =  ImageCreate(new-width, new-height) to create empty new
thumbnail
ImageCopyResized($thumb,$origame,)  to fill thumbnail
ImageJpeg($thumb)  to show thumbnail

I checked by increasing 'quality' parameter  ImageJpeg($thumb,'',100)
but result continue to be wrong.

Is anobody else experiencing these problems lately?, how did you solve
it?

Thanks very much

(I would appreciate cc to [EMAIL PROTECTED] if possible)

Mig

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



Re: [PHP] [ANN] Have fun programming with your kids

2005-06-12 Thread Rory Browne
And this has what exactly to do with PHP?

On 6/12/05, ducasse <[EMAIL PROTECTED]> wrote:
> Hi
> 
> If you are a parent, an educator or a programmer having kids this is
> for you! After 4 years of work, my new book "Squeak: Learn
> programming with Robots" will be out soon.
> 
> http://smallwiki.unibe.ch/botsinc/
> 
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594916/
> qid=1117218524/sr=1-1/ref=sr_1_1/002-5642974-5143261?v=glance&s=books
> With Bots Inc you will learn how to program robots in an interactive
> environment. Bots Inc proposes three teaching approaches: direct
> command of robots, scripting robots and programming robots. The book
> contains 24 chapters going step by step over topics with a lot of
> examples. Bots Inc is fun but it is not a toy, it teaches you 100%
> real programming. Bots Inc is built on top of
> the rich open-source multimedia Squeak environment that you can also
> discover.
> 
> My goal is to explain key elementary programming concepts (such as
> loops, abstraction, composition, and conditionals) to novices of all
> ages. I believe that learning by experimenting and solving problems
> with fun is central to human knowledge acquisition. Therefore, I have
> presented programming concepts through simple but not trivial
> problems such as drawing golden rectangles or simulating animal
> behavior. The ideal reader I have in mind is an individual who wants
> to have fun programming. This person may be a teenager or an adult, a
> schoolteacher, or somebody teaching programming to children in some
> other organization. Such an individual does not have to be fluent in
> programming in any language. As a father of two young boys I also
> wrote this book for all the parents that want to have fun programming
> with their kids in a powerful interactive environment. Programming in
> Squeak is an interactive, fun but deep experience. The present book
> teaches elementary programming aspects, the following book will
> introduce a new fun
> environment and teach object-oriented programming.
> 
> Testimonies
> 
> "I am using the version of the book on your web site to teach my
> oldest daughter Becca some programming. She absolutely loves it. We
> are doing the Bot graphics right. My other kids are showing interest
> as well. My Fall semester schedule leaves me with almost no time free
> but in the Spring I hope to bring Squeak and your book to our
> elementary school's "gifted" program." C. David Shaffer
> 
> "I'm using the Bot Lab environment for three years and found it
> really valuable in teaching computer science concepts for a young
> audience (and even less young !). The bots commanded through balloon
> (as in comic strips) is a very nice introduction for young children,
> and when this aspect is well understood, you can use the Bot
> Workspace to teach the notion of script, a first step in programming
> languages. The Micro Browser allows children to add new behavior for
> their bots, and have fun with their creation. This three-layers tool
> - Balloon, Micro Workspace, Micro Browser - offers to the teacher a
> fun way to introduce gently the basis of object-oriented programming
> concepts. With Bots Inc, learning is playing ! ;-)" Samir Saidani -
> University of Caen - France
> 
> "I recently started a course with 7th-graders (age about 13 years)
> with Stephane's book --- they love it. They all know about syntactic
> issues from maths --- in a way they know that an expression in a
> formal language must be well formed. So they easily grasp the fact
> such as "there must be a colon after the message-name if an argument
> follows". Of cause they don't really read the error-messages, they
> just see "there must be some error" and they remember the simple
> rules. Don't underestimate Smalltalk --- it's easy understandable
> because it has a simple and straight-forward design." Klaus Fuller -
> Germany
> 
> Have fun...
> 
> Stef
> 
> 
> http://www.iam.unibe.ch/~ducasse/
> "if you knew today was your last day on earth, what would you
> do different? ...  especially if,  by doing something different,
> today might not be your last day on earth" Calvin&Hobbes
> 
> --
> 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] pcntl_fork and reading from childs stdout

2005-06-12 Thread Marek Kilimajer

Tom Fishwick wrote:

Hi All,

I have a script that spawns off a bunch of children with pcntl_fork(),
but I can't figure out how to connect up a pipe from the parent to each
childs stdout and stdin.  In c I would use pipe,close and dup...

any ideas would be appreciated. (that don't involve using proc_open()
:-)

Tom



http://www.php.net/popen

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



Re: [PHP] about the absolutely path

2005-06-12 Thread Richard Lynch
Because it's Windows, I had to stop the "DNS Client" service -- Or, at
least, that seemed to help...  Maybe I should start that again and test.

Also, I was dumb enough to not have all my VirtualHost's in /etc/hosts,
only it's Windows so it's c:\windows\system32\drivers\etc\hosts (in *THIS*
versions of Windows, not the other versions, where it's some other
directory.  Sheesh!)

And, finally, for reasons beyond my ken:
NameVirtualHost *:80 was no good, but
NameVirtualHost 127.0.0.1:80 was good.
Go figure.

Got it to work, but it feels more like Voodoo than anything else.

Thanks to all, and apologies for this off-topic post to wrap this up.

Hope it forestalls at least one post somewhere in the future.

Hm.  I wonder if I could put something in ?/hosts to do:
[a-zA-Z0-9-]*  127.0.0.1

In other words, if I try to surf to 'example' (not example.com) then I
just want my local Apache VirtualHost settings to kick in, so I can work
on sites locally, without digging around and changing ?/hosts every time.

On Mon, June 6, 2005 3:43 pm, Jochem Maas said:
> Richard Lynch wrote:
>> On Mon, June 6, 2005 1:54 am, yangshiqi said:
>>
>>>I have a php application (let's call it app A) which is developed
>>>separated
>>>in a test domain name, like http://testa.xxx.com 
>>>/.
>>>
>>>But now I have to move it to another app (called B) using
>>>http://testb.xxx.com  /, and the app A becomes
>>> just
>>>a
>>>subsystem of app B.
>>>
>>>The access url is changed to http://testb.xxx.com/a/.
>>>
>>>Then I meet a problem that the app A 's links, the path and other
>>> elements
>>>in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.
>>>
>>>The app A is very independent and I do not want to disperse it to app B.
>>>
>>>So how can I get this effect: when the user input the url, '
>>>http://testb.xxx.com/a/ ', the app A will work fine?
>>>
>>>Can I just modify some configuration about yapache to fit this
>>>requirement?
>>
>
> maybe you could use the apache ProxyPass directive?
>
> ProxyPass testb.xxx.com/a/ testa.xxx.com
>
> or something like that. (I'm just half-remembering
> a cool post by Rasmus L. so the syntax is probably off)
>
>>
>
> ...
>
>> server with VirtualHost settings.  [He says blithely, never having
>> actually got that to work on his own box...]
>>
>> H, that reminds me...  Does VirtualHost rely on, like, /etc/hosts
>> having hostnames for all those made-up hostnames I use?  I had assumed
>> all
>
> Richard try something like this (obviously add any required stuff like
> DocumentRoot etc.
>
> # you can do allsorts of stuff with the IP definition.
> #NameVirtualHost 213.*:80
> NameVirtualHost *:80
>
> #  _DEFAULT_ - this vhost gets loaded. if nothing else matches
> # -
> 
>  ServerName www.l-i-e.com
>  ServerAlias l-i-e.com
>  DocumentRoot /var/www/l-i-e.com
> 
>
> 
>   ServerName richard.l-i-e.com
>   ServerAlias rlynch.l-i-e.com
>   # stuff
> 
>
> # whats this then!
>
> 
>  # if you create a directory
>  # in /var/webroots/ that
>  # matches the domainname given to apache
>  # then the dir will be served.
>
>  
>  Options ExecCGI +FollowSymLinks
>  
>
>  UseCanonicalName Off
>
>  ServerName %0
>
>  # '%-2+' traps the penultimate and all preceding parts of the FQDN as
> given in the Host: header
>  # but I wasn't having much luck with it.
>  VirtualDocumentRoot /var/webroots/%0
>
>  # some std resources?
>  Alias  /css  /var/webroots/include/css
>  Alias  /js   /var/webroots/include/js
>
>  php_value auto_prepend_file /some/include/file.inc.php
> 
>
>
>> those hostnames were just internal unique markers for httpd.conf with no
>> real-worl meaning...  Was that just silly of me or what?
>
> Richard, I believe you can have apache do lookups on the given names but
> by default its off at least - I never have any problem putting allsorts
> non-existing domains in the vhost confs, as long as your local HOSTS file
> has a
> suitable entry your rolling.
>
> rgds,
> Jochem
>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Richard Lynch
On Sun, June 12, 2005 12:57 pm, Tom Fishwick said:
> I have a script that spawns off a bunch of children with pcntl_fork(),
> but I can't figure out how to connect up a pipe from the parent to each
> childs stdout and stdin.  In c I would use pipe,close and dup...

This might help:
http://php.net/posix-mkfifo

How you would tie stdout to your named pipe...

Or perhaps you could http://php.net/exec something in each process to
re-direct or tee stdin/stdout to your named pipes.

Or...

I dunno, really, just guessing.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Documenting Code Question

2005-06-12 Thread Richard Lynch
On Sun, June 12, 2005 5:32 am, Chris Drozdowski said:
> I need some help regarding documenting code. Say you have a
> function/method that takes an object as a parameter and/or returns an
> object.
>
> When documenting, do you specify the specific class of the object when
> listing the datatype in the docblock @param and @return specs or do you
> simply specify "object"?

"object" is pretty useless...

Unless it's some kind of meta-function that can deal with *ANY* PHP
Object, of course.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Message could not be delivered

2005-06-12 Thread Post Office
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Sun, 12 Jun 2005 16:48:43 -0400
from 199.253.75.11

- The following addresses had permanent fatal errors -
php-general@lists.php.net



file attachment: attachment.pif

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Tom Fishwick
Hi All,

I have a script that spawns off a bunch of children with pcntl_fork(),
but I can't figure out how to connect up a pipe from the parent to each
childs stdout and stdin.  In c I would use pipe,close and dup...

any ideas would be appreciated. (that don't involve using proc_open()
:-)

Tom

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



Re: [PHP] weird thing;downloading from a php script stops at exactly 2.000.000 bytes

2005-06-12 Thread Catalin Trifu
Hi,

eaccelerator is compiled as an extension, so, not loading it
with extension=...bla...bla... in php.ini is like it's never been there
in the first place.
As you can see from the ./configure eaccelerator is not "built in"
Any other suggestions ?

Cheers,
Catalin


Richard Lynch wrote:
> 
> I just noticed the eaccelerator bit in this thread.
> 
> Just disabling eaccelerator isn't the same as not compiling it in in the
> first place...
> 
> Try that before reporting a bug to http://bugs.php.net
> 
> On Thu, June 9, 2005 1:59 am, Catalin Trifu said:
> 
>>  Hi,
>>
>>   I installed php5 using the configue below. I tried with apache2 as well
>>and same things.
>>
>>'./configure' '--prefix=/usr/local/php5'
>>'--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
>>'--with-config-file-path=/etc/php5' '--with-dom' '--with-gd'
>>'--enable-sockets' '--enable-exif'
>>'--with-freetype2' '--with-freetype-dir=/usr/include/freetype2'
>>'--enable-gd-native-ttf'
>>'--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp'
>>'--with-mysql=/usr'
>>'--with-xsl' '--with-libxml-dir=/usr'
>>
>>   I have a script which generates a temporary catalog file, which is
>>generated correctly having
>>4.7MB on disk.
>>   Then I push up the wire with readfile($filname):
>>
>>   header("Content-Type: text/csv");
>>   header("Content-Disposition: attachment; filename=somfilename.csv");
>>   header("Content-Length: ". filesize($file));
>>
>>   readfile($file);
>>
>>
>>   As expected the browser starts the download and reports it is expecting
>>a file of 4.7MB.
>>   However, the download stops at 2.000.000 bytes no matter what browser I
>>use (normally i use
>>Firefox on Linux), no matter if php runs on apache2 or apache1.3
>>
>>   Is there some php config option I missed ?
>>   Where could this come from ?
>>
>>
>>Thanks,
>>Catalin
>>
>>--
>>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] [ANN] Have fun programming with your kids

2005-06-12 Thread ducasse

Hi

If you are a parent, an educator or a programmer having kids this is
for you! After 4 years of work, my new book "Squeak: Learn
programming with Robots" will be out soon.

http://smallwiki.unibe.ch/botsinc/

http://www.amazon.com/exec/obidos/tg/detail/-/1590594916/
qid=1117218524/sr=1-1/ref=sr_1_1/002-5642974-5143261?v=glance&s=books
With Bots Inc you will learn how to program robots in an interactive
environment. Bots Inc proposes three teaching approaches: direct
command of robots, scripting robots and programming robots. The book
contains 24 chapters going step by step over topics with a lot of
examples. Bots Inc is fun but it is not a toy, it teaches you 100%
real programming. Bots Inc is built on top of
the rich open-source multimedia Squeak environment that you can also
discover.

My goal is to explain key elementary programming concepts (such as
loops, abstraction, composition, and conditionals) to novices of all
ages. I believe that learning by experimenting and solving problems
with fun is central to human knowledge acquisition. Therefore, I have
presented programming concepts through simple but not trivial
problems such as drawing golden rectangles or simulating animal
behavior. The ideal reader I have in mind is an individual who wants
to have fun programming. This person may be a teenager or an adult, a
schoolteacher, or somebody teaching programming to children in some
other organization. Such an individual does not have to be fluent in
programming in any language. As a father of two young boys I also
wrote this book for all the parents that want to have fun programming
with their kids in a powerful interactive environment. Programming in
Squeak is an interactive, fun but deep experience. The present book 
teaches elementary programming aspects, the following book will 
introduce a new fun

environment and teach object-oriented programming.

Testimonies

"I am using the version of the book on your web site to teach my
oldest daughter Becca some programming. She absolutely loves it. We
are doing the Bot graphics right. My other kids are showing interest
as well. My Fall semester schedule leaves me with almost no time free
but in the Spring I hope to bring Squeak and your book to our
elementary school's "gifted" program." C. David Shaffer

"I'm using the Bot Lab environment for three years and found it
really valuable in teaching computer science concepts for a young
audience (and even less young !). The bots commanded through balloon
(as in comic strips) is a very nice introduction for young children,
and when this aspect is well understood, you can use the Bot
Workspace to teach the notion of script, a first step in programming
languages. The Micro Browser allows children to add new behavior for
their bots, and have fun with their creation. This three-layers tool
- Balloon, Micro Workspace, Micro Browser - offers to the teacher a
fun way to introduce gently the basis of object-oriented programming
concepts. With Bots Inc, learning is playing ! ;-)" Samir Saidani -
University of Caen - France

"I recently started a course with 7th-graders (age about 13 years)
with Stephane's book --- they love it. They all know about syntactic
issues from maths --- in a way they know that an expression in a
formal language must be well formed. So they easily grasp the fact
such as "there must be a colon after the message-name if an argument
follows". Of cause they don't really read the error-messages, they
just see "there must be some error" and they remember the simple
rules. Don't underestimate Smalltalk --- it's easy understandable
because it has a simple and straight-forward design." Klaus Fuller -
Germany

Have fun...

Stef


http://www.iam.unibe.ch/~ducasse/
   "if you knew today was your last day on earth, what would you
   do different? ...  especially if,  by doing something different,
   today might not be your last day on earth" Calvin&Hobbes

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



Re: [PHP] Documenting Code Question

2005-06-12 Thread Robert Cummings
On Sun, 2005-06-12 at 08:32, Chris Drozdowski wrote:
> I need some help regarding documenting code. Say you have a 
> function/method that takes an object as a parameter and/or returns an 
> object.
> 
> When documenting, do you specify the specific class of the object when 
> listing the datatype in the docblock @param and @return specs or do you 
> simply specify "object"?

Specific type so that users of the function know what they can do with
the returned object from reading the doc.

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] Is there a big speed difference...

2005-06-12 Thread Brian Dunning

On Jun 11, 2005, at 6:24 PM, Richard Lynch wrote:


Have you actually tried it yet, either way?
Cuz I suspect you are worrying over a lot of nothing...


I did post the results a couple of days ago. Switching to a function  
made an enormous difference. It went from an average of 45 seconds to  
an average of 2 seconds.


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



[PHP] Documenting Code Question

2005-06-12 Thread Chris Drozdowski
I need some help regarding documenting code. Say you have a 
function/method that takes an object as a parameter and/or returns an 
object.


When documenting, do you specify the specific class of the object when 
listing the datatype in the docblock @param and @return specs or do you 
simply specify "object"?



Thanks,

Chris Drozdowski
[EMAIL PROTECTED]

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