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

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 > C

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] 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 , '' , strlen($text)/2 ); Will give you the position. Use str_replace to insert your ad. Thank you, Micah Gersten onShore

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 '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 Gersten

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 Pigg

[PHP] Manipulating strings

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

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

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 us

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 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:

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

[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] 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 Inte

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 (http://ww

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

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] 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() g

[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 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:

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 th

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? I

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 an

[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 do

[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 SERVER_NAM

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 > > whi

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 --

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

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 framewor

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 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. > > Angel

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

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 PRO

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 brou

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

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 framew

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 cl

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 i

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, f

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() exp

[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_err

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

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: http://www.php.net/un

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/ Documents/dev

[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 o

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.l

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

[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] 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