[PHP] Homebrew fulltext search function (help)

2005-02-01 Thread Jason Morehouse
Hello,
I'm trying to make up for the lack full text searching in sqlite by 
passing the search off to php with sqlite_create_function.  The parsing 
part works fine, but I'm a little lost with the scoring, if anyone 
perhaps a little better @ math than I am, may be of assistance!

The parsing code below, basically allows you to use a php function 
within a sqlite call.  This pases matched content to a function, where 
the function needs to pass back a score:

sqlite_create_function($sDB, 'fulltext', 'fulltext_step',2);
function fulltext_step($title, $content) {
$words = explode(' ', strtolower('php books'));
$content = explode(' ',strtolower($content));
$content = array_intersect($content,$words);
foreach($content as $wordpos = $word) {
   print $wordpos - $wordbr;
}
}
sqlite_create_function($sDB, 'fulltext', 'fulltext_step',1);
$rs = sqlite_query($sDB,select title fulltext(content) score from page 
where content like '%php%books%' order by score);

while($data = sqlite_fetch_array($rs)) {
   print $data[score] $data[title]br;
}
So basically... the fulltext step builds and array, of how many times a 
word is matched, and at what word position (broken into an array for 
each word)... eg:

array('php'=2,'php'=30,'php'=55)
array('books'=3,'books'=130);
The word php is at position 2, and the word books is at position 3... 
and so on.

What is the best way to return a single score for this page?
It's a bit confusing I suppose, but thanks!
As a side, on a 90meg text table, the parsing function above runs in 
about  0.061858177185059 ms... mysql does in about 0.0039310455322266 
ms.  I'm fine by that.

-Jason
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php5 threadsafe / apache2 mpm=worker

2005-01-15 Thread Jason Morehouse
Yep, that's pretty much what I got, except I haven't been able to find a 
list of what modules are thread safe, except mysql.

Jochem Maas wrote:
Jason Morehouse wrote:
Hello,
Just wondering if anyone is using the apache worker module with php?
I've complied php5 with zend threadsafe support, and apache2 with the
MPM worker module on a Linux box.  Everything seems sweet.
mysqli_thread_safe() reports true... anyone know if this configuration
may include modules that aren't threadsafe?

if you use phpmodules that aren't threadsafe then use the prefork apache 
module. or face segfault hell or at least unwanted behaviour.

anyone care to correct me? (i.e. this is what I have gathered from
reading the internals mailinglist and from various 
people/friends/colleagues who are versed in these matters - I may have 
got the wrong of the stick!)

I can't say which modules are threadsafe or not - I would have to look 
it up - which you can probably do just as quickly yourself :-)

with-apxs2=/usr/local/apache2/bin/apxs with-gd enable-gd-native-ttf
with-pspell with-zlib with-freetype-dir with-curlwrappers
with-mime-magic with-curl enable-shmop with-jpeg-dir
with-mcrypt=/usr/lib with-mysqli enable-magic-quotes
with-enable-sockets enable-roxen-zts
Thanks,
-J


--
 Vendorama
 http://www.vendorama.com
 The evolution of e-commerce
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] regex help

2005-01-15 Thread Jason Morehouse
Mike Ford wrote:
Just off the top of my head (and untested!), I'd try something like
  /b(\s+[^]*)?/
Cheers!
Mike
That pretty much seems to work the best.  Thanks all!
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php5 threadsafe / apache2 mpm=worker

2005-01-14 Thread Jason Morehouse
Hello,
Just wondering if anyone is using the apache worker module with php?
I've complied php5 with zend threadsafe support, and apache2 with the
MPM worker module on a Linux box.  Everything seems sweet.
mysqli_thread_safe() reports true... anyone know if this configuration
may include modules that aren't threadsafe?
with-apxs2=/usr/local/apache2/bin/apxs with-gd enable-gd-native-ttf
with-pspell with-zlib with-freetype-dir with-curlwrappers
with-mime-magic with-curl enable-shmop with-jpeg-dir
with-mcrypt=/usr/lib with-mysqli enable-magic-quotes
with-enable-sockets enable-roxen-zts
Thanks,
-J
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] regex help

2005-01-13 Thread Jason Morehouse
Hello,
I normally can take a bit of regex fun, but not this time.
Simple enough, in theory... I need to match (count) all of the bold tags 
in a string, including ones with embedded styles (or whatever else can 
go in there).  b and b style=color:red.  My attempts keep matching 
br as well.

Thanks!
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: What program to use to make thumbnail images?

2005-01-10 Thread Jason Morehouse
John Holmes wrote:
What do you guys recommend for making thumbnails from uploaded images? I 
know of the GD extension, Imagemagik and netpbm. Any other 
recommendations or opinions on which of the above work best with PHP? 
Thanks.

Imagemagik is your best bet IMHO.  It's the most configurable and gives 
the best results.  It's too bad it can't be built directly into php, but 
I think there is a pear module for it.  Myself, I just use the command 
line --- but be sure and take all the necessarily precautions when 
making system calls!

--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] 403 not working -- apache 2 / php5 / linux

2005-01-10 Thread Jason Morehouse
Hello.  I'm not sure if this is an apache problem or php... but 
wondering if anyone has come across the same problem.

-rw---1 root root   test.html
-rw---1 root root   test.php
Trying to access test.html via a browser servers up the apache 403 error 
page.  The test.php however produces:

Warning: Unknown: failed to open stream: Permission denied in Unknown on 
line 0 Warning: Unknown: Failed opening '/www/test.php' for inclusion 
(include_path='.:/www/php') in Unknown on line 0

Any ideas?
Thanks!
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Comparison Operator

2005-01-10 Thread Jason Morehouse
Russell Chadwick wrote:
 
Could anyone tell me why this code echos?
 
?php
 $value = 0;
 $curval = 'A';
 if ($value == $curval) {
  echo WTH, Overbr;
 }
?
$value = 0 means false.  And your comparison is false.  Try:
?php
 $value = '0';
 $curval = 'A';
 if ($value == $curval) {
   echo WTH, Overbr;
 }
# OR
 $value = 0;
 $curval = 'A';
 if ($value === $curval) {
   echo WTH, Overbr;
 }
?
?


--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] 403 not working -- apache 2 / php5 / linux

2005-01-10 Thread Jason Morehouse
Richard Lynch wrote:
Jason Morehouse wrote:
Hello.  I'm not sure if this is an apache problem or php... but
wondering if anyone has come across the same problem.
-rw---1 root root   test.html
-rw---1 root root   test.php
Trying to access test.html via a browser servers up the apache 403 error
page.  The test.php however produces:
Warning: Unknown: failed to open stream: Permission denied in Unknown on
line 0 Warning: Unknown: Failed opening '/www/test.php' for inclusion
(include_path='.:/www/php') in Unknown on line 0
Any ideas?

Apache (and the PHP Module within it) run as a specific user.
That user is not (and SHOULD NOT be) 'root'
You need to figure out what user Apache runs as.
It's set in httpd.conf by the 'User' directive.
Because Apache/PHP does not run as 'root', Apache/PHP do not have
permission to *READ* the file.
If they can't *READ* the file, they can't deliver it to the surfer.
You need to change the permissions on the file to be *READABLE* by the
'User' of Apache/PHP.
Example
chmod 644 test.html
chmod 644 test.php
However, it would probably be even *better* to chown the files to some
less-powerful user than 'root'
chown _SOME_USER_ test.html
chown _SOME_USER_ test.php
You'll *still* need them to be read-able by Apache/PHP -- But in the
unlikely event that somebody Evil manages to gain write-access to the
files, at least they won't be root-owned, which would be even *worse* than
just a normal user's files getting hacked.
You really need to read a tutorial on Unix file permsissions, and you have
*GOT* to stop making HTML and PHP files as 'root' user!
I don't need a lesson in file permissions, thanks.  Apache runs as 
nobody.  The problem isn't trying to get apache to display test.php, 
it's having it display the proper 403 error page, rather than a php 
error when it doesn't have access to a page.

Each page, test.html and test.php have the same permissions.  The html 
page gives the expected 403 error message when I try and access it 
(thats what I want).  The other, php script doesn't.  This is a security 
concern for me as it reveals paths on my system in the event a page has 
the wrong permissions.  Why does apache not server the 403 on the php 
page?  Maybe  this is better off in the apache list.

--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] 403 not working -- apache 2 / php5 / linux

2005-01-10 Thread Jason Morehouse
Jonel Rienton wrote:
man chmod, i gather you're new to linux/*nix
I don't need a lesson in file permissions, thanks.  Apache runs as 
nobody.  The problem isn't trying to get apache to display test.php, 
it's having it display the proper 403 error page, rather than a php 
error when it doesn't have access to a page.

Each page, test.html and test.php have the same permissions.  The html 
page gives the expected 403 error message when I try and access it 
(thats what I want).  The other, php script doesn't.  This is a security 
concern for me as it reveals paths on my system in the event a page has 
the wrong permissions.  Why does apache not server the 403 on the php 
page?  Maybe  this is better off in the apache list.


--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] 403 not working -- apache 2 / php5 / linux

2005-01-10 Thread Jason Morehouse
Richard Lynch wrote:
A!  Now we see the question!  Why doesn't it yield 403 like it should
First and foremost, use php.ini or httpd.conf or .htaccess to *NOT* let
PHP send error messages OF ANY KIND to the browser on a production site.
[You could also use ini_set within a script if the file in question is to
be include'd into other files.]
You should do this anyway.
Admittedly, your server still behaves not quite like you want, as *.html
yields a 403 response, and *.php yields a 200 response, and a page of no
content.  But at least the Bad Guys don't see your server internals.
I don't think there's any way you can configure Apache to pre-empt the PHP
trying to read the file -- though I presume Apache *could* be altered to
behave that way...  Except it would be rather difficult for Apache to
'know' a priori what User PHP runs as, given suexec, CGI setups, etc...
Depending on your application, you might be able to wrap all the access
to files through a known good PHP file, and then use PHP error handling
(http://php.net/set_error_handler) to determine if this error occurred,
and then send a 403 header.
Probably an Apache list would be better suited to knowing for sure any way
around this...  You could maybe tweak the PHP source to detect this
condition and send 403 instead of trying to include() the file, which is
what it seems to be doing.
Yeah, thanks all.  I usually have error logging off, but enabled it from 
time to time when hunting down bugs (and forget to add it back).

Anyway, I guess I'll have to deal with just blank pages coming up in the 
event of a .php 403... not a big deal really, I just prefer constancy.

I still don't really get why apache hands parsing off to php when it 
knows it doesn't have read access to the file, but I'll save that for 
another list!

Thanks again.
-J
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mysql sessions vs flat file?

2004-12-17 Thread Jason Morehouse
Hello all,
Has anyone had an experience with storing sessions in mysql (or sqlite)? 
 If so, what if any are the performance benefits?  Obviously, there 
would have to be an extra db query per page... but would that be faster 
then opening a text file?

Also, I was trying to post to the php news server, but my messages 
weren't showing up.  Is it read only?  Or just slow?

Cheers,
-J
--
 Vendorama
 http://www.vendorama.com
 The evolution of e-commerce
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] nntp://news.php.net -- read only?

2004-12-17 Thread Jason Morehouse
Sorry for the lame question... but I prefer to read and reply to 
messages via the news server.  However, I can't seem to post to 
news.php.net.  I'm using thunderbird, and have tried a few different 
outgoing servers, including news.php.net.  Is the news server read only? 
 I thought for sure I was able to reply on it some time ago

Thanks,
-J
--
 Vendorama
 http://www.vendorama.com
 The evolution of e-commerce
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Curl cookies

2004-05-09 Thread Jason Morehouse
Has anyone tried using curl to fetch a web page and cookies?


?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, 'http://www.php.net');
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR,'cookie.txt');
curl_setopt ($ch, CURLOPT_COOKIE,1);
$content = curl_exec ($ch);
curl_close ($ch);
$cookie = file_get_contents('cookie.txt');
print $cookie;
?


This works fine, and the cookie gets stored in the cookie.txt file, but it
only ever returns 1 cookie.  There should be 2 for php.net.  Same with
pretty much any other site.  Are there any configuration items I'm missing
for the cookie jar?


--
Jason Morehouse ([EMAIL PROTECTED])
Netconcepts LTD - Auckland, New Zealand
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php.net bug system

2002-10-08 Thread Jason Morehouse

Anyone know if the source is available for the bug system use on php.net?

-- 
 Jason Morehouse (jm[ät]netconcepts[döt]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




[PHP] PDF to PHP (code)

2002-10-07 Thread Jason Morehouse

Hi all,

I've got a pretty detailed PDF that I need to dynamically re-create with
PHP / pdflib.  Before I sit around for endless hours inputing x, y, fonts and line
coordinates, is there *any* tool that can help automate this?

Basically, the miracle I'm looking for would take a PDF file, and export
it to PHP code that can reproduce it -- or something along that line.

Thanks in Advance!
-J

-- 
 Jason Morehouse (jm[ät]netconcepts[döt]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: IIS 5 - ASP PHP dev enviorment

2002-10-06 Thread Jason Morehouse

If the PHP interpreter is installed, there is nothing stopping you from
using both (morals aside).

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.

On Sun, 06 Oct 2002 21:10:22 +, Jgreening wrote:

 I have done a little searching and haven't really had a good solid answer
 for my question.
 
 I mainly use ASP for development (and will continue to), but I wanted to
 dabble in a little PHP for my own curiosity. I am using IIS 5 on Win XP Pro
 for my dev machine. I have a few ASP applications going and I am looking for
 some questions as to what to expect to happen if I set up IIS 5 to also run
 PHP. Am I putting my ASP projects in harms way, buy setting up IIS to use
 ASP and PHP?
 
 Any help would be appreciated, links to information would be just fine.
 
 Thanks.


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




[PHP] Re: Error during complie of 4.2.3

2002-09-24 Thread Jason Morehouse

I had the same problem, but a `make clean` fixed things up.

On Tue, 24 Sep 2002 15:54:55 +, David Busby wrote:

 List,
   I'm trying to insstall PHP 4.2.3 on my RH73 box with Apache 2.0.40.  My 
 Configure script and my results are posted below, the error I'm getting 
 that I can't figure out is:
 
 libtool: link: warning: library `/usr/lib/libxml2.la' was moved.
 stub.lo: file not recognized: File truncated
 collect2: ld returned 1 exit status
 make[1]: *** [libphp4.la] Error 1
 make[1]: Leaving directory `/src/php-4.2.3'
 make: *** [all-recursive] Error 1
 
 Here is my configure script, can someone please help me figure this one out?
 ./configure \
--prefix=/opt/php \
--includedir=/usr/include \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-config-file-path=/opt/php \
--enable-force-cgi-redirect \
--disable-debug \
--disable-short-tags \
--enable-dbg=shared \
--with-dbg-profiler \
--enable-pic \
--disable-rpath \
--enable-inline-optimization \
--without-bz2 \
--without-db3 \
--without-curl \
--with-dom=/usr \
--with-png-dir=/usr \
--without-gd \
--disable-gd-native-ttf \
--without-ttf \
--without-gdbm \
--with-gettext \
--without-ncurses \
--without-gmp \
--with-iconv \
--without-cdpflib \
--without-mm \
--with-openssl \
--with-png \
--without-pspell \
--with-regex=system \
--with-xml \
--with-zlib \
--with-layout=GNU \
--enable-bcmath \
--enable-debugger \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-discard-path \
--enable-track-vars \
--enable-trans-sid \
--disable-yp \
--enable-wddx \
--without-oci8 \
--without-imap \
--without-imap-ssl \
--without-kerberos \
--without-ldap \
--without-mysql \
--with-pgsql=shared \
--without-snmp \
--disable-ucd-snmp-hack \
--with-unixODBC=shared \
--enable-memory-limit \
--enable-bcmath \
--enable-shmop \
--enable-versioning \
--enable-calendar \
--enable-dbx \
--enable-dio \
--enable-mcal \
--disable-mbstring \
--enable-mbstr-enc-trans \
--with-apxs2=/opt/httpd/bin/apxs;
 
 /B

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: more stress on server...

2002-09-22 Thread Jason Morehouse

You'd be hard pressed to find any difference in how the server reacts to
either.  You'll generally have better luck in some search engines if you
use example 2.  But onless you've got some strange reason hording
all of your code in one file, I can't imagine any reason why example
1 would be of any use / advantage.

On Sat, 21 Sep 2002 22:08:42 +, Matt Zur wrote:

 Here is the site and the file names:
 Test Site:
 - index.php
 - about.php
 - services.php
 
 Which example would cause more stress on the server and/or what are the 
 advantages, disadvantages to each example?
 
 Example 1
 -index.php with these links:
 a href=index.phpHome/a
 a href=index.php?view=aboutHome/a
 a href=index.php?view=servicesHome/a
 
 With the index.php using a switch statment for the view var and file 
 includes.
 
 OR
 
 Example 2
 -index.php with these links:
 a href=index.phpHome/a
 a href=about.phpHome/a
 a href=services.phpHome/a
 
 Any help will be appreciated.
 
 -Matt

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: fopen()

2002-09-19 Thread Jason Morehouse

Yup!

On Thu, 19 Sep 2002 16:43:48 -0700, Donahue Ben wrote:

 I have a php script that tries to write files in a
 particular directory.  When the script writes files
 the ownership is apache.  The problem I have is the
 particular directory that the script is trying to
 create files in, it cannot, because it does not own
 that directory and it is not part of the group.  So is
 the only way to get around this problem is by changing
 the ownership of the directory to apache?
 
 Ben
 
 __
 Do you Yahoo!?
 New DSL Internet Access from SBC  Yahoo!
 http://sbc.yahoo.com

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand
 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: inheriting default constructor behavior?

2002-09-18 Thread Jason Morehouse

Try:

function archive ($max_size = 20560, $archive_dir = ${DOCUMENT_ROOT}.'/tmp/')

On Wed, 18 Sep 2002 23:25:08 +, Monique Y. Herman wrote:

 
 My question is regarding default arguments -- is it possible to define a default
 argument that is itself a variable?
 
 I'd like to do the following:
 
 function archive ($max_size = 20560, $archive_dir = ${DOCUMENT_ROOT}/tmp/) 
 
 but I seem to get parse errors unless I do the following:
 
 function archive ($max_size = 20560, $archive_dir = /var/www/tmp/)
 
 Is it possible to do something approaching the latter?
 
 Monique Y. Herman
 [EMAIL PROTECTED]

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand

 Linux: Because rebooting is for adding hardware.


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




[PHP] Re: how to time an http request

2002-09-18 Thread Jason Morehouse

What's wrong with fopen?

On Wed, 18 Sep 2002 16:12:05 +, Lee Doolan wrote:

 
 
 is there a program which i can run in a unix environment (FreeBSD or
 redhat) which can run, say, 100 requests on a url and then report the
 total time spent on the requests?  i know that i could run curl or
 wget in a loop, but i would have to account for the fork-exec time
 somehow.  i hope that the question is clear.

-- 
 Jason Morehouse (jm[@]netconcepts[.]com)
 Netconcepts - http://www.netconcepts.com
 Auckland, New Zealand

 Linux: Because rebooting is for adding hardware.


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




[PHP] PHPSESSID on entry page only

2002-08-28 Thread Jason Morehouse

Hello,

Have a strange problem since upgrading to 4.2.2.

On a clients first visit to a site, the PHPSESSID gets written into the
URL, but not on any additional requests.

Has anyone had this problem?  It wasn't happening before the upgrade.

Running:

Redhat 7.3
PHP 4.2.2
Apache 1.3.26

php.ini reflects:

session.auto_start = 1
register_globals = On
session.use_trans_sid = 1

php_info() shows:
Session Support: Enabled
session.use_trans_sid = 1

Thanks in advance!
-Jason





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




[PHP] Continue processing after redirect?

2002-08-16 Thread Jason Morehouse

Any ideas if it's possible to keep a script running for a short time after a
client has been redireced?

i.e:
?
header(Location: http://php.net;);
# contunue running...
mail([EMAIL PROTECTED], Hey, Hi!);
?

Using Redhat Linux, Apache  PHP 4.2.2.

Much thanks!
-Jason



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




[PHP] Re: Continue processing after redirect?

2002-08-16 Thread Jason Morehouse

Sorry... that seems to work by default... what-dadda ya know!

Jason Morehouse [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Any ideas if it's possible to keep a script running for a short time after
a
 client has been redireced?

 i.e:
 ?
 header(Location: http://php.net;);
 # contunue running...
 mail([EMAIL PROTECTED], Hey, Hi!);
 ?

 Using Redhat Linux, Apache  PHP 4.2.2.

 Much thanks!
 -Jason





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




[PHP] Re: MySQL equivalent to append?

2002-07-23 Thread Jason Morehouse

update mytable set email = CONCAT(email,'[EMAIL PROTECTED]');

On Wed, 24 Jul 2002 11:00:48 +1200, Jason Morehouse wrote:

 update mytable set email = CONCAT(email,'[EMAIL PROTECTED]');
 
 On Wed, 24 Jul 2002 02:59:54 +1200, Shane wrote:
 
 Greetings, is there a mySQL syntax command equivalent to appending information to a 
text record.
 
 If I wanted to add an email value to a text record that already has an email value 
in it, is there a faster way to do this than reading the original value, combining 
the new value to it, and then running an UPDATE command?
 
 - Thanks

-- 
 Jason Morehouse (jm [@] netconcepts [.] com)
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.


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




[PHP] Re: Newbie Date question

2002-07-14 Thread Jason Morehouse

include(Calc.php); 

#http://www.phpinsider.com/php/code/Date_Calc/
#Date_Calc - a class for manipulating and comparing 
#Calendar dates, as well as formulating arrays of dates
# for traditional calendar display.

$yesterday =
Date_Calc::prevDay($day=date('d'),$month=date('m'),$year=date('Y'),$format=%m-%Y-%d);

Hope that helps.
-J

On Sun, 14 Jul 2002 23:01:07 +1200, Royw wrote:

 If:
 
 $today = date(Y-m-d);
 
 Then how to I get:
 
 $yesterday = ?
 
 Thanks!

-- 
 Jason Morehouse (jm [@] netconcepts [.] com)
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.


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




[PHP] Re: getting variables the hard way?

2002-06-18 Thread Jason Morehouse

If I get what you're saying:

?
foreach ($_POST as $name = $value) {
print $name ($value)\n;
}
?

-J

On Wed, 19 Jun 2002 08:21:55 +1200, Renaldo De Silva wrote:

 how can i get variables posted from a form without  calling then
 distinctly.
 
 i want to get the names of all the variables the form has poster
 automatically.
 can that be done and if it can how?
 
 Thanks Renaldo
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.

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




[PHP] Re: IMAP and I make... and what do I get recursion :)

2002-06-18 Thread Jason Morehouse

Do you have OpenSSL = 0.9.5 installed?

If so, try putting the install dir in the configure:

--with-ssl-imap=/usr

-J


On Wed, 19 Jun 2002 11:51:15 +1200, Php User wrote:

 At this point in the make I get this error related to --with-imap and
 --with-ssl-imap ...I believe
 
 Making all in .
 make[1]: Entering directory `/usr/lib/php-4.2.1' /bin/sh
 /usr/lib/php-4.2.1/libtool --silent --mode=link gcc  -I.
 -I/usr/lib/php-4.2.1/ -I/usr/lib/php-4.2.1/main -I/usr/lib/php-4.2.1
 -I/usr/include/apache -I/usr/lib/php-4.2.1/Zend -I/usr/include/imap
 -I/usr/libmcal/ -I/usr/lib/php-4.2.1/ext/mysql/libmysql
 -I/usr/lib/php-4.2.1/ext/xml/expat  -DLINUX=22 -DDEV_RANDOM=/dev/random
 -DEAPI -DEAPI_MM -I/usr/lib/php-4.2.1/TSRM -g -O2 -prefer-pic   -o
 libphp4.la -rpath /usr/lib/php-4.2.1/libs -avoid-version
 -L/usr/bin/openssl/lib -L/usr/libmcal/ -R /usr/bin/openssl/lib -R
 /usr/libmcal/ stub.lo  Zend/libZend.la sapi/apache/libsapi.la
 main/libmain.la regex/libregex.la
 /usr/lib/php-4.2.1/ext/ctype/libctype.la
 /usr/lib/php-4.2.1/ext/ftp/libftp.la
 /usr/lib/php-4.2.1/ext/gettext/libgettext.la
 /usr/lib/php-4.2.1/ext/imap/libimap.la
 /usr/lib/php-4.2.1/ext/mcal/libmcal.la
 /usr/lib/php-4.2.1/ext/mysql/libmysql.la
 /usr/lib/php-4.2.1/ext/pcre/libpcre.la
 /usr/lib/php-4.2.1/ext/posix/libposix.la
 /usr/lib/php-4.2.1/ext/session/libsession.la
 /usr/lib/php-4.2.1/ext/standard/libstandard.la
 /usr/lib/php-4.2.1/ext/xml/libxml.la TSRM/libtsrm.la -lmcal -lcrypto
 -lssl -lc-client -lcrypt -lintl -lcrypt -lresolv -lm -ldl -lnsl -lresolv
 -lcrypt -ldl make[1]: Leaving directory `/usr/lib/php-4.2.1'
 
 I received this error message--
 
 /usr/bin/ld: cannot find -lcrypto
 collect2: ld returned 1 exit status
 make[1]: *** [libphp4.la] Error 1
 make: *** [all-recursive] Error 1
 
 Mandrake 8.2 PPC
 Had to compile own php for use with horde's imp also this is DSO
 configure. I hope someone thinks this is a simple question. ...with a
 simple answere...
 
 Thank You,
 -Eric
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.

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




[PHP] Re: Determine week

2002-06-16 Thread Jason Morehouse

Date_Calc - a class for manipulating and comparing calendar dates, as well as 
formulating arrays of
dates for traditional calendar display.

http://www.phpinsider.com/php/code/Date_Calc/

Works sweet.

You'd be loking at:

?
$start = 
Date_Calc::beginOfWeek($day=$day,$month=$month,$year=$year,$format=%Y%m%d);
$end = 
Date_Calc::endOfWeek($day=$day,$month=$month,$year=$year,$format=%Y%m%d);
?

Cheers,
-J

On Sun, 16 Jun 2002 11:55:04 +1200, Rosen wrote:

 Hi,
 how can I determine dates (start  end ) in one week. I.e. 30th  week is
 between 22.07.2002 and 28.07.2002 .
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: search parse?

2002-06-15 Thread Jason Morehouse

If you use fulltext search (assuming you are using MySQL), it deals with stop
words on its own as well as some additional search logic.

http://www.mysql.com/doc/F/u/Fulltext_Search.html

-J

On Sat, 15 Jun 2002 10:19:04 +1200, Ed Lazor wrote:

 Does anyone have a good function for parsing a search string into SQL? I
 know it will depend on the name of the field and table I'm searching
 through.  Anything close will be helpful.  An example search string
 would be:
 
 beer AND pizza NOT anchovies
 
 and the resulting search string would be
 
 select ID, Title from Products where Title like '%beer%' AND Title like
 '%pizza%' AND Title NOT LIKE '%anchovies%';
 
 
 Another example search string would be:
 
 beer OR pizza AND movies
 
 Thanks! =)
 
 -Ed
 
 
 
 This message is intended for the sole use of the individual and entity
 to whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you
 are not the intended addressee, nor authorized to receive for the
 intended addressee, you are hereby notified that you may not use, copy,
 disclose or distribute to anyone the message or any information
 contained in the message.  If you have received this message in error,
 please immediately advise the sender by reply email and delete the
 message.  Thank you very much.
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Evaluation. Easy Question but I need some help

2002-06-15 Thread Jason Morehouse

input type=checbox value=1 name=check? if($_POST[check] == 1) {
print ' checked';}?

-J

On Sat, 15 Jun 2002 04:53:11 +1200, Dan McCullough wrote:

 I'm trying to evaluate form submissions.  When I return a form
 submission cause of a missing field I want the radio and checkboxes to
 reflect what the client submitted.  So if somone forgets to fill in
 their address, but has done everything else fine, I dont want them to
 have to refill out the form.
 
 So how would I in PHP say if $var == value1 then this radio button is
 checked?  And how do I do it and keeping the code compact?
 
 =
  Theres no such
 thing as a problem unless the servers are on fire!
 
 
 __ Do You Yahoo!? Yahoo!
 - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Change Password

2002-06-15 Thread Jason Morehouse

No practical way I know of w/ PHP...

Try (Perl):

http://search.cpan.org/doc/SSNODGRA/Unix-ConfigFile-0.06/PasswdFile.pm

Though I wouldn't be able to sleep at night knowing browsers had access to the passwd 
file!

Cheers,
-J

On Fri, 14 Jun 2002 10:08:56 +1200, Brian V Bonini wrote:

 Anyone know of a script that will allow a user to change their
 system/email password form the web on a UNIX system. wither PHP or Perl
 based?
 
 -B
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Creatng a PHP chatroom

2002-06-15 Thread Jason Morehouse

http://stutter.screwdriver.net is a good clean example.

-J


On Thu, 13 Jun 2002 12:02:12 +1200, Phil Powell wrote:

 I am intrested in creating a chatroom entirely in PHP involving
 streaming text.  Where can someone help me to find such a means of doing
 so?
 
 Thanx
 Phil
 http://valsignalandet.com
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Automatic color coded HTML

2002-06-05 Thread Jason Morehouse

http://www.php.net/manual/en/function.show-source.php

Cheers,
-J

On Thu, 06 Jun 2002 13:55:26 +1200, Jarrad Kabral wrote:

 Hi All,
 
 Is a command in PHP to format source code as color coded HTML?
 
 
 
 Regards
 Jarrad
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.

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




Re: [PHP] run from telnet...like PERL?

2002-06-05 Thread Jason Morehouse

Also be sure and up the execution time of the script.

?
set_time_limit(1);
?


On Thu, 06 Jun 2002 13:57:52 +1200, Miguel Cruz wrote:

 On Wed, 5 Jun 2002, Robert Packer wrote:
 I wrote a script to strip the domain from an e-mail address with PHP.
 But it will max out my lousy computer at work. The lists have about 1
 million plus addresses on them... However, a colleague wrote a very
 similar program with PERL and ran it from telnet and it went just fine.
 Can PHP be run in this fashion?
 
 Build or download the standalone binary, and then it works just like
 Perl (except that you'll want to add -q to the bangpath invocation).
 
 miguel
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.

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




[PHP] Re: email attachments and PHP

2002-06-03 Thread Jason Morehouse

Check out:

http://www.phpguru.org/mime.mail.html

Works well... some good examples included.

-J

On Tue, 04 Jun 2002 17:09:12 +1200, Brad Wright wrote:

 Hi all,
 
 I was wondering if there is a way to attach files to emails sent via a
 PHP script. I just checked the 'mail functions' chapter of the php
 manual, but it doesn't seem to mention attachments. The attached files
 will come from the same server that php is running on BTW.
 
 Thanks in advance.
 
 Brad
 
 
 Nel vino la verità, nella birra la forza, nell'acqua i bacilli
 --
 In wine there is truth, in beer there is strenght, in water there are
 bacteria
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 * Linux: Because rebooting is for adding hardware.

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




[PHP] Re: How to encode e-mail attachments, work with MIME

2002-05-19 Thread Jason Morehouse

Though I use php quite a bit for non-web scripting, for incoming e-mail
you may be better off using perl.

Check the MailTools modules @ CPAN:

http://search.cpan.org/search?dist=MailTools

Specifically at Mail::Internet
http://search.cpan.org/doc/MARKOV/MailTools-1.44/Mail/Internet.pm

Good luck,
-J

On Sun, 19 May 2002 19:33:41 +1200, Carlos Fernando Scheidecker Antunes
wrote:

 Hello all,
 
 I'm trying to write an script to fetch e-mail and save whatever
 attachments there are.
 
 Are there any articles or anywhere I can read about it?
 
 Thanks,
 
 Carlos Fernando Scheidecker Antunes
 Linux User #207984
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Why would this command just Die!

2002-05-19 Thread Jason Morehouse

To see the actual error try: or die (mysql_error()).


On Mon, 20 May 2002 10:27:20 +1200, Php Developers wrote:

 This command just dies!
 
 I have checked sql connection  ... ok the insert into line ... ok
 
 Pfft it just don't wanna work
 
 
 ?php
 
  $answers=$band, $middlename, $pot;
  $date=date (l dS of F Y h:i:s A);
  
   $sql = INSERT INTO prizeline (id, email, name, address, answers,
   date) VALUES ('', '$email', '$name', '$address', '$answers',
   '$date');
 
   echo $sql;
 
   mysql_query($sql) or die (There has been an error);
 
 
 ?
 
 
 ## Out put on page ##
 
 INSERT INTO prizeline (id, email, name, address, answers, date) VALUES
 ('', '[EMAIL PROTECTED]', 'newman', '12 Newman ave Auckland',
 'In Season, James, John', 'Monday 20th of May 2002 10:22:05 AM')There
 has been an error
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 Linux: because rebooting is for adding hardware

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




Re: [PHP] Arrays and Forms

2002-05-19 Thread Jason Morehouse

Try:

input type=text name=product[]

?
foreach ($product as $p) {
print $p;
}
?

On Mon, 20 May 2002 11:05:07 +1200, Navid Y. wrote:

 Hello Everyone,
 
 I'm having trouble sending array values through forms. Will the
 following syntax create a variable called $product['desc'] on the next
 page?
 If not, what am I doing wrong here?
 
 Note: I tried this but it didn't work! When I tried doing it without
 using an array, but rather with a regular variable, it sent through just
 fine and created a variable of the name attribute in the input tag.
 
 
 menu_add.php
 -
 form method=post action=menu_list.php input type=text
 name=product[desc] /form
 
 
 menu_list.php
 -
 echo $product['desc'];
 
 
 Result output
 -
 no output
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD - Auckland, New Zealand
 Linux: because rebooting is for adding hardware

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




[PHP] Re: How do I get rid of session id (test purposes)

2002-05-18 Thread Jason Morehouse

http://www.php.net/manual/en/function.session-destroy.php

On Sun, 19 May 2002 01:15:15 +1200, Henry wrote:

 Hello All
 
 Love Sessions! BUT
 
 how do I clear it so that when I execute session_start() again I get a
 new one? Help.
 
 I'm sure I should have RTFM more but I'm a newbie.
 
 Henry
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: Comon guys, please help.

2002-05-18 Thread Jason Morehouse

I've used both Cybercash and PayFlow.  Both work fine,  however you'll still
need a merchant account.

Cheers,
-J

On Sat, 18 May 2002 14:42:04 +1200, R wrote:

  Hi Guys,
  Special greetings to all of you who have helped me in the past.
 
  As some of you know i just bought a PHP book called Php Blackbook
  which i heard is really good.
  Anyway, In chapter 4 it talks about credit cardsand then CyberCash
 which
  is owned by verisign and payflow which too is owned by verisign. The
  book also gave me some url and RFCs to look up. I dont know if its coz
  i'm a newbie to PHP or just dumb but I just cant understand this...its
  too damn high funda for me, I know google is my pal so I went there,
  read up on differient RFCs and got even more confused!
 
  I just want to know have any of you worked on these systems? eg
  CyberCash and PayFlow?
  Does this mean that if i want to start accepting credit cards on my
  site i wont have to pay for a credit card merchant account?
 
  PLEASE HELP if you know the answer or can offer any
  suggestions,comments ANYTHING.
 
  Have a great day,
  -Ryan.
 
  /*If you see me getting beated up by the cops, put down the camera and
  come
 and help me! */
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: parsing CSV, updating MySQL table

2002-05-18 Thread Jason Morehouse

You could use mysql import / outfile:

http://www.mysql.com/doc/S/E/SELECT.html

See the section  * The SELECT ... INTO OUTFILE.

Hope that helps.
-J

On Sat, 18 May 2002 20:41:39 +1200, Justin French wrote:

 Hi,
 
 I have a client with an Excel file of products / prices / etc.  For
 arguments sake, let's keep it simple:
 
 id,title,description
 
 if they were to export this as a CSV, then it could be used to update a
 mysql table (for existing ID's), and to insert any new ID's.
 
 
 So, I guess what I'm after is a group of functions which parse a CSV
 file, and update a MySQL table to match... rather than messing around in
 a web based GUI, the client could just upload a new CSV every couple of
 days.
 
 
 I've checked out fgetcsv() etc, and I *think* i've got a picture of how
 the code would look, but before I start, I figure a set of functions
 probably already exists out there to do this... so why reinvent the
 wheel
 
 If anyone can point me to a URL, class, function, article, etc, I'd be
 pretty happy :)
 
 
 Justin French
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: textarea problem

2002-05-15 Thread Jason Morehouse

Are you using post or get?  I imagine you'd run into some limitations
using get.

On Tue, 14 May 2002 12:33:22 +1200, Enrique Vadillo wrote:

 Hi,
 
 I'm not sure if this is purely a PHP problem but here it goes:
 
 i have a form that sends text data to a PHP script, i have some textarea
 field which goes like this:
 
 TEXTAREA wrap=soft NAME=mynote ROWS=15 COLS=70/TEXTAREA
 
 everytime i POST this, $mynote is truncated to 1867 bytes, i have
 repeatedly tried to submit text 2500 bytes long but it's always
 truncated to that size -btw there is no javascript or anything in the
 middle that might modify the size- my questions is: do i have to setup
 anything special in my php.ini? i have this in my php.ini:
 
 post_max_size = 30M
 
 I have also noticed that Hotmail has no problem sending textarea input
 2500 bytes long or more using exactly the same tags.. what's wrong then?
 I use Apache 1.3.23 and PHP 4.1.1 (on RedHat 7.1)
 
 if anyone has encountered this problem b4, i'd appreciate some help.
 
 Enrique-
 
 
 
 _ Únase
 con MSN Hotmail al servicio de correo electrónico más grande del mundo.
 http://www.hotmail.com

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




Re: [PHP] How to stop site flipping?

2002-05-13 Thread Jason Morehouse

A good start is: http://www.neilgunton.com/spambot_trap/

Though it has some specific details for mod_perl, much of the information 
can be tied to php.

On Mon, 13 May 2002, David McInnis wrote:

 I have been running a newswire service since 97 and recently noticed an
 increase in the number of people flipping our site to harvest email
 addresses contained in the news releases posted on our site. (prweb.com)
 
 I am running apache and php on a linux box.  Can anyone suggest
 something that I can implement that would block users who are harvesting
 data from our site?  I do not mind legit users from using this data, but
 the flippers are chewing up my bandwidth and db resources.  
 
 I also want to be careful to not block valid search engine spiders from
 indexing our site.
 
 David McInnis
 
 
 

-- 

.--- .- ... --- -. /  -- --- .-. .  --- ..- ... .

 Jason Morehouse
 [EMAIL PROTECTED]
 
 Netconcepts LTD
 Auckland, New Zealand

 - Linux: free your mind and your OS will follow


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




Re: [PHP] Apache rewrite engine and $REQUEST_URI

2002-05-12 Thread Jason Morehouse

$SCRIPT_URI works sweet.

-J

On Fri, 10 May 2002 02:47:39 +1200, Peterv wrote:

 Hi,
 I'm using apache rewrite and I need to get the URL that I see in the
 browser. When using $REQUEST_URI I get the page where the rewrite is
 being redirected to. How can I get my hands on the actual URL that I see
 in the browser?
 
 Thanks for any hints. I haven't coded for a while and am a bit out of
 it... Peter
 
--
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand
 * Linux: because rebooting is for adding hardware.

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




[PHP] Re: preg_grep Help (Regular expresion)

2002-05-12 Thread Jason Morehouse

$file needs to be an array:

$file = file(myfile.txt);

On Sun, 12 May 2002 12:56:08 +1200, Brian C. Doyle wrote:

 Hello all,
 
 I have a file that has ip address in it.. I need to pull those ip
 addresses out.
 Currently I am trying:
 
 $ips=preg_grep(/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/,$file);
 print_r(array_values ($ips));
 
 And well i am getting nothing!
 
 Anyone?
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])  
 Netconcepts LTD, Auckland, New Zealand
 - Linux: because rebooting is for adding hardware.

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




Re: [PHP] MySQL and RH 7.2

2002-05-12 Thread Jason Morehouse

Check to see that you have the mysql client package installed:

`rpm -q MySQL-client`

If not, grab it!
-J

On Sun, 12 May 2002, Chris Hewitt wrote:

 Todd,
 
 /usr/bin/mysqladmin
 
 HTH
 Chris
 
 Todd Cary wrote:
 
 I tried locate and find and both come up empty for mysqladmin.
 
 Am I missing something stupid here?
 
 Todd
 
 --
 Todd Cary
 Ariste Software
 2200 D Street Extension
 Petaluma, CA 94952
 707-773-4523
 [EMAIL PROTECTED]
 
 
 
 
 
 
 

-- 

.--- .- ... --- -. /  -- --- .-. .  --- ..- ... .

 Jason Morehouse
 [EMAIL PROTECTED]
 
 Netconcepts LTD
 Auckland, New Zealand

 - Linux: free your mind and your OS will follow


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