|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 26 Jan 2006 02:53:20 -0000 Issue 3927
php-general-digest-help
lists.php.net
Date: Wed Jan 25 2006 - 20:53:20 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 26 Jan 2006 02:53:20 -0000 Issue 3927
Topics (messages 229235 through 229289):
Re: forwarding from virtual email account to real email account
229235 by: Binay\(Local\)
229236 by: Duncan Hill
229237 by: John Nichel
229239 by: Jochem Maas
229241 by: Jochem Maas
229242 by: Jim Moseby
229245 by: David Grant
229253 by: Richard Correia
229270 by: Dan Baker
function preg_match()
229238 by: Denyl Meneses Guillén
229240 by: Denyl Meneses Guillén
229243 by: David Grant
229246 by: John Nichel
229252 by: Richard Correia
229255 by: Denyl Meneses Guillén
Re: Google using PHP
http://www.google-store.com
229244 by: ben johnson
229258 by: tedd
Re: Google using PHP
"Google Store"
229247 by: Chris Shiflett
229250 by: Chris Shiflett
Re: wrapping anchor tags around a URL
229248 by: Ahmed Saad
229249 by: Ahmed Saad
229251 by: Ahmed Saad
Re: absolute vs relative path?
229254 by: Richard Correia
problem with parse_str
229256 by: dalini
Directory permissions
229257 by: Sugrue, Sean
Get timestamp?
229259 by: Jay Paulson
229263 by: Philip Hallstrom
229265 by: Max Schwanekamp
229267 by: Max Schwanekamp
Re: PHP / Apache + Error 500
229260 by: Gerry Danen
Counting files in directory and subdirectory!
229261 by: Nicholas Couloute
229264 by: tomasz abramowicz
229268 by: Weber Sites LTD
229273 by: Nicholas Couloute
229289 by: Nicholas Couloute
Please Help!
229262 by: S
229271 by: Michael Crute
229272 by: Steve Clay
Check for returned mail
229266 by: Justin Cook
Re: $_SESSION saves all values but Class -- works on one server butnot another?! [second plead for help]
229269 by: James Benson
way to write mysqli result set to disk
229274 by: jonathan
229282 by: Curt Zirzow
229283 by: jonathan
229285 by: James Benson
229286 by: David Hall
229288 by: PHP Superman
Does file_exists() 'honour' open_basedir?
229275 by: DRYALLS
News
229276 by: dd.cron.ru
Use VAR string value AS VAR Name
229277 by: Fernando Anchorena
229279 by: Mark Steudel
229281 by: Mark Steudel
usr VAR value as a VAR Name
229278 by: Fernando Anchorena
229280 by: Daevid Vincent
229284 by: James Benson
php -w causes a parse error
229287 by: Bom Demais
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi
I think i've been misunderstood here. I meant whether this is achievable
using PHP or not? I know and can be done very easily on server with either
control panel or manual intervene but its integration with PHP is my main
concern. I hope you understand what i mean.
Thanks,
Binay
----- Original Message -----
From: "Jochem Maas" <jochem
iamjochem.com>
To: "Binay" <binay
oliveinternet.com>
Cc: <php-general
lists.php.net>
Sent: Wednesday, January 25, 2006 6:48 PM
Subject: Re: [PHP] forwarding from virtual email account to real email
account
> Binay wrote:
>> Hi All,
>>
>>
>> Is it possible that we create a virtual email account(no physical
>> existence) e.g abc
example.com which will be associated with a real email
>> account e.g. real
yahoo.com so that if any body sends the email to
>> virtual email account abc
example.com will be automatically forwarded to
>> the real email account real
yahoo.com. Is it achievable using PHP ?
>> Please throw some light as this becoming a major requirement of my
>> client.
>
> how is it possible that you can list the following solutions/skills on
> your website and not know what an email alias is???
>
> Web Application Development
> Website Design & Development
> Web Hosting
> Search Engine Ranking Services
> Content Management Solution
> e-Commerce Solutions
> B2B & B2C Portal Development
> Intranet & Extranet Solutions
> Document Management System
> e-CRM Solutions
> Supply Chain Management
> Sales Force Automation
> Workflow Management Solutions
>
>>
>> Thanks in adance,
>> Binay
>
>
attached mail follows:
On Wednesday 25 January 2006 15:04, Binay(Local) wrote:
> Hi
>
> I think i've been misunderstood here. I meant whether this is achievable
> using PHP or not? I know and can be done very easily on server with either
> control panel or manual intervene but its integration with PHP is my main
> concern. I hope you understand what i mean.
It's probably do-able in B - all you're doing is feeding a data stream from
the MTA to a program.
If, however, you're doing it without involving and MTA, you may have problems.
attached mail follows:
Binay wrote:
> Hi All,
>
>
> Is it possible that we create a virtual email account(no physical existence) e.g abc
example.com which will be associated with a real email account e.g. real
yahoo.com so that if any body sends the email to virtual email account abc
example.com will be automatically forwarded to the real email account real
yahoo.com. Is it achievable using PHP ? Please throw some light as this becoming a major requirement of my client.
Asking if <this task> is possible in php doesn't make this a php
question, or even remotely php related. This is basic mail server
functionality.
Hey, I want to change the oil in my car, is this possible in PHP?
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
John Nichel wrote:
> Binay wrote:
>
>> Hi All,
>>
>>
>> Is it possible that we create a virtual email account(no physical
>> existence) e.g abc
example.com which will be associated with a real
>> email account e.g. real
yahoo.com so that if any body sends the email
>> to virtual email account abc
example.com will be automatically
>> forwarded to the real email account real
yahoo.com. Is it achievable
>> using PHP ? Please throw some light as this becoming a major
>> requirement of my client.
>
>
> Asking if <this task> is possible in php doesn't make this a php
> question, or even remotely php related. This is basic mail server
> functionality.
>
> Hey, I want to change the oil in my car, is this possible in PHP?
trust bloomin' John to come up with a sensible example ...
<humor class="barely" skip="if you are flammable">
John I need world peace and all the women to bow to my command, throw some light
on this - it's urgent. oh and I want it to have a pear-like cmdline interface
like so:
> peargirl install ajolie-submissive
<humor>
attached mail follows:
Binay(Local) wrote:
> Hi
>
> I think i've been misunderstood here. I meant whether this is achievable
> using PHP or not? I know and can be done very easily on server with
> either control panel or manual intervene but its integration with PHP is
> my main concern. I hope you understand what i mean.
you want someone else to check the manual for you to see if there is a
function called
create_fully_functional_email_alias_for_addr_regardless_of_whether_you_control_either_domain($alias, $email) ?
============
Your meaning to lazily ask very vague questions (in a manner unbefitting
the subject matter, using made-up terminology, while professing to be a
professional) in the hope that some is going to spoonfeed you a complete
solution which you can then roll out to your customer (probably my
customer until he got the braindead idea to outsource) in five minutes flat;
if I understand you correctly.
I dare you to ask a real php question, with sample code and stuff.
>
>
> Thanks,
> Binay
>
>
> ----- Original Message ----- From: "Jochem Maas" <jochem
iamjochem.com>
> To: "Binay" <binay
oliveinternet.com>
> Cc: <php-general
lists.php.net>
> Sent: Wednesday, January 25, 2006 6:48 PM
> Subject: Re: [PHP] forwarding from virtual email account to real email
> account
>
>
>> Binay wrote:
>>
>>> Hi All,
>>>
>>>
>>> Is it possible that we create a virtual email account(no physical
>>> existence) e.g abc
example.com which will be associated with a real
>>> email account e.g. real
yahoo.com so that if any body sends the email
>>> to virtual email account abc
example.com will be automatically
>>> forwarded to the real email account real
yahoo.com. Is it achievable
>>> using PHP ? Please throw some light as this becoming a major
>>> requirement of my client.
>>
>>
>> how is it possible that you can list the following solutions/skills on
>> your website and not know what an email alias is???
>>
>> Web Application Development
>> Website Design & Development
>> Web Hosting
>> Search Engine Ranking Services
>> Content Management Solution
>> e-Commerce Solutions
>> B2B & B2C Portal Development
>> Intranet & Extranet Solutions
>> Document Management System
>> e-CRM Solutions
>> Supply Chain Management
>> Sales Force Automation
>> Workflow Management Solutions
>>
>>>
>>> Thanks in adance,
>>> Binay
>>
>>
>>
>
attached mail follows:
>
> Hey, I want to change the oil in my car, is this possible in PHP?
if($accumulated_miles<3000){
keep_driving;
}else{
purchase_supplies('oil', 'filter');
drain_crankcase;
replace_filter;
oil_fill(15);
$accumulated_miles=0;
}
attached mail follows:
Binay,
I guess you could set up PHP to listen on port 25 and rewrite the
headers of mail messages containing aliases, but that seems like a lot
of work for what could easily be handled by a (much quicker) MTA.
David
--
David Grant
http://www.grant.org.uk/
attached mail follows:
Are you looking for something like this?
SMTP using PHP?
http://www.weberdev.com/get_example-4295.html
Thanks
Richard
On 1/25/06, Binay <binay
oliveinternet.com> wrote:
>
> Hi All,
>
>
> Is it possible that we create a virtual email account(no physical
> existence) e.g abc
example.com which will be associated with a real email
> account e.g. real
yahoo.com so that if any body sends the email to virtual
> email account abc
example.com will be automatically forwarded to the real
> email account real
yahoo.com. Is it achievable using PHP ? Please throw
> some light as this becoming a major requirement of my client.
>
> Thanks in adance,
> Binay
>
attached mail follows:
"Binay" <binay
oliveinternet.com> wrote:
> Hi All,
>
> Is it possible that we create a virtual email account(no physical
> existence) e.g abc
example.com
> which will be associated with a real email account e.g. real
yahoo.com so
> that if any body sends
> the email to virtual email account abc
example.com will be automatically
> forwarded to the real
> email account real
yahoo.com.
> Is it achievable using PHP ?
Are you trying to process the email between abc
example.com and
real
yahoo.com ?
And, are you trying to do that processing with PHP?
Something like a PHP file that gets launched everytime an email lands in
abc
example.com mailbox, then that PHP file loads the email, processes it,
and forwards the processed email to real
yahoo.com
Sounds like a cool idea. I don't know how to do it, but sounds cool.
DanB
attached mail follows:
When I try to use preg_match(), I get this...
Fatal error: Call to undefined function preg_match() in
/usr/home/www/library/defines.php on line 25
I have php5.0.4 ,web server Apache (Linux) .
as I can solve it?
Thanks,
Denyl.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
attached mail follows:
sorry , what is PCRE ?
I looking my configuration with phpinfo() and not exist PCRE or similar .
I'm using PHPmailer and and inside it calls to function preg_match , but i
want to run a simple example
...:: denyl.php
<?php
$subject = "abcdef";
$pattern = '/^def/';
preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3);
print_r($matches);
?>
and I get this :
Fatal error: Call to undefined function preg_match() in
/usr/local/apache133/htdocs/denyl.php on line 4
my phpinfo() is :
http://www.olvacourier.com/php.php
Thanks,
Denyl.
----- Original Message -----
From: "Melanie Maddix" <melanie.maddix
enermajica.com>
To: "Denyl Meneses Guillén" <dmeneses
olva.com.pe>;
<php-general
lists.php.net>
Sent: Wednesday, January 25, 2006 7:56 AM
Subject: RE: [PHP] function preg_match()
[snip]
When I try to use preg_match(), I get this...
Fatal error: Call to undefined function preg_match() in
/usr/home/www/library/defines.php on line 25
[/snip]
Do you get the error with all PCRE functions?
Take a look at your PCRE settings using phpinfo().
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.22/238 - Release Date: 23/01/2006
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
attached mail follows:
Denyl,
You need to call the person responsible for maintaining your box.
Denyl Meneses Guillén wrote:
> sorry , what is PCRE ?
Regular Expression Functions (Perl-Compatible)
> I looking my configuration with phpinfo() and not exist PCRE or similar .
That's because someone disabled it in the ./configure step
(--disable-all). Try using the following in the ./configure step:
--with-pcre-regex=DIR (where DIR is where PCRE's include and library
files are located)
David
--
David Grant
http://www.grant.org.uk/
attached mail follows:
Denyl Meneses Guillén wrote:
> sorry , what is PCRE ?
> I looking my configuration with phpinfo() and not exist PCRE or similar .
http://us2.php.net/pcre
> I'm using PHPmailer and and inside it calls to function preg_match , but i
> want to run a simple example
>
> ...:: denyl.php
>
> <?php
> $subject = "abcdef";
> $pattern = '/^def/';
> preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3);
> print_r($matches);
> ?>
>
> and I get this :
>
> Fatal error: Call to undefined function preg_match() in
> /usr/local/apache133/htdocs/denyl.php on line 4
>
> my phpinfo() is :
> http://www.olvacourier.com/php.php
>
> Thanks,
> Denyl.
>
>
> ----- Original Message -----
> From: "Melanie Maddix" <melanie.maddix
enermajica.com>
> To: "Denyl Meneses Guillén" <dmeneses
olva.com.pe>;
> <php-general
lists.php.net>
> Sent: Wednesday, January 25, 2006 7:56 AM
> Subject: RE: [PHP] function preg_match()
>
>
> [snip]
> When I try to use preg_match(), I get this...
>
> Fatal error: Call to undefined function preg_match() in
> /usr/home/www/library/defines.php on line 25
> [/snip]
>
> Do you get the error with all PCRE functions?
>
> Take a look at your PCRE settings using phpinfo().
>
>
>
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
Hey Denyl,
Simple workaround ...
you can use ereg_replace insted of preg_replace
http://www.weberdev.com/get_example.php3?Function=ereg-replace
You can sort out your PCRE installation/configuration later.
Thanks,
Richard
On 1/26/06, Denyl Meneses Guillén <dmeneses
olva.com.pe> wrote:
>
> When I try to use preg_match(), I get this...
>
> Fatal error: Call to undefined function preg_match() in
> /usr/home/www/library/defines.php on line 25
>
> I have php5.0.4 ,web server Apache (Linux) .
>
> as I can solve it?
>
> Thanks,
> Denyl.
>
>
>
>
>
>
>
>
attached mail follows:
now already I can see the light
thanks for your help,
Denyl.
----- Original Message -----
From: "John Nichel" <john
kegworks.com>
To: <php-general
lists.php.net>
Sent: Wednesday, January 25, 2006 8:30 AM
Subject: Re: [PHP] function preg_match()
> Denyl Meneses Guillén wrote:
> > sorry , what is PCRE ?
> > I looking my configuration with phpinfo() and not exist PCRE or similar
.
>
> http://us2.php.net/pcre
>
> > I'm using PHPmailer and and inside it calls to function preg_match , but
i
> > want to run a simple example
> >
> > ...:: denyl.php
> >
> > <?php
> > $subject = "abcdef";
> > $pattern = '/^def/';
> > preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3);
> > print_r($matches);
> > ?>
> >
> > and I get this :
> >
> > Fatal error: Call to undefined function preg_match() in
> > /usr/local/apache133/htdocs/denyl.php on line 4
> >
> > my phpinfo() is :
> > http://www.olvacourier.com/php.php
> >
> > Thanks,
> > Denyl.
> >
> >
> > ----- Original Message -----
> > From: "Melanie Maddix" <melanie.maddix
enermajica.com>
> > To: "Denyl Meneses Guillén" <dmeneses
olva.com.pe>;
> > <php-general
lists.php.net>
> > Sent: Wednesday, January 25, 2006 7:56 AM
> > Subject: RE: [PHP] function preg_match()
> >
> >
> > [snip]
> > When I try to use preg_match(), I get this...
> >
> > Fatal error: Call to undefined function preg_match() in
> > /usr/home/www/library/defines.php on line 25
> > [/snip]
> >
> > Do you get the error with all PCRE functions?
> >
> > Take a look at your PCRE settings using phpinfo().
> >
> >
> >
>
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel
dotcomholdingsofbuffalo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.22/238 - Release Date:
23/01/2006
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
attached mail follows:
They are using oscommerce specifically. An open source PHP shopping cart.
I have also come accross php errrors when accessing googles suggest feature,
some strange reaction with greesemonkey.
On 1/25/06, tedd <tedd
sperling.com> wrote:
>
> >Looks like google are using PHP and oscommerce for their web store:
> >http://www.google-store.com
> >
> >Nice to see :)
> >
> >James
>
> It would be nice to see them being w3c compliant, but they aren't.
>
> tedd
>
> --
>
> --------------------------------------------------------------------------------
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
>They are using oscommerce specifically. An open source PHP shopping cart.
ben:
Not that you said or implied otherwise.
<soapbox>
PHP or not, there's no reason I know of for not complying with w3c --
especially if you're high profile like Google. It's clear that they
are not concerned with disability issues.
</soapbox>
tedd
>I have also come accross php errrors when accessing googles suggest
>feature, some strange reaction with greesemonkey.
>
>On 1/25/06, tedd <<mailto:tedd
sperling.com>tedd
sperling.com> wrote:
>
> >Looks like google are using PHP and oscommerce for their web store:
>><http://www.google-store.com>http://www.google-store.com
>>
>>Nice to see :)
>>
>>James
>
>It would be nice to see them being w3c compliant, but they aren't.
>
>tedd
>
>--
>--------------------------------------------------------------------------------
><http://sperling.com/>http://sperling.com/
>
>--
>PHP General Mailing List (<http://www.php.net/> http://www.php.net/)
>To unsubscribe, visit:
><http://www.php.net/unsub.php>http://www.php.net/unsub.php
--
--------------------------------------------------------------------------------
http://sperling.com/
attached mail follows:
Dan Lowe wrote:
> It's implied right on the front page it's not directly run by Google.
I'm not sure why it matters, but the real Google store appears to use ASP:
http://www.googlestore.com/home.asp
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
attached mail follows:
> I'm not sure why it matters, but the real Google store appears to use ASP:
>
> http://www.googlestore.com/home.asp
My mistake. Apparently there are different sites for different countries.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
attached mail follows:
On 1/23/06, Richard K Miller <richardkmiller
gmail.com> wrote:
> function link_the_links($s) {
> return preg_replace('
(http://[^\s]+)
sm', '<a href="$1">$1</a>', $s);
> }
> I've got to somehow ignore the trailing period if it is present.
if ($s[strlen($s)-1] == '.'){
$s = substr($s, 0, -1);
}
-ahmed
attached mail follows:
On 1/25/06, Ahmed Saad <ahmed.lists
gmail.com> wrote:
> On 1/23/06, Richard K Miller <richardkmiller
gmail.com> wrote:
>
> > function link_the_links($s) {
> > return preg_replace('
(http://[^\s]+)
sm', '<a href="$1">$1</a>', $s);
> > }
> if ($s[strlen($s)-1] == '.'){
> $s = substr($s, 0, -1);
> }
oops! sorry i thought $s had only one link (per time) no all of them
-ahmed
attached mail follows:
On 1/25/06, Ahmed Saad <ahmed.lists
gmail.com> wrote:
> On 1/25/06, Ahmed Saad <ahmed.lists
gmail.com> wrote:
> > On 1/23/06, Richard K Miller <richardkmiller
gmail.com> wrote:
> >
> > > function link_the_links($s) {
> > > return preg_replace('
(http://[^\s]+)
sm', '<a href="$1">$1</a>', $s);
> > > }
try "looking ahead" in the first regex
http://www.regular-expressions.info/lookaround.html
-ahmed
attached mail follows:
I would suggest to keep a simple variable $HOSTNAME in your config file.
Thanks
Richard
On 1/25/06, William Stokes <kalles
operamail.com> wrote:
>
> Hello,
>
> I Have a web site on one server and a test site on another. How can I
> build
> the hyperlinks so that they work on both servers without modification.
>
> For example build this link dynamically:
> "http://www.domain.com/www/test.php
>
> In test server the same should be:
> "http://internalserver/www/test.php
>
> Thanks
> -Will
>
attached mail follows:
version: 4.3.2
the example from:
http://de2.php.net/manual/en/function.parse-str.php
$str = "first=value&arr[]=foo+bar&arr[]=baz";
parse_str($str);
echo $first; // value
echo $arr[0]; // foo bar
echo $arr[1]; // baz
parse_str($str, $output);
echo $output['first']; // value
echo $output['arr'][0]; // foo bar
echo $output['arr'][1]; // baz
produces:
value&arr[]=foo bar&arr[]=bazvalue&arr[]=foo bar&arr[]=baz
or slightly modified:
for first: value&arr[]=foo bar&arr[]=baz
for arr[0]:
for arr[1]:
which isn't the intended behavior :/
any ideas?
greetings
dalini
attached mail follows:
Does anyone know if there is a way to change permission on a directory
on a Solaris OS through php? And if there is a way authenticate the
owner of
the directory through an rlogin or su.
Sean
attached mail follows:
For some reason my brain isn't working correctly today.
How would I go about getting the timestamp of a day of the week from 7 weeks
ago?
In my case I'm getting the timestamp of last Sunday (no matter what day of
the week it is currently) and I want to get the timestamp of the Sunday that
happened 7 weeks ago.
$lastSunday = strtotime("last Sunday");
$Sunday7Weeks = $lastSunday - ???;
Thanks
attached mail follows:
> How would I go about getting the timestamp of a day of the week from 7 weeks
> ago?
>
> In my case I'm getting the timestamp of last Sunday (no matter what day of
> the week it is currently) and I want to get the timestamp of the Sunday that
> happened 7 weeks ago.
>
> $lastSunday = strtotime("last Sunday");
> $Sunday7Weeks = $lastSunday - ???;
$Sunday7Weeks = $lastSunday - 86400 * 7 * 7; // 86400 seconds in a day
-philip
attached mail follows:
Jay Paulson wrote:
> How would I go about getting the timestamp of a day of the week from
7 weeks
> ago?
> $lastSunday = strtotime("last Sunday");
> $Sunday7Weeks = $lastSunday - ???;
$lastsunday = strtotime("last Sunday");
$sunday7weeks = $lastsunday - (86400 * 49); // 7 weeks = 49 days
Test:
echo 'Last Sunday\'s date was '.date("m/d/y",$lastsunday);
echo '<br>7 Weeks prior to Last Sunday, the date was
'.date("m/d/y",$sunday7weeks);
--
Max Schwanekamp
http://www.neptunewebworks.com/
attached mail follows:
Max Schwanekamp wrote:
> Jay Paulson wrote:
> > How would I go about getting the timestamp of a day of the week from
> 7 weeks
> > ago?
>
> $lastsunday = strtotime("last Sunday");
> $sunday7weeks = $lastsunday - (86400 * 49); // 7 weeks = 49 days
Oops, that would be the sunday 7 weeks prior to _last_ Sunday, which
would really be Sunday 8 weeks ago, so maybe change the 49 to 42...
--
Max Schwanekamp
http://www.neptunewebworks.com/
attached mail follows:
Interestingly, I installed mod_security the other day and noticed
error 500 show up. As it turns out, mod_security generates those when
they block nasties.
Gerry
On 1/25/06, Thomas <thomas.hochstetter
gmx.net> wrote:
>
> Hi there!
>
> I am sitting with something of a mystery and was wondering if there is
> someone out that might have dealt with this before:
>
> I have developed a site that runs well and fine on my machine
> (XP/Apache2/PHP5/MySQL5). I am using PEAR::HTML_Template_Flexy as well as
> Cache_Lite.
>
> The site has been put up on the live server and works (mostly) fine there
> too, with the exception of Internal Server errors 500, ever so often. It's
> pretty random and can happen to any of the scripts (they all run through a
> single index.php script that instantiates objects that then spit out the
> resulting html).
>
> I had a look at the Apache log file I got from the SP ... no clue. All I
> know is that they use Apache 1.x/PHP5/Linux/MySQL(v4?).
>
> They say that it is not their server but my scripts, however, if that was
> the case I would get these errors on my machine too. Also, the randomness of
> this also indicates that it can't really be my php scripts, otherwise it
> would happen all the time.
>
> Does anybody have any suggestion as to how I can solve this issue? I know
> this is pretty vague information, but it's all I have (hence the confusion).
>
> Thanks,
> Thomas
>
>
> SPIRAL EYE STUDIOS
> P.O. Box 37907, Faerie Glen, 0043
>
> Tel: +27 12 362 3486
> Fax: +27 12 362 3493
> Mobile: +27 82 442 9228
> Email: thomas.hochstetter
gmx.net
> Web: www.spiraleye.co.za
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Gerry
http://portal.danen.org/
attached mail follows:
I want a script where it will count all the amrs in a folder and it's
sub folders like this setup:
amrs >
50 cent > amrs
nitty > amrs
bob > amrs
How would I do this?
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com
attached mail follows:
start here: http://www.php.net/readdir
check out as well: 'string functions' for finding 'amrs'
and loops to make recursive search...
t.
Nicholas Couloute wrote:
> I want a script where it will count all the amrs in a folder and it's
> sub folders like this setup:
> amrs >
> 50 cent > amrs
> nitty > amrs
> bob > amrs
> How would I do this?
> ~Nick Couloute
> co-owner/Web Designer
> Sidekick2Music.Com
>
attached mail follows:
You can start with looking at some code examples that do similar things :
Directory browser
http://www.weberdev.com/get_example-1539.html
How to get a dir listing of the current dir of php script in an array
http://www.weberdev.com/get_example-1855.html
filesystem Show Files Script
http://www.weberdev.com/get_example-4240.html
Sincerely
berber
Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code examples : http://www.weberdev.com
PHP & MySQL Forums : http://www.weberforums.com
Learn PHP & MySQL Playing Trivia : http://www.webertrivia.com
PHP Web Logs : http://www.weberblogs.com
Web Development Index http://www.weberindex.com
Web Templates http://www.webertemplates.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Free Uptime Monitor : http://uptime.weberdev.com
PHP content for your site : http://content.weber-sites.com
-----Original Message-----
From: Nicholas Couloute [mailto:njcjr
tmail.com]
Sent: Wednesday, January 25, 2006 9:41 PM
To: php-general
lists.php.net
Subject: [PHP] Counting files in directory and subdirectory!
I want a script where it will count all the amrs in a folder and it's sub
folders like this setup:
amrs >
50 cent > amrs
nitty > amrs
bob > amrs
How would I do this?
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
I have used these functions but how would I count them! here is my
attempt that doesn't work!:
$count = 0;
$dir = "/amrs";
$files1 = scandir($dir);
if ($files1 !== '.' && $files1 !== '..') {
foreach ($files1 as $files2){
$dir2 = "/amrs/$files2";
$files3 = scandir($dir2);
if ($files3 !== '.' && $files3 !== '..') {
foreach ($files3 as $files4){
$dir3 = "/amrs/$files2/$files4";
$files5 = scandir($dir3);
if ($files5 !== '.' && $files5 !== '..') {
foreach ($files5 as $files6){
$count++;
}
}
}
}
}
}
echo "$count";
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com
attached mail follows:
here is what I tried but it doesn't work! any advice suggestions or
something?
$count = 0;
$dir = "/amrs";
$files1 = scandir($dir);
if ($files1 !== '.' && $files1 !== '..') {
foreach ($files1 as $files2){
$dir2 = "/amrs/$files2";
$files3 = scandir($dir2);
if ($files3 !== '.' && $files3 !== '..') {
foreach ($files3 as $files4){
$dir3 = "/amrs/$files2/$files4";
$files5 = scandir($dir3);
if ($files5 !== '.' && $files5 !== '..') {
foreach ($files5 as $files6){
$count++;
}
}
}
}
}
}
echo "$count";
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com
attached mail follows:
Dear Sir/Madam:
I am trying to split a DSA signature that is generated by openssl_sign()
function in PHP, which should be made up of 2 numbers: r and s, but I don't
know how to build the structure of the signature generated by PHP and then
to split it into two numbers (r,s). Which method might I use to split the
signature I have built in PHP into (r,s)? How can I know what the signature
looks like? I appreciate your any helps in advance. I am looking forward to
hearing from you.
attached mail follows:
> Dear Sir/Madam:
>
> I am trying to split a DSA signature that is generated by openssl_sign()
> function in PHP, which should be made up of 2 numbers: r and s, but I don't
> know how to build the structure of the signature generated by PHP and then
> to split it into two numbers (r,s). Which method might I use to split the
> signature I have built in PHP into (r,s)? How can I know what the signature
> looks like? I appreciate your any helps in advance. I am looking forward to
> hearing from you.
http://www.catb.org/~esr/faqs/smart-questions.html
*SIGH* How many times must you tell people to use a descriptive
subject line. I swear reading ESR's how to ask questions the smart way
should be a requirement to posting on lists.
-Mike
--
________________________________
Michael E. Crute
Software Developer
SoftGroup Development Corporation
Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.
attached mail follows:
Wednesday, January 25, 2006, 2:52:21 PM, wrote:
> Which method might I use to split the signature I have built in PHP into
> (r,s)? How can I know what the signature looks like?
Run the function http://us2.php.net/openssl_sign and pass it a $signature.
According to the manual, if successful, $signature will be altered. You
tell /us/ what it looks like and we'll help you split it. ;)
Steve
--
http://mrclay.org/
attached mail follows:
If I setup a mail script with PHP to mail out to a list of users, is it possible to check if any of the sent emails were returned? We want to setup a paperless billing application for our customers and need to ensure that they are actually getting their bill. It would be preferable if the script can detect the returned mail so it can post an entry in the database that the bill was not sent or email the admin with an error report. The script will reside on a Linux box using Sendmail. Thanks!
attached mail follows:
Daevid Vincent wrote:
> Thank you, but again, not the problem.
>
> The same code is on both servers. I'm not transfering from one server to
> another. Only from page to page ON THE SAME SERVER.
>
> This has to be a configuration problem IMHO.
>
>> -----Original Message-----
>> From: James Benson [mailto:jb
jamesbenson.co.uk]
>> Sent: Tuesday, January 24, 2006 3:45 PM
>> To: php-general
lists.php.net
>> Subject: [PHP] Re: $_SESSION saves all values but Class --
>> works on one server butnot another?! [second plead for help]
>>
>> Take a look at the following functions:-
>>
>> http://php.net/serialize
>> http://php.net/unserialize
Im sure if you tried those functions I suggested it will work, it does
not matter whether you are using a different server or different page,
with serialize it will rebuild the saved object back into how it was
origanally and you should be able to retain the object values across
multiple script requests!
James
---------------------------------------------------------
http://www.ciwcertified.com - Master CIW Designer
http://www.zend.com - Zend Certified Engineer
http://www.jamesbenson.co.uk
---------------------------------------------------------
attached mail follows:
is there a way to write a mysqli result set to disk via
file_put_contents or fwrite. it looks like we'd have to convert it to
an array and then handle the array upon bringing it back in. I'm
interested in writing a simple caching mechanism where sql results
would be cached.
thanks,
jonathan
attached mail follows:
On Wed, Jan 25, 2006 at 03:39:38PM -0800, jonathan wrote:
> is there a way to write a mysqli result set to disk via
> file_put_contents or fwrite. it looks like we'd have to convert it to
> an array and then handle the array upon bringing it back in. I'm
> interested in writing a simple caching mechanism where sql results
> would be cached.
Mysql can do all this for you.. see:
http://mysql.com/sql_cache
Curt.
--
cat .signature: No such file or directory
attached mail follows:
hmm.... is this a mysql 5 feature. could be interesting but haven't
heard much about it.
-j
On Jan 25, 2006, at 5:24 PM, Curt Zirzow wrote:
> On Wed, Jan 25, 2006 at 03:39:38PM -0800, jonathan wrote:
>> is there a way to write a mysqli result set to disk via
>> file_put_contents or fwrite. it looks like we'd have to convert it to
>> an array and then handle the array upon bringing it back in. I'm
>> interested in writing a simple caching mechanism where sql results
>> would be cached.
>
> Mysql can do all this for you.. see:
>
> http://mysql.com/sql_cache
>
> Curt.
> --
> cat .signature: No such file or directory
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
jonathan wrote:
> hmm.... is this a mysql 5 feature. could be interesting but haven't
> heard much about it.
>
You cannot see the mysql 5 plastered all over the page?
I can see at least 5 different sections that say MySQL 5
James
attached mail follows:
James Benson wrote:
> jonathan wrote:
>> hmm.... is this a mysql 5 feature. could be interesting but haven't
>> heard much about it.
>>
>
>
>
> You cannot see the mysql 5 plastered all over the page?
>
>
> I can see at least 5 different sections that say MySQL 5
>
you obviously don't use the mysql website enough to know that just cause
you're looking in the mysql 5 manual, its a mysql 5 feature.
http://dev.mysql.com/doc/refman/4.1/en/query-cache-in-select.html
That's proof it was before mysql 5, because mysql 5 isn't plastered
everywhere . . .
Your reply was rude and unintelligent
(Oh noes . . . http://dev.mysql.com/doc/refman/5.1/en/select.html Select
statements are a mysql 5.1 only feature. We're gonna die . . .)
David Hall
attached mail follows:
couldn't you serialize the data and store it?
On 1/25/06, David Hall <dhall
wustl.edu> wrote:
>
> James Benson wrote:
> > jonathan wrote:
> >> hmm.... is this a mysql 5 feature. could be interesting but haven't
> >> heard much about it.
> >>
> >
> >
> >
> > You cannot see the mysql 5 plastered all over the page?
> >
> >
> > I can see at least 5 different sections that say MySQL 5
> >
>
> you obviously don't use the mysql website enough to know that just cause
> you're looking in the mysql 5 manual, its a mysql 5 feature.
> http://dev.mysql.com/doc/refman/4.1/en/query-cache-in-select.html
> That's proof it was before mysql 5, because mysql 5 isn't plastered
> everywhere . . .
>
> Your reply was rude and unintelligent
>
> (Oh noes . . . http://dev.mysql.com/doc/refman/5.1/en/select.html Select
> statements are a mysql 5.1 only feature. We're gonna die . . .)
>
>
> David Hall
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
attached mail follows:
I have 2 different PHP installs, each are slightly different versions, and
each have different open_basedir restictions.
I have a PHP script that fails on ONE of the installs but NOT the other.
The line that fails is $foo = file_exists("/proc/loadavg");
What I don't understand is why one script fails, yet the other does not
because NEITHER have /proc in the open_basedir path.
What could be different about the PHP configs that makes one report a PHP
warning, yet the other does not?
attached mail follows:
Your archive is attached.
attached mail follows:
I'm stuck trying to get work this :
This is an example
page1.php
=======================================
<form action="/page2.php?form=yes" method="post">
$sql_pro ="SELECT Sid FROM table";
$res_pro =
mysql_query( $sql_pro);
while ($campo_pro =
mysql_fetch_array($res_pro)) {
$sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
$sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
$sid_pro as a VAR name *$sid_pro = p4*
print "<td > *<input name='$sid_pro' type= 'radio'
value='SOLVE_ME'/>* </td>"; // *name=p4 *
BLA BLA BLA
}
SUBMIT FORM
=======================================
page2.php
=======================================
$sqlname = "SELECT Sid FROM Table";
$res = mysql_query ($sqlname) ;
while ($campo_pro = mysql_fetch_array($res)) {
$name1 = $campo_pro["Sid"]; // *$name1 = 4*
$radio = '$'.'p'.$name1 ; // *$radio = $p4
----------------------
Now the Problem
**How can I get the Value SOLVE_ME from the submited form ?*
}
======================================
Thanks in Advance.
attached mail follows:
Either try:
$sid_pro = "p".$sid_pro;
or try:
<input name='".$p{$sid_pro}."' type= 'radio' value='SOLVE_ME'/>
-----Original Message-----
From: Fernando Anchorena [mailto:fernando.anchorena
gmail.com]
Sent: Wednesday, January 25, 2006 4:12 PM
To: php-general
lists.php.net
Subject: [PHP] Use VAR string value AS VAR Name
I'm stuck trying to get work this :
This is an example
page1.php
=======================================
<form action="/page2.php?form=yes" method="post"> $sql_pro ="SELECT Sid FROM
table"; $res_pro =
mysql_query( $sql_pro);
while ($campo_pro =
mysql_fetch_array($res_pro)) {
$sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
$sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
$sid_pro as a VAR name *$sid_pro = p4*
print "<td > *<input name='$sid_pro' type= 'radio'
value='SOLVE_ME'/>* </td>"; // *name=p4 *
BLA BLA BLA
}
SUBMIT FORM
=======================================
page2.php
=======================================
$sqlname = "SELECT Sid FROM Table";
$res = mysql_query ($sqlname) ;
while ($campo_pro = mysql_fetch_array($res)) {
$name1 = $campo_pro["Sid"]; // *$name1 = 4*
$radio = '$'.'p'.$name1 ; // *$radio = $p4
----------------------
Now the Problem
**How can I get the Value SOLVE_ME from the submited form ?*
}
======================================
Thanks in Advance.
attached mail follows:
Sorry I totally didn't read the question fully ....
-----Original Message-----
From: Mark Steudel [mailto:mark
netriver.net]
Sent: Wednesday, January 25, 2006 4:28 PM
To: php-general
lists.php.net
Subject: RE: [PHP] Use VAR string value AS VAR Name
Either try:
$sid_pro = "p".$sid_pro;
or try:
<input name='".$p{$sid_pro}."' type= 'radio' value='SOLVE_ME'/>
-----Original Message-----
From: Fernando Anchorena [mailto:fernando.anchorena
gmail.com]
Sent: Wednesday, January 25, 2006 4:12 PM
To: php-general
lists.php.net
Subject: [PHP] Use VAR string value AS VAR Name
I'm stuck trying to get work this :
This is an example
page1.php
=======================================
<form action="/page2.php?form=yes" method="post"> $sql_pro ="SELECT Sid FROM
table"; $res_pro =
mysql_query( $sql_pro);
while ($campo_pro =
mysql_fetch_array($res_pro)) {
$sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
$sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
$sid_pro as a VAR name *$sid_pro = p4*
print "<td > *<input name='$sid_pro' type= 'radio'
value='SOLVE_ME'/>* </td>"; // *name=p4 *
BLA BLA BLA
}
SUBMIT FORM
=======================================
page2.php
=======================================
$sqlname = "SELECT Sid FROM Table";
$res = mysql_query ($sqlname) ;
while ($campo_pro = mysql_fetch_array($res)) {
$name1 = $campo_pro["Sid"]; // *$name1 = 4*
$radio = '$'.'p'.$name1 ; // *$radio = $p4
----------------------
Now the Problem
**How can I get the Value SOLVE_ME from the submited form ?*
}
======================================
Thanks in Advance.
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
I'm stuck trying to get work this :
This is an example
page1.php
=======================================
<form action="/page2.php?form=yes" method="post">
$sql_pro ="SELECT Sid FROM table";
$res_pro =
mysql_query( $sql_pro);
while ($campo_pro =
mysql_fetch_array($res_pro)) {
$sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
$sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
$sid_pro as a VAR name *$sid_pro = p4*
print "<td > *<input name='$sid_pro' type= 'radio'
value='SOLVE_ME'/>* </td>"; // *name=p4 *
BLA BLA BLA
}
SUBMIT FORM
=======================================
page2.php
=======================================
$sqlname = "SELECT Sid FROM Table";
$res = mysql_query ($sqlname) ;
while ($campo_pro = mysql_fetch_array($res)) {
$name1 = $campo_pro["Sid"]; // *$name1 = 4*
$radio = '$'.'p'.$name1 ; // *$radio = $p4
----------------------
Now the Problem
**How can I get the Value SOLVE_ME from the submited form ?*
}
======================================
Thanks in Advance
attached mail follows:
> This is an example
> page1.php
> =======================================
> <form action="/page2.php?form=yes" method="post">
> $sql_pro ="SELECT Sid FROM table";
> $res_pro =
mysql_query( $sql_pro);
> while ($campo_pro =
mysql_fetch_array($res_pro)) {
> $sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
> $sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
> $sid_pro as a VAR name *$sid_pro = p4*
> print "<td > *<input name='$sid_pro' type= 'radio'
> value='SOLVE_ME'/>* </td>"; // *name=p4 *
> BLA BLA BLA
> }
Change to: print "<td > *<input name='".$sid_pro."' type....
And this will give your input radio button a name of whatever $sid_pro is.
Let's say that is 'myradio'
Then your form will render like
<td > *<input name='myradio' type....
Whent the form is submitted, you would check $_POST['myradio'] (or
$_GET['myradio'])
I think there is a flaw with your logic though, as RADIO buttons must ALL be
named the same thing in a group of them and you would use the VALUE portion
instead. (only one radio button may be selected)
You could use a CHECKBOX if each one is to have a different $sid_pro name
however.
> page2.php
> =======================================
> $sqlname = "SELECT Sid FROM Table";
> $res = mysql_query ($sqlname) ;
> while ($campo_pro = mysql_fetch_array($res)) {
> $name1 = $campo_pro["Sid"]; // *$name1 = 4*
> $radio = '$'.'p'.$name1 ; // *$radio = $p4
> ----------------------
> Now the Problem
> **How can I get the Value SOLVE_ME from the submited form ?*
> }
attached mail follows:
if(isset($_POST['NAME_OF_FORM_VALUE'])) {
// radio button was selected
}
Fernando Anchorena wrote:
> I'm stuck trying to get work this :
>
> This is an example
> page1.php
> =======================================
> <form action="/page2.php?form=yes" method="post">
> $sql_pro ="SELECT Sid FROM table";
> $res_pro =
mysql_query( $sql_pro);
> while ($campo_pro =
mysql_fetch_array($res_pro)) {
> $sid_pro = $campo_pro["Sid"]; // *sid_pro = 4*
> $sid_pro = 'p'.$sid_pro; // I'm trying to use de value of
> $sid_pro as a VAR name *$sid_pro = p4*
> print "<td > *<input name='$sid_pro' type= 'radio'
> value='SOLVE_ME'/>* </td>"; // *name=p4 *
> BLA BLA BLA
> }
> SUBMIT FORM
> =======================================
>
> page2.php
> =======================================
> $sqlname = "SELECT Sid FROM Table";
> $res = mysql_query ($sqlname) ;
> while ($campo_pro = mysql_fetch_array($res)) {
> $name1 = $campo_pro["Sid"]; // *$name1 = 4*
> $radio = '$'.'p'.$name1 ; // *$radio = $p4
> ----------------------
> Now the Problem
> **How can I get the Value SOLVE_ME from the submited form ?*
>
> }
> ======================================
>
>
> Thanks in Advance
--
---------------------------------------------------------
http://www.ciwcertified.com - Master CIW Designer
http://www.zend.com - Zend Certified Engineer
http://www.jamesbenson.co.uk
---------------------------------------------------------
attached mail follows:
I wanted to run "php -w" on my include files on the live server to reduce
overhead. But php -w causes parse errors in the include files. Here's an
example of what happens:
tanner /php_files
% php -l misc.inc
No syntax errors detected in misc.inc
tanner /php_files
% php -w misc.inc > misc.stripped.inc
tanner /php_files
% php -l misc.stripped.inc
PHP Parse error: parse error, unexpected '&', expecting ']' in
misc.stripped.inc on line 2
Parse error: parse error, unexpected '&', expecting ']' in misc.stripped.inc
on line 2
Errors parsing misc.stripped.inc
Of course i try to look at line 2 to see what the error is, but now the
whole file is on line 2, so there's no way to know what's breaking!
please let me know if you have any suggestions.
Thanks!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]