Re: [PHP] Re: May i?

2002-08-04 Thread Manuel


You can reset the id with this command:
ALTER TABLE $tablename AUTO_INCREMENT = 242

 : : Flavio Bastos Amiel: : : : : : INVALID_ADDRESS_IN_GROUP@.SYNTAX-ERROR., 
 :"::: Flavio Bastos Amiel::>" wrote:let's see if i can do it...

i got a news site. everything was going OKsometimes i made few
testing and then i delete the content from the db... the problem is next:

the item "id" is an auto_increment element .. so the id's wasn't going
allrightbecause they where not true... sometimes they make jumps like id
#25 and the id #30 (because of the testing i've done and then delete)

i tried to delete that cell (id) and then i recreate it. thinking the id was
going to count it all over and make the item id TRUE.but it wasn't like
that, the "new" id was counting since the last id then if the last id was
100, the new id was counting from 100 to 200  do i explain myself?...
does anyone have an answer to this problem (PLEASE Dont tell me i have to do
i manually!! )

thanks,
Flavio Bastos Amiel





"George Nicolae" wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ask.
>
> --
>
>
> Best regards,
> George Nicolae
> IT Manager
> ___
> PaginiWeb.com - Professional Web Design
> www.PaginiWeb.com
>
>
> "::: Flavio Bastos Amiel::>" wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > May i ask for help about a subejct on MySQL here?
> >
> > thanks,
> > Flavio Bastos Amiel
> >
> >
>
>



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





~ Manuel Ochoa ~
Seven days is too long to wait for a gun!



-
Do You Yahoo!?
Yahoo! Health - Feel better, live better


[PHP] Can this be done with mail()?

2002-07-13 Thread Manuel


I need to query a database and return a resultset. A php script will then sort through 
the data and send the data to the browser in the form of a table.

Is it possible to gather the the results with html tags and store them in a variable 
so that the results can be emailed to someone? If so, how would this be done?



-
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes


[PHP] Printer margins

2002-07-16 Thread Manuel

I'm creating an HTML file that will be printed by my website users. I've notices that 
most browser have the default print margins set to 0.75". Is there any way to change 
the print margins to 0.25"?


-
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes


[PHP] Re: Application with barcodes

2002-11-25 Thread Manuel Lemos
Hello,

On 11/25/2002 10:34 PM, Axis Computers wrote:

I am developing a demo of an application which uses barcodes, but I'm
running into the following problems:

1. The gd library's compiled with SuSE 7.3 Pro version of  PHP 4.06 doesn't
support TTF so I have to install Postcript fonts (it does support Type 1),
and I really don't know where I should install them and which barcode font
is better to use.

2. My application runs under a PostNuke enabled site so I can't just
recompile the gd library and php to make TTF available, I'm afraid it will
mess up a whole working system !

3. The barcode will be printed over an image gif ? jpeg ? which ones works
better ?



Since this my first app with barcode, any advise from seasoned users it's
very welcome.


You may want to try these solutions:

http://www.phpclasses.org/barcode128
http://www.phpclasses.org/pdfbarcode128
http://www.phpclasses.org/barcode

--

Regards,
Manuel Lemos


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




[PHP] Re: Multiple page form

2002-11-26 Thread Manuel Lemos
Hello,

On 11/26/2002 01:42 PM, Shane McBride wrote:

It's been a while since I have done any PHP work. I am creating an online
employment application using multiple forms for a client. I was going to use
PHP. I don't remember if I need to pass variables along with the form for
each page, or can I just call them on the last page.

The application form is very long. Any ideas? There may be a script that
exists already?


Yes, you may want to try this class. It lets you compose and process 
multipage forms in two modes: sequential access (wizard like with 
buttons Next >>, << Back, Finish >> and cancel) and random access 
(tabbed pages like with edit or view only modes).

http://www.phpclasses.org/multipageforms


http://www.phpclasses.org/browse.html/file/348/view/1/name/test_random_form_page.html

http://www.phpclasses.org/browse.html/file/349/view/1/name/test_sequential_form_page.html

--

Regards,
Manuel Lemos


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



[PHP] Need email solution

2002-11-26 Thread Manuel Ochoa

I'm setting up a Windows 2000 server with Apache, PHP and MySQL. I also need to setup 
email service for 1 domain name.

I'm looking for any suggestions on SMTP software.



[PHP] Re: How to create zip files in PHP ?

2002-11-27 Thread Manuel Lemos
Hello,

On 11/27/2002 01:08 PM, Php User wrote:

How to create  zip files  in  PHP ?
I found that php's zip function  are read only...
Can any one help me with that ? 


You can find here a class ready to do exactly that:

http://www.phpclasses.org/phpzip


--

Regards,
Manuel Lemos


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




[PHP] Re: My first XML!

2002-11-27 Thread Manuel Lemos
Hello,

On 11/27/2002 05:29 AM, Boris Kolev wrote:

  I want to know how i can export tree structure from Mysql table to
  XML
  mysql table structure is:
  ID - Group Unique Id
  P_ID - Parent Id
  Name - Name of group

  I want to make XML whit tree structure. Can some body help me!


You may want to try this class to compose nicely formatted XML documents:

http://www.phpclasses.org/xmlwriter

Or even this that already converts the XML data from and to MySQL:

http://www.phpclasses.org/mysql_xml

--

Regards,
Manuel Lemos


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




[PHP] Re: sendmail problem!

2002-11-27 Thread Manuel Lemos
Hello,

On 11/27/2002 09:01 PM, Siamak wrote:

I use PEAR to send mails to my users through "sendmail", my mails sometimes
are delivered immediately, sometimes after some minutes and sometimes after
some hours and sometimes never! I tried to identify the cause but I wasn't
successful, is there someone out there who can help me? I want to send an
immediate message to my newly signed up users.


You need to use some switches to enable immediate deliver.

You may want to try this class with the sendmail_message subclass that 
calls sendmail directly using the necessary switches to enable the 
immediate delivery mode.

http://www.phpclasses.org/mimemessage

I use that class with this other class for the same purpose as you to 
use the direct delivery mode using SMTP directly, thus without relying 
on SMTP:

http://www.phpclasses.org/smtpclass


--

Regards,
Manuel Lemos


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



[PHP] Re: mail with CC and BCC

2002-12-03 Thread Manuel Lemos
Hello,

On 12/03/2002 10:09 AM, Alain Romero wrote:

PHP server = Win 2000 SP2/php 4.1.2
SMTP server = Netscape Messenger 4.15 (declare on php.ini)

Why CC and BCC never receive mail ?


The mail() function has its set of flaws, especially under Windows.



The header 'TO' is correct : see CC and BCC !
The header : "From : . CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]"

I try  severals classes I have found (PHP Classes), no good result !


You can use this class function $email_message->SetHeader("Cc:" or 
"Bcc:", "[EMAIL PROTECTED], [EMAIL PROTECTED]");

http://www.phpclasses.org/mimemessage

If the mail() function is really not working, you may need to use also 
the smtp_message sub-class along with this other class for sending:

http://www.phpclasses.org/smtpclass



--

Regards,
Manuel Lemos


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



[PHP] Help with session variables

2002-12-03 Thread Manuel Ochoa

I'm running PHP 4.3 on a Windows .net server with Apache 2. Please look at the 
following code as I cannot figure out what I'm doing wrong.

Page1.
session_start();
session_register("step");
$step=1;
header("location: page_A.php");

Page_A.
session_start();
extract($_SESSION);
$step=2;
header("location: page_B.php");

Page_B.
session_start();
extract($_SESSION);
print("$step");

Output is always "1". I thought that session variables were global? What am I doing 
wrong?



[PHP] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Manuel Lemos
Hello,

Finally I made time to release a full blown application based on MetaL 
compiler persistence module.

Here is the release announcement that may also be found on the site:

http://www.meta-language.net/news-2002-12-05-metastorage.html

  _

Released Metastorage generator
Manuel Lemos, 2002-12-05 16:11:44 GMT

Metastorage is an application that is capable of generating
persistence layer APIs. It takes a component definition defined in the
Component Persistence Markup Language (CPML), a XML based format, and
generates classes and storage schemas in a given target programming
language.

Using CPML, developers can focus their efforts on the modeling of data
structures that hold the information and the relationships between the
entities that their applications deal with. Metastorage takes care of
generating all the necessary code to store and retrieve such data
structures from persistent storage containers like relational
databases.

The main goal of Metastorage is to drastically reduce the time to
develop applications that traditionally use on SQL based relational
databases.

The generated APIs consist of a sets of classes that provide an Object
Oriented interface to the objects of the classes modeled using CPML.

The generated APIs are also capable of installing the data schema in
the persistence container, which in the case of a relational database
is the set of tables that will hold the persistent objects. This
completely eliminates the need to write any SQL queries manually.
CPML is independent of the type of persistent container. This means
that while it can be used to model classes of persistent objects that
may be stored in relational databases, such objects may as well be
stored in other types of persistence containers.

For instance, if an application needs to move a directory of objects
with user information from a relational database to a LDAP server to
increase the application scalability, the same CPML component
definition would be used. Metastorage would then generate classes
objects that implement the same API for interfacing with a LDAP server
that is compatible with the API generated to interface with relational
databases. This make the migration process easier and with reduced
risks.

Another possible benefit of the persistence container independence of
the APIs generated by Metastorage, is the case where an application
may need to run in environments where a SQL based database server is
not available. In that case the same API could be generated to store
persistent objects in flat file databases or plain XML files.

For now, the current version of Metastorage only supports the
generation of PHP code based on the database independent Metabase API.
This means that it may also interface with PEAR::MDB database
abstraction layer using its built-in Metabase API wrapper. In
consequence, many types of relational databases are already supported.

Since this is the first release of Metastorage, there is plenty of
room for improvement in the possibilities of the generated persistence
APIs and the level of optimization of the generated code. In the
future it will be supported other languages besides PHP, other
database APIs besides Metabase and other persistence containers
besides relational databases.

Metastorage is based on MetaL compiler persistence module. Like MetaL,
Metastorage is Open Source and is distributed with BSD like software
license. Downloadable archives and documentation with an example of
component definition are available from the MetaL site.


--

Regards,
Manuel Lemos


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



[PHP] ANNOUNCE: Metastorage object persistence API generator

2002-12-05 Thread Manuel Lemos
Hello,

Finally I made time to release a full blown application based on MetaL
compiler persistence module.

Here is the release announcement that may also be found on the site:

http://www.meta-language.net/news-2002-12-05-metastorage.html

   _

Released Metastorage generator
Manuel Lemos, 2002-12-05 16:11:44 GMT

Metastorage is an application that is capable of generating
persistence layer APIs. It takes a component definition defined in the
Component Persistence Markup Language (CPML), a XML based format, and
generates classes and storage schemas in a given target programming
language.

Using CPML, developers can focus their efforts on the modeling of data
structures that hold the information and the relationships between the
entities that their applications deal with. Metastorage takes care of
generating all the necessary code to store and retrieve such data
structures from persistent storage containers like relational
databases.

The main goal of Metastorage is to drastically reduce the time to
develop applications that traditionally use on SQL based relational
databases.

The generated APIs consist of a sets of classes that provide an Object
Oriented interface to the objects of the classes modeled using CPML.

The generated APIs are also capable of installing the data schema in
the persistence container, which in the case of a relational database
is the set of tables that will hold the persistent objects. This
completely eliminates the need to write any SQL queries manually.
CPML is independent of the type of persistent container. This means
that while it can be used to model classes of persistent objects that
may be stored in relational databases, such objects may as well be
stored in other types of persistence containers.

For instance, if an application needs to move a directory of objects
with user information from a relational database to a LDAP server to
increase the application scalability, the same CPML component
definition would be used. Metastorage would then generate classes
objects that implement the same API for interfacing with a LDAP server
that is compatible with the API generated to interface with relational
databases. This make the migration process easier and with reduced
risks.

Another possible benefit of the persistence container independence of
the APIs generated by Metastorage, is the case where an application
may need to run in environments where a SQL based database server is
not available. In that case the same API could be generated to store
persistent objects in flat file databases or plain XML files.

For now, the current version of Metastorage only supports the
generation of PHP code based on the database independent Metabase API.
This means that it may also interface with PEAR::MDB database
abstraction layer using its built-in Metabase API wrapper. In
consequence, many types of relational databases are already supported.

Since this is the first release of Metastorage, there is plenty of
room for improvement in the possibilities of the generated persistence
APIs and the level of optimization of the generated code. In the
future it will be supported other languages besides PHP, other
database APIs besides Metabase and other persistence containers
besides relational databases.

Metastorage is based on MetaL compiler persistence module. Like MetaL,
Metastorage is Open Source and is distributed with BSD like software
license. Downloadable archives and documentation with an example of
component definition are available from the MetaL site.


--

Regards,
Manuel Lemos


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




[PHP] Metastorage generates Entity-Relationship class diagrams in UML

2002-12-09 Thread Manuel Lemos
Hello,

As announced last week, Metastorage is an application that generates 
customizable APIs made of classes that store and retrieve objects stored 
in persistent storage containers like for instance relational databases. 
The generated code uses Metabase API and consequently supports PEAR::MDB 
via Metabase API wrapper.

In addition to that, the current version is also capable of generating 
automatically Entity-Relationship graphs using UML to present diagrams 
of the generated classes.

The generated Entity-Relationship graphs are described in the DOT 
language format. This format is used by the Graphviz software package 
from AT&T research labs. The DOT file can be rendered in many common 
image formats using Graphviz tools to generate a graph image.

An example of an Entity-Relationship UML diagram generated by the 
program from a component example definition is included in the 
Metastorage documentation.

Here you may find the complete announcement with example graphics and 
the relevant links:

http://www.meta-language.net/news-2002-12-09-metastorage.html

--

Regards,
Manuel Lemos


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



[PHP] Mail Error

2002-12-13 Thread Manuel Ochoa

I have a Windows server running Apache 2 and PHP 4.3

I got the following error while using the mail() function:
Warning: mail() [function.mail]: SMTP server response: 550 User not local. We don't 
relay in C:\Apache2\htdocs\mymail.php on line 22 
Any ideas?



[PHP] Getting the username

2002-12-19 Thread Manuel Ochoa

I'm developing an Intranet at my company and was wondering if there is any way to get 
the username from someone who is already logged into a Windows network?



Re: [PHP] validate date

2002-12-19 Thread Manuel Ochoa

Here is a funtion that I use.
A user can enter a date in any of the following ways:
01 01 03
01-01-03
1-1-03
01-1-2003
1-01/03
1/1 03  you get the idea...
This function will standardize the date and make sure it's valid. If invalid it 
returns "ERROR"
function fixdate($data){
 $aux[0]="";
 $aux[1]="";
 $aux[2]="";
 $z=0;
 for($i=0; $i wrote:If a user inputs a date into 
a form, what function can I use to validate
that he put in a valid date?
I want to use checkdate but that needs the date split up into day, month
year.
Anyone have an easy way of doing this?
Thanks,
Diana


Re: [PHP] case statement?

2002-12-19 Thread Manuel Ochoa

Yes, It's called "SWITCH"

Just go to www.php.net and lookup "switch" in the function list
 Max Clark <[EMAIL PROTECTED]> wrote:Hi-

I was wondering if php had a case function?

Instead of building a large if/elseif/else block I would like to do a case
$page in (list).

Thanks in advance,
Max





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



[PHP] Re: Mass Mailing

2002-12-21 Thread Manuel Lemos
Hello,

On 12/21/2002 08:10 PM, Jonathan Chum wrote:

An upcoming project I'm working and spec'ing out is a mass mailing
application. Initially, I was looking at Mailman which was written in Python
since it looks like it handles delivering emails efficiently without killing
the server. We have 1 client able to send 110,000 emails at 6.5K avg per
week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very
bad and we'd like to develop other features like text ads, tracking,
templates, etc. This would require writing a wrapper around Mailman in PHP.
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'm thinking of coding the front end in PHP that will put the email into a
queue table that will force a command line PHP script listening on a
particular port to scan the database for this new task in queue. Once it
picks up the task, the timeout for this application to run will be set to
infinite. It'll establish a SMTP socket either to a really beefed up mailing
list server or the localhost SMTP server to begin blasting out these emails.

From what I understand, it's better to blast emails via an open socket
connection to SMTP rather than looping through Sendmail. Is this the right
thing todo?


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.phpclasses.org/mimemessage



I've also heard that PHP is not good for writing mailing lists application,
but Mailman is written in Python and it's able to send thousands of email
just fine. Any thoughts on this?


When people do not know how to do it properly, they blame it on the 
software. Note down: *smart software always beats fast software*. Sure 
you can use a faster language like C  (not Python), but if you develop 
smart software in PHP it can be almost as fast as a similar solution in 
C and does not take an etternity to develop and debug.


--

Regards,
Manuel Lemos


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



[PHP] Re: Mass Mailing

2002-12-22 Thread Manuel Lemos
lization.



Your Mime Message class seems to be better for sending mass mailings as it
queues up the email into Sendmail without opening/closing the connection for


Actually the class provides different delivery methods that maybe 
appropriate in different circunstances: mail(), sendmail, qmail and SMTP.

SMTP is the slowest for queuing but it is the fastest for direct 
delivery. My SMTP class supports direct deliveries which is great to 
deliver urgent messages as they are not relayed to the local mailer. It 
delivers to the recipient SMTP server and you will know if the message 
was accepted right away. I use this to deliver password reminder and 
other messages that users of my sites are anxious to receive because the 
local mailer queue may be loaded at the moment with some long delivery.


each recepient. phpmailer.sourceforget.net has that problem of opening and
closing a connection, yet they claim to receive good results of up to 40,000
emails per hour. Another software using that class was able to send 500,000
emails in 10 hours.


You should not consider any delivery statistics because all depends on 
factors that have nothing to do with the software you use, like the 
outbound bandwidth, remote server reachability, anti-spam reception 
delays, temporary messages refusals (mailbox full, blocked account, etc..).


If injecting the emails directly into Qmail (Sounds to me that Qmail is far
better for email deliver than to be using Sendmail) vs using SMTP, then


DJB software rules! BTW, consider using DJBDNS cache to reduce DNS 
server lookup time.


that'll be the approach. The only reason I'd would be using SMTP is to keep
the code and data (on MySQL) stored on one machine and when it's time to
blast out an email, it'll establish a connection to a SMTP server assigned
to the list to deliver the email.


In that case, you may consider QMQP relay which is a protocol that lets 
you rely entire mail queues from a server to another. This is 
recommended when you have many busy mailing lists served from one 
machine and you can use more servers do the actual delivery. I think 
only qmail and ezmlm support QMQP.


Though if the code was written to sit on each server that scans for pending
tasks, it'll pick up it's job from a master database server and then
directly injecting Qmail locally.


That is what qmail does.



The software app I'm writing is expected to have many users with small to
very large lists. I'm trying to spec this out so that it scales well and
with the fastest delivery. From what I'm hearing from you and from the first
guy's reply to this thread, inject the email into Qmail is the quickest way.


Yes, qmail was thought for that. Yahoogroups use it and I have also used 
when I worked in a large portal with many subscriber newsletters as I 
mentioned. We had some very large like for MTV Brasil that had almost 
400,000 subscribers.

The greatest problem that made me learn some hard lessons is that it is 
very problematic if you start with subscribers list that are not clean 
up of no longer valid users. Once you start delivering messages to those 
addresses, you get a flood of bounces that pratically stop your server 
queue.

The MTV newsletter was weekly, but that affected the newsletters of 
other sites that were stopped during the MTV newsletter bounces. Since 
ezmlm does not unsubscribe bouncing addresses right away, the solution 
was to remove bouncing subscribers using an external validation 
procedure. I used this other class for the cleanup. After that it was a 
breeze. We had peaks of 10,000 messages sent per minute.

http://www.phpclasses.org/emailvalidation


--

Regards,
Manuel Lemos


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



[PHP] Re: Email problems.

2002-12-22 Thread Manuel Lemos
Hello,

On 12/22/2002 11:29 AM, Steve Jackson wrote:

I have generated a page on our server using PHP (from within a CMS system)
which I renamed the output .html to use in an html email.
My problem is when I cut and paste the HTML into the email (Outlook) it
either:
displays the code,
displays the html email and then when it's sent, sends it as an attachment
or sends it as a bunch of html links and  badly formatted text.

I assumed (badly) that Outlook would simply send HTML emails if you
formatted the program to send html emails but this seems almost impossible.

Anyone have any suggestions?

This is the page I want to send:
http://www.violasystems.com/e-news/template.html


You may want to try this class for composing messages that lets you add 
parts from files. Just specify the URL as filename:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: Flow diagrams.

2002-12-26 Thread Manuel Lemos
Hello,

On 12/26/2002 05:18 PM, Sridhar Moparthy wrote:
> Do you know how to prepare and display process flow diagrams dynamically
> based on some data from database. I have information about some 
processes in
> the database that tells different process dependencies. I need to display
> that information as a process flow diagram.

You may want to look at Metastorage that draws graphs of classes of
objects that are stored in a database:

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html


--

Regards,
Manuel Lemos


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



[PHP] Re: Flow diagrams

2002-12-27 Thread Manuel Lemos
Hello,

On 12/27/2002 06:00 PM, Sridhar Moparthy wrote:

I have information about some processes in the database that tells different
process dependencies. I need to display that information as a process flow
diagram. Do you know how to prepare and display process flow diagrams
dynamically. Do you know anything like JPGraph or Java script or java applet
that can do this? If so Please help me.


As I explained before, you may want to take a look at Metastorage. Among 
other things it generates graphs in UML that represent a diagram of 
classes that are mapped to database tables.

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html

Metastorage generates the graphs that can be rendered in many common 
image formats using AT&T GraphViz package. GraphViz takes a description 
of the nodes and the edges of the graphs and renders them in target 
image format.

In the pages above there are some links to the relevant GraphViz pages.


--

Regards,
Manuel Lemos


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



[PHP] Re: mail attachments

2003-01-02 Thread Manuel Lemos
Hello,

On 01/02/2003 12:07 PM, Edward Peloke wrote:

I hope you all had a great New Year.  Is attaching a document to an e-mail
simply a matter of adding a new header in the mail function?


No, but if you try this class it becomes much easier than it is doing it 
manually:

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



[PHP] Re: Using mail() for mailist list app

2003-01-02 Thread Manuel Lemos
Hello,

On 01/01/2003 08:46 PM, Monty wrote:

Is the PHP mail() command robust enough to use in a little mailing list app?


Sure, it just calls sendmail, so it is just as robust as sendmail as 
long as you configure it properly.


The app will basically send an HTML or Text e-mail to the member database of
about 6,000 people. I'm using RedHat Linux 7.2 with PHP 4.2.2, by the way.
I'm concerned I'll bog down my server if I issue the mail() command 6,000
times on our server, but, maybe it won't be a problem?


Since you used RedHat Linux, the default mailer is sendmail so you need 
to configure the deliveries to just queue a single message without 
attempting to deliver them right away. You need to put all recipients in 
Bcc: to just need to queue a single message. It is very fast, think 
about just a few seconds. You probably take more than that extracting 
the addresses from the database.


Also, although I'm sending HTML e-mail, I'm not including attachments or
inline graphics (only direct hotlinks to graphics on a web server). Will
mail() still work okay for this, or do I need to use one of the various PHP
e-mail classes available to send HTML e-mail?


Yes, but HTML messages need to have an alternative text part or else 
spam filters may reject it. So it is always recommended that you build 
your system on existing components that have been throughly tested to 
compose messages adequately.

In that case you may want to try this class that lets you compose and 
send messages not only with alternative text and HTML parts but also 
embedded images for the HTML part if you want and attachments.

Since you need to use sendmail, there is also a sub-class to make 
deliveries using sendmail program directly so you can set delivery mode 
SENDMAIL_DELIVERY_DEFERRED to eliminate the queue time.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



Re: [PHP] accelerator and Apache 2

2003-01-02 Thread Manuel Ochoa

I recently installed the Zend Optimizer and noticed an improvement in preformance.
I'm running Windows .NET Enterprise Server 2003
PHP 4.3.0 as a module
Apache 2.0.43

Go to www.Zend.com


 Jochen Kaechelin <[EMAIL PROTECTED]> wrote:Is there a free php accelerator out there 
which runs under Apache 2?

-- 
Jochen Kaechelin 
[EMAIL PROTECTED]


[PHP] PHP complied code

2003-01-02 Thread Manuel Ochoa

I recently read a book on PHP and the author breifly said that if you compile the PHP 
code it would improve the performance.

Is there a way to compile the code? 



[PHP] Re: Timeout during SMTP operation.

2003-01-02 Thread Manuel Lemos
Hello,

On 01/02/2003 06:02 PM, Gilrain wrote:

I've just finished a PHP/MySQL mailing list. Basically, I'm having problems
with my sendmail function. It takes an array of e-mail addresses
($addresses) and loops through it, e-mailing each one using an SMTP class I
found (the only identifying comment in it is "SMTP Class By TOMO
(2001/09/14)"). The problem is, it's very slow. The typical array of
addresses sent to this is 100 to 500 elements large. The actual mailing list
has over 7000 members, but the e-mails are sent out to a geographical
region. Ideally, though, this function should be able to handle mailing to
the entire member base.

Here's the offending function (with private stuff altered). Currently, it
will only send to about 50 of the addresses before Internet Explorer times
out and cuts it off (perhaps five minutes or so). Note that this is without
catches, so it skips to the 'else'.

If I comment out the sending part, as shown, the operation takes a split
second and the log is written correctly, so I know the problem lies in the
sending of the mail. The only solution I can think of is to make the user
send things in chunks of 50 or so addresses, but I'd like to avoid this
inconvenience if I can. Any ideas?


Using SMTP to deliver messages is a bad idea unless you do not have an 
option, like you are under Windows. Under Unix/Linux it is better inject 
the messages in the local mailer queue and have it to do the bulk delivery.

In that case you may want to try this class that comes with sub-classes 
that let you configure details of delivery depending on your local mailer.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



[PHP] Re: 2 servers for mail implementation

2003-01-02 Thread Manuel Lemos
Hello,

On 01/03/2003 01:11 AM, Roger Thomas wrote:

dear all,
i have 2 servers that were *given* to me to setup and implement webmail
solution for our client. i have done some groundwork in terms of the backend
applications that are needed to do this.

what i wanted to know is, how best can i distribute the backend applications
between those 2 servers to achieve a balance and fast response. can i go like
this:

server A

ldap
courier-imap

server B

apache
php
qmail


No I suggest that you use just one server the Web and receiving e-mail 
and the other server for delivering e-mail. In the Web server configure 
qmail smtproutes control variable pointing to the other server that will 
only allow relaying messages from the Web server.


--

Regards,
Manuel Lemos


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



[PHP] Re: Mass-mailing method

2003-01-02 Thread Manuel Lemos
Hello,

On 01/03/2003 04:08 AM, Cesar Aracena wrote:

I did a registration page for a customer, and now I'm trying to develop
a way for him to send an e-mail once in a while to the people registered
with him. I did something (shown below) and everything seems to be ok,
but the e-mail never reaches... Can someone find the problem or maybe
point me to something already done to send multiple e-mails as BCC???


I think Bcc: addresses have to be separated with commas (,). If that is 
not the problem, you may want to try this class that has built-in some 
workarounds that solve non-obvious quirks of using the mail() function. 
I use it to deliver in average 2 million message a month most of them 
with tens of thousands of recipients in Bcc:.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: How to attach a file to mail()

2003-01-03 Thread Manuel Lemos
Hello,

On 01/03/2003 11:40 AM, Föíö Öxî‰êójînyóon wrote:

mail($to, $subject, $body, "From: $email");
 
how do I insert an attachment into this mail function, It would be
submitted with file field and would be called attachment.

You may want to try this class. All you need to do is to pass the file 
name of the uploaded file to add as an attachment:

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



Re: FW: [PHP] How to get the mail sending stuff to work on Win2k?

2003-01-05 Thread Manuel Lemos
Hello,

On 01/05/2003 10:37 PM, Rad Craig wrote:

I run ArgoSoft's mail server which has worked great.  I use SMTP
authentication, could that be the problem?

Is there a way to setup the info for SMTP authentication in PHP so it can
pass it to the mail server during it's sendmail type functions?


No, PHP mail() function does not support authentication. You may want to 
try this class that comes with a wrapper function named smtp_mail() that 
 emulates the mail() function by sending the message via SMTP. It les 
you configure the authentication credentials among other things that the 
mail() function does not support:

http://www.phpclasses.org/mimemessage

To send via SMTP you also need this:

http://www.phpclasses.org/smtpclass


--

Regards,
Manuel Lemos


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



[PHP] Re: Strange problem with MAIL

2003-01-06 Thread Manuel Lemos
Hello,

On 01/06/2003 08:22 AM, Cesar Aracena wrote:

I've been trying to make my way around a complex mailing system for the
past couple of days with no success, but now I noticed that I can't just
send a simple:

mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3");

I used to make this scripts work all the time before using the same
hosting but something changed now... is there a way to see what's going
on using phpinfo.php or other way???


mail() is a problematic function that often fails without a clue. 
Sometimes it is a problem in PHP configuration, some times it is a 
problem in the actual mail implementation and other times it is a mail 
server problem.

I think what is more important to start having an idea is for you to 
tell if you are hosted under Unix/Linux or Windows.




--

Regards,
Manuel Lemos


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



[PHP] Re: Strange problem with MAIL (Correction)

2003-01-06 Thread Manuel Lemos
Hello,

On 01/06/2003 08:33 AM, Cesar Aracena wrote:

I just checked my hotmail account (one of three I'm sending to) and all
the emails arrived correctly (sorry for the re-post) but it's not
reaching the other two. One of them, I know it has a very poor
configuration and can hardly receive e-mails from PHP scripts, but the
other one usually works correct (the one I have with the hosting)... Can
anyone tell me what are the headers sent usually so mostly everyone can
receive the mails?


Sometimes the problem is in the type of hosting platform that you are 
using but you did not tell if it is Windows or Unix/Linux.

Anyway, I do not use or recommend mail() function directly at all. I use 
this class to compose and send messages. It has already some built-in 
workaround to many flaws of the mail() function depending on your 
platform. I do not know if your problem is just headers but this class 
puts all the headers that should be there. It also provides mail() 
function replacement functions that use different delivery methods which 
often is a problem depending on your platform.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



[PHP] Re: Dreaded Return-Path and mail()

2003-01-06 Thread Manuel Lemos
Hello,

On 01/06/2003 09:37 AM, Monty wrote:

Is there anything else I can try? I want to avoid changing this in the
PHP.ini file because I don't want e-mail from all domains to look like it is
coming from a single domain, if possible.


I think you are doing something wrong because that works well as long as 
you use PHP 4.0.6 or higher.

You may want to try this class and just define the Return-Path header 
like any other message header. The class will make sure it will work for 
your setup or else it will return an useful error message.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: mail() not working on Win2k

2003-01-06 Thread Manuel Lemos
Hello,

On 01/06/2003 01:21 PM, Rad Craig wrote:

I'm running under Win2k, new install of PHP(last week), I have been trying
to test the mail() function, but it doesn't seem to work.  I host my own
mail server on the same machine and I know it works, has been for months,
all other mail come/goes just fine.  I don't have the default SMTP server
for IIS installed since I have my own SMTP/POP3 mail server on this same
server.

I have tried it with the following:
mail("[EMAIL PROTECTED]", "test message", "this is a test");

I have SMTP authentication turned off on my mail server for this testing.

It never arrives, I never get an error.

I can telnet to port 25, all works fine.

phpinfo.php reports that everything looks good, only thing i saw was that
the extension directory shows c:\php4 instead of c:\php.

I don't have any extra .dll's or anything turned on since it has built-in
support for MySQL.


Have you tried this alternative as I suggested in this other message to 
you? Many people solved their problem with it, so can you.

http://news.php.net/article.php?group=php.general&article=130351


--

Regards,
Manuel Lemos


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



Re: [PHP] Re: mail() not working on Win2k

2003-01-06 Thread Manuel Lemos
Hello,

On 01/06/2003 08:46 PM, Rad Craig wrote:

I can't use that as the program that I need for the email to work with, I
don't have access to it's mail() function...yet.


As I explained, the class comes with a wrapper function named 
smtp_mail() that emulates mail() function (but without the bugs). All 
you need to do is to replace mail() calls by smtp_mail() calls including 
smtp_mail.php where needed.

Even if you do not want to replace anything, you can still try the class 
test scripts to see if it works for you. If it doesn't, it will provide 
helpful error messages unlike the mail() function. Now it is up to you 
if you want to progress in solving your problem.

Regards,
Manuel Lemos


-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 4:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: mail() not working on Win2k


Hello,

On 01/06/2003 01:21 PM, Rad Craig wrote:


I'm running under Win2k, new install of PHP(last week), I have


been trying


to test the mail() function, but it doesn't seem to work.  I host my own
mail server on the same machine and I know it works, has been


for months,


all other mail come/goes just fine.  I don't have the default


SMTP server


for IIS installed since I have my own SMTP/POP3 mail server on this same
server.

I have tried it with the following:
mail("[EMAIL PROTECTED]", "test message", "this is a test");

I have SMTP authentication turned off on my mail server for


this testing.


It never arrives, I never get an error.

I can telnet to port 25, all works fine.

phpinfo.php reports that everything looks good, only thing i


saw was that


the extension directory shows c:\php4 instead of c:\php.

I don't have any extra .dll's or anything turned on since it


has built-in


support for MySQL.


Have you tried this alternative as I suggested in this other message to
you? Many people solved their problem with it, so can you.

http://news.php.net/article.php?group=php.general&article=130351



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




[PHP] Re: test_smtp.php

2003-01-07 Thread Manuel Lemos
Hello,

On 01/07/2003 08:37 PM, Rad Craig wrote:

I'm trying to implement this smtp_email stuff.  I'm running Win2k, ArgoSoft
Mail Server Pro, PHP 4.3.0, MySQL, etc.  I downloaded everything on these
pages:

DNS Resolver: http://www.phpclasses.org/browse.html/file/1910.html


You won't need this unless you are doing direct delivery which is not 
your case because you want to relay the messages in your local server.


MIME: http://www.phpclasses.org/browse.html/package/9.html
SMTP: http://www.phpclasses.org/browse.html/package/14

I'm sorry, but I'm a newb, so I have no idea what I'm doing with PHP.  I
created a \includes directory under my main PHP directory and my include
path in the .ini file points there.  I copied all of these files there
except for the test_*.* files.

I host my own mail server on the same machine.

I then loaded up the file test_smtp.php in an editor and started filling in
some blanks, like:

$to - changed this to my email address
$smtp->user - changed this to my email username
$smtp->realm - changed this to my domain name
$smtp->password - changed this to my email password

I left everything else alone except changing $smtp->debug=1 after it didn't
work the first time.  My mail server requires authentication.  I didn't
receive any email, nor any output in the browser when I run that test page.
Looks like it should give me SOME sort of feedback whether it succeeds or
fails at the bottom, apparently it's never getting that far.


To let you see anything, it is better to try this script from the 
command line (DOS prompt) using the PHP standalone executable (CGI/CLI) 
that is in your PHP installation directory named php.exe

Then just do php.exe -q test_smtp.php

Anyway, it is better to solve your problem to try the test_smtp_mail.php 
script instead.

--

Regards,
Manuel Lemos


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



[PHP] Re: Need a suggestion on developing a php-related system

2003-01-07 Thread Manuel Lemos
Hello,

On 01/08/2003 03:40 AM, Kelvin Poon wrote:

HI, I am new to PHP and I am just wondering if anyone could give me some 
help.

I am currently working for infomart.ca, it is basically a company that 
sells articles (news/business).  MY employer require me to develop a 
system using Perl and PHP, and the assignment is as follow:

To develop a system that collects, stores, processes and disseminates 
internally the updating status of our databases.

We currently have over 200 databases from various daily newspapers, 
magazines, TV transcripts and other periodicals.  Most of them are 
updated every weekday between 4a.m. and 7a.m..  Others are updated on a 
weekly or monthly basis.  THe update schedule Tv. the actual status need 
to be captured and made available to internal staff.  This is similar to 
the flight departure/arrival information in an airport.

This is vague. What do you mean exactly by captured and made available 
to internal staff? Do you mean aggregate from somewhere to a central place?

Anyway, news feed compilation and aggregation leads to XML-RDF-RSS.

--

Regards,
Manuel Lemos


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



[PHP] Re: Medium to Large PHP Application Design

2003-01-10 Thread Manuel Lemos
Hello,

On 01/10/2003 01:51 AM, Nick Oostveen wrote:

As PHP becomes more accepted in the corporate world, it is only logical 
that larger and more complex applications are going to be developed 
using it.  While there is an abundance of information out there about 
making specific things work, there seems to be a shortage regarding the 
big picture.

As such, my question is this: What methods and techniques can be used to 
help design and build complex, medium to large PHP applications that are 
not only scalable, but maintainable and extensible?  I'm looking for 
online references, personal experience and opinion and even examples of 
open source code which you think demonstrate the above criteria on this 
one.  I think an extended discussion on this topic could be of great 
benefit to everyone.

Obviously separating application and business logic from interface code 
is a given, but what about other things? Are the object orientated 
facilities of PHP currently worth really trying to take advantage of? If 
so, what are you doing to take advantage of them? Are design concepts 
such as design patterns relevant at this level?  What frameworks, if 
any, currently exist to assist in rapid, structured development, and 
what specific benefits do they bring to the table?

Your concerns are the same that I had several months ago. PHP is indeed 
fine for small applications but when it comes to large applications you 
end up coding by hand many repetitive tasks that could be abstracted by 
tools that generate the code for from conceptual definitions to save a 
lot of development time.

One of the most frequent tasks that becomes one of the most development 
time consuming is interfacing with databases  to store and retrieve 
application data.

I did some research to find what kind of tools exist to automate tasks 
like database interfacing making it flexible enough to adjust to the 
application needs and generate efficient code. I realized that there are 
plenty of components for handling what I need that are usually named 
persistence layers.

One of the problems that those components has is that most of them are 
not for PHP. Another problem is that many of them tend to be too generic 
and a try to do most of the things at run time.

So, I decided to develop a persistence layer generator application. It 
would generate PHP (although mine can also generate Java and Perl) and 
it would not generate code that applications may not need to avoid 
generating bloatware made of code that most of the time is not needed. I 
also would like to never need to deal SQL in any place.

Last month I finally released Metastorage after over 3 months of 
development. It is a persistence layer generator application that takes 
a XML based description of components made of classes . You just 
describe the classes variables, relationships between classes, 
validation rules and the declaration functions that you want to use to 
store and retrieve the classes objects from persistence storage that is 
currently a SQL based database.

From then on, Metastorage generate everything for you, including all 
the code for all the classes and even schemas definitions and classes 
for installing the database tables that are needed. The generated code 
is database independent.

As a bonus, it also generates entity relationship like class diagrams in 
UML that you can render in many image formats. This is usually very good 
to document projects in such a professional way that impresses customers 
and bosses.

The good part is that it reduces to minutes or hours, the work that 
usually would take weeks or months to develop with hand written code.

Metastorage is Open Source is available here:

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html






--

Regards,
Manuel Lemos


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



[PHP] Re: Favorite Email validation routine?

2003-01-12 Thread Manuel Lemos
Hello,

On 01/13/2003 03:21 AM, Peter Janett wrote:

I'm looking for everyone's favorite email syntax validation routine.  Code
that takes an email address and does regex on it to determine if it's
formatted correctly.

I know there are some on phpclasses.org that actually check the mx record
and server of the domain, but I'm just looking for a good, clean and fast
email address syntax check.

So, what is your favorite bit of code to do that?


This class that I don't know if you seen also comes with complex regex 
for simple e-mail address validation:

http://www.phpclasses.org/emailvalidation

--

Regards,
Manuel Lemos


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



[PHP] Re: attach image with the mail command?

2003-01-14 Thread Manuel Lemos
Hello,

On 01/14/2003 11:09 PM, Harald Mohring wrote:

how can i attach an image with the mail command
how do get the image in a variable when i have chosen it with the input type
file?


Do you mean attaching an image as a separate file or embed it in the 
message so it displays in HTML message?

Either way, you may want to try this class:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: MIME email...

2003-01-16 Thread Manuel Lemos
Hello,

On 01/16/2003 11:37 AM, Brian McGarvie wrote:

Now... the problem I have is some people are reporting they get the
Multi-part stuff as the body... for others it'll work as wanted... i.e.
display Plaintext or render the HTML as wanted.

Anyone had this problem?


It looks like one of those bugs of mail() function that affect mail 
systems differently.

You may want to try this class that has workarounds for some of the 
mail() function bugs. It also makes it simple to compose 
multipart/alternative messages:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: PHP Review Site

2003-01-18 Thread Manuel Lemos
Hello,

On 01/17/2003 11:40 PM, Stephen wrote:

I was just wondering if there were any PHP review sites that review free 
and paid scripts? If so, where?

If your script is in the form of a PHP class of objects, you may want to 
try uploading it to the PHP Classes site. You will not get explict 
reviews, bu your work is exposed to tens of thousands of PHP users eager 
to learn about new classes.

http://www.phpclasses.org/


--

Regards,
Manuel Lemos


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



[PHP] Re: Help with e-mail

2003-01-22 Thread Manuel Lemos
Hello,

On 01/21/2003 10:13 AM, Dankshit wrote:

Is there a way to autenticate an SMTP server in my PHP.ini???


No.



In my development site, i need to autenticate a SMTP, but in the
PHP.INI does not have an option to autenticate..does anybody has any
solution for this??


You may want to try this composing and sending class that has a 
sub-class for sending via SMTP with authentication suppport.

http://www.phpclasses.org/mimemessage

If you do not want to change much your program, it comes with a wrapper 
function named smtp_mail() that you can use in replacement of mail() 
calls as smtp_mail() emulates mail() completely with the advantage of 
features like authentication that mail() does not support.

In that case you also need this other class for the actual SMTP delivery:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos


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



[PHP] Re: writing a newsletter program in php?

2003-01-22 Thread Manuel Lemos
Hello,

On 01/22/2003 08:15 PM, Mark C wrote:

I'm new to php (ok new, try 3 days ;), althought, I'm finding it fun, I 
'm trying to think of a project to do, to get me more into it.

And after having a discussion with a friend and also setting up several 
Mailman mailing lists for people that want to compose HTML mails and 
post them as newsletters, it got me thinking, would I be able to create 
a similar program to mailman in php?

So admins just login to the list. copy and past the html into a text box 
and php then renders it for a preview, then if they like it, they click 
send, this send queries the database and sends it to all the people list 
to receive mail on that list.

I would assume that the sending could be handed off somehow to 
sendmail/postfix?

Yes, but you are recommend to set sendmail with the appropriate queuing 
flags so it does not stall your PHP script while attempting to deliver 
to every subscribers and instead just queue the messages without delay.

In that case you may want to try this class for composing and sending 
messages, that has a sub-class for sending using sendmail program 
directly. It already comes with options that let you tell to just queue 
the messages without delay as needed.

http://www.phpclasses.org/mimemessage


The list front end would also hold list preferances as well, for 
subscribers and admins,
basically I want to mimik Mailman, but in php and be able to render 
previews of mails first, basically it will be a newsletter program, 
rather than a mailing list one, which is where Mailman falls over.

Yes, but keep in mind that besides composing and sending messages, you 
also have to take care of creating subscriber records, validating 
subscriber addresses, handling bounces, handling unsubscriptions, etc... 
and dedicating mailing list manager programs already do that.


--

Regards,
Manuel Lemos


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



[PHP] Re: SMTP, mail() and piping directly into Sendmail, which is better?

2003-01-22 Thread Manuel Lemos
Hello,

On 01/23/2003 01:48 AM, Jonathan Chum wrote:

Then with PHP's mail(), folks have been saying that because it opens/closes
a connection, looping through mail() adds additional overhead and that the
best way would be to pipe into the MTA with popen()/pclose()


People that say that are either Windows users or have no idea how mail 
works. Only on Windows the mail() function relays messages to a SMTP 
server. Under Unix/Linux mail just calls the sendmail program piping the 
  message data to the standard input like with popen and pclose.



Now I'm curious which method is really better...Piping into the MTA will
still open/close the connection and adds the same amount of overhead as
mail() do right? What are your thoughts on SMTP?


Forget relaying on a SMTP server even when it is the local server. 
Relaying via SMTP just does the same thing as piping data to sendmail 
except that it takes a longer trip by establishing a TCP connection to 
the SMTP server.

To make relaying faster, it is better to call sendmail directly passing 
the necessary switches to make it just accept the message without any 
delay so it will free your PHP script. Delivery will happen next time it 
will run the queue.


--

Regards,
Manuel Lemos


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



[PHP] Re: OO2relation mapping

2003-01-25 Thread Manuel Lemos
Hello,

On 01/25/2003 01:40 PM, Dominik Wittenbeck wrote:

I am currently developing a object to relational mapping layer for PHP. It's
NOT a simple treat all databases like one kind of layer (although it does
involve it to preserve extensibility) but an XML based intermediate layer
that creates both, table structures, following a conventional scheme and PHP
classes that allow, OO access to these tables.
I have enclosed the XML file that represents the intermediate layer. Its
pretty readable even without the XML schema.
I am currently under development, so don't expect anything useful in less
than a few weeks

Question:
Does anyone of you know anyone who has tried something similar, because my
research on the subject grows thin? Is something like this of public
interest at all, or would you prefer accessing your datastructure the old
fashion way?


You have pretty much describe Metastorage. It is basically a generator 
application that lets you model classes of objects that are mapped and 
stored in relational database database.

You just need to to describe your classes also in a XML file with the 
class variables, validation rules, relationships between classes and the 
types of functions that your application needs to manipulate the classes 
objects.

Metastorage generates all the code for the classes ready to use in your 
applications. That includes also a separate class with code to install 
the database schema. The resulting classes API is database independent. 
This means that you do not need to change your application to use the 
same classes with different types databases. Many types of databases are 
supported. Still, you do not need to write absolutely any SQL in 
anywhere. Metastorage generates adequate code for you where needed.

I do not mean to discourage from continuing your work, but since there 
is a great deal of overlap between Metastorage and what you have in 
mind, you are most welcomed at least to eveluate Metastorage if not also 
contribute in anyway to its development.

Metastorage is Open Source and is avaliable here:

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html


--

Regards,
Manuel Lemos


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



[PHP] Re: OO2relation mapping

2003-01-26 Thread Manuel Lemos
Hello,

On 01/26/2003 02:59 AM, Dominik Wittenbeck wrote:

Sounds most interesting (and far more ambicious, than what I had in mind).
I'll probably do you wrong by not grasping the full extend of the project,
but in short, did I get it right:

XML2UML2ProgrammingLanguage


Don't be mislead by this page. Generation of UML class diagrams is just 
a bonus feature. It is not even a core feature. It is just helpful to 
explain and document your project class relationships.

The main goal is to generate code in a few seconds that otherwise would 
take you days or weeks to write, test and debug manually.

http://www.meta-language.net/news-2002-12-09-metastorage.html



--

Regards,
Manuel Lemos


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




[PHP] Re: OO2relation mapping

2003-01-26 Thread Manuel Lemos
Hello,

On 01/26/2003 03:20 AM, Dominik Wittenbeck wrote:

I am targeting a more slim solution though, solving a very specialized
problem. As a developer I simply hate needing to change a database table,
splitting it up, to make it fit the customers needs. I causes all those SQL
statement to be revised.

With the oo2rel mapping layer I have put much thought into the possibility
that a project's datastructure actually might need a change when it is live
and filled with data. I cannot simply change the structure, recompile my
classes and submit them. I somehow need to preserve integrity within the
data model as well. I know I cannot come up with a comprehensive tutorial,
not even working examples, but this is the background in front of which I
need to operate and somehow I feel I am not the only one


That is a feature provided by Metabase schema management. Currently, 
Metastorage generates code that use Metabase database API. Metabase lets 
you define database schemas using a simple XML format that is database 
independent. Metabase takes care of the installation of such schema.

If you change the XML schema definition, Metabase will apply the changes 
 without affecting the data that was added to the database after it was 
installed for the first time or updated for the last time. If you are 
providing such feature in your project, basically you are replicating 
that capability that Metabase provides for about 4 years now when it was 
started being developed.


I am going to keep basic SQL statements, since that's the way developers,
not having a degree think in those relational SQL structures as they
understand them more easily. Why take something away from them they know.
SQL will just be adapted to OO-state in a manner that is readable and
understandable at first glance.


There are plenty of reasons to prevent developers to use SQL by hand. 
First because Metastorage has all the information it needs to retrieve 
the objects from the database using appropriate SQL code that is 
statically embedded in the generated classes.

If you are going to let the developer specify SQL by hand, your code is 
more likely to be buggy because your application will not verify if the 
developer specified SQL code is appropriate and correct.

Also, if it is the developer that enters the SQL code, you prevent the 
possibility to perform context specific optimizitions that the code 
generator could perform statically.

Anyway, the most important point is that if the developer still has to 
supply the SQL code, you are not taking much of his work and so the 
developments will still take a long time, the main reason why so many IT 
projects fail.

The solution of Metastorage is to let the developer control everything 
from high level. If you need to specify details that usually would 
require SQL, like specifying filtering conditions, Metastorage provides 
an high level syntax for specifying such conditions in the classes XML 
definition. That lets Metastorage verify the validity of the conditions 
and generate optimized code.


As I said: not as comprehensive and complete as your project, but I think
its targeting a more specific solution, that occurs often enough in everyday


I am not sure what you mean about targeting a more specific solution .



life to need support. You didn't discourage me at all, but rather give me an
idea, where thing might be going for me in the future. Tnx! I will have a
look into MetaL, that's for sure, but I will also continue with the OO2REL
project ;-)


No, problem. I just thought you would like to know about the overlap of 
the projects, so you just don't duplicate efforts re-inventing the 
wheel. If your project provides something better of something that 
Metastorage does not provide, I would most certainly would like to know.


--

Regards,
Manuel Lemos


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



[PHP] Re: Masive mail Advice

2003-01-26 Thread Manuel Lemos
Hello,

On 01/26/2003 02:17 AM, Maciek Ruckgaber Bielecki wrote:

I'll start to write an application which will be used to send large
amounts of mail to users in a DB. All these mails to be sent shoul be
personalized. Since i understand, and please correct me if im wrong, the
mail() function is not a good option for this purpose. (the amount of mail
to be sent may vary from 50 to 800 messages). I have considered using some
masive mail application such majordomo or EZMLM. EZMLM is not easily
configurable for sending personalized mail, and majordomo requires
sendmail, (i would prefer to use qmail), i know about patches to be done
so it works with qmail, but i dont consider them really clean.

What would you guys suggest ?? should i jump into majordomo - sendmail,
or do you know something else that might be a better solution.


That number of messages is small and with today's servers you can queue 
that volume of personalized is less than a minute. Your problems will 
start as you enter in the tens of thousands of recipients, not because 
qmail won't handle it but because that many message in the queue will 
prevent the incoming messages to arrive in time.

Anyway, for that volume of messages you may want to try this class that 
comes with an example of how to send personalized messages to many 
users. For larger volumes of recipients you can still use the same class 
but it will take much more time, so to not choke the mail queue, you 
would better send the messages during a few minutes and then rest for 
about 3 times the same period before you resume sending for a few 
minutes more.

For greater efficiency, if possible do not personalize the message body 
so you can hint the class to cache it so it does not waste time 
regenerating the message body for each recipient.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: Mass Mailing

2003-01-26 Thread Manuel Lemos
corporate this into the
application.

BTW, isn't there any overhead associating with opening/closing a connection
to inject each email into Qmail? Or it's very minimal overhead to even worry
about? If 100,000 was looped and injected into Qmail, is Qmail fast enough
that 100,000 emails are not just sitting on the server filling up disk
space?


Queueing is fast because you are just calling a local program. Unless 
you are using a spare server for relay, the greatest problem are those 
addresses that while they are not invalid nor reject messages, they are 
hard to deliver like those on servers with slow links or those that 
intentionally put delays that take many tens of seconds to accept the 
message to make it harder for spammers.


--

Regards,
Manuel Lemos


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



Re: [PHP] Re: Masive mail Advice

2003-01-26 Thread Manuel Lemos
Hello,

On 01/26/2003 08:22 PM, Mark Charette wrote:

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
That number of messages is small and with today's servers you can queue
that volume of personalized is less than a minute. Your problems will
start as you enter in the tens of thousands of recipients, not because
qmail won't handle it but because that many message in the queue will
prevent the incoming messages to arrive in time.



???

There are two separate processes here - the outgoing connections to the
remote SMTP servers and the incoming connections to your own SMTP servers.
Tuning qmail involves setting the number of outgoing queues so as not to
overload your communications line.

I _personally_ have sent more than 300,000 messages with no "resting"
mechanism - doing that means you haven't tuned your qmail system for the
load.


The problem does not have to do with SMTP but with qmail local queue 
handling. If you send messages to many users and the bounce address is 
set to some address handled by the same server, you will be starting to 
get bounces to the same machine and thus the same qmail server. The way 
to solve this is to put the bounce address point to some address that is 
handled by a different server or even to nowhere. Using a spare server 
for the actual delivery reduces that problem too.


--

Regards,
Manuel Lemos


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



Re: [PHP] Re: Masive mail Advice

2003-01-26 Thread Manuel Lemos
On 01/26/2003 09:25 PM, Mark Charette wrote:

That number of messages is small and with today's servers you can queue
that volume of personalized is less than a minute. Your problems will
start as you enter in the tens of thousands of recipients, not because
qmail won't handle it but because that many message in the queue will
prevent the incoming messages to arrive in time.


???

There are two separate processes here - the outgoing connections to the
remote SMTP servers and the incoming connections to your own


SMTP servers.


Tuning qmail involves setting the number of outgoing queues so as not to
overload your communications line.

I _personally_ have sent more than 300,000 messages with no "resting"
mechanism - doing that means you haven't tuned your qmail system for the
load.


The problem does not have to do with SMTP but with qmail local queue
handling. If you send messages to many users and the bounce address is
set to some address handled by the same server, you will be starting to
get bounces to the same machine and thus the same qmail server. The way
to solve this is to put the bounce address point to some address that is
handled by a different server or even to nowhere. Using a spare server
for the actual delivery reduces that problem too.



It has everything to do with qmail local queue handling.

I have had no problems when both the VERP address and sending machine are
the same, providing I tune the qmail queues to a reasonable number. VERP is
very useful to handle bounces, no separate machines are required, you just
have to think about your bandwidth.

The way to solve this is use your intelligence. A stop/start sceme as you
originally proposed is a kludge at best to an easily managable problem.


I don't think you are getting the point of stop/start. If you flood the 
delivery queue with 300,000, no more incoming and outgoing mail will be 
handled until all the delivery to all recipients that you queued are 
handled. That may take hours depending on how hard is to deliver to all 
recipients.

If you have a dedicated server for the bulk delivery, that may not be a 
problem for, but if you have other types of messages coming and going of 
the same server, everything will be stalled.

BTW, if you are personalizing the messages, there is no need to user 
VERP because you are already sending the messages separately and so you 
may as well personalize the return path address.

--

Regards,
Manuel Lemos


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



[PHP] Re: multiple entry forms !!

2003-01-27 Thread Manuel Lemos
On 01/27/2003 09:20 PM, Scott wrote:

hi

looking for some advice

I have a site in progress. user to it have to enter a LOT of information (it
will contain a club directory)

in order to try and make it a less unpleasant experience for the user, I
want to give them 7 smaller input forms, each one following the other

what would be the correct way to do this, one very large, complex coded php
conditional form that does everything, or several smaller ones ?

if I use one form, it will conatin rather a lot of code, but execution would
all be handled by the form itself

but if I use multiple smaller forms, each form would need to process the
previous forms input, and then display it's inputs for entry

I am also using sessions, which adds a little to complexity

any general good coding practice tips/links would be helpful


If you mean a form split in multiple pages, you may want to try this 
class because it provides exactly that, either in sequential (Wizard) 
mode with |Next >|, |< Back|, |Finish >>| buttons, or in random access 
(tabbed pages) mode where you can go from any form page to any other 
with Edit, Update, Cancel buttons:

http://www.phpclasses.org/multipageforms


--

Regards,
Manuel Lemos


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



[PHP] Advice on uploaded files

2003-01-28 Thread Manuel Ochoa

I writting a php program for a small insurance company and they want to receive 
uploaded digital photos.

Should I store the photos in a mysql database or in a directory on the hard drive?

If you have experience with this any advice would be appreciated.



[PHP] Re: Best PHP db wrapper?

2003-01-30 Thread Manuel Lemos
Hello,

On 01/30/2003 02:48 AM, John Wells wrote:

Trying to decide between wrappers for a rather large application, and
wanted some input from the group as I haven't used any of these to any
degree.  So far, I've found PearDB, metabase, adodb, and MDB.

What's the best option?  My main concerns are speed and good community
support.


If you are concerned about speed, I think you should not bother to use a 
database wrapper because all of them add overhead due to the flexibility 
they provide. The more is the flexibility, the more overhead may be added.

If on the other hand you are looking for database application 
portability so you do not have to rewrite your application if you switch 
databases, maintainability and thus development speed, you may want to 
try Metabase or MDB which is a Metabase version with PEAR-DB like API.

Metabase lets you write truely portable database application. Other 
provide some level of portability but not up to the level that Metabase 
provide.

One unique feature of Metabase is that it provide very easy and portable 
database schema management. This means that in practice you can easily 
describe your database schema with tables, fields, indexes and sequences 
in a very XML based format and Metabase installs the schema for you.

Later, if you want to change your schema by adding/removing/altering any 
of the schema objects, you can simply alter the schema definition and 
Metabase will apply the changes without affecting any data inserted 
after the database schema was installed for the first time or updated 
for the last time.

Furthermore, if you are looking for very fast database application 
development support, you may also want to look into Metastorage. This is 
 a database API generator application that lets you model your database 
applications in the form of classes of objects that basically wrap 
around your database tables providing functions that you specify that 
your application need to manipulate the table rows as objects of such 
classes.

All you need to do is to specify in a very simple XML format, the 
classes with the variables you need, validation rules, relationships 
between classes and the functions of the operations your application 
needs, and Metastorage generates all the code of the classes for you, 
including the code to install and maintain the database schema.

For now, Metastorage generates code based on Metabase but in the future 
it will generate compatible code that just uses calls to the native 
database PHP API functions, thus achieving maximum speed as you need 
while also assuring true portability.

Either Metabase and Metastorage are integrated in the same project 
repository that you may learn all about it here:

http://www.meta-language.net/

--

Regards,
Manuel Lemos


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



[PHP] Re: XML PHP question

2003-01-30 Thread Manuel Lemos
Hello,

On 01/30/2003 01:17 PM, Hardik Doshi wrote:

Can you please tell me what is the best way of working with XML technology using PHP? I am not clear about integration of these two technologies. 

Suggest some books or links or good tutorials. 

Either of these books reviewed here are very good and recommended:

http://en.static.phpclasses.org/products.html/id/1861007213.html

http://en.static.phpclasses.org/products.html/id/0735712271.html

--

Regards,
Manuel Lemos


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




[PHP] Re: mailing with SMTP server requiring authentication

2003-02-02 Thread Manuel Lemos
Hello,

On 02/02/2003 02:32 PM, Johan köhne wrote:

Is it possible and if so, how to send emails through SMTP servers that require authentication (logging in)?


Not via mail(). You may want to try this class for composing and sending 
messages that comes with a wrapper function named smtp_mail() that 
emulates the mail() function except that it send the message through a 
SMTP server of your choice letting you specify the authentication 
credentials as you need:

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos


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



[PHP] Re: relayed mail question

2003-02-03 Thread Manuel Lemos
Hello,

On 02/03/2003 07:57 AM, Wmb wrote:

<[EMAIL PROTECTED]>: Name service error for MAIL.rtinsmetsers.com: Host not
found


Because there is no DNS record for the domain MAIL.rtinsmetsers.com .

--

Regards,
Manuel Lemos


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




[PHP] Re: PHP Application Server

2003-02-05 Thread Manuel Lemos
Hello,

On 02/05/2003 09:04 PM, Edgar Castanedo wrote:

believe PHP outshines them all. I am interested in heading an
opensource PHP project. Basically it is the development of a PHP
application server. Currently, there is nothing out there like this
for PHP which I believe is widely supported or known about. I would
like to kickstart the development of this product which will take PHP
to a different level.

My reasons for wanting to do this are many, one of which is the fact
that many other programming/scripting languages have an application
server which they run on. Apache can be set up to communicate with
them. PHP does not currently have this. Right now, there is only a
mod_php and basic cgi integration versions.

I have spoken with many people and I feel like this can take off. As
a matter of fact, I have documented many of my ideas and would like
to share them with all of you.


Yes, people really lacks of application server "mode" where you can run 
persistent scripts outside of the Web server. There are some attempts to 
this but I was not impressed by any.

Things that an application server should do is to manage persistent 
resources to handle special application requests keeping the status of 
resources in memory to avoid repeated expensive data fetching from slow 
storage containers like databases. It should handle request serving 
distribution with balancing and failover, automated request scheduling.

I don't know what you have in mind, but I think it would be appropriate 
to develop a new SAPI driver that would make PHP run as standalone 
daemon accepting many custom protocol requests in parallel. All this is 
better said than done because it is not a trivial matter. In any case, 
good luck.

--

Regards,
Manuel Lemos


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



Re: [PHP] PHP Application Server

2003-02-05 Thread Manuel Lemos
Hello,

On 02/05/2003 09:44 PM, Edgar Castanedo wrote:

Thanks for your reply. I know that this is going to be a huge task,
but I am hoping that together with the nature of the Open Source
community, we can build an app server which is comparable, if not
better than one of the commercial app servers on the commercial
markets. I'd really like to hear anyone else's feedback. Thanks for
yours Manuel.

BTW... a standalone daemon is exactly what I have in mind. I am in
the process of creating the website for the project. I will have all
of the info there. I'll post the link when it is up.


Here are a few tips for a successful Open Source project:

- Do not do it just to earn recognition in the Open Source community or 
else you may be seriously disappointed. Do it because you really need 
it. Once it is useful to you, chances are that it will be already useful 
to others. So, focus on making it useful for you.

- Do not announce anything until you have it running doing something 
useful. Forget about wasting time on putting a Web site up now. You will 
just open expectations on something that you may end up realizing that 
it is not feasible or you do not have the time and motivation to go ahead.

- Do no expect the world to embrace your project just because it is Open 
Source. Most people do not really care if the source is open. What they 
care is that the project is free as in free beer and is useful to them. 
As for contributors, they will not appear any time soon and certainly 
not in quantity. It is natural that in the beginning you will get an 
average of 1 real contributor out of 1000 non-contributing users.

- Make it modular, not just because it is a good way to define the 
project architecture, but also because it make its viable and easier for 
other developers to extend your project without many dependencies on the 
core of the project.

Finally, as in every software project, nothing happens until somebody 
writes code, so do not get back here until you have something to show . :-)


--

Regards,
Manuel Lemos


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



[PHP] Re: possible mail() bug

2003-02-11 Thread Manuel Lemos
Hello,

On 02/11/2003 07:49 PM, Matt Phillips wrote:

I created a script that sent the contents of the form via the mail().  when
I created it the server was running PHP 4.1.2.  The server I am on was
upgraded to ver 4.2.2.  When that happend the script stop working correctly.
It appeared to work, but the email never arrived.  So, I wrote a simple
script that looked that this:



it would always show sent, but the message never arrived.

My orginal script used PEAR, but since PEAR uses the mail() I think that
this is problem.


Probably your server is not configured to send the message properly.

You may want to try this class that provides alternative means to send 
messages like using the sendmail program directly, qmail or SMTP instead 
of using the mail() function.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: I need examples of WRITING to XML wth PHP

2003-02-13 Thread Manuel Lemos
Hello,

On 02/13/2003 10:52 PM, Daevid Vincent wrote:

I see tons of examples of how to read in an xml schema and use the
variables and such, but how do I then change values and re-save the
schema again? Can someone point me at a simple but function form that
simply reads a .xml file, populates the form, and allows you to change
values in the form and then resave the .xml file again. This seems like
it should be so basic, yet I can't find anything... Thanks in advance.


If you want to compose and save an XML document, you may want to try 
this class:

http://www.phpclasses.org/xmlwriter


--

Regards,
Manuel Lemos


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



[PHP] Re: HTML Mail problem

2003-02-14 Thread Manuel Lemos
Hello,

On 02/14/2003 01:56 PM, Mark McCulligh wrote:

If I send a HTML email using either mail() or pear mail to an email account
of someone who is on my email server it does not get delivered right.  But
if I send a HTML email to an external email address it is fine. It also
works fine with plain text email, only if you send a HTML format email.

I have even setup pear mail not to use the mail function but link right to
qmail's bin folder.
I can also send HTML between users in HTML using Outlook fine, only if PHP
sends do I have problem.

I am using PHP 4.3.0 and qmail as my email server.

Has anyone any idea of were to start looking for why this is happening.
Again this only happen if it is a HTML format email and it is to an internal
user, thus my email server routes it without leaving the server.


Never send HTML only messages. It is possible that there maybe a spam 
filter in your server blocking HTML only messages.

In the worst case, always try to send a message with a plain text and a 
HTML alternative parts. You may want to try this class to learn how to 
do it right. This class also works around some bugs of mail() function. 
There is also a subclass for delivery with qmail-inject program:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: HTML Mail problem

2003-02-15 Thread Manuel Lemos
Hello,

On 02/15/2003 03:27 AM, Mark McCulligh wrote:

I am sending both text and HTML. The message I get looks like this:

boundary="=_ec9ac598a5bbb069fd9a696b254780ef"

--=_ec9ac598a5bbb069fd9a696b254780ef
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

TEST MESSAGE WAS HERE

--=_ec9ac598a5bbb069fd9a696b254780ef
Content-Type: multipart/related;
boundary="=_74b5fb5ddc651b2065ec31d700d8d15c"

--=_74b5fb5ddc651b2065ec31d700d8d15c
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable



???



etc

As you can see both are being displayed including some of the header info.
Any idea of how this happened.


As I mentioned HTML messages should have an alternative text part, so 
this seems ok.

I think that your problem is that your actually delivery method is doing 
something wrong. Have you tried the class I mentioned? It provides work 
around for some problematic situations.

Regards,
Manuel Lemos


Mark.

"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Hello,

On 02/14/2003 01:56 PM, Mark McCulligh wrote:


If I send a HTML email using either mail() or pear mail to an email


account


of someone who is on my email server it does not get delivered right.


But


if I send a HTML email to an external email address it is fine. It also
works fine with plain text email, only if you send a HTML format email.

I have even setup pear mail not to use the mail function but link right


to


qmail's bin folder.
I can also send HTML between users in HTML using Outlook fine, only if


PHP


sends do I have problem.

I am using PHP 4.3.0 and qmail as my email server.

Has anyone any idea of were to start looking for why this is happening.
Again this only happen if it is a HTML format email and it is to an


internal


user, thus my email server routes it without leaving the server.


Never send HTML only messages. It is possible that there maybe a spam
filter in your server blocking HTML only messages.

In the worst case, always try to send a message with a plain text and a
HTML alternative parts. You may want to try this class to learn how to
do it right. This class also works around some bugs of mail() function.
There is also a subclass for delivery with qmail-inject program:

http://www.phpclasses.org/mimemessage



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




[PHP] Re: forking sendmail

2003-02-15 Thread Manuel Lemos
Hello,

On 02/16/2003 12:15 AM, Brendon wrote:

I've been trying to fork sendmail because DNS checks cause it to be slow 
delivering messages...
Here's what i've tried, and many other variations...

$str = "to: [EMAIL PROTECTED]\nfrom: [EMAIL PROTECTED]\nsubject: test";
exec('sendmail -i -t $str >& /dev/null&');

Has anyone successfully acomplished something like this? ideas?

You are duplicating a function that sendmail already provides given the 
right switches. Anyway, if you want to raise the message delivery 
throughput, the best you can do is to use the deferred mode so it does 
not take a long time to queue the messages and then sendmail will take 
care of the delivery next time it runs the queue.

In that case you may want to look at this class for composing and 
sending messages that comes with sub-class to deliver with sendmail 
program directly. It comes with options to let you choose the 
appropriate sendmail delivery mode:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos


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



[PHP] Re: HTML Mail problem

2003-02-15 Thread Manuel Lemos
Hello,

On 02/15/2003 03:10 PM, Mark McCulligh wrote:

I downloaded your mail class and ran the test_html_mail_message.php page. It
worked!
Like you said I am probably getting one of the mail() function bugs or
something. Very interesting that I can send external fine but not internal.

Does the pear mail use the normal PHP mail() function to send? I thought I
read it somewhere.  If it does this is why when I used pear mail to send I
got the same error.


I have no idea because that is an odd situation. The best you can do is 
to analyse mail logs while you send the message.


Any ways your class works for I will use it.


That's great. This class has been used by so many users that over time 
several glitches have been ironed out. I use it to send about 2 million 
messages a month to many tens of thousands of site subscribers. If for 
some reason it does not work, I get immediate complains from several 
concerned users.


--

Regards,
Manuel Lemos


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



[PHP] Re: Duh uuh ?

2003-02-15 Thread Manuel Lemos
Hello,

On 02/16/2003 03:25 AM, John Taylor-Johnston wrote:

How do I call this?

http://www.phpclasses.org/browse.html/file/2202.html

calendar; //gives me nothing.

Prints html header and that's it. It's a class and obviously I don't know what I'm doing :)


Have you tried contacting the author? He's probably the person that can 
help you more than anybody else.

There are other calendar classes like this one that comes with examples:

http://www.phpclasses.org/calendargenerator

--

Regards,
Manuel Lemos


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



[PHP] Re: forking sendmail

2003-02-17 Thread Manuel Lemos
Hello,

On 02/17/2003 07:04 AM, Brendon wrote:

I've been trying to fork sendmail because DNS checks cause it to be 
slow delivering messages...
Here's what i've tried, and many other variations...

$str = "to: [EMAIL PROTECTED]\nfrom: [EMAIL PROTECTED]\nsubject: test";
exec('sendmail -i -t $str >& /dev/null&');

Has anyone successfully acomplished something like this? ideas?


You are duplicating a function that sendmail already provides given 
the right switches. Anyway, if you want to raise the message delivery 
throughput, the best you can do is to use the deferred mode so it does 
not take a long time to queue the messages and then sendmail will take 
care of the delivery next time it runs the queue.

In that case you may want to look at this class for composing and 
sending messages that comes with sub-class to deliver with sendmail 
program directly. It comes with options to let you choose the 
appropriate sendmail delivery mode:

http://www.phpclasses.org/mimemessage



Thanks for that. I'll look at it and see if I can modify it for my needs.

The problem isn't sendmail priority.  The system isn't doing anything 
and sendmail isn't doing anything.  The problem is that it takes 
sendmail awhile for it to respond.  No. sendmail isn't broke, it just 
has to do a lot of thinking before it talks to a client. I want to 
remove that problem from the equation by puting sendmail in the 
background once its called.

What I am telling you is that sendmail itself can act that way given 
that you pass the right command line switches when you invoke it.

The class above lets you tell sendmail to act that way but usually it is 
better to tell it to queue the message instead of trying to deliver it 
right away because if you attempt to deliver many messages at once you 
can exhaust your server resources easily and your script will break.

--

Regards,
Manuel Lemos


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



[PHP] Re: emptying jammed mailbox by PHP?

2003-02-17 Thread Manuel Lemos
Hello,

On 02/17/2003 11:27 PM, Chris Hayes wrote:

hi,
maybe not the most professional way but my mailbox is jammed and i want 
to clear it. My ISP host is doing some office refurnishing and needs all 
his attention to pick the right color hues.
So i thought maybe i can send a simple POP command to delete all mails 
in the mailbox? It's 14000 mails since last thursday!
Maybe using mr Lemos' POP script class?

Yes, the class maybe a better solution than most e-mail programs to 
delete so many messages in the server.

Make sure you get an updated version from here as there are some old 
versions elsewhere.

http://www.phpclasses.org/pop3class

Make sure you quit the POP3 connection properly with the class or else 
the server may not commit the delete requests when you disconnect.


My email client eudora complains it cannot get a 'lock'- mailbox in use. 
This can be the mail subsystem thingy keeping sending itself a warning 
email. Ideas?

This means that there is some program accessing your mailbox at the 
time. if you are not sure what program that may be, ask your system 
administration for help or else there will be no program that will be 
able to delete your messages.


--

Regards,
Manuel Lemos


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



Re: [PHP] File upload problem

2003-02-18 Thread Manuel Ochoa

There may be several reasons why it doesn't work but the first thing I noticed is that 
"action" is blank. You need to have this defined.
 John M <[EMAIL PROTECTED]> wrote:Hello,

I have the code below. It's a simple file upload. But it doesn't work.
Before the line if(isset( $Submit )) is an echo which can I read. But after
choosing a file and press a submit nothing happens. Why is if(isset(
$Submit )) always false? Maybe my apache or php config is wrong?

I use WinXp Prof, Apache 2.0.43, PHP 4.2.3, safe_mode is on , upload_tmp_dir
is "c:\tmp\" and upload_max_filesize is 2M in PHP config file.

Thanks!










 [input] 
 [input] 

echo "Before submit 
\n";
if(isset( $Submit ))
{
echo "After submit 
\n";

if ($_FILES['imagefile']['type'] == "image/gif"){
copy ($_FILES['imagefile']['tmp_name'],
"files/".$_FILES['imagefile']['name'])
or die ("Could not copy");
echo "Name: ".$_FILES['imagefile']['name']."";
}
else {
echo "";
echo "Could Not Copy, Wrong Filetype
(".$_FILES['imagefile']['name'].")";
}
}
?>







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





~ Manuel Ochoa ~
Seven days is too long to wait for a gun!



[PHP] Re: Zend Encoder

2003-02-24 Thread Manuel Lemos
Hello,

On 02/24/2003 01:51 PM, Thomas Johnsson wrote:
This might sound a bit paranoid, but since I don't know how it works, i'll
ask anyway.
If I encrypt a file using the Zend Encoder, is there anyone at zend who can
view it, or it it an unreversable encryption?
Sure. Actually it is technically possible to get your code decrypted 
because after all that is what happens before it is executed.

--

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


[PHP] Re: MIME help needed please...

2003-02-25 Thread Manuel Lemos
Hello,

On 02/23/2003 08:01 PM, Shawn McKenzie wrote:
I got this from the user contributed notes in the php.net manual.  It seems
to work fine most of the time, but Eudora and Pegasus users either get
mangled attachments or no attachments.
Can anyone see a problem (most files are zip, but sometimes tar.gz or sit) I
tried using Content-Type: application/zip with the same results.  I'm
thinking it is some issue with the headers, content-types, boundaries or
something.  Or maybe Pegasus/Eudora don't understand MIME or base64
(doubtful)???
It could be one of many bugs of the mail() function.

You may want to try this class for composing and sending MIME messages 
as it works around some of those bugs:

http://www.phpclasses.org/mimemessage

--

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


[PHP] Re: Mail (), BBC: recipients not receiving my Newsletter

2003-02-26 Thread Manuel Lemos
Hello,

On 02/26/2003 07:40 PM, Ricardo Fitzgerald wrote:
I wrote a small form which dumps data to a php script that uses mail ()
to send an html newsletter, so far is working except
that it's not sending to BCC: headers, in my form I have a field to
enter a comma delimited email list, after submiting the form this list
is stored under one variable $emaillist, and in my php script I used
$headers .= "Bcc: ".$emaillist."\r\n";
then I call 

mail($to, $subject, $message, $headers);

I don't receive an error message but my email list is not being sent,
what I'm doing wrong ?
It sounds like one of those bugs of the mail function but it is hard to 
tell what can it be with so little information.

Anyway, you may want to try this class for composing and sending e-mail 
messages that comes with workaround for many problems of the mail() 
function:

http://www.phpclasses.org/mimemessage

--

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


[PHP] Re: using php to rotate ad banners

2003-02-26 Thread Manuel Lemos
Hello,

On 02/26/2003 07:58 PM, Joseph Bannon wrote:
I recently created some scripts to rotate ad banners
on my site. One script is called show.php, which
serves the banner. The other is called click.php,
which redirects the people to the proper site for the
banner they clicked on.
Some people have noticed that when they click on the
banner, they go to another site. Others have noticed
that they just get returned back to the page that they
just were at. I test it without any problems.
I have been doing the redirecting using cookies. The
script show.php puts the cookie on their computer. The
script click.php gets the cookie and redirects them to
the proper place when clicked. Should I be using
cookies or sessions to do this? I think the problem is
that some people have their browser set to not accept
cookies which is why they get directed to other
places.
Why don't you just use phpAdsNew?

http://www.phpadsnew.com/

--

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


Re: [PHP] Re: Mail (), BBC: recipients not receiving my Newsletter

2003-02-27 Thread Manuel Lemos
Hello,

On 02/27/2003 02:22 PM, Ricardo Fitzgerald wrote:
I've dl your class and read some of your test scripts, but it's not
working at all 
I tested using test_personalized_bulk_mail.php
And I got :'Error: it was not possible to send email message'
You most likely have a PHP configuration problem. It is hard to tell 
before you describe your system. Is it Windows or Unix/Linux? What do 
you have configured in the php.ini file.

Anyway, if you are using Windows, which is my guess, you need to send 
the message via an SMTP server. If you have it configured to send via a 
working SMTP server, you may be having one of many types problems that 
can only be cleared with the some information about that error.

In that case, try using in the script of that class named 
test_smtp_message.php changing it to use your SMTP server and set the 
smtp_debug variable to 1 so you can see the dialog with the SMTP server. 
 That should help figuring what is your problem.

--

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


Re: [PHP] Re: using php to rotate ad banners

2003-02-27 Thread Manuel Lemos
Hello,

On 02/27/2003 04:27 PM, Joseph Bannon wrote:
Why don't you just use phpAdsNew?


Because I prefer to write it myself so I can learn
more.
You can learn more studying the solutions provided by those that already 
attempted to implement the same problem. Just study phpAdsNew and you 
will learn more than you will possible learn from this list as this is 
not a trivial issue as you may imagine.

--

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


[PHP] Re: Mailling question

2003-03-02 Thread Manuel Lemos
Hello,

On 02/28/2003 11:10 AM, Mathieu Dumoulin wrote:
Allright, we managed to get to send emails thru an SMTP, but now we need to
know which email DID get to the recipient and which didn't. Our smtp class
supports basic error message but as soon as the message is outbound from
this server, which is most oftenly the case, the class always returns
success. Allright we can live with that. But our mass mailing software using
this class needs to keep track of which client of our numerous members gets
the email.
The only solution we though of which is very risky, is to:

Setup a mass mailing account for each client and send emails as if they
where the mass mailer
Then a robot is in charge of scanning the inbox for returned postmaster
messages and parse it to find the error such as "unknown user".
I do that, except that I make the message return path be in some domain 
handled by a catch-all POP mailbox. The return path is also set in such 
way that it identifies the exact address of the subscriber that is bouncing.

I don't advise sending via SMTP unless you do not have an alternative 
(when you are using Windows) because it is very slow to queue messages. 
Sending to your local mailer queue (sendmail, qmail, postfix, etc..) can 
be much faster.

Anyway, regardless of the way you send your messages, you may want to 
try this class that knows how to set the return-path address depending 
of the sending methods that you use (mail(), sendmail, SMTP, qmail, etc...).

http://www.phpclasses.org/mimemessage

--

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


[PHP] Re: mail function and Bcc restriction?

2003-03-02 Thread Manuel Lemos
Hello,

On 03/01/2003 08:35 AM, Mirza Muharemagic wrote:
Hi all,

   are there any restrictions for mail function, when I use Bcc? how
   many email adresses can i put in Bcc, are there any PHP
   restriction, or just memory restriction, or something else?
Put them all in a single Bcc: header separating them with commas , .

--

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


[PHP] Re: Mail() Failing to connect

2003-03-02 Thread Manuel Lemos
Hello,

On 02/28/2003 05:24 PM, Gary wrote:
Does anyone have any idea of why I may be getting this error, when my
scripts ran perfectly fine before (i don't know what). Is there some kind of
setting in my mail program that may have changed? I'm using Outlook with
Exchange Server.
Warning: Failed to Connect in d:\apache\htdocs/emailtest.php on line 43
Either you have not configured the SMTP server right in php.ini or that 
may be a bug in the mail() function.

Either way, you may want to try this class that comes with a sub class 
to send via SMTP. You can enable the debug mode to see the SMTP dialog 
so you can figure what is the problem:

http://www.phpclasses.org/mimemessage

Use it in conjunction with this:

http://www.phpclasses.org/smtpclass

--

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


[PHP] Re: Calendar

2003-03-02 Thread Manuel Lemos
Hello,

On 03/01/2003 07:28 PM, Jason D. Williard wrote:
Is there an easy way to create a calendar in PHP, such as a calendar
function?  All I need is a dynamically created calendar to link to other
pages.
You may want to try this class that you customize in a sub-class to do 
whatever you want as demonstrated in the example:

http://www.phpclasses.org/calendarclass

--

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



[PHP] Re: mail() in Linux

2003-03-04 Thread Manuel Lemos
Hello,

On 03/04/2003 10:47 PM, Terry Lau wrote:
> Hello,
>I want to use the mail() in my Linux computer.But I don't know how to 
> set the php.ini file to enable it.I am using the SMTP server provided by 
> ISP. Do I need to setup my own mail server?

You do not need a SMTP server to send messages. SMTP is only needed to
receive or relay messages. In Linux sendmail or a similar program can
send the messages for you. Usually your default php.ini configuration
will work.

-- 

Regards,
Manuel Lemos


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



[PHP] Re: html mail

2003-03-10 Thread Manuel Lemos
Hello,

On 03/10/2003 10:47 AM, Ian a. gray wrote:
I am quite new to php and I am trying to find a way of
sending details of a web form over e-mail in both text
and html format.  There are numerous sites on the web
that try and explain how to do this but they are
worded very complicated and to be honest I haven't
found one that is particularly good.
I want to send an e-mail that contains html code, with
the option of attatching images and other files as
well as a text version of the email so that the viewer
can read the same e-mail whether or not he can view
html email or not.
Any ideas?
Try this class that does exactly what you ask and comes with easy to 
understand examples to get you started with it very quickly:

http://www.phpclasses.org/mimemessage

--

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


[PHP] Re: Persistent values between executions

2003-03-10 Thread Manuel Lemos
Hello,

On 03/10/2003 01:30 PM, Mike Mannakee wrote:
I have some sets of values that I have stored in several tables in a mySQL
database.  These don't often change, but are referenced on every single page
view.  While each call is quick, as a gross the load on the server is too
high.  I would like to know if there is a way to have these sets of values
remain persistent in the server's memory between calls from browsers, like
environment variables, to reduce the back and forth calls to mySQL.  As the
data from the calls are almost always the same, it would seem easier this
way.
Any thoughts?  Comments?  RTFM suggestions?
You may want to try this cache class. You can take any variable and 
serialize it so it can be stored for later retrieval without querying 
your database.

http://www.phpclasses.org/filecacheclass

Usually I do not recommend caching just variables. For instance, if your 
variables will be used to generate portions of HTML pages, it would be 
more efficient to cache those portions of HTML data instead of the 
variables that is only used to regenerate such HTML data.

--

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


[PHP] Re: Form input security

2003-03-10 Thread Manuel Lemos
Hello,

On 03/09/2003 04:18 PM, Chris Cook wrote:
When using forms, when do I have to worry about cleaning up user data? I 
know to use escapeshellarg() when using system functions, but how about 
when using the user data for database inserts? Also, if I do not insert 
the data into the database or use any system commands, do I still need 
to clean the data?
Of course you have to assure that data used in SQL queries is formatted 
properly or else your applications may be vulnerable to hacker exploits 
often known as SQL injections.

If you need to validate form data to assure it is formatted properly, 
you may want to try this forms generation and validation class that does 
most of the work for you:

http://www.phpclasses.org/formsgeneration

Data to be inserted in text fields also needs to be properly quoted and 
escaped to prevent SQL injection of commands that make your database 
execute arbitrary actions that may compromise your server security.

Database text data quoting depends on the database you use. If you use a 
database abstraction layer package like this you may call a function to 
do the appropriate quoting independently of the type of database you use:

http://www.phpclasses.org/metabase

--

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


[PHP] Re: Valid Email Question

2003-03-11 Thread Manuel Lemos
Hello,

On 03/11/2003 11:04 PM, Stephen wrote:
Is there anyway you can email a certain email a user enters, see if it
bounces back, and if it does, tell the user to enter a valid username? I've
always wanted to do this but I'm not sure how to see if it bounces back.
You may want to try this class that does precisely that. Some times it 
may not be conclusive but when it determines that an e-mail address is 
not accepted you can rely on that conclusion.

http://www.phpclasses.org/emailvalidation

--

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


[PHP] Re: SMTP Authenticate

2003-03-15 Thread Manuel Lemos
Hello,

On 03/15/2003 01:43 PM, Aitor Cabrera wrote:
Hi, I'm trying to use the mail() funtion but I can only use this funtion the email myself (the same email that I put in the php.ini file). I f I try to email someone else I get an error 

530 delivery not allowed to non-local recipient, try authenticating -7

How can I authenticate myselft? Which is the SMTP comand to do it and how do I use it? Thanks!!
mail() does not support authentication. You may want to try this class 
that lets you specify the authentication credentials and comes with a 
wrapper function named smtp_mail() that sends the message to a SMTP 
server that you specify:

http://www.phpclasses.org/mimemessage

You also need this class to do the actual SMTP delivery:

http://www.phpclasses.org/smtpclass

--

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


[PHP] mail(); works, but only for mails to my (mail)server

2003-03-16 Thread Manuel Glauser
Hey you guys!

First, I have to say, that php.net gave me a lot of support in the last few weeks and 
months. It's been great to suck information from your guys' website! Thanx a lot!

This weekend, I've been fighting with some really weird problem though... I installed 
a few mail(); actions on my website plus in some projects I'm working on. I have one 
really big problem though... Everything works fine until I want to send a mail to 
another mailserver than mine. So, it only works for my own (mail)server - how the hell 
is that possible? And: can I fix that? Do I have to include special headers?

Thank you very much for yar answer!

Greetz

Manuel, Berne, Switzerland

[PHP] Re: Zend

2003-07-01 Thread Manuel Lemos
Hello,

On 07/01/2003 02:27 AM, Gladk wrote:
Can anybody give me direct link for downloading Zend Optimizer.
I tried to do it a lot of times from the official site, but after
accepting agreement nothing happens
Maybe Zend site has some alergy to your browser or vice-versa. :-)

BTW, if you are looking for optimizers, you may want to try also Turck. 
This is an all in one Open Source PHP extension, that not only does PHP 
code optimizing like Zend Optimizer but also does code caching, code 
encoding, content caching, session handling in shared memory, etc... All 
good things that help to make your site fly:

http://www.turcksoft.com/en/e_mmc.htm

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Image Verification (On Submit)

2003-07-01 Thread Manuel Lemos
Hello,

On 07/02/2003 12:00 AM, Joel Louie M Miranda wrote:
Can someone give me a suggestion or a howto where could I get some idea on
how to do image verification? Like on yahoo.com signup where you need to
enter the text on the image to process your order.
This class does what you want:

Class: CAPTCHA
http://www.phpclasses.org/captcha
--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Minimizing Database Hits

2003-07-01 Thread Manuel Lemos
Hello,

On 07/01/2003 07:41 PM, Ralph wrote:
I wrote class that contains a function that retrieves users shopping
cart items from database and then returns an array with qty, item number
, item name, etc.
So now whenever I want to retrieve the users cart I use the following:

$cart_contents = $cart->get_cart_contents();

I then iterate through $cart_contents to display info. Now I am trying
to minimize the number of hits to the database so my question is, am I
querying the database every time I call on $cart_contents?
A common solution is to serialize() and cache the results in disk files. 
For arbitrary data caching, you may want to try this class:

http://www.phpclasses.org/filecacheclass

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Email troubles

2003-07-01 Thread Manuel Lemos
Hello,

On 06/30/2003 07:30 PM, Sparky Kopetzky wrote:
I'm getting this error while sending email with mail():

Warning: mail(): SMTP server response: 550 5.7.1 <[EMAIL PROTECTED]>... Relaying denied in (path to my program)

How do I turn relaying on??
I think that means you need to authenticate. The mail() function has no 
authentication support. You may want to try this class that comes with a 
subclass for sending messages via SMTP that supports authentication. It 
comes also with a wrapper function named smtp_mail() that emulates the 
mail() function so you can use it as replacement without changing your 
scripts too much:

http://www.phpclasses.org/mimemessage

You also need this for message delivery.

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mysql detect

2003-07-02 Thread Manuel Lemos
Hello,

On 07/02/2003 04:05 AM, [EMAIL PROTECTED] wrote:
what command in linux , to see default direcktory instalation mysql
database dan mysql library
./configure ?

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: OCI_ASSOC returns key with upper case string

2003-07-04 Thread Manuel Lemos
Hello,

On 07/04/2003 08:38 PM, Reuben D. Budiardja wrote:
First let me say that I am not sure if this is PHP problem or Oracle. I posted 
this earlier in php-general, but after looking at the available mailing lists 
again, I thought this forum would be more appropriate. Sorry if someone get 
double post. 

I have a class that contains API for using postgresql, mysql, or oracle 
database so switching database should be "in theory" just changing an 
argument for me. 
To make this sort, let just say that the return of a SELECT statement is 
always in associative array, using either :
"pg_fetch_assoc" for pgsql
"mysql_fetch_assoc" for mysql
"ocifetchinto" with OCI_ASSOC flag for Oracle 9

Now, pg_fetch_assoc and mysql_fetch_assoc return the associate array with the 
key in lower case. But ocifetchinto returns the key in UPPER case. So this 
discrepancy makes my code not as portable as I would like it. 
Furthermore, the example here:
http://us2.php.net/manual/en/function.ocifetchinto.php

doesn't even work, because it uses lower case as the associative array key.

Why is this the case? Is this PHP problem or Oracle config problem? Either 
way, can anyone suggest a solutions? Of course I can do all kind of array 
manipulation in my API to make the key lower case, but that wouldn't be very 
elegant and efficient
No, that is just the way Oracle returns column names. It is not possible 
to provide a portable solution to return row in associative arrays 
because not only the column names case may be mapped, removed the table 
names or even have the column names truncated.

That is the reason why Metabase never provided a function to return rows 
as associative arrays, as Metabase is focused on real database 
application portability.

http://www.phpclasses.org/metabase

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] ANN: Metastorage generates form handling classes

2003-07-10 Thread Manuel Lemos
Hello,

Metastorage generates form handling classes

In the continuation of the work to achieve further reduction of
application development efforts, the new release of Metastorage is now
capable of generating automatically classes that are able to handle
Web forms that serve as user interface to create new persistent
objects.
Complete announcement article:
http://www.meta-language.net/news-2003-07-10-metastorage.html
Screenshots:
http://www.meta-language.net/screenshots.html
Note: although it is not mentioned, the code generated by Metastorage 
should work with PEAR::MDB via Metabase wrapper.

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Mailing list server with PHP frontend

2003-07-12 Thread Manuel Lemos
Hello,

On 07/11/2003 08:47 PM, Juan Nin wrote:
I want to know if anyone knows about a good mailing list manager that has
got a PHP administration frontend
I've found many PHP scripts for sending newsletters and announcementes, but
that's it's not what I want
I want a system like Mailman, Sympa or Majordomo (the mailing list server
may be programmed in Perl or whatever), but it must provide a PHP frontend
for administration, subscription, etc
You may want to try this class for creating lists with the ezmlm mailing 
list manager. It has support for creating and editing the lists 
properties and even has a SOAP interface for accessing the subscriptions 
from remote machines.

http://www.phpclasses.org/ezmlmmanager


It would be great if messages are stored in a database like MySQL and it
must be free software
Does this exist??
ezmlm has MySQL bindings for managing the subscription records. The 
messages are stored in disk files though.

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Mailing list server with PHP frontend

2003-07-12 Thread Manuel Lemos
Hello,

On 07/13/2003 02:37 AM, Juan Nin wrote:
You may want to try this class for creating lists with the ezmlm mailing
list manager. It has support for creating and editing the lists
properties and even has a SOAP interface for accessing the subscriptions
from remote machines.
http://www.phpclasses.org/ezmlmmanager


ezmlm has MySQL bindings for managing the subscription records. The
messages are stored in disk files though.


seems nice, but the problem is I'm not using qmail, I'm using Postfix, and
ezmlm works with qmail..  :(
Apparently there is a way to make it work with Postfix too:

http://www.dmumford.com/tech/ezmlm-postfix.html



--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Send mail using external server

2003-07-14 Thread Manuel Lemos
Hello,

On 07/14/2003 11:27 AM, Maria Garcia Suarez wrote:
Hi there!

I'm developing a program that has a kind of mail
client from where users can send mails and get a blind
copy in their e-mail boxes. The program uses mail() in
those servers having a SMTP installed in the very same
server. I would like to let people send mails even if
the server is not able to handle them.
To do that I've googled around and found the following
script (see below). The problem is that blind copies
don't reach destination, mails in the To: field arrive
well, mails in the BCC: desappear and never reach the
mailbox (nor get back :-?
Does anyone know what's going wrong? Thanks.
That script has lots of problems from wrong line endings to the 
inability to handle multiline SMTP responses.

You may want to use this SMTP class instead:

http://www.phpclasses.org/smtpclass

Actually, if you want to use a direct replacement for the mail() 
function you may want to try this other class in conjunction as it comes 
with a wrapper function named smtp_mail() that emulates the mail() 
function but lets you send it via SMTP directly.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML email with Outlook

2003-07-15 Thread Manuel Lemos
Hello,

On 07/15/2003 07:48 PM, Tim Thorburn wrote:
I've made a PHP script that sends out an automatic email through my 
servers cron system, it works well, but I thought I'd try to do some 
HTML email to get things to line up a little better.

To do so, I added the following line in my mail() command: -Type: 
text/html; charset=iso-8859-1

When I check the messages sent out with Eudora, the HTML email comes in 
perfectly.  However, when I check with Outlook Express 6 - I get the 
actual HTML code rather than the nicely formatted email that I had created.

Should I be using another line in my mail() command?  I've recieved HTML 
email before with Outlook Express on my machine without changing any 
settings at all.  Also, I had sent an email from my script to hotmail 
and the HTML email worked fine there too.
That looks like one of the bugs of the mail() function that never got 
fixed. In that case you may want to try this class that has built-in 
workarounds for some of the mail() function bugs.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   3   4   5   6   7   8   9   10   >