php-general Digest 13 Nov 2008 19:50:09 - Issue 5788
Topics (messages 283237 through 283264):
Re: Recursive Static Method
283237 by: Yeti
283240 by: Dan
283259 by: ceo.l-i-e.com
how to implement search on site
283238 by: Jignesh Thummar
283239 by:
I have site of around 25 pages (pure HTML pages). I want to implement search
functionality? How can I? i want to avoid database. And Apache Lucene, i
dont't want to use it. Does any PHP framework provide search and indexing
functionality (Exception Zend_Lucene)?
Thanks,
Jignesh
I have site of around 25 pages (pure HTML pages). I want to implement search
functionality? How can I? i want to avoid database. And Apache Lucene, i
dont't want to use it. Does any PHP framework provide search and indexing
functionality (Exception Zend_Lucene)?
Why avoid Zend_Lucene? You
Craige - In short, yes you can recursively call a static method. The
following code, for example, will work fine:
?php
myClass::myStaticRecursiveMethod(0);
class myClass
{
public static function myStaticRecursiveMethod($x)
{
print $x++;
if($x 10)
{
self::myStaticRecursiveMethod($x);
}
}
}
?
Zend_Lucene require lots of efforts? If i have to use DB? how can i do it?
- Jignesh
On Thu, Nov 13, 2008 at 9:30 AM, Richard Heyes [EMAIL PROTECTED] wrote:
I have site of around 25 pages (pure HTML pages). I want to implement
search
functionality? How can I? i want to avoid database. And
Zend_Lucene require lots of efforts?
Well like everything in life to get good results will mean you will
have to put some time in. But by no means an innordinate amount (I
would imagine). If you did then the Zend Framework wouldn't be so
good.
If i have to use DB? how can i do it?
Zend_Lucene
[EMAIL PROTECTED] wrote:
So, that error message about a missing DLL, when it's really a sub DLL
that is missing...
Is that something in PHP source that could be fixed to specify WHICH dll
is really missing?
Or is that just Windows being stupid?
Mr. Spock has calculated that a quick
Following the previous messages, my situation resumes in something like
this. The Extension must be properly installed because the file appears in
the correct path, so it must be something missing in the apache
configuration file ('httpd.conf') or in the php inicialization file
('php.ini'). Could
Suppose I have two tables Contracts and Clients that are connected using
ClientId field.
This is a stripped sample code that doesn't work:
?php
function getClientFullName($id,$dbh){
$query = SELECT * FROM Clients WHERE Id=.$id;
$sthr = $dbh-query($query);
$res =
Thanks Richard.
I have to try Zend_Lucene.
- Jignesh
On Thu, Nov 13, 2008 at 10:17 AM, Richard Heyes [EMAIL PROTECTED] wrote:
Zend_Lucene require lots of efforts?
Well like everything in life to get good results will mean you will
have to put some time in. But by no means an innordinate
What do you mean with 'stops working'?
Also, have you created a test-script that only contains (what you think is)
the core-problem? If so, can you paste it here? And if not, i advise you to
make one, so you can exclude that other factors play a role here.
Thodoris wrote:
Hi list,
I am
Hi list,
I am developing something using PDO and I've noticed something weird
that I want to share with you. I am creating a database handler in a
script and I pass the handler to many functions I use in order to avoid
creating a new connection into the function itself. Although this works
-Original Message-
From: Jignesh Thummar [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 6:07 AM
To: Richard Heyes
Cc: PHP-General List
Subject: Re: [PHP] how to implement search on site
Thanks Richard.
I have to try Zend_Lucene.
- Jignesh
On Thu, Nov 13, 2008
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 6:10 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Missing DLLs
[EMAIL PROTECTED] wrote:
So, that error message about a missing DLL, when it's really a sub
DLL
that is
What do you mean with 'stops working'?
Also, have you created a test-script that only contains (what you think is)
the core-problem? If so, can you paste it here? And if not, i advise you to
make one, so you can exclude that other factors play a role here.
Thodoris wrote:
Hi list,
I
Following the previous messages, my situation resumes in something like
this. The Extension must be properly installed because the file appears in
the correct path, so it must be something missing in the apache
configuration file ('httpd.conf') or in the php inicialization file
('php.ini').
I keep getting this syntax error on the following string...
syntax error unexpected T_ENCAPSED_AND_WHITESPACE expecting T_STRING or
T_VARIABLE or T_NUM_STRING
$insert = INSERT INTO release_file_upload (upl_file_name, upl_file_type,
upl_file_size, upl_date, upl_by, upl_path, release_id) VALUES
On 13 Nov 2008, at 15:28, Kyle Terry wrote:
I keep getting this syntax error on the following string...
syntax error unexpected T_ENCAPSED_AND_WHITESPACE expecting T_STRING
or
T_VARIABLE or T_NUM_STRING
$insert = INSERT INTO release_file_upload (upl_file_name,
upl_file_type,
Hi Kyle,
The line looks fine in my text editor (SciTE).
Have you checked the line above it is properly enclosed and ended?
Michael Kubler
*G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz
Kyle Terry wrote:
I keep getting this syntax error on the following string...
syntax error
try the full path like so:
extension=/usr/lib/php/extensions/no-debug-non-zts-20060613/http.so
Wishful thinking.
For reasons beyond my ken, php.ini ONLY accepts paths relative to your
extensions_dir setting.
I'd suggest the OP check their Apache and other error_logs for more
Try:
$insert = INSERT INTO release_file_upload (upl_file_name, upl_file_type,
upl_file_size, upl_date, upl_by, upl_path, release_id) VALUES ('$filename',
'{$_SESSION['upload']['type']}', '{$_SESSION['upload']['size']}', now(),
'$username', '$path', '$release_id');
2008/11/13 Kyle Terry [EMAIL
Works for me:
$ cat recurses.php ; php -q recurses.php
?php
class recurses {
static function factorial ($n) {
assert(is_int($n));
if ($n == 0) return 1;
return $n * self::factorial($n - 1);
}
}
echo 4! = ,
-Original Message-
From: Edgar da Silva (Fly2k) [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 9:39 AM
To: Kyle Terry
Cc: PHP General Mailing List
Subject: Re: [PHP] Weird Syntax Error
Try:
$insert = INSERT INTO release_file_upload (upl_file_name,
upl_file_type,
Hi Theodoris
First place I'd look is to see if the sql query was successful.
If it failed you'll get this error.
You can try a simple test
$sth = $dbh-query($sql);
if ($sth == FALSE) {
print failed;
exit;
}
Arno
Thanks for the advice but the script works in one of
Perhaps when you try to make the connection you should check the return value
and use whatever PDO error-checking methods exist to find out what went wrong,
instead of blindly going forward assuming you have a database connection when
you don't.
Ditto for any result of -query()
What you
---BeginMessage---
Hi Guys,
I found the problem. I was using the error suppression operator on my
include, and thus I could not see the syntatic error on the page.
Problem Solved,
- Craige
Yeti wrote:
Some code would be quite helpful here. But your scenario should not
make any problem.
[EMAIL PROTECTED] schreef:
try the full path like so:
extension=/usr/lib/php/extensions/no-debug-non-zts-20060613/http.so
Wishful thinking.
For reasons beyond my ken, php.ini ONLY accepts paths relative to your
extensions_dir setting.
that's funny, because very often I've been stuck in
Since i'm not obtaining any kind of response from people o first answered
me. I guess is better to talk through here.
To my first message, Micah Gersten asked me if i've placed the extension
path on 'php.ini' my answer was yes, i've tried to do that but it still
wasn't loading the extension.
Sounds like a weird question though :( what should be standard safe php
script/directory permissions under Apache.
--
Regards,
Noor Afridi
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks to all. That worked well. I just had to insert the stylesheet
link on each of a couple dozen pages, but it worked.
My pages were a little complicated and took some work - and could
probably use more but I'll deal with that as I go.
Some samples I found were very simple print
Perhaps you should try the PECL list:
[EMAIL PROTECTED]
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Rui Quelhas wrote:
Since i'm not obtaining any kind of response from people o first answered
me. I guess is better to talk through here.
To my first
Rene Veerman wrote:
i'm still trying to get my head around how the operations are done.
sometimes i see that java app re-arrange large parts of the tree, and
i wonder if it's still the same tree i'm looking at :)
omg, somebody grab the LART and give me a good spanking on the back of
my
-Original Message-
From: Rene Veerman [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 4:06 PM
To: Boyd, Todd M.
Cc: php-general@lists.php.net
Subject: Re: [PHP] building an admin tree with varying node types
Rene Veerman wrote:
i'm still trying to get my head around
Hi,
I have an excel parser I found out on the net a while ago.
It does a really great job untill now.
I need to parse out an excel file (.xls) with excel's textboxes in it,
I want to fetch the textboxes content from the .xls somehow.
I have no idea where to look out for this,
I have even
On Fri, 2008-11-14 at 00:45 +0200, Nitsan Bin-Nun wrote:
Hi,
I have an excel parser I found out on the net a while ago.
It does a really great job untill now.
I need to parse out an excel file (.xls) with excel's textboxes in it,
I want to fetch the textboxes content from the .xls somehow.
Noor Ahmed Afridi wrote:
Sounds like a weird question though :( what should be standard safe php
script/directory permissions under Apache.
I don't understand the question.
For the php scripts themselves or for stuff that the php scripts action
(eg create dirs/files) ?
It depends on the
So, I have this class which contains a method LoadIO. I was doing some
debugging as to why a condition wouldn't pass like I thought it would,
and It's starting to piss me off.
The three echo's near the bottom are not printing what it should. The
middle echo is not even printing static text.
Craige Leeder wrote:
So, I have this class which contains a method LoadIO. I was doing some
debugging as to why a condition wouldn't pass like I thought it would,
and It's starting to piss me off.
The three echo's near the bottom are not printing what it should. The
middle echo is not even
Micah Gersten wrote:
I think you meant this:
echo - $fpType - is equal to self::mciInput br /;
to be
echo - . $fpType . - is equal to . self::mciInput . br /;
And this is how you know you've been doing too much ASP, lol
Thanks Micah!
--
PHP General Mailing List (http://www.php.net/)
okay I want to pull an integer from a database called confirm_number,
add 1 and repost it back to the database
here's the code I'm using.
$queryconfirm=SELECT confirm_number from contacts ORDER BY contact DESC
LIMIT 1;
$confirmresult=$queryconfirm;
now here's the problem
I want to add 1 to
If you're just adding one, there is no reason to retrieve the data,
process it, and update it. You can just update the number.
http://dev.mysql.com/doc/refman/5.0/en/update.html
Also, you should read the MySQL manual on default values:
On Fri, 2008-11-14 at 00:52 -0600, Micah Gersten wrote:
If you're just adding one, there is no reason to retrieve the data,
process it, and update it. You can just update the number.
http://dev.mysql.com/doc/refman/5.0/en/update.html
But, the problem is that the confirm_number is a
Craige Leeder schreef:
Micah Gersten wrote:
I think you meant this:
echo - $fpType - is equal to self::mciInput br /;
to be
echo - . $fpType . - is equal to . self::mciInput . br /;
And this is how you know you've been doing too much ASP, lol
yeah, I'm with Indiana Jones when it
It is binary file, saved from office 2003.
There is no way of changing the office version (so I can save it as .xml of
something) so I have to figure out how to parse these textboxes.
Nitsan
On 11/14/08, Ashley Sheridan [EMAIL PROTECTED] wrote:
On Fri, 2008-11-14 at 00:45 +0200, Nitsan Bin-Nun
Michael S. Dunsavage schreef:
okay I want to pull an integer from a database called confirm_number,
add 1 and repost it back to the database
here's the code I'm using.
$queryconfirm=SELECT confirm_number from contacts ORDER BY contact DESC
LIMIT 1;
$confirmresult=$queryconfirm;
45 matches
Mail list logo