Re: [PHP] MySQL Locking Question

2001-10-05 Thread Chip

Well here is the situation.

1. Jack opens record A to change an entry.
2. Jill opens record A to change an entry.
3. Jack finishes his changes and saves the data.
4. Jill finishes her changes and saves the data.

Jill just over wrote whatever Jack did.  The only method I could think of to
prevent this was to have the client check to see if the record was allready
being edited by someone.  If it is then they have to wait.   Is there
another way to do this?   What are atomic updates??



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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Rasmus Lerdorf

> 1. Jack opens record A to change an entry.
> 2. Jill opens record A to change an entry.
> 3. Jack finishes his changes and saves the data.
> 4. Jill finishes her changes and saves the data.

Well, if you only update the fields that changed then who cares?  The
fields that Jill changes are going to overwrites Jack's changes anyway.
Locking the record and having Jack finish before Jill can start isn't
going to change the end result which would be that Jill's changes are
going to overwrite Jack's.

> Jill just over wrote whatever Jack did.  The only method I could think of to
> prevent this was to have the client check to see if the record was allready
> being edited by someone.  If it is then they have to wait.   Is there
> another way to do this?   What are atomic updates??

ie. update foo set field=field+1 where id=47

An increment of the field column guaranteed to happen in one operation
such that two such increments happening concurrently will not interfere
with each other.

-Rasmus


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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Chip

> Well, if you only update the fields that changed then who cares?  The
> fields that Jill changes are going to overwrites Jack's changes anyway.
> Locking the record and having Jack finish before Jill can start isn't
> going to change the end result which would be that Jill's changes are
> going to overwrite Jack's.

The reason for this is because the data that Jack enters could potentialy
affect the data that Jill enters.

Example:  Jack is an administrator at a forum somewhere.  Jack is editing a
post that Jill entered to remove inapropriate content.  Meanwhile Jill is
editing the same post to revise what she said seeing that it could be
mistaken for being inappropriate.  Jack saves, Jill Saves...Jacks stuff is
lost.

OK that example is poor I admit...but do you see the reasoning behind
locking?  If a lock was in place Jill would't be able to edit her post
because she would get a message stating that Admin Jack was allready editing
it.



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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Rasmus Lerdorf

> OK that example is poor I admit...but do you see the reasoning behind
> locking?  If a lock was in place Jill would't be able to edit her post
> because she would get a message stating that Admin Jack was allready editing
> it.

GET_LOCK has no way of conveying that information.  You would need to use
a completely different mechanism to identify who is holding a lock.

How are you going to avoid deadlock?

-Rasmus


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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Chip

Hmmm...that is true
It would still prevent Jill from editing.  I'll probably add a locked_by
field to convey the user info.

For Dead Locks:

A.  Browser Closed Before Finishing Edit:
 From what I have read Get_Lock locks are automatically released
when connections terminate.  I'm new to this so am unsure if MySQL will
terminate the connection when the browser is closed.  If not does MySQL
disconnect users after a certain time?  And is this a configurable option?

B.  User goes to lunch before hitting Submit
I was thinking of putting a timout feature in the browser so that
after say  5 minutes a prompt asking the user that has the record locked if
he is still working or wants to cancel.  This popup would have 20 seconds or
so before cancel was automatically selected and the lock is released.

C.  User types in www.something.com and leaves the editing page in limbo:
I have no idea what to do in this situation.  If MySQL can be
configured to boot a user after so may minutes of activity then that is the
solution.  As with possibility A I am unsure.

Sound Feasable?


Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > OK that example is poor I admit...but do you see the reasoning behind
> > locking?  If a lock was in place Jill would't be able to edit her post
> > because she would get a message stating that Admin Jack was allready
editing
> > it.
>
> GET_LOCK has no way of conveying that information.  You would need to use
> a completely different mechanism to identify who is holding a lock.
>
> How are you going to avoid deadlock?
>
> -Rasmus
>



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




[PHP] mssql & freetds & php4 & linux

2001-10-05 Thread Christopher William Wesley

I'm running php 4.0.6.7rc2-3 with freetds 0.52-3 support on a debian linux
server.  This is a winning combination to work with MSSQL2000.  However
I'm running into some odd behavior when performing multiple queries on the
same connection (link) identifier.

I create a connection to the dbms and select a database.  Then I perform
an insert.
[ $CN01 = mssql_connect('host','uname','passwd');
  mssql_select_db('mydb',$CN01);
  $RS01 = mssql_query("insert into foo values ('bar1','bar2')", $CN01); ]

I folllow this operation by a select on table 'foo'.
[ $RS02 = mssql_query("select * from foo", $CN01); ]

This second query is never successful.  It appears that the link ($CN01)
is destroyed after the first query (the insert).  When I print $CN01
before the first query, it's value is "Resource id #1" but when I print
$CN01 after that query and before the second query, it is null.

I can successfully perform the second query by opening a new connection to
the dbms and using it for the second query.  ALSO, I can successfully
perform the queries in reverse order, select first then insert, without
using a new connection.  (A bit more experimentation shows I don't have
this problem with mod_perl.)  I've also tried this with the sybase_*()
functions, and I get the same results.

Is there any reason why I must open a new connection to perform a select
after performing an insert on an mssql2K table [using php]?

THX,
~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden


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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Rasmus Lerdorf

> A.  Browser Closed Before Finishing Edit:
>  From what I have read Get_Lock locks are automatically released
> when connections terminate.  I'm new to this so am unsure if MySQL will
> terminate the connection when the browser is closed.  If not does MySQL
> disconnect users after a certain time?  And is this a configurable option?

No, a mysql connection is server side and has absolutely nothing to do
with what the user does with their browser client-side.  You can't make a
mysql connection close when someone closes their browser.  And no, MySQL
does not disconnect users after a certain time.

> B.  User goes to lunch before hitting Submit
> I was thinking of putting a timout feature in the browser so that
> after say  5 minutes a prompt asking the user that has the record locked if
> he is still working or wants to cancel.  This popup would have 20 seconds or
> so before cancel was automatically selected and the lock is released.
>
> C.  User types in www.something.com and leaves the editing page in limbo:
> I have no idea what to do in this situation.  If MySQL can be
> configured to boot a user after so may minutes of activity then that is the
> solution.  As with possibility A I am unsure.
>
> Sound Feasable?

No, I see all sorts of problems with this.  Personally I would put the
check at the commit stage.  Maintain a record modification counter.  Right
before committing the changes check to see if that counter has changed, if
it has warn the user that the record was changed out from underneath
him/her and put the edit form back up with the changes.

-Rasmus


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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Chip

So once a user logs into a MySQL Server via PHP, if they don't logout, they
stay logged in forever???


Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > A.  Browser Closed Before Finishing Edit:
> >  From what I have read Get_Lock locks are automatically
released
> > when connections terminate.  I'm new to this so am unsure if MySQL will
> > terminate the connection when the browser is closed.  If not does MySQL
> > disconnect users after a certain time?  And is this a configurable
option?
>
> No, a mysql connection is server side and has absolutely nothing to do
> with what the user does with their browser client-side.  You can't make a
> mysql connection close when someone closes their browser.  And no, MySQL
> does not disconnect users after a certain time.
>
> > B.  User goes to lunch before hitting Submit
> > I was thinking of putting a timout feature in the browser so
that
> > after say  5 minutes a prompt asking the user that has the record locked
if
> > he is still working or wants to cancel.  This popup would have 20
seconds or
> > so before cancel was automatically selected and the lock is released.
> >
> > C.  User types in www.something.com and leaves the editing page in
limbo:
> > I have no idea what to do in this situation.  If MySQL can be
> > configured to boot a user after so may minutes of activity then that is
the
> > solution.  As with possibility A I am unsure.
> >
> > Sound Feasable?
>
> No, I see all sorts of problems with this.  Personally I would put the
> check at the commit stage.  Maintain a record modification counter.  Right
> before committing the changes check to see if that counter has changed, if
> it has warn the user that the record was changed out from underneath
> him/her and put the edit form back up with the changes.
>
> -Rasmus
>



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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Rasmus Lerdorf

> So once a user logs into a MySQL Server via PHP, if they don't logout, they
> stay logged in forever???

Depends how you write your application.  If you are using persistent
connections you log in and out of mysql durig a single request.  If you
use persistent connections you log in once and leave the connection up
until the httpd process it is asscoiated with terminates.  Your Apache
settings define how long an httpd process will live.

-Rasmus


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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Don Read


On 06-Oct-2001 Chip wrote:
>> Well, if you only update the fields that changed then who cares?  The
>> fields that Jill changes are going to overwrites Jack's changes anyway.
>> Locking the record and having Jack finish before Jill can start isn't
>> going to change the end result which would be that Jill's changes are
>> going to overwrite Jack's.
> 
> The reason for this is because the data that Jack enters could potentialy
> affect the data that Jill enters.
> 
> Example:  Jack is an administrator at a forum somewhere.  Jack is editing a
> post that Jill entered to remove inapropriate content.  Meanwhile Jill is
> editing the same post to revise what she said seeing that it could be
> mistaken for being inappropriate.  Jack saves, Jill Saves...Jacks stuff is
> lost.
> 
> OK that example is poor I admit...but do you see the reasoning behind
> locking?  If a lock was in place Jill would't be able to edit her post
> because she would get a message stating that Admin Jack was allready editing
> it.
> 

You can add a timestamp to the table 
mysql> ALTER TABLEda_table ADD ts TIMESTAMPNOT NULL AFTER id;

Add the timestamp to the update criterion; Re-do the form if it 
doesen't match:

if (isset($do_update) {
 
$qry= "updateda_table set foo='$foo' where id='$id' and ts='$ts'";
$res=mysql_query($qry);
$cnt= mysql_affected_rows($res);

if ($cnt == 0 ) {
printf('Record is stale';
} else {
echo 'Record updated';
} 
}

$qry= "select ts,foo from da_table where id='$id'";
$res=mysql_query($qry);
$row = mysql_fetch_object($res);

printf('', $PHP_SELF);

echo "";
echo "ts>";
echo "foo>";

echo '';


Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It is necessary for me to learn from others' mistakes. I 
   will not live long enough to make them all by myself.

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




Re: [PHP] MySQL Locking Question

2001-10-05 Thread Mark

I don't think get_lock will work here anyway since the only way to
use it is with persistent connections, and there's no guarantee the
person will get the same connection with the second request, he
probably won't. without persistent connections the lock will die when
the script finishes.

On Fri, 5 Oct 2001 18:48:53 -0700 (PDT), Rasmus Lerdorf wrote:
>> A.  Browser Closed Before Finishing Edit:
>>   From what I have read Get_Lock locks are
>>automatically released
>> when connections terminate.  I'm new to this so am unsure if MySQL
>>will
>> terminate the connection when the browser is closed.  If not does
>>MySQL
>> disconnect users after a certain time?  And is this a configurable
>>option?
>
>No, a mysql connection is server side and has absolutely nothing to
>do
>with what the user does with their browser client-side.  You can't
>make a
>mysql connection close when someone closes their browser.  And no,
>MySQL
>does not disconnect users after a certain time.
>
>> B.  User goes to lunch before hitting Submit
>> I was thinking of putting a timout feature in the browser
>>so that
>> after say  5 minutes a prompt asking the user that has the record
>>locked if
>> he is still working or wants to cancel.  This popup would have 20
>>seconds or
>> so before cancel was automatically selected and the lock is
>>released.
>>
>> C.  User types in www.something.com and leaves the editing page in
>>limbo:
>> I have no idea what to do in this situation.  If MySQL can
>>be
>> configured to boot a user after so may minutes of activity then
>>that is the
>> solution.  As with possibility A I am unsure.
>>
>> Sound Feasable?
>
>No, I see all sorts of problems with this.  Personally I would put
>the
>check at the commit stage.  Maintain a record modification counter.
>Right
>before committing the changes check to see if that counter has
>changed, if
>it has warn the user that the record was changed out from underneath
>him/her and put the edit form back up with the changes.
>
>-Rasmus
>
>


--
Mark, [EMAIL PROTECTED] on 10/04/2001



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




[PHP] FYI = ( Single_Concatenated_Q*2<=Double_Parsed_Q*2 );

2001-10-05 Thread Maxim Maletsky


Hello everyone,

Knowing how much most of you like using double quotes I though to test
it a bit.
I was writing an article for PHPBeginner.com and made this interesting
proven conclusion:

Concatenating single quotes is faster unless you concatenate them more
than two.
Then game changes into the double quotes side.

Sure, this is a miserable difference when doing a few print()s, but when
you loop a lot it DOES change the game.

Hope this was interesting to someone.



Here's the code I was playing with.

start();
for($i=0; $i<$limit; $i++) {
$var .= 'this is the '.$what.' of concatenation '.$i.' in the
strings';
}
$singe_escape->stop();


$var = '';
$double_escape->start();
for($i=0; $i<$limit; $i++) {
$var .= "this is the ".$what." of concatenation ".$i." in the
strings";
}
$double_escape->stop();


$var = '';
$double_no_escape->start();
for($i=0; $i<$limit; $i++) {
$var .= "this is the $what of concatenation $i in the strings";
}
$double_no_escape->stop();


$var = '';
$double_curly_escape->start();
for($i=0; $i<$limit; $i++) {
$var .= "this is the {$what} of concatenation {$i} in the
strings";
}
$double_curly_escape->stop();


echo 'singe_escape '.$singe_escape->elapsed().'';
echo 'double_escape '.$double_escape->elapsed().'';
echo 'double_no_escape '.$double_no_escape->elapsed().'';
echo 'double_curly_escape
'.$double_curly_escape->elapsed().'';

?>



Maxim Maletsky
www.PHPBeginner.com


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




[PHP] Easy Question

2001-10-05 Thread Chip

When you write a php script to access a database,edit records, etc., is the
entire thing 1 giant PHP page or a bunch of different ones?  If it can be
written both ways, which is the better way to do it?



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




RE: [PHP] Easy Question

2001-10-05 Thread Maxim Maletsky \(PHPBeginner.com\)


> When you write a php script to access a database,edit 
> records, etc., is the entire thing 1 giant PHP page or a 
> bunch of different ones?  

A giant one

If it can be written both ways, 
> which is the better way to do it?

Depends how big is your 'giant'.

It is all about your coding style, but it is advisable not getting over
500 lines - saves you a lot of developing time.
However, too many (7, 10, more) includes will become noticeable.

Not all is said by this, there are so many reasons why use this or that,
but generally it is up to your own coding style.


Maxim Maletsky
www.PHPBeginner.com


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




RE: [PHP] Easy Question

2001-10-05 Thread Richard Heyes

> When you write a php script to access a database,edit records,
> etc., is the
> entire thing 1 giant PHP page or a bunch of different ones?  If it can be
> written both ways, which is the better way to do it?

Using seperate files eases code maintenance and prevents parsing of
redundant code.

--
Richard Heyes
"I know not with what weapons World War III will be fought, but World War IV
will be fought with sticks and stones." - Albert Einstein


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




RE: [PHP] Easy Question

2001-10-05 Thread Don Read


On 06-Oct-2001 Chip wrote:
> When you write a php script to access a database,edit records, etc., is the
> entire thing 1 giant PHP page or a bunch of different ones?  If it can be
> written both ways, which is the better way to do it?
> 

I tend to write based on function:

userland.php
adminland.php
whatever ...

then include() the bits where the $vars indicate:

if ($do_detail) 
include('detail.php');

And, of course, underneath is the common thingys:
require(class.html.php);
require(class.forms.php);
require(libsql.php);

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It is necessary for me to learn from others' mistakes. I 
   will not live long enough to make them all by myself.

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




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Mukul Sabharwal

http://www.paphe.com/php/tutorials/230101.php

an encryption class

=
*
Know more about me:
http://www.geocities.com/mimodit
*

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




Re: [PHP] Easy Question

2001-10-05 Thread Joel Ricker

My Database functions are all wrapped up in an easy to use class.  The
methods look something like this:

$db = new DB;
$q = "SELECT * FROM ATable";
$db->query($q);
while ($db->next_record()) {
 $db->p("SomethingOrOther");
}

For the PHP script itself, the content management system I wrote up uses
case statements in a single file engine and multple includes.

for example:

switch($func) {
case("news"):
 include("/news/news.inc");
 break;
}

and news.inc may contain:

switch($task) {
case("add"):
include("/news/news.add.inc");
   break;
case("del"):
include("/news/news.del.inc");
   break;
   default:
   include("/news/news.view.inc");
}

and then each would contain the actual code.  It worked really well for a
couple of reasons.  For starts all the includes started as requires for
testing purposes.  If I edited several files but maybe didn't test them all,
it'll will kick out any parse errors or warnings -- also useful since I've
got another person working with me.  Then when the site went live, I changed
them to includes (well actually had to change a bunch of them part way
through when I ran out of memory *s*).

Also the code is very modular.  I know what each file does and so does my
partner who isn't a php programmer but may need to edit the HTML portions a
little. Each file is clearly named as its its funciton so he knows where to
look if there is a problem with a pages appearance.

Joel



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




[PHP] First? or Last?

2001-10-05 Thread bestbiz4u

Dear Friend, 

Are you looking for your first Internet business...or your last? 

If it's your first, I bet you'd like it to be your last! Your last 
would be the one that allows you to achieve your full time 
income on a part time basis, is stable, will be there for your 
heirs, and give you the lifestyle you dream of. 

May I have your permission to send your FREE information of an 
exciting online business which is growing at a very rapid rate? 

You have: 
  - NO retailing (most people HATE selling) 
  - NO delivering or handling products 
  - NO big up-front investment 
  - and NO risk 

To receive your FREE information about this legitimate, 
automated home business that has a proven track 
record, reply to this message with "show me" as the subject!
 


Thank you and have a great day! 

Best Regards, 
Kevin


*To be removed from this list please reply with REMOVE as the Subject*

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




[PHP] Re: Html email with Flash content embedded

2001-10-05 Thread Richard Lynch

So, send a link?

Or, convince Yahoo not to strip out the attachment?

Or convince your friend to use a different way to get this email?

There really isn't anything PHP can do to fix the problem of Yahoo email
filters.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Dhaval Desai <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 7:05 AM
Subject: Html email with Flash content embedded


> Hi!
>
> I am trying to embed a file into my html email that I
> want to send my friend on Yahoo. I have uploaded the
> flash file (.swf) on my server. If I try to embed the
> file as html and send...as an email...nothin can be
> seen...
>
> Is it because... yahoo filtersI am using Php to
> send it
>
> Thanx
>
> Regards,
> Dhaval Desai
>
> __
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month.
> http://geocities.yahoo.com/ps/info1


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




[PHP] Re: next and previous links

2001-10-05 Thread Richard Lynch

You want to look into MySQL's LIMIT clause.  There are quite a few scripts
as examples in the code archives:

http://php.net/links.php

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Mick Fitzpatrick <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 11:18 AM
Subject: next and previous links


> Hello
>
> After several days of reading various articles on the web I've 'finally'
got
> a basic database working. The database is for a massive collection of my
> vinyl records. Therefore I would like to limit the results to about 20 per
> page and move forward/backward with 'next' and 'previous' links.
>
> I'd like to stress at this stage that I'm new to PHP and don't really know
> and 'tech speak' related to it ... however I like to think I'm a quick
> learner :-)
>
> Below I've pasted a copy of the script I fashioned ... I suppose it's full
> of mistakes but it does work!
>
> Any assistance will be appreciated
>
> TIA ... Mick
>
> ***
>
> 
> 
>
>  face=Arial>artistsaside face=Arial>bsidelabel face=Arial>numberprice face=Arial>originformat face=Arial>info
>
>
> 
> file://THIS BLOCK IS THE MySQL DATABASE INFO AND LOCATION
> mysql_connect ("xxx", "xc", "xx");
> mysql_select_db ("xx");
>
> if ($artists == "")
> {$artists = '%';}
>
> if ($aside == "")
> {$aside = '%';}
>
> if ($bside == "")
> {$bside = '%';}
>
> if ($label == "")
> {$label = '%';}
>
> if ($number == "")
> {$number = '%';}
>
>
> file://THIS ROW SETS THE SEARCH CRITERIA AND THE ORDER ITS DISPLAYED ASC
is
> ASCENDING
> $result = mysql_query ("SELECT * FROM example WHERE artists LIKE
'$artists%'
> AND aside LIKE '$aside%' AND bside LIKE '$bside%' AND label LIKE '$label%'
> AND number LIKE '$number%' ORDER BY artists ASC");
>
> if ($row = mysql_fetch_array($result)) {
>
> do {
>
>
> file://THIS BLOCK DEFINES THE ALTERNATE ROW COLOURS
> $darkcolor="#EE";
> $lightcolor="#FF";
> $test=$colorcount%2;
> if ($test==0){
> $rowcolor=$darkcolor;}
> else{
> $rowcolor=$lightcolor;}
> $colorcount++;
>
> file://THIS BLOCK PUTS THE SEARCH RESULTS IN THE TABLE
> echo(""
.
> $row["artists"] . "" . $row["aside"] .
> "" . $row["bside"] . " face=Arial>" . $row["label"] . "" .
> $row["number"] . "" . $row["price"] .
> "" . $row["origin"] . " size=1 face=Arial>" . $row["format"] . ""
.
> $row["info"] . "");
>
> } while($row = mysql_fetch_array($result));
>
> } else {print "Sorry, no records were found!";}
>
> ?>
>
> 
> 
>
>


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




[PHP] Re: How to eliminate "Warning: Undefined variable: " messages

2001-10-05 Thread Richard Lynch

You're better off using:

if (isset($xx)) instead, but you can change error_reporting

Read php.ini

Or, http://php.net/error_reporting

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Sridhar Moparthy <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 1:53 PM
Subject: How to eliminate "Warning: Undefined variable: " messages


> Hi All,
>
> Is these any parameter in php.ini that I need to set so that I wont get
> "Warning: Undefined variable: xx in yyy.php on line zz" messages?
>
>
>
> Thank you,
> Sridhar Moparthy
>
>
>


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




[PHP] Re: mail problem (reading mail from a pop3 server)

2001-10-05 Thread Richard Lynch

http://php.net/imap/

You may want to read all the other pages that are parallel with that one.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Nikola Veber <[EMAIL PROTECTED]>
Newsgroups: php.general
To: php forum <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 9:31 PM
Subject: mail problem (reading mail from a pop3 server)


> Hi !
>
> I would like to add an option for reading e-mail from the pop3 server to
my site. Is this
> possible at all ?
>
> Thanks
> Nikola
>


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




[PHP] Re: PHP is NOTa Bloated Kludge, end of discusion?

2001-10-05 Thread Richard Lynch

> >OK, true. But, this is necessary if you want PHP to automatically
> >connect to different DBs.
> >A plus to portability and a minus to... (to what?)

The first minus is to performance -- You route through more and more layers
of functions as you add databases and functionality.

The next minus is feature-set -- If you *really* want platform-independence,
you are stuck with SQL92 (more-or-less).  The '92' stands for 1992, which is
63 years old technology in doggie-years. :-)  The point is that at that
time, even an automatically incrementing ID field wasn't agreed on!  Writing
high-performance platform-independent SQL is virtually impossible.  You'll
be giving up every advance in database technology since 1992.

Your other option is to write your own SQL parser to de-construct SQL and
re-build it in a platform-specific way...  Of course, there's always ODBC,
which is more-or-less standard and in some cases has decent performance...
But it's not a no-brainer uniform cross-platform reasonable-performance
answer.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




[PHP] Re: help with exec()...

2001-10-05 Thread Richard Lynch

> $cmd="mysqldump .. > somefile.sql";
>
> if( !fopen("somefile.sql","r") ) { print error message };
>
> $cmd is correct... I've copy-pasted it tons of times in the command shell

Were you the "nobody" user when you did that?  It really doesn't count for
much if you weren't, cuz PHP runs as "nobody" -- or similar depending on
User directive in httpd.conf

Also, that user has a different environment than you -- So the $PATH
variable that might have mysqldump in it for you, isn't there for them.

> and it worked... created the 'somefile.sql' and all. But none of the
> functions (exec, system..) works. When I use system it outputs me some
> header for mysqldump and that's all...

What, if any, error output and errorcode did you get from the optional
variables to exec?

exec($cmd, $output, $errorcode);
echo implode("\n", $output);
echo "errorcode is $errorcode\n";

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




[PHP] Re: random numbers help

2001-10-05 Thread Richard Lynch

You should call mt_srand((double) microtime() * 100) once, and only
once, in any given script.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Nikola Veber <[EMAIL PROTECTED]>
Newsgroups: php.general
To: php forum <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 6:57 PM
Subject: random numbers help


> Hi !
> I'm having troubles with the random numbers. When I create a number witm
mt_rand()
> I always get the same number on my local server. I need this stuff to
ranomly display
> some text, and I'd like to have another value of the random number each
time the
> page is refreshed.
>
> Thanks
> Nikola
>
>


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




[PHP] Re: read_exif_data crashes when reading image

2001-10-05 Thread Richard Lynch

Try the suggestions for dealing with crashes at http://bugs.php.net

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Matthias Cramer <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 6:15 AM
Subject: read_exif_data crashes when reading image


> Hi
>
> When I use the followin code snippet whe webbrowser tells me that
> the page is empty ...
>
> $exif = @ read_exif_data($pictureroot . $PATH_INFO);
>
> if ($exif) {
>   while(list($k,$v)=each($exif)) {
> if ($k != 'Thumbnail' && !ereg('Raw', $k)) {
> echo "$k: $v\n";
> }
>   }
> }
>
> This happens not on all pictures only on a fiew, the only common thing
> I've found is that the all are made my a Kodak DC240.
> When I use the programm metacam on this file, it looks as follows:
>
> File: dcp_0029.jpg
> Make: EASTMAN KODAK COMPANY
>Model: KODAK DC240 ZOOM DIGITAL CAMERA
> X Resolution: 192 Pixels/Inch
> Y Resolution: 192 Pixels/Inch
>YCbCr Positioning: Center of Array
>   EXIF Fields 
>   Image Capture Date: 1999:02:02 11:26:37
> Image Digitized Date: 1999:02:02 11:26:37
>Exposure Bias: 0 EV
> Focal Length: 16mm
>Exposure Time: 1/90 Sec.
> Aperture: f8
> Exif Image Width: 1280 pixels
>Exif Image Height: 960 pixels
>Metering Mode: Average
> EXIF Version: 0210
> FlashPix Version: 0100
>   Light Source/White Balance: Automatic
>Flash: No
>   Sensing Method: Single Chip Color Area Sensor
>   Aperture Value: f8
>   Max Aperture Value: f4.1
>  Shutter Speed Value: 1/90.5097 Sec.
>
> Is this a known issue ??
>
> Best regards
>
>Matthias
>
> --
>  _;\_Matthias CramerSystem & Network Manager
> /_.  \   Dolphins Network Systems AGPhone +41-1-847'45'45
>|/ -\ .)  Libernstrasse 24   Fax   +41-1-847'45'49
>  -'^`-   \;  CH-8112 Otelfingen http://www.dolphins.ch/
>


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




[PHP] Re: running php as owner

2001-10-05 Thread Richard Lynch

> I am running php on apacheon linux.  Right now my php scripts
> access the data as the user that is running apache.  I would like
> them to access the data as the user who is the owner of the script.
> Can this be done?  How?  Is this a good idea (IE: are there hiden
> programs to watch out for)

It can be done in several ways, all of which have at least some security
risks.

Least risky generalized solution is probably Apache's suexec
http://apache.org
You'll need to compile PHP again as a CGI binary, and add a second mime-type
and extension to httpd.conf with AddType/Alias/Action (also documented at
http://apache.org)

If there are a limited number of specific activities you need done, you
could write very simple scripts to provide extremely limited hard-coded
abilities and make them world-executable (or, for root access, use suid or
sudo or somesuch)

You could also switch from Apache to phttpd which allows more flexibility --
calling a specific module by a specific user in different VirtualHosts.  Or,
wait for PHP and Apache 2 to stabilize which is alleged to provide this.

Whatever you pick, be darn sure you understand the under-lying security
issues.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




[PHP] Another Header headed nowhere

2001-10-05 Thread Hugh Danaher

What I want to do is to open a new browser page after some data is entered in a form.  
I have a $php_self that enables $high_value and $low_value to become set and the code 
snip comes after the end of the form.  From reading a help book and looking at the 
on-line manual, I think I need to send a header() command (this might not be true, if 
there is another way, I'll try it too).The following code snip is several lines below 
the top and it gives me the following error message:

Warning: Cannot add header information - headers already sent by (output started at 
/www/serviceprovider/directory/page3.php:4) in 
/www/serviceprovider/directory/page3.php on line 364

code snip

if (isset($high_value) and isset($low_value))
 {
 header("location: http://www.serviceprovider.com/directory/page4.php";);  / / this is 
line 364
 exit;
 }

Your help and advice on this will be greatly appreciated.
Hugh



[PHP] RE: [PHP-DEV] Bug #13545: oci8 compile problem

2001-10-05 Thread Jerome Ponsin

For me this really a bug in php compilation with
oracle 8.1.7 within apache 1.3.20 :

The problem occurs with php 4.0.5, php4.0.6 but also
with latest snapshot...

For Php ->
./configure --with-apache=/root/apache_1.3.20 --with-mysql --enable-ftp --en
able-inline-optimization --disable-debug --with-zlib --with-oci8=/opt/oracle
/product/8.1.7
make
make install

For php within apache :
cd
/root/apache_1.3.20;./configure --activate-module=src/modules/php4/libphp4.a

I get at that command the message :
usr/lib/gcc-lib/i386.libresolv.so: undefined reference to
>>> > `[EMAIL PROTECTED]'

Any idea ?
Thanks for help,
Jerome


>>> -Message d'origine-
>>> De : Markus Fischer [mailto:[EMAIL PROTECTED]]
>>> Envoyé : jeudi 4 octobre 2001 20:45
>>> À : [EMAIL PROTECTED]
>>> Cc : [EMAIL PROTECTED]
>>> Objet : Re: [PHP-DEV] Bug #13545: oci8 compile problem
>>>
>>>
>>> Please ask on [EMAIL PROTECTED] or php-install@
>>>
>>> Is this patch against the glibc 2.2x problem?
>>>
>>> - Markus
>>>
>>> On Thu, Oct 04, 2001 at 06:26:10PM -,
>>> [EMAIL PROTECTED] wrote :
>>> > From: [EMAIL PROTECTED]
>>> > Operating system: LINUX RH 7.1
>>> > PHP version:  4.0.6
>>> > PHP Bug Type: Oracle related
>>> > Bug description:  oci8 compile problem
>>> >
>>> > - oracle 8.1.7 install ok
>>> > - oracle patch from technet ok,
>>> > - php compiles fine (4.0.6)
>>> >
>>> > but on the oracle compile (./configure
>>> > --activate-module=src/modules/php4/libphp4.a )
>>> > I get :
>>> >
>>> > usr/lib/gcc-lib/i386.libresolv.so: undefined reference to
>>> > `[EMAIL PROTECTED]'
>>> > ...
>>> >
>>> > even if I put -lpthread in the "src/Configure" file
>>> > (is that the good place ?)
>>> >
>>> > Thaks for help,
>>> > Jerome
>>> >
>>> >
>>> >
>>> > --
>>> > Edit bug report at: http://bugs.php.net/?id=13545&edit=1
>>> >
>>> >
>>> > --
>>> > PHP Development Mailing List 
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > To contact the list administrators, e-mail:
>>> [EMAIL PROTECTED]
>>>
>>> --
>>> Markus Fischer,  http://guru.josefine.at/~mfischer/
>>> EMail: [EMAIL PROTECTED]
>>> PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
>>> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
>>>   -All your scripts are belong to Zend-
>>>


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




Re: [PHP] Another Header headed nowhere

2001-10-05 Thread Naintara Jain

Use JavaScript within PHP.

If you want to open a new browser window, add the following to the script

window.open('url','winname','window features');" ;
?>

look up the 'open' method in JavaScript.



- Original Message -
From: "Hugh Danaher" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 1:30 PM
Subject: [PHP] Another Header headed nowhere


What I want to do is to open a new browser page after some data is entered in a form.  
I have a
$php_self that enables $high_value and $low_value to become set and the code snip 
comes after the
end of the form.  From reading a help book and looking at the on-line manual, I think 
I need to send
a header() command (this might not be true, if there is another way, I'll try it 
too).The following
code snip is several lines below the top and it gives me the following error message:

Warning: Cannot add header information - headers already sent by (output started at
/www/serviceprovider/directory/page3.php:4) in 
/www/serviceprovider/directory/page3.php on line 364

code snip

if (isset($high_value) and isset($low_value))
 {
 header("location: http://www.serviceprovider.com/directory/page4.php";);  / / this is 
line 364
 exit;
 }

Your help and advice on this will be greatly appreciated.
Hugh



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




[PHP] What is wrong (was: How to simulate any browser)

2001-10-05 Thread Kamil Nowicki


Hello again

I had a problem:
1. I was able to open one certain web page with
   any normal browser and got proper output
2. I was able to open the same page with cURL
   and got the same proper output
3. When I used fopen("http://server.com/","r")
   or file("http://server.com","r")
   I got bunch of errors
4. When I used snoopy and sent all the headers
   that cURL sends (double checked) I got:

   Microsoft VBScript runtime  error '800a01ad'
   ActiveX component can't create object: 'some.calc'
   /script/path/file.asp, line 123

I suppose that the web page I try to load does
something on browser side. But how come that cURL
does it with no problems? How to handle it?

I have to get it done in one and a half hour.
I'm a dead meat

Kamil 'Hilarion' Nowicki


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




[PHP] Re: [PHP-DEV] Bug #13545: oci8 compile problem

2001-10-05 Thread Markus Fischer

Again, is this patch against some kind of libc problem?

Because standard 8.1.7 does not support glibc 2.2.x, only
2.1.(x|3) ?

But there is little from php that can be done I think.

For testing try to build a cgi module and see if that works. If
so IMHO its not a php problem.

I always took dsitributions with libc 2.1.3 for installing
orackle (rh 6.2, debian potato) and they ran well.

- Markus

On Fri, Oct 05, 2001 at 10:09:09AM +0200, Jerome Ponsin wrote : 
> For me this really a bug in php compilation with
> oracle 8.1.7 within apache 1.3.20 :
> 
> The problem occurs with php 4.0.5, php4.0.6 but also
> with latest snapshot...
> 
> For Php ->
> ./configure --with-apache=/root/apache_1.3.20 --with-mysql --enable-ftp --en
> able-inline-optimization --disable-debug --with-zlib --with-oci8=/opt/oracle
> /product/8.1.7
> make
> make install
> 
> For php within apache :
> cd
> /root/apache_1.3.20;./configure --activate-module=src/modules/php4/libphp4.a
> 
> I get at that command the message :
> usr/lib/gcc-lib/i386.libresolv.so: undefined reference to
> >>> > `[EMAIL PROTECTED]'
> 
> Any idea ?
> Thanks for help,
> Jerome
> 
> 
> >>> -Message d'origine-
> >>> De : Markus Fischer [mailto:[EMAIL PROTECTED]]
> >>> Envoyé : jeudi 4 octobre 2001 20:45
> >>> À : [EMAIL PROTECTED]
> >>> Cc : [EMAIL PROTECTED]
> >>> Objet : Re: [PHP-DEV] Bug #13545: oci8 compile problem
> >>>
> >>>
> >>> Please ask on [EMAIL PROTECTED] or php-install@
> >>>
> >>> Is this patch against the glibc 2.2x problem?
> >>>
> >>> - Markus
> >>>
> >>> On Thu, Oct 04, 2001 at 06:26:10PM -,
> >>> [EMAIL PROTECTED] wrote :
> >>> > From: [EMAIL PROTECTED]
> >>> > Operating system: LINUX RH 7.1
> >>> > PHP version:  4.0.6
> >>> > PHP Bug Type: Oracle related
> >>> > Bug description:  oci8 compile problem
> >>> >
> >>> > - oracle 8.1.7 install ok
> >>> > - oracle patch from technet ok,
> >>> > - php compiles fine (4.0.6)
> >>> >
> >>> > but on the oracle compile (./configure
> >>> > --activate-module=src/modules/php4/libphp4.a )
> >>> > I get :
> >>> >
> >>> > usr/lib/gcc-lib/i386.libresolv.so: undefined reference to
> >>> > `[EMAIL PROTECTED]'
> >>> > ...
> >>> >
> >>> > even if I put -lpthread in the "src/Configure" file
> >>> > (is that the good place ?)
> >>> >
> >>> > Thaks for help,
> >>> > Jerome
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Edit bug report at: http://bugs.php.net/?id=13545&edit=1
> >>> >
> >>> >
> >>> > --
> >>> > PHP Development Mailing List 
> >>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> > For additional commands, e-mail: [EMAIL PROTECTED]
> >>> > To contact the list administrators, e-mail:
> >>> [EMAIL PROTECTED]
> >>>
> >>> --
> >>> Markus Fischer,  http://guru.josefine.at/~mfischer/
> >>> EMail: [EMAIL PROTECTED]
> >>> PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> >>> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
> >>>   -All your scripts are belong to Zend-
> >>>

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
  -All your scripts are belong to Zend-

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




Re: [PHP] System(), exec(), Passthru(), etc

2001-10-05 Thread David Robley

On Fri,  5 Oct 2001 13:54, ReDucTor wrote:
> - Original Message -
> From: "David Robley" <[EMAIL PROTECTED]>
> To: "ReDucTor" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, October 05, 2001 2:21 PM
> Subject: Re: [PHP] System(), exec(), Passthru(), etc
>
> > On Fri,  5 Oct 2001 13:19, ReDucTor wrote:
> > > I can't seem to get a return value, while using the functions, it
> > > just puts a 0 on the page, i try putting a  after i do the
> > > system call, still all that is on the page, 0, something is wrong,
> > > anyone know why?!?
> > >
> > > I got no telnet access, and i want to do some cron jobs :D
> > >
> > >  - James  "ReDucTor" Mitchell
> >
> > Perhaps if you show how you are doing this, it might be easier to
> > help. Are you for instance using the return_var argument?
> >
> > And in some cases, 0 is a valid return value; some programs may not
> > return a value at all.
> >
> > [EMAIL PROTECTED]
> echo System("crontab -l", $var)."";
> echo $var;

I doubt that crontab is likely to return an exit status - there's nothing 
in the man page to indicate it, and it is an interactive app (mostly). 
You might get a return from the _shell_ if it failed to execute crontab 
for wahtever reason.

Wiser heads than mine may be able to offer more info; or scratch around 
in the crontab source. (I was going to say older heads, but that cuts the 
options down considerably)

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   That must be wonderful! I don't understand it at all.

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




[PHP] PHP is NOTa Bloated Kludge, end of discusion?

2001-10-05 Thread Ben . Edwards






"Maxim Maletsky \(PHPBeginner.com\)" <[EMAIL PROTECTED]> on
05/10/2001 01:43:57



To:   <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
cc:
Subject:  RE: [PHP] PHP is a Bloated Kludge, discuss!

Firstly let me say that you lot have been great.  Lots of useful stuff and
no flame, big Respect!  Sorry about reactionary nature of the post.  Doing
a 9/5 and building PHP sites till 2 in the morning means I drink a lot of
coffee during the day. I guess I could blame it PHP's addictive nature  ;)
(because of its ease of use and power of course).

Luckily only on my 2nd cup.

Anyway have enough pro-php amo now.  Actually had a look at some benchmarks
and both mod_php and mod_perl are fast, haven't found any that seem to do
proper tests though ( Wish I could get paid for writing apps where all they
do is display 'Hello World' 5 thousand times ).  Anyone know any good
exhaustive ones.

>It is just you and some other people similar to you. Thought this
>question was up for a while :-)


did not know there were many
techn-hippy-anarcho-headenist-dyslexic-anti-capitalists left, There's hope
for us all ;)

>Is it really true? I always though it wasn't.
>AFAIN: Long time ago require() was working this way. But now, require()
>and include() are the same. Loaded only when needed.

No, Been put straight on this one.

>Well, it has it's pluses and it's minuses, it is extendable, though OOD
>works a little different in it. But hey, it compiles on the fly,
>remember? That's a plus for developers, especially newbies.

Probably not so bad OOD stuff is handled differently, OO languages do tent
to be a bit on the slow side.  They also don't really fit with PHP's
paradigm.  OO stuff is very modular and PHP is not.  Weather this is good
or bad is one issue but it is certainly true that trying to mix paradigms
is always going to be a problem.  Also remembering an article by F.Brooks
entitles 'There is no Silver Bullet'.  Anyone know where there is an
on-line version on this. Basically OO is a load of already existing 'good
practices' with there own spin and some clever implementation.  Kind of a
checklist with knobs on it.  There is no silver bullet when it comes to
Software Engineering, just a load of copper ones.  A lot of non-oo language
can use a lot of (stolen) OO concepts and as we all know OO douse not
garentee good code, just makes it SLIGHTLY more likely (and only if people
understand the underlying concepts).

>OK, true. But, this is necessary if you want PHP to automatically
>connect to different DBs.
>A plus to portability and a minus to... (to what?)

Not automatically uniformly, but there are libraries out there (I now know)
which do this anyway.


> We all play it (Devils Advocate) once at least ;-)

Well they do say the devil has all the best tunes.

>Isn't it the greatest thing of it?
>Just think of this - where else you can become a programmer in a short
>time?
>Compliling/executing/libraring/connecting just to make a simple
>guestbook for your site.

Steady all, you'll be butting all programmers out of a job, or are you a
techn-hippy-anarcho-headenist-dyslexic-anti-capitalists too ;)

Neb







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


Re: [PHP] cgi bug workaround

2001-10-05 Thread David Robley

On Fri,  5 Oct 2001 15:15, James Peter Gregory wrote:
> hi all,
>
> I've been asked to do some work on some servers where php can only run
> as cgi. Unfortunately it seems that php has a bug which means that
>
>   #!/usr/local/bin/php
>
> gets printed out at the top of each page if I do this.
>
> Are there any workarounds for this? Is it fixed in the cvs versions?
>
> thanks,
>
> James.

You should only need the #! construct if you are running that file as a 
php script from the shell/cron/whatever. If you are only serving pages 
via a web server (eg using WN or somesush) you use the server method to 
define those scripts as to be parsed by php and you don't need the #!

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Would I ask you a rhetorical question?

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




Re: [PHP] cgi bug workaround

2001-10-05 Thread James Peter Gregory

On Fri, 5 Oct 2001, David Robley wrote:

> On Fri,  5 Oct 2001 15:15, James Peter Gregory wrote:
> > hi all,
> >
> > I've been asked to do some work on some servers where php can only run
> > as cgi. Unfortunately it seems that php has a bug which means that
> >
> >   #!/usr/local/bin/php
> >
> > gets printed out at the top of each page if I do this.
> >
> > Are there any workarounds for this? Is it fixed in the cvs versions?
> >
> > thanks,
> >
> > James.
>
> You should only need the #! construct if you are running that file as a
> php script from the shell/cron/whatever. If you are only serving pages
> via a web server (eg using WN or somesush) you use the server method to
> define those scripts as to be parsed by php and you don't need the #!

I understand that. Unfortunately I'm not the one administrating this
computer so we're stuck with having to find a work around for the problem.
That is, I can't change the apache config at all. They'll only let us use
cgi.

but thanks all the same.

James.

>
> --
> David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
>
>Would I ask you a rhetorical question?
>

-- 
"I'm not vegetarian becuase I love animals; I'm vegetarian because I hate
 plants." - unknown.


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




Re: [PHP] php in css not working with IF's

2001-10-05 Thread Jon Farmer

Budweiser

if ( A != 10 or A != 9 )


--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send blank email to [EMAIL PROTECTED]




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




[PHP] Adding zeros to date

2001-10-05 Thread Daniel Alsén

Hi,

is there a easier way to add zeros to date than the script below? (ie to get
20011005 instead of 2001105). I wrote a long string replace. But it seems
kind of unecessary to me. Is it?


$date_time_array = getdate (time());
$date = $date_time_array[ "mday"];
$month = $date_time_array[ "mon"];
$year = $date_time_array[ "year"];


if ($month < 10) {
$month = str_replace("1", "01", $month);
$month = str_replace("2", "02", $month);
$month = str_replace("3", "03", $month);
$month = str_replace("4", "04", $month);
$month = str_replace("5", "05", $month);
$month = str_replace("6", "06", $month);
$month = str_replace("7", "07", $month);
$month = str_replace("8", "08", $month);
$month = str_replace("9", "09", $month);
}

if ($date < 10) {
$date = str_replace("1", "01", $date);
$date = str_replace("2", "02", $date);
$date = str_replace("3", "03", $date);
$date = str_replace("4", "04", $date);
$date = str_replace("5", "05", $date);
$date = str_replace("6", "06", $date);
$date = str_replace("7", "07", $date);
$date = str_replace("8", "08", $date);
$date = str_replace("9", "09", $date);
}

$datemonth = $year . $month . $date;

echo $datemonth;

# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   |  #


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




[PHP] Re: Adding zeros to date

2001-10-05 Thread Martin Thoma

Use the date-function. See help for details.



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




Re: [PHP] Adding zeros to date

2001-10-05 Thread Negrea Mihai

if you can't do it with date() use
substr("0".$month, -2, 2)

On Friday 05 October 2001 09:44, Daniel Alsén wrote:
> Hi,
>
> is there a easier way to add zeros to date than the script below? (ie to
> get 20011005 instead of 2001105). I wrote a long string replace. But it
> seems kind of unecessary to me. Is it?
>
>
> $date_time_array = getdate (time());
> $date = $date_time_array[ "mday"];
> $month = $date_time_array[ "mon"];
> $year = $date_time_array[ "year"];
>
>
> if ($month < 10) {
> $month = str_replace("1", "01", $month);
> $month = str_replace("2", "02", $month);
> $month = str_replace("3", "03", $month);
> $month = str_replace("4", "04", $month);
> $month = str_replace("5", "05", $month);
> $month = str_replace("6", "06", $month);
> $month = str_replace("7", "07", $month);
> $month = str_replace("8", "08", $month);
> $month = str_replace("9", "09", $month);
> }
>
> if ($date < 10) {
> $date = str_replace("1", "01", $date);
> $date = str_replace("2", "02", $date);
> $date = str_replace("3", "03", $date);
> $date = str_replace("4", "04", $date);
> $date = str_replace("5", "05", $date);
> $date = str_replace("6", "06", $date);
> $date = str_replace("7", "07", $date);
> $date = str_replace("8", "08", $date);
> $date = str_replace("9", "09", $date);
> }
>
> $datemonth = $year . $month . $date;
>
> echo $datemonth;
>
> # Daniel Alsén| www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   |  #

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




[PHP] Re: Adding zeros to date

2001-10-05 Thread _lallous

if you want to do as you're doing this will do:

> if ($month < 10) {
>  $month = "0$month";
> if ($date < 10) {
>  $date = "0$date";

"Daniel alsén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> is there a easier way to add zeros to date than the script below? (ie to
get
> 20011005 instead of 2001105). I wrote a long string replace. But it seems
> kind of unecessary to me. Is it?
>
>
> $date_time_array = getdate (time());
> $date = $date_time_array[ "mday"];
> $month = $date_time_array[ "mon"];
> $year = $date_time_array[ "year"];
>
>
> if ($month < 10) {
> $month = str_replace("1", "01", $month);
> $month = str_replace("2", "02", $month);
> $month = str_replace("3", "03", $month);
> $month = str_replace("4", "04", $month);
> $month = str_replace("5", "05", $month);
> $month = str_replace("6", "06", $month);
> $month = str_replace("7", "07", $month);
> $month = str_replace("8", "08", $month);
> $month = str_replace("9", "09", $month);
> }
>
> if ($date < 10) {
> $date = str_replace("1", "01", $date);
> $date = str_replace("2", "02", $date);
> $date = str_replace("3", "03", $date);
> $date = str_replace("4", "04", $date);
> $date = str_replace("5", "05", $date);
> $date = str_replace("6", "06", $date);
> $date = str_replace("7", "07", $date);
> $date = str_replace("8", "08", $date);
> $date = str_replace("9", "09", $date);
> }
>
> $datemonth = $year . $month . $date;
>
> echo $datemonth;
>
> # Daniel Alsén| www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   |  #
>



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




Re: [PHP] Adding zeros to date

2001-10-05 Thread Dimitris Kossikidis

This should be fine...

$month = 5;
$year = 2001;
$day = 6;

echo date( "Y/m/d", mktime( 0, 0, 0, $month, $day, $year )  );
Output "2001/05/06"

- Original Message -
From: "Daniel Alsén" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 12:44 PM
Subject: [PHP] Adding zeros to date


> Hi,
>
> is there a easier way to add zeros to date than the script below? (ie to
get
> 20011005 instead of 2001105). I wrote a long string replace. But it seems
> kind of unecessary to me. Is it?
>
>
> $date_time_array = getdate (time());
> $date = $date_time_array[ "mday"];
> $month = $date_time_array[ "mon"];
> $year = $date_time_array[ "year"];
>
>
> if ($month < 10) {
> $month = str_replace("1", "01", $month);
> $month = str_replace("2", "02", $month);
> $month = str_replace("3", "03", $month);
> $month = str_replace("4", "04", $month);
> $month = str_replace("5", "05", $month);
> $month = str_replace("6", "06", $month);
> $month = str_replace("7", "07", $month);
> $month = str_replace("8", "08", $month);
> $month = str_replace("9", "09", $month);
> }
>
> if ($date < 10) {
> $date = str_replace("1", "01", $date);
> $date = str_replace("2", "02", $date);
> $date = str_replace("3", "03", $date);
> $date = str_replace("4", "04", $date);
> $date = str_replace("5", "05", $date);
> $date = str_replace("6", "06", $date);
> $date = str_replace("7", "07", $date);
> $date = str_replace("8", "08", $date);
> $date = str_replace("9", "09", $date);
> }
>
> $datemonth = $year . $month . $date;
>
> echo $datemonth;
>
> # Daniel Alsén| www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   |  #
>
>
> --
> 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]
>
>


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




[PHP] RE: [PHP-DEV] Bug #13545: oci8 compile problem

2001-10-05 Thread Jerome Ponsin

Thanks for your response,

Yes it is a patch for glibc greater 2.1.3 (for me
it's 2.2).

The problem doesn't appear with the cgi compilation...
Does that mean I can't install php module with Redhat 7.1
for example, or is there something to do ? But I think I
heard about people installing oci8+php4.0.6+apache 1.3.2
on Redhat 7.1 ?

Thanks again,
Jerome


>>> -Message d'origine-
>>> De : Markus Fischer [mailto:[EMAIL PROTECTED]]
>>> Envoyé : vendredi 5 octobre 2001 10:41
>>> À : Jerome Ponsin
>>> Cc : [EMAIL PROTECTED]
>>> Objet : Re: [PHP-DEV] Bug #13545: oci8 compile problem
>>>
>>>
>>> Again, is this patch against some kind of libc problem?
>>>
>>> Because standard 8.1.7 does not support glibc 2.2.x, only
>>> 2.1.(x|3) ?
>>>
>>> But there is little from php that can be done I think.
>>>
>>> For testing try to build a cgi module and see if that works. If
>>> so IMHO its not a php problem.
>>>
>>> I always took dsitributions with libc 2.1.3 for installing
>>> orackle (rh 6.2, debian potato) and they ran well.
>>>
>>> - Markus
>>>
>>> On Fri, Oct 05, 2001 at 10:09:09AM +0200, Jerome Ponsin wrote :
>>> > For me this really a bug in php compilation with
>>> > oracle 8.1.7 within apache 1.3.20 :
>>> >
>>> > The problem occurs with php 4.0.5, php4.0.6 but also
>>> > with latest snapshot...
>>> >
>>> > For Php ->
>>> > ./configure --with-apache=/root/apache_1.3.20
>>> --with-mysql --enable-ftp --en
>>> > able-inline-optimization --disable-debug --with-zlib
>>> --with-oci8=/opt/oracle
>>> > /product/8.1.7
>>> > make
>>> > make install
>>> >
>>> > For php within apache :
>>> > cd
>>> > /root/apache_1.3.20;./configure
>>> --activate-module=src/modules/php4/libphp4.a
>>> >
>>> > I get at that command the message :
>>> > usr/lib/gcc-lib/i386.libresolv.so: undefined reference to
>>> > >>> > `[EMAIL PROTECTED]'
>>> >
>>> > Any idea ?
>>> > Thanks for help,
>>> > Jerome
>>> >
>>> >
>>> > >>> -Message d'origine-
>>> > >>> De : Markus Fischer [mailto:[EMAIL PROTECTED]]
>>> > >>> Envoyé : jeudi 4 octobre 2001 20:45
>>> > >>> À : [EMAIL PROTECTED]
>>> > >>> Cc : [EMAIL PROTECTED]
>>> > >>> Objet : Re: [PHP-DEV] Bug #13545: oci8 compile problem
>>> > >>>
>>> > >>>
>>> > >>> Please ask on [EMAIL PROTECTED] or php-install@
>>> > >>>
>>> > >>> Is this patch against the glibc 2.2x problem?
>>> > >>>
>>> > >>> - Markus
>>> > >>>
>>> > >>> On Thu, Oct 04, 2001 at 06:26:10PM -,
>>> > >>> [EMAIL PROTECTED] wrote :
>>> > >>> > From: [EMAIL PROTECTED]
>>> > >>> > Operating system: LINUX RH 7.1
>>> > >>> > PHP version:  4.0.6
>>> > >>> > PHP Bug Type: Oracle related
>>> > >>> > Bug description:  oci8 compile problem
>>> > >>> >
>>> > >>> > - oracle 8.1.7 install ok
>>> > >>> > - oracle patch from technet ok,
>>> > >>> > - php compiles fine (4.0.6)
>>> > >>> >
>>> > >>> > but on the oracle compile (./configure
>>> > >>> > --activate-module=src/modules/php4/libphp4.a )
>>> > >>> > I get :
>>> > >>> >
>>> > >>> > usr/lib/gcc-lib/i386.libresolv.so: undefined
>>> reference to
>>> > >>> > `[EMAIL PROTECTED]'
>>> > >>> > ...
>>> > >>> >
>>> > >>> > even if I put -lpthread in the "src/Configure" file
>>> > >>> > (is that the good place ?)
>>> > >>> >
>>> > >>> > Thaks for help,
>>> > >>> > Jerome
>>> > >>> >
>>> > >>> >
>>> > >>> >
>>> > >>> > --
>>> > >>> > Edit bug report at: http://bugs.php.net/?id=13545&edit=1
>>> > >>> >
>>> > >>> >
>>> > >>> > --
>>> > >>> > PHP Development Mailing List 
>>> > >>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > >>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > >>> > To contact the list administrators, e-mail:
>>> > >>> [EMAIL PROTECTED]
>>> > >>>
>>> > >>> --
>>> > >>> Markus Fischer,  http://guru.josefine.at/~mfischer/
>>> > >>> EMail: [EMAIL PROTECTED]
>>> > >>> PGP Public  Key:
>>> http://guru.josefine.at/~mfischer/C2272BD0.asc
>>> > >>> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674
>>> B445 C227 2BD0
>>> > >>>   -All your scripts are belong to Zend-
>>> > >>>
>>>
>>> --
>>> Markus Fischer,  http://guru.josefine.at/~mfischer/
>>> EMail: [EMAIL PROTECTED]
>>> PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
>>> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
>>>   -All your scripts are belong to Zend-


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




[PHP] read_exif_data crashes when reading image

2001-10-05 Thread Matthias Cramer

Hi

When I use the followin code snippet whe webbrowser tells me that
the page is empty ...

$exif = @ read_exif_data($pictureroot . $PATH_INFO);

if ($exif) {
  while(list($k,$v)=each($exif)) {
if ($k != 'Thumbnail' && !ereg('Raw', $k)) {
echo "$k: $v\n";
}
  }
}

This happens not on all pictures only on a fiew, the only common thing
I've found is that the all are made my a Kodak DC240.
When I use the programm metacam on this file, it looks as follows:

File: dcp_0029.jpg
Make: EASTMAN KODAK COMPANY
   Model: KODAK DC240 ZOOM DIGITAL CAMERA
X Resolution: 192 Pixels/Inch
Y Resolution: 192 Pixels/Inch
   YCbCr Positioning: Center of Array
  EXIF Fields 
  Image Capture Date: 1999:02:02 11:26:37
Image Digitized Date: 1999:02:02 11:26:37
   Exposure Bias: 0 EV
Focal Length: 16mm
   Exposure Time: 1/90 Sec.
Aperture: f8
Exif Image Width: 1280 pixels
   Exif Image Height: 960 pixels
   Metering Mode: Average
EXIF Version: 0210
FlashPix Version: 0100
  Light Source/White Balance: Automatic
   Flash: No
  Sensing Method: Single Chip Color Area Sensor
  Aperture Value: f8
  Max Aperture Value: f4.1
 Shutter Speed Value: 1/90.5097 Sec.

Is this a known issue ??

Best regards

   Matthias

-- 
 _;\_Matthias CramerSystem & Network Manager
/_.  \   Dolphins Network Systems AGPhone +41-1-847'45'45
   |/ -\ .)  Libernstrasse 24   Fax   +41-1-847'45'49
 -'^`-   \;  CH-8112 Otelfingen http://www.dolphins.ch/


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




[PHP] Re: [PHP-DEV] Bug #13545: oci8 compile problem

2001-10-05 Thread Markus Fischer

On Fri, Oct 05, 2001 at 01:10:17PM +0200, Jerome Ponsin wrote : 
> Yes it is a patch for glibc greater 2.1.3 (for me
> it's 2.2).
> 
> The problem doesn't appear with the cgi compilation...
> Does that mean I can't install php module with Redhat 7.1
> for example, or is there something to do ?

No it doesn't. It just means this is not a PHP bug so I'm off the
thread.

- Markus

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




[PHP] Database editor

2001-10-05 Thread -:-Doigy-:-

Hi Folks,

I'm after a quick and easy way to edit tables in a mySQL database, much like
you would in ms excel.  I'm thinking I'll do it with forms...

Is there a non-commerical solution in existance already?

Cheers,

Steve



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




Re: [PHP] Database editor

2001-10-05 Thread Girish Nath

Hi

Take a look at phpMyAdmin at :

http://phpwizard.net/projects/phpMyAdmin/

--

phpMyAdmin is intended to handle the adminstration of MySQL over the web.
Currently it can:

- create and drop databases
- create, copy, drop and alter tables
- delete, edit and add fields
- execute any SQL-statement, even batch-queries
- manage keys on fields
- load text files into tables
- create and read dumps of tables
- export data to CSV values
- administer multiple servers and single databases

--

Regards


Girish


- Original Message -
From: "-:-Doigy-:-" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 12:34 PM
Subject: [PHP] Database editor


> Hi Folks,
>
> I'm after a quick and easy way to edit tables in a mySQL database, much
like
> you would in ms excel.  I'm thinking I'll do it with forms...
>
> Is there a non-commerical solution in existance already?
>
> Cheers,
>
> Steve
>
>
>
> --
> 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]
>




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




[PHP] Execute Perl CGI within PHP

2001-10-05 Thread Stefan

Hi
For some reasons I need to execute a Perl-CGI from within PHP.
I tried it that way:
$command = "C:\\Perl\\bin\\Perl.exe ".$basedir."myperl.pl";
$result = @passthru($command, $status);

now my Problem: the perl prints its output immidiatly to the browser and $result is 
empty after the execution of the perl-script.
I needed the output in $result and don't want that the perl script prints to the 
browser...
The whole thing is running on a win2k Server machine.
Does someone know what I'm doing wrong?

By the way: which number in $status means what?


Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--



Re: [PHP] Flexible, "Component-based" and Large Application Systemsin PHP

2001-10-05 Thread Lucas Persona

Tim wrote:
> PHP works quite nicely on large, modular projects. :)

That sound good ! :)

> Where I work we've used an environment that's a synergy of pure HTML
> templates + a servlet/bean infrastructure (implemented in PHP though)
> with great success.
> I have a case-study document that I'm in the process of getting
> permission to publish.  I'll post a link to it when I can.
> - Tim
>   http://www.phptemplates.org

  Please, Let me know as soon as you get it... I had a look at your site 
and found it very interesting (specially about 'dots' :))..but there is 
no download there..
  Anyway, if have something that could help, i'll thank you.

Lucas Persona

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




RE: [PHP] Database editor

2001-10-05 Thread Taylor, Stewart

http://www.phpwizard.net/projects/phpMyAdmin/

-Stewart

-Original Message-
From: -:-Doigy-:- [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2001 12:34
To: [EMAIL PROTECTED]
Subject: [PHP] Database editor


Hi Folks,

I'm after a quick and easy way to edit tables in a mySQL database, much like
you would in ms excel.  I'm thinking I'll do it with forms...

Is there a non-commerical solution in existance already?

Cheers,

Steve



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

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




[PHP] Execute Perl CGI within PHP

2001-10-05 Thread Stefan Rusterholz

Hi
For some reasons I need to execute a Perl-CGI from within PHP.
I tried it that way:
$command = "C:\\Perl\\bin\\Perl.exe ".$basedir."myperl.pl";
$result = @passthru($command, $status);

now my Problem: the perl prints its output immidiatly to the browser and $result is 
empty after the execution of the perl-script.
I needed the output in $result and don't want that the perl script prints to the 
browser...
The whole thing is running on a win2k Server machine.
Does someone know what I'm doing wrong?

By the way: which number in $status means what?

regards
Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--



[PHP] random numbers help

2001-10-05 Thread Nikola Veber

Hi !
I'm having troubles with the random numbers. When I create a number witm mt_rand() 
I always get the same number on my local server. I need this stuff to ranomly display 
some text, and I'd like to have another value of the random number each time the 
page is refreshed. 

Thanks
Nikola



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




[PHP] Window open.

2001-10-05 Thread Johan Vikerskog (EMP)

I have yet another PHP question! =)

How do i open a window in PHP and how do i insert information in it?
I have a tables with a 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] Re: random numbers help

2001-10-05 Thread Henrik Hansen

[EMAIL PROTECTED] (Nikola Veber) wrote:

 > Hi !
 > I'm having troubles with the random numbers. When I create a number witm mt_rand() 
 > I always get the same number on my local server. I need this stuff to ranomly 
 >display 
 > some text, and I'd like to have another value of the random number each time the 
 > page is refreshed. 

RTFM, you need to seed before you call mt_rand as stated on the man page.

-- 
Henrik Hansen

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




Re: [PHP] Window open.

2001-10-05 Thread


From: Johan Vikerskog (EMP) <[EMAIL PROTECTED]>
Date: Fri, Oct 05, 2001 at 01:57:13PM +0200
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Window open.

> I have yet another PHP question! =)
> 
> How do i open a window in PHP and how do i insert information in it?
> I have a tables with a displays information to the user if i clicks the link.
> I want everything to be in the same function. I can solve it with another function 
>but that is not how i want to do it.
> 
> Do anyone of you know how to do this?
> 
> //Johan





JavaScript... not PHP... JavaScript=clientside... PHP=serverside


JS:
window.open();



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Window open.

2001-10-05 Thread Jon Farmer

> I have yet another PHP question! =)
> 
> How do i open a window in PHP and how do i insert information in it?

Actually you have a javascript question!

check out window.open() in the javascript docs


Regards

jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send blank email to [EMAIL PROTECTED]



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




[PHP] Html email with Flash content embedded

2001-10-05 Thread Dhaval Desai

Hi!

I am trying to embed a file into my html email that I
want to send my friend on Yahoo. I have uploaded the
flash file (.swf) on my server. If I try to embed the
file as html and send...as an email...nothin can be
seen...

Is it because... yahoo filtersI am using Php to
send it

Thanx

Regards,
Dhaval Desai

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




Re: [PHP] cgi bug workaround

2001-10-05 Thread Devon Weller


If you are getting "#!/usr/local/bin/php" output to the screen, then the
cgi scripts do no need the line in them to execute properly.  Do you have
access to the scripts?  Try removing this line altogether.  What happens?

- Devon

In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (James Peter Gregory) wrote:

> On Fri, 5 Oct 2001, David Robley wrote:
> 
> > On Fri,  5 Oct 2001 15:15, James Peter Gregory wrote:
> > > hi all,
> > >
> > > I've been asked to do some work on some servers where php can only run
> > > as cgi. Unfortunately it seems that php has a bug which means that
> > >
> > >   #!/usr/local/bin/php
> > >
> > > gets printed out at the top of each page if I do this.
> > >
> > > Are there any workarounds for this? Is it fixed in the cvs versions?
> > >
> > > thanks,
> > >
> > > James.
> >
> > You should only need the #! construct if you are running that file as a
> > php script from the shell/cron/whatever. If you are only serving pages
> > via a web server (eg using WN or somesush) you use the server method to
> > define those scripts as to be parsed by php and you don't need the #!
> 
> I understand that. Unfortunately I'm not the one administrating this
> computer so we're stuck with having to find a work around for the problem.
> That is, I can't change the apache config at all. They'll only let us use
> cgi.
> 
> but thanks all the same.
> 
> James.
> 
> >
> > --
> > David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> > CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
> >
> >Would I ask you a rhetorical question?
> >

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




Re: [PHP] Execute Perl CGI within PHP

2001-10-05 Thread Stefan Rusterholz

It seems I didn't read the descrition of 'exec()' good enough when I read it
the first time :(
Now it works, thank you

From: "Krzysztof Kocjan" <[EMAIL PROTECTED]>
To: "Stefan Rusterholz" <[EMAIL PROTECTED]>
> See exec() and system functions in PHP
>
> Krzysztof
>
> Stefan Rusterholz wrote:
> >
> > Hi
> > For some reasons I need to execute a Perl-CGI from within PHP.
> > I tried it that way:
> > $command = "C:\\Perl\\bin\\Perl.exe ".$basedir."myperl.pl";
> > $result = @passthru($command, $status);
> >
> > now my Problem: the perl prints its output immidiatly to the browser and
$result is empty after the execution of the perl-script.
> > I needed the output in $result and don't want that the perl script
prints to the browser...
> > The whole thing is running on a win2k Server machine.
> > Does someone know what I'm doing wrong?
> >
> > By the way: which number in $status means what?
> >
> > regards
> > Stefan Rusterholz, [EMAIL PROTECTED]
> > --
> > interaktion gmbh
> > Stefan Rusterholz
> > Zürichbergstrasse 17
> > 8032 Zürich
> > --
> > T. +41 1 253 19 55
> > F. +41 1 253 19 56
> > W3 www.interaktion.ch
> > --
>
> 
> 99% trafien. 1% rezerwy, zeby innym nie bylo przykro.
> Nowe Centrum Wyszukiwania >> http://szukaj.interia.pl/
>
>
>


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




[PHP] Re: popup window under php

2001-10-05 Thread Tim Sawyer

Thank you all very much!

Tim Sawyer wrote:

> I want to open a popup window under php control. So lets say I have an 
> if statement which if true opens the window.
> 
> if ($something) {
>JavaScript:window.open("test.php",blah...);
> }
> 
> Guess I'm saying that I want to call a Javascript function without the 
> user clicking on anything.
> 


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




[PHP] Re: Using Array of classes as a class member variable?

2001-10-05 Thread Lenar

Maybe:

> First some basic questions:
> (1) Can you create an unitialised array ?
$an_array = array();

> (2) Can an unitinialised array be a class member variable ?
>
> My problem is this:
>
> I have a class called "user" - which represents one row in a mySQL table
> (also called user)
>
class userBag {
  var $users = array();
function userBag($sql) {
$result = somedb_query($sql);
while($udata = somedb_fetch_object($result))
$this->users[] = $udata
  }
}




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




[PHP] search result page, need some ideas on how to do [PREV] 1 2 3 4 [NEXT] stuff..

2001-10-05 Thread Nicklas Bondesson

all ideas are very welcomed !!

/nicke



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




[PHP] Re: Database editor

2001-10-05 Thread Nicklas Bondesson

the one and only mysql admin tool for win32 is mysqlfront. it can be
downloaded from: http://www.mysqlfront.de.

/nicke

"-:-Doigy-:-" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Folks,
>
> I'm after a quick and easy way to edit tables in a mySQL database, much
like
> you would in ms excel.  I'm thinking I'll do it with forms...
>
> Is there a non-commerical solution in existance already?
>
> Cheers,
>
> Steve
>
>



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




RE: [PHP] Database editor

2001-10-05 Thread Brian Paulson

You might also want to try 
http://sourceforge.net/projects/phpmyadmin

That is where you will find the newest version of the program.

Thank You
Brian Paulson
Sr. Web Developer
The Pueblo Chieftain Online
[EMAIL PROTECTED]
http://www.chieftain.com 

> -Original Message-
> From: Girish Nath [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, October 05, 2001 5:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Database editor
> 
> 
> Hi
> 
> Take a look at phpMyAdmin at :
> 
> http://phpwizard.net/projects/phpMyAdmin/
> 
> --
> 
> phpMyAdmin is intended to handle the adminstration of MySQL 
> over the web. Currently it can:
> 
> - create and drop databases
> - create, copy, drop and alter tables
> - delete, edit and add fields
> - execute any SQL-statement, even batch-queries
> - manage keys on fields
> - load text files into tables
> - create and read dumps of tables
> - export data to CSV values
> - administer multiple servers and single databases
> 
> --
> 
> Regards
> 
> 
> Girish
> 
> 
> - Original Message -
> From: "-:-Doigy-:-" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, October 05, 2001 12:34 PM
> Subject: [PHP] Database editor
> 
> 
> > Hi Folks,
> >
> > I'm after a quick and easy way to edit tables in a mySQL database, 
> > much
> like
> > you would in ms excel.  I'm thinking I'll do it with forms...
> >
> > Is there a non-commerical solution in existance already?
> >
> > Cheers,
> >
> > Steve
> >
> >
> >
> > --
> > 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]
> >
> 
> 
> 
> 
> -- 
> 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]
> 
> 
> 


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




[PHP] ODBC version of PHPMyAdmin?

2001-10-05 Thread Jaxon

Hi,

Has anyone seen an ODBC version of PHPMyAdmin, or something similar; I want
to use it with more than just MySQL (e.g. Postgres and SQLServer)

Cheers,
Jaxon



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




Re: [PHP] Change linux password using php

2001-10-05 Thread Evan Nemerson

Here's what I got from the mandrake security mailing list so far:




This is strange. I was just going to write a mail to this list about
this. it seems that /etc/shadow accepts both crypt passwords (the short
passwd) and MD5 passwords. (34 characters with $ and slashes does seem
to me like md5). I found this because I was transferring users between
servers so I copy and pasted the passwords and it worked on both
occasions. very strange...

Bye
--
Haim

On Thu, Oct 04, 2001 at 11:07:57PM -0700, Evan Nemerson wrote:
> Does anyone know what algorithm is used on the passwords in the /etc/shadow 
> or /etc/passwd files? All the documentation I can find says crypt is used 
> with two characters of salt which should output 13 characters. However my 
> shadow file shows 34 character strings with dollar signs and slashes 
> (shouldn't the output be alpha-numeric???). I already checked md5- nope.
> 
> Please reply to my e-mail address since i don't subscribe to this list 
> (sorry, but i get enough php-general to keep me busy).
> 
> 
> Thanks in advance,
> Evan Nemerson
> 
>

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




[PHP] multidimensional array from html forms

2001-10-05 Thread Larry Linthicum

Hi
I just a PHP "hobbiest" trying to build a points calculating system for
another hobby, please bear with me.

I need to build a multidimensional array from a html form
the array  would look like:

$needed_data = array (
array (id = $member_id,
points = $position ),
array ( id = $member_id,
points =$position),
array (id=$member_id,
points = $position);

$member_id  will be used to dynamically build the html form,  $position will
be an integer entered into a text field in that form
similar to this

Fred($member_id=?)   .. [ enter position=? ]
John)$member_id=?) ..[enter position=?]
etc
etc
[SUBMIT]

IF ( I can get the data into an array like above) {
I can make the rest of the script work }

but that is a big "if"  ... how can I stucture the form
and get that multidimen array from the single name/value pairs passed from
an html form?



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




[PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker

Does anybody have an easy way to crypt and decrypt a string?  I see the Mcrypt 
Encryption module but thats a little more gung-ho than I'm looking for.  I'm not 
trying to encrypt sensitive data rather I'm more trying obfuscate it a variable for a 
hidden tag.

Thought I remember seeing something using XOR?  Any ideas?

Thanks
Joel



[PHP] Symbolic Link - Security Issue?

2001-10-05 Thread Ashwin Kutty

Hi,

I have a directory with an index.php script so that the url is something 
along the lines of http://www.mydomain.com/search/ .. Now following the 
same logic I wanted to write another script but not bother creating 
another directory so I wrote my script called test.php and then created 
a symbolic link to it by pointing 'test' (without the quotes, of course) 
to test.php and upon going to http://www.mydomain.com/search/test I got 
my script's source displayed in plain text on the browser ..

Now maybe this is something I shouldnt be doing or the way I have the 
webserver configured but, just thought Id find out, by checking to see 
if anyone else knows anything about this..

BTW, I am on a Redhat 8 Linux (kernel version 2.4.7-2) server running 
php version 4.0.6 and I have checked in the conf of Apache to see for 
the source its set to phps ..

Thanks..


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




[PHP] mail problem (reading mail from a pop3 server)

2001-10-05 Thread Nikola Veber

Hi !

I would like to add an option for reading e-mail from the pop3 server to my site. Is 
this 
possible at all ?

Thanks
Nikola


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




[PHP] Re: stupid newbie question

2001-10-05 Thread J Smith


Actually, there is a unix-like fork() function in an extension. exec() will 
execute another process, but it isn't really a fork(). 

Look at the pcntl extension and check out pcntl_fork(). I've been working 
with it for a few days and it works pretty well. It's still marked 
EXPERIMENTAL, so don't rely too much on it. I have no idea as to its 
stability. And it's probably only truly useful for command line php. 

(As for the funkyness, kill zombies with pcntl_waitpid().)

J


Richard Lynch wrote:

> http://php.net/exec
> 
> You'll need to use & in the command to be executed.
> 
> That command may or may not need to be wrapped up in a shell script to
> muck with stdin/stderr/stdout so that PHP isn't waiting for those to be
> freed
> up...  Or something like that.  I don't really understand it, I just know
> that programs that use stdin/stdout/stderr have to be treated funky.
> 
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: Paul Procacci <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 04, 2001 10:12 PM
> Subject: stupid newbie question
> 
> 
>> How do u fork?
>>
>> Thanks ahead of time : )
>>


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




Re: [PHP] ODBC version of PHPMyAdmin?

2001-10-05 Thread Steve Werby

"Jaxon" <[EMAIL PROTECTED]> wrote:
> Has anyone seen an ODBC version of PHPMyAdmin, or something similar; I
want
> to use it with more than just MySQL (e.g. Postgres and SQLServer)

Not ODBC, but phpMyAdmin has a PostgreSQL cousin, phpPgAdmin.  You used to
be able to find it at www.greatbridge.org, but Great Bridge has closed its
operation so you'll probably have to look elsewhere.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


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




RE: [PHP] crypt and decrypt a string

2001-10-05 Thread Nathan

Here are some simple xor encoding functions that I wrote. This will keep
the average joe from peaking at your data.

function decode($data){
$data = base64_decode($data);
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
return $data;
}

function encode($data){
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
$data = base64_encode($data);
return $data;
}

-Original Message-
From: Joel Ricker [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 05, 2001 7:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] crypt and decrypt a string


Does anybody have an easy way to crypt and decrypt a string?  I see the
Mcrypt Encryption module but thats a little more gung-ho than I'm
looking for.  I'm not trying to encrypt sensitive data rather I'm more
trying obfuscate it a variable for a hidden tag.

Thought I remember seeing something using XOR?  Any ideas?

Thanks
Joel


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




[PHP] running php as owner

2001-10-05 Thread Ray Todd Stevens

I am running php on apacheon linux.  Right now my php scripts 
access the data as the user that is running apache.  I would like 
them to access the data as the user who is the owner of the script.  
Can this be done?  How?  Is this a good idea (IE: are there hiden 
programs to watch out for)

Ray Todd Stevens Specialists in Network and Security 
Consulting
Senior ConsultantSoftware audit service available
Stevens Services
Suite 21
3754 Old State Rd 37 N
Bedford, IN 47421
(812) 279-9394
[EMAIL PROTECTED]

Thought for the day:
Book (n): a utensil used to pass time while waiting
for the TV repairman.


For PGP public key send message with subject 
please send PGP key

If this message refers to an attachment the attachment
may arrive as a seperate mail message depending on the
type of mail client and gateway software you are using.


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




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Andrey Hristov

On Friday 05 October 2001 18:10, you wrote:
> Use crypt()/decrypt() couple.
>
> Andrey Hristov
> IcyGEN Corporation
> BUILDING SOLUTIONS
> http://www.icygen.com
>
> On Friday 05 October 2001 17:53, you wrote:
> > Here are some simple xor encoding functions that I wrote. This will keep
> > the average joe from peaking at your data.
> >
> > function decode($data){
> > $data = base64_decode($data);
> > /* XOR data */
> > for($i = 0; $i < strlen($data); $i++){
> > $data[$i] = ~ $data[$i];
> > }
> > return $data;
> > }
> >
> > function encode($data){
> > /* XOR data */
> > for($i = 0; $i < strlen($data); $i++){
> > $data[$i] = ~ $data[$i];
> > }
> > $data = base64_encode($data);
> > return $data;
> > }
> >
> > -Original Message-
> > From: Joel Ricker [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 05, 2001 7:20 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] crypt and decrypt a string
> >
> >
> > Does anybody have an easy way to crypt and decrypt a string?  I see the
> > Mcrypt Encryption module but thats a little more gung-ho than I'm
> > looking for.  I'm not trying to encrypt sensitive data rather I'm more
> > trying obfuscate it a variable for a hidden tag.
> >
> > Thought I remember seeing something using XOR?  Any ideas?
> >
> > Thanks
> > Joel

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




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker

From: "Nathan" <[EMAIL PROTECTED]>

> Here are some simple xor encoding functions that I wrote. This will keep
> the average joe from peaking at your data.

Exactly what I was looking for.

Thanks
Joel



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




[PHP] Re: multidimensional array from html forms

2001-10-05 Thread Larry Linthicum

I know that enclosing form field names in [] makes them available as an
array


if the form were dynamically built like

PERSONS NAME (from database via $member_id )
  
next PERSONS NAME (from database via $member_id )
  
next PERSONS NAME (from database via $member_id )
  
etc
etc


I "think" I would then send an array containing all the $member_id (s) and
all the entries into the txt fields

first... am I correct in that?

second  ... is the indexing order known and guaranteed?  in other words is
$data[0] and $data[1]   OR  $data[12] and $data[13]
ALWAYS going to represent a "matched" pair?   ( from "one line" of the
form } or is the indexing of the array subject to variation and may NOT be
in the same order as the [data] fields in the html ?

What if nothing is entered into the txt field?





"Larry Linthicum" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
> I just a PHP "hobbiest" trying to build a points calculating system for
> another hobby, please bear with me.
>
> I need to build a multidimensional array from a html form
> the array  would look like:
>
> $needed_data = array (
> array (id = $member_id,
> points = $position ),
> array ( id = $member_id,
> points =$position),
> array (id=$member_id,
> points = $position);
>
> $member_id  will be used to dynamically build the html form,  $position
will
> be an integer entered into a text field in that form
> similar to this
>
> Fred($member_id=?)   .. [ enter position=? ]
> John)$member_id=?) ..[enter position=?]
> etc
> etc
> [SUBMIT]
>
> IF ( I can get the data into an array like above) {
> I can make the rest of the script work }
>
> but that is a big "if"  ... how can I stucture the form
> and get that multidimen array from the single name/value pairs passed from
> an html form?
>
>



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




[PHP] new to the list

2001-10-05 Thread Mick Fitzpatrick

Hello

I've just joined the list and sending this message as a test :-)

I'm 'very' new to PHP and therefore here to learn ... I hope that's ok?

Mick



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




[PHP] Upload File Path Problem

2001-10-05 Thread Roger Bryant

All,

I am putting together a simple upload program where an
HTML form calls a php script passing a file which is
then used to upload. I am running this locally
currently, prior to rolling out to a test server.

My problem is this. The variable $filename I am
passing from the form to the php script is having the
path corrupted. In the php script if I echo
$filename_name the file name is being passed correctly
(test.txt) but when I echo the $filename variable it
contains a value of \\php2 when infact the correct
value should be c:\test.txt. 


I include below my sample code. If anyone has any
ideas I would be most grateful.

Thanks in advance,


Roger

upload.html
==




 
Upload file : 
Image Description   : 
First Name  :   Last Name: 
Location:  
Dagenham
Romford
Other 
Age : 
Email Address   : 






uploadrjb.php3
==


echo "File=" . "$userfile"; 
  echo "File=" . $userfile_name; 

//echo "Description=" . $description; 
//echo "Age= " . $age; 
//echo "First Name = " . $firstname; 
//echo "Last Name = " . $lastname;
//echo "Location = ". $location; 
//echo "Email = ". $email; 

if ( isset($userfile)  ) {
if ( copy("c:\\" . "$userfile_name",
"c:\\bollocks.txt") ) {
echo("File Successfully copied");
} else {
echo("Error: Failed to copy file...");
}
}
?>






__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




RE: [PHP] Database editor

2001-10-05 Thread Chris Bailey

Also try Mascon and FreeMascon.  Note, these run on Win32, so the other tool
someone mentioned is not the one and only Win32 tool for this :)

FreeMason will let you edit tables and such.  Step up to Mascon to get
things like administrative editing.

http://www.scibit.com/Products/Software/Utils/Mascon.htm

-Original Message-
From: -:-Doigy-:- [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 4:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Database editor


Hi Folks,

I'm after a quick and easy way to edit tables in a mySQL database, much like
you would in ms excel.  I'm thinking I'll do it with forms...

Is there a non-commerical solution in existance already?

Cheers,

Steve



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



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




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Joel Ricker




> On Friday 05 October 2001 18:10, you wrote:
> > Use crypt()/decrypt() couple.
> >
> > Andrey Hristov

>From the PHP doumentation on crypt:

There is no decrypt function, since crypt() uses a one-way algorithm." so
that wouldn't have worked.

Joel





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




[PHP] Re: printf scientific notation?

2001-10-05 Thread Bill Rausch

Thank Richard.

So far, I just punted. My site runs on a dedicated box and doesn't 
have to service a lot of users so I just wrote a one line C program 
to print a single value using a specified format (default is %.4e) 
and use exec() to call it.

printe [format] value

Here's how I encapsulated it:

function printe( $x )
{  
 $lines = array();
 exec( "/usr/local/bin/printe \"".$x."\"", $lines );
 return $lines[0];
}  

and an example of how I call the function:

 fputs( $fp, sprintf( "%8.2f %s %s\n", $this->O_a_time[$i],
 printe($this->O_a_height[$i]),
 printe($this->O_a_cooling[$i]) ) );

It works well enough for now. Eventually I hope to have time to play 
and then I'll come back and figure out a real patch for PHP's printf 
to support %e directly.

Bill

At 12:09 AM -0500 10/5/01, Richard Lynch wrote:
>You could roll your own...
>
>% and (int) / and round() are all you need.
>
>- Original Message -
>From: Bill Rausch <[EMAIL PROTECTED]>
>Subject: printf scientific notation?
>
>  > Can PHP print floating point numbers using scientific notation?
>>  (like 1.32e+5) sscanf reads them ok using %f, but I'd like to print
>>  them with %e or %g and the printf documentation doesn't mention them.
>>
>  > I've tried %e anyway and it fails to print the exponent part.

-- 
  Bill Rausch, Software Development, Unix, Mac, Windows
  Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]

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




Re: [PHP] Upload File Path Problem

2001-10-05 Thread root

$imagefile contains the name of the file in the temp dir. So the name is some 
mess like phpx . If you want the file you do copy() or something other. 
After the script is done the file is deleted. I prefer using $HTTP_POST_VARS
do var_dump($HTTP_POST_VARS) to see debug info.

Andrey Hristov
IcyGEN Corporation
Building Solutions
http://www.icygen.com

On Friday 05 October 2001 18:41, you wrote:
> All,
>
> I am putting together a simple upload program where an
> HTML form calls a php script passing a file which is
> then used to upload. I am running this locally
> currently, prior to rolling out to a test server.
>
> My problem is this. The variable $filename I am
> passing from the form to the php script is having the
> path corrupted. In the php script if I echo
> $filename_name the file name is being passed correctly
> (test.txt) but when I echo the $filename variable it
> contains a value of \\php2 when infact the correct
> value should be c:\test.txt.
>
>
> I include below my sample code. If anyone has any
> ideas I would be most grateful.
>
> Thanks in advance,
>
>
> Roger
>
> upload.html
> ==
>
> 
>
>  ACTION = "uploadrjb.php3" >
> 
> Upload file   :  NAME="userfile">
> Image Description :  NAME="description" SIZE=40 align="left">
> First Name:  SIZE=30 align="left">  Last Name:  NAME="lastname" SIZE=30 align="left">
> Location  : 
> Dagenham
> Romford
> Other 
> Age   :  ALIGN="right">
> Email Address :  SIZE=30 ALIGN="left">
> 
> 
> 
>
> 
>
> uploadrjb.php3
> ==
> 
> //echo $userfile; 
>
> echo "File=" . "$userfile";
>   echo "File=" . $userfile_name;
>
> //echo "Description=" . $description;
> //echo "Age= " . $age;
> //echo "First Name = " . $firstname;
> //echo "Last Name = " . $lastname;
> //echo "Location = ". $location;
> //echo "Email = ". $email;
>
> if ( isset($userfile)  ) {
>   if ( copy("c:\\" . "$userfile_name",
> "c:\\bollocks.txt") ) {
>   echo("File Successfully copied");
>   } else {
>   echo("Error: Failed to copy file...");
>   }
> }
> ?>
>
>
>
>
>
>
> __
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just
> $8.95/month. http://geocities.yahoo.com/ps/info1

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




[PHP] Paging through MySQL results

2001-10-05 Thread wjt

I am a bit new to PHP -- normally use ASP (no booing, please) -- and trying
to find an elegant solution to paging x number of records at a time through
a result set returned to a php page from MySQL.

Any ideas?

TIA,
Bill



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




Re: [PHP] crypt and decrypt a string

2001-10-05 Thread Andrey Hristov

ooops , sorry
On Friday 05 October 2001 18:48, you wrote:
> > On Friday 05 October 2001 18:10, you wrote:
> > > Use crypt()/decrypt() couple.
> > >
> > > Andrey Hristov
>
> From the PHP doumentation on crypt:
>
> There is no decrypt function, since crypt() uses a one-way algorithm." so
> that wouldn't have worked.
>
> Joel

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




Re: [PHP] Paging through MySQL results

2001-10-05 Thread Andrey Hristov

select * from some_table Limit 10,30;

syntaxis
limit ,
Andrey Hristov
IcyGEN Corporation
Building Solutions

On Friday 05 October 2001 18:52, you wrote:
> I am a bit new to PHP -- normally use ASP (no booing, please) -- and trying
> to find an elegant solution to paging x number of records at a time through
> a result set returned to a php page from MySQL.
>
> Any ideas?
>
> TIA,
> Bill

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




[PHP] Re: [PHP-DB] Auto_increment field size (was: Howto make a double LEFT JOIN)

2001-10-05 Thread Andrey Hristov

select first.*,second.*,third.* from first left join second 
using(for_key_first_second) left join third using(for_key_2_3);

On Friday 05 October 2001 18:50, you wrote:
> Hello,
>
> > you can always reset the auto_increment value (I think that is as simlple
>
> as
>
> > "set insert_id=1;" but you may want to double check as this is off the
> > top of my head).
>
> I don't think i can do so cause i never delete all rows.
>  so will get something like:
> 1
> <- new insert her
> 1000
> 1001
> etc.

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




[PHP] Re: search result page, need some ideas on how to do [PREV] 1 2 3 4 [NEXT] stuff..

2001-10-05 Thread Chris Lee

there are tutorials posted all over the inet, and all over this news group.
take a look around.

Ive left out the details and stuck with the basics, modify as needed, you'll
need to :)

  if (!isset($HOW_MANY))
$HOW_MANY = 10;
  if (!isset($position))
$position = 0;

  $prev = $position - $HOW_MANY;
  $next = $position + $HOW_MANY;

  $query = "SELECT * FROM table LIMIT $position, $HOW_MANY";

  $search_a = $position;
  $search_b = $next;
  $search_c = @$product->product_count;

  if ($search_b > $search_c)
$search_b = $search_c;

  echo "
  Displaying $search_a - $search_b of $search_c Orders
  ";

  if ($prev >= 0)
echo "
<$IMG src='image/back.gif'>
";
  echo "
  <$IMG src='image/home.gif'>
  ";
  if ( $next < $search_c )
echo "
<$IMG src='image/next.gif'>
";


--

  Chris Lee
  [EMAIL PROTECTED]


"Nicklas Bondesson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> all ideas are very welcomed !!
>
> /nicke
>
>



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




Re: [PHP] Paging through MySQL results

2001-10-05 Thread Joel Ricker


- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>


> select * from some_table Limit 10,30;

Something to point out, in some of the older versions of MySQL, Offset
starts counting at 0, while in the newer versions, it starts counting at 1.
You'll want to check the documentation for your version.

Joel

> syntaxis
> limit ,
> Andrey Hristov
> IcyGEN Corporation
> Building Solutions
>
> On Friday 05 October 2001 18:52, you wrote:
> > I am a bit new to PHP -- normally use ASP (no booing, please) -- and
trying
> > to find an elegant solution to paging x number of records at a time
through
> > a result set returned to a php page from MySQL.
> >
> > Any ideas?
> >
> > TIA,
> > Bill
>
> --
> 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]



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




[PHP] next and previous links

2001-10-05 Thread Mick Fitzpatrick

Hello

After several days of reading various articles on the web I've 'finally' got
a basic database working. The database is for a massive collection of my
vinyl records. Therefore I would like to limit the results to about 20 per
page and move forward/backward with 'next' and 'previous' links.

I'd like to stress at this stage that I'm new to PHP and don't really know
and 'tech speak' related to it ... however I like to think I'm a quick
learner :-)

Below I've pasted a copy of the script I fashioned ... I suppose it's full
of mistakes but it does work!

Any assistance will be appreciated

TIA ... Mick

***




artistsasidebsidelabelnumberpriceoriginformatinfo


" .
$row["artists"] . "" . $row["aside"] .
"" . $row["bside"] . "" . $row["label"] . "" .
$row["number"] . "" . $row["price"] .
"" . $row["origin"] . "" . $row["format"] . "" .
$row["info"] . "");

} while($row = mysql_fetch_array($result));

} else {print "Sorry, no records were found!";}

?>






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




Re: [PHP] Paging through MySQL results

2001-10-05 Thread wjt

Question:  Does the pagination method using mysql_data_seek method pull in
the entire result set, only to be used to display x number of rows?

"Joel Ricker" <[EMAIL PROTECTED]> wrote in message
00b501c14db9$84e4a4f0$04a3d6d1@joeltklrijxxms">news:00b501c14db9$84e4a4f0$04a3d6d1@joeltklrijxxms...
>
> - Original Message -
> From: "Andrey Hristov" <[EMAIL PROTECTED]>
>
>
> > select * from some_table Limit 10,30;
>
> Something to point out, in some of the older versions of MySQL, Offset
> starts counting at 0, while in the newer versions, it starts counting at
1.
> You'll want to check the documentation for your version.
>
> Joel
>
> > syntaxis
> > limit ,
> > Andrey Hristov
> > IcyGEN Corporation
> > Building Solutions
> >
> > On Friday 05 October 2001 18:52, you wrote:
> > > I am a bit new to PHP -- normally use ASP (no booing, please) -- and
> trying
> > > to find an elegant solution to paging x number of records at a time
> through
> > > a result set returned to a php page from MySQL.
> > >
> > > Any ideas?
> > >
> > > TIA,
> > > Bill
> >
> > --
> > 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]
>
>



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




RE: [PHP] new to the list

2001-10-05 Thread Jack Dempsey

Hey Mick,

of course its ok...we've all done it that way (cept a few whose names you'll
learn soon enough ;-) )
a few suggestions:
1. www.php.net has most everything you could ask for...also, if you have a
function you want to learn more about, type it like this:
http://www.php.net/function_name (for example, http://php.net/date ) and
you'll be taken directly to that page in the manual
2. 98% of your questions are already answered. isn't that great? search the
mailing list at http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 This'll
be faster for you, save you any RTFM's, and in general reduce traffic for
the list
3. don't be afraid to try things out yourself. if you want to know if
something works, write a small script. take a second to think it through.
you'll learn more that way than any other method.
4. www.hotscripts.com and many others have tons of php scripts...check them
out to get a feel for what code really looks like

best of luck,
jack

-Original Message-
From: Mick Fitzpatrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 11:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] new to the list


Hello

I've just joined the list and sending this message as a test :-)

I'm 'very' new to PHP and therefore here to learn ... I hope that's ok?

Mick



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



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




RE: [PHP] Database editor

2001-10-05 Thread MrBaseball34

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Also try Mascon and FreeMascon.  Note, these run on Win32, so the other tool
> someone mentioned is not the one and only Win32 tool for this :)
> 
> FreeMason will let you edit tables and such.  Step up to Mascon to get
> things like administrative editing.
> 
> http://www.scibit.com/Products/Software/Utils/Mascon.htm
> 

This is a Win32-based editor, anything using PHP for the web?

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




[PHP] Fancy thing.

2001-10-05 Thread Andrey Hristov

After getting the PHP source from the CVS and compiling I tested with 
phpinfo(). The result was amazing :
===cutted=
http://www.php.net/";>PHP Version 4.0.8-dev
===cutted=


-- 
Andrey Hristov
IcyGEN Corporation
BALANCED SOLUTIONS
http://www.icygen.com

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




[PHP] Submitting variables via /'s

2001-10-05 Thread Ashley M. Kirchner


I've seen documentation on this somewhere, but now I can't remember
where.

I want to move away from

file.php?var1=1&var2=2&var3=3

...and go to

file.php/1/2/3

...and still be able to do what I need to be done (extract the
variables and use them as I need them.)

The only question I have with this approach is, what happens with
$PHP_SELF?  I believe it becomes the full string (file.php/1/2/3) where
with the other approach, it's only file.php (since it strips away the
?var1=1&var2=2&var3=3 part) - how does one deal with that?  I can't
simply refer to $PHP_SELF anymore if I'm changing those variables, can
I?

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




Re: [PHP] Submitting variables via /'s

2001-10-05 Thread Rasmus Lerdorf

Yes, $PHP_SELF would include /1/2/3.  $SCRIPT_NAME wouldn't have it though
since Apache fills that in with the script it executes.  Or you could
simply look at $PATH_INFO and strip the contents of $PATH_INFO from the
end of $PHP_SELF.

-Rasmus

On Fri, 5 Oct 2001, Ashley M. Kirchner wrote:

>
> I've seen documentation on this somewhere, but now I can't remember
> where.
>
> I want to move away from
>
> file.php?var1=1&var2=2&var3=3
>
> ...and go to
>
> file.php/1/2/3
>
> ...and still be able to do what I need to be done (extract the
> variables and use them as I need them.)
>
> The only question I have with this approach is, what happens with
> $PHP_SELF?  I believe it becomes the full string (file.php/1/2/3) where
> with the other approach, it's only file.php (since it strips away the
> ?var1=1&var2=2&var3=3 part) - how does one deal with that?  I can't
> simply refer to $PHP_SELF anymore if I'm changing those variables, can
> I?
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
>
>
>
>


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




RE: [PHP] Database editor

2001-10-05 Thread Chris Bailey

As a couple others posted, if you want it to be PHP, then phpMyAdmin,
http://sourceforge.net/projects/phpmyadmin.

-Original Message-
From: MrBaseball34 [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 9:45 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Database editor


In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> Also try Mascon and FreeMascon.  Note, these run on Win32, so the other
tool
> someone mentioned is not the one and only Win32 tool for this :)
>
> FreeMason will let you edit tables and such.  Step up to Mascon to get
> things like administrative editing.
>
> http://www.scibit.com/Products/Software/Utils/Mascon.htm
>

This is a Win32-based editor, anything using PHP for the web?

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



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




Re: [PHP] Submitting variables via /'s

2001-10-05 Thread Ashley M. Kirchner

Rasmus Lerdorf wrote:

> Yes, $PHP_SELF would include /1/2/3.  $SCRIPT_NAME wouldn't have it though
> since Apache fills that in with the script it executes.  Or you could
> simply look at $PATH_INFO and strip the contents of $PATH_INFO from the
> end of $PHP_SELF.

Aha!  Good.  Now, does anyone have a link to documentation on how to use
this method?
(I forgot to ask that, duh)

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




RE: [PHP] Database editor

2001-10-05 Thread MrBaseball34

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> As a couple others posted, if you want it to be PHP, then phpMyAdmin,
> http://sourceforge.net/projects/phpmyadmin.
> 
I just found that one...thanks...

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




  1   2   >