php-general Digest 7 Oct 2008 07:54:01 -0000 Issue 5722

2008-10-07 Thread php-general-digest-help
php-general Digest 7 Oct 2008 07:54:01 - Issue 5722 Topics (messages 281504 through 281520): Re: php framework vs just php? 281504 by: uaca man 281508 by: farid lópez Re: The 'at' sign (@) variable prefix 281505 by: uaca man 281506 by: Daniel Brown

php-general Digest 7 Oct 2008 21:57:53 -0000 Issue 5723

2008-10-07 Thread php-general-digest-help
php-general Digest 7 Oct 2008 21:57:53 - Issue 5723 Topics (messages 281521 through 281543): How to use MySQL queries...? 281521 by: Hemant Patel 281522 by: Richard Heyes 281523 by: Jignesh Thummar Question about date() 281524 by: Jason Pruim 281525

Re: [PHP] Prefered Method for User authetification on VHosts

2008-10-07 Thread Per Jessen
Michelle Konzack wrote: Currently I have [snip] OK, so a plain file-password authentification. That's fine. I like to know, whether this is good enough or is there a better solution? Good enough depends entirely on your security requirements, i.e. how safe do you need the

Re: [PHP] The 'at' sign (@) variable prefix

2008-10-07 Thread Aschwin Wesselius
Jochem Maas wrote: mike schreef: Mon, Oct 6, 2008 at 12:17 PM, Daniel Brown [EMAIL PROTECTED] wrote: I will get an error, but if I prefix the value with '@', [EMAIL PROTECTED]q]; The @ is an error control operator, used to buffer the output and store it in a variable -

Re: [PHP] How to use MySQL queries...?

2008-10-07 Thread Richard Heyes
Is there any big difference to use PROPEL or any other ORM mapping against basic functions provided by MySQL Extension...? If it's MySQL you're looking to optimise, then you could also try asking on the MySQL discussion list. On the PHP side, the MySQL functions are long-winded at best, try

Re: [PHP] Question about date()

2008-10-07 Thread Richard Heyes
I am trying real hard to write clean code... Print it out and stick it in the washing machine... :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.phpguru.org/RGraph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Question about date()

2008-10-07 Thread Stut
On 7 Oct 2008, at 12:48, Jason Pruim wrote: On Oct 7, 2008, at 7:41 AM, Stut wrote: On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date()

Re: [PHP] Question about date()

2008-10-07 Thread Stut
On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given in /Volumes/RAIDer/webserver/

Re: [PHP] Re: php framework vs just php?

2008-10-07 Thread uaca man
Farid, I like to use PRADO(www.pradosoft.com), it is very easy to use for those who are coming from Microsoft .Net platform as it uses the same architecture. I did not like symfony, too much to read before the first example. Angelo 2008/10/6 farid lópez [EMAIL PROTECTED]: what is your

Re: [PHP] How to use MySQL queries...?

2008-10-07 Thread Jignesh Thummar
And is there any effective way to calculate the statistics of comparison of query execution timings.. For query execution statistics, you need to log slow queries. To do so, enable following two directives in my.cnf file long_query_time = 2 log-slow-queries = /var/log/mysql/mysql_slow_query.log

[PHP] Re: The 'at' sign (@) variable prefix

2008-10-07 Thread Crash Dummy
mike schreef: Mon, Oct 6, 2008 at 12:17 PM, Daniel Brown [EMAIL PROTECTED] wrote: I will get an error, but if I prefix the value with '@', [EMAIL PROTECTED]q]; The @ is an error control operator, used to buffer the output and store it in a variable - $php_errormsg. It's better to

Re: [PHP] Required files not being parsed properly...

2008-10-07 Thread Jim Lucas
Eric Butera wrote: On Mon, Oct 6, 2008 at 7:28 PM, Stephen Johnson [EMAIL PROTECTED] wrote: OK .. I am upgrading to PHP5 on a clients box, and after doing so I have run into the problem that files that get brought in by a require statement, or include, end up just getting dumped to the

Re: [PHP] Question about date()

2008-10-07 Thread tedd
At 1:08 PM +0100 10/7/08, Stut wrote: On 7 Oct 2008, at 12:48, Jason Pruim wrote: Thanks for the quick response... You were right... I did a var_dump both on $row['timein'] and $row['timeout'] and the error was because of the way that I update the records. for time in, I insert a new record,

Re: [PHP] Required files not being parsed properly...

2008-10-07 Thread Eric Butera
On Tue, Oct 7, 2008 at 10:32 AM, Jim Lucas [EMAIL PROTECTED] wrote: Eric Butera wrote: On Mon, Oct 6, 2008 at 7:28 PM, Stephen Johnson [EMAIL PROTECTED] wrote: OK .. I am upgrading to PHP5 on a clients box, and after doing so I have run into the problem that files that get brought in by a

Re: [PHP] Question about date()

2008-10-07 Thread Jason Pruim
On Oct 7, 2008, at 7:41 AM, Stut wrote: On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given

[PHP] Question about date()

2008-10-07 Thread Jason Pruim
Good morning all! I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given in /Volumes/RAIDer/webserver/ Documents/dev/stimecard/timecard.php

Re: [PHP] Question about date()

2008-10-07 Thread Jason Pruim
On Oct 7, 2008, at 7:49 AM, Richard Heyes wrote: I am trying real hard to write clean code... Print it out and stick it in the washing machine... :-) The way I used to write code I'd have to soak it in bleach for a week before having a chance of it coming out clean! :P -- Jason Pruim

[PHP] How to use MySQL queries...?

2008-10-07 Thread Hemant Patel
Hello All, I am here with one more doubt Now I want to minimize my response time for a query..Can anybody tell me ..., Is there any big difference to use PROPEL or any other ORM mapping against basic functions provided by MySQL Extension...? And is there any effective

Re: [PHP] $_SERVER[REMOTE_ADDR] returning ::1

2008-10-07 Thread Stut
Please keep the discussion on the list. On 7 Oct 2008, at 06:11, David Rocks wrote: Your work around worked fine for me but I just had some time to revisit this and wanted to see how hard it would be to rewrite this test. But I ran into a question. The test that was failing compared the

Re: [PHP] Required files not being parsed properly...

2008-10-07 Thread Stephen Johnson
Hey hey hey ... LOL This is all VERY old code...I admit that... The site needed to be closed since it was completely broken. I figured out the reason .. The new php.ini file had the use short tags turned off... So I turned that on and it works now. On 10/7/08 7:32 AM, Jim Lucas [EMAIL

Re: [PHP] Question about date()

2008-10-07 Thread Ashley Sheridan
On Tue, 2008-10-07 at 07:54 -0400, Jason Pruim wrote: On Oct 7, 2008, at 7:49 AM, Richard Heyes wrote: I am trying real hard to write clean code... Print it out and stick it in the washing machine... :-) The way I used to write code I'd have to soak it in bleach for a week before

Re: [PHP] Re: php framework vs just php?

2008-10-07 Thread Ashley Sheridan
On Tue, 2008-10-07 at 11:20 -0300, uaca man wrote: Farid, I like to use PRADO(www.pradosoft.com), it is very easy to use for those who are coming from Microsoft .Net platform as it uses the same architecture. I did not like symfony, too much to read before the first example. Angelo

Re: [PHP] Question about date()

2008-10-07 Thread Richard Heyes
Luckily for me it all still worked afterwards! The pen drive or the code? :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.phpguru.org/RGraph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php framework vs just php?

2008-10-07 Thread Larry Garfield
On Tue, 07 Oct 2008 19:47:54 +0100, Ashley Sheridan [EMAIL PROTECTED] wrote: Don't frameworks introduce a lot more overhead to projects though? Ash www.ashleysheridan.co.uk Any generic code library adds overhead. How much and whether or not it's acceptable depends on the framework and

Re: [PHP] Re: php framework vs just php?

2008-10-07 Thread Eric Butera
On Tue, Oct 7, 2008 at 2:47 PM, Ashley Sheridan [EMAIL PROTECTED] wrote: On Tue, 2008-10-07 at 11:20 -0300, uaca man wrote: Farid, I like to use PRADO(www.pradosoft.com), it is very easy to use for those who are coming from Microsoft .Net platform as it uses the same architecture. I did not

Re: [PHP] Question about date()

2008-10-07 Thread Ashley Sheridan
On Tue, 2008-10-07 at 19:47 +0100, Richard Heyes wrote: Luckily for me it all still worked afterwards! The pen drive or the code? :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.phpguru.org/RGraph Both! Ash www.ashleysheridan.co.uk -- PHP

Re: [PHP] Prefered Method for User authetification on VHosts

2008-10-07 Thread Jochem Maas
Michelle Konzack schreef: Hello, I have at my hosting provider only 1 GByte of Diskspace and can install VHosts as much as I want. The problem is, that I have no access to the OS for OS-Level autentification. Currently I have ${CUSTOMERPATH}/htdocs/index.php which handel

[PHP] Missing Env. Variables when called by AT Scheduler

2008-10-07 Thread JJB
We regularly send out massive mail blasts to our customers. Recently several mail blasts failed to transmit. After a serious amount of research we found the snippet of code below to be the place where it was breaking down. The issue it seems is that the Environment Variables HOST and

[PHP] PHP and getting part of URL

2008-10-07 Thread Jason ML
Hi PHP'ers, PHP 4.4.8 and 5. say I have a url like: http://www.mydomain.tld/jason/index.php In that index.php I want to have a piece of code that runs that tells me the 'jason' part of the URL so that I can run some custom read only queries for 'jason' How can I do this? I know how to

Re: [PHP] Missing Env. Variables when called by AT Scheduler

2008-10-07 Thread Chris
JJB wrote: We regularly send out massive mail blasts to our customers. Recently several mail blasts failed to transmit. After a serious amount of research we found the snippet of code below to be the place where it was breaking down. The issue it seems is that the Environment Variables HOST

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Chris
Jason ML wrote: Hi PHP'ers, PHP 4.4.8 and 5. say I have a url like: http://www.mydomain.tld/jason/index.php In that index.php I want to have a piece of code that runs that tells me the 'jason' part of the URL so that I can run some custom read only queries for 'jason' How can I do this?

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Micah Gersten
dirname($_SERVER['REQUEST_URI']); Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason ML wrote: Hi PHP'ers, PHP 4.4.8 and 5. say I have a url like: http://www.mydomain.tld/jason/index.php In that index.php I want to have a piece of code that runs

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Jason ML
Hi Micah, dirname($_SERVER['REQUEST_URI']); I have tried that and I dont get the proper URI: Example running print_r($_SERVER); I get: [REQUEST_URI] = /net1003/ people/jason/ But then doing: $jason = dirname($_SERVER['REQUEST_URI']); echo URL: ;

[PHP] Plotting Tool

2008-10-07 Thread Liz Kim
Hi, Anyone have any suggestions on a plotting package for PHP? Nothing too crazy and fancy - just easy to read plots/graphs. We were using PHPlot on our old server but it's requiring too many lib's/util's to install on a new server. TIA.

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Daniel Brown
On Tue, Oct 7, 2008 at 7:57 PM, Jason ML [EMAIL PROTECTED] wrote: But then doing: $jason = dirname($_SERVER['REQUEST_URI']); echo URL: ; echo $jason; I get: URL: /net1003/people Thoughts on what I am doing wrong. Yeah. Not R'ing TFM. dirname() gives you the

Re: [PHP] Plotting Tool

2008-10-07 Thread Thorsten Suckow-Homberg
Hey there, Anyone have any suggestions on a plotting package for PHP? Nothing too crazy and fancy - just easy to read plots/graphs. We were using PHPlot on our old server but it's requiring too many lib's/util's to install on a new server. JPGraph: http://www.aditus.nu/jpgraph/ HTH

Re: [PHP] Plotting Tool

2008-10-07 Thread Daniel Brown
On Tue, Oct 7, 2008 at 8:04 PM, Liz Kim [EMAIL PROTECTED] wrote: Hi, Anyone have any suggestions on a plotting package for PHP? Nothing too crazy and fancy - just easy to read plots/graphs. We were using PHPlot on our old server but it's requiring too many lib's/util's to install on a new

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Jason ML
Daniel, I get: URL: /net1003/people Thoughts on what I am doing wrong. Yeah. Not R'ing TFM. dirname() gives you the name of the directory ABOVE what you pass. http://php.net/dirname Thanks for the pointer. You are indeed correct. -Jason -- PHP General Mailing List

Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Micah Gersten
Your original post has this as the URL: http://www.mydomain.tld/jason/index.php That's why I gave you that command. If you want jason out of what you posted, Check out the following commands: http://us.php.net/array_pop http://us.php.net/explode Thank you, Micah Gersten onShore Networks

[PHP] Login

2008-10-07 Thread Terry J Daichendt
I want to open a page if a login is correct and another if not. What is the function to open a page in PHP? Can you show me a simple example of the syntax? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Login

2008-10-07 Thread Micah Gersten
What do you mean by open? You can redirect to a new page: http://us.php.net/header or You can include a file: http://us.php.net/include/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Terry J Daichendt wrote: I want to open a page if a login is correct and

Re: [PHP] Login

2008-10-07 Thread Kyle Terry
You can just use a header redirect. For example: if you are at login.php and the user is authorized, you could use if($auth === true) { header(Location: authed_page.php); } else { header(Location: denied.php); } On Oct 7, 2008, at 5:44 PM, Terry J Daichendt [EMAIL PROTECTED] wrote: I

Re: [PHP] Login

2008-10-07 Thread Nilesh Govindrajan
There is no such function! You have to write the code. On Wed, Oct 8, 2008 at 6:14 AM, Terry J Daichendt [EMAIL PROTECTED]wrote: I want to open a page if a login is correct and another if not. What is the function to open a page in PHP? Can you show me a simple example of the syntax? --

Re: [PHP] Login

2008-10-07 Thread Nilesh Govindrajan
On Wednesday 08 October 2008 06:14:33 am Terry J Daichendt wrote: I want to open a page if a login is correct and another if not. What is the function to open a page in PHP? Can you show me a simple example of the syntax? There is no such function. You have many options like redirecting a

Re: [PHP] Selecting all records between a date range

2008-10-07 Thread Chris
Dan Joseph wrote: On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim [EMAIL PROTECTED] wrote: SQLTEST: SELECT * FROM `timeStore` WHERE`timein` BETWEEN 1222315200 AND 122292 Could not perform query: Query was empty [EMAIL PROTECTED] Put a ' around your timestamp numbers. I

[PHP] Manipulating strings

2008-10-07 Thread Ron Piggott
I have a series of questions. How do I count the number of br / 's in a string? How do I add text in the middle of a string, let's say after the 3rd br / Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Manipulating strings

2008-10-07 Thread Micah Gersten
For the 1st question: http://us.php.net/manual/en/function.substr-count.php For the second question: http://us.php.net/manual/en/function.strpos.php http://us.php.net/manual/en/function.str-replace.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ron

Re: [PHP] Manipulating strings

2008-10-07 Thread Ron Piggott
The first question was to find out how long the blog entry was (number of paragraphs.) I am wanting to put an ad in half way. Consequently there are going to be many br / 's before the one I am wanting to add text to. How should I handle this? Ron On Tue, 2008-10-07 at 20:55 -0500, Micah

Re: [PHP] Manipulating strings

2008-10-07 Thread Micah Gersten
Then you'll need this as well: http://us.php.net/manual/en/function.strlen.php **strpos** ( $text , 'br /' http://us.php.net/manual/en/language.pseudo-types.php#language.types.mixed, strlen($text)/2 ); Will give you the position. Use str_replace to insert your ad. Thank you, Micah Gersten

RE: [PHP] Plotting Tool

2008-10-07 Thread Warren Vail
You might check out JPGraph, I think it's available on source forge, very little php code on your part can produce some pretty impressive results. Warren Vail -Original Message- From: paragasu [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2008 7:42 PM To: Daniel Brown Cc:

Re: [PHP] Plotting Tool

2008-10-07 Thread paragasu
i am not sure if this one can be counted as OT. but, i found a JQuery extension you can use. it is a javascript http://code.google.com/p/flot/ and here is the result example http://ajaxian.com/archives/plotting-in-jquery quite fancy ;) On 10/8/08, Daniel Brown [EMAIL PROTECTED] wrote: On Tue,

Re: [PHP] Re: php framework vs just php?

2008-10-07 Thread paragasu
PHP framework vs just php ? http://paul-m-jones.com/?p=315 according to the benchmark.Just PHP win by more than 100% to average framework. even the fastest solar only manage to serve 154pages/sec compare to just php 1320pages/sec call me outdated. but i stay with just php! On 10/8/08, Eric