Re: [PHP] mail function and headers

2008-03-13 Thread Alain Roger
Hi Chris,

interesting thing, but i get the following error message :
*Warning*: mail()
[function.mailhttp://test4.rogtek.com/common/function.mail]:
SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE
MODE. in */test4/common/sendmail.php* on line *119*

how can i solve this by only PHP ? i do not have access to web hosting
server or php.ini.
thx,
Alain.


On Thu, Mar 13, 2008 at 12:57 AM, Chris [EMAIL PROTECTED] wrote:


  as you can see my Return-Path is still pointing on the wrong direction
 :-(
  any other idea ?

 return-path is set with the 5th mail() param:

 mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]');


 --
 Postgresql  php tutorials
 http://www.designmagick.com/




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] mail function and headers

2008-03-13 Thread Chris

Alain Roger wrote:

Hi Chris,

interesting thing, but i get the following error message :
*Warning*: mail() [function.mail 
http://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction 
in effect. The fifth parameter is disabled in SAFE MODE. in 
*/test4/common/sendmail.php* on line *119*


how can i solve this by only PHP ? i do not have access to web hosting 
server or php.ini.


1 of 2 options.

1) Find another host with safe-mode disabled
2) Use something like phpmailer to send your emails through an smtp server

--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP] php cron to check and remove files

2008-03-13 Thread Steven Macintyre
 Hi,

I need to be able to do the following procedure;

retrieve all items from a mysql db table, then check to see if the files from 
that table exist on the server (images), if not, to clean up and remove the 
physical file - so that only the files from the db exist.

This will run via cron

Has anyone done something similar before, willing to assist me with a basic 
scope of actions to work on?

Thanks in advance

Steven


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



Re: [PHP] mail function and headers

2008-03-13 Thread Alain Roger
hiChris,

i've read several forums where this mail() function from PHP initial package
is not so great.
Therefore a lot of people use PHPMailer which is more convenient for that
purpose...especially more flexible.

thanks a lot for your help.

Alain

On Thu, Mar 13, 2008 at 8:35 AM, Chris [EMAIL PROTECTED] wrote:

 Alain Roger wrote:
  Hi Chris,
 
  interesting thing, but i get the following error message :
  *Warning*: mail() [function.mail
  http://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction
  in effect. The fifth parameter is disabled in SAFE MODE. in
  */test4/common/sendmail.php* on line *119*
 
  how can i solve this by only PHP ? i do not have access to web hosting
  server or php.ini.

 1 of 2 options.

 1) Find another host with safe-mode disabled
 2) Use something like phpmailer to send your emails through an smtp server

 --
 Postgresql  php tutorials
 http://www.designmagick.com/




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] php cron to check and remove files

2008-03-13 Thread Steven Macintyre

Do you already have some code? Do you got stuck somewhere?


No, i didnt even know where to start with the flow; but sitting on the toilet 
produces wonderfull ideas!

I have the following in mind; list the entire directory into an array, using a 
foreach to check on the db if the file exists, then remove if not.

I was TRYING to start by doing it the other way round

I shouldnt have a problem now :)

S


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



Re: [PHP] php cron to check and remove files

2008-03-13 Thread Aschwin Wesselius

Steven Macintyre wrote:

Do you already have some code? Do you got stuck somewhere?




No, i didnt even know where to start with the flow; but sitting on the toilet 
produces wonderfull ideas!


What makes sitting on a toilet any difference than sitting anywhere 
else? Is it a magic toiletseat? ;-)


Why don't you just put a toiletseat behind your desk? Saves the effort 
walking down to the restroom.

--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] php cron to check and remove files

2008-03-13 Thread Aschwin Wesselius

Steven Macintyre wrote:

 Hi,

I need to be able to do the following procedure;

retrieve all items from a mysql db table, then check to see if the files from that table 
exist on the server (images), if not, to clean up and remove the physical 
file - so that only the files from the db exist.

This will run via cron

Has anyone done something similar before, willing to assist me with a basic 
scope of actions to work on?


Hi,

Do you already have some code? Do you got stuck somewhere?

Aschwin Wesselius

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



Re: [PHP] php cron to check and remove files

2008-03-13 Thread Per Jessen
Steven Macintyre wrote:

 retrieve all items from a mysql db table, then check to see if the
 files from that table exist on the server (images), if not, to clean
 up and remove the physical file - so that only the files from the db
 exist.

When you are comparing the contents of disk vs. db, you have three
possible outcomes:

1) file is listed in db, but not found on disk
2) file is found on disk, but not in db.
3) file is found on disk and in db. 

I think I'd probably read the directories of where the physical files
are located into an array = files_in_disk(), then read in the file list
from the database into files_in_db().  Use array_diff() to identify the
discrepancies, then sort them out (delete file, add row, delete row).

for files_on_disk(), lookup opendir() and readdir(). 
for files_in_db(), lookup mysql_query() and mysql_fetch_assoc().

Will consume a lot of memory if you've got a lot of files. 



/Per Jessen, Zürich


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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread tedd

At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know) 
during the winter we have so much snow on the ground that you just 
kind of drive where ever looks like road... Even if it means you 
have people passing on your right going the opposite way.


Yeah, but those are mostly Dutch -- you never know where they're going. :-)

It's a bit different here in Lansing -- with most being politicians, 
we all drive in circles.


Cheers,

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

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread tedd

At 11:30 AM -0400 3/12/08, Wolf wrote:
Here in the state of North Carolina (otherwise known as confusion 
central during ANY type of weather) they drive anywhere between the 
2 white lines, generally as slow as humanly possible with their 
blinkers on and tieing up all lanes...  Even during a 85 degree, 0% 
overcast, 0% humidity day...  *grumble*


I only do that when my kids (now adults) are in the car. You have to 
live up to expectations.


Cheers,

tedd

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

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Thijs Lensselink

Quoting tedd [EMAIL PROTECTED]:


At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know)   
during the winter we have so much snow on the ground that you just   
kind of drive where ever looks like road... Even if it means you   
have people passing on your right going the opposite way.


Yeah, but those are mostly Dutch -- you never know where they're going. :-)

It's a bit different here in Lansing -- with most being politicians, we
all drive in circles.



It's always the Dutch huh! :) It's because in our small ountry all  
traffic is stuck all day long. So when it finally moves it goes all  
directions :)




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



Re: [PHP] Know a JS list serve

2008-03-13 Thread tedd

At 9:14 AM +0100 3/12/08, Frank Arensmeier wrote:

11 mar 2008 kl. 22.39 skrev Skip Evans:


Hey all,

I've been Googling trying to find a JavaScript list serve to post a 
question to, but have been, embarrassingly, unable to find one.


Anyone on one they'd recommend or know of one?



Evolt has a rather good list (not too much traffic, but still ...)

http://lists.evolt.org/mailman/listinfo/javascript



I second that -- good people.

Cheers,

tedd

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

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



[PHP] Intercepting errors

2008-03-13 Thread It Maq
Hi,

Now i know how to create errors with trigger_error, but i am wondering how can 
I make my error handling class intercept any kind of error although i'm not 
aware about it and i don't know if it will happen. Is this possible?

Thank you




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] Intercepting errors

2008-03-13 Thread Richard Heyes

Now i know how to create errors with trigger_error, but i am
wondering how can I make my error handling class intercept any kind
of error although i'm not aware about it and i don't know if it will
happen. Is this possible?


You could use set_error_handler():

http://uk.php.net/manual/en/function.set-error-handler.php

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 10:06 AM, Thijs Lensselink [EMAIL PROTECTED] wrote:

  It's always the Dutch huh! :) It's because in our small ountry all
  traffic is stuck all day long. So when it finally moves it goes all
  directions :)

Not quite as bad as they do in India.  I saw this a few weeks ago
and was amazed.  SFW.

http://www.youtube.com/watch?v=RjrEQaG5jPM


-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Jason Pruim


On Mar 13, 2008, at 9:25 AM, tedd wrote:


At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know)  
during the winter we have so much snow on the ground that you just  
kind of drive where ever looks like road... Even if it means you  
have people passing on your right going the opposite way.


Yeah, but those are mostly Dutch -- you never know where they're  
going. :-)


It's a bit different here in Lansing -- with most being politicians,  
we all drive in circles.



Now don't go saying anything bad about the Dutch... Or my penny  
pinching ass might have to make the 30 minute drive to lansing! :P



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 10:40 AM, Jason Pruim [EMAIL PROTECTED] wrote:

  Now don't go saying anything bad about the Dutch... Or my penny
  pinching ass might have to make the 30 minute drive to lansing! :P

Calm down, prune.

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



RE: [PHP] A Quick Reminder....

2008-03-13 Thread Stephane Ulysse


-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 10:37 AM
To: Thijs Lensselink
Cc: php-general@lists.php.net
Subject: Re: [PHP] A Quick Reminder

On Thu, Mar 13, 2008 at 10:06 AM, Thijs Lensselink [EMAIL PROTECTED] wrote:

  It's always the Dutch huh! :) It's because in our small ountry all
  traffic is stuck all day long. So when it finally moves it goes all
  directions :)

Not quite as bad as they do in India.  I saw this a few weeks ago
and was amazed.  SFW.

http://www.youtube.com/watch?v=RjrEQaG5jPM


-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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




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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 10:52 AM, Stephane Ulysse
[EMAIL PROTECTED] wrote:
  
It's always the Dutch huh! :) It's because in our small ountry all
traffic is stuck all day long. So when it finally moves it goes all
directions :)

 Not quite as bad as they do in India.  I saw this a few weeks ago
  and was amazed.  SFW.

 http://www.youtube.com/watch?v=RjrEQaG5jPM

Whoa!  I just said the EXACT same thing!  ;-P

Echo echo

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Aschwin Wesselius

Daniel Brown wrote:

On Thu, Mar 13, 2008 at 10:06 AM, Thijs Lensselink [EMAIL PROTECTED] wrote:
  

 It's always the Dutch huh! :) It's because in our small ountry all
 traffic is stuck all day long. So when it finally moves it goes all
 directions :)



Not quite as bad as they do in India.  I saw this a few weeks ago
and was amazed.  SFW.

http://www.youtube.com/watch?v=RjrEQaG5jPM


Nice I bet they have some higher alertness towards other drivers 
instead of depending on traffic regulations.


I don't say it is safe or easy, but I think they manage pretty well..
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


[PHP] Re: php cron to check and remove files

2008-03-13 Thread Al

I handle your object a different and, I believe, a simpler way.

Instead of a cronjob, I call a cleanup function whenever a page is opened.

Obviously, this approach requires a time overhead and thus is not good for very 
high volume sites. You can mitigate this drawback by maintaining a simple 
touch() file that keeps track of the time when your cleanup function is run and 
insure it only runs once a day, or whatever frequency you need. You can even 
make the file sticky so it stays in memory to further reduce the overhead.




Steven Macintyre wrote:

 Hi,

I need to be able to do the following procedure;

retrieve all items from a mysql db table, then check to see if the files from that table 
exist on the server (images), if not, to clean up and remove the physical 
file - so that only the files from the db exist.

This will run via cron

Has anyone done something similar before, willing to assist me with a basic 
scope of actions to work on?

Thanks in advance

Steven



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



Re: [PHP] Intercepting errors

2008-03-13 Thread It Maq
I'am already using that. When i call trigger_error the function set in 
set_error_handler handles the error. but now i don't know if this will handle 
all the other errors that i don't know about in case they happen. Is there 
anyway to test that?

- Original Message 
From: Richard Heyes [EMAIL PROTECTED]
To: It Maq [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, March 13, 2008 10:36:20 AM
Subject: Re: [PHP] Intercepting errors

 Now i know how to create errors with trigger_error, but i am
 wondering how can I make my error handling class intercept any kind
 of error although i'm not aware about it and i don't know if it will
 happen. Is this possible?

You could use set_error_handler():

http://uk.php.net/manual/en/function.set-error-handler.php

-- 
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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






  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread tedd

At 12:34 PM + 3/11/08, Stut wrote:

On 4 Mar 2008, at 13:57, Jochem Maas wrote:

Stut mentioned a little while back that he avoids using the built-in session



mechanism if at all possible, but still manages to track user state ... now I
can think of a way or two that he might do that but I was wondering if
any one could give an idea about the write way to do it in terms of
high performance :-)


Finally found time to finish the article, sorry for the delay...

http://stut.net/articles/sessionless_sessions.html

Constructive criticism welcome.


Stut:

Nice article.

I'm currently working on one large site and I only pass the user's id 
from page to page in session. All other data is pulled from the 
database as needed. But, I've never had a problem that spanned 
several servers. The idea was simply to call-in for the data needed 
rather than carry baggage around.


I have noticed that eBay uses a similar technique for different 
states of a user (un-confirmed, revisiting, and confirmed) via a 
cookie.


I question the reason why you would want to encrypt the cookie 
considering that before the user is going to be provided access to 
sensitive data that you require a password confirmation. The 
encryption seems to be an unnecessary overkill.


So what if a malicious user uses a cookie to pretend to be a real 
user IF before they can get access to sensitive data they have to 
enter a correct password?


Please explain.

Cheers,

tedd

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

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



RE: [PHP] Intercepting errors

2008-03-13 Thread Stephane Ulysse
PLEASE STOP EMAILING ME

-Original Message-
From: It Maq [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 10:46 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Intercepting errors

I'am already using that. When i call trigger_error the function set in
set_error_handler handles the error. but now i don't know if this will
handle all the other errors that i don't know about in case they happen.
Is there anyway to test that?

- Original Message 
From: Richard Heyes [EMAIL PROTECTED]
To: It Maq [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, March 13, 2008 10:36:20 AM
Subject: Re: [PHP] Intercepting errors

 Now i know how to create errors with trigger_error, but i am
 wondering how can I make my error handling class intercept any kind
 of error although i'm not aware about it and i don't know if it will
 happen. Is this possible?

You could use set_error_handler():

http://uk.php.net/manual/en/function.set-error-handler.php

-- 
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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






 


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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




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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread tedd

At 10:06 AM -0400 3/13/08, Thijs Lensselink wrote:

Quoting tedd [EMAIL PROTECTED]:


At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know)  
during the winter we have so much snow on the ground that you just  
kind of drive where ever looks like road... Even if it means you  
have people passing on your right going the opposite way.


Yeah, but those are mostly Dutch -- you never know where they're going. :-)

It's a bit different here in Lansing -- with most being politicians, we
all drive in circles.



It's always the Dutch huh! :) It's because in our small ountry all 
traffic is stuck all day long. So when it finally moves it goes all 
directions :)


There's a difference between Dutch in Dutch-land and those here in Michigan.

The ones we have here are really strange. They are the type that say 
Thrown Mama down the stairs, the broom and other such 
heart-stopping comments.


Cheers,

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

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



[PHP] Trouble setting httpd.conf, I need help

2008-03-13 Thread Willian Schubert Baldasso

My Apache 2.2.8 doen't start with these lines below:

# load the php main library to avoid dll hell
Loadfile d:\winappl\php\php5ts.dll

# load the sapi so that apache can use php
LoadModule php5_module d:\winappl\php\php5apache2_2.dll

# set the php.ini location so that you don't have to waste time guessing where 
it is
PHPIniDir d:\winappl\php

# Hook the php file extensions, notice that Addtype is NOT USED, since that's 
just stupid
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps  
 

I'm using PHP 5.2.5 and d:\winappl\php is in PATH environment.

What's wrong? where can I discuss my trouble?

Tks!
 
 
Willian Schubert Baldasso
Administrador de Redes
Campinas/SP - Brasil
 
e-mail: [EMAIL PROTECTED]
msn messenger: [EMAIL PROTECTED]
skype: redesistema


Re: [PHP] Intercepting errors

2008-03-13 Thread Richard Heyes

I'am already using that. When i call trigger_error the function set
in set_error_handler handles the error. but now i don't know if this
will handle all the other errors that i don't know about in case they
happen. Is there anyway to test that?


Read the manual page. I believe it handles all except things like parse 
errors:


The following error types cannot be handled with a user defined 
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, 
E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the 
file where set_error_handler() is called.


Oh and Stephane: this is a mailing list. If you want off you can go to 
http://www.php.net.


--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread tedd

At 10:40 AM -0400 3/13/08, Jason Pruim wrote:

On Mar 13, 2008, at 9:25 AM, tedd wrote:


At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know) 
during the winter we have so much snow on the ground that you just 
kind of drive where ever looks like road... Even if it means you 
have people passing on your right going the opposite way.


Yeah, but those are mostly Dutch -- you never know where they're going. :-)

It's a bit different here in Lansing -- with most being 
politicians, we all drive in circles.



Now don't go saying anything bad about the Dutch... Or my penny 
pinching ass might have to make the 30 minute drive to lansing! :P


Yeah, but as long as the price of gas remains above a buck, I'm safe.  :-)

Cheers,

tedd

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

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/12/08, Ray Hauge [EMAIL PROTECTED] wrote:
 You
  come to a PHP mailing list to proclaim that RoR is better?

No dumbass, I have already been here for a long time:

http://marc.info/?l=php-generalm=95331489301933w=2

And I didn't proclaim anything, Rob did:

snip
But then you'd end up with something like Ruby on Rails... and we all
know about Ruby on Rails *VOMIT*.
/snip

 It's people like you that turn a lot of people off to Ruby.

I choose to use a language for a while before forming an opinion.  I
certainly wouldn't let someone's opinion sway my own inquisitive
nature to have a go at it myself.

  The community is insane!

No more insane than 10 years ago when a great many of us realized we
didn't have to use Perl any more to do web dev.  I clearly remember
hearing things said like Now we have PHP and it's much better and
much easier than Perl.  I see similar happenings with Ruby and Rails
right now.  It's that same ease of use that now makes PHP feel like a
beast to work with.

  This was a great read.  If nothing else he's funny.

  http://terrychay.com/blog/article/php-ruby-evil-good.shtml

Looks pretty stupid to me.. what does a dog humping a cat have to do
with anything in technology?  Please keep your animal pr0n to
yourself.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Thijs Lensselink

Quoting Daniel Brown [EMAIL PROTECTED]:


On Thu, Mar 13, 2008 at 10:06 AM, Thijs Lensselink [EMAIL PROTECTED] wrote:


 It's always the Dutch huh! :) It's because in our small ountry all
 traffic is stuck all day long. So when it finally moves it goes all
 directions :)


Not quite as bad as they do in India.  I saw this a few weeks ago
and was amazed.  SFW.

http://www.youtube.com/watch?v=RjrEQaG5jPM



wow! how do these people get to there destinations :)
but the worst i've seen is still in Moscow.


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



Re: [PHP] A Quick Reminder....

2008-03-13 Thread Thijs Lensselink

Quoting tedd [EMAIL PROTECTED]:


At 10:06 AM -0400 3/13/08, Thijs Lensselink wrote:

Quoting tedd [EMAIL PROTECTED]:


At 11:14 AM -0400 3/12/08, Jason Pruim wrote:
Up here in the great big hand (Michigan for those who don't know)  
  during the winter we have so much snow on the ground that you   
just  kind of drive where ever looks like road... Even if it   
means you  have people passing on your right going the opposite   
way.


Yeah, but those are mostly Dutch -- you never know where they're going. :-)

It's a bit different here in Lansing -- with most being politicians, we
all drive in circles.



It's always the Dutch huh! :) It's because in our small ountry all   
traffic is stuck all day long. So when it finally moves it goes all  
 directions :)


There's a difference between Dutch in Dutch-land and those here in Michigan.

The ones we have here are really strange. They are the type that say
Thrown Mama down the stairs, the broom and other such heart-stopping
comments.



True! But the Dutch do have a way with words :) I've heard worse  
phrases then that!


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



Re: [PHP] PHP Ajax progress bar

2008-03-13 Thread tedd

At 11:24 AM +0800 3/12/08, Shelley wrote:

Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)


Shelley:

Here's my solution:

http://webbytedd.com/bb/wait/

However, if you want php to communicate with ajax, then that can be 
done like so:


http://webbytedd.com/b/timed-php/

But, you will need to figure out how much of a file has been uploaded 
at each interval and I don't know how to do that.


However, if it's a batch of files, then that certainly could be done 
between each file.


Cheers,

tedd

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

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



Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread Stut

tedd wrote:

Nice article.


Thanks.

I question the reason why you would want to encrypt the cookie 
considering that before the user is going to be provided access to 
sensitive data that you require a password confirmation. The encryption 
seems to be an unnecessary overkill.


So what if a malicious user uses a cookie to pretend to be a real user 
IF before they can get access to sensitive data they have to enter a 
correct password?


Please explain.


Certainly. It's not about them getting access to the data in that 
cookie, it's got more to do with ensuring the cookie contents remain 
unchanged.


While it's true that the remember me cookie could live with not being 
encrypted I would then need to validate the data it contains. By 
encrypting it I know that if it decrypts successfully it's exactly what 
the site put in it at the end of the last request.


For some sites this would not be an issue but due to some of the ways we 
use the data in that cookie I decided the cost of encrypting it against 
the cost of validating it and the risks involved made encryption the 
better option.


There is another reason... Cookies are sometimes stored in plain text on 
the users machine. Since that cookie contains an email address and 
potentially a phone number it's much better to encrypt it and protect 
our users.


Hope that answers your question.

-Stut

--
http://stut.net/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Robert Cummings

On Thu, 2008-03-13 at 10:02 -0500, Greg Donald wrote:
 On 3/12/08, Ray Hauge [EMAIL PROTECTED] wrote:
  You
   come to a PHP mailing list to proclaim that RoR is better?
 
 No dumbass, I have already been here for a long time:
 
 http://marc.info/?l=php-generalm=95331489301933w=2
 
 And I didn't proclaim anything, Rob did:
 
 snip
 But then you'd end up with something like Ruby on Rails... and we all
 know about Ruby on Rails *VOMIT*.
 /snip
 
  It's people like you that turn a lot of people off to Ruby.
 
 I choose to use a language for a while before forming an opinion.  I
 certainly wouldn't let someone's opinion sway my own inquisitive
 nature to have a go at it myself.
 
   The community is insane!
 
 No more insane than 10 years ago when a great many of us realized we
 didn't have to use Perl any more to do web dev.  I clearly remember
 hearing things said like Now we have PHP and it's much better and
 much easier than Perl.  I see similar happenings with Ruby and Rails
 right now.  It's that same ease of use that now makes PHP feel like a
 beast to work with.
 
   This was a great read.  If nothing else he's funny.
 
   http://terrychay.com/blog/article/php-ruby-evil-good.shtml
 
 Looks pretty stupid to me.. what does a dog humping a cat have to do
 with anything in technology?

Because PHP is the dog and Ruby is the cat?

*heheh*

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] php cron to check and remove files

2008-03-13 Thread tedd

At 9:35 AM +0100 3/13/08, Steven Macintyre wrote:

 Hi,

I need to be able to do the following procedure;

retrieve all items from a mysql db table, then check to see if the 
files from that table exist on the server (images), if not, to 
clean up and remove the physical file - so that only the files 
from the db exist.


This will run via cron

Has anyone done something similar before, willing to assist me with 
a basic scope of actions to work on?


Thanks in advance

Steven



Steven:

Are you saying that if images exist in your database AND appear in 
the file system, then don't delete them?


Why not give your approved images a prefix and just delete everything 
that doesn't via a cron?


Cheers,

tedd


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

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



Re: [PHP] Intercepting errors

2008-03-13 Thread It Maq
I already read th page of the manual, but i still don't understand a lot of 
things. Below you will find a simple code that i ade for understanding more 
about this. In the code i'm triggering an error of type E_USER_ERROR, so now 
i'm wondering why it is not considered as E_USER_ERROR in set_error_handler(). 
And if somebody can suggest an error (something real not just trigger_error) 
that can be intercepted by set_error_handler(), this will be very useful.here 
is the code:

?php
function error_handler($errno, $errstr, $filename, $lineno, $context)
{
echo $errno. br;
echo $errstr. br;
switch($errno) {
case E_USER_ERROR:
$str = ;
$str = ERROR MESSAGE: . $errstr;
$str .= brThe application will be stopped just after the 
following error message:br;
$str.= brFile: . $filename;
$str.= brLine number: . $lineno;
$GLOBALS['toto'] = $str;
//return $GLOBALS['error'];
break;
case E_USER_WARNING:
echo ERROR MESSAGE: . $errstr;
echo brThe application will continue but there is a 
warning:br;
echo brFile: . $filename;
echo brLine number: . $lineno; 
break;
case E_USER_NOTICE:
echo ERROR MESSAGE: . $errstr;
echo brThe application will continue but there is a 
notice:br;
echo brFile: . $filename;
echo brLine number: . $lineno; 
break;
}
}

echo Testing set_error_handlerbrbrbr;

error_reporting(E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE);  
set_error_handler('error_handler'); 
ini_set('error_reporting', 0);

trigger_error(The string for testing the error, E_USER_ERROR);


?



- Original Message 
From: Richard Heyes [EMAIL PROTECTED]
To: It Maq [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, March 13, 2008 11:00:30 AM
Subject: Re: [PHP] Intercepting errors

 I'am already using that. When i call trigger_error the function set
 in set_error_handler handles the error. but now i don't know if this
 will handle all the other errors that i don't know about in case they
 happen. Is there anyway to test that?

Read the manual page. I believe it handles all except things like parse 
errors:

The following error types cannot be handled with a user defined 
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, 
E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the 
file where set_error_handler() is called.

Oh and Stephane: this is a mailing list. If you want off you can go to 
http://www.php.net.

-- 
Richard Heyes
Employ me:
http://www.phpguru.org/cv





  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] Trouble setting httpd.conf, I need help

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 9:45 AM, Willian Schubert Baldasso
[EMAIL PROTECTED] wrote:

  My Apache 2.2.8 doen't start with these lines below:

  # load the php main library to avoid dll hell
  Loadfile d:\winappl\php\php5ts.dll

  # load the sapi so that apache can use php
  LoadModule php5_module d:\winappl\php\php5apache2_2.dll

  # set the php.ini location so that you don't have to waste time guessing 
 where it is
  PHPIniDir d:\winappl\php

  # Hook the php file extensions, notice that Addtype is NOT USED, since 
 that's just stupid
  AddHandler application/x-httpd-php .php
  AddHandler application/x-httpd-php-source .phps

The way you've worded that, it sounds like you're saying that the
httpd.conf file doesn't begin with that information.

You can ask for help here or on the Apache lists, but to get
started, you're going to need to explain the issue a bit better.  What
error messages are you getting, if any?  Do all of the files exist?
Are you actually on a Windows box?

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



[PHP] Launch vmware server with php script and apache

2008-03-13 Thread Julio César García Vizcaíno
Hi,

I'm working with a script which must launch vmware server 1.0.3
(Virtualization product) and I can launch it from a terminal:
$php miscript.php
but when I use firefox it just doesn't work.
I've checked the permissions for vmware and the apache user but without
any success.
Can you help me what i'm doing wrong?


local.php

?php
echo Lanzando vmware\n;
system('whoami');
system('/var/www/procesa.pl');
?



procesa.pl

#!/usr/bin/perl
system ('/usr/bin/vmware');


Sorry for my bad english.

Thanks
-- 
Julio César García Vizcaíno.
FI, UNAM.
Por mi raza hablará el espíritu


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente


Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Eric Butera
On Thu, Mar 13, 2008 at 11:02 AM, Greg Donald [EMAIL PROTECTED] wrote:
 On 3/12/08, Ray Hauge [EMAIL PROTECTED] wrote:
   You
come to a PHP mailing list to proclaim that RoR is better?

  No dumbass, I have already been here for a long time:

  http://marc.info/?l=php-generalm=95331489301933w=2

  And I didn't proclaim anything, Rob did:

  snip

 But then you'd end up with something like Ruby on Rails... and we all
  know about Ruby on Rails *VOMIT*.
  /snip


   It's people like you that turn a lot of people off to Ruby.

  I choose to use a language for a while before forming an opinion.  I
  certainly wouldn't let someone's opinion sway my own inquisitive
  nature to have a go at it myself.

The community is insane!

  No more insane than 10 years ago when a great many of us realized we
  didn't have to use Perl any more to do web dev.  I clearly remember
  hearing things said like Now we have PHP and it's much better and
  much easier than Perl.  I see similar happenings with Ruby and Rails
  right now.  It's that same ease of use that now makes PHP feel like a
  beast to work with.


This was a great read.  If nothing else he's funny.
  
http://terrychay.com/blog/article/php-ruby-evil-good.shtml

  Looks pretty stupid to me.. what does a dog humping a cat have to do
  with anything in technology?  Please keep your animal pr0n to
  yourself.


  --
  Greg Donald
  http://destiney.com/



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



Ruby must really increase your work performance as you seem to have so
much free time to troll here.  Awesome!  :)

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



Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread tedd

At 3:16 PM + 3/13/08, Stut wrote:

tedd wrote:

Nice article.


Thanks.

I question the reason why you would want to encrypt the cookie 
considering that before the user is going to be provided access to 
sensitive data that you require a password confirmation. The 
encryption seems to be an unnecessary overkill.


So what if a malicious user uses a cookie to pretend to be a real 
user IF before they can get access to sensitive data they have to 
enter a correct password?


Please explain.


Certainly. It's not about them getting access to the data in that 
cookie, it's got more to do with ensuring the cookie contents remain 
unchanged.


While it's true that the remember me cookie could live with not 
being encrypted I would then need to validate the data it contains. 
By encrypting it I know that if it decrypts successfully it's 
exactly what the site put in it at the end of the last request.


For some sites this would not be an issue but due to some of the 
ways we use the data in that cookie I decided the cost of encrypting 
it against the cost of validating it and the risks involved made 
encryption the better option.


There is another reason... Cookies are sometimes stored in plain 
text on the users machine. Since that cookie contains an email 
address and potentially a phone number it's much better to encrypt 
it and protect our users.


Hope that answers your question.

-Stut


Okay.

Considering that all user data is placed in a database for extraction 
as needed, then why not put the state of the user's last visit in 
there as well and save only the session id (or whatever) as a cookie?


Then, when the user returns, you simply check the cookie with what's 
stored in the dB and continue as before. If the check fails (no 
session id or it has been altered), then start again.


To do house keeping, simply run a routine at some interval to check 
the sessions' age and remove those that are older than what's wanted.


Why put anything client-side that might be a security problem?

Cheers,

tedd


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

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



Re: [PHP] strtotime( 'last Sunday' ) and republicans

2008-03-13 Thread tedd

At 10:43 AM -0500 3/12/08, Greg Donald wrote:

No matter where we draw the borders or put the roads and highways,
it's still just the one planet, with the same finite resources we all
have to share.  Being mad about globalization is pointless, it's
inevitable.


Not if you don't live on this planet.

Cheers,

tedd

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

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



Re: [PHP] Intercepting errors (skip)

2008-03-13 Thread It Maq
sorry i just forgot to print the results. It 's my mistake

- Original Message 
From: It Maq [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 13, 2008 11:22:36 AM
Subject: Re: [PHP] Intercepting errors

I already read th page of the manual, but i still don't understand a lot of 
things. Below you will find a simple code that i ade for understanding more 
about this. In the code i'm triggering an error of type E_USER_ERROR, so now 
i'm wondering why it is not considered as E_USER_ERROR in set_error_handler(). 
And if somebody can suggest an error (something real not just trigger_error) 
that can be intercepted by set_error_handler(), this will be very useful.here 
is the code:

?php
function error_handler($errno, $errstr, $filename, $lineno, $context)
{
echo $errno. br;
echo $errstr. br;
switch($errno) {
case E_USER_ERROR:
$str = ;
$str = ERROR MESSAGE: . $errstr;
$str .= brThe application will be stopped just after the 
following error message:br;
$str.= brFile: . $filename;
$str.= brLine number: . $lineno;
$GLOBALS['toto'] = $str;
//return $GLOBALS['error'];
break;
case E_USER_WARNING:
echo ERROR MESSAGE: . $errstr;
echo brThe application will continue but there is a 
warning:br;
echo brFile: . $filename;
echo brLine number: . $lineno; 
break;
case E_USER_NOTICE:
echo ERROR MESSAGE: . $errstr;
echo brThe application will continue but there is a 
notice:br;
echo brFile: . $filename;
echo brLine number: . $lineno; 
break;
}
}

echo Testing set_error_handlerbrbrbr;

error_reporting(E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE);  
set_error_handler('error_handler'); 
ini_set('error_reporting', 0);

trigger_error(The string for testing the error, E_USER_ERROR);


?



- Original Message 
From: Richard Heyes [EMAIL PROTECTED]
To: It Maq [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, March 13, 2008 11:00:30 AM
Subject: Re: [PHP] Intercepting errors

 I'am already using that. When i call trigger_error the function set
 in set_error_handler handles the error. but now i don't know if this
 will handle all the other errors that i don't know about in case they
 happen. Is there anyway to test that?

Read the manual page. I believe it handles all except things like parse 
errors:

The following error types cannot be handled with a user defined 
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, 
E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the 
file where set_error_handler() is called.

Oh and Stephane: this is a mailing list. If you want off you can go to 
http://www.php.net.

-- 
Richard Heyes
Employ me:
http://www.phpguru.org/cv





  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Ray Hauge

Greg Donald wrote:

On 3/12/08, Ray Hauge [EMAIL PROTECTED] wrote:

You
 come to a PHP mailing list to proclaim that RoR is better?


No dumbass, I have already been here for a long time:


This is my last post on this thread.  It's obvious nobody is going to 
convince anyone else of their being right or wrong.  The issue people 
are having is your attitude from about reply #2 from you on this thread. 
 I just wanted to make that point clear.  Trolling and being 
antagonistic doesn't get you anywhere.


The point of this reply is I didn't say anything about how long you've 
been around here.  The fact is you're still here, and we're talking PHP.


I will give you that you weren't the first to submit an opinion of Ruby 
being the best or the worst.  Your first reply was simply open minded, 
but then you got your feathers all ruffled when someone said they didn't 
like Ruby, albeit in a somewhat negative connotation.


 It's people like you that turn a lot of people off to Ruby.

I choose to use a language for a while before forming an opinion.  I
certainly wouldn't let someone's opinion sway my own inquisitive
nature to have a go at it myself.

The reason it turns people off is you have to work with the community as 
well as the language.  If you want the project to get better, you need 
to be able to work with the community.  I will admit that the PHP 
Internals list can get pretty heated as well, but those arguments are 
usually based on technical opinions and not religious fervor for the 
language*.


* Note: I haven't read a whole lot on the Internals list, but based on 
summaries by PHP|Architect and other sources I have assumed my conclusion.


--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] Unexcepted $this

2008-03-13 Thread Anup Shukla

Murat BEŞER wrote:

So what do you thing about on this thing ?



I really would like to figure out the problem.
However, my simple script to mimic your code did not throw any errors.

If you could provide some more details, maybe we can figure out the problem.

--
Regards,
Anup Shukla

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



Re: [PHP] Trouble setting httpd.conf, I need help

2008-03-13 Thread Willian Schubert Baldasso
Oh, yes, I have a D: drive anda my php is in D:\Winappl folder

I'm trying use PHP x Apache folowing the instruction under 
http://www.php.net/manual/en/install.windows.apache2.php and notes under 
http://www.php.net/manual/en/install.windows.apache2.php#81318

I tried change backslashes to forward slashes in the file paths but Apache 
service does'n work too.

If I remark these lines I can start Apache without any problem, but with 
file httpd.conf changed like PHP install instructions tells me to do I can 
start it.

at http://www.php.net/manual/en/install.windows.apache2.php#81567 we can see 
some people wrote difrences way to configure httpd.conf







Willian Schubert Baldasso
Administrador de Redes
Campinas/SP - Brasil

e-mail: [EMAIL PROTECTED]
msn messenger: [EMAIL PROTECTED]
skype: redesistema



- Original Message - 
From: Daniel Brown [EMAIL PROTECTED]
To: Willian Schubert Baldasso [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, March 13, 2008 12:31 PM
Subject: Re: [PHP] Trouble setting httpd.conf, I need help


sorry for the offlist reply, Willian,

Do you really have a d drive ? and those files really exist ?

if yes, try changing the backslashes to forward slashes in the file paths.

Just a guess, though.

On 3/13/08, Willian Schubert Baldasso [EMAIL PROTECTED] wrote:


On Thu, Mar 13, 2008 at 9:45 AM, Willian Schubert Baldasso
[EMAIL PROTECTED] wrote:

  My Apache 2.2.8 doen't start with these lines below:

  # load the php main library to avoid dll hell
  Loadfile d:\winappl\php\php5ts.dll

  # load the sapi so that apache can use php
  LoadModule php5_module d:\winappl\php\php5apache2_2.dll

  # set the php.ini location so that you don't have to waste time guessing 
 where it is
  PHPIniDir d:\winappl\php

  # Hook the php file extensions, notice that Addtype is NOT USED, since 
 that's just stupid
  AddHandler application/x-httpd-php .php
  AddHandler application/x-httpd-php-source .phps

The way you've worded that, it sounds like you're saying that the
httpd.conf file doesn't begin with that information.

You can ask for help here or on the Apache lists, but to get
started, you're going to need to explain the issue a bit better.  What
error messages are you getting, if any?  Do all of the files exist?
Are you actually on a Windows box?

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283 


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



Re: [PHP] Unexcepted $this

2008-03-13 Thread Eric Butera
2008/3/13 Anup Shukla [EMAIL PROTECTED]:
 Murat BEŞER wrote:
   So what do you thing about on this thing ?
  

  I really would like to figure out the problem.
  However, my simple script to mimic your code did not throw any errors.

  If you could provide some more details, maybe we can figure out the problem.

  --
  Regards,
  Anup Shukla



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



It could just be a special character in the code somewhere.  Since
pushing/pulling files happens across so many servers with different
encodings it happens sometimes.  On OSX there is a text editor named
TextWrangler that has a feature called Zap Gremlins that I use to
get rid of it when it happens.


Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread tedd

At 4:01 PM + 3/13/08, Stut wrote:

tedd wrote:
Then, when the user returns, you simply check the cookie with 
what's stored in the dB and continue as before. If the check fails 
(no session id or it has been altered), then start again.


Because that negates the whole point of doing it which is to reduce 
database access to the minimum possible.


Oops, I guess I missed the whole point of your article.

You want to minimize dB usage by using an encrypted cookie so that 
when users return, that action doesn't use the dB.


But, once the user is on, then everything they request in the form of 
unique data is provided by the dB via their user id, correct? So, you 
saved one trip to the store, but how many trips to the store does a 
user usually make? And is that worth it?


Not being critical, just wondering.

Cheers,

tedd

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

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



[PHP] curl fails to connect when not port 80

2008-03-13 Thread Virgil Hilts
Curl newbie question:

Here is a php script that works fine from the command line with
CURL_OPT_PORT set or not -- either way.

?php
$fp = fopen( ./results.txt, w );
$searchUrl = http://ethicshare.cs.umn.edu;;
$ch = curl_init();
$user_agent = Mozilla/4.0 pp(compatible; MSIE 5.01; Windows NT 5.0);
curl_setopt ( $ch, CURLOPT_USERAGENT, $user_agent );
curl_setopt ( $ch, CURLOPT_URL, $searchUrl );
// curl_setopt ( $ch, CURLOPT_PORT, 8080 );
// curl_setopt ( $ch, CURLOPT_POST, 1 );
// curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); // return to a var
curl_setopt ( $ch, CURLINFO_HEADER_OUT, 1 );
curl_setopt ( $ch, CURLOPT_FILE, $fp );
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
// curl_setopt ( $ch, CURLOPT_FAILONERROR, 1 ); // fail on errors
// curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); // allow redirects
// curl_setopt ( $ch, CURLOPT_TIMEOUT, 15 ); // times out after 15s
$info = curl_getinfo ( $ch );
print ( curl info =  . print_r ( $info, true ) . \n\n);

curl_setopt ( $ch, CURLOPT_FILE, $fp );
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
curl_exec ( $ch );
curl_close ( $ch );
fclose ( $fp );
?

When running this same script through apache however, it works fine without
the port directive.  However, I get no results when attempting to connect to
port 8080.  Command line curl works fine too.  It's only when connecting
through apache that my script fails.

Here are some specifics about my environment:

Apache/2.2.3 (Red Hat)

libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
PHP/5.1.6

Any help/suggestions will be *greatly* appreciated!!  This is driving me
nuts!

Cheers!


-- 
Penny for your thoughts now, my boy Bill -- Bruce Springsteen


Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread Stut

tedd wrote:

At 4:01 PM + 3/13/08, Stut wrote:

tedd wrote:
Then, when the user returns, you simply check the cookie with what's 
stored in the dB and continue as before. If the check fails (no 
session id or it has been altered), then start again.


Because that negates the whole point of doing it which is to reduce 
database access to the minimum possible.


Oops, I guess I missed the whole point of your article.

You want to minimize dB usage by using an encrypted cookie so that when 
users return, that action doesn't use the dB.


But, once the user is on, then everything they request in the form of 
unique data is provided by the dB via their user id, correct? So, you 
saved one trip to the store, but how many trips to the store does a user 
usually make? And is that worth it?


Not being critical, just wondering.


As I state in the article most of the site is the same for all users 
whether logged in or not. If the user is logged in then we should a menu 
in the left column which displays their name. We also pre-fill some 
forms with their name, email address and phone number.


That means that to remove the need to access the DB on every request for 
logged in users on most of the site we just need to store their name, 
email address and phone number between requests in a way that doesn't 
involve the database. That is the problem the technique in the article 
solves.


It's true to say that when the user is in the members area most page 
requests will need to hit the DB, but as stated that amounts to less 
than 30% of page views on any given day. The end result is that DB load 
is now at an acceptable level without compromising the user experience.


Hope that makes sense now. If not I'm happy to explain further.

-Stut

--
http://stut.net/

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



Re: [PHP] Unexcepted $this

2008-03-13 Thread Ray Hauge

Eric Butera wrote:

2008/3/13 Anup Shukla [EMAIL PROTECTED]:

Murat BEŞER wrote:
  So what do you thing about on this thing ?
 

 I really would like to figure out the problem.
 However, my simple script to mimic your code did not throw any errors.

 If you could provide some more details, maybe we can figure out the problem.

 --
 Regards,
 Anup Shukla



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




It could just be a special character in the code somewhere.  Since
pushing/pulling files happens across so many servers with different
encodings it happens sometimes.  On OSX there is a text editor named
TextWrangler that has a feature called Zap Gremlins that I use to
get rid of it when it happens.


Would it be possible to post the code you have now to http://pastebin.com/ ?

That might assist in locating odd characters if that's the case, though 
I'd think that your editor would display them as well.  Usually an 
Unexpected  means that you missed a parenthesis or curly brace, etc.


--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] Launch vmware server with php script and apache

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 11:35 AM, Julio César García Vizcaíno
[EMAIL PROTECTED] wrote:
 Hi,

  I'm working with a script which must launch vmware server 1.0.3
  (Virtualization product) and I can launch it from a terminal:
  $php miscript.php
  but when I use firefox it just doesn't work.
[snip!]

  local.php
  
  ?php
  echo Lanzando vmware\n;
  system('whoami');
  system('/var/www/procesa.pl');
  ?
  

Try rewriting the above as follows:

?php
error_reporting(E_ALL);
echo Lanzando vmware\n;
exec('whoami',$who_ret);
exec('/var/www/procesa.pl',$procesa_ret,$err);
echo !isset($argv[0]) ? pre /\n : null;
print_r($who_ret);
print_r($procesa_ret);
echo !isset($argv[0]) ? /pre\n : null;
if(isset($err)  $err != 0) {
echo Process launching returned error code .$err.\n;
} else {
echo Successfully launched!\n;
}
?

However, I'm not really certain why you need to call the Perl
script.  What I would consider doing myself is the following:

?php
exec('whoami',$who);
echo Attempting to launch VMWare process as .$who..\n;
exec('/usr/bin/vmware  21',$ret,$err);
echo isset($err)  $err != 0 ? Error code: .$err.\n : null;
echo

  Sorry for my bad english.

Your English is better than some of the native speakers we have
here, so no need to apologize!  ;-P

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] maintaining [user] state without a session ...

2008-03-13 Thread Stut

tedd wrote:

At 3:16 PM + 3/13/08, Stut wrote:

tedd wrote:
I question the reason why you would want to encrypt the cookie 
considering that before the user is going to be provided access to 
sensitive data that you require a password confirmation. The 
encryption seems to be an unnecessary overkill.


So what if a malicious user uses a cookie to pretend to be a real 
user IF before they can get access to sensitive data they have to 
enter a correct password?


Please explain.


Certainly. It's not about them getting access to the data in that 
cookie, it's got more to do with ensuring the cookie contents remain 
unchanged.


While it's true that the remember me cookie could live with not 
being encrypted I would then need to validate the data it contains. By 
encrypting it I know that if it decrypts successfully it's exactly 
what the site put in it at the end of the last request.


For some sites this would not be an issue but due to some of the ways 
we use the data in that cookie I decided the cost of encrypting it 
against the cost of validating it and the risks involved made 
encryption the better option.


There is another reason... Cookies are sometimes stored in plain text 
on the users machine. Since that cookie contains an email address and 
potentially a phone number it's much better to encrypt it and protect 
our users.


Hope that answers your question.


Okay.

Considering that all user data is placed in a database for extraction as 
needed, then why not put the state of the user's last visit in there as 
well and save only the session id (or whatever) as a cookie?


Then, when the user returns, you simply check the cookie with what's 
stored in the dB and continue as before. If the check fails (no session 
id or it has been altered), then start again.


Because that negates the whole point of doing it which is to reduce 
database access to the minimum possible.


To do house keeping, simply run a routine at some interval to check the 
sessions' age and remove those that are older than what's wanted.


Why put anything client-side that might be a security problem?


IMHO the encryption reduces the security risk to a more-than-acceptable 
level, and it saves a shed load of database calls to the point where 
most page requests (~70%) don't touch the database at all which is what 
I was aiming for.


-Stut

--
http://stut.net/

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



Re: [PHP] strtotime( 'last Sunday' ) and republicans

2008-03-13 Thread Robert Cummings

On Thu, 2008-03-13 at 11:49 -0400, tedd wrote:
 At 10:43 AM -0500 3/12/08, Greg Donald wrote:
 No matter where we draw the borders or put the roads and highways,
 it's still just the one planet, with the same finite resources we all
 have to share.  Being mad about globalization is pointless, it's
 inevitable.
 
 Not if you don't live on this planet.

I'm pretty sure all planets have finite resources.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Unexcepted $this

2008-03-13 Thread Eric Butera
On Thu, Mar 13, 2008 at 12:56 PM, Ray Hauge [EMAIL PROTECTED] wrote:

 Eric Butera wrote:
   2008/3/13 Anup Shukla [EMAIL PROTECTED]:
   Murat BEŞER wrote:
 So what do you thing about on this thing ?

  
I really would like to figure out the problem.
However, my simple script to mimic your code did not throw any errors.
  
If you could provide some more details, maybe we can figure out the 
 problem.
  
--
Regards,
Anup Shukla
  
  
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
   It could just be a special character in the code somewhere.  Since
   pushing/pulling files happens across so many servers with different
   encodings it happens sometimes.  On OSX there is a text editor named
   TextWrangler that has a feature called Zap Gremlins that I use to
   get rid of it when it happens.

  Would it be possible to post the code you have now to http://pastebin.com/ ?

  That might assist in locating odd characters if that's the case, though
  I'd think that your editor would display them as well.  Usually an
  Unexpected  means that you missed a parenthesis or curly brace, etc.



  --
  Ray Hauge
  www.primateapplications.com


I would if I had any to show.  It usually happens to me when I copy an
example off the php or zend framework site.

It isn't a parse error on my part.  I use PDT which has real time
parse error checking.  ;)


[PHP] Windows + php + oracle PL/SQL = ORA-06550

2008-03-13 Thread Martin Jerga

Hello everyone,
I just installed Zend Core 2.5.0 (simply apache + php 5) with oracle 
instant client. I enabled the oracle extension. Everything works ok, but 
I ran into one strange problem.
I can connect to the oracle server without problems, I can also perform 
SELECTs,INSERTs, etc. The problems start when I try to execute a PL/SQL 
script. E.g.

Lets have these 2 oracle tables.

CREATE TABLE TABLE_A
(
  AIDNUMBER,
  ADATA  VARCHAR2(255 BYTE)
)

CREATE TABLE TABLE_B
(
  BIDNUMBER,
  AIDNUMBER,
  BDATA  VARCHAR2(255 BYTE)
)

INSERT INTO TABLE_A (AID) VALUES (0)
INSERT INTO TABLE_B (BID) VALUES (0)

lets try to execute very simple PL/SQL

DECLARE AAID NUMBER;
BEGIN
SELECT MAX(AAID)+1 INTO AAID FROM TABLE_A;
INSERT INTO TABLE_A (
aid,adata)
VALUES (
AAID
, 'table_a data');
INSERT INTO TABLE_B (
bid,
aid,bdata)
VALUES (
(SELECT MAX(bid)+1 FROM TABLE_B)
,AAID
, 'table_b data');
END;

I can execute this script through TOAD or using simple Java script. But 
if I try to execute this script using the next php on the Zend Core, I 
get this warning.

Quote:

PHP Warning: oci_execute(): ORA-06550: line 1, column 21:
PLS-00103: Encountered the symbol quot;quot; when expecting one of the 
following:


begin function package pragma procedure subtype type use
lt;an identifiergt; lt;a double-quoted delimited-identifiergt; form
current cursor in C:\Program 
Files\Zend\Apache2\htdocs\coreLib\get_event_itm\test.php on line 21




Here is the very simplified code I'm using

?php
error_reporting ( E_ALL );
$link = oci_connect(USER,PASSWORD,HOST);
$query = DECLARE AAID NUMBER;
BEGIN
SELECT MAX(AAID)+1 INTO AAID FROM TABLE_A;
INSERT INTO TABLE_A (
aid,adata)
VALUES (
AAID
, 'table_a data');
INSERT INTO TABLE_B (
bid,
aid,bdata)
VALUES (
(SELECT MAX(bid)+1 FROM TABLE_B)
,AAID
, 'table_b data');
END;;
$result = oci_parse ( $link, $query );
$status = oci_execute ( $result );
?

Note: When I deployed this script onto the production server, running 
php5 on RH4, it finnished without problems.
To be honest, I don't even have an idea where the problem can be. I 
would be very thankful for any suggestions.

thank you
Martin

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



Re: [PHP] Launch vmware server with php script and apache

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 12:01 PM, Daniel Brown [EMAIL PROTECTED] wrote:
 Try rewriting the above as follows:
[code snip]

 However, I'm not really certain why you need to call the Perl
  script.  What I would consider doing myself is the following:
[code snip]

Sorry, I got jumpy with the Send button and hadn't fixed the rest
of the post before sending.  I think that I'm doing too many things at
once.

?php
exec('whoami',$who);
echo Attempting to launch VMWare process as .$who[0]..br /\n;
exec('/usr/bin/vmware  21',$ret,$err);
echo isset($err)  $err != 0 ? Error code: .$err.br /\n : null;
echo Output is as follows:br /\n;
echo pre /\n;
print_r($ret);
echo /pre\n;
?

The error redirect to STDOUT should print out whatever error
messages are being received by the script.

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] strtotime( 'last Sunday' ) and republicans

2008-03-13 Thread David Giragosian
On 3/13/08, tedd [EMAIL PROTECTED] wrote:
 At 10:43 AM -0500 3/12/08, Greg Donald wrote:
 No matter where we draw the borders or put the roads and highways,
 it's still just the one planet, with the same finite resources we all
 have to share.  Being mad about globalization is pointless, it's
 inevitable.

 Not if you don't live on this planet.

Tried that. Didn't work. Sent home.

;-{

-- 

-David.

When the power of love
overcomes the love of power,
the world will know peace.

-Jimi Hendrix

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



[PHP] Re: php cron to check and remove files

2008-03-13 Thread Shawn McKenzie
Steven Macintyre wrote:
  Hi,
 
 I need to be able to do the following procedure;
 
 retrieve all items from a mysql db table, then check to see if the files from 
 that table exist on the server (images), if not, to clean up and remove the 
 physical file - so that only the files from the db exist.
 
 This will run via cron
 
 Has anyone done something similar before, willing to assist me with a basic 
 scope of actions to work on?
 
 Thanks in advance
 
 Steven
 

Maybe a dumb question, but after truing up the db and fs, why not delete
the file when you delete from the db?

-Shawn

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



Re: [PHP] Launch vmware server with php script and apache

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 1:11 PM, Julio César García Vizcaíno
[EMAIL PROTECTED] wrote:
  $tail error.log
  /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: 
 no version information available (required by /usr/lib/libcairo.so.2)
[snip!]

This is the first result on Google.  Try to STFW with that error
message and it should hopefully help you out.

http://communities.vmware.com/message/484981


-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



[PHP] How to get error context

2008-03-13 Thread It Maq
Hi,

i need help because I'm unable to retrieve error's context. Below is the code 
that is working perfectly except the context that is not displayed:

?php
function error_handler($errno, $errstr, $filename, $lineno, $errcontext)
{

  
$str = ;
$str .= brbrERROR Number: . $errno;
$str .= brERROR MESSAGE: . $errstr;
$str.= brFile: . $filename;
$str.= brLine number: . $lineno;
$str.= brContext: . $errcontext[0];
echo $str;


}

echo h1Testing set_error_handler/h1;

error_reporting(0);  
set_error_handler('error_handler'); 
ini_set('error_reporting', 0);

//trigger_error(The string for testing the error, E_USER_WARNING);
$ourFileName = testFile.txt;
$fh = fopen($ourFileName, 'X');// or die(Can't open file);
fclose($fh);


?




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Eric Butera [EMAIL PROTECTED] wrote:
 Ruby must really increase your work performance as you seem to have so
  much free time to troll here.  Awesome!  :)

Ruby on Rails is really amazing in how fast you can put an app
together.  There are generators for most everything so whipping up a
new model or controller is really fast.  It really is awesome.  :)


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
 Because PHP is the dog and Ruby is the cat?

Yeah, I guess.  I have several cats.  Indeed they are fast, sleek, and
smart just like Ruby.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Robert Cummings

On Thu, 2008-03-13 at 14:36 -0500, Greg Donald wrote:
 On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
  Because PHP is the dog and Ruby is the cat?
 
 Yeah, I guess.  I have several cats.  Indeed they are fast, sleek, and
 smart just like Ruby.

So... there we have it everyone... Greg has admitted that Ruby is as smart 
as a cat.

I like something a little more edgy personally. Something closer to human... 
something with personality, something that evolves, something not afraid to be 
itself. PHP fits the bill.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Ray Hauge [EMAIL PROTECTED] wrote:
 This is my last post on this thread.

I doubt that, but feel free to prove me wrong.

  The point of this reply is I didn't say anything about how long you've
  been around here.  The fact is you're still here, and we're talking PHP.

You said You come to a PHP mailing list to proclaim that RoR is
better?  Since Ruby on Rails is younger than PHP, your statement
implies a recent arrival to the list.

  I will give you that you weren't the first to submit an opinion of Ruby
  being the best or the worst.  Your first reply was simply open minded,
  but then you got your feathers all ruffled when someone said they didn't
  like Ruby, albeit in a somewhat negative connotation.

My feathers are in no way ruffled.  You think a little arguing with
Rob or you about Rails is some big deal to me?  Clearly you are the
one who just showed up.  Heated technology discussions occur on lists
all the time, this one certainly isn't immune to that sort of
off-topic digression.

It's people like you that turn a lot of people off to Ruby.

I seriously doubt my mere words would sway anyone away from a specific
technology.  You're still using PHP, correct?  Rob?

 The reason it turns people off is you have to work with the community as

Please, enough with the turned-on, turned-off stuff, it's really not
what I had in mind at all.

  well as the language.  If you want the project to get better, you need

The Rails project _already_ rocks, whatever do you mean?

Truth is I would actually like for core Rails development to slow down
a bit so my latest Rails book I just bought isn't out of date in 6-8
months.

  to be able to work with the community.

So if I can't work with the community Rails effectively, Rails will
not get better?  I seriously can't follow your ramblings.

 I will admit that the PHP
  Internals list can get pretty heated as well, but those arguments are
  usually based on technical opinions and not religious fervor for the
  language*.

Point?


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
 So... there we have it everyone... Greg has admitted that Ruby is as 
 smart as a cat.

Hahaha..  yeah, you really got me on that one.

/me slaps his knee.

  I like something a little more edgy personally. Something closer to human... 
 something
 with personality, something that evolves, something not afraid to be itself. 
 PHP fits
 the bill.

PHP is anything but itself.  Before it was actually written in C it
was first written in Perl.  And although it may be written in C and
may look like C and Perl right now, it's clearly evolving into
something very similar to Java.  PHP has a long, long history with
identity crisis, ongoing even today.

Meanwhile Ruby was written as a full-on OO language from the start.
The OO layer didn't get strapped on at version 3 like with PHP.  OO
was the main idea from the very start with Ruby.  As a result Ruby's
OO model makes PHP's OO model look like a steaming pile of shit out in
the pasture.  Hell, Perl's OO even makes PHP's OO look bad
syntax-wise.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Robert Cummings

On Thu, 2008-03-13 at 15:17 -0500, Greg Donald wrote:
 On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
  So... there we have it everyone... Greg has admitted that Ruby is as 
  smart as a cat.
 
 Hahaha..  yeah, you really got me on that one.
 
 /me slaps his knee.
 
   I like something a little more edgy personally. Something closer to 
  human... something
  with personality, something that evolves, something not afraid to be 
  itself. PHP fits
  the bill.
 
 PHP is anything but itself.  Before it was actually written in C it
 was first written in Perl.  And although it may be written in C and
 may look like C and Perl right now, it's clearly evolving into
 something very similar to Java.  PHP has a long, long history with
 identity crisis, ongoing even today.

But PHP is neither C, Perl, or Java. It's PHP, it formed it's own
identity.

 Meanwhile Ruby was written as a full-on OO language from the start.
 The OO layer didn't get strapped on at version 3 like with PHP.

Strapped on is called evolution. Somewhere along the line some
creature strapped on a pair of eyeballs... and now you can read. Or
maybe you're a creationist... to each their own I suppose.

 OO was the main idea from the very start with Ruby.  As a result Ruby's
 OO model makes PHP's OO model look like a steaming pile of shit out in
 the pasture.  Hell, Perl's OO even makes PHP's OO look bad
 syntax-wise.

PHP gives you options. You can code procedural or OO. It's up to you.
Functional would be nice in some cases, but it's not a requirement.
Personally I like to KISS and make lightweight use of OOP principles. In
that respect, but certainly not limited to that respect, I really can't
say the syntax looks bad. Now Ruby syntax... that is weird... so too is
Perl syntax.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] avoid calling php script

2008-03-13 Thread H u g o H i r a m

HTTP_REFERER will do the job, thanks!

Hugo.
---

Steve Edberg escribió:

At 3:55 AM +0100 3/13/08, H u g o H i r a m wrote:

Hello

I have a swf that runs a PHP script that generates a XML, on the PHP 
is there any way to detect if the file is being called from the swf or 
from the browser? because I want to avoid the file being run directly 
from the browser or from any other file than the swf.


regards,
Hugo.



You might want to check the HTTP_REFERER value; test the program from a 
browser and the swf, and see what happens. Alternatively you could use a 
GET parameter like


   http://example.com/yourscript.php?calledby=swf

Be aware that anything sent back from the client can be spoofed - and 
HTTP_REFERER can be altered or disabled -  so it probably wouldn't be 
hard for someone to make it appear to your script that it is being 
called by your SWF.


If you're really concerned about restricting the communication between 
the Flash movie and your server, there might be some way to build a 
challenge-response mechanism into the flash; I don't know much about it.


If, on the other hand, you just don't want to confuse someone who might 
accidentally run the XML-generating script from the browser, checking a 
GET parameter as above is probably the safest. If it's not set properly, 
redirect the user, eg:


   if (!isset($_GET['calledby']) || $_GET['calledby'] != 'swf') {
  header('Location: http://example.com/thecorrectpage.html');
  exit();
   }
   ...

- steve



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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Roland Häder
Are you talking about Ruby-On-Rails, which is a framework, or about Ruby?

Well, to point out my view, I have to admit that PHP is not really good 
written. In some functions the needle is the first argument, second the 
haystack and vise-versa in other functions.

And talk about OOP with PHP, well, it is -working- but not as like as you know 
from Java. In Java I can create a type-hinted hash-map in one line, by the 
type-hint is an interface. Very nice and small code. :)

Ruby might also be able to do this. In PHP I have to write a class which does 
this for me.

Well, what I want to say is that you cannot compare PHP with wether RoR nor 
Java. RoR is a framework, PHP is not. Java is 99.99% pure OO, PHP is not.

Hope that gives you an idea. :)

And btw: Hello. I'm new to this list. ;-)

Roland

On Thursday, 13. March 2008, Greg Donald wrote:
 On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
  So... there we have it everyone... Greg has admitted that Ruby is as
  smart as a cat.

 Hahaha..  yeah, you really got me on that one.

 /me slaps his knee.

   I like something a little more edgy personally. Something closer to
  human... something with personality, something that evolves, something
  not afraid to be itself. PHP fits the bill.

 PHP is anything but itself.  Before it was actually written in C it
 was first written in Perl.  And although it may be written in C and
 may look like C and Perl right now, it's clearly evolving into
 something very similar to Java.  PHP has a long, long history with
 identity crisis, ongoing even today.

 Meanwhile Ruby was written as a full-on OO language from the start.
 The OO layer didn't get strapped on at version 3 like with PHP.  OO
 was the main idea from the very start with Ruby.  As a result Ruby's
 OO model makes PHP's OO model look like a steaming pile of shit out in
 the pasture.  Hell, Perl's OO even makes PHP's OO look bad
 syntax-wise.


 --
 Greg Donald
 http://destiney.com/



-- 
Weblog:
http://blog.mxchange.org


signature.asc
Description: This is a digitally signed message part.


RE: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Andrés Robinet
 -Original Message-
 From: Greg Donald [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2008 4:17 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] What's wrong the __autoload()?
 
 On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
  So... there we have it everyone... Greg has admitted that Ruby is as
 smart as a cat.
 
 Hahaha..  yeah, you really got me on that one.
 
 /me slaps his knee.
 
   I like something a little more edgy personally. Something closer to
 human... something
  with personality, something that evolves, something not afraid to be
 itself. PHP fits
  the bill.
 
 PHP is anything but itself.  Before it was actually written in C it
 was first written in Perl.  And although it may be written in C and
 may look like C and Perl right now, it's clearly evolving into
 something very similar to Java.  PHP has a long, long history with
 identity crisis, ongoing even today.
 
 Meanwhile Ruby was written as a full-on OO language from the start.
 The OO layer didn't get strapped on at version 3 like with PHP.  OO
 was the main idea from the very start with Ruby.  As a result Ruby's
 OO model makes PHP's OO model look like a steaming pile of shit out in
 the pasture.  Hell, Perl's OO even makes PHP's OO look bad
 syntax-wise.
 
 
 --
 Greg Donald
 http://destiney.com/

Sorry dude, RoR is still an academic toy. And not the most successful one, since
I've heard people talking like you back in 2005. Ruby on Rails is not new and
has not proved anything yet.

It's an arrogant language, so much arrogant that its community pretend it can
fix the world. Back in 2005 I was very enthusiastic and thought it could have a
future, but after confirming what other poster said the RoR community is
insane, I didn't give a f... anymore. 

I believe it will become some piece of *enterprise-class* piece of dust in the
best of scenarios. In the meantime, the web moves towards PHP more and more. And
if they need a fat cat... they don't use RoR, just the Tom Cat.

Look at it this way, in 2001 M$ released the .Net Framework. It's been 7 YEARS
since PHP is STILL the leader and will be so for many more years. And .Net has
the glorious Visual Studio IDE, compiled code, built-in caching, and
idiot-proof tools, and has the BIGGEST software company behind. Do you think
that the work of a man can do much more than that? Specially, a man that has
the arrogance of a big Co.?

In March 2007 David Heinemeier Hansson filed three Rails related trademark
applications to the USPTO. These applications regard the phrase RUBY ON RAILS,
the word RAILS and the official Rails logo. As a consequence, in the summer of
2007 Hansson denied to Apress the permission to use the Rails logo on the cover
of a new Rails book written by some authoritative community members. The episode
gave rise to a polite protest in the Rails community. In response to this
criticism, Hansson made the following claims:
quote
I only grant promotional use [of the Rails logo] for products I'm directly
involved with. Such as books that I've been part of the development process for
or conferences where I have a say in the execution. I would most definitely seek
to enforce all the trademarks of Rails
/quote

Sorry, even if it was the ONE AND ONLY programming language... I will dismiss it
until it becomes a business need, as I don't even trust its creator. PHP is
easy to deal with, it's free... and IT GETS THE JOB DONE. You mentioned
something about projects done on RoR you can share... why don't you show us your
PHP work instead? Maybe you like RoR more because you suck at PHP.

Regards,

Rob


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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Aschwin Wesselius

Andrés Robinet wrote:

why don't you show us your
PHP work instead? Maybe you like RoR more because you suck at PHP.

Regards,

Rob


Hi, can somebody please point out something to me? Did I miss something? 
Is there some initiation needed on this list which I've missed?


How come it is acceptable for grown up (you DO have pubic hair don't 
you?), mature and decent people to call names and try to convince each 
other of having a bigger, better whatever than the other etc.?


Is that PHP-list culture? Is it something to get used to? Is it the core 
of senior PHP-developers or what?


So, explain it to me, what is it that I could have missed? Is it 
somewhere in the archives? Is it explained on some FAQ page? Does it 
take some potions by full moon on a 3rd friday in may to get into this 
state?


It is OK do discuss a subject, to get overheated by passion, ignorance, 
irritation, misunderstanding or a mix of all of them. But isn't calling 
names and comparing bodyparts (and what not) something for kinder garten?


I'm not here to preach, I'm here to learn. So initiate me, tell me what 
is so important that we keep putting energy into convincing somebody 
that he's an idiot, a dumbass, an elite RoR fetishist etc. Does it give 
you a good feeling? Can I try? Should I try? Is it worth it? Will I 
become as enlightened as some of you are?


I don't want to miss out on this great experience, if it is worth it. It 
must be something amazing, really. If that makes the PHP community as 
great as it has become, I want to join and put some effort in this 
marvelous activity.


Aschwin Wesselius


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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Børge Holen
On Thursday 13 March 2008 22:39:51 Aschwin Wesselius wrote:
 Andrés Robinet wrote:
  why don't you show us your
  PHP work instead? Maybe you like RoR more because you suck at PHP.
 
  Regards,
 
  Rob

 Hi, can somebody please point out something to me? Did I miss something?
 Is there some initiation needed on this list which I've missed?

Definetly, you need to express your ego, and be thick skinnned.


 How come it is acceptable for grown up (you DO have pubic hair don't
 you?),
don't use obscenities, this just look stupid on your part when someone google 
the list. Maby for your name?

 mature and decent people to call names and try to convince each 
 other of having a bigger, better whatever than the other etc.?

It's called discussion, you both walk og talk your stuff, so do others and if 
smart enought, someone may learn something from it.


 Is that PHP-list culture? Is it something to get used to? Is it the core
 of senior PHP-developers or what?

It's people with opinions, strong ones to at times.


 So, explain it to me, what is it that I could have missed? Is it
 somewhere in the archives? Is it explained on some FAQ page? Does it
 take some potions by full moon on a 3rd friday in may to get into this
 state?

You got different kinds of people here, like me, just doing this for a hobby, 
I can take some new age weird nerdy talk of nonecense.
However, there are those who do this for a living (not just php, but web 
design or lamp og wamp (how is that for a acronyme =D?)), they don't take 
lightly on having a serious discussion with someone who just f* around 
telling halftruths.


 It is OK do discuss a subject, to get overheated by passion, ignorance,
 irritation, misunderstanding or a mix of all of them. But isn't calling
 names and comparing bodyparts (and what not) something for kinder garten?

Everybody has those, has to do with experience, and the respect for those who 
know what they talk about (that would be those who do this for a living)


 I'm not here to preach, I'm here to learn. So initiate me, tell me what
 is so important that we keep putting energy into convincing somebody
 that he's an idiot, a dumbass, an elite RoR fetishist etc. Does it give
 you a good feeling? Can I try? Should I try? Is it worth it? Will I
 become as enlightened as some of you are?

Discuss that on a civil dunno, some cafe bar hangaround chat page... If you on 
the other hand got some problem with your php code, some questions for what 
you are looking for (i.e. what set of commands is capable of doing...) you've 
come to the right page.


 I don't want to miss out on this great experience, if it is worth it. It
 must be something amazing, really. If that makes the PHP community as
 great as it has become, I want to join and put some effort in this
 marvelous activity.

noones hindering you, just keep in mind that much of these ppl do this for a 
living and time/money/effort/payoff vs the hobbyist thinkering and thoughts 
is often two completly different mindsets

at least, THAT is what I read from the list these last couple of years.




 Aschwin Wesselius


ps. stop whining. If offended, lay low till something new comes to mind or you 
find some more interesting topic to join in on.
-- 
---
Børge Holen
http://www.arivene.net

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



[PHP] Web host with SOAP

2008-03-13 Thread Larry Garfield

Hi all.  I am looking for a web host for a site.  The usual host I work with is 
missing some important functionality, so I need to look elsewhere for this 
project.  Specifically, I need web host that offers the following:

- PHP 5.2.x
- SOAP support
- MySQL 5.0.x
- Allows .htaccess configuration

My current host is fine aside from the SOAP support, which is missing.  

Does anyone have any good recommendations for such a host?  I'd prefer shared 
(it shouldn't be a super-high-traffic site), but if necessary I'm open to 
dedicated if it's not too pricey.  I am willing to pay for quality service (so 
I don't need a cheapo $5/month site).  

--Larry Garfield



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



Re: [PHP] How to get error context

2008-03-13 Thread Jim Lucas

It Maq wrote:

Hi,

i need help because I'm unable to retrieve error's context. Below is the code 
that is working perfectly except the context that is not displayed:

?php
function error_handler($errno, $errstr, $filename, $lineno, $errcontext)
{



try doing a print_r($errcontext) here and see what you get?

maybe the zero index does not exist.

  
$str = ;

$str .= brbrERROR Number: . $errno;
$str .= brERROR MESSAGE: . $errstr;
$str.= brFile: . $filename;
$str.= brLine number: . $lineno;
$str.= brContext: . $errcontext[0];
echo $str;



}

echo h1Testing set_error_handler/h1;



I have always used
error_reporting(E_ALL);
instead of this.
error_reporting(0);  
set_error_handler('error_handler'); 
ini_set('error_reporting', 0);


I have never seen the above line before.  This and the error_reporting(0) would 
probably suppress all error messages generated by PHP.  Double check these 
settings and make sure the you can still trigger an error with trigger_error() 
if you have error_reporting() turned off.




//trigger_error(The string for testing the error, E_USER_WARNING);
$ourFileName = testFile.txt;
$fh = fopen($ourFileName, 'X');// or die(Can't open file);
fclose($fh);


?




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 







--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Gustavo Narea
Oh, I get it.

Thank you!

On Wednesday 12 March 2008 15:26:01 Richard Heyes wrote:
  I'm wondering what's wrong with the use of __autoload(), since I see that
  projects like the Zend Framework don't use it and prefer to require_once
  each required file.

 Things that happen without you explicitly causing them (ie require() et
 al) can lead to confusion.

 For example a junior developer who doesn't know of its existence  and is
 new to a job is less likely to admit ignorance and ask how a class is
 being defined when __autoload() is being used.


-- 
Gustavo Narea.
http://gustavonarea.net/

Get rid of unethical constraints!
 - Switch to Freedomware: http://softwareliberty.com/
 - Reclaim your culture: http://lifesnotreadonly.net/

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



[PHP] class for generating ics or vcs file

2008-03-13 Thread VamVan
Hello All,

Can anyone share with me a simple class or code that can generate vcs
or ics calendar file in php, that can be imported in to outlook.

Thanks

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



Re: [PHP] mail function and headers

2008-03-13 Thread Chris

Alain Roger wrote:

hiChris,

i've read several forums where this mail() function from PHP initial 
package is not so great.


mail() works fine.

phpmailer (and zendmailer, swiftmailer and other such packages) help you 
with things like:


- sending through an smtp server
- putting a multipart email together
- adding attachments
- embedding images in your email content

and a whole bunch of other stuff so you don't have to write the code to 
do all of that.


There's nothing fancy in any of them, and if you don't tell them to send 
through an smtp server, they use the normal mail() command (in most 
cases I think anyway).


--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP] Last Friday of every month

2008-03-13 Thread VamVan
Can you tell me how to do this ?

suppose I have a date variable = '02/23/2008'

i need to know if this is the last friday of february

let me know.

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



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Robert Cummings

On Thu, 2008-03-13 at 22:39 +0100, Aschwin Wesselius wrote:
 Andrés Robinet wrote:
  why don't you show us your
  PHP work instead? Maybe you like RoR more because you suck at PHP.
 
  Regards,
 
  Rob
 
 Hi, can somebody please point out something to me? Did I miss something? 
 Is there some initiation needed on this list which I've missed?
 
 How come it is acceptable for grown up (you DO have pubic hair don't 
 you?), mature and decent people to call names and try to convince each 
 other of having a bigger, better whatever than the other etc.?
 
 Is that PHP-list culture? Is it something to get used to? Is it the core 
 of senior PHP-developers or what?
 
 So, explain it to me...

It works like follows...

- $z asserts $a or claims $b
- $y disagrees with $a or $b or both and responds with rebuttal $h
  and makes claims $c, $d, sometimes $e
- $z responds with rebuttal $i and often asserts a few other things
  that well call $f, $g
- $x throws in $Q
- $w throws in $wtf
- $foo, $fee, and $fii join in
- $someone mentions $TLC
- $o calls us all immature
- $SJHSKJ mentions Nazis
- $x invokes Godwin's Law
- $y asserts Quirk's Exception
- $G_Zus resurrects point $d
- $nobody wins
- $r, $u, $stillWithMe

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



RE: [PHP] Last Friday of every month

2008-03-13 Thread Andrés Robinet
 -Original Message-
 From: VamVan [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2008 9:13 PM
 To: php-general@lists.php.net
 Subject: [PHP] Last Friday of every month
 
 Can you tell me how to do this ?
 
 suppose I have a date variable = '02/23/2008'
 
 i need to know if this is the last friday of february
 
 let me know.

My view...

$strDate = '02/23/2008';
//
$intDate = strtotime($strDate);
$numDaysInMonth = date('t', $intDate);
$dayOfWeek = date('w', $intDate);
$dayOfMonth = date('j', $intDate);
If ($dayOfWeek == 5  $numDaysInMonth - $dayOfMonth  7) {
echo Friday Party!;
} else {
echo Sorry dude, you missed it;
}

Btw, read the manual (and don't think to be so lucky to not found any bugs in my
code).

Regards,

Rob(inet)


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] Web host with SOAP

2008-03-13 Thread Daniel Brown
On Thu, Mar 13, 2008 at 5:33 PM, Larry Garfield [EMAIL PROTECTED] wrote:

  Hi all.  I am looking for a web host for a site.  The usual host I work with 
 is missing some important functionality, so I need to look elsewhere for this 
 project.  Specifically, I need web host that offers the following:

  - PHP 5.2.x
  - SOAP support
  - MySQL 5.0.x
  - Allows .htaccess configuration

Larry,

I'm on 5.2.4 on the primary server right now, and if you need
something installed at root level, it's usually no problem (especially
for things like SOAP).  Send me a message off-list if you haven't
already found what you're looking for, and if you want references,
there are some on the list here even who host some sites with me.  Let
me know and I'm sure it won't be a problem to have them give you an
*honest* opinion about things.

Plus, for a few people here, I don't have much issue with granting
sudo but don't tell anyone else.  ;-P

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



Re: [PHP] Web host with SOAP

2008-03-13 Thread Shawn McKenzie
Daniel Brown wrote:
 On Thu, Mar 13, 2008 at 5:33 PM, Larry Garfield [EMAIL PROTECTED] wrote:
  Hi all.  I am looking for a web host for a site.  The usual host I work 
 with is missing some important functionality, so I need to look elsewhere 
 for this project.  Specifically, I need web host that offers the following:

  - PHP 5.2.x
  - SOAP support
  - MySQL 5.0.x
  - Allows .htaccess configuration
 
 Larry,
 
 I'm on 5.2.4 on the primary server right now, and if you need
 something installed at root level, it's usually no problem (especially
 for things like SOAP).  Send me a message off-list if you haven't
 already found what you're looking for, and if you want references,
 there are some on the list here even who host some sites with me.  Let
 me know and I'm sure it won't be a problem to have them give you an
 *honest* opinion about things.
 
 Plus, for a few people here, I don't have much issue with granting
 sudo but don't tell anyone else.  ;-P
 
Ooo...  I want SUDO!

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



Re: [PHP] Web host with SOAP

2008-03-13 Thread Shawn McKenzie
Shawn McKenzie wrote:
 Daniel Brown wrote:
 On Thu, Mar 13, 2008 at 5:33 PM, Larry Garfield [EMAIL PROTECTED] wrote:
  Hi all.  I am looking for a web host for a site.  The usual host I work 
 with is missing some important functionality, so I need to look elsewhere 
 for this project.  Specifically, I need web host that offers the following:

  - PHP 5.2.x
  - SOAP support
  - MySQL 5.0.x
  - Allows .htaccess configuration
 Larry,

 I'm on 5.2.4 on the primary server right now, and if you need
 something installed at root level, it's usually no problem (especially
 for things like SOAP).  Send me a message off-list if you haven't
 already found what you're looking for, and if you want references,
 there are some on the list here even who host some sites with me.  Let
 me know and I'm sure it won't be a problem to have them give you an
 *honest* opinion about things.

 Plus, for a few people here, I don't have much issue with granting
 sudo but don't tell anyone else.  ;-P

 Ooo...  I want SUDO!

ALL = NOPASSWD: ALL

please!

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



Re: [PHP] class for generating ics or vcs file

2008-03-13 Thread TG



- Original Message -
From: VamVan [EMAIL PROTECTED]
To: php-general@lists.php.net
Date: Thu, 13 Mar 2008 16:21:37 -0700
Subject: [PHP] class for generating ics or vcs file

 Hello All,
 
 Can anyone share with me a simple class or code that can generate vcs
 or ics calendar file in php, that can be imported in to outlook.


I started making my own a while ago and never totally finished it.  I think 
it does actually work, but is somewhat incomplete and unpolished.  You're 
welcome to what I started if it helps.  It's relatively simple stuff (at 
least for the basic events).   I left in the notes I was keeping in 
comments with reference links and sample ICS data:

-TG


?
###
# Notes
###

### Two good links about iCal and PHP
##  http://www.phpbuilder.com/columns/chow20021007.php3?print_mode=1
##  http://en.wikipedia.org/wiki/ICalendar

### Simple iCal example
/*
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//GSA Calendar//NONSGML v1.0//EN
BEGIN:VEVENT
DTSTART:20080131T035959Z
DTEND:20080131T17Z
SUMMARY:Test ICS download and integrate
END:VEVENT
END:VCALENDAR
*/

### Sample Outlook 2003 iCal invite
/*
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;CN=Anthony 
Rogers;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[EMAIL PROTECTED]


ATTENDEE;[EMAIL PROTECTED];ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[EMAIL 
PROTECTED]


ATTENDEE;[EMAIL PROTECTED];ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[EMAIL 
PROTECTED]
DTSTART:20080111T193000Z
DTEND:20080111T21Z
TRANSP:OPAQUE
SEQUENCE:0


UID:04008200E00074C5B7101A82E0085035EA6DAB52C801100
07401AA7720FA544DB3F1ADFE59AB3172
DTSTAMP:20080109T154318Z
DESCRIPTION:\nSince Cathy and Jes are Pacific Time it will be 11:30 -
1:00pm for them. \n\n
SUMMARY:Updated: Web Redesign  HighWire Discussion
PRIORITY:1
X-MICROSOFT-CDO-IMPORTANCE:2
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
*/

# Mandatory fields?
$appname = App Name;
$dtstart = 20080131T153000Z;
$dtend   = 20080131T17Z;
$summary = This is a test summary;
$filename = Cal_$dtstart.ics;

$summary = str_replace(\r, =0D=0A=, $summary);

$vCalStart = date(Ymd\THi00, $row['EventStart']);
$vCalEnd = date(Ymd\THi00, $row['EventEnd']);

# Optional fields
$description = This is a longer description of what the event is all about.  
This part is optional I believe;
$attendees[] = array(Name=, Role=, RSVP=, MailTo=);
$transp = OPAQUE;
$sequence = 0;
$uid = ;
$dtstamp = ;
$priority = 1;
$xmicrosoftcdoimportance = 2;
$class = PUBLIC;


header(Content-type: text/calendar);
header(Content-Disposition: inline; filename=$filename);

echo BEGIN:VCALENDAR\n;
// echo VERSION:2.0\n;
echo PRODID:-//$appname//NONSGML v1.0//EN\n;
echo BEGIN:VEVENT\n;
echo DTSTART:$dtstart\n;
echo DTEND:$dtend\n;
echo SUMMARY:$summary\n;
echo DESCRIPTION:$description\n;
echo END:VEVENT\n;
echo END:VCALENDAR\n;



?

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



Re: [PHP] Intercepting errors

2008-03-13 Thread Chris

Stephane Ulysse wrote:

PLEASE STOP EMAILING ME


THEN CLICK THE UNSUBSCRIBE LINK AT THE BOTTOM OF THE EMAIL. IT'S VERY 
EASY TO DO.


--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] curl fails to connect when not port 80

2008-03-13 Thread Chris



When running this same script through apache however, it works fine without
the port directive.  However, I get no results when attempting to connect to
port 8080.  Command line curl works fine too.  It's only when connecting
through apache that my script fails.

Here are some specifics about my environment:

Apache/2.2.3 (Red Hat)

libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
PHP/5.1.6

Any help/suggestions will be *greatly* appreciated!!  This is driving me
nuts!


Your host could have it blocked in the firewall.
It could be SeLinux getting in the way.

Not sure about other suggestions :)

Add a verbose call:

curl_setopt($ch, CURLOPT_VERBOSE, true);

and maybe set the error log for it to use:

curl_setopt($ch, CURLOPT_STDERR, '/path/to/file.log');

--
Postgresql  php tutorials
http://www.designmagick.com/

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