Re: [PHP-DB] Limiting # of connections to remote Oracle

2001-05-23 Thread John Lim

Hi Larry,

See
http://marc.theaimsgroup.com/?l=php-devm=98193543028899w=2

I would create a special web server listening at port 81 to perform Oracle
queries. Your main web servers call the port 81 server using
fopen(http://proxyserver:81/updatemail.php?params=...;); to update the
Oracle database.

There are also tools to help you create a proxy database web server at
http://php.weblogs.com/adodb_csv

Regards, John

PS: This is taken from a list of Tuning PHP and Apache tips at
http://php.weblogs.com/tuning_apache_unix

Larry Osborn [EMAIL PROTECTED] wrote in message
9eemqc$s7q$[EMAIL PROTECTED]">news:9eemqc$s7q$[EMAIL PROTECTED]...
 Greetings all,
 We are having serious issues with PHP4.0.5 using OCI8 and Apache 1.3.17.

 We have 4 webservers that handle our various needs for oracle. Each server
 has its MaxSpareServers in the httpd.conf set to 100. So that turns out to
 be 400 connections to the Oracle database.  We are not using persistent
 connections, because that makes the problem worse.  Does anyone know of a
 way to limit the number of database connections without having to turn
away
 users by limiting the number of apache processes?

 We are using php+apache+oci8 to subscribe and unsubscribe people to our
 mailing list.  We have simple select and update queries using
non-persistent
 connections.  Im not too sure what other information I would need to
 provide, Im just a webdeveloper, not a sysadmin, so please bear that in
mind
 :)

 Thanks for any help you can give me.

 Larry Osborn
 Web Developer
 Napster, Inc.





-- 
PHP Database 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-DB] Return Row count with OCI

2001-05-23 Thread Philippe Saladin

ocifetchstatement() should do the trick. It returns the number of rows.
See example at :
http://dev.nexen.net/docs/php/annotee/manuel_function.ocifetchstatement.php

Best regards,
Philippe

Worawisut Pinyoyang [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 To all PHP-db guruz!
 I'm novice on Oracle(OCI).In mysql has mysql_num_rows().
 When i try to find OCI function about num rows i see OCIRowCount().
 But in the manual told me that it cannot use with select statement.
 How can i know the number of selected row?

 Thanks in advance
 -Worawisut


 --
 PHP Database 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 Database 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-DB] Need a Quick help!!!!!!!!!!!!!!!!!!!

2001-05-23 Thread Ariunbold Gerelt-Od

But after installing OpenSSL,Php,Apache,when I give command  -
/usr/local/apachessl/bin/httpsd ,
I am suddenly informed by the folllowing error:
 Cannot load /usr/local/apachessl/libexec/apache_ssl.so into server:
/usr/local/apachessl/libexec/apache_ssl.so: cannot open shared object
file: No such file or directory .
After refrerring to that directory to find apache_ssl.so I've found the
file is not there.What can I do???
Nearly giving up . . . . .
Could anyone help me?
P.S:
(My Apache configure is -
 ./configure --prefix=/usr/local/apachessl
--activate-module=src/modules/php3/libphp3.a --enable-module=rewrite)




-- 
PHP Database 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-DB] Need help again with num rows

2001-05-23 Thread Worawisut Pinyoyang

I try to get number of row by using OCIFetchStatement() .It returns the 
number of selected rows.
But problem was still. The Statements in while loop (see my code below) was 
not execute and the word Hello don't print out. Can anyone help me please?

My Code:

?php

$num_rows=OCIFetchStatement($stmt,$result);
if ($num_rows == 0) {
$status=No Entry Found ! br\n;
}
else {
$status=Entry found $num_rows rows;
}

while (OCIFetch($stmt)) {
$id=OCIResult($stmt,ID);
$UserId=OCIResult($stmt,USERID);
$Host=OCIResult($stmt,HOST);
echo Hello;
}

?

Thank you very much
- Worawisut


-- 
PHP Database 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-DB] PHP-Javascript

2001-05-23 Thread vipin chandran

Hi,
Is there any method by which I can attach a javascript variable to a 
query string.See the following..
script language=javascript
var id;
uid = prompt(Enter your ID,Your ID);
/script
?
 print header(Location: index.php?id=.this is where I should have
the js variable uid);
?
Please solve this.
Thanx. 

vipin chandran
[EMAIL PROTECTED]


-- 
PHP Database 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-DB] PHP-Javascript

2001-05-23 Thread Beau Lebens

you are trying to use a php header to redirect... there is no need, just do
it via javscript, and keep your variables where they belong :)

script language=javascript
var id;
uid = prompt(Enter your ID,Your ID);

document.location.href = 'ndex.php?uid=' + uid;
/script

easy :)

// -Original Message-
// From: vipin chandran [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 23 May 2001 2:11 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] PHP-Javascript
// 
// 
// Hi,
// Is there any method by which I can attach a javascript variable to a 
// query string.See the following..
// script language=javascript
// var id;
// uid = prompt(Enter your ID,Your ID);
// /script
// ?
//  print header(Location: index.php?id=.this is where I should have
// the js variable uid);
// ?
// Please solve this.
// Thanx. 
// 
// vipin chandran
// [EMAIL PROTECTED]
// 
// 
// -- 
// PHP Database 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 Database 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-DB] NEW Quality Lead Services

2001-05-23 Thread Qualityleadservices_2348


Dear Fellow Network Marketer,

Recently you requested information on our Full Questionnarre Network Marketing Leads. 
Our Leads are exclusive to your opportunity. We guarantee results and have a no 
questions asked replacement policy for any bad leads.

Bottomline. Our Leads create residual income for you.

Every lead guaranteed to be a Network Marketer and to have marketing experience. What 
does this mean for you? NO DEADBEATS! 

Call today and ask how you can recieve 20 FREE quality Leads!

Lead orders sent VIA email same day recieved. NO WAITING!

Contact our offices today for the best Network Marketing Leads in the industry.


Direct Sales Line: 540-725-4071


To be removed from our mailing list please send an email to [EMAIL PROTECTED] 
with your email address in the subject.



-- 
PHP Database 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: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows

2001-05-23 Thread Thies C. Arntzen

On Tue, May 22, 2001 at 09:03:45PM +0200, snpe wrote:
 
 
 --  Forwarded Message  --
 Subject: Re: [PHP-DB] OCIFetch performance problem with more rows
 Date: Tue, 22 May 2001 21:02:42 +0200
 From: snpe [EMAIL PROTECTED]
 To: Brian S. Dunworth [EMAIL PROTECTED]
 
 
 On Tuesday 22 May 2001 20:59, you wrote:
  At 08:49 PM 5/22/01 +0200, snpe wrote:
  Hello,
   I have performance problem with OCIFetch (and OCIFetchInto, too)
   when query return more rows.Same query from sqlplus is more fastest (more
   rows is worse then less rows)
 
 Are the columns you're fetching included in an Oracle index?  Without an
  appropriate index, your SQL statement is probably doing a full table scan,
  which can be *very* time-consuming...
 
 Hello,
   Indexes aren't  problem.I use php and sqlplus with same tables.
 Sqlplus is faster.

by what amount?

-- 
PHP Database 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: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows

2001-05-23 Thread Thies C. Arntzen

On Wed, May 23, 2001 at 12:21:08PM +0200, Remigiusz Sokolowski wrote:
Hello,
 I have performance problem with OCIFetch (and OCIFetchInto, too)
 when query return more rows.Same query from sqlplus is more fastest (more
 rows is worse then less rows)
   
   Are the columns you're fetching included in an Oracle index?  Without an
appropriate index, your SQL statement is probably doing a full table scan,
which can be *very* time-consuming...
  
   Hello,
 Indexes aren't  problem.I use php and sqlplus with same tables.
   Sqlplus is faster.
  
  by what amount?
 
 May be You could try to use OCISetPrefetch - it is not documented, but
 there is short note at www.php.net from somebody about it.
 I can say, it speeds things up very much (if You wanna more than 1 row)
 Btw. anybody knows why it is not documented (I mean hidden in some
 way)

nobody has gotten around documenting it.

tc

-- 
PHP Database 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: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows

2001-05-23 Thread Adi Wibowo


On Wed, 23 May 2001, Thies C. Arntzen wrote:
I have performance problem with OCIFetch (and OCIFetchInto, too)
when query return more rows.Same query from sqlplus is more fastest (more
rows is worse then less rows)
  Indexes aren't  problem.I use php and sqlplus with same tables.
  Sqlplus is faster.

Of course SQLPlus execution *seems* tob faster. Once again ... seems ...

This is caused by different optimation approach executed by Oracle.
There are two kind of optimation :
- Rule based optimation : faster first row
- Cost based optimation : faster all row

Rule Based Optimation will give you faster FIRST ROW display. First row
will be displayed as fast as it can eventhough all necesarry process/steps
are not done yet. This is good for access via tools like SQLPlus, where
operator doesn't want to wait for a long time just to see the first row.

But this doesn't suit for some kind of operation like OLTP (Online
Transaction Processing like accessing oracle using PHP.

This is where cost based optimation take action.
CBO gives best througput using the least amount of resourcess necessary to
process all rows accessed by sql statement. It means faster time for
returning ALL rows compared with RBO.

So you see that SQLPlus give you faster result .. BUT .. only for the
first row. So it seems to be faster. But it doesn't.

Important : Eventhough oracle will use CBO as a default, but it need some
conditions to be met. Oracle Data dictionary need to have statistics about
all schema object on your database. We should collect statistics by using
DBMS_STATS package, or ANALIZYE statement. Otherwise oracle will use RBO
which is slower to return data to our PHP.

It will be better if we use document from oracle site :
Oracle 8i : Designing and Tuning for Performance.

Adi Wibowo ---
* Work matter: [EMAIL PROTECTED]
* Private matter : [EMAIL PROTECTED]
--


-- 
PHP Database 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-DB] Return Row count with OCI

2001-05-23 Thread Manuel Lemos

Hello,

Worawisut Pinyoyang wrote:
 
 To all PHP-db guruz!
 I'm novice on Oracle(OCI).In mysql has mysql_num_rows().
 When i try to find OCI function about num rows i see OCIRowCount().
 But in the manual told me that it cannot use with select statement.
 How can i know the number of selected row?

Oracle can't tell you that because it starts returning rows as it finds
them in the database so the client (PHP) starts getting query results
before reaching to the end of the search so it can't tell in advance the
number of selected rows. The alternative is to buffer all rows in array
but that's resource consuming for large result sets. A better
alternative is to issue a first query with SELECT COUNT(*) FROM tables
where conditions.

Anyway, you may want to Metabase that is a database abstraction package
that implements the first technique for the Oracle driver if you use the
MetabaseNumberOfRows function.

You may download Metabase for free from here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Manuel Lemos

-- 
PHP Database 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-DB] Help With Getting Values Please!

2001-05-23 Thread DanielW

Greetings.

I'm trying to get a value for a single cell out of a table and into a variable. I 
receive the following error message: Warning: Supplied argument is not a valid MySQL 
result resource in /home/etc

My code (abbreviated) is as follows:

$sql2 = SELECT ServiceDes FROM ServiceTypes WHERE ServiceID = $serviceid;

$service_type = mysql_result($sql2, 1);

The value in $serviceid is valid and displays fine. I'm simply trying to retrieve the 
value of ServiceDes from a different table which also has a column named serviceid, 
which is unique to the table.  

I'm very new to PHP, but I do have lots of SQL experience. I'm used to defining 
variables using indicators (ie. SELECT column INTO varname FROM tablename WHERE), 
but this didn't seem to work using PHP/MYSQL.

Thanks,

Dan



[PHP-DB] Pages not displaying?

2001-05-23 Thread BD

Have what I think is kind of a weird situation going on...

I have a survey that's dynamically built from a mysql database. The basic
logic of the program is to create a table based on user name, then read 10
questions from the master table, and insert them into the user table once
the user completes a page. The next page repeats the process, with the
additional step of checking the user table after each master table read to
make sure there are no duplicate questions being processed. Once all the
questions are read and the user completes the test, the user table is then
dropped and life goes on... (Note: I know there is probably a MUCH better
way to do this, but I was in a rush and this was my first attemp at
PHP...I'm definitely open for suggestions...)

The problem some of my users are running into is that occasionally wierd
things begin to occur, such as *some* of the questions not displaying
(there's no pattern that I've found  to which ones don't display when this
occurs, and they're all pulled from the database) while the response radio
buttons for the missing questions will display just fine... or the page
won't show up at all...  or, one page will show up, the next one won't, and
then the next one will...I've not been able to duplicate any of these at all
myself. They're platform independent - I know of a case where it occured on
a Win2000 machine and a Mac G3...

Now for the newbie questions:
Is there significant resource usage on the client side when dealing with
php/mysql?  I wouldn't think there should be any, but...

I'm not passing a lot of variables through the form, but does doing this eat
significant resources on the client side? Or, would it be better to pass all
the used question thru the form instead of creating and using the user
table?

And finally - does anyone have any idea where I should start looking?
There's nothing in any error logs that indicate any problems...

-BD-



-- 
PHP Database 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: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows

2001-05-23 Thread snpe

On Wednesday 23 May 2001 12:21, you wrote:
Hello,
 I have performance problem with OCIFetch (and OCIFetchInto,
 too) when query return more rows.Same query from sqlplus is more
 fastest (more rows is worse then less rows)
   
   Are the columns you're fetching included in an Oracle index? 
Without an appropriate index, your SQL statement is probably doing a
full table scan, which can be *very* time-consuming...
  
   Hello,
 Indexes aren't  problem.I use php and sqlplus with same tables.
   Sqlplus is faster.
 
  by what amount?

 May be You could try to use OCISetPrefetch - it is not documented, but
 there is short note at www.php.net from somebody about it.
 I can say, it speeds things up very much (if You wanna more than 1 row)
 Btw. anybody knows why it is not documented (I mean hidden in some
 way)

I try, but it is same.
OCISetPrefetch increase 'fetch memory' , but I think that is problem with 
array.Function oci_fetch have parameter 'nrows', but this is always 1 
(possible that this is TODO).

-- 
PHP Database 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: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows

2001-05-23 Thread snpe

On Wednesday 23 May 2001 13:13, Adi Wibowo wrote:
 On Wed, 23 May 2001, Thies C. Arntzen wrote:
 I have performance problem with OCIFetch (and OCIFetchInto, too)
 when query return more rows.Same query from sqlplus is more fastest
 (more rows is worse then less rows)
  
   Indexes aren't  problem.I use php and sqlplus with same tables.
   Sqlplus is faster.

 Of course SQLPlus execution *seems* tob faster. Once again ... seems ...

 This is caused by different optimation approach executed by Oracle.
 There are two kind of optimation :
 - Rule based optimation : faster first row
 - Cost based optimation : faster all row

 Rule Based Optimation will give you faster FIRST ROW display. First row
 will be displayed as fast as it can eventhough all necesarry process/steps
 are not done yet. This is good for access via tools like SQLPlus, where
 operator doesn't want to wait for a long time just to see the first row.

 But this doesn't suit for some kind of operation like OLTP (Online
 Transaction Processing like accessing oracle using PHP.

 This is where cost based optimation take action.
 CBO gives best througput using the least amount of resourcess necessary to
 process all rows accessed by sql statement. It means faster time for
 returning ALL rows compared with RBO.

 So you see that SQLPlus give you faster result .. BUT .. only for the
 first row. So it seems to be faster. But it doesn't.

 Important : Eventhough oracle will use CBO as a default, but it need some
 conditions to be met. Oracle Data dictionary need to have statistics about
 all schema object on your database. We should collect statistics by using
 DBMS_STATS package, or ANALIZYE statement. Otherwise oracle will use RBO
 which is slower to return data to our PHP.

 It will be better if we use document from oracle site :
 Oracle 8i : Designing and Tuning for Performance.


WRONG.
I use sqlplus script (not interactive) :


Script is same in PHP.Number of rows is same (4000).Optimizer is same (from 
init.ora) and sqlplus do array processing and PHP not (this is only different)
ANALYZE isn't important (I do , but this is for PHP and sqlplus)

regards
Haris Peco
[EMAIL PROTECTED]

-- 
PHP Database 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-DB] Error message

2001-05-23 Thread Anderson Sone

What it means?? I see it in a SQL Query from MSSQL 2000

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.



-- 
PHP Database 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-DB] Help With Getting Values Please!

2001-05-23 Thread Johannes Janson

Hi,

$sql2 = SELECT ServiceDes FROM ServiceTypes WHERE ServiceID = $serviceid;

put single quotes around $serviceid.

$service_type = mysql_result($sql2, 1);

I might be perpetuating the spreading of rumors but I've heard and read
somewhere
that mysql_query() is supposed to be better in the performance. Perhaps
someone
else could clear this point for me thus stopping the rumors.

Cheers
Johannes



-- 
PHP Database 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-DB] error

2001-05-23 Thread Johannes Janson

Hi,

 Warning: MySQL Connection Failed: Unknown MySQL Server Host '0f2scom' (2)
in
 /web/sites/139/gamie/www.game-boy-advance.f2s.com/addartikel.php on line
22
 Unable toconnect to database
[...snip...]
 mysql_connect(db.game-boy-advance.f2s.com,*,**) or die(Unable
 toconnect to database);

You need to specify the port 3306 like this
mysql_connect(db.domainname.f2s.com:3306, user, pass);

Johannes



-- 
PHP Database 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-DB] security in PHP under Apache

2001-05-23 Thread Simon R Jones

hi there
does anyone know how to make PHP run as a different user than the default
one (nobody i believe). I have many users with websites and would like
them to be able to run PHP under their usernames so as to ensure security.
Though I'm not sure this is possible unless I install PHP as a CGI binary
and use something like suExec (I currently have it as an Apache module, and
would like to leave it that way).

best wishes,
simon

 ---
 Studio 24 Ltd   |   tel. 01223 501 892
 PO Box 88   |   fax. 0870 063 1216
 Cambridge   |   mob. 07974 074 547
   CB4 1XH   |   www.studio24.net


-- 
PHP Database 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-DB] security in PHP under Apache

2001-05-23 Thread Jonathan Hilgeman

PHP runs via Apache, so it adopts the user that Apache uses, essentially.
You can use a program like sudo to allow them to run certain commands on the
server. 

Jonathan

-Original Message-
From: Simon R Jones [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] security in PHP under Apache


hi there
does anyone know how to make PHP run as a different user than the default
one (nobody i believe). I have many users with websites and would like
them to be able to run PHP under their usernames so as to ensure security.
Though I'm not sure this is possible unless I install PHP as a CGI binary
and use something like suExec (I currently have it as an Apache module, and
would like to leave it that way).

best wishes,
simon

 ---
 Studio 24 Ltd   |   tel. 01223 501 892
 PO Box 88   |   fax. 0870 063 1216
 Cambridge   |   mob. 07974 074 547
   CB4 1XH   |   www.studio24.net


-- 
PHP Database 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 Database 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-DB] User Permissions

2001-05-23 Thread Adv. Systems Design

Hello *:

I have to code an app that must enforce user
permissions in terms of data entry and editing (only
certain records may be edited by certain people).

I realize that each situation is unique, but does
anyone have a starting place they recommend?

TIA

Luis

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

-- 
PHP Database 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-DB] security in PHP under Apache

2001-05-23 Thread Terry Romine

But how do you set it so a webuser would run sudo? That sounds pretty 
dangerous, to me.

I have a similar situation where I want PHP to create a subdirectory and 
set privileges to it based on the login user. I end up having to create 
the directory by hand via SSH and then run the php script.

Terry

On Wednesday, May 23, 2001, at 12:36 PM, Jonathan Hilgeman wrote:

 PHP runs via Apache, so it adopts the user that Apache uses, 
 essentially.
 You can use a program like sudo to allow them to run certain commands 
 on the
 server.

 Jonathan

-- 
PHP Database 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-DB] security in PHP under Apache

2001-05-23 Thread Zak Greant

Check out suExec on the Apache website. Also, Apache 2 allows each virtual
host to run as a different user - this alleviates some security issues.

--zak

- Original Message -
From: Terry Romine [EMAIL PROTECTED]
To: Jonathan Hilgeman [EMAIL PROTECTED]
Cc: 'Simon R Jones' [EMAIL PROTECTED]; PHP-DB (E-mail)
[EMAIL PROTECTED]
Sent: Wednesday, May 23, 2001 1:12 PM
Subject: Re: [PHP-DB] security in PHP under Apache


 But how do you set it so a webuser would run sudo? That sounds pretty
 dangerous, to me.

 I have a similar situation where I want PHP to create a subdirectory and
 set privileges to it based on the login user. I end up having to create
 the directory by hand via SSH and then run the php script.

 Terry

 On Wednesday, May 23, 2001, at 12:36 PM, Jonathan Hilgeman wrote:

  PHP runs via Apache, so it adopts the user that Apache uses,
  essentially.
  You can use a program like sudo to allow them to run certain commands
  on the
  server.
 
  Jonathan

 --
 PHP Database 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 Database 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-DB] Cookie Values being Displayed

2001-05-23 Thread James McLaughlin

Does anyone know what would cause a cookie value to be printed on a web
page.
Here is my cookie code

if ($access_level == 5)


$region5 = PYou have Level 5 Access/p;
$cookie_name = acc5;
$cookie_value = true;
$cookie_expire = ;
setcookie($cookie_name, $cookie_value, $cookie_expire, /);
}


It puts the value of true on the web page if they refresh it.
IS there an error in the code there that would cause that?

Also are sessions easier to work with when assigning multiple cookie values
?

ANy help is muchly appreciated.

Kat



-- 
PHP Database 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-DB] PHP and Access

2001-05-23 Thread Terry Romine

I normally work PHP/MySQL but now I have a customer that is adamant 
about keeping their data in an Access DB. I tried to use ADODB to do 
generic access scripts, but that doesn't seem to work out for me. I get 
an unsupported function just trying to make a connection. One problem is 
that my server is running PHP3.

I have the db file; but where does it go on the server? Or does it 
matter?

Is there any simple wrapper type script that I can use to access their 
db?

Tips would be helpful or links to other solutions...

Thanks
Terry

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