[PHP] Command line php output redirection.

2003-06-25 Thread Joshua Moore-Oliva
This is really scaring me as file redirection is one of the basic things in 
linux.. anyways 
 
 I have a php script that outputs to stdout using echo.. when I run it using 
 
 php parser.php 
 
 I can see the output no problem. However, when I attempted to redirect to a 
file using 
 
 php parser.php  temp 
 
 temp only contains 
 
 Content-type: text/html 
 X-Powered-By: PHP/4.3.2 
 
 
 Help?? 
 
 Thanks, Josh.


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



Re: [PHP] Command line php output redirection.

2003-06-25 Thread Joshua Moore-Oliva
That worked, thanks.

On June 25, 2003 07:16 pm, David Nicholson wrote:
 Hello,


 This is a reply to an e-mail that you wrote on Wed, 25 Jun 2003 at 23:48,
 lines prefixed by '' were originally written by you.

   php parser.php  temp
   temp only contains
   Content-type: text/html
   X-Powered-By: PHP/4.3.2

 Maybe try using the -q parameter? what do you get then?
   -q   Quiet-mode.  Suppress HTTP Header output.

 David.


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



Re: [PHP] Making a PHP Script Very Cache Friendly

2003-06-02 Thread Joshua Moore-Oliva
You can always store the file and every so often regenerate it, and if the 
regernation hasn't timed out jsut passtrhu the cache.

On June 2, 2003 02:38 am, Gerard Samuel wrote:
 Searching through the archives, most people are running away from
 caching php scripts.
 Im trying to do the opposite.
 I have a script that fetches css files.  Im trying to add header() calls
 to it so
 that browsers can cache it like a normal css file.
 This is what I have at the top of the file -
 --
 header('Content-type: text/css');
 header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
 header('Last-Modified: ' . gmdate('D, d M Y H:i:s',
 filemtime('./foo.php')) . ' GMT');
 

 For the life of me, according to the output of ethereal (a network
 sniffer), this file is always fetched from the server.
 Yes I did breeze by the HTTP 1.1 spec, but I didn't pick up on anything
 special that I should be doing.

 Is there a way to make the file be put into cache, or am I barking up
 the wrong tree.

 Thanks for your insight.


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



[PHP] preg_replace_callback and brackets

2003-03-29 Thread Joshua Moore-Oliva
I'm kind of confused right now...  when I call preg_replace_callback with a 
regular expression with brackets, sometimes I get an array back with multiple 
elements like

array(3) {
  [0]=
  string(19) http://www.aol.com

  [1]=
  string(0) 
  [2]=
  string(19) http://www.aol.com

}

and I have no idea why...  Why does the middle one have nothing in it?  the 
regular expression was

$dumb_body = preg_replace_callback ( '/'
   //Case spaceURLspace
   . '([\s]http:\/\/[^\s]+[\s])'
   . '|'
   //Case URLspace
   . '(^http:\/\/[^\s]+[\s])'
   . '|'
   //Case spaceURL
   . '([\s]http:\/\/[^\s]+$)'
   . '|'
   //Case URL
   . '(^http:\/\/[^\s]+$)'
   . '/i'
   , array( $this, storeUrlCallback ), 
$dumb_body );

I am very confused at the point of the array in this function period...  can 
anyone help?

Josh.

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



Re: [PHP] Setprecision ?? pls help

2003-03-24 Thread Joshua Moore-Oliva
You could have also used sprintf, which can be called from C++ as well.

Josh.

On March 24, 2003 07:18 am, Marek Kilimajer wrote:
   number_format

 Adriaan Nel wrote:
 Hi all,
 
 I'v got the following:
 
 round ($val1,4);
 
 echo $val1;
 
 It works fine, but when $val which is a float, contains for instance 1.1 I
 want it to output 1.1000 instead of just 1.1
 
 I know in C++ this can be done with setprecision(), but I can't seem to
  find anything similar in phpplease help
 
 Thanks ppl
 
 njoy ur day


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



Re: [PHP] Increase a month

2003-03-20 Thread Joshua Moore-Oliva
date() returns a unix timestamp, which is in seconds.  You are only adding one 
second.

Try using mktime, and increment hte month argument there.

Josh.

On March 20, 2003 09:00 am, shaun wrote:
 Hi,

 could someone tell me why this:

 ?php
$month = date(m);
echo \$month: .date(F,strtotime($month)).br;
$month = $month + 1;
echo \$month: .date(F,strtotime($month)).br;
 ?

 outputs this:

 $month: March
 $month: March

 surely it should be:

 $month: March
 $month: April

 Thanks in advance for your help.


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



Re: [PHP] How to figure out from which domain the PHP script was called?

2003-03-19 Thread Joshua Moore-Oliva
YOu can check the HTTP_REFERRER...  but really though, that's no security.  
Anyone can use Curl to simulate a request that looks like it comes from your 
domain.

All security measures needs to happen on the server, not from what the users 
web browser gives you.

Josh.

On March 19, 2003 05:13 pm, Philarmon wrote:
 Hi !

 Im a completely PHP newbie, so please spare me :)

 Is there any way to figure out from which page a script was called ?

 I want that the PHP script check it and will be executed only if the
 request came from my domain (so nobody could execute it by typing its name
 in the browser or something like that).

 Thanks for answering !

 Cheers,
 Philarmon


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



Re: [PHP] Hmmm, and how to do THAT ? ;)

2003-03-19 Thread Joshua Moore-Oliva
Nono, I'm saying that you can never be 100% sure where someone came from, 
since they are responsible for storing that data, and they can modify before 
sending it back to you.

If you really want to make sure someone came from another page before the 
current page, create a uniq ID and md5 it or something, store it in the 
database and then when someone comes to that page check the cookie value 
against what you stored in the database..  that's the only way to really 
enforce that someone came from a previous page of yours.

The http_referrer stuff is really built in just for statistics not security.

Josh.

On March 19, 2003 05:28 pm, Philarmon wrote:
 Ok, thanks for the info, Josh !

  All security measures needs to happen on the server, not from what the

 users

  web browser gives you.

 And how to do something like that on the server ? Is there a tutorial
 somewhere about this or something ? A few words about that would be great !

 :)

 Philarmon


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



Re: [PHP] connecting securely to remote database

2003-03-18 Thread Joshua Moore-Oliva
You should put this on the postgres general list not here...

I've heard a lot of talk about this lately, though I haven't gotten around to 
implementing it yet..  There is also a section in the online postgres docs on 
how to do this.

And if you're fast someone just posted a question 2 minutes ago on the 
pgsql-general list that went like this...

I'm using redhat 8.0 and postgresql 7.2.4 (rpm from postgresql.org). I want
to enable ssl.

START QUOTE

I have edited postgresql.conf to ssl = true. I also follow the 7.3 manual
(from postgresql.org) to create certificates and placed them in
/var/lib/pgsql/data/. Then restart the server with /etc/init.d/postgresql
restart. The result is [Failed]. What else should I do? Or procedure for 7.3
is different from 7.2.4? Or the rpm does not have ssl enabled when compile?

-Jason


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

END QUOTE

I'd suggest hopping onto the postgres list :)

Josh.

On March 19, 2003 01:25 am, Dennis Gearon wrote:
 how do I connect securely to a postgres database on another server / DNS
 name / IP?

 Some way to do SSL/SSH easily from PHP?

On March 19, 2003 01:25 am, Dennis Gearon wrote:
 how do I connect securely to a postgres database on another server / DNS
 name / IP?

 Some way to do SSL/SSH easily from PHP?


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



Re: [PHP] Sensibly accounting for timezone differences?

2003-03-17 Thread Joshua Moore-Oliva
On March 17, 2003 07:55 am, M Wells wrote:
 Hi All,

 I'm an Australian PHP developer and host most of my web sites on US
 servers. One in particular is primarily accessed by Australian visitors
 and I want to be able to reflect Australian Eastern Standard Times when
 writing / reporting records, rather than the server time, which is set
 to US Eastern Standard Time.

 I'm wondering if anyone can tell me if there is a sensible way to do
 this easily?

 Many thanks in advance!

 Regards and best wishes,

 Murray Wells,
 Urban Legend Web Design (ABN 18 635 979 727)

I use postgres as my database and it has very very nice built-in datetime 
functions to the tune

timestamp now() AT TIME ZONE interval '-5 hours'

or

timestamp now() AT TIME ZONE 'EST'

Josh.

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



Re: [PHP] Working with dates

2003-03-17 Thread Joshua Moore-Oliva
Switch to postgres!  then you can do

SELECT stamp FROM table
  WHERE stamp BETWEEN timestamp 'today' AND timestamp 'tomorrow';

On March 17, 2003 12:43 pm, Brad Harriger wrote:
 I have two variables, $StartDate and EndDate that contain values read
 from MySQL Date fields.  How can I determine if a value entered by the
 user is between the two dates?  I'm using PHP 4.0.6.


 Thanks in advance,

 Brad


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



Re: [PHP] Version 5?

2003-03-06 Thread Joshua Moore-Oliva
Where could I find a list of features that 5 is planning on having?

Josh.

On March 6, 2003 11:12 pm, Marco Tabini wrote:
 On Thu, 2003-03-06 at 23:09, Larry Brown wrote:
  Someone mentioned a facet of version 5 to be expected that I am really
  looking forward to.  Does anyone know what the release target date is?  I
  didnt see any mention of it on php.net.

 Version 5 is still being actively developed (at least as far as I know),
 so chances are that the release date is still a ways off. I've heard
 anything from Q2-Q3 of 2003 on.

 You can, however, download the current PHP5 CVS tree. I've been
 experimenting with it and it's fairly stable--although I've seen some
 messages that it leaks memory, for testing and learning how the new
 stuff works it should be fine, IMO.

 Out of curiosity, which feature were you interested in?

 Cheers,


 Marco
 --
 
 php|architect - The Monthly Magazine for PHP Professionals
 Come check us out on the web at http://www.phparch.com!


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



Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
What is someone spells their name Desilva?

On February 28, 2003 06:21 am, Justin French wrote:
 What about DeSilva And McSomething?

 Justin

 on 28/02/03 10:11 PM, Danny Shepherd ([EMAIL PROTECTED]) wrote:
  Hi,
 
  Well it's hardly rocket science - a flick through the manual and I came
  up with :
 
  $name=ucwords(strtolower($name));
 
  HTH
 
  Danny.
 
  - Original Message -
  From: Geoff Caplan [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, February 28, 2003 10:31 AM
  Subject: [PHP] Capitalising Personal Names
 
  Hi folks,
 
  I need to clean up the capitalisation of user-entered personal names.
 
  Once you start thinking about it, you realise it is a non-trivial
  issue, but previous discussions on the list presented only very
  partial solutions.
 
  In Perl, there are Cpan modules such as namecase and nameparse which
  handle this quite well. Does anyone have anything similar in PHP?
 
  Thanks
  --
 
  Geoff Caplan
  Advantae Ltd
 
 
  --
  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] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
Make a perl script that does what you want and use exec to pipe to it then :)

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



Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
well, as a last resort if you can find the perl module that does that conver 
the code to php...

it's probably just a bunch of regular expressions, and php has a perl compat 
regular expressions interface..

Josh.

On February 28, 2003 07:01 am, Geoff Caplan wrote:
 Joshua,

 JMO Make a perl script that does what you want and use exec to pipe to it
 then :)

 This is certainly a sensible solution. But I'd have to learn enough
 about Perl to do it. And I think it would be slow for large volumes of
 names - exec seems to be slow in general, for some reason.

 It would be good to have a native PHP solution. I can't be the only
 one who needs to clean up names...

 Geoff Caplan


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



Re: [PHP] passing arrays to a session-variable

2003-02-28 Thread Joshua Moore-Oliva
Try looking at this page

http://www.php.net/manual/en/function.serialize.php

Josh.
On February 28, 2003 08:22 am, Michiel van Heusden wrote:
 I'm using this script to test passing arrays to a Session-variable.

 ?
 session_start();

 // method 1
 $_SESSION['array1'] = array(item1, item2);

 // method 2
 session_register(array2);
 $array2 = array(itemA, itemB);

 header (Content-type: text/html);

 echo $array1[0]. br /;
 echo $array2[0];
 ?

 method 1 doesn't work until another PHP is loaded, only then the var is
 ouputted...
 method 2 works fine, but i'd prefer using $_SESSION all the way instead of
 session_register
 any suggestions?

 grace
 michiel


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



Re: [PHP] $_POST arrays not evaluated in sql statement -- why?

2003-02-25 Thread Joshua Moore-Oliva
I believe that single quotes will display exactly what you type in, and double 
quotes will actually process it..  e.g.

$foo = hello;

echo '$foo';
You see $foo

echo $foo;
You see hello

On February 25, 2003 09:42 pm, CF High wrote:
 Hey all.

 Got a problem with this sql statement -- php vars are evaluated (e.g. the
 $date var), but not the $_POST arrays..

 All of the arrays return correct values -- What am I missing here?

 $sql = INSERT into rosters (school_id, sport_id, date, jersey_id, first,
 last, position, grade, town, state, country, height, weight, DOB)
 VALUES
 ('1','1','$date','$_POST['jersey_id'][$x]','$_POST['first'][$x]','$_POST['l
a st'][$x]','$_POST['position'][$x]','$_POST['grade'][$x]',

 '$_POST['town'][$x]','$_POST['state'][$x]','$_POST['country'][$x]','$_POST[
' height'][$x]',
'$_POST['weight'][$x]','$DOB[$i]');

 I still have some hair left on my head..

 --Noah

 --


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



Re: [PHP] file upload and a browse for file box

2003-02-25 Thread Joshua Moore-Oliva
plain html

input type=file

On February 25, 2003 08:32 pm, Sunfire wrote:
 hi..

 i looked in the manual about file uploads and basically know how it works
 other than a little playing around with it but was wondering how you could
 make a browse for file button that opens a box on the users computer so
 then can look for the file rather than type it in.. or is this something
 with java/javascript that i have to find out elsewhere




 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003


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



Re: [PHP] Frustation with data validation

2003-02-23 Thread Joshua Moore-Oliva
any $_POST data is actually string data.  Use these functions from a class of 
mine I plan on making public when I have it thoroughly tested.

function isString( $var_name, $var )  {
/*Nothing else I can do in this case..  I don't think any other data type 
can have a length of zero.
If I jsut check for is_string and empty string will not register as a 
string.*/
if ( strlen( $var ) == 0 ) {
return;
}

if ( !is_string( $var ) ) {
$this-{$this-log_func} ( $var_name, '$var', does not contain valid 
string data. );
}
}

function strIsInt( $str ) {
$this-isString( 'str', $str );

if ( strlen( $str ) == 0 ) {
return FALSE;
}

for ( $i = 0; $i  strlen($str); $i++ ) {
if ( !ctype_digit ( $str[$i] )  $str[$i] != '-' ) {
return FALSE;
  }
}

return TRUE;
}

On February 23, 2003 05:02 pm, Robert E. Harvey, M.D. wrote:
 First, thanks to all who offered suggestions with my simple ereg
 question.  I have been unable to get anything to work properly in
 spite of many good suggestions.  The problem I want to solve is to
 ensure that input fields have either an integer number or are blank
 before the program proceeds.  I am approaching the problem thusly:

 for ($i=1;$i=3;$i++)
 {
   echo $_POST[grass_$i]; // Pollen name
   echo $_POST[gamt_$i]; // Pollen amount
   if (is_int($_POST[gamt_$i]))
   {
 continue;
   }
else
  {
die(Non-numeric data entered in grass entry field(s).);
  }
 }

 The two echo statements accurately return what data is in the two input
 fields.  The program dies when there is integer data returned in the
 echo $POST[gamt_$i] statement.

 If I negate the expression in the if statement like so :  if
 (!is_int($_POST[gamt_$i]))
 the program runs.  Isn't that a bit weird?

 It gets weirder.  If I enter an alpha character with if
 (!is_int($_POST[gamt_$i])), the program still runs but treats the
 alpha character as a 0.

 How should I construct that if statement so that the program will only
 run with integer data or no data entered into the input fields?

 TIA

 Bob Harvey


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



Re: [PHP] Threading

2003-02-22 Thread Joshua Moore-Oliva
You can use the curl libs to call an external script.

Josh.
On February 22, 2003 11:05 am, Steve Vernon wrote:
 Hiya Greg or anyone else!
 I realise that PHP does not have inherent thread support as yet. But is
 it possible to simulate threads?

 What I would like is for the user in a web site in a rare condition to
 cause a long script to be completed. Now as far as I can make out you can
 make it not time out, but the user will sit there being boored.

 Is it possible to call a URL from PHP? And just ignore it? I mean call
 another PHP script that takes ages, but wont affect he initial script
 ending?

 Steve
 - Original Message -
 From: Greg Donald [EMAIL PROTECTED]
 To: Bruce Miller [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, February 18, 2003 8:03 PM
 Subject: Re: [PHP] Threading

  On Tue, 18 Feb 2003, Bruce Miller wrote:
  Will PHP allow multiple-thread execution?
 
  PHP4 does not have thread support.
 
 
  --
  Greg Donald
  http://destiney.com
 
 
  --
  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] Passing PostgreSQL resource

2003-02-12 Thread Joshua Moore-Oliva
Try this function...  it's one part of a php class I've been thinking about 
making open-source.  Give it any sql statement and a page (0 based for the 
page) and a number of records for a page and you are set.

I've only tested this on postgresql.

function pageSql( $sql, $page, $recs_per_page ) {

  $this-isString( '$sql', $sql );
  $this-isInt( '$page', $page );
  $this-isInt( '$recs_per_page', $recs_per_page );

  $sql = trim( $sql );
  $sql = substr( $sql, strlen( SELECT ) );
  
  if ( $sql[strlen($sql)-1] != ; ) {
$sql .= ;;
  }
  
  $sql = sprintf( CREATE TEMP SEQUENCE temp_sequence;\n
. CREATE TEMP TABLE temp_table AS\n
.   SELECT nextval( 'temp_sequence' ) AS temporary_idASDF, 
%s\n
. SELECT ( SELECT COUNT(*) 
FROM temp_table\n
  .   
 WHERE temporary_idASDF  %d ) AS recs_remaining, \n
.  * FROM temp_table\n
.   WHERE temporary_idASDF  
%d\n
. AND temporary_idASDF  %d\n
.   ORDER BY temporary_idASDF;

, $sql
, ( $page + 1 ) * $recs_per_page + 1
, $page * $recs_per_page
, ( $page + 1 ) * $recs_per_page + 1 );

  return $sql;
}

On February 12, 2003 11:58 am, Lucas Lain wrote:
 Hi.. i'm new at this mailing list and you can say that i'm a newbie in
 Php programming :)
 i dont know how to pass a connection to a database between pages. I want
 to show the results in multiple pages with a unique connection.
 can anyone help me?
 Thanks in advance.
 Lucas

 --
 Lucas Lain
 [EMAIL PROTECTED]
 Argentina


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




Re: [PHP] Passing PostgreSQL resource

2003-02-12 Thread Joshua Moore-Oliva
There's really no other way to do it...

You can't serialize a connection or resultset since they are both resources...

If you really wanted you could turn a recordset into an array and store that 
as a serialised object and pass it around...  but

a) Depending on how much data a recordset returned it could be quite a 
slowdown on page viewing.
b) It could be a security breach in case there was data int he recordset you 
never show to the public btu you need for calculations.
c) Changes made to the database since the last retrieval would not display.

A server is meant to store and serve data..  There really is no other way 
about it =).

Josh.

On February 12, 2003 01:52 pm, Lucas Lain wrote:
 i will use it for the moment but i was thinking in a light solution
 ... i dont like the idea of creating a temp table for each page...


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




Re: [PHP] Passing PostgreSQL resource

2003-02-12 Thread Joshua Moore-Oliva
Oh btw, you will have to remove those isString and isint functions..  they are 
other parts of my library that just check the type of a variable...

and log a message through an error handling system I've set up..  I'd have the 
library up now but it's not that well commented..

Josh.

On February 12, 2003 01:30 pm, Joshua Moore-Oliva wrote:
 Try this function...  it's one part of a php class I've been thinking about
 making open-source.  Give it any sql statement and a page (0 based for the
 page) and a number of records for a page and you are set.

 I've only tested this on postgresql.

 function pageSql( $sql, $page, $recs_per_page ) {

   $this-isString( '$sql', $sql );
   $this-isInt( '$page', $page );
   $this-isInt( '$recs_per_page', $recs_per_page );

   $sql = trim( $sql );
   $sql = substr( $sql, strlen( SELECT ) );

   if ( $sql[strlen($sql)-1] != ; ) {
   $sql .= ;;
   }

   $sql = sprintf( CREATE TEMP SEQUENCE temp_sequence;\n
 . CREATE TEMP TABLE temp_table AS\n
 . SELECT nextval( 'temp_sequence' ) AS temporary_idASDF,
 %s\n
   . SELECT ( SELECT COUNT(*) 
FROM temp_table\n
 .   
 WHERE temporary_idASDF  %d ) AS recs_remaining, \n
 .* FROM temp_table\n
   .   WHERE temporary_idASDF  
%d\n
 . AND temporary_idASDF  %d\n
 .   ORDER BY temporary_idASDF;

 , $sql
 , ( $page + 1 ) * $recs_per_page + 1
 , $page * $recs_per_page
 , ( $page + 1 ) * $recs_per_page + 1 );

   return $sql;
 }

 On February 12, 2003 11:58 am, Lucas Lain wrote:
  Hi.. i'm new at this mailing list and you can say that i'm a newbie in
  Php programming :)
  i dont know how to pass a connection to a database between pages. I want
  to show the results in multiple pages with a unique connection.
  can anyone help me?
  Thanks in advance.
  Lucas
 
  --
  Lucas Lain
  [EMAIL PROTECTED]
  Argentina


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




Re: [PHP] Re: Static functions (java/php)

2003-02-09 Thread Joshua Moore-Oliva
The only thing I do wish is that there was a way to force php into a typecast 
mode...  and possibly a setting to reqiure a definition for a variable.

Josh.

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




Re: [PHP] Re: Static functions (java/php)

2003-02-09 Thread Joshua Moore-Oliva
How would I go about setting the error reporting level?

Josh.

On February 9, 2003 06:38 pm, David Eisenhart wrote:
 yeh, I'd agree with this; on your second issue of variable definitions I do
 find that being able set the error reporting level to show non critical
 errors (such as undefined variables) to be a reasonable, although non
 ideal, compromise; php's still a great language to work with most respects
 though ...

 David Eisenhart

 Joshua Moore-Oliva [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

  The only thing I do wish is that there was a way to force php into a

 typecast

  mode...  and possibly a setting to reqiure a definition for a variable.
 
  Josh.


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




[PHP] Function Stack

2003-02-01 Thread Joshua Moore-Oliva
Is there any way to access the Function Stack from php?

I would really like it for debugging, ala java style or C debugging style, 
where I could get a list of function like


From afunction line 83
From bfunction line 179
From cfunction line 345

Error here..

If I could somehow access the function stack as an array that woul dbe 
superb!!

Does anyone know if this kind of functionality exists?  Is there a function 
stack in Zend that I could create a module to access?

Josh.

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




[PHP] autoconf bug leads to configure syntax error when running buildconf

2003-01-27 Thread Joshua Moore-Oliva
I am attempting to create an extension to php..  The only problem is, whenever 
I run buildconf after creating a skeletion with 

./ext_skel --extname=my_module

I receive the following output from buildconf

./buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.4-p5 (ok)
buildconf: libtool version 1.4.2 (ok)
rebuilding configure
configure.in:562: AC_TRY_COMPILE was called before AC_AIX
configure.in:562: AC_TRY_RUN was called before AC_AIX
configure.in:562: AC_TRY_COMPILE was called before AC_AIX
configure.in:562: AC_TRY_RUN was called before AC_AIX
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_ACVERSION
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
rebuilding main/php_config.h.in
configure.in:562: AC_TRY_COMPILE was called before AC_AIX
configure.in:562: AC_TRY_RUN was called before AC_AIX
configure.in:562: AC_TRY_COMPILE was called before AC_AIX
configure.in:562: AC_TRY_RUN was called before AC_AIX

Then, when I run ./configure I receive a syntax error part way through..  My 
autoconf was 2.53 and got upgraded to 2.57 in case that was the problem...

help! 

Josh.

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




[PHP] Do php extension need to be thread-safe?

2003-01-27 Thread Joshua Moore-Oliva
Do php extension need to be thread-safe?  I am running php on apache2.  I 
would guess that since it's compiled in as a module, it would need to be 
thread-safe correct?

Josh.

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