[PHP] Oracle persistent connection limit

2002-07-23 Thread Eric Thelin

Is there a way to limit the total number of persistent connection to an
oracle database?  I know this functionality exists for MySQL through a
setting in the php.ini but I haven't found it for oracle.  I am in an
environment where we have about 10 users that connect to oracle from
each of 10 webservers that each have about 20 apache processes and I
would like to use persistent connections but the resulting 2000
connections would overwhelm oracle.  I am looking at reducing the number
of users but that will be a large undertaking to go through the entire
codebase.  Any ideas?

Eric


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




Re: [PHP] Oracle persistent connection limit

2002-07-23 Thread Eric Thelin

That is what I figured.  The problem is that oracle doesn't even seem to
have per-process limits.

Eric

On Tue, 23 Jul 2002, Thies C. Arntzen wrote:

 On Tue, Jul 23, 2002 at 11:00:43AM -0700, Eric Thelin wrote:
  Is there a way to limit the total number of persistent connection to an
  oracle database?  I know this functionality exists for MySQL through a
  setting in the php.ini but I haven't found it for oracle.  I am in an
  environment where we have about 10 users that connect to oracle from
  each of 10 webservers that each have about 20 apache processes and I
  would like to use persistent connections but the resulting 2000
  connections would overwhelm oracle.  I am looking at reducing the number
  of users but that will be a large undertaking to go through the entire
  codebase.  Any ideas?

 even the mysql-limits are _per_ apache-process. so if you
 want to limit the simutainious connections to any php
 supported database is to set MaxClients (in httpd.conf) or
 disable persistent connections completely.

 re,
 tc



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




[PHP] Re: alphabetizing titles when first word begins with 'The','A',etc.

2002-04-12 Thread Eric Thelin

It could be done with MySQL itself by either adding a sort_title field
that you make those changes to, by selecting the data into a temporary
table then performing the appropriate updates before selecting it
ordered properly, or by some crazy complex combinations of the if,
index, and substr functions (all multiple times in one query).  The last
idea is probably the worst and an crazy hack but even that could work.
In reality I would think for a reasonably small result set you would be
better off simply doing the sorting in PHP where you can define your own
sort functions (usort and friends) that will do whatever you want.


On Wed, 12 Apr 2000, Steph wrote:

 Hi. Im using MySQL and as part of my tables I have titles (of stories). My
 question os in regards to outputing those titles. Some of the titles begin
 with words such as 'The', 'A', 'An', etc. Is there a way to order these
 particular titles based on the second word in the title??

 ~Steph





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




[PHP] Re: some kind of library loader

2002-04-05 Thread Eric Thelin

I have had a similar idea.  I also tried the custom error handler
aproach and it didn't work here either.  I have set the project aside
that I was thinking about it for but I do have some ideas that would
help and may be able to contribute.  I wasn't even able to get php to
call my custom error handler for function not found errors.  How did you
do that?  Was there anything useful in the context argument?  My guess
is that to get this aproach to work would require hacking the code to
php itself but the hack wouldn't be very major.  However I do have an
alternate plan that has been waiting for me to get around to building it
is a simple parser that will read a php file and get the required
functions and classes and then pre build a library file for just that
page.  The parsing shouldn't be that dificult as all function calls
begin with 'func(' and for classes checking for 'new classname' or
'classname::' would give me a list of all items that need to be checked
for.  Then simply build (from the source) a list of all builtin php
functions and allow those and check for declarations of inline functions
and classes while parsing and remove those.  That would leave a list of
functions and classes that are external.  Then build a database of
classes and functions either as a real database or simple an index of
the files that contain each resource.  I don't think it would be too
hard.  The next step would be to make a publicly available archive of
functions and classes that fit into this index.  Or to build it into
pear.

Please keep in touch with me on this issue.  Feel free to email me off
list if you want.

Eric

On Wed, 3 Apr 2002, Arpad Tamas wrote:

 Hi Everyone!

 I have an idea, but I don't know how to realise it, if it can be at
 all.
 We have a relatively big system, with 52k lines of php code without
 much html, and many classes (1138) that depend on each other.
 And I think I don't need to say that php parses the code somewhat
 slow. That's what I'm trying to solve. I know there are code caches,
 but none of them suits all of our customers or our needs (price,
 effectiveness).
 Of course not all classes are needed on every page request, so I'm
 trying to separate them, and require them when they are really
 needed, but that's not easy with 1100 classes.

 So I thought I'd write a custom error handler, and when an unloaded
 class is created or it's static method is accessed an error would
 be triggered and I'd require it in the error handler. The only
 problem is, that after the error handler finished the main code is
 executed *after* the statement that triggered the error, so I can't
 tell php to give one more try for the previously faulty code.

 Is there any chance for this to work with some trick, or do you know
 of a better sollution for the problem?

 Thanks for your help,

   Arpi

 --
 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: mysql_db_query and the future?

2002-02-23 Thread Eric Thelin

You can add the database to your query.  Such as:

SELECT * FROM database.table WHERE stuff=other_stuff;

I am not sure what other databases support this notation but I know that
MySQL does.

Eric



On Sat, 23 Feb 2002, Thomas Seifert wrote:

 Hi folks,

 just wondering, why the mysql_db_query is being abandoned and called
 deprecated ?

 With the current implementation of the mysql_connect I have a problem
 with using 2 databases with the same username/password.
 PHP will use the same connection and so only use one of the two
 databases :-(.

 Is there any other way than always calling mysql_select_db before making
 a query?
 I was used using an abstraction layer with a class for each connection
 which used also mysql_db_query for the query so that I could use each
 class on a different database (but with the same connection parameters).

 Is there a speed penalty in using the combination of
 mysql_select_db();mysql_query ... compared against mysql_db_query?


 Thanks a lot for already reading this ;-)

 Thomas




-- 
Eric Thelin  [EMAIL PROTECTED]
   AZtechBiz.com: Where Arizona Does Tech Business


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




[PHP] Error compiling pdflib extension

2001-10-19 Thread Eric Thelin

I recently tried to recompile PHP-4.0.6 and my pdflib extension stopped
working.  I was building it in directly but the module wasn't being
listed on phpinfo() and of course the pdf functions didn't work.  So
after many attempts I decided to try another approach and build it as a
shared module.  I had a very hard time finding any documentation about
how to even compile a shared module at all but I did finally find it.  I
got it compiled but it still doesn't work.  I recieve the following
error message when I try to load it.

Warning: Invalid library (maybe not a PHP library) 'libpdf_php.so' in
/home/httpd/html/u7/lib/pdflib.inc on line 3

I tried running 'file' on the module to see if I could find any
justification for that error.  I recieved

$ file libpdf_php.so
libpdf_php.so: ELF 32-bit LSB shared object, Intel 80386, version 1
(SYSV), not stripped

I am running on Mandrake 8.1 (I tried with 8.0 as well)

I know that the module interface is working because I compiled many
other modules (same compile) and they all work.  Then I had a really
strange idea,  I went out and found an rpm for php-pdf-4.0.6 and
extracted the share module.  It worked!  So now I am really confused.  I
am up and running but at some point I will want to upgrade so I will
need find the problem.  Anyone have an idea?

Eric


-- 
Eric Thelin  [EMAIL PROTECTED]
   AZtechBiz.com: Where Arizona Does Tech Business


-- 
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]