[PHP] File handling

2002-11-28 Thread Jeff
Quick one, how do i read a file for a key word, say "TEXt", and the delete
the rest of the remaining file?





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




Re: [PHP] File handling

2002-11-29 Thread Jeff
I've got this coed but it still don't do the business:
$MESSAGE_FILE="foobar.txt";
$handle=fopen("$MESSAGE_FILE","w");
$sizez= sizeof($handle);
$string= 'foo';
 while ( fgets($handle,$sisez)
 { fputs($handle,$sizez);

if (strstr($handle,$string)){
break;
}
 }
Any ideas?

"Jeff Ringrose" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Justin,
>  Option b. delete all AFTER "foo", I.E. truncate the file directly after
> "foo". Leaving "foo" and all the data before "foo" untouched.
>
> Jeff
>
> -Original Message-
> From: Justin French [mailto:[EMAIL PROTECTED]]
> Sent: 29 November 2002 04:29
> To: Jeff; [EMAIL PROTECTED]
> Subject: Re: [PHP] File handling
>
>
> > Quick one, how do i read a file for a key word, say "TEXt", and the
delete
> > the rest of the remaining file?
>
>
> Do you mean:
>
> a) how do i make sure a word (eg "foo") is in a file, and if it is, delete
> all contents of the file except the word "foo" OR
>
> b) how do i search a file for the word "foo", and delete everything in the
> file AFTER the word "foo"
>
> ??
>
>
> Justin French
> 
> http://Indent.com.au
> Web Development &
> Graphic Design
> 
>
>
> DISCLAIMER: The information in this message is confidential and may be
> legally privileged. It is intended solely for the addressee.  Access to
this
> message by anyone else is unauthorised.  If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it, is prohibited and may
be
> unlawful.  Please immediately contact the sender if you have received this
> message in error. Thank you.
>
>



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




[PHP] Re: Can't recover data in php posted with a form tag.

2002-11-29 Thread Jeff


try that

jeff
"Luc Roettgers" <[EMAIL PROTECTED]> wrote in message
002401c29782$8300de10$3b09c881@rolxp">news:002401c29782$8300de10$3b09c881@rolxp...
I have 2 files runQuery.php and doSQL.php, where the first one is posting
data entered by the user to the second page and displaying it but the data
never arrives. Any idea why this would not work, maybe some configuration
issue?? Any help is really appreciated...




   

  

   
   i.e. select * from scpsft






Résultat de la requète:




-->






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




[PHP] Browser Language

2002-12-17 Thread Jeff
Does anybody know how to get what language (en, fr, it, etc.) the users
browser is using?

Jeff




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




[PHP] Where am I?

2002-12-17 Thread Jeff
I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an Apache
server.

I need to find the actual path of the root directory.

Windows: C:/Inetpub/wwwroot/
Apache: /home/dcent/public_html/

I've tried dirname(), basename(), etc. I just can't figure it out.
Help.

Jeff



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




Re: [PHP] Browser Language

2002-12-17 Thread Jeff
Thanks Johannes,
I guess it throu me because it is a server var, not a remote var.

Jeff

"Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tuesday 17 December 2002 18:51, Jeff wrote:
> Does anybody know how to get what language (en, fr, it, etc.) the users
> browser is using?

Have a look at
$_SERVER["HTTP_ACCEPT_LANGUAGE"] This are the languages the user
likes to read.

johannes



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




Re: [PHP] Where am I?

2002-12-17 Thread Jeff
No, I've been looking all day. I can get the information is I run the script
from the root, but what if I am in a sub-dir?
Jeff

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try doing a phpinfo() , somewhere in there it'll tell you
>
> Martin
>
> -Original Message-
> From: Jeff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 2:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Where am I?
>
>
> I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an Apache
> server.
>
> I need to find the actual path of the root directory.
>
> Windows: C:/Inetpub/wwwroot/
> Apache: /home/dcent/public_html/
>
> I've tried dirname(), basename(), etc. I just can't figure it out.
> Help.
>
> Jeff
>
>
>
> --
> 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] Where am I?

2002-12-17 Thread Jeff
Ok.
In the root of the Webserver (Win | Apache) I have a directory called images
and one called about.

/+root (Win=C:\Inetpub\wwwroot, Apache=/home/../../public_html
 +-about
 +-images

I call a page in about (/about/index.php). One this page I have a script to
open an image file and get the size. DOC_ROOT gives me /root/about. This can
go down 'x' number of levels.

How do I /root/ dir from anywhere in my site?
Jeff
"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Doing a quick scan through the output of phpinfo() on my machine, I can
see
> any one of the following will give me the path (incl. filename of the
> current script)
>
> $HTTP_SERVER_VARS["DOCUMENT_ROOT"] . $PHP_SELF
> $HTTP_SERVER_VARS["SCRIPT_FILENAME"]
> $HTTP_SERVER_VARS["PATH_TRANSLATED"]
>
> HTH
> Martin
>
> -Original Message-
> From: Jeff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 3:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Where am I?
>
>
> No, I've been looking all day. I can get the information is I run the
script
> from the root, but what if I am in a sub-dir?
> Jeff
>
> "Martin Towell" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > try doing a phpinfo() , somewhere in there it'll tell you
> >
> > Martin
> >
> > -Original Message-
> > From: Jeff [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 18, 2002 2:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Where am I?
> >
> >
> > I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an
Apache
> > server.
> >
> > I need to find the actual path of the root directory.
> >
> > Windows: C:/Inetpub/wwwroot/
> > Apache: /home/dcent/public_html/
> >
> > I've tried dirname(), basename(), etc. I just can't figure it out.
> > Help.
> >
> > Jeff
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: repeat region

2002-12-18 Thread Jeff
$idx=1;
echo()
while(fetch_rows) {
  printf("%s, ID);
  if($idx%7=0) {echo(''}
  ++$idx;
}


"Bruce Levick" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi php'ers,
I have learnt alot in the last week in regards to php and listing the
rows of a table set.

I need help with a small challenge. I can retrieve rows from a database
table and list the results in HTML  cell successfully. My challenge
is this.

I want to list the I.D (auto increment id number) of a data base table
in html to display 7 columns accross and then drop down to the next row
and another 7 columns accross.

So the result would list numbers .1-7 then drop down and list 8-14
underneath and so in until the end of the results.

Is this at all possible?? Difficult??

Is there a project or a tutorial with an example I can draw from.??

Cheers



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




[PHP] Re: One php returning several htmls

2002-12-19 Thread Jeff
Go to page 1

"John Hinton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'll go into index.php and return a portion of the html code, upon
> clicking a link, I'll return another portion of the html code.
>
> My question is what seems to be the best/cleanest/fastest method for
> doing this?
>
> I've done this with forms and the PHP_SELF action method... Wondering
> about simple links and alternatives.
> --
> John Hinton - Goshen, VA.
> http://www.ew3d.com
>
> Those who dance are considered insane
> by those who can't hear the music



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




[PHP] Re: Win32 php : MS Access support (odbc support)

2002-12-20 Thread Jeff
Why not connect to MDB via ODBC?

"Robert Mena" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I will have to retrieve data stored in a MDB (MS
> Access) "database".
>
> Since this MDB file be hosted in a Windows machine I'd
> like to have a CGI version of PHP with ODBC support so
> I can retrieve the data locally and send to a remote
> mysql database automatically.
>
> Since I've never used the CGI version to MDB any
> tips/caveats will be appreciated.
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com



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




[PHP] Re: Problem with functions

2002-12-21 Thread Jeff
Whenever I have had similar errors, it usually was a syntax error in or
before the function code. Just a thought.

Jeff
"Beauford.2002" <[EMAIL PROTECTED]> wrote in message
003601c2a840$41278ec0$6401a8c0@p1">news:003601c2a840$41278ec0$6401a8c0@p1...
> Hi,
>
> I keep getting errors in my script that says 'x' function is undefined or
> 'y' function is undefined. I defined it as 'function test ($a, $b)' and
call
> it using 'test($a, $b)' From my knowledge this is correct, but it just
> simply doesn't work.
>
> Anyone have any ideas on this?
>
> TIA
>
>



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




[PHP] need PHP programmer

2003-02-27 Thread Jeff
Don't know if this is appropriate or not but here we go.

I need help with a project.  requires a PHP developer.  The two programs 
we're using are php and MySQL.  Anyone interested or anyone who can help 
guide me to a place to find help please reply to me directly or to the 
list as you feel appropriate.

I'd like to find someone in Los Angeles area if possible but not essential.

Thanks in advance, Jeff

[EMAIL PROTECTED]

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


[PHP] backtick operator and zombie processes

2003-07-21 Thread jeff
When using the backtick operator:

$rsh = split("\n", `rsh 10.0.0.2 sysstat -c 5 -xs 5 2>&1 /dev/null 2>&1
nagios1484  0.7  1.2  6416 3176 ?S15:44   0:00  \_
/usr/local/bin/php /home/jeff/at.php
nagios1537  0.0  0.3  1952  848 ?S15:44   0:00
 \_ sh -c rsh 10.0.0.2 sysstat -c 5 -xs 5 2>&1 ]


Any thoughts?
Jeff
[EMAIL PROTECTED]



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



[PHP] Text field comparison

2003-12-03 Thread Jeff
I have created a few forms using post. There are certain fields that must 
match (i.e. username/password) before submission. Can this be accomplished 
using PHP? If not, an alternative would be nice. Thanks.

Jeff Hunnicutt

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


[PHP] array question

2001-02-23 Thread Jeff

Is there better performance/speed instantiating an array with a
specified size and then adding elements versus adding elements to an
array with no size?

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] try catch in php?

2001-02-26 Thread Jeff

Is there any equivalent java try catch syntax in php ?

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Compiling Scripts

2001-02-28 Thread Jeff

Use the zend optimizer, www.zend.com . Of course it requires the people who use
the script to have the optimizer as well, but at least they can't see the
source.

Jeff

Johnny Withers wrote:

> [I'm not on this list, please CC me in reply]
>
> Is there any way to compile a .php file instead of using the source code to
> distribute?
>
> Problem is, I may have to release an application written in PHP out to
> companies who do not wish to use this application across the Internet and
> would like to use it on their local intranet. I do not wish to have to deal
> with the non-disclosers, agreements, etc which comes with releasing source
> code.
>
> Thanks in advance.
>
> -
> Johnny Withers
> [EMAIL PROTECTED]
> p. 601.853.0211
> c. 601.954.9133
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] server side cookies

2001-03-02 Thread Jeff

Does anyone know how to set server side cookies in php?  Or can you
point me to a link on how to do this.
Please note that I am not asking how to set client side cookies.

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] max array size question..

2001-03-04 Thread Jeff

I'm trying to read in a text file that has 42620 lines.  Each line has
zip code information separated by commas.  I have no problem reading the
file into an array.  But when I try and read each element in the array
and put it into another array I get a "500 server error".  The second to
last line is what's causing the problem.

After doing some debugging I found out that at around iteration 18000 is
when the server error occurs.  Any ideas?  I know I should use a
database, but i'm intrigued by this problem.

Here's the code that does the work...

# read the file in, each line in the file is it's own element in the
array
$lineArray = file( "zips.txt" );

# initialize variable, showing that there's nothing in $ZIPS
$ZIPS = array();

# iterate through each element in the array, foreach() is probably
cleaner
for($i = 0; $i < count($lineArray); $i++ ) {
# set variable
$value = $lineArray[ $i ];

# set $tempArray to a new array
$tempArray = array();

# convert the line into an array
$tempArray = explode( ",", $value );

# add the line to the array in the format
# $ZIPS[ "zip code" ] = array( "zip code", "state", "city", "lat",
"long" )
$ZIPS[ $tempArray[ 0 ] ] = $tempArray;
}

Thanks in advance.

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] site root variable (for Generic Unix and Windows)

2001-03-19 Thread Jeff

Agreed - use absolute paths - but DONT include the protocol://server
Best is:
  
Not so good is:
  
  
Don't do this
  http://www.mine.com/admin/mypage>
  ^^^
You don't want your dev site linking to unreleased pages
in production etc.

I wanted relative, but after probs with web design tools, php and
having loads of sites to maintain I eventually had to bite the bullet
and now use absolute paths for all links. There are too many gotchas
balancing a tree of relative links.

Note that w3, recommend NOT include the file type in the link.
Let the server choose it for you: e.g.
  
is better than than
  
  
etc.

A nice side effect is that you can start with static holding .html
pages and transparently substitute them, a page at a time to smarter
.php as you get the coding done.

Of course, you need a decent web server...


Regards
Jeff

-Original Message-
From: Matt Williams [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 1:23 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] site root variable (for Generic Unix and Windows)



you could make your links absolute
ie..

/cat.html

so if you're in http://green/admin/admin.html

you would link to

http://green/cats.html

HTH

M@
> I am developing a PHP site under windows which is going to be deployed
> eventually on Unix (indeed when life gets less hectic will also
> be developed
> under Unix but that's another story).
>
> Anyway the header.html (included at top of every page) has links in it.
> However depending where the page is which is including
> header.html the links
> (from a relative point of view) will be different.  For example for the
> index.php (which is in site root) the catalogue page is simply referred to
> as cat.html but from admin.html (which is in the admin directory
> under site
> root) ../cat.html would be required.
>
> A way to get round this problem seems to be to have a variable
> with the site
> root in it (i.e. $siteroot = "c:/pages/") however this is causing
> me a real
> headache.  using
>
>   echo "Catalogue
>
> renders href to c:/pages/cat.php but then the browser tries to
> download the
> page as a file.  I have also tried
>
> $siteroot = "http://green/
>
> (green being the domain) but this douse not work either.
>
> I would really like the solution to this to be platform independent.
>
> Ta in Advance,
> ben
> --
> [EMAIL PROTECTED] (ben@work until end March)
> [EMAIL PROTECTED] (ben@home)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP vs Coldfusion and ADO vd API

2001-05-07 Thread Jeff

I have two questions:

1) I've seen a lot of benching by pc magazine and they're saying how
great cold fusion is and how bad php is.  However, they don't use Zend
in any of their tests.  Does anyone know of benchmarks against popular
systems that include php + Zend?

2) What is the performance gain by using an API vs database abstraction
layers, like ADO?

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP vs Perl security

2001-05-15 Thread Jeff

Hi. Are there any known/posssible security issues with PHP using SSL?
I'm trying to figure out if it would be better to user Perl or PHP based
on their security features/flaws.  I'm sure there's holes in both, but
which one has the bigger hole...?

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Pros/Cons, Case Examples, PHP vs Servlets

2001-05-17 Thread Jeff

Look at www.rit.edu for php examples.  Right now the site has a lot of
different stuff.  But some key areas use php, like SIS, which allowa students
to register for classes, get grade reports, etc. are all done via php

Jeff

Phillip Bow wrote:

> Well from my experience development time with PHP is generally much faster
> than Java development time.  Definately something most people would want to
> factor in.
> YMMV --phill
>
> ""Scott A Winkle"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > Im currently running many scripts myself and other staff members wrote in
> > PHP for the university. Certain others want to eliminate PHP and make
> > everything Java based. It is now in the 'debate meeting' stage, so I need
> > some help. I have done a handful of research already, but im looking for
> > more info.
> >
> > Specifically:
> >
> > Pros/Cons of PHP (in general) ...from your experiences
> > Pros/Cons of PHP in a university environment ...for those working at/with
> > universities/educational institutions
> > Case Examples of PHP use in universities, would be especially helpful for
> > anyone with examples of using PHP with a datatel product.
> > Any info on using PHP with a UniData database, even if its through ODBC.
> > Any cases where you found PHP was better at the task than Java, or
> > vice-versa. Specific examples, etc, would be even better.
> >
> > The meeting is scheduled for May 22, so any info prior would be great
> >
> > Thanks for the help,
> > Scott
> >
> >
> > Scott Winkle
> > Web Developer
> > Phone: (937) 327-7478
> > [EMAIL PROTECTED]
> > Web Team / Wittenberg University Computing Center
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PGP with MySQL

2001-05-17 Thread Jeff

I am trying to find the maximum security for storing credit card
numbers.

>From reading the archives someone mentioned using a PGP based encryption
to encrypt the credit card number and store it into the database, and
have the company that is processing the order have the decryption key on
the their computer.

Any comments or different ideas on this system?

Thanks

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] rename a directory

2001-07-24 Thread Jeff

Does anyone know how to rename a directory? There is rename() for files
but I couldn't find anything for directories...

Thanks,

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] rename a directory

2001-07-24 Thread Jeff

Thanks! Next time I won't assume it won't work...

Jeff

Tom Carter wrote:

> on unix I think it should work for both.. can't say I know on windows..
>
> also, why not try exec or system and just run the normal system command for
> it?
> - Original Message -
> From: "Jeff" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 24, 2001 6:07 PM
> Subject: [PHP] rename a directory
>
> > Does anyone know how to rename a directory? There is rename() for files
> > but I couldn't find anything for directories...
> >
> > Thanks,
> >
> > Jeff
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] register_globals and passing variables

2007-03-14 Thread Jeff
Ok, all I am new to PHP & MySQL. (please don't let this scare you off)

I had my site hosted with Gisol.com and due to their very poor service and 
tech support I left them for Lunarpages.com who so far have a better service 
and their tech support is excellent!! But my pages won't pass variables any 
more.

When I started I purchased two books MySQL and PHP & MySQL both published by 
O'Riely. So far the are excellent help and instructors. I wote some pages 
where I track users and their characters from an on-line game called World 
of Warcraft.

On the Gisol server they were working EXCELLENT!!

Once I moved to Lunarpages, the pages load ok but they don't pass the 
variables from one page to another.

The below code queries the db and list's the user's in a table, and has a 
hyperlink to the right of each, on Gisol I could click the link and it would 
load the view_char.php page and it listed their character and the info i 
needed, and gave options to delete and edit. Again it was working 
beautifully.


VIEW USERS PAGE CODE:
$sql="SELECT f_name, l_name, char_id, char_name, char_level FROM t_char, 
t_users where t_users.user_id = t_char.user_link ORDER BY char_name ASC";
mysql_select_db($db_select,$db);
$result = mysql_query($sql,$db);
echo "";
echo"Character NameCharacter 
LevelOwner";
while ($myrow = mysql_fetch_array($result))
{
echo 
"".$myrow["char_name"]."".$myrow["char_level"]."".$myrow["f_name"]."
 
".$myrow["l_name"];
echo "View";
}
//$charid="[.$myrow["char_id"].]"; <- I tried this line with no success. 
Possibly have it in the wrong place??
echo"";

VIEW_CHAR PAGE CODE
$sql = "SELECT * FROM `t_char` WHERE `t_char`.`char_id` = '$charid'"; <--  
now all this does is produce a blank page... used to work great!
//$sql = "SELECT * FROM `t_char` WHERE `t_char`.`char_id` = '21'"; <- i 
used this code to test the page w/o the $charid string and it works FINE!!
$result=mysql_query( $sql );
if (!$result)
{
die("Could not query the database: ".mysql_error());
}

I wrote a help ticket to Lunarpages where I am now hosted and asked them to 
set the register_globals to ON thinking this was the problem based on what 
I've read and the wrote back and told me that they use suPHP to parse php 
files and I have the option of using custom php.ini files. That I could 
create a .htaccess file or put individual php.ini files in the folder that 
contains the files im running. In other words do it myself.


So I created this file:

[PHP]

register_globals = on

named it php.ini and dropped it in the folder with all of my files.

It didn't help any.

So I added this line to the first file
include ('php.ini');

all it does is add :[PHP] register_globals = on  as text at the top of my 
page now.

At this point im lost!! I don't know what to do to get my A 
href=\"view_char.php?charid=".$myrow["char_id"]." to equal $charid in the 
following pages.

Any help you could provide me would GREATLY be APPRECIATED!!!

Signed,
I'm trying 

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



[PHP] Passing Variables

2007-03-14 Thread Jeff
Ok, all I am new to PHP & MySQL. (please don't let this scare you off)

I had my site hosted with Gisol.com and due to their very poor service and
tech support I left them for Lunarpages.com who so far have a better service
and their tech support is excellent!! But my pages won't pass variables any
more.

When I started I purchased two books MySQL and PHP & MySQL both published by
O'Riely. So far the are excellent help and instructors. I wote some pages
where I track users and their characters from an on-line game called World
of Warcraft.

On the Gisol server they were working EXCELLENT!!

Once I moved to Lunarpages, the pages load ok but they don't pass the
variables from one page to another.

The below code queries the db and list's the user's in a table, and has a
hyperlink to the right of each, on Gisol I could click the link and it would
load the view_char.php page and it listed their character and the info i
needed, and gave options to delete and edit. Again it was working
beautifully.


VIEW USERS PAGE CODE:
$sql="SELECT f_name, l_name, char_id, char_name, char_level FROM t_char,
t_users where t_users.user_id = t_char.user_link ORDER BY char_name ASC";
mysql_select_db($db_select,$db);
$result = mysql_query($sql,$db);
echo "";
echo"Character NameCharacter
LevelOwner";
while ($myrow = mysql_fetch_array($result))
{
echo
"".$myrow["char_name"]."".$myrow["char_level"]."".$myrow["f_name"]."
".$myrow["l_name"];
echo "View";
}
//$charid="[.$myrow["char_id"].]"; <- I tried this line with no success.
Possibly have it in the wrong place??
echo"";

VIEW_CHAR PAGE CODE
$sql = "SELECT * FROM `t_char` WHERE `t_char`.`char_id` = '$charid'"; <--
now all this does is produce a blank page... used to work great!
//$sql = "SELECT * FROM `t_char` WHERE `t_char`.`char_id` = '21'"; <- i
used this code to test the page w/o the $charid string and it works FINE!!
$result=mysql_query( $sql );
if (!$result)
{
die("Could not query the database: ".mysql_error());
}

I wrote a help ticket to Lunarpages where I am now hosted and asked them to
set the register_globals to ON thinking this was the problem based on what
I've read and the wrote back and told me that they use suPHP to parse php
files and I have the option of using custom php.ini files. That I could
create a .htaccess file or put individual php.ini files in the folder that
contains the files im running. In other words do it myself.

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



[PHP] Getting last record ID created from DB

2007-03-16 Thread Jeff
Is there a way to get the last Record # created by the DB.

Example:

User_ID = auto_increment
f_name = varchar
l_name = varchar
e-mail = varchar
b_date = varchar
pic = varchar


Since user_id is an auto_inc field I submit it as a NULL, also I haven't 
started the code for a picture yet either so I have it set to NULL at this 
moment.
My code is:

$query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`, `e_mail`, 
`b_date`, `pic`) VALUES ('', '$f_name', '$l_name', '$e_mail', '$b_date', 
'')";
$result = mysql_query($query);
if(!$result)
{
die("Could not query the database: ".mysql_error());
}
echo "Your Player information has been stored OK.";

what code could I add here to make the following line work?

echo "REMEMBER your USER ID# you will need it when creating Characters!! It 
is: $user_id"; <- I want to show the "user_id" just created here.

Thanks in advance! 

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



[PHP] Passing variables

2007-03-21 Thread Jeff
I want to thank you all for clearing me up on setting the register_globals 
to ON issue!! I have refrained from doing so and my code is running great 
with the $_GET.

I am having NO trouble passing my "single" variable to the next page using..

echo "Edit";

as when the next page that load actually shows the character info, so 
basically you can see you are dealing with the correct record.

NOW.

I want to pass two variables to a delete page. The charid and the char name. 
Here is what I have but it will only pass the 1st variable ?charid

echo "Delete";

I get the 1st variable using the $charid = (int)$_GET['charid']; (on the 
next page)

I do however NOT get

$charname = $_GET["char"] to pull the name out. (on the next page)

I've tried putting a comma, a &, a % between the variables ie..

echo "Delete";

but it just won't let me pull the $_GET["char"]

I have even tried $_GET['char'] but am under the impression '_' are for 
integers and "_" are for text? Anyway, can someone please let me know the 
PROPER way to pass the two or more variables?

Thanks WAY in advance!! 

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



Re: [PHP] Passing variables

2007-03-21 Thread Jeff
Thank you Chris!

"Chris" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Jeff wrote:
>> I want to thank you all for clearing me up on setting the 
>> register_globals to ON issue!! I have refrained from doing so and my code 
>> is running great with the $_GET.
>>
>> I am having NO trouble passing my "single" variable to the next page 
>> using..
>>
>> echo "Edit";
>>
>> as when the next page that load actually shows the character info, so 
>> basically you can see you are dealing with the correct record.
>>
>> NOW.
>>
>> I want to pass two variables to a delete page. The charid and the char 
>> name. Here is what I have but it will only pass the 1st variable ?charid
>>
>> echo "> ?char=".$myrow["char_name"]."\">Delete";
>
> The first one is preceded by a ?
>
> Subsequent ones are with an '&'.
>
> See http://en.wikipedia.org/wiki/Query_string
>
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/ 

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



[PHP] Intermittent PHP operation

2004-06-17 Thread Jeff
Hello all...

I am new to php and the news group so sorry if I don't provide all of the
info you need. Just ask and I will post more. My question is this... it
appears like my php is operating intermittently when connecting to mysql. I
have the die statements in my connection code... but the string contained
within the die() function is not being shown by the web browser (if in fact
the die() function is what is being called, I don't really know)... where
then does it get displayed? Why is it that I have to click the refresh
button several times to get my pages to load the way they are supposed to
load? Lastly... am I testing my web page code the totally wrong way? How do
you all test your php web code?

What am I doing wrong?!?!?!

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



[PHP] Why is PHP Segmentation Faulting?!?!?!?

2004-06-19 Thread Jeff
Hey all

Total PHP newbie here. I posted a day ago about php working
'intermittently'. I was told to check my apache logs which was a good hint
cause php is seg faulting. I've broken it down to my connection script to my
database and I ran it in gdb to see if it would tell me anything. Since I am
linux-tarded I don't have any clue what the problem is.

Here is my php code!!! It is stored in a file called dbConnect.php




Here is the output in GDB!!!
(gdb) run dbConnect.php
Starting program: /usr/bin/php dbConnect.php
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...[New Thread 1080622560 (LWP 29396)]
X-Powered-By: PHP/4.2.2
Content-type: text/html

start
localhostrootCantSeeThis
Resource id #1
past select
finish


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1080622560 (LWP 29396)]
0x4207492e in _int_free () from /lib/tls/libc.so.6



Here is the backtrace

(gdb) bt
#0  0x4207492e in _int_free () from /lib/tls/libc.so.6
#1  0x42073908 in free () from /lib/tls/libc.so.6
#2  0x0812b20d in _efree ()
#3  0x40962a35 in _close_mysql_link (rsrc=0x0)
at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:253
#4  0x081407f2 in list_entry_destructor ()
#5  0x0813f3c8 in zend_hash_clean ()
#6  0x0813f46c in zend_hash_graceful_reverse_destroy ()
#7  0x081409bf in zend_destroy_rsrc_list ()
#8  0x081320fd in shutdown_executor ()
#9  0x0813a145 in zend_deactivate ()
#10 0x0806f078 in php_request_shutdown ()
#11 0x0806d5d5 in main ()
#12 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
(gdb)



WTF is the problem. I have a feeling my script sucks and I am doing
something totally stupid

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



[PHP] Why is PHP Segmentation Faulting?!?!?!? --- ANOTHER HINT

2004-06-19 Thread Jeff
I don't know if this helps... but when I comment out all of the print
functions it seg faults at a totally different spot...

SCRIPT!!!





GDB RUN!!!

(gdb) run dbConnect.php
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/php dbConnect.php
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...[New Thread 1080622560 (LWP 29412)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1080622560 (LWP 29412)]
0x4207441c in _int_malloc () from /lib/tls/libc.so.6
(gdb)



BACKTRACE

(gdb) bt
#0  0x4207441c in _int_malloc () from /lib/tls/libc.so.6
#1  0x4207378d in malloc () from /lib/tls/libc.so.6
#2  0x409caa4a in my_malloc () from /lib/libmysqlclient.so.12
#3  0x409db73a in vio_new () from /lib/libmysqlclient.so.12
#4  0x409c71bb in mysql_real_connect () from /lib/libmysqlclient.so.12
#5  0x40963161 in php_mysql_do_connect (ht=0, return_value=0x8221604,
this_ptr=0x0,
return_value_used=1, persistent=0)
at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:662
#6  0x40963d9e in zif_mysql_connect (ht=1108554344, return_value=0x42133268,
this_ptr=0x42133268, return_value_used=1108554344)
at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:714
#7  0x0815355c in execute ()
#8  0x081532ce in execute ()
#9  0x0813a7c6 in zend_execute_scripts ()
#10 0x080705ca in php_execute_script ()
#11 0x0806d648 in main ()
#12 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
(gdb)

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



[PHP] Background Image

2007-08-28 Thread Jeff


is how I am displaying my background image. This is creating problems for 
different screen resolutions.

What would be the appropriate way to display this code so the image would 
not scroll, resize to the users current screen resolutions and just the page 
content would scroll?

TYIA! 

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



[PHP] Text Color

2008-02-28 Thread Jeff
Please, can anyone tell me how to produce colored text? For instance if I 
wanted to following code to be printed as red text what would I need to add 
to they code? Thanks in advance.

echo 
"".$myrow["char_name"]."".$myrow["char_level"]."".$class["class"]."".$myrow["kara"]."".$myrow["karateam"]."".$myrow["karasub"];
 

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



[PHP] Coding...

2006-11-18 Thread Jeff
I am pretty new with PHP, but what I've learned in the last 3 weeks is 
pretty good I think so far!


What I'm looking to do is create a login script, and have people being able 
to login.


Now, I have pulled scripts from sites, and everything is working okay.
But the problem I have with pulling scripts from other sites, is that the 
mysql databases are all different.


How can I import from one database into the other, so basically all the 
databases are merged into one main?


I also know that each PHP file has to be re-done and look for the new 
database name, for instance if it was user_name, and the default (Main) 
database is username .. That I Have to rename all the php files that have 
user_name to simply username.


If anyone is willing to help out with the project I'm working on with 
another programmer? Hopefully being very cost effective .. or free :) :)


Thanks,

Jeff 


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



[PHP] GD, and GD JPEG

2006-11-25 Thread Jeff


 Hi there.
I installed a script but it requires GD and GD JPEG

I downloaded GD, and GD JPEG

But how the heck do I install it?

Thanks guys

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



[PHP] GD.. con't

2006-11-25 Thread Jeff

Do I have to compile it with a C program?

What programs do people suggest I use to make PHP Files?

Is there a simple C program that will create basically whatever you want to 
do, without knowing the language?


I recall studying it in school, vaguely recalling the code...

Thanks,
Jeff


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



[PHP] Creating a unique index ID

2006-03-13 Thread Jeff
Hey all,

I've got a project where I'm taking form information from the user and
writing records to several tables in a MySQL database.

The problem I'm having is I need to write a unique number for the ID
column of the records.  Auto increment won't work because I could have
conflicts due to replication of the database servers.  Anyone have any
techique they use for creating unique ID field entries in a db table?

I was thinking maybe using a random 3 digit number and a unix timestamp?

Jeff

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



RE: [PHP] Creating a unique index ID

2006-03-13 Thread Jeff
> -Original Message-
> From: Jared Williams [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 13, 2006 10:16
> To: 'Jeff'; php-general@lists.php.net
> Subject: RE: [PHP] Creating a unique index ID
> 
> 
>  
> 
> > Hey all,
> > 
> > I've got a project where I'm taking form information from the
> > user and writing records to several tables in a MySQL database.
> > 
> > The problem I'm having is I need to write a unique number for
> > the ID column of the records.  Auto increment won't work 
> > because I could have conflicts due to replication of the 
> > database servers.  Anyone have any techique they use for 
> > creating unique ID field entries in a db table?
> > 
> 
> Autoincrements can work in a replicated enviroment, lookup 
> mysql settings auto_increment_increment & auto_increment_offset.
> 
> Each server gets its own unique auto_increment_offset, and 
> auto_increment_increment is set to the number of servers you have.
> 
> Jared
> 

Hmm, 

actually I'm using circular replication, so it's a bit different than
one way replication.

A replicates to B which replicates to A.

I've looked at the MySQL docs and can't find anything on how to make
Auto_Increment work in Circular Replication.

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



[PHP] Strange math results

2006-03-28 Thread Jeff
I've got a strange problem here.

I'm subtacting one variable from another, both of type "double" and if
they are the same, instead of getting a result of 0, I get something
like -9.99200722163E-016

Is this a bug or am I doing something wrong here?

Thanks,

Jeff

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



RE: [PHP] Strange math results

2006-03-28 Thread Jeff
> -Original Message-
> From: Satyam [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 28, 2006 17:23
> To: [EMAIL PROTECTED]; Jay Blanchard
> Cc: Jeff; php-general@lists.php.net
> Subject: Re: [PHP] Strange math results
> 
> 
> Indeed, when doing floating point math, you cannot  check the 
> values for 
> equality, they will rarely be, you have to check whether the 
> difference in 
> between them is less than the error you are willing to 
> accept.  Floating 
> point numbers are usually an approximation to the actual value and 
> intermediate operations might pile up errors in each approximation in 
> different ways.
> 
> As an example,
> 
> $third = 1/3;
> 
> $third will contain 0.3 up to a certain number of digits, 
> but it won't 
> last forever, as it should, theoretically.
> 
> Now,
> 
> $third * 3 == 1
> 
> will be false, but:
> 
> define('MAXERR',0.001);
> abs($third * 3 - 1) < MAXERR
> 
> will be true.
> 
> MAXERR is the error you are willing to accept in your 
> calculations, for 
> example, if you are using cents, give it a couple of extra 
> positions so that 
> roundings don't creep up to significant cents, that is, use 
> MAXERR = 0.0001 
> or thereabouts.
> 
> Satyam
> 

That explains it.  Thanks!

Jeff

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



[PHP] PHP CLI not present

2006-04-19 Thread Jeff
Hey all,

I'm running PHP Ver 4.4.1 on a redhat ES3 system.  It appears that the
CLI is not running or not present.  I thought it was installed by
default in versions >= 4.3.x.  

If I run /usr/local/bin/php -v at the command line I get nothing.

How do I get the PHP CLI working?

Thanks,

Jeff

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



RE: [PHP] PHP CLI not present [SOLVED]

2006-04-19 Thread Jeff
> -Original Message-
> From: Jeff [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 19, 2006 16:02
> To: php-general@lists.php.net
> Subject: [PHP] PHP CLI not present
> 
> 
> Hey all,
> 
> I'm running PHP Ver 4.4.1 on a redhat ES3 system.  It appears 
> that the CLI is not running or not present.  I thought it was 
> installed by default in versions >= 4.3.x.  
> 
> If I run /usr/local/bin/php -v at the command line I get nothing.
> 
> How do I get the PHP CLI working?
> 
> Thanks,
> 
> Jeff

Nevermind.  Found it!

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



[PHP] Preg_match() regex

2006-04-21 Thread Jeff
Hey all,

Regex pattern question here.  I need to match on "Foo-F00", "Foo-foo",
"foo-Foo".  I know in perl you can use the /i to specify "case
insensitive" matching.  Is there any such switch that can be used in
preg_match() in PHP?

Thanks,

Jeff

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



[PHP] Avoiding user refresh of pages with forms

2006-05-03 Thread Jeff
Is there a way to prevent a re-posting of the form data when a user
pushes the "refresh" button on the browser?

I have a page that has a form to enter credit's or debit's to a user
account.  The top of the page displays the users account history and at
the bottom is a form to add an adjustment. I just had a situation where
a user came in complaining that the database is out of control every
time I "REFRESH" the page the credit I put in gets added again and
again!!  He also claimed he was getting no warning message about that
which was of course false, he just didn't read it.

In any event, I need to make this more user proof.

Thanks,

Jeff

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



[PHP] "!" in front of a variable?

2006-02-17 Thread Jeff
Hey all,

I've got some code from someone else I've inherited and need to sort out
some problems with.  The programmer that wrote it originally was much
better than I and programmed a little over my head to say the least.

One function that I've come across that has 5 variables as input:

function($var1,$var2,!$var2,$var3->cc,$var3->bcc);

The question I have is on the 3rd input variable, what does the "!" in
front of $var2 do to that variable?

Jeff

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



RE: [PHP] What does a "?" represent

2006-02-17 Thread Jeff
> -Original Message-
> From: Shaunak Kashyap [mailto:[EMAIL PROTECTED] 
> Sent: Friday, February 17, 2006 15:22
> To: php-general@lists.php.net
> Subject: RE: [PHP] What does a "?" represent
> 
> 
> I'm not sure if these completely answer your question but 
> they might get you started:
> 
> http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-prepare.html
> http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-execute.html
> 
> Shaunak Kashyap
>  
> Senior Web Developer
> WPT Enterprises, Inc.
> 5700 Wilshire Blvd., Suite 350
> Los Angeles, CA 90036
>  
> Main: 323.330.9900
>  

Yes, that has the data I needed, thanks!

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



[PHP] Does this If statement make sense?

2006-02-21 Thread Jeff
I'm again working with someone else's code and I have a problem I
believe is in the section below.  The problem is, I can't seem to
understand what the "IF" conditions are saying here.  The problem I have
is with the second condition.  To me this reads in psudo code:

If( X and (if Y exists, then W otherwise Z))

Does this work?  If so how is it evaluated?

Here is the actual code.


if ($tostaf  && ($reply->comment ? $config->send_comment_staf :
$config->send_emailreply_staf)) 
{
$to=array();
 
$vars["ticketurl"]=$config->webpath."ticket.php?id=".$ticket->id;
if ($reply->comment) {
$condition=" AND followups.employee<>'$reply->employee'";
}

 

Thanks,

Jeff

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



[PHP] phplib phplib-7.2b is severely inconsistent

2001-02-06 Thread Jeff

Can anyone explain this?  I thought phplib was supposed to
provide a consistent interface to databases.  If you depend
on the mysql and pgsql layers to work the same you are
screwed.  Their connect method inconsistency is pathetic. 
One function returns a value and the other does not.  This
code is straight from "phplib-7.2b"  If you don't believe me
download it yourself.

There are also other differences.  Member var
"Halt_On_Error" exists in db_mysql but not db_pgsql.  There
is no good reason for this inconsistency.

This is their "production" release.  From their own website:
"This is the most current production release of PHPLIB. It
is basically a 7.2 release with some minor bugfixes, such as
..."

//--
## THIS IS IN  "db_mysql.inc"

/* public: connection management */
  function connect($Database = "", $Host = "", $User = "",
$Password = "") {
/* Handle defaults */
if ("" == $Database)
  $Database = $this->Database;
if ("" == $Host)
  $Host = $this->Host;
if ("" == $User)
  $User = $this->User;
if ("" == $Password)
  $Password = $this->Password;

/* establish connection, select database */
if ( 0 == $this->Link_ID ) {

  $this->Link_ID=mysql_pconnect($Host, $User,
$Password);
  if (!$this->Link_ID) {
$this->halt("pconnect($Host, $User, \$Password)
failed.");
return 0;
  }

  if (!@mysql_select_db($Database,$this->Link_ID)) {
$this->halt("cannot use database ".$this->Database);
return 0;
  }
}

return $this->Link_ID;
  }

//--
## THIS IS IN  "db_pgsql.inc"

 function connect() {
  if ( 0 == $this->Link_ID ) {
  $cstr = "dbname=".$this->Database.
  $this->ifadd($this->Host, "host=").
  $this->ifadd($this->Port, "port=").
  $this->ifadd($this->User, "user=").
  $this->ifadd($this->Password, "password=");
  $this->Link_ID=pg_pconnect($cstr);
  if (!$this->Link_ID) {
  $this->halt("Link-ID == false, pconnect failed");
  }
  }
  } // ! WHERE IS THE DAMN RETURN
VALUE???!

//--

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php vs perl

2001-02-14 Thread Jeff

Is there any reason why php is better than perl for shopping carts
and/or product catalogs?

Thanks,
Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] automatic php execution

2001-02-14 Thread Jeff

Is there any way to get a php script to automatically run, say every
night at 2am?

Thanks,
Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Parsing XML files, logic involved...

2002-11-27 Thread Jeff Lewis
I have to write a script to parse XML files we receive daily. The XML files are all 
individual stories but there is an index page that comes with each batch that contains 
blocks of information for each story as follows (below). I need to run through this 
index file and for each story I need to grab the NewsItemID, the Time, and then the 
SourceFilePath.

>From there I need to then open up the individual stories and do some formatting but 
>for now I need to get by this :) I was planning on line by line through the file but 
>am not sure how I would go about grabbing the information I require. Sometimes there 
>is a SourceFilepath but sometimes its missing.

Any help would be greatly appreciated.








&CPJavaScriptOpenWindow;
Chretien pushes Bush on softwood, agriculture, but gets no 
promises


(CP) - Prime Minister Jean Chretien said he pressed U.S. President George W. Bush on 
Tuesday to address festering trade disputes between the two countries, but got no 
assurances that disagreements over softwood lumber or agricultural subsidies would be 
resolved. Chretien, who raised the matters after a NATO meeting in the Italian 
capital, said he was "very forceful" with Bush. But he said the president blamed 
Congress for the logjam.



"It's always like that when you deal with the president of the United States: 'Yes, 
but the Congress and the Senate . . . ' In Canada you blame the prime minister or you 
congratulate the prime minister because he cannot pass the buck to anyone else."











RE: [PHP] File handling

2002-11-29 Thread Jeff RingRose
Justin,
 Option b. delete all AFTER "foo", I.E. truncate the file directly after
"foo". Leaving "foo" and all the data before "foo" untouched.

Jeff

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2002 04:29
To: Jeff; [EMAIL PROTECTED]
Subject: Re: [PHP] File handling


> Quick one, how do i read a file for a key word, say "TEXt", and the delete
> the rest of the remaining file?


Do you mean:

a) how do i make sure a word (eg "foo") is in a file, and if it is, delete
all contents of the file except the word "foo" OR

b) how do i search a file for the word "foo", and delete everything in the
file AFTER the word "foo"

??


Justin French

http://Indent.com.au
Web Development & 
Graphic Design



DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.



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




[PHP] formating numbers & date

2002-12-03 Thread Jeff Bluemel
I'm curious how I change the number of decimal places displayed, and also
changing the date / time structures before displaying them with an echo
command.

Jeff



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




Re: [PHP] formating numbers & date

2002-12-03 Thread Jeff Bluemel
ok - I've been looking through this...

the number_format is working great (actually I finally found that function
right before I read your response), but the date format doesn't seem to
allow me to pass it a date.

Jeff

"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
01ff01c29b0b$381e2380$6601a8c0@kevin">news:01ff01c29b0b$381e2380$6601a8c0@kevin...
> To change the number of decimal places look into the number_format()
> function.
> To change the date/time structure the date() function will do what you
need.
> Search for both on www.php.net
>
> -Kevin
>
>
> - Original Message -
> From: "Jeff Bluemel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 03, 2002 1:11 PM
> Subject: [PHP] formating numbers & date
>
>
> > I'm curious how I change the number of decimal places displayed, and
also
> > changing the date / time structures before displaying them with an echo
> > command.
> >
> > Jeff
> >
> >
> >
> > --
> > 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] formating numbers & date

2002-12-04 Thread Jeff Bluemel
I'm displaying a date that I get from a informix database query - the date
format is as follows;

2002-12-04 23:21:49

I want it to display as 12/4/2002 11:21:49 PM

Jeff

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wednesday 04 December 2002 08:29, Jeff Bluemel wrote:
>
> > ... but the date format doesn't seem to
> > allow me to pass it a date.
>
> Your code?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Information Processing:
> What you call data processing when people are so disgusted with
> it they won't let it be discussed in their presence.
> */
>



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




Re: [PHP] formating numbers & date

2002-12-04 Thread Jeff Bluemel
thanks...

I will play with this, and let ya know if I have a problem...  looks easy
enough.

Jeff
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote:
>
> > Hi,
> >
> >  > $date = '2002-12-04 23:21:49';
> > $newdate = date('m/d/Y', strtotime($date));
> > echo $newdate;
> > ?>
>
> Whooops, forgot the time bit!
>
> Should be
>
>  $date = '2002-12-04 23:21:49';
> $newdate = date('n/j/Y g:i:s a', strtotime($date));
> echo $newdate;
> ?>
>
> echo's 12/4/2002 11:21:49 pm
>
> also fixed the leading zero's problem :)
>
>
> Justin French
> 
> http://Indent.com.au
> Web Development &
> Graphic Design
> 
>



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




Re: [PHP] formating numbers & date

2002-12-04 Thread Jeff Bluemel
worked great...

the other method may be a little quicker, but this code is easier for me to
understand, and although it is used in a loop there really is no visible
difference in how quickly it displays.

thanks,

Jeff
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote:
>
> > Hi,
> >
> >  > $date = '2002-12-04 23:21:49';
> > $newdate = date('m/d/Y', strtotime($date));
> > echo $newdate;
> > ?>
>
> Whooops, forgot the time bit!
>
> Should be
>
>  $date = '2002-12-04 23:21:49';
> $newdate = date('n/j/Y g:i:s a', strtotime($date));
> echo $newdate;
> ?>
>
> echo's 12/4/2002 11:21:49 pm
>
> also fixed the leading zero's problem :)
>
>
> Justin French
> 
> http://Indent.com.au
> Web Development &
> Graphic Design
> 
>



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




[PHP] Allowed memory size exhausted

2002-12-06 Thread Jeff Schwartz

I have a large amount of data (1,948,280 bytes) that I tried to write out to a file 
using

if ($fp = fopen($file,"w")):

fwrite($fp,$contents,strlen($contents));

fclose($fp);

endif;





and got "Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to 
allocate 1948281 bytes)" on the 2nd line. So, I tried to write out smaller portions 
with:

if ($fp = fopen($file,"w")):

$size = 4096;

while (strlen($contents)){

$temp = substr($contents,0,$size);

fwrite($fp,$temp,$size);

$contents = substr($contents,$size+1);

}

fclose($fp);

endif;

but get a similar error on the line "$contents = substr($contents,$size+1);" which is 
what I'm using to try to avoid running out of memory. It appears that I can't replace 
the variable with a smaller version of itself. 

So, if I can't write out the whole thing and can't section it either, what can I do?

Jeff



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP] imap_open with port other than 110

2002-12-11 Thread Jeff Schwartz

We're trying to use imap_open to access a pop3 server which is using port 120 instead 
of 110. We know the port and pop3 server are working because we can access it from 
Outlook.

$pop_inbox = imap_open("{".$mailserver."/$mailbox_type:$port}",$login,$password);

The code worked fine with port 110 but now it can't open a stream. I've tried it with 
"INBOX", putting the port next to the mailserver, etc. but nothing works when the port 
isn't 110.

I'd appreciate any ideas. Thanks,

Jeff



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP] problems with jsp & php

2002-12-11 Thread Jeff Bluemel
I cannot figure out where my problem is with the following script.  I know
I've used this syntax successfuly in the past.  when I take out the
variables, and just set link to something without using php then this works.
know when I click on the form that activated the button it does nothing.

function batch_close()
{
if (parent_window && !parent_window.closed)
{
 var action = ;
  var batch = ;
  var begin = ;
  var end = ;
  var amount = ;
  var link = "maintain.html?action=" + action + "&batch=" + batch +
"&begin=" + begin + "&end=" + end + "&amount=" + amount;
parent_window.document.location.href=link;
parent_window.focus();
}
window.close();
}



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




[PHP] Re: Problems connecting to a MySQL database

2002-12-12 Thread Jeff Bluemel
have you tried connected to the mysql database from a prompt before using
php???


"Eric" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Greetings!
>
> I have a script which attempts to connect to the database in three
different
> segments of code.
>
> I'm using this code to connect to the database:
>
> $db = mysql_connect("the_host", "the_user",
$cfg['Servers'][0]['password']);
> .
> .
> .
> .
> mysql_close($db);
>
> The first time I connect ok, retrieve all of the rows from a table, and
> display portions of a column.
>
> A user then clicks on a button to retrieve more detailed information from
> the same table in the database:
>
> $db = mysql_connect("the_host", "the_user",
$cfg['Servers'][0]['password']);
>
> This bombs with:
>
> Warning: Undefined offset: 0 in (directory
stuff)/www/cgi-php4/my_script.php
> on line 228
>
> Warning: Access denied for user: 'the_user' (Using password: NO) in
> (directory stuff)/www/cgi-php4/my_script.php on line 228
>
> Warning: MySQL Connection Failed: Access denied for user: 'the_user'
(Using
> password: NO) in (directory stuff)/www/cgi-php4/my_script.php on line 228
>
> Error: Could not connect to the database.
>
>
> Now, if I change the index to match the exact number of rows in the table,
> it's successfully accessed:
>
> $db = mysql_connect("the_host", "the_user",
$cfg['Servers'][4]['password']);
>
> it works fine.  But I don't think this is right.
>
> Any ideas as to why this is happening?
>
> Thanks much!
>
> Eric



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




[PHP] Re: problems with jsp & php

2002-12-12 Thread Jeff Bluemel
somebody has to have an answer to this...


"Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I cannot figure out where my problem is with the following script.  I know
> I've used this syntax successfuly in the past.  when I take out the
> variables, and just set link to something without using php then this
works.
> know when I click on the form that activated the button it does nothing.
>
> function batch_close()
> {
> if (parent_window && !parent_window.closed)
> {
>  var action = ;
>   var batch = ;
>   var begin = ;
>   var end = ;
>   var amount = ;
>   var link = "maintain.html?action=" + action + "&batch=" + batch +
> "&begin=" + begin + "&end=" + end + "&amount=" + amount;
> parent_window.document.location.href=link;
> parent_window.focus();
> }
> window.close();
> }
>
>



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




Re: [PHP] Re: problems with jsp & php

2002-12-12 Thread Jeff Bluemel
yes this is javascript - for some reason I thought jsp was another term for
javascript so I apologize.  Let me try these code changes, and see how this
shakes out.

Jeff
"Chris Wesley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm pretty sure everyone else is as confused by your description as I am.
> (Hence, I didn't answer.)  It looks like you're trying to generate
> JavaScript w/ PHP, but your subject mentions JSP.  In a nutshell, I don't
> know if what you're doing is over my head, or just not explained clearly.
>
> I can man an uncomfortable assumption, though:  You mean to generate
> JavaScript and JSP has nothing to do with this problem.  Try quoting your
> JavaScript variable values ...
>
> Change:
> var action = ;
>
> To:
> var action = "";
>
> ... likewise with the rest of your JavaScript variables.
>
> g.luck,
>     ~Chris
>
> On Thu, 12 Dec 2002, Jeff Bluemel wrote:
>
> > somebody has to have an answer to this...
> >
> >
> > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I cannot figure out where my problem is with the following script.  I
know
> > > I've used this syntax successfuly in the past.  when I take out the
> > > variables, and just set link to something without using php then this
> > works.
> > > know when I click on the form that activated the button it does
nothing.
> > >
> > > function batch_close()
> > > {
> > > if (parent_window && !parent_window.closed)
> > > {
> > >  var action = ;
> > >   var batch = ;
> > >   var begin = ;
> > >   var end = ;
> > >   var amount = ;
> > >   var link = "maintain.html?action=" + action + "&batch=" + batch +
> > > "&begin=" + begin + "&end=" + end + "&amount=" + amount;
> > > parent_window.document.location.href=link;
> > > parent_window.focus();
> > > }
> > > window.close();
> > > }
>
>



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




[PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
I have a string that will look like the following;

data1|data2

now - I need to put data1 in a variable, and data2 in another variable.
I've found the functions strlen, and strpos, but I can't figure how to grab
this data.

thanks,

Jeff



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




[PHP] Re: is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
thanks...

Jeff
"Matthew Gray" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Jeff Bluemel wrote:
>
> > I have a string that will look like the following;
> >
> > data1|data2
> >
> > now - I need to put data1 in a variable, and data2 in another variable.
> > I've found the functions strlen, and strpos, but I can't figure how to
> > grab this data.
> >
> > thanks,
> >
> > Jeff
>
> Try
>
> list($var1, $var2) = explode('|', 'data1|data2');
>
> Matt



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




Re: [PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
works great

thanks,

Jeff
"Philip Olson" <[EMAIL PROTECTED]> wrote in message
Pine.BSF.4.10.10212190240490.68100-10@localhost">news:Pine.BSF.4.10.10212190240490.68100-10@localhost...
>
> You want explode(), something like:
>
>   list($a, $b) = explode('|', $string);
>
>
> Regards,
> Philip Olson
>
>
> On Wed, 18 Dec 2002, Jeff Bluemel wrote:
>
> > I have a string that will look like the following;
> >
> > data1|data2
> >
> > now - I need to put data1 in a variable, and data2 in another variable.
> > I've found the functions strlen, and strpos, but I can't figure how to
grab
> > this data.
> >
> > thanks,
> >
> > Jeff
> >
> >
> >
> > --
> > 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] forum?

2002-12-24 Thread Jeff Lewis
http://www.yabbse.org


- Original Message -
From: "Fatih Üstündað" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Tuesday, December 24, 2002 9:51 AM
Subject: [PHP] forum?


> do you know freeware forum in php I can easly use?
>
> thanks.
> fatih ustundag
>
> --
> 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] Problems getting PHP to work (IIS5/XP Pro)

2002-12-31 Thread Jeff Lewis
Now I tried this on the Windows list but didn't get any replies. I also found an old 
thread on another site that Rasmus had replied to and I tried that suggestion but no 
luck.

I just ran the PHP installer and it set it up as a cgi I guess. I'd do the other way 
if I could find complete instructions. I tried the ones in the file included with the 
zip but it gave another error.

I don't understand why I'm having issues, I installed PHP 4.1 and below just fine in 
this very same set up.

However, I am receiving the following error:

 No input file specified. 

I have tried some of the suggested methods of fixing this but have not been able to 
solve it. Does anyone have a link or some info on how to fix this?

Jeff





[PHP] way to insert timer / pause?

2003-01-02 Thread Jeff Bluemel
if there a command, or a way I can put say a 5 second, or a 10 second pause
which will make it so it will output x amount of html, and then continue?
or if I can pause it will it not display any of the html until the entire
script has ran?



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




Re: [PHP] way to insert timer / pause?

2003-01-02 Thread Jeff Bluemel
thanks Sed

"Sed" <[EMAIL PROTECTED]> wrote in message
014d01c2b2d7$86935330$fe78a8c0@mamma">news:014d01c2b2d7$86935330$fe78a8c0@mamma...
Sure, just read the following:

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

As a reply for your second question, you can always assign the output to
a variable and echo the variable in the end of the script.


Regards,
Sumarlidi E. Dadason

SED - Graphic Design
_
Tel: 896-0376, 461-5501
E-mail: [EMAIL PROTECTED]
website: www.sed.is

-Original Message-
From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
Sent: 3. janúar 2003 02:57
To: [EMAIL PROTECTED]
Subject: [PHP] way to insert timer / pause?


if there a command, or a way I can put say a 5 second, or a 10 second
pause which will make it so it will output x amount of html, and then
continue? or if I can pause it will it not display any of the html until
the entire script has ran?



--
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] way to insert timer / pause?

2003-01-02 Thread Jeff Bluemel
thanks for the reply Mike...

Jeff
"Michael J. Pawlowsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I'm not sure I totally understand... but...
>
> to pause...  sleep(10);  i.e. 10 second pause Everything stops...  not
just output
>
> you can buffer everything and only output it when you want
>
> look at ob_start
>
> But a warning...  your server or the clients might change the expexted
behaviour.
>
>
> Mike
>
>
>
> *** REPLY SEPARATOR  ***
>
> On 02/01/2003 at 7:56 PM Jeff Bluemel wrote:
>
> >if there a command, or a way I can put say a 5 second, or a 10 second
> >pause
> >which will make it so it will output x amount of html, and then continue?
> >or if I can pause it will it not display any of the html until the entire
> >script has ran?
> >
> >
> >
> >--
> >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] way to insert timer / pause?

2003-01-02 Thread Jeff Bluemel
Andrew,

my application is of customer service tries to recharge the balance on a
pin, and it is over their charge limit (the customer service personnel) then
I was thinking I would display a header for a few seconds telling them the
recharge failed, and why.  however, I think I will just out it in
highlighted text instead (and flashing if I can figure that out).

Jeff
"Andrew Brampton" <[EMAIL PROTECTED]> wrote in message
002b01c2b2d6$37fba7a0$4fc40650@andrew">news:002b01c2b2d6$37fba7a0$4fc40650@andrew...
> I beleive you can use output buffering to stop anything from being
displayed
> until the very last moment. Or you can code your page with tables. I know
IE
> wont' render a table until the last  (I beleive), so this could
stop
> your html from showing.
>
> Or if there is going to be a long pause, you could make a intermediate
page
> that displays this will take minute. This page would have a meta refresh
> that keeps refreshing itself checking the status of your job. Once the job
> is complete on the next refresh it will notice the job is done and voila
> display the results.
>
> Andrew
> - Original Message -
> From: "Jeff Bluemel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 03, 2003 2:56 AM
> Subject: [PHP] way to insert timer / pause?
>
>
> > if there a command, or a way I can put say a 5 second, or a 10 second
> pause
> > which will make it so it will output x amount of html, and then
continue?
> > or if I can pause it will it not display any of the html until the
entire
> > script has ran?
> >
> >
> >
> > --
> > 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] way to insert timer / pause?

2003-01-02 Thread Jeff Bluemel
thats a good idea Mike...  thanks for the suggestion.


"Michael J. Pawlowsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Thank god the  tag in HTML was removed.
> Don't know how long you've been working on sites,
> but I started at the same time the first NSCA Mosaic browser came out.
About 10 years now.
>
> They had  back then, and everyone starting using it just
about everywhere!
> Imagine trying to read complete pages that were blinking.
>
> The first HTML chats would allow tags inserted...
> so someone would open a  tag and not close it to  make the whole
page blink.
>
> Anyways... the way I would do it today is to make an animated gif with the
text blinking and just load that.
>
> Mike
>
>
>
>
> *** REPLY SEPARATOR  ***
>
> On 02/01/2003 at 9:52 PM Jeff Bluemel wrote:
>
>
> >highlighted text instead (and flashing if I can figure that out).
>
>
>



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




[PHP] PEAR extension (mailparse) not working

2003-01-03 Thread Jeff Schwartz

I've just upgraded to PHP 4.3.0 and am unable to get the PEAR extension mailparse to 
work. I've installed mailparse via PEAR but PHP doesn't seem to see it. It doesn't 
show up in phpinfo().

What do I need to do to activate it?

Thanks,

Jeff

 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP] query join 2 databases? or match up arrays?

2003-01-03 Thread Jeff Bluemel
ok - here's my problem.  I have some data in mysql, and other data in
informix.

here is my application.  this is for distributors of prepaid phone cards.
prepaid phone cards have 3 numbers they can be identified by pin number
(which is unique), or by batch & serial number.  the batch number is
basically the type of card, and the serial number & batch number for another
unique identifier when used together.

now - a batch can be given to several different distributors.  therefore,
when then are pulling various types of information on the batch they should
only be able to see it for their cards, and not all of the cards in the
batch.

piece of cake right?  well - the permissions information is kept in mysql,
and the batch information its self is kept in an informix database.  there
is no way around this for me.

the only way I can think of to work around this problem is to query 1 card
at a time, and sum the info etc. together.  however, there could be 400,000+
records, and this would be a slow tedious process.  plus for each card I'd
have to query the mysql database for permissions, and then in turn query the
informix database in turn.  this could take a long time to display the
webpage.

clear as mud???  recommendations?



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




[PHP] Re: query join 2 databases? or match up arrays?

2003-01-03 Thread Jeff Bluemel
well - the informix database will be running on another server (a telecom
billing system).  this is a web based front end, and I really want to leave
the other system alone 100%.  if I were to modify anything I would make the
mysql permissions table inside of informix, but there are liability reason
which would keep me from doing so.

still - you bring up an interesting point.  a php script file that ran on
crontab may not be a bad answer.  however, again I would run into a problem
of volume.  there are an average of 3-4 million card in the informix server
so I couldn't do this in a export & import.  too may records, and info has
to be accurate within 15 minutes.  shear volume I believe is going to kill
that idea.  I would be back to 1 record at a time running every 15 minutes.
I would think too much load, and more practical to do it 1 record at a time
upon request which won't be too frequent.

hoping there's another solution I'm not aware of, or over looked.

Jeff

"Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Any chance you can do a somewhat frequent export from informix into mysql
> or the other way around so all your stuff is in one database?
>
> -philip
>
> On Fri, 3 Jan 2003, Jeff Bluemel wrote:
>
> > ok - here's my problem.  I have some data in mysql, and other data in
> > informix.
> >
> > here is my application.  this is for distributors of prepaid phone
cards.
> > prepaid phone cards have 3 numbers they can be identified by pin number
> > (which is unique), or by batch & serial number.  the batch number is
> > basically the type of card, and the serial number & batch number for
another
> > unique identifier when used together.
> >
> > now - a batch can be given to several different distributors.
therefore,
> > when then are pulling various types of information on the batch they
should
> > only be able to see it for their cards, and not all of the cards in the
> > batch.
> >
> > piece of cake right?  well - the permissions information is kept in
mysql,
> > and the batch information its self is kept in an informix database.
there
> > is no way around this for me.
> >
> > the only way I can think of to work around this problem is to query 1
card
> > at a time, and sum the info etc. together.  however, there could be
400,000+
> > records, and this would be a slow tedious process.  plus for each card
I'd
> > have to query the mysql database for permissions, and then in turn query
the
> > informix database in turn.  this could take a long time to display the
> > webpage.
> >
> > clear as mud???  recommendations?
> >
> >
> >
> > --
> > 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: query join 2 databases? or match up arrays?

2003-01-03 Thread Jeff Bluemel
actually - I believe that may be a workable solution.  you were mentioning
checking the timestamp on a mysql table.  how would I check the timestamp on
a mysql table?

even with this I'm betting it would be more time consuming to create the
table then it would to pull the info from informix, and process validation 1
record at a time from mysql.  that would be a simple query instead of an
insert.  this would also all take place on the server it's self instead of
pulling it from another server.  I could load it up with ram & let it run.

at any rate that gives me a lot of option to think about, and I'll probably
has to work with some samples of the stuff from here to see what way is
going to be the fastest.  it would probably depend if the user was pulling
this info in a session.  if it was once, or several times.  all something to
think about.

the other option I'm thinking about is just not giving the distributors
access to this information, but restricting it to users with permissions to
the entire batch only.

thanks,

Jeff

"Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hmm... what about querying the informix database for the set of rows you
> want all at once, putting that into a temporary mysql table with a
> timestamp and then doing the rest of your work from there.
>
> Then the next time it happens check the timestamp on that mysql table and
> if it's out of date, delete it and go and fetch updated rows from
> informix, otherwise just use what's in that mysql table.
>
> This would act as a sort of replicated table, but only taking into account
> the records that are actually being hit...
>
> maybe?
>
> On Fri, 3 Jan 2003, Jeff Bluemel wrote:
>
> > well - the informix database will be running on another server (a
telecom
> > billing system).  this is a web based front end, and I really want to
leave
> > the other system alone 100%.  if I were to modify anything I would make
the
> > mysql permissions table inside of informix, but there are liability
reason
> > which would keep me from doing so.
> >
> > still - you bring up an interesting point.  a php script file that ran
on
> > crontab may not be a bad answer.  however, again I would run into a
problem
> > of volume.  there are an average of 3-4 million card in the informix
server
> > so I couldn't do this in a export & import.  too may records, and info
has
> > to be accurate within 15 minutes.  shear volume I believe is going to
kill
> > that idea.  I would be back to 1 record at a time running every 15
minutes.
> > I would think too much load, and more practical to do it 1 record at a
time
> > upon request which won't be too frequent.
> >
> > hoping there's another solution I'm not aware of, or over looked.
> >
> > Jeff
> >
> > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Any chance you can do a somewhat frequent export from informix into
mysql
> > > or the other way around so all your stuff is in one database?
> > >
> > > -philip
> > >
> > > On Fri, 3 Jan 2003, Jeff Bluemel wrote:
> > >
> > > > ok - here's my problem.  I have some data in mysql, and other data
in
> > > > informix.
> > > >
> > > > here is my application.  this is for distributors of prepaid phone
> > cards.
> > > > prepaid phone cards have 3 numbers they can be identified by pin
number
> > > > (which is unique), or by batch & serial number.  the batch number is
> > > > basically the type of card, and the serial number & batch number for
> > another
> > > > unique identifier when used together.
> > > >
> > > > now - a batch can be given to several different distributors.
> > therefore,
> > > > when then are pulling various types of information on the batch they
> > should
> > > > only be able to see it for their cards, and not all of the cards in
the
> > > > batch.
> > > >
> > > > piece of cake right?  well - the permissions information is kept in
> > mysql,
> > > > and the batch information its self is kept in an informix database.
> > there
> > > > is no way around this for me.
> > > >
> > > > the only way I can think of to work around this problem is to query
1
> > card
> > > > at a time, and sum the info etc. together.  however, there could be
> > 400,000+
> > > > records, and this would be a slow tedious process.  

[PHP] Re: query join 2 databases? or match up arrays?

2003-01-03 Thread Jeff Bluemel
I'll have to play with this.  this is not a public website per say so
multiple requests on this in a short period of time probably isn't going to
be an issue.  I'll have to look at this & decide how I want to do this.  I'm
assuming I either need to do away with this, or make both options
selectable.  this isn't a released product so if they didn't get the access
to this feature it wouldn't be the end of the world.  they are already
getting a ton more features with this product then they would otherwise
have, which is nothing.

Jeff

"Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > actually - I believe that may be a workable solution.  you were
mentioning
> > checking the timestamp on a mysql table.  how would I check the
timestamp on
> > a mysql table?
>
> see the timestamp data type.
>
> > even with this I'm betting it would be more time consuming to create the
> > table then it would to pull the info from informix, and process
validation 1
> > record at a time from mysql.  that would be a simple query instead of an
>
> Yeah, but only the first time... if you get a lot of repeat traffic on the
> same set of rows only the first "hit" will be slow since after that it
> will all be in mysql...
>
> > insert.  this would also all take place on the server it's self instead
of
> > pulling it from another server.  I could load it up with ram & let it
run.
> >
> > at any rate that gives me a lot of option to think about, and I'll
probably
> > has to work with some samples of the stuff from here to see what way is
> > going to be the fastest.  it would probably depend if the user was
pulling
> > this info in a session.  if it was once, or several times.  all
something to
> > think about.
> >
> > the other option I'm thinking about is just not giving the distributors
> > access to this information, but restricting it to users with permissions
to
> > the entire batch only.
> >
> > thanks,
> >
> > Jeff
> >
> > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hmm... what about querying the informix database for the set of rows
you
> > > want all at once, putting that into a temporary mysql table with a
> > > timestamp and then doing the rest of your work from there.
> > >
> > > Then the next time it happens check the timestamp on that mysql table
and
> > > if it's out of date, delete it and go and fetch updated rows from
> > > informix, otherwise just use what's in that mysql table.
> > >
> > > This would act as a sort of replicated table, but only taking into
account
> > > the records that are actually being hit...
> > >
> > > maybe?
> > >
> > > On Fri, 3 Jan 2003, Jeff Bluemel wrote:
> > >
> > > > well - the informix database will be running on another server (a
> > telecom
> > > > billing system).  this is a web based front end, and I really want
to
> > leave
> > > > the other system alone 100%.  if I were to modify anything I would
make
> > the
> > > > mysql permissions table inside of informix, but there are liability
> > reason
> > > > which would keep me from doing so.
> > > >
> > > > still - you bring up an interesting point.  a php script file that
ran
> > on
> > > > crontab may not be a bad answer.  however, again I would run into a
> > problem
> > > > of volume.  there are an average of 3-4 million card in the informix
> > server
> > > > so I couldn't do this in a export & import.  too may records, and
info
> > has
> > > > to be accurate within 15 minutes.  shear volume I believe is going
to
> > kill
> > > > that idea.  I would be back to 1 record at a time running every 15
> > minutes.
> > > > I would think too much load, and more practical to do it 1 record at
a
> > time
> > > > upon request which won't be too frequent.
> > > >
> > > > hoping there's another solution I'm not aware of, or over looked.
> > > >
> > > > Jeff
> > > >
> > > > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > Any chance you can do a somewhat frequent export from informix
into
> > mysql
> > > > > or the other way aroun

[PHP] Bit of a logical question (what values to use for a graph)

2003-01-03 Thread Jeff Lewis
I am creating a graph using jpgraph and it is based on values grabbed every
15 minutes. So for the first graph I want to report the values for the last
24 hours. Would it make sense to report 96 points or what is everyones
suggestion?

The time is stored as a Unix timestamp...the values are server loads.

Jeff



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




[PHP] Function to catch all mySQL errors?

2003-01-04 Thread Jeff Lewis
I know that mySQL errors are caught in mysql_error() and I find that
function extremely useful (kudos!). However, I have several queries in a few
scripts of mine but am wondering if anyone has written a small function that
catches errors and outputs them. What I mean is lets say I have a block of
code like so:

$result = mysql_query("SELECT field1, field2 FROM users WHERE userLogin =
'$authusername' AND userPassword = '$authpassword'");

Instead of a small loop under my query that is like so:

if (mysql_error()) {
 echo "Error: ".mysql_error();
 exit;
}

I'd like to be able to call a function that does this instead of adding this
if statement after all my queries...so...anyone do something similar?

Jeff



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




[PHP] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Jeff Bluemel
when a user logs into my system I set a variable $_SESSION['username'].
now, every page somebody pulls up it revalidates their login so somebody
cannot get into the backend of the system.

now - is there a way I can make a utility that will show me the session
username's that are in use?  it would be useful to be able to know who's
currently online.  this is a website that will not be published, and is used
for a VERY limited number of people.

Jeff



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




Re: [PHP] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Jeff Bluemel
yea, that will work.  however, I was thinking of something a little more
dramatic like parsing the /tmp directly, associating ID's, and killing dead
sessions etc.

"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
004701c2b6a2$2dfeb6a0$0500a8c0@bambino">news:004701c2b6a2$2dfeb6a0$0500a8c0@bambino...
> Simple create a database table for logins and have a status that you
> set to online / offline and last seen could also be added.
>
> Then it is just a simple SELECT statement.
>
> If you don't want to use a database you could flock (not perfect) a file
> then read in a serialised array and update then write out and unlock.
>
>
>
> HiTCHO has Spoken!
> Timothy Hitchens (HiTCHO)
> [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 8 January 2003 9:08 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] anyway to do a 'whos online' from session variable?
> >
> >
> > when a user logs into my system I set a variable
> > $_SESSION['username']. now, every page somebody pulls up it
> > revalidates their login so somebody cannot get into the
> > backend of the system.
> >
> > now - is there a way I can make a utility that will show me
> > the session username's that are in use?  it would be useful
> > to be able to know who's currently online.  this is a website
> > that will not be published, and is used for a VERY limited
> > number of people.
> >
> > Jeff
> >
> >
> >
> > --
> > 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] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Jeff Bluemel
thanks...  I'm almost done with this project, and I think I will implement
this in the next phase.  doesn't sound terribly difficult, but I think I
will hold off.  definitely something I will be doing in the future, and
probably not too distance future.


"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
007301c2b6aa$2fbaebf0$0500a8c0@bambino">news:007301c2b6aa$2fbaebf0$0500a8c0@bambino...
> Hmm... yes you could create an array of the files then check the last
> mod stamp using stat (remember to reset stat).
>
> Sessions are also cleaned up via the garbage collection system
> controlled via php.ini
>
>
>
> HiTCHO has Spoken!
> Timothy Hitchens (HiTCHO)
> [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 8 January 2003 10:04 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] anyway to do a 'whos online' from session variable?
> >
> >
> > yea, that will work.  however, I was thinking of something a
> > little more dramatic like parsing the /tmp directly,
> > associating ID's, and killing dead sessions etc.
> >
> > "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in
> > message 004701c2b6a2$2dfeb6a0$0500a8c0@bambino">news:004701c2b6a2$2dfeb6a0$0500a8c0@bambino...
> > > Simple create a database table for logins and have a status
> > that you
> > > set to online / offline and last seen could also be added.
> > >
> > > Then it is just a simple SELECT statement.
> > >
> > > If you don't want to use a database you could flock (not perfect) a
> > > file then read in a serialised array and update then write out and
> > > unlock.
> > >
> > >
> > >
> > > HiTCHO has Spoken!
> > > Timothy Hitchens (HiTCHO)
> > > [EMAIL PROTECTED]
> > >
> > > > -Original Message-
> > > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, 8 January 2003 9:08 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] anyway to do a 'whos online' from session variable?
> > > >
> > > >
> > > > when a user logs into my system I set a variable
> > > > $_SESSION['username']. now, every page somebody pulls up it
> > > > revalidates their login so somebody cannot get into the
> > backend of
> > > > the system.
> > > >
> > > > now - is there a way I can make a utility that will show me the
> > > > session username's that are in use?  it would be useful
> > to be able
> > > > to know who's currently online.  this is a website that
> > will not be
> > > > published, and is used for a VERY limited number of people.
> > > >
> > > > Jeff
> > > >
> > > >
> > > >
> > > > --
> > > > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Looping through directories?

2003-01-08 Thread Jeff Lewis
Currently I have a script that reads an index file and from that index file it then 
loops through all files in that directory based on the index.

Instead of one directory now I have several and I want to loop through each directory 
and go to each directory's index file. Since there is no pattern for the name if the 
indexes, I assume I need to create an array holding the directory name and the 
associated index file name like so $dirs = array("Sports" => "spindex.xml", "Business 
News" => "business.xml") etc

Now, I need help with the loop to whip through each directory. Would I do a foreach on 
the array I just created? Any help would be greatly appreciated. I need to be able to 
access both the directory name and index name.

Jeff



Re: [PHP] anyway to do a 'whos online' from session variable?

2003-01-08 Thread Jeff Bluemel
ok - let me take that a step further - if I store the SID in the table also
are the files in the /tmp directory stored with the SID?  if they are this
may be a way I can delete out inactive session, but be able to allow
extended inactive sessions for users who may be pulling lengthy reports...


"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
007e01c2b6c4$4612d600$0500a8c0@bambino">news:007e01c2b6c4$4612d600$0500a8c0@bambino...
> Arr the garbage collection is based on a probability
> (session.gc_probability) and therefore it will clean
> up if you get enough hits to the server. Check the documentation for
> config of sessions.
>
> I use db for sessions with a check to ensure db is available. (you can
> then cleanup whatever you want)
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: [EMAIL PROTECTED]
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 8 January 2003 1:11 PM
> > To: Timothy Hitchens (HiTCHO)
> > Cc: 'Jeff Bluemel'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] anyway to do a 'whos online' from session variable?
> >
> >
> >
> >
> > On Wed, 8 Jan 2003, Timothy Hitchens (HiTCHO) wrote:
> >
> > > Hmm... yes you could create an array of the files then
> > check the last
> > > mod stamp using stat (remember to reset stat).
> > >
> > > Sessions are also cleaned up via the garbage collection system
> > > controlled via php.ini
> >
> >  How do you force garbage collection? I've written an
> > application using sessions for storage and there's been a
> > session sitting in my /tmp directory for 2 days now, well
> > over the 1440 seconds expiration.
> >
> > Ed
> >
> >
> >
> > --
> > 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] Suggestions on FAQ application?

2003-01-10 Thread Jeff Lewis
I've checked Hotscripts and I can't findanything relatively new or that suits my 
needs. I was wondering if anyone uses a FAQ program that they could suggest?

Jeff



Re: [PHP] Suggestions on FAQ application?

2003-01-10 Thread Jeff Lewis
Why re-invent what is already written? I'm well aware that it's easy to
write but there may be something out there already that suits my needs and
has some features that I hadn't thought of. If you don't have a suggestion
on a package please spare me the rude replies which seem to run rampant on
here lately...

Jeff
- Original Message -
From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
To: "'Jeff Lewis'" <[EMAIL PROTECTED]>; "'php-gen'" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 9:39 PM
Subject: RE: [PHP] Suggestions on FAQ application?


> It is a 30 minute write... not that hard!!
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, 11 January 2003 12:37 PM
> > To: php-gen
> > Subject: [PHP] Suggestions on FAQ application?
> >
> >
> > I've checked Hotscripts and I can't findanything relatively
> > new or that suits my needs. I was wondering if anyone uses a
> > FAQ program that they could suggest?
> >
> > Jeff
> >
>
>
>
>



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




[PHP] imap_open failure

2003-01-13 Thread Jeff Schwartz

I'm using imap_open in PHP 4.3.0 to successfully access every pop server I've tried - 
except 1: "mail.fea.net". I know the mail server, port, login, and password are 
correct because I can successfully log into the pop server with both telnet and 
Outlook.

Here's the code:

if ($pop_inbox = 
imap_open("{".$mailserver."/$mailbox_type:$port/notls}",$login,$password)):

I've tried every variation of the code, such as using "notls" or not. In any event, I 
know the code works because I can log into every other pop server I've tried.

imap_last_error() returns: Can not authenticate to POP3 server

Has anyone else run into this? Is there a way to see more about the interaction 
between imap_open and the pop server?

Jeff



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: [PHP] Windows PHP vs Linux PHP

2003-01-15 Thread Jeff Lewis
Set your php.ini file and error reporting as such:

error_reporting  =  E_ALL & ~E_NOTICE

See if that helps with the undefined notice.

jeff
- Original Message -
From: "Beauford.2002" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 12:52 PM
Subject: [PHP] Windows PHP vs Linux PHP


> Hi,
>
> I asked previously about the differences between the two and the concensus
> was any differences are in the operating systems themselves and not with
> PHP. Knowing this, how do I get rid of these errors that keep coming up in
> Windows, that don't in Linux. One specific one is  "Notice: Undefined
> variable: add in E:\IIS Webs\address.php on line 3"
>
> Someone said to turn on register_globals which I have. Another suggestion
> was to put a @ sign in from of all variables. This is a real pain. Anyone
> have any other suggestions, or is this basically it?
>
> Also, is there anything else that anyone can think of that I may have to
> look forward to using PHP under Windows?
>
> TIA
>
>
>
>
> --
> 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] Curl Problem

2003-01-17 Thread Jeff Hatcher
How do you retrieve a session cookie with curl?
How do you trick a page to make it think that it was submit from within the domain?
www.domainname.com/index.php -> www.domainname.com/logincheck.php (validates the from 
address)

Any help would be greatly appreciate.

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




[PHP] Warning: ifx_connect: E [SQLSTATE=IX 001 SQLCODE=-1829]

2003-01-20 Thread Jeff Bluemel
I get this error on reboot, and I keep getting this error unless I restart
apache.  now, I've tried putting pauses in to make apache wait to start
(using scripts & sleep commands), but I keep having this problem unless I
log into the system & restart it.

does anybody know the possible cause to this problem, or how I can work
around / solve this?




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




[PHP] Re: Warning: ifx_connect: E [SQLSTATE=IX 001 SQLCODE=-1829]

2003-01-20 Thread Jeff Bluemel
ok everybody, I felt like I kind of had a brain fart...  *blush*

it dawned on my that some of the informix environment variables may not have
been getting set.  I added the following to the script I wrote, and it fixed
the problem;

export INFORMIXDIR=/opt/informix
export ODBCINI=/usr/local/etc/odbc.ini
export INFORMIXSERVER=m_srv


"Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I get this error on reboot, and I keep getting this error unless I restart
> apache.  now, I've tried putting pauses in to make apache wait to start
> (using scripts & sleep commands), but I keep having this problem unless I
> log into the system & restart it.
>
> does anybody know the possible cause to this problem, or how I can work
> around / solve this?
>
>
>



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




[PHP] Comparing two objects

2003-01-21 Thread Jeff Moore
I'm trying to compare two objects with == and === and getting the 
following error message:

Fatal error: Nesting level too deep - recursive dependency?

The object has several child objects which hold a reference to the 
parent in them.

I want to check the reference in the child object to make sure that it 
is the correct parent object.

This is part of a sanity check for debugging purposes.  Its quite easy 
to forget one & somewhere when dealing with the parent which causes a 
copy to be made.  The child objects in the copy then no longer point to 
the parent that is active (the copy), but instead point to the original 
parent.  This manifests itself in subtle errors revolving around the 
changes to the parent after the copy was made.  I would like to detect 
this situation.

Is there a workaround for this object comparison which involves 
determining if two variables reference the same object?

Thanks.


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



[PHP] mail() function not working in PHP 4.2.3

2003-01-23 Thread Jeff Pauls
Hi,
I have a simple mail script and when I run the script I get the following error:

Warning: mail() is not supported in this PHP build in /var/www/htdocs/file.php on line 
159

I've checked the php.ini file to see if a setting was turned off, but came up with 
nothing except for:

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

If the server that I'm working on is using QMAIL for it's email do I have to change a 
setting somewhere? Or does mail() not work in version 4.2.3?

Any help would be great.
Thanks,

Jeff




Re: [PHP] Good way to organize code using classes???

2003-01-28 Thread Jeff Warrington
On Tue, 28 Jan 2003 16:20:20 +0100, Maxim Maletsky wrote:

> 

I use PHP classes extensively and very often use classes
within other classes.

First off, I would make sure to take advantage of inheritence
as much as possible. I have heirarchies up to 4 deep for
some of my classes depending on how much specialization
I need while at the same time maintaining only one set
of code for functionality common to all subclasses.

As for using classes within classes, I don't include
the classes within a class definition nor within 
a method def. I include the class def in the class
file but outside the actual class {} statement.

When I instantiate the class, if I will need the object
ref to pass to other classes or to other methods within
the calling class, I assign the initial object
instantiation to a class variable. That way any class
methods can have ready access to that class via the 
ojbect reference stored in the class variable. 

Only when I know for sure that the use of a class will
be for one purpose do I include and instantiate within
a method. 

as always, YMMV depending on the structure of your project.

NOTE: There is a set of new PHP functions that allow
a sort of dynamic multiple inheritence. You can look
here for info: 

http://www.php.net/manual/en/ref.objaggregation.php

Jeff



> "@ Nilaab" <[EMAIL PROTECTED]> wrote... :
> 
>> Hello everyone,
>> 
>> I want to be able to use objects to create my future pages. My goal is
>> to use methods of classes to make the original front-line script easier
>> to read, while all the processing is done with a simple call to the
>> different classes from a single class. Please read futher, as I'll get
>> to a point and to my question...
>> 
>> I have many classes that do different tasks, like formValidator.class,
>> stringManipulator.class, db.class, fileManipulation.class,
>> template.class, etc (these are self-explanitory as their names suggest).
>> Then, I might have a class called category.class that adds, deletes,
>> edits, moves, and renames categories within the filesystem and database.
>> But I would have a front-line script called category.php that would call
>> the necessary methods of category.class at certain points, depending on
>> the task being done on a specific step.
>> 
>> In other words I want category.class to call the other classes and do
>> something with them, then in turn I want category.php to call objects in
>> category.class for a specific task, such as:
>> 
>> > 
>> // category.php
>> 
>> include ("category.class");
>> $cat = new category ();
>> $cat->addCategory($new_cat_name);
>> // or
>> $cat->editCategory($cat_name);
>> // or
>> $cat->deleteCategory($cat_name);
>> // or
>> $cat->moveCategory($cat_name);
>> // or
>> $cat->renameCategory($cat_name);
>> 
>> ?>
>> 
>> 
>> My question is:
>> 
>> How can I call a class within another class and do something with it?
>> Right now I'm doing it the most convenient way I know, which is
>> including other classes using the include() function within the methods
>> of the category.class. There is no multiple-inheritance allowed in PHP,
>> so I can only use inheritance on one class.
> 
> Including new classes within the existing classes is not such a bad idea
> as it ensures you to have only the necessary classes called.
> 
>> I am also extremely skeptical about creating too many classes at a time
>> in one script. Do the above examples degrade performance speed of the
>> script when I call too many classes? Also, isn't there a way to use
>> sessions to save created classes and then use them again for other
>> scripts without the need to make a new instance of the same class again
>> and again?
> 
> yes, you can serialize/unserialize classes into the sessions. This makes
> it a little more complicated, but can be helpful sometimes.
> 
>> I am really looking for a better way to organize my code while still
>> being able to use these classes whenever I need them and at the same
>> time keeping the category.php file clean and easy to read. Is there a
>> tutorial on how to organize code? I'm not looking for html template
>> tutorials. Just how to get around inheritance limits while still keeping
>> performance and clean-code in mind.
> 
> You know what I have once done? I created a file with functions that
> return you the object pointers. It would create (declare) the class
> whenever it was not declared before or just return the pointer from a
> global variable if it was declared before. That way, you only load a few
> functio

Re: [PHP] Get command line output

2003-01-28 Thread Jeff Warrington
On Thu, 23 Jan 2003 00:14:07 +0800, Jason Wong wrote:

either use PHP to parse out the entirety of 
the output or make your command pipe its
output to other commands such as sed & awk
before it gets to PHP.

> w | tail +3 | awk '{print $1,$3,$5}'

Jeff


> On Thursday 23 January 2003 00:10, Greg Chagnon wrote:
>> Does anyone know how to get certain parts of the output from an exec of
>> a certain command?  For example...if I run "w" I get this output:
>>
>> [root@Lunar]:~> w
>>  11:02am  up 56 days, 17:39,  1 user,  load average: 0.07, 0.02, 0.00
>> USER TTY  FROM  LOGIN@   IDLE   JCPU   PCPU  WHAT
>> root pts/0brpt-sh6-port214 11:01am  0.00s  0.27s  0.06s  w
>>
>> Now what if I just want the infor on the 3rd line, and info about anyone
>> else who is logged in, such as the username, the host, and the time
>> without getting all the uptime and the header info?  Thanks!
> 
> exec() 'returns' the output of the command in an array. Just extract from
> the array whatever line(s) you need.


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




  1   2   3   4   5   6   7   8   9   10   >