[PHP] invalid range

2002-12-02 Thread peter a
when I do this

eregi("^([a-zåäö_\.- ]+)$",$value);

I get this:

Warning: Invalid range end in 
/home/zinekweb/public_html/corporate/_mcm_contacts_upload.php on line 42

Why?

I running Apache1.3 on my XP machine with PHP 4.2something.. but when I upload to  a 
RedHat7.2 server with Apache.1.3 and PHP4.0something I get this error.

Can anyone help me out here? Any clues?

   /peter a


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




Re: [PHP] Re: Mass Mailing

2002-12-26 Thread peter a

Hi.
I have myself written a rather clumsy mass mailer in
php which queues mail via the sendmail-command.
I have found this to be rather slow and ineffective.

You are talking about queueing mail directly to the
mailqueue, and I wonder, how is that done with php?

About making mails not rejected by spam-filters I have
experienced that there should be something in the to
field, many servers are rejecting mails that it empty in
that header. Also, if you are sending out html letters,
try and attach a plain text version as well, or emails
will be rejected as well. I have a rather neat script
for the latter if anybody is interested.

But please get back with some tips how to queue mail
straight to the mail queue for fast delievery.

  /peter a



At 2002-12-22 20:52, Manuel Lemos wrote:
>Hello,
>
>On 12/22/2002 02:52 PM, Jonathan Chum wrote:
>>>>I was considering of writing the mass mailing application in PHP instead
>>>>though.
>>>>
>>>>If anyone has eperience writing such applications with this amount of
>>>>emails, I'd like to know what you've done.
>>>
>>>If you do not need to send personalized messages (messages that differ
>>>for each recipient), just put all recipients in a BCc: header and send a
>>>single message to the local mailer queue (not via SMTP).
>>>
>>>If you do not care for the users that bounce messages, just make the
>>>return path be black hole email address. OTOH, if you care about bounces
>>>(you should if you mailing list is large or is not clean), consider
>>>using ezmlm, which is a mailing list manager than among other things
>>>takes care of bounce messages thanks to qmail VERP. I was told that is
>>>the one that eGroups hacked to use in the now known YahooGroups site.
>>>
>>>Once I built a small Web interface for ezmlm. It was meant just to
>>>create and edit several mailing lists meant to be used as newsletter for
>>>a portal with many sites. Is simple but it already comes with a SOAP
>>>interface to manage the mailing list subscribers remotely.
>>>
>>>http://www.phpclasses.org/ezmlmmanager
>>
>>I heard that using BCC, it can only handle a certain amount of receipients.
>
>No, if you look in the archives of this list you will notice that this was explained 
>several times. What happens is that some ISP of shared hosting limit the number of 
>recipients of the messages you can send because they do not want you to do mass 
>mailing at all. You should check your ISP Acceptable Use Policy before trying to do 
>any mass mailing. Trying to queue individual messages to each recipient may fool the 
>server limitations but you may still be against the AUP.
>
>
>>Also, messages that are BCC'd are also tend to be blocked by mail servers
>>and clients.
>
>Any server owners that do that are dumb because while they think they are blocking 
>spammers, what they get is they are simply blocking opt-in mailing lists for instance 
>like this one you are getting. At the same time you still keep getting most of the 
>spam because real spammers use dedicated machines make the recipients addresses show 
>in the messages as needed to defeat that silly anti-spam criteria. So, what they get 
>is to block solicited e-mail.
>
>Anyway, the problem of personalizing messages is that makes your mailings take much 
>longer to generate and queue because you need to create separate message for each 
>recipient.
>
>
>>>No, queuing via SMTP is the slowest way to send messages. Your script
>>>should not bother to deliver the messages to the recipients SMTP
>>>servers.  Delivery can take hours or days to finish due to network
>>>congestions and hard to conect SMTP servers. Just queue the messages in
>>>the local mailer and let it take care the actual delivery.
>>>
>>>I would recommend a qmail based system anytime, with or without ezmlm on
>>>top. In a production system that I manage, it just takes 3 seconds to
>>>queue a alert message to be sent to 50,000 via a local qmail server.
>>>
>>>You can also use sendmail almost as fast using the queue only mode. Some
>>>people think that sendmail is slow and many forks processes because they
>>>are not aware of how to configure it to queue the messages the fastest
>>>way that is possible.
>>>
>>>You may want to look into this class that has a sub-classes for
>>>delivering with sendmail program directly instead of using the mail().
>>>It lets you configure the sendmail delivery mode. There is also a
>>>sub-class for delivering with qmail.
>>>
>>>http://www.ph

[PHP] Uploading and storing large files

2003-01-23 Thread peter a

Hi.

I am currently working on a projekt that will involve uploading files with filesizes 
up to about 10mb, and all sorts of different filetypes and I havet o Questsions 
concerning that.

1 ) How should the upload be done? I don't feel all  that comfortable posting 
10mb-files via a simple html-form, wouldn't that take a while if the connections is 
slow, and even if it was fast, it would take a minute or two. I was drawing out a 
upload functions with the built in ftp-functions,  but then it occured to me, doesn't 
a  always  posts it's content to the server anyway? How do I post large files 
without worrying about broken uploads, timeouts and all that?

2 ) How should I store the files? I suppose I have to optiones. Database ( I have 
mySQL installed ) or in folders (  in RedHat8.0 ) Should I build up  a 
folder-structure to hold the files or just put it all in the database? A mySQL table 
in RedHat can hold 4gb, which is a lot, but my content may exceed that, how coud I 
check the size of the tables, and dynamically create new databases and when running a 
member Query, select content from them all? 
Would a file structure be better, with a folder strucuture for member a-b store in 
this folder c-d to in this and so on... Would it be stupid to store a 1 10mb mpegs 
in one database?

Any suggestions?



   /peter a





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




Re: [PHP] File upload security

2003-01-23 Thread peter a

Files in web folders should usually be 755
  /peter a



At 2003-01-23 11:15, Marco Alting wrote:
>Hi, I have a php script which uploads file to a webserver. The idea is that
>anyone can upload files, but only another php script can read the files. At
>this moment I think someone is deleting file from my upload folder. What
>CHMOD settings do I need to secure this?
>
>
>
>-- 
>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] Unable to load pages with errors

2004-05-28 Thread peter a

I have stumbled on something that is new for me. Usually when I get a 
PHP error I print them on the page, but suddenly pages with errors don't 
load at all, in IE I get the usual "The page cannot be displayed" and in 
Lynx I get "Alert!: Unable to access document."

I run PHP 4.3.2 and Apache 2.0.47 on RedHat 9.
Ideas anyone?
   /peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
Thanks, but that didn't take me anywhere. My browser still seems to hang 
itself or load a part of the page. I suppose it could be any of my 
http-processes that freezes up.. but I don't seems like it and I don't 
know why it would. Doesn't matter which browser I use either.
  /peter

Chris W. Parker wrote:
peter a <mailto:[EMAIL PROTECTED]>
on Friday, May 28, 2004 8:29 AM said:

I have stumbled on something that is new for me. Usually when I get a
PHP error I print them on the page, but suddenly pages with errors
don't load at all, in IE I get the usual "The page cannot be
displayed" and in Lynx I get "Alert!: Unable to access document."

first of all turn off friendly http errors in internet explorer and that
should show you what error is happening. then you can go from there.

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


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
Nothing complicated at all. It loops out some values from a MySQL 
database with not more than 20 entries. It's not that..
 /peter

Chris W. Parker wrote:
peter a <mailto:[EMAIL PROTECTED]>
on Friday, May 28, 2004 9:06 AM said:

Thanks, but that didn't take me anywhere. My browser still seems to
hang itself or load a part of the page. I suppose it could be any of
my http-processes that freezes up.. but I don't seems like it and I
don't know why it would. Doesn't matter which browser I use either.

is the page doing anything complicated that would cause it to take a
long time to finish (and subsequently load)?

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


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
It not just that page.. it is all pages the will generate some sort of 
PHP error. Instead of the usual error output I get nothing.
  /peter

Chris W. Parker wrote:
peter a <mailto:[EMAIL PROTECTED]>
on Friday, May 28, 2004 9:12 AM said:

Nothing complicated at all. It loops out some values from a MySQL
database with not more than 20 entries. It's not that..

well unless it's a server thing (in which case i'd have no ideas towards
a solution) your next step is to strip the file until it starts working
again. or you can start from scratch checking the page at every step
until it stops working.

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


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
No the file is there. I see it in the access logs for apache (even 
though last night it didn't even show up there.. ), but it refuses to load.

Every time I get a PHP error the page freezes up and my browser tries to 
load it forever or I get "The page cannot be dispalyed". The file is 
there.. it just won't load..

In a working PHP-file I added some code that for sure wouldn't work, and 
the page froze. Still showed up in the access log though.. but it didn't 
display any output at all obviously.
 /peter


Peter Risdon wrote:
peter a wrote:

I have stumbled on something that is new for me. Usually when I get a 
PHP error I print them on the page, but suddenly pages with errors 
don't load at all, in IE I get the usual "The page cannot be 
displayed" and in Lynx I get "Alert!: Unable to access document."

Lynx generally knows what it is talking about. It sounds as though your 
page really is not available. You have given very little detail - the 
webserver logs might be interesting, for example, because they'd show 
what document the browsers were trying to access. But I'd guess your php 
error - if that's what it is - consists of trying to load a non-existent 
url.

Stabbing in the dark here - have you missed a "?" before GET arguments?
PWR.
I run PHP 4.3.2 and Apache 2.0.47 on RedHat 9.
Ideas anyone?
   /peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
PHP configuration has not been changed though... so it's just strange.. 
I read something about a similiar trouble if you SSL on the server, I 
have SSL installed but this site is not under https. Anybody now 
anything about that?
/peter


Chris W. Parker wrote:
peter a <mailto:[EMAIL PROTECTED]>
on Friday, May 28, 2004 9:17 AM said:

It not just that page.. it is all pages the will generate some sort of
PHP error. Instead of the usual error output I get nothing.

hmm... sounds like a php configuration thing. i.e. a server thing. in
which case i'm all out of ideas. good luck!

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


Re: [PHP] Unable to load pages with errors

2004-05-28 Thread peter a
I have not changed my configuration lateley, what I know of. There is 
another guy working on the server, but he said he had changed nothing 
either. I've been running this configuration for a couple of months now 
and it has never caused me any troubles.
  /peter

Michael Sims wrote:
peter a wrote:
It not just that page.. it is all pages the will generate some sort of
PHP error. Instead of the usual error output I get nothing.

Sounds to me like the apache process is segfaulting when PHP's error handler is
invoked.  You say it used to work for you, what changed recently?  Did you install a
new version of Apache, or PHP?  Did you change the configuration of either?  Is
there anything in the apache error log?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php