Re: [PHP] mail mimedecode with multiple mails in one mbox file

2009-11-16 Thread Per Jessen
Ashley Sheridan wrote:

> On Sun, 2009-11-15 at 20:54 +0100, Per Jessen wrote:
> 
>> Ashley Sheridan wrote:
>> 
>> > Hi all,
>> > 
>> > I'm having a bit of difficulty seeing my way through this. I think
>> > I'm on the right path with mimeDecode, but I can't get it to read
>> > all of the emails in an mbox file which contains 100 emails; it
>> > only reads the first.
>> > 
>> > I've looked over the docs on pear.php.net, but can't seem to find
>> > any way to get the other 99 emails out!
>> > 
>> > Does anyone know of any way to do this,
>> 
>> Look up "formail -s"
>> 
>> 
>> /Per
>> 
>> --
>> Per Jessen, Zürich (9.0°C)
>> 
>> 
> 
> 
> Thanks, that's got me going in the right direction! There just seems
> to be no end to what you can do on a Linux console does there?!

Suggestions to the contrary would be heresy. :-[

formail has helped me a number of times when dealing with a mailbox
file, I'm pretty certain it'll do what you want.


/Per


-- 
Per Jessen, Zürich (10.1°C)


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



[PHP] Re: fread() memory problems

2009-11-16 Thread Peter Ford
Ashley Sheridan wrote:
Ashley Sheridan wrote:
> I was just wondering why fread() seems to use so much memory when
> reading in a file. My php.ini has a script memory limit of 32MB, yet PHP
> hits its memory limit on a 19MB mbox file that I'm reading in. How is it
> possible that this function can use 150% of a files' size in memory?!
> 
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 

Is it possible that the file is 8-bit characters and your PHP implementation is
converting it to 16-bit characters?
I'm not sure what settings would be involved for that, but no-one else has
responded so I thought a vague idea might be better than nothing!

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] File To Blob Corruption

2009-11-16 Thread tedd

At 10:17 AM + 11/15/09, Ashley Sheridan wrote:


Like someone mentioned on the link you posted; storing the images in the
database does offer a layer of security, as database access is far
easier to control than file access.

Thanks,
Ash
http://www.ashleysheridan.co.uk


It also offers ease of moving, You don't have to move both database 
and file system to a different server, just the database. 
Additionally, the file paths are always correct -- just reference the 
database. So, there are upsides to storing images in a database.


I haven't read a single MySQL/PHP book (dozens) that claims storing 
images in a database is a bad idea.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: File To Blob Corruption

2009-11-16 Thread tedd

At 10:14 PM +0100 11/15/09, Nisse =?utf-8?Q?Engstr=C3=B6m?= wrote:


* Run a hex dump on the images before and after upload.
  What is the difference?

/Nisse


That's the best idea.

That way you know how the file has been changed.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread tedd

At 1:12 PM +0200 11/15/09, Cemal Eker wrote:

Hello,

I just want to implement a shoutbox script for an e-learning application.
Searched Google for possible solutions but I just want to know what other
developers use.

AJAX and GPL is a must.



Forgive me, but I don't know what a "shoutbox" is?

As for an online exam that uses ajax, does this work?

http://webbytedd.com/b/exam/

If so, you are free to use anything you find there under GPL.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread Cemal Eker
Thanks for your response, but shoutbox isn't a online exam system. Shoutbox
is a chat-like feature that generally work with ajax. Where you can post
quick messages to website. We'll use it for a quick communication with admin
of system.

Here's what wiki says about Shoutbox http://en.wikipedia.org/wiki/Shoutbox.
---
“Talk is cheap. Show me the code” - Linus Torvalds



On Mon, Nov 16, 2009 at 3:16 PM, tedd  wrote:

> At 1:12 PM +0200 11/15/09, Cemal Eker wrote:
>
>> Hello,
>>
>> I just want to implement a shoutbox script for an e-learning application.
>> Searched Google for possible solutions but I just want to know what other
>> developers use.
>>
>> AJAX and GPL is a must.
>>
>
>
> Forgive me, but I don't know what a "shoutbox" is?
>
> As for an online exam that uses ajax, does this work?
>
> http://webbytedd.com/b/exam/
>
> If so, you are free to use anything you find there under GPL.
>
> Cheers,
>
> tedd
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>


Re: [PHP] File To Blob Corruption

2009-11-16 Thread Bastien Koert
On Mon, Nov 16, 2009 at 8:05 AM, tedd  wrote:
> At 10:17 AM + 11/15/09, Ashley Sheridan wrote:
>>
>> Like someone mentioned on the link you posted; storing the images in the
>> database does offer a layer of security, as database access is far
>> easier to control than file access.
>>
>> Thanks,
>> Ash
>> http://www.ashleysheridan.co.uk
>
> It also offers ease of moving, You don't have to move both database and file
> system to a different server, just the database. Additionally, the file
> paths are always correct -- just reference the database. So, there are
> upsides to storing images in a database.
>
> I haven't read a single MySQL/PHP book (dozens) that claims storing images
> in a database is a bad idea.
>
> Cheers,
>
> tedd
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Well, I can tell you that mysql really starts to have issues when the
image table gets up to around 12Gb in size. And if you look at larger
DBs like oracle the like, internally they store a pointer in the table
and the image elsewhere.

-- 

Bastien

Cat, the other other white meat

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



Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread Ashley Sheridan
On Mon, 2009-11-16 at 16:00 +0200, Cemal Eker wrote:

> Thanks for your response, but shoutbox isn't a online exam system. Shoutbox
> is a chat-like feature that generally work with ajax. Where you can post
> quick messages to website. We'll use it for a quick communication with admin
> of system.
> 
> Here's what wiki says about Shoutbox http://en.wikipedia.org/wiki/Shoutbox.
> ---
> “Talk is cheap. Show me the code” - Linus Torvalds
> 
> 
> 
> On Mon, Nov 16, 2009 at 3:16 PM, tedd  wrote:
> 
> > At 1:12 PM +0200 11/15/09, Cemal Eker wrote:
> >
> >> Hello,
> >>
> >> I just want to implement a shoutbox script for an e-learning application.
> >> Searched Google for possible solutions but I just want to know what other
> >> developers use.
> >>
> >> AJAX and GPL is a must.
> >>
> >
> >
> > Forgive me, but I don't know what a "shoutbox" is?
> >
> > As for an online exam that uses ajax, does this work?
> >
> > http://webbytedd.com/b/exam/
> >
> > If so, you are free to use anything you find there under GPL.
> >
> > Cheers,
> >
> > tedd
> > --
> > ---
> > http://sperling.com  http://ancientstones.com  http://earthstones.com
> >


I don't know of anything you can use like this, especially that runs
purely on Ajax. Just take a look at Facebook chat. That's Ajax, and
fails and falls over on a constant basis to the point where it is almost
useless. Imho, Java seems to be pretty good at this sort of thing, and
there are plenty of free options out there that you could use.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread Stuart
2009/11/15 Cemal Eker :
> I just want to implement a shoutbox script for an e-learning application.
> Searched Google for possible solutions but I just want to know what other
> developers use.
>
> AJAX and GPL is a must.

Strange requirements, but whatever.

A shoutbox is pretty rare on anything except sites aimed at teenagers
so I'm not surprised you haven't had many people jump in and tell you
what they're using, because they're not.

If this is for chatting with the site admin you may want to look into
one of the live support options rather than a shoutbox. They're
private (although I'm sure some have a public option) and they will
provide a much better system for the admin to track multiple
conversations. I really think a shoutbox is the wrong solution for
this particular problem.

-Stuart

-- 
http://3ft9.com/

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



[PHP] Cambios de la cuenta de correos

2009-11-16 Thread Deivys Delgado Hernández
Hola, debido a cambios en los servidores de salud he tenido que cambiar mi 
cuenta de correos, la nueva cuenta es la siguiente:

de...@dmssb.cmw.sld.cu

La cuenta vieja sera cancelada dentro de mas o menos 15 dias
Saludos,
René y Deivys

-- 
Este mensaje ha sido analizado por MailScanner Nodo Finlay, Camaguey, Cuba
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

Visite nuestro sitio http://nodofinlay.cmw.sld.cu




Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread Paul M Foster
On Mon, Nov 16, 2009 at 02:46:45PM +, Ashley Sheridan wrote:

> 
> I don't know of anything you can use like this, especially that runs
> purely on Ajax. Just take a look at Facebook chat. That's Ajax, and
> fails and falls over on a constant basis to the point where it is almost
> useless. Imho, Java seems to be pretty good at this sort of thing, and
> there are plenty of free options out there that you could use.

It's often been argued back and forth whether people have Javascript
turned off. I suspect the vast majority of people have Javascript turned
on. However, Java is another story. You may find that many more have it
turned off.

Paul

-- 
Paul M. Foster

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



Re: [PHP] Shoutbox suggestion needed

2009-11-16 Thread Ashley Sheridan
On Mon, 2009-11-16 at 12:06 -0500, Paul M Foster wrote:

> On Mon, Nov 16, 2009 at 02:46:45PM +, Ashley Sheridan wrote:
> 
> > 
> > I don't know of anything you can use like this, especially that runs
> > purely on Ajax. Just take a look at Facebook chat. That's Ajax, and
> > fails and falls over on a constant basis to the point where it is almost
> > useless. Imho, Java seems to be pretty good at this sort of thing, and
> > there are plenty of free options out there that you could use.
> 
> It's often been argued back and forth whether people have Javascript
> turned off. I suspect the vast majority of people have Javascript turned
> on. However, Java is another story. You may find that many more have it
> turned off.
> 
> Paul
> 
> -- 
> Paul M. Foster
> 


Yeah, but then, generally, you can tell the people visiting this site
what they need enabled, as it looks like the visitors are going to be a
select few. Java is available on all the main browsers, and generally
only needs one to accept the applet. For a chat application to be
written using only Ajax technology, well, like I said before, if
Facebook tried it and still can't get it right with all the financial
backing they have, what hope for someone to release this sort of thing
open source and Facebook not be aware of it?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] this has got me baffled: imagesx() andimagesy()reporting the wrong size?

2009-11-16 Thread Jason Young
Indeed. Using ImageMagick's 'identify' command, the first layer is 30x24 
on a 32x32 canvas.


radioactive-bread-eek.gif[0] GIF 30x24 32x32+2+6 8-bit PseudoClass 256c 
2.11kb
radioactive-bread-eek.gif[1] GIF 32x27 32x32+0+4 8-bit PseudoClass 256c 
2.11kb


If getimagesize() works on the canvas, then you might want to use that, 
instead. gd and gifs don't really have a steady relationship, anyway.


Ashley Sheridan wrote:


It does indeed seem to be some sort of bug. I've just tested it with
your image on my machine here and for imagesx() and imagesy() it gives
30 and 24 respectively. getimagesize() does return the correct
dimensions though.

The same image saved as a flat single layer gif from the Gimp behaves
exactly the same way.

This might not be a proper bug as such, as the image itself might be
32x32, but the first layer (the first frame in the animated version) is
30x24 when you remove the dead, unused, transparent background. Perhaps
GD is meant to report on the *actual* size of the image, rather than the
dimensions of the frame?

Thanks,
Ash
http://www.ashleysheridan.co.uk





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



RE: [PHP] Lightweight web server for Windows?

2009-11-16 Thread Daevid Vincent
Out of curiosity, if this is just for coding, and you're already a Linux
guy, why not just install a lightweight linux flavor on the laptop instead
of WF/XP?

http://www.xfce.org/

http://lightlinux.blogspot.com/2008/06/top-10-of-lightweight-linux_24.html

You didn't mention the specs, but any computer of the past few years is
pretty powerful. I used to rock a Dell i8200 (P4/1GB) and XP with a VMWare
workstation of Gentoo. SAMBA mount it and use NAT and it works awesome. So
you could try that. http://www.vmware.com/products/player/ and there are a
ton of pre-built VMs to download there http://www.vmware.com/appliances/. Or
you could also go with Sun's http://www.virtualbox.org too.

> -Original Message-
> From: O. Lavell [mailto:olav...@xs4all.nl] 
> Sent: Sunday, November 15, 2009 1:00 PM
> To: php-general@lists.php.net
> Subject: [PHP] Lightweight web server for Windows?
> 
> What do people on this list use as an ultra-lightweight web 
> server (with 
> PHP capability of course) on Windows? I have an old but still well 
> functioning laptop that I have just given a second life by installing 
> Windows Fundamentals (a stripped down version of XP). This works 
> surprisingly well. So now I am looking for the necessary 
> software, so I 
> can do some local programming.
> 
> Some requirements I can think of:
> 
> - Extremely small memory footprint and fast efficient code. 
> This laptop
>   still works well but it can certainly use some help!
> - Both free as in beer and free as in speech would be my preference.
> - Be able to run as a "service" in XP.
> - Be able to run PHP (obviously) and perhaps a few other nice server
>   features, like SSI and name based virtual hosts.
> 
> Any suggestions? I have not seriously used Windows for years 
> now, so my 
> knowledge of that platform is not exactly up to date anymore. 
> I am used 
> to dealing with Debian/Ubuntu Linux and Apache but not much else, 
> frankly. Apache does seem to heavy for this. My initial 
> thought was to 
> install Lighttpd under Cygwin, but perhaps I would be missing 
> out on some 
> great little server program that I have not yet heard about.
> 
> -- 
> 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] [php] & [mysql] select and subselect

2009-11-16 Thread Allen McCabe
I have a page on my site where I can optionaly filter by certain fields
(order by filesize or file category), but I am implementing a shopping cart
type of idea where users can submit an order.

As administrators, my coworkers and I need to be able to filter orders by
their contents. For example:

View all orders for "Jack and the Beanstalk," where an order may have Jack
and the Beanstalk and other items.

I have an order table that keeps track of the order_id, the date, the
status, etc. I also have an order_lineitem table that is the contents of the
order. This has a one-to-many structure (without foreign keys because it is
mysql).

I was baffled as to how to filter the orders by the item_id that appears in
the order_lineitem table.

I just came up with this, but I'm not sure how the mysql_queries will handle
an array. Do I have to do some extensive regular expression management here
to get this to work, or will it accept an array?




[PHP] PHP httpd debug question

2009-11-16 Thread John Beaulaurier -X (jbeaulau - Advanced Network Info at Cisco)
Hello,

 

phpMyAdmin crashes when access is attempted each time, and I need to run
an httpd backtrace. I have a question though.

 

There is another httpd instance running on the same host. If I run httpd
-X will it interfere with the other httpd process running, or will

it be a separate process?

 

Thanks

-John 



[PHP] How to make the PHP know the real SCRIPT_FILENAME?

2009-11-16 Thread Dong Wang
I am trying to use PHP as backend, which communicate with apache-2.3's
mod_proxy_fcgi

But I have noticed that the SCRIPT_FILENAME has been changed to
"proxy:balancer://xx", it cann't be recognized by  the remote PHP
backend. So the request failed.
In my opinion, the remote PHP backend use the SCRIPT_FILENAME to find the
script file. But the PHP and the Apache may be in different computer, so the
Document Root may be different. is that means the PHP shouldn't rely on the
SCRIPT_FILENAME?

how can I configure the PHP to know the real script file to execute?

Thank you


[PHP] Ask about printer_open()

2009-11-16 Thread agus priy
Dear,

I want to ask about function printer_open(). I have error Call to
undefined function printer_open(), but php_printer.dll was copied in
windows-system32 and php.ini has been setting. can you help me to
solving this problem.

Please reply soon. thank you.

Regards,
Priyagus

On 11/17/09, agus priy  wrote:
> Dear,
>
> I want to ask about function printer_open(). I have error Call to
> undefined function printer_open(), but php_printer.dll was copied in
> windows-system32 and php.ini has been setting. can you help me to
> solving this problem.
>
> Please reply soon. thank you.
>
> Regards,
> Priyagus
>

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



[PHP] Ask about printer_open()

2009-11-16 Thread agus priy
Dear,

I want to ask about function printer_open(). I have error Call to
undefined function printer_open(), but php_printer.dll was copied in
windows-system32 and php.ini has been setting. can you help me to
solving this problem.

Please reply soon. thank you.

Regards,
Priyagus

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



[PHP] When will we get the official x64 php binaries?

2009-11-16 Thread Buddy Hu
Hi All,

I noticed that in the snapshot page, we have 
a VC9 x64 Thread Safe binaries. However it's not intended for production use.
So my question is, when can we get the official x64 PHP binaries? What's your 
schedule?

Thanks very much!
-Buddy Hu


[PHP] When will we get the official x64 php binaries?

2009-11-16 Thread Buddy Hu
In case this mail is not sent out. Send again!

From: Buddy Hu
Sent: Tuesday, November 17, 2009 3:00 PM
To: 'php-general@lists.php.net'
Subject: When will we get the official x64 php binaries?

Hi All,

I noticed that in the snapshot page, we have 
a VC9 x64 Thread Safe binaries. However it's not intended for production use.
So my question is, when can we get the official x64 PHP binaries? What's your 
schedule?

Thanks very much!
-Buddy Hu


Re: [PHP] Ask about printer_open()

2009-11-16 Thread agus priy
in phpinfo(), information about fields php_printer is nothing.
how to use get_loaded_extensions? do you explain it more?
thanks.

On Tue, Nov 17, 2009 at 2:08 PM, 惠新宸  wrote:

>  Hi:
>   is there any fields about php_printer in phpinfo()'s output ?
>   or you can use get_loaded_extensions too.
>
>   if not , that means your did not loading the extension into php.
>   you should check the php startup error_log .
>
> thanks
>
> agus priy wrote:
>
> Dear,
>
> I want to ask about function printer_open(). I have error Call to
> undefined function printer_open(), but php_printer.dll was copied in
> windows-system32 and php.ini has been setting. can you help me to
> solving this problem.
>
> Please reply soon. thank you.
>
> Regards,
> Priyagus
>
> On 11/17/09, agus priy   wrote:
>
>
>  Dear,
>
> I want to ask about function printer_open(). I have error Call to
> undefined function printer_open(), but php_printer.dll was copied in
> windows-system32 and php.ini has been setting. can you help me to
> solving this problem.
>
> Please reply soon. thank you.
>
> Regards,
> Priyagus
>
>
>
>  --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> .
>
>
>
>
> --
>  [image: Baidu] 惠新宸 Xinchen.Hui *|* Engineer @ ECOM *|* (+8610)59926238 *|
> * [image: Hi] laruence
>