php-general Digest 13 Nov 2008 19:50:09 -0000 Issue 5788

2008-11-13 Thread php-general-digest-help
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:

[PHP] how to implement search on site

2008-11-13 Thread Jignesh Thummar
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

Re: [PHP] how to implement search on site

2008-11-13 Thread Richard Heyes
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

Re: [PHP] Recursive Static Method

2008-11-13 Thread Dan
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); } } } ?

Re: [PHP] how to implement search on site

2008-11-13 Thread Jignesh Thummar
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

Re: [PHP] how to implement search on site

2008-11-13 Thread Richard Heyes
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

[PHP] Re: Missing DLLs

2008-11-13 Thread David Robley
[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

[PHP] PECL HTTP Extension

2008-11-13 Thread Rui Quelhas
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

RE: [PHP] Weird pdo-mysql behavior

2008-11-13 Thread Arno Kuhl
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 =

Re: [PHP] how to implement search on site

2008-11-13 Thread Jignesh Thummar
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

Re: [PHP] Weird pdo-mysql behavior

2008-11-13 Thread Martijn Korse
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

[PHP] Weird pdo-mysql behavior

2008-11-13 Thread Thodoris
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

RE: [PHP] how to implement search on site

2008-11-13 Thread Boyd, Todd M.
-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

RE: [PHP] Re: Missing DLLs

2008-11-13 Thread Boyd, Todd M.
-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

Re: [PHP] Weird pdo-mysql behavior

2008-11-13 Thread Thodoris
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

Re: [PHP] PECL HTTP Extension

2008-11-13 Thread Thodoris
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').

[PHP] Weird Syntax Error

2008-11-13 Thread Kyle Terry
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

Re: [PHP] Weird Syntax Error

2008-11-13 Thread Stut
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,

Re: [PHP] Weird Syntax Error

2008-11-13 Thread Michael Kubler
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

Re: [PHP] PECL HTTP Extension

2008-11-13 Thread ceo
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

Re: [PHP] Weird Syntax Error

2008-11-13 Thread Edgar da Silva (Fly2k)
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

Re: [PHP] Recursive Static Method

2008-11-13 Thread ceo
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! = ,

RE: [PHP] Weird Syntax Error

2008-11-13 Thread Boyd, Todd M.
-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,

Re: [PHP] Weird pdo-mysql behavior

2008-11-13 Thread Thodoris
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

RE: [PHP] Weird pdo-mysql behavior

2008-11-13 Thread ceo
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

[Fwd: Re: [PHP] Recursive Static Method]

2008-11-13 Thread Craige Leeder
---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.

Re: [PHP] PECL HTTP Extension

2008-11-13 Thread Jochem Maas
[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

[PHP] PECL HTTP Extension

2008-11-13 Thread Rui Quelhas
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.

[PHP] standard safe permissions for php scripts in web directory

2008-11-13 Thread Noor Ahmed Afridi
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

Re: [PHP] Printing Web Page

2008-11-13 Thread Patrick Moloney
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

Re: [PHP] PECL HTTP Extension

2008-11-13 Thread Micah Gersten
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

Re: [PHP] building an admin tree with varying node types

2008-11-13 Thread Rene Veerman
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

RE: [PHP] building an admin tree with varying node types

2008-11-13 Thread Boyd, Todd M.
-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

[PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Nitsan Bin-Nun
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

Re: [PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Ashley Sheridan
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.

Re: [PHP] standard safe permissions for php scripts in web directory

2008-11-13 Thread Chris
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

[PHP] Strange results

2008-11-13 Thread Craige Leeder
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.

Re: [PHP] Strange results

2008-11-13 Thread Micah Gersten
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

Re: [PHP] Strange results

2008-11-13 Thread Craige Leeder
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/)

[PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
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

Re: [PHP] mySQL query question

2008-11-13 Thread Micah Gersten
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:

Re: [PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
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

Re: [PHP] Strange results

2008-11-13 Thread Jochem Maas
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

Re: [PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Nitsan Bin-Nun
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

Re: [PHP] mySQL query question

2008-11-13 Thread Jochem Maas
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;