Re: [PHP] PHP Frameworks - Opinion

2006-08-02 Thread Hidayet Dogan

What about CakePHP and Code Igniter?

I know working with Code Igniter easier than CakePHP, but CakePHP is more 
capable than Code Igniter.


On Tue, 1 Aug 2006, Robert Cummings wrote:


On Wed, 2006-08-02 at 04:15 +0200, rich gray wrote:

Robert Cummings wrote:

[chop]
An IDE is not a framework, it's an IDE :)

Cheers,
Rob.


I think Rob is being unduly modest - correct me if I am wrong but he is
the core developer of the InterJinn php framework -
http://interjinn.com - it's been out there for a while now (read:
robust, fully featured) and the ZF is still in beta I think...


*lol* Thanks for the props. I don't really promote InterJinn anymore. I
actively develop it as my needs arise for my customers (which is failry
often) but the documentation is out of date and I haven't found time
lately to improve upon that. It fulfills all my own needs (and when it
doesn't I just add new stuff :) But as someone said frameworks never
meet all your needs and eventually it comes down to taste and community.
At any rate, there are probably hundreds of frameworks out there now,
and voting for myself seems self gratifying *heheh*.

BTW I posted under a different email address earlier because I just
recently upgraded my email client from evolution 1.4 to 2.6.1 and it
seems to be having issues with my default account setting :/

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
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] PHP Frameworks - Opinion

2006-08-02 Thread Andries Seutens

Hidayet Dogan schreef:

What about CakePHP and Code Igniter?

I know working with Code Igniter easier than CakePHP, but CakePHP is 
more capable than Code Igniter.


Hi,

Lately frameworks have become a real *hype*. Currently, there are more 
than 40 frameworks out there, and new ones are being released daily.


This gives us a wide variety of frameworks to choose from, and pick the 
one that fits to most of our needs.


This comparison chart gives you an overview of the functionality each 
framework offers:


http://www.phpit.net/demo/framework%20comparison/chart.php

Personally, I think that the community at the Zend Framework is doing a 
pretty good job. Everything is coded very well, with a lot of 
possibilities to extend things to your personal needs (if nessecary).


Regards,


Andries Seutens
Belgium
http://andries.systray.be

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



[PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Tony Marston

Gabe [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 What's the common consensus as to a solid PHP framework to use for 
 application development?  There seems to be a number of them out there, 
 but I'm not sure which one's are the most robust, actively developed, 
 secure, etc etc.

 Thoughts?

If you want a rapid application development framework for administrative web 
applications then take a look at http://www.radicore.org It has dynamic 
menus, a role based access control system, audit logging without database 
triggers, a data dictionary, internationalisation, and a workflow engine.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org 

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



Re: [PHP] PHP Frameworks - Opinion

2006-08-02 Thread Paul Scott
--=neXtPaRt_1154507404
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


 Personally, I think that the community at the Zend Framework is doing a 
 pretty good job. Everything is coded very well, with a lot of 
 possibilities to extend things to your personal needs (if nessecary).

The ZF is OK, its really immature though, but the advantage being that
it is coded in a similar way, as well as similar thinking as our
framework - chisimba (http://5ive.uwc.ac.za/ )

In fact we have used some of the components from ZF in it already. 

--Paul


--=neXtPaRt_1154507404
Content-Type: text/plain;

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

--=neXtPaRt_1154507404--

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



[PHP] Image list performance ISSUE

2006-08-02 Thread Andy
Hi, 

I have tons of images, which belongs to different users. In the software we 
show to the users only the images that they have, but If they take the image 
links manually they can also see the other images if they modify the image name 
in the link. 

Now, I can override the image request with apache rewrite and send the request 
to a php file, which analizes the user rights and if the user has rights to see 
that image. After that I output the image file with php this way:
header(Content-Type: image/jpeg);
header(Content-Length: .filesize($fname));
readfile($fname);   

... where fname is the image file.

I want to know... is this a big performance issue or not(the image is handled 
by php and not by apache directly)

OR...

Is there any other way to handle this situation???

Thanx,
Andy.

[PHP] Printer Friendly

2006-08-02 Thread weetat

Hi all ,

  I have a web page which need to be print to the printer.
  However when i use javascript window print() function , the page and 
alignment is out.


  Read on the net , suggest that i need to setup a printer friendly 
page in the web page.


  Any ideas how i going to accomplished it in php ?

Thanks

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



[PHP] Re: Printer Friendly

2006-08-02 Thread David Robley
weetat wrote:

 Hi all ,
 
I have a web page which need to be print to the printer.
However when i use javascript window print() function , the page and
 alignment is out.
 
Read on the net , suggest that i need to setup a printer friendly
 page in the web page.
 
Any ideas how i going to accomplished it in php ?
 
 Thanks

You don't do it with php - you use css and html.



Cheers
-- 
David Robley

I'd like some Chinese food, said Tom wantonly.
Today is Prickle-Prickle, the 68th day of Confusion in the YOLD 3172. 

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



Re: [PHP] Printer Friendly

2006-08-02 Thread Andries Seutens

weetat schreef:

Hi all ,

  I have a web page which need to be print to the printer.
  However when i use javascript window print() function , the page and 
alignment is out.


  Read on the net , suggest that i need to setup a printer friendly 
page in the web page.


  Any ideas how i going to accomplished it in php ?

Thanks


This depends on where your content comes from, and the way you have 
setup your output to be generated.


A simple example would be to setup a new page where you display the same 
content, but with all the html tags stripped...


Best regards,

Andries Seutens
Belgium
http://andries.systray.be

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



Re: [PHP] Image list performance ISSUE

2006-08-02 Thread tedd

At 12:15 PM +0300 8/2/06, Andy wrote:

Hi,

I have tons of images, which belongs to different users. In the 
software we show to the users only the images that they have, but If 
they take the image links manually they can also see the other 
images if they modify the image name in the link.


-snip-

Is there any other way to handle this situation???


Have each user have their own directory.

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] Dynamic Images

2006-08-02 Thread Manoj Singh

Hello all,

I am creating a a script in which a dynamic graph is generated through gd
library. The format of the picture is jpeg. Now the problem is that the
browser is caching the images and after updating also it is displaying the
older image.

Currently for clearing the cache i am using this code
?php
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
header(Cache-Control: no-store, no-cache, must-revalidate);
header(Cache-Control: no-cache);
header(Pragma: no-cache);
?

But this code is not working me. Please help me.

Regards
Manoj

--
Manoj Kumar Singh
Software Engineer
Kalptaru Infotech Ltd
Dawa Bazaar
Indore (MP)
452001


[PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread karthikeyan balasubramanian

Tony Marston wrote:
Gabe [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
What's the common consensus as to a solid PHP framework to use for 
application development?  There seems to be a number of them out there, 
but I'm not sure which one's are the most robust, actively developed, 
secure, etc etc.


Thoughts?


If you want a rapid application development framework for administrative web 
applications then take a look at http://www.radicore.org It has dynamic 
menus, a role based access control system, audit logging without database 
triggers, a data dictionary, internationalisation, and a workflow engine.




Speaking about framework.  Anybody is aware there is a very popular
framework in Java called Spring which has pretty cool features like
Inversion of Control, Dependency Injection etc.  Anyone interested
in porting Spring Framework to PHP?

Regards,

Karthikeyan B

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Jochem Maas
karthikeyan balasubramanian wrote:
 Tony Marston wrote:
 Gabe [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 What's the common consensus as to a solid PHP framework to use for
 application development?  There seems to be a number of them out
 there, but I'm not sure which one's are the most robust, actively
 developed, secure, etc etc.

 Thoughts?

 If you want a rapid application development framework for
 administrative web applications then take a look at
 http://www.radicore.org It has dynamic menus, a role based access
 control system, audit logging without database triggers, a data
 dictionary, internationalisation, and a workflow engine.

 
 Speaking about framework.  Anybody is aware there is a very popular
 framework in Java called Spring which has pretty cool features like
 Inversion of Control, Dependency Injection etc.  Anyone interested
 in porting Spring Framework to PHP?

I'll have it ready for you next week, what kind of license do you want?

 
 Regards,
 
 Karthikeyan B
 

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



Re: [PHP] Printer Friendly

2006-08-02 Thread tedd

At 6:03 PM +0800 8/2/06, weetat wrote:

Hi all ,

  I have a web page which need to be print to the printer.
  However when i use javascript window print() function , the page 
and alignment is out.


  Read on the net , suggest that i need to setup a printer friendly 
page in the web page.


  Any ideas how i going to accomplished it in php ?


You can accomplish this with php, if you want -- an example follows:

http://xn--ovg.com/print_html

However, IMO it's *much* easier to align things (and much more) using css.

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] Dynamic Images

2006-08-02 Thread tedd

At 6:08 PM +0530 8/2/06, Manoj Singh wrote:

Hello all,

I am creating a a script in which a dynamic graph is generated through gd
library. The format of the picture is jpeg. Now the problem is that the
browser is caching the images and after updating also it is displaying the
older image.

Currently for clearing the cache i am using this code
?php
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
header(Cache-Control: no-store, no-cache, must-revalidate);
header(Cache-Control: no-cache);
header(Pragma: no-cache);
?

But this code is not working me. Please help me.

Regards
Manoj


Manoj:

I had a similar problem -- if memory serves me correctly, I solved it 
by appending a random string to the jpg, such as graph.jeg?id=some 
random string. The image tag won't process the addition and the 
browser treats it as a new image. I think this worked for most 
browsers, but I may be wrong.


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] Re: PHP Frameworks - Opinion

2006-08-02 Thread Stut

Jochem Maas wrote:

Stut wrote:
  

Jochem Maas wrote:


I'll have it ready for you next week, what kind of license do you want?
  
  

One license to kill to go please.



006.5 your lic is in the post. and while I'm at it can I port an obscure
OS to the hardware of your choice during my lunch break?



Been done: http://mail-index.netbsd.org/tech-ports/2002/07/05/.html

-Stut

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Stut

Jochem Maas wrote:

I'll have it ready for you next week, what kind of license do you want?
  


One license to kill to go please.

-Stut

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Jochem Maas
Stut wrote:
 Jochem Maas wrote:
 I'll have it ready for you next week, what kind of license do you want?
   
 
 One license to kill to go please.

006.5 your lic is in the post. and while I'm at it can I port an obscure
OS to the hardware of your choice during my lunch break?

 
 -Stut

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



[PHP] Documentation of PHP sourcecode

2006-08-02 Thread Paul Zwiers
Dear all,

With a growing base of previous PHP work (not to be be mistaken for a 
framework :) ) I also find myself recoding and reinventing the wheel. 
Something I really do not want to do.

I am looking in some possibilities for automatically documenting my functions 
and classes. Preferably with some markup in the sourcecode and easy to 
implement. I am running Linux on my desktop so w* stuff won't do it for me :)

Can anyone point me in the right direction?

Thanks in advance!

-- 
Paul R. Zwiers

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



Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Chris Boget
I am looking in some possibilities for automatically documenting my 
functions

and classes. Preferably with some markup in the sourcecode and easy to
implement. I am running Linux on my desktop so w* stuff won't do it for me 
:)

Can anyone point me in the right direction?


Check out PHPDocumentor.

http://www.phpdoc.org/

This is just one package of the many that are out there.  A quick search on
google will show others.

thnx,
Chris 


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



Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread John Nichel

Paul Zwiers wrote:

Dear all,

With a growing base of previous PHP work (not to be be mistaken for a 
framework :) ) I also find myself recoding and reinventing the wheel. 
Something I really do not want to do.


I am looking in some possibilities for automatically documenting my functions 
and classes. Preferably with some markup in the sourcecode and easy to 
implement. I am running Linux on my desktop so w* stuff won't do it for me :)


Can anyone point me in the right direction?

Thanks in advance!



http://www.phpdoc.org/

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Jochem Maas
Paul Zwiers wrote:
 Dear all,
 
 With a growing base of previous PHP work (not to be be mistaken for a 
 framework :) ) I also find myself recoding and reinventing the wheel. 
 Something I really do not want to do.
 
 I am looking in some possibilities for automatically documenting my functions 
 and classes. Preferably with some markup in the sourcecode and easy to 
 implement. I am running Linux on my desktop so w* stuff won't do it for me :)
 
 Can anyone point me in the right direction?

google on 'phpdocumentor' - it will do exactly what your looking for
(apart from write the documentation comments ;-)

 
 Thanks in advance!
 

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 15:51 +0300, karthikeyan balasubramanian wrote:

 Speaking about framework.  Anybody is aware there is a very popular
 framework in Java called Spring which has pretty cool features like
 Inversion of Control, Dependency Injection etc.

Sounds similar to the service system implemented in InterJinn. I
implemented a lookup system allowing retrieval of service objects by
custom names. This allows the mapping to be overriden with userland
re-definitions which may or may not extend the original class. In this
way, a developer can replace components and services without the need to
change the code that makes use of such objects. The only caveat is that
the override must at least support the methods and properties for the
service or component being overriden. I have used this in many projects
to extend the core components in InterJinn to provide customers with
tailored functionality for their own specific needs. A simple example
was overriding the mail service to dupe outgoing emails and store in an
archive. It was as simple as extending the JinnMail class, overriding
the send() method, and overriding the service registration. And voila,
all existing code across the project automatically inherited the
functionality, and the distribution code didn't need to be touched.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Gabe

Gabe wrote:
What's the common consensus as to a solid PHP framework to use for 
application development?  There seems to be a number of them out there, 
but I'm not sure which one's are the most robust, actively developed, 
secure, etc etc.


Thoughts?


Sounds like it's just personal preference.  But thanks for all the posts!

Too bad there isn't a skeleton sort-of system that you essentially then 
just plug in the modules that you want/need to flesh it out.  Then 
you'd have your own customized framework for each app that is developed 
and keeps *all* of the modules relevant to that app.  Nothing extra 
would be included that isn't needed.


Then as a developer all you're looking for is modules and not huge 
frameworks that may include lots of functionality that you don't have 
any interest in.  It would certainly keep any attack surface smaller 
when it comes to vulnerabilities.


Is there anything out there like that?

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



Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Brad Bonkoski

www.phpdoc.org
similar to javadocs, and works pretty well.
-Brad

Paul Zwiers wrote:

Dear all,

With a growing base of previous PHP work (not to be be mistaken for a 
framework :) ) I also find myself recoding and reinventing the wheel. 
Something I really do not want to do.


I am looking in some possibilities for automatically documenting my functions 
and classes. Preferably with some markup in the sourcecode and easy to 
implement. I am running Linux on my desktop so w* stuff won't do it for me :)


Can anyone point me in the right direction?

Thanks in advance!

  


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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 10:50 -0400, Gabe wrote:
 Gabe wrote:
  What's the common consensus as to a solid PHP framework to use for 
  application development?  There seems to be a number of them out there, 
  but I'm not sure which one's are the most robust, actively developed, 
  secure, etc etc.
  
  Thoughts?
 
 Sounds like it's just personal preference.  But thanks for all the posts!
 
 Too bad there isn't a skeleton sort-of system that you essentially then 
 just plug in the modules that you want/need to flesh it out.  Then 
 you'd have your own customized framework for each app that is developed 
 and keeps *all* of the modules relevant to that app.  Nothing extra 
 would be included that isn't needed.
 
 Then as a developer all you're looking for is modules and not huge 
 frameworks that may include lots of functionality that you don't have 
 any interest in.  It would certainly keep any attack surface smaller 
 when it comes to vulnerabilities.
 
 Is there anything out there like that?

A good framework won't load all of the code out there. It will load the
code on an as-needed basis. So that if you only use one piece, that's
the only piece loaded (notwithstanding the loading mechanism being
loaded also :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Is this a PHP issue, or a CGI issue?

2006-08-02 Thread Dave M G

PHP List,

I'm writing a PHP script that has a form which accesses a CGI script on 
an external web site.


The CGI I am accessing is a Japanese dictionary. My form will take 
Japanese input, send it to the external server, and hopefully return 
with a list of words and definitions. I hope to be able to trap the 
output from the external server in such a way that I can use PHP to 
maniplate the output and structure it for insertion into a database.


What I have for the form tag is:

echo form method=\uri\ 
action=\http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI\;;


The 9MGI part is syntax specific to the CGI script at monash.edu.au 
that I am accessing. It says to use utf8 encoding, and specifies which 
dictionary to use.


The method is uri, so that the text included in the form will be 
appended to the URL.


When I test my script in my FireFox browser, I get a pop up window 
asking me what to do with a bin file. I click to save it, and I get a 
file called wwwjdic on my desktop.


I'm a little lost here. Is this a problem of PHP not knowing what to do 
with the returned output? Is it an issue with the script at 
monash.edu.au that I need to contact the developer about? Is it 
something do to with how the form action is structured?


Please advise on how to diagnose and address this problem.

If necessary, please tell me where this issue would be best addressed if 
it is not a PHP issue.


Thank you for your time and help.

--
Dave M G

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



Re: [PHP] Is this a PHP issue, or a CGI issue?

2006-08-02 Thread Jochem Maas
Dave M G wrote:
 PHP List,
 
 I'm writing a PHP script that has a form which accesses a CGI script on
 an external web site.
 
 The CGI I am accessing is a Japanese dictionary. My form will take
 Japanese input, send it to the external server, and hopefully return
 with a list of words and definitions. I hope to be able to trap the
 output from the external server in such a way that I can use PHP to
 maniplate the output and structure it for insertion into a database.
 
 What I have for the form tag is:
 
 echo form method=\uri\
 action=\http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI\;;
 
 The 9MGI part is syntax specific to the CGI script at monash.edu.au
 that I am accessing. It says to use utf8 encoding, and specifies which
 dictionary to use.
 
 The method is uri, so that the text included in the form will be
 appended to the URL.

then the method should be 'get' no?

 
 When I test my script in my FireFox browser, I get a pop up window
 asking me what to do with a bin file. I click to save it, and I get a
 file called wwwjdic on my desktop.

well your browser doesn't know what to do with the file... therefore the 
download.
and *your* server (and it's php setup) is not involved with this transaction at 
all.

if you want php to parse/process the output of the CGI script on
the third party server then you will have to submit the form to YOUR server and
have the php script that process the submit perform a request to the third party
machine, something like the following (untested, would require ini setting
'allow_url_fopen' to be on, takes no account of the encoding hell you might need
to go through, input sanitation/validation left out for brevity, you might
not have some of the functions mentioned):

?php

$url  = 'http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI'
$urlquery = http_build_query($_GET);
$response = file_get_contents($url.''.$urlquery);

// this is what the third party server gave you in reply to your request:
var_dump($response);


 
 I'm a little lost here. Is this a problem of PHP not knowing what to do
 with the returned output? Is it an issue with the script at
 monash.edu.au that I need to contact the developer about? Is it
 something do to with how the form action is structured?
 
 Please advise on how to diagnose and address this problem.
 
 If necessary, please tell me where this issue would be best addressed if
 it is not a PHP issue.

it's not a PHP issue (yet) because you have yet to involve php at any stage ...
no doubt it will become a php issue in the near future ;-)

 
 Thank you for your time and help.
 

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Paul Scott

 Too bad there isn't a skeleton sort-of system that you essentially then 
 just plug in the modules that you want/need to flesh it out.  Then 
 you'd have your own customized framework for each app that is developed 
 and keeps *all* of the modules relevant to that app.  Nothing extra 
 would be included that isn't needed.
 
 Then as a developer all you're looking for is modules and not huge 
 frameworks that may include lots of functionality that you don't have 
 any interest in.  It would certainly keep any attack surface smaller 
 when it comes to vulnerabilities.
 
 Is there anything out there like that?
 

You have just described KINKY/Chisimba...

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 18:08 +0200, Jochem Maas wrote:
 Robert Cummings wrote:
  On Wed, 2006-08-02 at 15:51 +0300, karthikeyan balasubramanian wrote:
  Speaking about framework.  Anybody is aware there is a very popular
  framework in Java called Spring which has pretty cool features like
  Inversion of Control, Dependency Injection etc.
  
  Sounds similar to the service system implemented in InterJinn. I
  implemented a lookup system allowing retrieval of service objects by
  custom names. This allows the mapping to be overriden with userland
  re-definitions which may or may not extend the original class. In this
  way, a developer can replace components and services without the need to
  change the code that makes use of such objects. The only caveat is that
  the override must at least support the methods and properties for the
  service or component being overriden. 
 
 I guess you'll be needing the strict method signature 'goodness'* to make
 you code better and more robust heh ;-)
 
 (and yes I have been following *that* thread on internals)

*lol* No, I don't believe in forcing the issue. For instance providing
method support does not necessarily mean same signature. For instance a
subclass may provide a default value in the parameters effectively
changing the signature of the parent class yet still keeping
compatibility. I think the strict thing being discussed on the
internals is nice to have, but I prefer the ability to change the
signature when you know what you are doing, or ultimately some kind of
method overloading based on parameter types signatures :) I am in the
give PHP users the power they want camp, and not in the put a cage
around OOP users camp.  :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Gabe

Robert Cummings wrote:


On Wed, 2006-08-02 at 10:50 -0400, Gabe wrote:


Gabe wrote:

What's the common consensus as to a solid PHP framework to use for 
application development?  There seems to be a number of them out there, 
but I'm not sure which one's are the most robust, actively developed, 
secure, etc etc.


Thoughts?


Sounds like it's just personal preference.  But thanks for all the posts!

Too bad there isn't a skeleton sort-of system that you essentially then 
just plug in the modules that you want/need to flesh it out.  Then 
you'd have your own customized framework for each app that is developed 
and keeps *all* of the modules relevant to that app.  Nothing extra 
would be included that isn't needed.


Then as a developer all you're looking for is modules and not huge 
frameworks that may include lots of functionality that you don't have 
any interest in.  It would certainly keep any attack surface smaller 
when it comes to vulnerabilities.


Is there anything out there like that?



A good framework won't load all of the code out there. It will load the
code on an as-needed basis. So that if you only use one piece, that's
the only piece loaded (notwithstanding the loading mechanism being
loaded also :)

Cheers,
Rob.


True, but I was also talking more about the package of files to install 
that contains all of the code.  For instance, if the Zend Framework 
contains 8 different modules and all of the php code files to support 
those 8, and I only need to use 3 of those modules for my specific app, 
then it would be cool to be able to not have to have all the additional 
code files that aren't used.


I just like to keep things as small and tidy as possible.  :)  Of 
course, maybe frameworks do this and I'm just missing something...


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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Jochem Maas
Robert Cummings wrote:
 On Wed, 2006-08-02 at 18:08 +0200, Jochem Maas wrote:
 Robert Cummings wrote:
 On Wed, 2006-08-02 at 15:51 +0300, karthikeyan balasubramanian wrote:
 Speaking about framework.  Anybody is aware there is a very popular
 framework in Java called Spring which has pretty cool features like
 Inversion of Control, Dependency Injection etc.
 Sounds similar to the service system implemented in InterJinn. I
 implemented a lookup system allowing retrieval of service objects by
 custom names. This allows the mapping to be overriden with userland
 re-definitions which may or may not extend the original class. In this
 way, a developer can replace components and services without the need to
 change the code that makes use of such objects. The only caveat is that
 the override must at least support the methods and properties for the
 service or component being overriden. 
 I guess you'll be needing the strict method signature 'goodness'* to make
 you code better and more robust heh ;-)

 (and yes I have been following *that* thread on internals)
 
 *lol* No, I don't believe in forcing the issue. For instance providing
 method support does not necessarily mean same signature. For instance a
 subclass may provide a default value in the parameters effectively
 changing the signature of the parent class yet still keeping
 compatibility. I think the strict thing being discussed on the
 internals is nice to have, but I prefer the ability to change the
 signature when you know what you are doing, or ultimately some kind of
 method overloading based on parameter types signatures :) I am in the
 give PHP users the power they want camp, and not in the put a cage
 around OOP users camp.  :)

I did gather that from you posts. I have mostly refrained from commenting myself
because I have been flamed plenty in times past for daring to comment on the
'purism crusade' that has been unfolding since about 5.0.2 (I did comment on
the problem of E_STRICT being misused for depreciated stuff, meaning that 
causing an
E_STRICT on 'loose' subclass methods means your basically saying 'shit code, 
shit code'
by implication)

me I'm on the same band wagon, shove enforced strictness where the sun doesn't 
shine.
(and while your at it give me 'late static binding', which A should have been 
in there
from the beginning and B is a basic OO concept that is implemented in every 
other decent
dynamically-typed OO language).

don't get me started on iterators in ruby and how flexible it is in changing 
stuff
(like method parameters - or like redefining a whole class at runtime). hmmm :-/
pity my ruby skills suck. :-P

 
 Cheers,
 Rob.

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Jochem Maas
Robert Cummings wrote:
 On Wed, 2006-08-02 at 15:51 +0300, karthikeyan balasubramanian wrote:
 Speaking about framework.  Anybody is aware there is a very popular
 framework in Java called Spring which has pretty cool features like
 Inversion of Control, Dependency Injection etc.
 
 Sounds similar to the service system implemented in InterJinn. I
 implemented a lookup system allowing retrieval of service objects by
 custom names. This allows the mapping to be overriden with userland
 re-definitions which may or may not extend the original class. In this
 way, a developer can replace components and services without the need to
 change the code that makes use of such objects. The only caveat is that
 the override must at least support the methods and properties for the
 service or component being overriden. 

I guess you'll be needing the strict method signature 'goodness'* to make
you code better and more robust heh ;-)

(and yes I have been following *that* thread on internals)

 I have used this in many projects
 to extend the core components in InterJinn to provide customers with
 tailored functionality for their own specific needs. A simple example
 was overriding the mail service to dupe outgoing emails and store in an
 archive. It was as simple as extending the JinnMail class, overriding
 the send() method, and overriding the service registration. And voila,
 all existing code across the project automatically inherited the
 functionality, and the distribution code didn't need to be touched.
 
 Cheers,
 Rob.










* 'goodness' as in 'pile of shit'

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



[PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A
Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Gabe

Paul Scott wrote:

Too bad there isn't a skeleton sort-of system that you essentially then 
just plug in the modules that you want/need to flesh it out.  Then 
you'd have your own customized framework for each app that is developed 
and keeps *all* of the modules relevant to that app.  Nothing extra 
would be included that isn't needed.


Then as a developer all you're looking for is modules and not huge 
frameworks that may include lots of functionality that you don't have 
any interest in.  It would certainly keep any attack surface smaller 
when it comes to vulnerabilities.


Is there anything out there like that?




You have just described KINKY/Chisimba...

--Paul





All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 


I see that there are a few different Universities in Africa supporting 
that framework.  How active is the developer community?  How long has 
KINKY/Chisimba been around?


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



RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
Ok so actually I didn't solve it. Php5, this works, but php 4.4.1 and
4.4.0 don't handle this correctly. Here's my code I'm running on each
box:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
echo Invalid, blowing up datebr /;

// exploded date
$eDate = explode( '/', $date );

// string date
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );
}
else 
{
echo validbr/;
}
echo In:  .$date .br /Out: . date( Y-m-d, $sDate ) .br
/br /;
}

expDate2str('1/2009');
expDate2str( date( n/Y));


Here are the results:

Php 5.1.2

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

PHP 4.4.1

Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

PHP 4.4.0
Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

Any work around with these types of dates on php4?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:46 AM
To: PHP Mailing Lists
Subject: [PHP] date(n/Y) strtotime

I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A
Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net

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

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



[PHP] Re: date(n/Y) strtotime

2006-08-02 Thread Adam Zey

Mark Steudel wrote:

I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A

Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net


I usually just munge the string and toss it into strtotime.

For credit card expiration dates, I'd just do this (Not going to the 
lengths of your solution, just the conversion part):


$timestamp = strtotime(str_replace(/, /01/, $date));

That will turn 9/2006 into 9/01/2006 which is a GNU compatible date that 
strtotime should be able to understand. It assumes that the input date 
is in a certain format, but it's simpler than your solution of 
exploding, then using date and mktime.


One caveat is that I'm uncertain if you need to have a trailing zero for 
the month. The GNU page is somewhat unclear as it has conflicting info. 
You may simply want to do these two lines instead:


if ( strlen($date) == 6 ) $date = 0 . $date;
$timestamp = strtotime(str_replace(/, /01/, $date));

Which will add the preceding zero to a date in the 9/2006 format if 
required. Those two lines would get you 09/01/2006


Here's an even simpler example, which uses a ternary operator to do it 
in one line:


$timestamp = strtotime(str_replace(/, /01/, strlen($date) == 6 ? 0 
. $date : $date));


That will also result in 09/01/2006. Note that where we're passing 
str_replace the source string to work on, we have a ternary (think of it 
as an inline if statement) that checks the length, and either returns 
$date, or 0 . $date.


Here's a slower (execution-wise) but easier to read version:

$timestamp = strtotime(str_replace(/, /01/, strlen($date) == 6 ? 
0$date : $date));


Where I just did the concatenation inside a string, which I find easier 
to read.


All these examples assume that your date is in a fixed format, namely 
mm/. However, the last three should properly handle 09/2006, because 
they won't add a second zero to that. So that should work either way.


Regards, Adam Zey.

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



RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
In the strtotime notes, it says that strtotime returns -1 previous to
php5, but if I do:

If( strtotime( '1/2009') == -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') === -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') == '-1' )
{
Echo 'false';
}
Else
{
Echo 'true';
}


All of those echo true, how do I determine if strtotime has failed or
not?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:55 AM
To: Mark Steudel; PHP Mailing Lists
Subject: RE: [PHP] date(n/Y) strtotime

Ok so actually I didn't solve it. Php5, this works, but php 4.4.1 and
4.4.0 don't handle this correctly. Here's my code I'm running on each
box:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
echo Invalid, blowing up datebr /;

// exploded date
$eDate = explode( '/', $date );

// string date
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );
}
else 
{
echo validbr/;
}
echo In:  .$date .br /Out: . date( Y-m-d, $sDate ) .br
/br /;
}

expDate2str('1/2009');
expDate2str( date( n/Y));


Here are the results:

Php 5.1.2

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

PHP 4.4.1

Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

PHP 4.4.0
Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

Any work around with these types of dates on php4?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:46 AM
To: PHP Mailing Lists
Subject: [PHP] date(n/Y) strtotime

I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A
Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net

-- 
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] Re: PHP Frameworks - Opinion

2006-08-02 Thread Paul Scott

 I see that there are a few different Universities in Africa supporting 
 that framework.  How active is the developer community?  How long has 
 KINKY/Chisimba been around?
 

The AVOIR Project has been going for about 2 years now. KINKY and
KEWL.NextGen were the first products of that project. Chisimba is the
PHP5 version of KINKY geared more towards a Services Oriented
Architecture and a generally excellent framework.

Our developers list is very active (over 100 mails a day) and we have
over 60 developes in 16 countries  that are active on a daily basis.
Those numbers are growing constantly as well.

We are always looking for others though, and the elearning aspect should
not scare off other uses. We have over 20 different applications built
on this framework besides elearning. 

All code is OOP and the overall framework is very robust.

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

RE: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Kilbride, James P.
I'm not going to comment on the rest of the stuff that was said, which
is why I snipped it. I'm not a purist when it comes to OO at all. But I
do have to say that while iterators in ruby are amazingly powerful that
leave me going wow.. that is so cool.. The thought of how they could be
abused and the thought of having to support that abuse in maintenance
mode gives me shivers of pure fear. And the fact that classes can very
easily be defined in half a dozen places means trying to figure out what
code does by finding a class and it's declarations can become a
nightmare. 

Of course no we get off into the ruby versus php war.. maybe I shouldn't
start this conversation at all... 

 don't get me started on iterators in ruby and how flexible it 
 is in changing stuff (like method parameters - or like 
 redefining a whole class at runtime). hmmm :-/ pity my ruby 
 skills suck. :-P
 
  
  Cheers,
  Rob.
 
 --
 PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP] is it possible to manipulate vars here..

2006-08-02 Thread Jochen Kaechelin
.. to build a url like http://devil.server.com/vitims_page.php??


// a,b,c,d are coming from a form
// and are defined in a dropdown of the form
// there are no form fields which can be filled by the user

// a maybe Germany, England 
// b maybe Support, Training 


// register_globals = on


function build_url(a,b,c,d) {

$urlpart[a] = parta;
// $urlpart[Germany] = Stuttgart;

$urlpart[b] = partb;
$urlpart[c] = partc;
$urlpart[d] = partd;

$url = ;

if($a!=) $url.= $url+$urlpart[a];
if($b!=) $url.= $url+$urlpart[b];
if($c!=) $url.= $url+$urlpart[c];
if($d!=) $url.= $url+$urlpart[d];

return $url;
}

$link = build_url($a,$b,$c,$d);

echo $link;


-- 
Jochen Kaechelin

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



Re: [PHP] date(n/Y) strtotime

2006-08-02 Thread Adam Zey

Mark Steudel wrote:

In the strtotime notes, it says that strtotime returns -1 previous to
php5, but if I do:

If( strtotime( '1/2009') == -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') === -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') == '-1' )
{
Echo 'false';
}
Else
{
Echo 'true';
}


All of those echo true, how do I determine if strtotime has failed or
not?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:55 AM

To: Mark Steudel; PHP Mailing Lists
Subject: RE: [PHP] date(n/Y) strtotime

Ok so actually I didn't solve it. Php5, this works, but php 4.4.1 and
4.4.0 don't handle this correctly. Here's my code I'm running on each
box:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
echo Invalid, blowing up datebr /;

// exploded date
$eDate = explode( '/', $date );

// string date
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );
}
	else 
	{

echo validbr/;
}
echo In:  .$date .br /Out: . date( Y-m-d, $sDate ) .br
/br /;
}

expDate2str('1/2009');
expDate2str( date( n/Y));


Here are the results:

Php 5.1.2

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

PHP 4.4.1

Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

PHP 4.4.0
Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

Any work around with these types of dates on php4?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:46 AM

To: PHP Mailing Lists
Subject: [PHP] date(n/Y) strtotime

I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A

Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net



Did you try my code? It's a lot simpler than yours, faster too. And I 
just tried executing it to confirm that it works.


The problem with your comparison is that strtotime thinks the date is 
invalid, but misinterprets it. But since once you decide the date is 
invalid you assume it's in a given format, it is enough to simply check 
that it's in the certain format to begin with. I don't know how complex 
you want to get with this, here's a relatively simple if statement to do 
the check:


if ( 6 = strlen($date) = 7  substr_count($date, /) == 1 )

Which checks that the length is from our credit card strings, and that 
it looks somewhat valid (You could go more in depth in checking, but 
this'll do for now).


Now, that new comparison would be needed for your code, but I'll rewrite 
your function to use my simpler method of conversion:


?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( ($datelen == 6 || $datelen == 7)  substr_count($date, /) == 1 )
{
echo Invalid, blowing up datebr/;
		$sDate = strtotime(str_replace(/, /01/, strlen($date) == 6 ? 
0$date : $date));

}
else
{
echo validbr/;
}
echo In: $datebr/Out: . date( Y-m-d, $sDate ) .br/br/;
}

expDate2str('1/2009');
expDate2str( date( n/Y));

?

Which when I run it (in PHP 4 though) prints out this:

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

For the heck of it, here's a more production-oriented version of the 
function/test script:


?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( ($datelen == 6 || $datelen == 7)  substr_count($date, /) == 1 )
		return date(Y-m-d, strtotime(str_replace(/, /01/, strlen($date) 
== 6 ? 0$date : $date)));

else
return date(Y-m-d, $date);
}

echo expDate2str('1/2009');
echo br/;
echo expDate2str( date( n/Y));

?

Regards, Adam Zey.

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



Re: [PHP] is it possible to manipulate vars here..

2006-08-02 Thread Dave Goodchild

On 02/08/06, Jochen Kaechelin [EMAIL PROTECTED] wrote:


.. to build a url like http://devil.server.com/vitims_page.php??


Not sure what you're trying to do, but switch register_globals OFF. Also,
if you are trying to concatenate strings inside the function, use ., not +.





--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk


[PHP] override core function

2006-08-02 Thread Khai
Is it possible to override the core built-in function exit() in PHP.  If 
so, how can I call the the built-in exit() from within my function?


Thanks
Khai

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



Re: [PHP] override core function

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 12:26 -0700, Khai wrote:
 Is it possible to override the core built-in function exit() in PHP.  If 
 so, how can I call the the built-in exit() from within my function?

No, but the following might help you:

http://www.php.net/register_shutdown_function

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Re: Documentation of PHP sourcecode

2006-08-02 Thread Colin Guthrie

Paul Zwiers wrote:

Dear all,

With a growing base of previous PHP work (not to be be mistaken for a 
framework :) ) I also find myself recoding and reinventing the wheel. 
Something I really do not want to do.


I am looking in some possibilities for automatically documenting my functions 
and classes. Preferably with some markup in the sourcecode and easy to 
implement. I am running Linux on my desktop so w* stuff won't do it for me :)


Can anyone point me in the right direction?

Thanks in advance!



Seeing as everyone else is saying PHPdoc, I'll say Doxygen...

I'd be interested to hear peoples opinions on one verses the other to be 
honest.


I used to use Doxygen but have been slightly rubbish of late with 
keeping that up to date. AFAIK the same comment style is supported in 
both Doxygen and PHPDoc, so it's just down to features of the resulted 
documentation and personal preference really Any thoughts/personal 
preferences people want to share?


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



RE: [PHP] date(n/Y) strtotime

2006-08-02 Thread Mark Steudel
Thanks Adam,

I had sent out my second email before I had read yours. I'll give yours
a go, thanks again.

Mark

-Original Message-
From: Adam Zey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 11:15 AM
To: Mark Steudel
Cc: PHP Mailing Lists
Subject: Re: [PHP] date(n/Y) strtotime

Mark Steudel wrote:
 In the strtotime notes, it says that strtotime returns -1 previous to
 php5, but if I do:
 
 If( strtotime( '1/2009') == -1 )
 {
 Echo 'false';
 }
 Else
 {
 Echo 'true';
 }
 
 If( strtotime( '1/2009') === -1 )
 {
 Echo 'false';
 }
 Else
 {
 Echo 'true';
 }
 
 If( strtotime( '1/2009') == '-1' )
 {
 Echo 'false';
 }
 Else
 {
 Echo 'true';
 }
 
 
 All of those echo true, how do I determine if strtotime has failed or
 not?
 
 Mark
 -Original Message-
 From: Mark Steudel 
 Sent: Wednesday, August 02, 2006 9:55 AM
 To: Mark Steudel; PHP Mailing Lists
 Subject: RE: [PHP] date(n/Y) strtotime
 
 Ok so actually I didn't solve it. Php5, this works, but php 4.4.1 and
 4.4.0 don't handle this correctly. Here's my code I'm running on each
 box:
 
 function expDate2str( $date )
 {
   if( !($sDate = strtotime( $date ) ) )
   {
   echo Invalid, blowing up datebr /;
   
   // exploded date
   $eDate = explode( '/', $date );
   
   // string date
   $sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
 $eDate[0], 1, $eDate[1] ) ) );
   }
   else 
   {
   echo validbr/;
   }
   echo In:  .$date .br /Out: . date( Y-m-d, $sDate ) .br
 /br /;
 }
 
 expDate2str('1/2009');
 expDate2str( date( n/Y));
 
 
 Here are the results:
 
 Php 5.1.2
 
 Invalid, blowing up date
 In: 1/2009
 Out: 2009-01-01
 
 Invalid, blowing up date
 In: 8/2006
 Out: 2006-08-01
 
 PHP 4.4.1
 
 Valid
 In: 1/2009
 Out: 2011-07-02
 
 Valid
 In: 8/2006
 Out: 2012-01-27
 
 PHP 4.4.0
 Valid
 In: 1/2009
 Out: 2011-07-02
 
 Valid
 In: 8/2006
 Out: 2012-01-27
 
 Any work around with these types of dates on php4?
 
 Mark
 -Original Message-
 From: Mark Steudel 
 Sent: Wednesday, August 02, 2006 9:46 AM
 To: PHP Mailing Lists
 Subject: [PHP] date(n/Y) strtotime
 
 I've always been really amazed at how well strtotime works, but
recently
 ran into an issue where it couldn't figure out the date if it was a cc
 exp date in long format, e.g. 1/2009. I was curious if anyone else has
 run into this and how did they get around it, here was my solution:
 
 function expDate2str( $date )
 {
   if( !($sDate = strtotime( $date ) ) )
   {
   // exploded date
   $eDate = explode( '/', $date );
   
   // string date we hard code the day to 1
   $sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
 $eDate[0], 1, $eDate[1] ) ) );
   
   
   }
   
   return $sDate;
 }
 
 Thanks, Mark
 
 --
 Mark Steudel
 Web Applications Developer
 555 Dayton St 
 Suite A
 Edmonds, WA 98020
 p: 425.741.7014
 e: [EMAIL PROTECTED]
 w: http://www.netriver.net
 

Did you try my code? It's a lot simpler than yours, faster too. And I 
just tried executing it to confirm that it works.

The problem with your comparison is that strtotime thinks the date is 
invalid, but misinterprets it. But since once you decide the date is 
invalid you assume it's in a given format, it is enough to simply check 
that it's in the certain format to begin with. I don't know how complex 
you want to get with this, here's a relatively simple if statement to do

the check:

if ( 6 = strlen($date) = 7  substr_count($date, /) == 1 )

Which checks that the length is from our credit card strings, and that 
it looks somewhat valid (You could go more in depth in checking, but 
this'll do for now).

Now, that new comparison would be needed for your code, but I'll rewrite

your function to use my simpler method of conversion:

?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( ($datelen == 6 || $datelen == 7)  substr_count($date,
/) == 1 )
{
echo Invalid, blowing up datebr/;
$sDate = strtotime(str_replace(/, /01/,
strlen($date) == 6 ? 
0$date : $date));
}
else
{
echo validbr/;
}
echo In: $datebr/Out: . date( Y-m-d, $sDate )
.br/br/;
}

expDate2str('1/2009');
expDate2str( date( n/Y));

?

Which when I run it (in PHP 4 though) prints out this:

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

For the heck of it, here's a more production-oriented version of the 
function/test script:

?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( ($datelen == 6 || $datelen == 7)  substr_count($date,
/) == 1 )
return date(Y-m-d, strtotime(str_replace(/, /01/,
strlen($date) 
== 6 ? 0$date : $date)));
else
  

Re: [PHP] date(n/Y) strtotime

2006-08-02 Thread Adam Zey
Actually, I made a mistake in my latest reply. I said The problem with 
your comparison is that strtotime thinks the date is invalid, but 
misinterprets it.


I actually mean, it thinks it is VALID, but misinterprets it.

Regards, Adam.

Mark Steudel wrote:

Thanks Adam,

I had sent out my second email before I had read yours. I'll give yours
a go, thanks again.

Mark

-Original Message-
From: Adam Zey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 11:15 AM

To: Mark Steudel
Cc: PHP Mailing Lists
Subject: Re: [PHP] date(n/Y) strtotime

Mark Steudel wrote:
  

In the strtotime notes, it says that strtotime returns -1 previous to
php5, but if I do:

If( strtotime( '1/2009') == -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') === -1 )
{
Echo 'false';
}
Else
{
Echo 'true';
}

If( strtotime( '1/2009') == '-1' )
{
Echo 'false';
}
Else
{
Echo 'true';
}


All of those echo true, how do I determine if strtotime has failed or
not?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:55 AM

To: Mark Steudel; PHP Mailing Lists
Subject: RE: [PHP] date(n/Y) strtotime

Ok so actually I didn't solve it. Php5, this works, but php 4.4.1 and
4.4.0 don't handle this correctly. Here's my code I'm running on each
box:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
echo Invalid, blowing up datebr /;

// exploded date
$eDate = explode( '/', $date );

// string date
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );
}
	else 
	{

echo validbr/;
}
echo In:  .$date .br /Out: . date( Y-m-d, $sDate ) .br
/br /;
}

expDate2str('1/2009');
expDate2str( date( n/Y));


Here are the results:

Php 5.1.2

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

PHP 4.4.1

Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

PHP 4.4.0
Valid
In: 1/2009
Out: 2011-07-02

Valid
In: 8/2006
Out: 2012-01-27

Any work around with these types of dates on php4?

Mark
-Original Message-
From: Mark Steudel 
Sent: Wednesday, August 02, 2006 9:46 AM

To: PHP Mailing Lists
Subject: [PHP] date(n/Y) strtotime

I've always been really amazed at how well strtotime works, but


recently
  

ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:

function expDate2str( $date )
{
if( !($sDate = strtotime( $date ) ) )
{
// exploded date
$eDate = explode( '/', $date );

// string date we hard code the day to 1
$sDate = strtotime( date( Y-m-d, mktime( 0, 0, 0,
$eDate[0], 1, $eDate[1] ) ) );


}

return $sDate;
}

Thanks, Mark

--
Mark Steudel
Web Applications Developer
555 Dayton St 
Suite A

Edmonds, WA 98020
p: 425.741.7014
e: [EMAIL PROTECTED]
w: http://www.netriver.net




Did you try my code? It's a lot simpler than yours, faster too. And I 
just tried executing it to confirm that it works.


The problem with your comparison is that strtotime thinks the date is 
invalid, but misinterprets it. But since once you decide the date is 
invalid you assume it's in a given format, it is enough to simply check 
that it's in the certain format to begin with. I don't know how complex 
you want to get with this, here's a relatively simple if statement to do


the check:

if ( 6 = strlen($date) = 7  substr_count($date, /) == 1 )

Which checks that the length is from our credit card strings, and that 
it looks somewhat valid (You could go more in depth in checking, but 
this'll do for now).


Now, that new comparison would be needed for your code, but I'll rewrite

your function to use my simpler method of conversion:

?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( ($datelen == 6 || $datelen == 7)  substr_count($date,
/) == 1 )
{
echo Invalid, blowing up datebr/;
$sDate = strtotime(str_replace(/, /01/,
strlen($date) == 6 ? 
0$date : $date));

}
else
{
echo validbr/;
}
echo In: $datebr/Out: . date( Y-m-d, $sDate )
.br/br/;
}

expDate2str('1/2009');
expDate2str( date( n/Y));

?

Which when I run it (in PHP 4 though) prints out this:

Invalid, blowing up date
In: 1/2009
Out: 2009-01-01

Invalid, blowing up date
In: 8/2006
Out: 2006-08-01

For the heck of it, here's a more production-oriented version of the 
function/test script:


?php

function expDate2str($date)
{
$datelen = strlen($date);
if ( 

[PHP] SQL injection

2006-08-02 Thread Peter Lauri
Hi all,

 

I saw some strange error messages from a site when I was surfing it, and it
was in form of SQL. I did some testing of the security of the SQL injection
protection of that site, and it showed it was not that protected against SQL
injections. To show this to them, I deleted my own record in their database
after finding out the table name of the entity in the database. I also
found out a lot of other that I think is important table names.

 

What I did to them was to report this to them, and inform them about the
damage I created, and what could have been done. (I did DELETE FROM
tablename WHERE id=1234, what if I did DELETE FROM tablename, destruction if
no backup). This is a large athletic site in Sweden, with more then
100,000 daily visitors.

 

What I am a little bit worried about is the legal part of this; can I be
accused of breaking some laws? I was just doing it to check if they were
protected, and I informed them about my process etc. I only deleted my
record, no one else's. In Sweden it might have been called computer
break-in, but I am not sure.

 

Anyone with experience of a similar thing?

 

Best regards,

Peter Lauri

 

 

 



Re: [PHP] SQL injection

2006-08-02 Thread Russell Jones

This is a good question and it, by and large, has not been considered.

In this particular instance, their programming is not protected by any kind
of encryption laws that would prevent decryption (such as developing and
deploying the decryption of Adobe Ebooks format).

Furthermore, because you reported the flaw directly to the webmaster and did
not publish it, there is no way that you caused any meaningful damage, nor
were you acting maliciously.

I have exposed XSS errors before on Google via my blog, even wrote a program
for April Fools that let you use XSS to post fake articles to real news
sites, and never got in trouble for it. You did not even announce the error
to the community, so you should be completely safe.

In real life terms, if you walked into the store and saw that the cash
register was slightly broken and slightly opened, and reached in and pulled
out a dollar to show the cashier what was wrong, you would not get in
trouble. It may be bold, but it is not a crime.

On 8/2/06, Peter Lauri [EMAIL PROTECTED] wrote:


Hi all,



I saw some strange error messages from a site when I was surfing it, and
it
was in form of SQL. I did some testing of the security of the SQL
injection
protection of that site, and it showed it was not that protected against
SQL
injections. To show this to them, I deleted my own record in their
database
after finding out the table name of the entity in the database. I also
found out a lot of other that I think is important table names.



What I did to them was to report this to them, and inform them about the
damage I created, and what could have been done. (I did DELETE FROM
tablename WHERE id=1234, what if I did DELETE FROM tablename, destruction
if
no backup). This is a large athletic site in Sweden, with more then
100,000 daily visitors.



What I am a little bit worried about is the legal part of this; can I be
accused of breaking some laws? I was just doing it to check if they were
protected, and I informed them about my process etc. I only deleted my
record, no one else's. In Sweden it might have been called computer
break-in, but I am not sure.



Anyone with experience of a similar thing?



Best regards,

Peter Lauri











Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Jochem Maas
Kilbride, James P. wrote:
 I'm not going to comment on the rest of the stuff that was said, which
 is why I snipped it. I'm not a purist when it comes to OO at all. But I
 do have to say that while iterators in ruby are amazingly powerful that
 leave me going wow.. that is so cool.. The thought of how they could be
 abused and the thought of having to support that abuse in maintenance
 mode gives me shivers of pure fear. And the fact that classes can very
 easily be defined in half a dozen places means trying to figure out what
 code does by finding a class and it's declarations can become a
 nightmare. 

you make very good points. it's tribute to php that code written in it is
so transparent comparitively speaking. it might a little less nimble and a bit
more verbose but when your debugging someone else's spaghetti that's a bonus :-)

but taking away flexibility doesn't take away the ability to write monsterous,
spaghetti OO - I'm quite sure I could write stuff like that whilst conforming to
any/all purist rules you want to throw at me ;-)

 
 Of course no we get off into the ruby versus php war.. maybe I shouldn't
 start this conversation at all... 

no war here, move along, these are not the droids your looking for.

 
 don't get me started on iterators in ruby and how flexible it 
 is in changing stuff (like method parameters - or like 
 redefining a whole class at runtime). hmmm :-/ pity my ruby 
 skills suck. :-P

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


 

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



[PHP] What good are constants if you can't use them in an array?

2006-08-02 Thread Daevid Vincent
*sigh*

Why is PHP so lame...

?php 
class PHPISLAME
{
const STOP = 0;
const START = 1;
const PAUSE = 2;

public static $STATES = array(
STOP = 'Stopped',
START = 'Started',
PAUSE = 'Paused'
 );

public static $STATESHACK = array(
0 = 'Stopped',
1 = 'Started',
2 = 'Paused'
 );
}

print_r(PHPISLAME::$STATES);

print_r(PHPISLAME::$STATESHACK);
?

What is this crap!!?:
Array ( [STOP] = Stopped [START] = Started [PAUSE] = Paused ) 

Array ( [0] = Stopped [1] = Started [2] = Paused )

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



Re: [PHP] SQL injection

2006-08-02 Thread Jochem Maas
Russell Jones wrote:
 This is a good question and it, by and large, has not been considered.
 
 In this particular instance, their programming is not protected by any kind
 of encryption laws that would prevent decryption (such as developing and
 deploying the decryption of Adobe Ebooks format).
 
 Furthermore, because you reported the flaw directly to the webmaster and
 did
 not publish it, there is no way that you caused any meaningful damage, nor
 were you acting maliciously.
 
 I have exposed XSS errors before on Google via my blog, even wrote a
 program
 for April Fools that let you use XSS to post fake articles to real news
 sites, and never got in trouble for it. You did not even announce the error
 to the community, so you should be completely safe.
 
 In real life terms, if you walked into the store and saw that the cash
 register was slightly broken and slightly opened, and reached in and pulled
 out a dollar to show the cashier what was wrong, you would not get in
 trouble. It may be bold, but it is not a crime.

technically removing the dollar is a crime regardless of your intention.

with regard to find vulnerabilities you are, in the US atleast, technically
at the mercy of the site owner as to whether legal action could be taken against
you. read the following for at least 2 examples:

http://www.securityfocus.com/news/11389/

one would hope sweden has less idiotic laws, and smarter IT managers.

you did the site a service, and hopefully they are smart enough to see it that 
way.

I would though in future, if you enjoy this kind of research, ask permission to
examine a site's security from the owners to be safe.

my personal opinion is that vulnerability research is a great game for nice 
people
who are looking to get shafted in a big way. which is a sad state of affairs 
alround,
but there you have it.

 
 On 8/2/06, Peter Lauri [EMAIL PROTECTED] wrote:

 Hi all,



 I saw some strange error messages from a site when I was surfing it, and
 it
 was in form of SQL. I did some testing of the security of the SQL
 injection
 protection of that site, and it showed it was not that protected against
 SQL
 injections. To show this to them, I deleted my own record in their
 database
 after finding out the table name of the entity in the database. I also
 found out a lot of other that I think is important table names.



 What I did to them was to report this to them, and inform them about the
 damage I created, and what could have been done. (I did DELETE FROM
 tablename WHERE id=1234, what if I did DELETE FROM tablename, destruction
 if
 no backup). This is a large athletic site in Sweden, with more then
 100,000 daily visitors.



 What I am a little bit worried about is the legal part of this; can I be
 accused of breaking some laws? I was just doing it to check if they were
 protected, and I informed them about my process etc. I only deleted my
 record, no one else's. In Sweden it might have been called computer
 break-in, but I am not sure.



 Anyone with experience of a similar thing?



 Best regards,

 Peter Lauri









 

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



Re: [PHP] What good are constants if you can't use them in an array?

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 15:24 -0700, Daevid Vincent wrote:
 *sigh*
 
 Why is PHP so lame...


Why are you trolling on the PHP list?

 
 ?php 
 class PHPISLAME
 {
 const STOP = 0;
 const START = 1;
 const PAUSE = 2;
   
 public static $STATES = array(
   STOP = 'Stopped',
   START = 'Started',
   PAUSE = 'Paused'
);
 
 public static $STATESHACK = array(
   0 = 'Stopped',
   1 = 'Started',
   2 = 'Paused'
);
 }
 
 print_r(PHPISLAME::$STATES);
 
 print_r(PHPISLAME::$STATESHACK);
 ?
 
 What is this crap!!?:
 Array ( [STOP] = Stopped [START] = Started [PAUSE] = Paused ) 
 
 Array ( [0] = Stopped [1] = Started [2] = Paused )

PHP assumes type string for for undefined constants. If you weren't so
lame and had error reporting at a high enough level you would have been
well notified. My guess is that you are referencing a constant before
the class has been declared. You are expecting that the class
information exists at the same time of declaration. While I'm sure there
are ways to make it happen, it's up to you to ask the PHP internals to
solve your chicken egg problem... and I doubt it will happen with your
lame attitude.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] What good are constants if you can't use them in an array?

2006-08-02 Thread Jochem Maas
Daevid Vincent wrote:
 *sigh*
 
 Why is PHP so lame...

you know the story about the bad workman and his tools?
please go and read the manual entry regarding how to reference
class constants.

 
 ?php 
 class PHPISLAME
 {
 const STOP = 0;
 const START = 1;
 const PAUSE = 2;
   
 public static $STATES = array(
   STOP = 'Stopped',
   START = 'Started',
   PAUSE = 'Paused'
);
 
 public static $STATESHACK = array(
   0 = 'Stopped',
   1 = 'Started',
   2 = 'Paused'
);
 }
 
 print_r(PHPISLAME::$STATES);
 
 print_r(PHPISLAME::$STATESHACK);
 ?
 
 What is this crap!!?:

what that crap is would be self evident if you bothered to
turn on E_NOTICEs in your error_reporting. (hint: what does
php do with undefined constants?)

 Array ( [STOP] = Stopped [START] = Started [PAUSE] = Paused ) 
 
 Array ( [0] = Stopped [1] = Started [2] = Paused )
 

oh would you look at this 

$ php -v
PHP 5.1.4-pl0-gentoo (cli) (built: Jul  5 2006 18:26:03)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
? php -r 'class Test {const MYTEST = 3;public static $S = array( Test::MYTEST 
= TEST );}var_dump(Test::$S);'

array(1) {
  [3]=
  string(4) TEST
}


... now take a deep breath and relax :-)

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



Re: [PHP] What good are constants if you can't use them in an array?

2006-08-02 Thread Robert Cummings
On Wed, 2006-08-02 at 18:56 -0400, Robert Cummings wrote:
 On Wed, 2006-08-02 at 15:24 -0700, Daevid Vincent wrote:
  *sigh*
  
  Why is PHP so lame...
 
 
 Why are you trolling on the PHP list?
 
  
  ?php 
  class PHPISLAME
  {
  const STOP = 0;
  const START = 1;
  const PAUSE = 2;
  
  public static $STATES = array(
  STOP = 'Stopped',
  START = 'Started',
  PAUSE = 'Paused'
   );
  
  public static $STATESHACK = array(
  0 = 'Stopped',
  1 = 'Started',
  2 = 'Paused'
   );
  }
  
  print_r(PHPISLAME::$STATES);
  
  print_r(PHPISLAME::$STATESHACK);
  ?
  
  What is this crap!!?:
  Array ( [STOP] = Stopped [START] = Started [PAUSE] = Paused ) 
  
  Array ( [0] = Stopped [1] = Started [2] = Paused )
 
 PHP assumes type string for for undefined constants. If you weren't so
 lame and had error reporting at a high enough level you would have been
 well notified. My guess is that you are referencing a constant before
 the class has been declared. You are expecting that the class
 information exists at the same time of declaration. While I'm sure there
 are ways to make it happen, it's up to you to ask the PHP internals to
 solve your chicken egg problem... and I doubt it will happen with your
 lame attitude.

Furthermore, you aren't even using them properly. The documentation
clearly shows the following usage:

ClassName::constant
self::constant
parent::constant

Sheeesh!

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] What good are constants if you can't use them in anarray? [solved] I'm a jerk.

2006-08-02 Thread Daevid Vincent
   Why is PHP so lame...
  Why are you trolling on the PHP list?

Not trolling. Just frustrated. Apologies.

 Furthermore, you aren't even using them properly. The documentation
 clearly shows the following usage:
 
 ClassName::constant

This is how you have to use it.

 self::constant
 parent::constant

These don't work.

Okay. I deserve the new a$$hole I was ripped by the list.

Sorry.

I'll crawl back into my hole now... ;-)

d

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



Re: [PHP] Dynamic Images

2006-08-02 Thread Richard Lynch
On Wed, August 2, 2006 7:38 am, Manoj Singh wrote:

 I am creating a a script in which a dynamic graph is generated through
 gd
 library. The format of the picture is jpeg. Now the problem is that
 the
 browser is caching the images and after updating also it is displaying
 the
 older image.

 Currently for clearing the cache i am using this code
 ?php
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
 header(Cache-Control: no-store, no-cache, must-revalidate);
 header(Cache-Control: no-cache);
 header(Pragma: no-cache);
 ?

 But this code is not working me. Please help me.

Unfortunately, all the headers in the world won't fix ALL the
browsers, because there is always somebody (browser or intermediary
caching server like AOHell) that thinks they know better than you when
to cache an image.

You'll spend hours fixing this with different headers, and it will
work in all your browser tests, and then somebody using Fred's
Warehouse Browser will send in a bug report that your site is
broken

Also note that only the SECOND Cache-Control: header is being sent by
PHP unless you use the optional second arg to ask PHP to send both:
http://php.net/header

The best solution to this is to change your IMG tag to have a random
number in it, so that the cached image is never the same URL, so it
never gets used.

Stupid, I know, and wasteful of the browser cache disk space, but
there it is.  It works.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Dynamically assigning var namesi

2006-08-02 Thread Richard Lynch
On Tue, August 1, 2006 12:49 pm, bob pilly wrote:
 Does anyone know if you can assign a new variable name based on the
 contents of another variable in PHP? If so whats the syntax to do
 this?

You can and it's called Variable Variables in the documentation...

99% of the time, it's better to use an array.

  I am parsing a text file that has tens of preset attributes and some
 of these have hundreds of sub attributes. For example the text file
 contains flight details, on every flight there can be up to 500
 passengers but there are generally only 50 so i dont want to have
 declare 500 vars when i hardly ever use them. What i am trying to do
 is count the amount of pasengers present and dynamically create the
 variables based on this.$surname1,$surname2 etc...

  Im not sure whether this is a sane way to approach this problem or
 not. Any advice or pointing to relevant documentation about either
 syntax for this or ways of tackling this sort of problem (im sure it
 must be a regular occurance in the coding world??) would be greatly
 appreciated!!

In this case, it's DEFINITELY better to use an array, as it is almost
guaranteed that sooner or later you will have a flight with two people
named John Smith on it.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Dynamic Images

2006-08-02 Thread Jochem Maas
Richard Lynch wrote:
 On Wed, August 2, 2006 7:38 am, Manoj Singh wrote:
 
 I am creating a a script in which a dynamic graph is generated through
 gd
 library. The format of the picture is jpeg. Now the problem is that
 the
 browser is caching the images and after updating also it is displaying
 the
 older image.

 Currently for clearing the cache i am using this code
 ?php
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
 header(Cache-Control: no-store, no-cache, must-revalidate);
 header(Cache-Control: no-cache);
 header(Pragma: no-cache);
 ?

 But this code is not working me. Please help me.
 
 Unfortunately, all the headers in the world won't fix ALL the
 browsers, because there is always somebody (browser or intermediary
 caching server like AOHell) that thinks they know better than you when
 to cache an image.
 
 You'll spend hours fixing this with different headers, and it will
 work in all your browser tests, and then somebody using Fred's
 Warehouse Browser will send in a bug report that your site is
 broken
 
 Also note that only the SECOND Cache-Control: header is being sent by
 PHP unless you use the optional second arg to ask PHP to send both:
 http://php.net/header
 
 The best solution to this is to change your IMG tag to have a random
 number in it, so that the cached image is never the same URL, so it
 never gets used.
 
 Stupid, I know, and wasteful of the browser cache disk space, but
 there it is.  It works.

nevermind their diskspace, what about my bandwidth? - do I really need to
cough up extra readies because some muppet refused to exchange his AOL
connection for something resembling a proper ISP?

granted yours is pragmatic solution to the problem but should we support
shit ISPs, proxies and sunday-driver browser-wannabees with our/our-clients
cash?

feel free to ignore, it's late and I felt like playing devil's advocate. :-)
 

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



Re: [PHP] What good are constants if you can't use them in anarray? [solved] I'm a jerk.

2006-08-02 Thread Jochem Maas
Daevid Vincent wrote:
 Why is PHP so lame...
 Why are you trolling on the PHP list?
 
 Not trolling. Just frustrated. Apologies.
 
 Furthermore, you aren't even using them properly. The documentation
 clearly shows the following usage:

 ClassName::constant
 
 This is how you have to use it.
 
 self::constant
 parent::constant
 
 These don't work.

they should work, but only when used in running code - if you use class
constant in static property definitions (ala your array) you need
to explicitly name the class.

 
 Okay. I deserve the new a$$hole I was ripped by the list.
 
 Sorry.
 
 I'll crawl back into my hole now... ;-)

make sure it's not that new hole ... the paint is still drying :-P

 
 d
 

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



Re: [PHP] override core function

2006-08-02 Thread Ligaya Turmelle

Khai wrote:
Is it possible to override the core built-in function exit() in PHP.  If 
so, how can I call the the built-in exit() from within my function?


Thanks
Khai

I think you can override any core function by messing with the internals 
(though I could be wrong).  But then you have to maintain that patch for 
your code to work in the various versions that you run/move to.


Is this a good idea - in my humble opinion - NO!  Personally I would try 
to either find a different way to do whatever it is you are doing or 
find a workaround.  Just because you can do it - doesn't mean you should.


--

life is a game... so have fun.

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

Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Ligaya Turmelle

Chris Boget wrote:
I am looking in some possibilities for automatically documenting my 
functions

and classes. Preferably with some markup in the sourcecode and easy to
implement. I am running Linux on my desktop so w* stuff won't do it 
for me :)

Can anyone point me in the right direction?



Check out PHPDocumentor.

http://www.phpdoc.org/

This is just one package of the many that are out there.  A quick search on
google will show others.

thnx,
Chris
And if you use vim - there is a plugin to automatically generate some 
basic documentation.


http://www.vim.org/scripts/script.php?script_id=1355

--

life is a game... so have fun.

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

Re: [PHP] SQL injection

2006-08-02 Thread Ligaya Turmelle

Peter Lauri wrote:

Hi all,

 


I saw some strange error messages from a site when I was surfing it, and it
was in form of SQL. I did some testing of the security of the SQL injection
protection of that site, and it showed it was not that protected against SQL
injections. To show this to them, I deleted my own record in their database
after finding out the table name of the entity in the database. I also
found out a lot of other that I think is important table names.

 


What I did to them was to report this to them, and inform them about the
damage I created, and what could have been done. (I did DELETE FROM
tablename WHERE id=1234, what if I did DELETE FROM tablename, destruction if
no backup). This is a large athletic site in Sweden, with more then
100,000 daily visitors.

 


What I am a little bit worried about is the legal part of this; can I be
accused of breaking some laws? I was just doing it to check if they were
protected, and I informed them about my process etc. I only deleted my
record, no one else's. In Sweden it might have been called computer
break-in, but I am not sure.

 


Anyone with experience of a similar thing?

 


Best regards,

Peter Lauri


read http://shiflett.org/archive/236


--

life is a game... so have fun.

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

[PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Manuel Lemos
Hello,

on 08/01/2006 01:35 PM Gabe said the following:
 What's the common consensus as to a solid PHP framework to use for
 application development?  There seems to be a number of them out there,
 but I'm not sure which one's are the most robust, actively developed,
 secure, etc etc.
 
 Thoughts?

There is no common consense. PHP development is not very well organized,
like for instance in the Java world where several vendors can provide
their own implementations of the same specification. This makes possible
 to use the same framework API from whatever vendor you prefer.

In the PHP world all frameworks are incompatible, even when they attempt
to implement similar feature sets.

Anyway, you may want to read this more in depth reflection of the state
of the PHP framework world and recommendations on how to pick what suits
best for you:

http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Robert Cummings
On Thu, 2006-08-03 at 00:29 -0300, Manuel Lemos wrote:
 Hello,
 
 on 08/01/2006 01:35 PM Gabe said the following:
  What's the common consensus as to a solid PHP framework to use for
  application development?  There seems to be a number of them out there,
  but I'm not sure which one's are the most robust, actively developed,
  secure, etc etc.
  
  Thoughts?
 
 There is no common consense. PHP development is not very well organized,
 like for instance in the Java world where several vendors can provide
 their own implementations of the same specification. This makes possible
  to use the same framework API from whatever vendor you prefer.
 
 In the PHP world all frameworks are incompatible, even when they attempt
 to implement similar feature sets.
 
 Anyway, you may want to read this more in depth reflection of the state
 of the PHP framework world and recommendations on how to pick what suits
 best for you:
 
 http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html

I've read it before... it was crud. You provide no recommendation for
any framework but instead try to pimp phpclasses. From what I gathered
you haven't even actually tried anywhere in the vicinity of 10% of the
frameworks in existence and yet you feel obliged to write a commenatary
called Recommended PHP Frameworks in which you don't even recommend a
framework. Additionally somehow while pimping phpclasses you also feel
it necessary to indicate how you don't use any code other than what you
write yourself. Egads, if you won't use the code on your site why the
hell should anyone else?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Manuel Lemos
Hello,

on 08/03/2006 01:24 AM Robert Cummings said the following:
 What's the common consensus as to a solid PHP framework to use for
 application development?  There seems to be a number of them out there,
 but I'm not sure which one's are the most robust, actively developed,
 secure, etc etc.

 Thoughts?
 There is no common consense. PHP development is not very well organized,
 like for instance in the Java world where several vendors can provide
 their own implementations of the same specification. This makes possible
  to use the same framework API from whatever vendor you prefer.

 In the PHP world all frameworks are incompatible, even when they attempt
 to implement similar feature sets.

 Anyway, you may want to read this more in depth reflection of the state
 of the PHP framework world and recommendations on how to pick what suits
 best for you:

 http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html
 
 I've read it before... it was crud. You provide no recommendation for
 any framework but instead try to pimp phpclasses. From what I gathered
 you haven't even actually tried anywhere in the vicinity of 10% of the
 frameworks in existence and yet you feel obliged to write a commenatary
 called Recommended PHP Frameworks in which you don't even recommend a
 framework. Additionally somehow while pimping phpclasses you also feel
 it necessary to indicate how you don't use any code other than what you
 write yourself. Egads, if you won't use the code on your site why the
 hell should anyone else?

The answer to that question is in the post. I only use my own (PHP)
packages because I can. Not everybody can afford writing package for
their own needs from scratch.

Why would I lie when that post expresses exactly how I feel?

The point of the post is that there is no framework in particular to
recommend. I use my own packages for my needs. They suit me well. It
does not mean they will suit everybody.

The PHPClasses site content is made of packages contributed by
developers that wrote their own packages. Those other packages often
serve the same purposes as some of my packages.

I am pro-choice. That is the spirit of the PHPClasses site. Everybody
can publish their packages. Let the users be the judges of which are the
best for whatever purposes. That is pure fair play. Is that a bad thing?
I don't think so.

I also would like to emphasize what I said above regarding the total
lack of organization and cooperation of the PHP community.

If there were standard specifications for packages and frameworks like
there is in the Java world, maybe you would not have this discussion.
There could be a consense to use the same standard API with eventual
multiple implementations from different developers or vendors.

Imagine if there would be only one PDBC (JDBC for PHP). Instead of that
we have a never ending choice of PHP database abstraction layers that
does not help newcoming developers that are lost and don't know what to use.

This is admitidly a criticism to the lack of organization of the whole
PHP community including myself. We are all guilty for this mess and I am
afraid there is not much hope to fix it.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Robert Cummings
On Thu, 2006-08-03 at 01:47 -0300, Manuel Lemos wrote:
 Hello,
 
 on 08/03/2006 01:24 AM Robert Cummings said the following:
  What's the common consensus as to a solid PHP framework to use for
  application development?  There seems to be a number of them out there,
  but I'm not sure which one's are the most robust, actively developed,
  secure, etc etc.
 
  Thoughts?
  There is no common consense. PHP development is not very well organized,
  like for instance in the Java world where several vendors can provide
  their own implementations of the same specification. This makes possible
   to use the same framework API from whatever vendor you prefer.
 
  In the PHP world all frameworks are incompatible, even when they attempt
  to implement similar feature sets.
 
  Anyway, you may want to read this more in depth reflection of the state
  of the PHP framework world and recommendations on how to pick what suits
  best for you:
 
  http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html
  
  I've read it before... it was crud. You provide no recommendation for
  any framework but instead try to pimp phpclasses. From what I gathered
  you haven't even actually tried anywhere in the vicinity of 10% of the
  frameworks in existence and yet you feel obliged to write a commenatary
  called Recommended PHP Frameworks in which you don't even recommend a
  framework. Additionally somehow while pimping phpclasses you also feel
  it necessary to indicate how you don't use any code other than what you
  write yourself. Egads, if you won't use the code on your site why the
  hell should anyone else?
 
 The answer to that question is in the post. I only use my own (PHP)
 packages because I can. Not everybody can afford writing package for
 their own needs from scratch.
 
 Why would I lie when that post expresses exactly how I feel?
 
 The point of the post is that there is no framework in particular to
 recommend. I use my own packages for my needs. They suit me well. It
 does not mean they will suit everybody.

How would you know that there is no framework to recommend if you neve
ruse anyone's code but your own. How could you have possibly given any
framework sufficient attention to have any idea of its pros and cons?

 The PHPClasses site content is made of packages contributed by
 developers that wrote their own packages. Those other packages often
 serve the same purposes as some of my packages.
 
 I am pro-choice. That is the spirit of the PHPClasses site. Everybody
 can publish their packages. Let the users be the judges of which are the
 best for whatever purposes. That is pure fair play. Is that a bad thing?
 I don't think so.
 
 I also would like to emphasize what I said above regarding the total
 lack of organization and cooperation of the PHP community.

You can't have your cake and eat it too. You're either pro-choice with a
myriad of choices to choose from, or you're anti-choice and want only
one framework style. Get of the fence!

 
 If there were standard specifications for packages and frameworks like
 there is in the Java world, maybe you would not have this discussion.
 There could be a consense to use the same standard API with eventual
 multiple implementations from different developers or vendors.
 
 Imagine if there would be only one PDBC (JDBC for PHP). Instead of that
 we have a never ending choice of PHP database abstraction layers that
 does not help newcoming developers that are lost and don't know what to use.

You presume that any chosen standard methodology or whatever you want to
call it would be correct. Because if it wasn't correct, no matter how
organized you think a community might be, something different WILL
emerge. Right now there may be 100 frameworks, probably still growing,
but not all will be accepted into mainstream use, and that ultimately
will determine which one's have staying power or at the very least --
which ones have reach. The fact that there are so many is a testament to
how easy it is to manipulate the power placed in the hands of the PHP
developer. It is not indicative of disorganization within the community.

 This is admitidly a criticism to the lack of organization of the whole
 PHP community including myself. We are all guilty for this mess and I am
 afraid there is not much hope to fix it.

You mean we should all be happy that so much choice is available!

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP 

RE: [PHP] SQL injection

2006-08-02 Thread Peter Lauri
Thank you all for your replies; it has been interesting to read. I am just
waiting for the webmaster to reply to me with his thoughts.

My intentions for this were to help, not to break, so I do indeed hope that
they will not take legal action for it. A friend of mine hoped that they
would use the law against me, it would just increase the publicity for me,
and that might increase the value of my services. And he was also sure that
they would never win the case.

I was for a while thinking about using my private yahoo email to not
disclose my name, however, that felt like hiding for something you did not
do.

One at the forum sent me an message off the list and said: You got bigger
balls than me. :-), what did he mean with that? I did not know that the php
list also shows the web cam at the same time. I better watch out...

Best regards,
Peter Lauri




-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 11:17 PM
To: php-general@lists.php.net
Subject: [PHP] SQL injection

Hi all,

 

I saw some strange error messages from a site when I was surfing it, and it
was in form of SQL. I did some testing of the security of the SQL injection
protection of that site, and it showed it was not that protected against SQL
injections. To show this to them, I deleted my own record in their database
after finding out the table name of the entity in the database. I also
found out a lot of other that I think is important table names.

 

What I did to them was to report this to them, and inform them about the
damage I created, and what could have been done. (I did DELETE FROM
tablename WHERE id=1234, what if I did DELETE FROM tablename, destruction if
no backup). This is a large athletic site in Sweden, with more then
100,000 daily visitors.

 

What I am a little bit worried about is the legal part of this; can I be
accused of breaking some laws? I was just doing it to check if they were
protected, and I informed them about my process etc. I only deleted my
record, no one else's. In Sweden it might have been called computer
break-in, but I am not sure.

 

Anyone with experience of a similar thing?

 

Best regards,

Peter Lauri

 

 

 

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



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-02 Thread Paul Scott


 You mean we should all be happy that so much choice is available!
 

I agree with Rob! I am a botanist. I have never been trained in Computer
Science, as far as industry is concerned, I am not qualified to turn
on a PC. Fortunately for me, I am also a geek. My PHP experiences
started when running experiments in my wet labs, monitoring seaweed
growth. If PHP did not allow me to get away with writing newbie (read
bad) code, I would have given up and just done it the old way that
botanists have been doing it for centuries. 

PHP gave me that freedom to start, and as a result, I now am a
reasonably decent PHP developer, and run a collaborative network in 16
(and growing) African countries working on a PHP framework that I
designed and wrote. Go figure.

Choice is that important. If I had started with JDBC or a Java based way
of doing things, this stuff would have never happened. Frameworks are
not only pieces of software, but create communities of like minded
people. They also build skills (and business opportunities) as ours
does. If there were no choice, we would all be VB style drones with no
creativity and no forward movement.

Please direct flames to file 13.

--Paul 

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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