php-general Digest 10 Oct 2006 14:05:57 - Issue 4393
Topics (messages 242880 through 242901):
Re: Working with overly aggressive anti-spam measures
242880 by: Chris
242882 by: Travis Doherty
242885 by: Dave M G
242886 by: Chris
Re: ftp_put and ftp_chmod does
Dave M G wrote:
PHP List,
I run a few various social groups, and with each one I keep in contact
with members by emailing them short newsletters.
All my user information is stored in a MySQL database. I use PHP to
get the relevant contact information, and use the mail() command to
send
Someone kindly gave me this once. I now need to reverse engineer it to
remove the quotes and plus signs from $searchenquiry. Is it as simple as
this?
// FINAL RESULT: [+john +johnston]
$sEnquiry = preg_replace(/\s+/, +, $sEnquiry);
// RESULT: [john johnston]
$sEnquiry =
Hi list,
I got a php error in my apache log:
PHP Parse error: parse error, unexpected T_STRING in
/var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on line 1
This is line 1 of locallang_tca.xml file
?xml version=1.0 encoding=utf-8 standalone=yes ?
I try to switch
Travis, Chris,
Thank you for your advice.
I've installed spamassassin and I'm using it to monitor how well my PHP
generated emails rate as spam.
So far, I'm not doing well. I have two main issues so far:
1. Spamassassin says:
Spam detection software, running on the system homebase, has
Dave M G wrote:
Travis, Chris,
Thank you for your advice.
I've installed spamassassin and I'm using it to monitor how well my PHP
generated emails rate as spam.
So far, I'm not doing well. I have two main issues so far:
1. Spamassassin says:
Spam detection software, running on the system
On Tue, 10 Oct 2006 09:18:18 +0200, Ilaria De Marinis [EMAIL PROTECTED] wrote:
Hi list,
I got a php error in my apache log:
PHP Parse error: parse error, unexpected T_STRING in
/var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on line 1
This is line 1 of locallang_tca.xml
How can I use if to see an array contains something?
if ($array()) does not work, of course.
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try this:
if (is_array($array) count($array)) {
...
}
John Taylor-Johnston schrieb:
How can I use if to see an array contains something?
if ($array()) does not work, of course.
John
--
Mit freundlichen Grüßen
Philipp Schwarz
-
John Taylor-Johnston wrote:
How can I use if to see an array contains something?
php.net/in_array
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi there, following words are my ideas about that HTML PHP parting. I hope you
can understand my broken english and do not take personally.
SEPERATING html FROM php ARE USELESS
For years, some php users try to show php to look like other programming
languages like C or JAVA. I believe they try
Philipp Schwarz wrote:
Try this:
if (is_array($array) count($array)) {
given that your not interested in the actual count of the array,
only that is is not empty, save yourself a couple of CPU cycles
and use empty() instead ...
if (is_array($array) !empty($array)) {
foreach
It's impossible for me to make this change.
xml files are packaged in external modules. I can't manipulate them!
Penthexquadium wrote:
On Tue, 10 Oct 2006 09:18:18 +0200, Ilaria De Marinis [EMAIL PROTECTED] wrote:
Hi list,
I got a php error in my apache log:
PHP Parse error: parse
Hi geeks,
i am uploading a file to server. Uploading part is working fine. i
am struggle with minor part. actually before uploading file, i am checking
for existance of a file. If it is not exists, directly i am uploading that
file. If it exists, i sud ask user that This file is exits.
On Tue, 10 Oct 2006 03:09:42 -0700 (PDT), Captain [EMAIL PROTECTED] wrote:
Hi geeks,
i am uploading a file to server. Uploading part is working fine. i
am struggle with minor part. actually before uploading file, i am checking
for existance of a file. If it is not exists, directly
Have you tried Smarty (smarty.php.net)?
-Original Message-
From: Sancar Saran [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 10, 2006 3:43 PM
To: php-general@lists.php.net
Subject: [PHP] Seperate HTML from PHP
Hi there, following words are my ideas about that HTML PHP parting. I hope
Hi,
I am developing a tell-a-friend application for one of my customers. We
are going to have it all located on their server, and want to make sure we
take the right decisions on the road so that we don't spam mark our server
and don't end up in the SPAM inbox of the recipients. This is how I
Thanks everyone.
Alan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Chris [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
João Cândido de Souza Neto wrote:
Hello everyone.
I have got some parts of my system where some files are sent and i use
ftp functions to save suche files.
When i run it in my local machine, it works fine but, when it is
Richard Lynch wrote:
On Sun, October 8, 2006 6:53 pm, [EMAIL PROTECTED] wrote:
How to apply the following function with php ?
a href=javascript:popup('index.htm') Test /a
If you're new to PHP, be a minimalist, and pull out PHP only when you
absolutely have to:
a
Hello to you,
php web page ( test.php ) :
script language=javascript type=text/javascript
!--
function popup(page)
{
window.open(page,title, height=100,width=100);
}
// --
/script
a href=javascript:popup('./?php echo $dir?/index.htm') Test /a
Result : homepage error
Web Server error log :
Captain wrote:
Hi geeks,
i am uploading a file to server. Uploading part is working fine. i
am struggle with minor part. actually before uploading file, i am checking
for existance of a file. If it is not exists, directly i am uploading that
file. If it exists, i sud ask user that
At 3:09 AM -0700 10/10/06, Captain wrote:
If it is not possible, plz give any other solution.
Expecting ur reply.
It's possible, but why not do it in php -- it's simpler -- like:
?php
// specify the directory where the uploaded file should end up
$path = 'upload/' ;
// specify the filetypes
clive wrote:
Hello to you,
php web page ( test.php ) :
script language=javascript type=text/javascript
!--
function popup(page)
{
window.open(page,title, height=100,width=100);
}
// --
/script
a href=javascript:popup('./?php echo $dir?/index.htm') Test /a
Result : homepage error
I have a php (ver 4.x) script that is being cached.
I have placed:
META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE
but the page is still being cached. I'm not sure if its apache or
the php. How can I disable all caching?
is there something I can set in php.ini?
(Mac OS X Server)
Thanks
Ben
# [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200:
Thank you Ilaria and Roman for your input. I did not know that preg
is able to deal with PCRE patterns.
preg is obviously short for Perl REGular expressions, while
PCRE positively means Perl-Compatible Regular Expressions.
The
# [EMAIL PROTECTED] / 2006-10-10 19:06:53 +0700:
I am developing a tell-a-friend application for one of my customers. We
are going to have it all located on their server, and want to make sure we
take the right decisions on the road so that we don't spam mark our server
and don't end up in the
Caching occurs client side (ie in the webbrowser) not by apache or php
unless you have setup something especially to do so...
How are you testing that something stays cached?
There is also a HTTP header you can make your PHP send to ask the page not
to be cached.
Looking at this page:
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
How many Boomer wannabes does it take to pollute a mailing list?
Just one, [EMAIL PROTECTED], MAN!
David
I have a php (ver 4.x) script that is being cached.
I have placed:
META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE
but the page is still being cached. I'm not sure if its apache or the
php. How can I disable all caching?
is there something I can set in php.ini?
(Mac OS X Server)
On Tue, October 10, 2006 10:17 am, Benjamin Adams wrote:
I have a php (ver 4.x) script that is being cached.
I have placed:
META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE
but the page is still being cached. I'm not sure if its apache or
the php. How can I disable all caching?
is there
Hi all, I am in the process of creating a national events directory where
people can enter their events (car boot sales, evening classes etc) and
specify whether those events are one-ff events or repeating (daily, weekly
etc) affairs and people can search for those events by postcode, date range,
Hi List.
I have a table, which contains 'setting' information for my website.
The table has the following columns: setting_id, setting_name and
setting_value.
Now there are currently 30 settings stored in this table, however i am
having trouble pulling values out on a 'as needed' basis.
At
Hello.
In the follow code:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
--
João Cândido de Souza Neto
Curitiba Online
[EMAIL PROTECTED]
(41) 3324-2294 (41) 9985-6894
João Cândido de Souza Neto wrote:
Hello.
In the follow code:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
Sure, maintain a count in the foreach and then compare to
João Cândido de Souza Neto wrote:
Hello.
In the follow code:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
$last = end ( $numbers );
reset ( $numbers );
foreach ( $numbers as $number ) {
$last = end ( $numbers );
reset ( $numbers );
I thought foreach() already performed a reset()? Why do it again here?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, October 10, 2006 7:57 am, [EMAIL PROTECTED] wrote:
php web page ( test.php ) :
script language=javascript type=text/javascript
!--
function popup(page)
{
window.open(page,title, height=100,width=100);
}
// --
/script
a href=javascript:popup('./?php echo $dir?/index.htm') Test
Chris Boget wrote:
$last = end ( $numbers );
reset ( $numbers );
I thought foreach() already performed a reset()? Why do it again here?
Well, corn my fritters, according to TFM, it does this indeed. Maybe an
old dog can learn new tricks. ;)
--
John C. Nichel IV
Programmer/System Admin
On Tue, October 10, 2006 7:06 am, Peter Lauri wrote:
1.We have setup an email that do have an inbox and is REAL. We have
an
mailbox connected to it and can send and read emails from it via
webmail and
pop
2.We have an SMTP server that requires authentication
3.We are going to
You´re right, in my example here i could just use a for loop.
But in my real code it´s better to use foreach.
Thanks for your tip.
--
João Cândido de Souza Neto
Curitiba Online
[EMAIL PROTECTED]
(41) 3324-2294 (41) 9985-6894
http://www.curitibaonline.com.br
Brad Bonkoski [EMAIL PROTECTED]
On Tue, October 10, 2006 5:09 am, Captain wrote:
Hi geeks,
Hi, non-listener...
You do realize you posted much the same question yesterday, right?
Do you think our answer will have changed in 24 hours?
Actually, it will change.
I have GIVEN UP trying to tell you the RIGHT WAY to do this, and
On Tue, October 10, 2006 2:18 am, Ilaria De Marinis wrote:
PHP Parse error: parse error, unexpected T_STRING in
/var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on
line 1
This is line 1 of locallang_tca.xml file
?xml version=1.0 encoding=utf-8 standalone=yes ?
I try to
On Mon, October 9, 2006 8:55 pm, Dave M G wrote:
If possible, can anyone help me with creating the PHP code that will
make an email as legitimate as it can be? I know I can't totally
prevent
my email from being marked as spam (after all, if it were possible,
all
the spammers would do it).
On Mon, October 9, 2006 9:01 pm, Chris wrote:
You can't change that parameter if safe-mode is on for the server or
if
exim doesn't have the webserver user as a 'trusted-user' (I think only
exim is affected by this particular issue).
Almost-for-sure sendmail has the same issue.
Or maybe you
On Tue, October 10, 2006 3:01 am, Dave M G wrote:
Content analysis details: (0.3 points, 5.0 required)
pts rule name description
--
--
0.3 AWLAWL: From: address is in the auto
On Mon, October 9, 2006 6:21 pm, Nisse Engström wrote:
No matter. Thanks for the information. By the bye,
are we talking IE in general, or specific versions
thereof?
Put it this way:
*ANYTHING* you can say about IE at all, is not about IE in general,
but only about specific versions
Hello Richard,
First let me introduce myself, I'm Jay Bauer and have been supporting
the Apache webserver for the last couple of years and have been doing
networking support for over 15 years. I want to thank you for
explaining why the folks replying to our lab's enquiries don't think the
On Mon, October 9, 2006 2:44 pm, [EMAIL PROTECTED] wrote:
I have table orders with primary key order_id. I have table
uploaded_files
with primary key ufid and uploaded files are linked to orders by
order_id
column.
I have to list all orders and uploaded files. this works fine:
$query =
On Mon, October 9, 2006 2:58 pm, John Wells wrote:
On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
but I know there must be much better solution then this one.
You're right: Simply JOIN your queries...
SELECT order_id, order_date, order_status, file_name
FROM orders
JOIN
On Mon, October 9, 2006 3:09 pm, [EMAIL PROTECTED] wrote:
But, in this case I will have repeating order_date and order_status
info?
idorder_datestatusfile_name
122006-10-09live file1.jpg
122006-10-09live file2.jpg
122006-10-09live
sure it is!
;)
On Mon, October 9, 2006 2:58 pm, John Wells wrote:
On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
but I know there must be much better solution then this one.
You're right: Simply JOIN your queries...
SELECT order_id, order_date, order_status, file_name
FROM
ok. got the point.
On Mon, October 9, 2006 3:09 pm, [EMAIL PROTECTED] wrote:
But, in this case I will have repeating order_date and order_status
info?
idorder_datestatusfile_name
122006-10-09live file1.jpg
122006-10-09live file2.jpg
12
-Original Message-
From: Brad Fuller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 10, 2006 12:55 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Disable all caching
I have a php (ver 4.x) script that is being cached.
I have placed:
META HTTP-EQUIV=CACHE-CONTROL
I'm currently writing the second edition of my PHP Advanced book and
need a technical reviewer. It is a paid job and some people think
it's interesting/looks good on a resume/etc. Obviously you'll need to
be an expert in PHP and pay close attention to detail. My definition
of advanced for
Dave Goodchild wrote:
Hi all, I am in the process of creating a national events directory where
people can enter their events (car boot sales, evening classes etc) and
specify whether those events are one-ff events or repeating (daily, weekly
etc) affairs and people can search for those events
-- Forwarded message --
From: Roman Neuhauser [EMAIL PROTECTED]
Date: Oct 10, 2006 5:11 PM
Subject: Re: [PHP] PHP Mailer and SMTP = SPAM?
To: David Giragosian [EMAIL PROTECTED]
# [EMAIL PROTECTED] / 2006-10-10 12:49:11 -0500:
Do you realize how many Vietnam war veterans you're
On Tue, October 10, 2006 1:14 pm, João Cândido de Souza Neto wrote:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
In general, you can't.
If the elements are unique, you could do:
$last =
On Tue, October 10, 2006 1:04 pm, Alex Major wrote:
I have a table, which contains 'setting' information for my website.
The table has the following columns: setting_id, setting_name and
setting_value.
Now there are currently 30 settings stored in this table, however i am
having trouble
In MySQL, you can do explain $query to see what MySQL estimates will
be the workload.
Interpreting that output is more art than science, but with practice,
you can at least avoid SOME querie that will drive your server to its
knees.
I did work on a PostgreSQL search engine once where we did a
thank you for schooling me :) i learn something new everyday!
- Original Message -
From: Richard Lynch [EMAIL PROTECTED]
To: benifactor [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, October 09, 2006 11:02 AM
Subject: Re: [PHP] ECHO $variable
On Mon, October 9, 2006
Dave M G wrote:
1. Spamassassin says:
Spam detection software, running on the system homebase, has
identified this incoming email as possible spam. [...]
Content analysis details: (0.3 points, 5.0 required)
pts rule name description
--
On Mon, October 9, 2006 1:53 pm, Alan Milnes wrote:
$filename=input/w2wcheck.txt;
echo h2$filename/h2;
# Open file
$fptr = fopen($filename, r);
# Check if file is open
if($fptr) {
$current_line = fgets($fptr,4096);
$retval = TRUE;
echo open;
while($current_line
On 10/10/06, Richard Lynch [EMAIL PROTECTED] wrote:
This is a lot more subtle problem than it seems at first glance, eh?
Yup, sure is. Thanks for the detailed response, so helpful as always.
-John W
--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some
I think perhaps I'm using classes and OOP incorrectly. The last time I used
them, they were slow.
I want to create a customer class which fetches its attributes from a MySQL
database. Something
like this pseudocode:
class customer
{
...
getName ($id)
{
$result =
Chris de Vidal wrote:
I think perhaps I'm using classes and OOP incorrectly. The last time I used
them, they were slow.
The examples you provided shows that it's not OOP that's the problem,
it's how your getting the data as you suspected.
Doing tons of queries is going to be slow whether
For your rudimentary example of object-relational mapping below, yes,
performance is going to be atrocious. That's because you're not taking any
advantage of the features that using OOP gives you. One could write a
dissertation on this problem, but I will just give you some general
On 10 Oct 2006, at 4:14 PM, Chris de Vidal wrote:
I think perhaps I'm using classes and OOP incorrectly. The last
time I used them, they were slow.
I want to create a customer class which fetches its attributes
from a MySQL database. Something
like this pseudocode:
class customer
Travis, Richard, Chris,
Thank you for your helpful advice.
I've managed to set the Return-Path correctly now, and Spamassassin is
now only giving me the whitelist error, which I don't think I'm going to
get rid of.
It took me a little while to realize that the Spamassassin always says
that
Sancar Saran wrote:
Hi there, following words are my ideas about that HTML PHP parting. I hope you
can understand my broken english and do not take personally.
SEPERATING html FROM php ARE USELESS
Try customising a CMS (any open source) with html embedded in the php...
Good luck and get
Hello,
on 10/10/2006 08:14 PM Chris de Vidal said the following:
I think perhaps I'm using classes and OOP incorrectly. The last time
I used them, they were slow.
Your problem has nothing to do with OOP . It is the number of queries
that are making it solow. Creating an object takes
Rick Emery wrote:
Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on
Windows and execute stored procedures with output parameters within a
transaction? If so, how?
I'm trying to do something like this in the PHP application:
begin transaction
execute a stored procedure,
hi to all,
we are moving our web server from one to other hosting company. we have
chance to request what version of php i want to be installed, 4 or 5.
Current web server works on php 4.3.4 we don't use any classes,
functions only. as far as I know, in our case moving from 4 to 5
shouldn't
Afan Pasalic wrote:
hi to all,
we are moving our web server from one to other hosting company. we have
chance to request what version of php i want to be installed, 4 or 5.
Current web server works on php 4.3.4 we don't use any classes,
functions only. as far as I know, in our case moving
David Robley wrote:
Afan Pasalic wrote:
hi to all,
we are moving our web server from one to other hosting company. we have
chance to request what version of php i want to be installed, 4 or 5.
Current web server works on php 4.3.4 we don't use any classes,
functions only. as far as I know, in
75 matches
Mail list logo