Re: [PHP] file maniputation??

2001-10-04 Thread Mukul Sabharwal

Hi,

It looks most certainly like a file permission error,
however if you have concurrent users maybe it's over
riding the file contents, and screwing up something
somewhere.

So use flock(), a tutorial :

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

=
*
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] php in css not working with IF's

2001-10-04 Thread Jason Dulberg

Should I stick with

if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))

or

if($site_style != ('10' or '9' or '8'))

So here's what I've gathered from the various messages and my current
methods:

- index.php selects $site_style from the db
- header.php is included by index.php (header.php has the css src for
styles.php in it)
- styles.php has the IF's
- I need to put link rel=stylesheet
src=styles.php?site_style=xxBROWSER_PLATFORM=xyz to pass the variables
from the script to the css file
(if possible, I need to get around this as headers are being included with
the css src already in them)
- do not need to use require() in styles.php

Thanks to everyone for all the suggestions!! :)

Jason


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: October 4, 2001 2:09 AM
 To: Maxim Maletsky (PHPBeginner.com)
 Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Ok. Wll show you with an example:
 
  if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
  { }
 
  elseif ($site_style==10) {
  }
 
 
  Should simply be
 
   if($site_style != ('10' or '9' or '8')) {}

 Stop confusing the lad.  That obviously won't work.

 -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] php in css not working with IF's

2001-10-04 Thread David Robley

On Thu,  4 Oct 2001 16:04, Jason Dulberg wrote:
 Should I stick with

 if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))

 or

 if($site_style != ('10' or '9' or '8'))

As has been pointed out, that latter won't work. What is the range of 
possible values for $site_style? If it is 10 or less, then you could 
simply rephrase the test to

if($site_style  8)

or alternatively, if the range is 0 to more than 10

if( $site_style  8 || $site_style  10 )



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

   Ici nous voyons le tour Eiffel! Tom parried.

-- 
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] Sessions Variables and refresh pages

2001-10-04 Thread Derek Mailer

Karina,

If this is the problem you are getting and you can't find a way around it,
you could start the session on a splash or index page so that when you move
from that first page into the main part of the website, the session has
already been started and all session variables are available.

This is more of a quick-fix than a techncal solution, but it should work.

After experimenting with using session id's to track users I opted for using
cookies.  Not because I was having too many problems with sessions, but more
for the benefits that I could get using cookies in that particular
application.

Cheers the noo,

Derek



- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Karina [EMAIL PROTECTED]
Cc: Derek Mailer [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 5:50 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


 Both of SID and session_id() should return the current session id after
 session_start() has been called.

 -Rasmus

 On Wed, 3 Oct 2001, Karina wrote:

  Yes, it is.
 
  This is exactly the problem. Do you know a way to solution this ?
 
  Thks, Karina
 
  ---
 
 
  I'm not sure I fully understand the problem, but I think I can
  have a guess
  at it based on my past experiences...
 
  if you have a php page that starts a session with
  session_start() and, say
  for example, you then try and echo the session id with
  session_id() it will
  not be displayed on screen until you actually refresh the page
  or move to
  another page that calls the session id.
 
  In other words, the session id seems to be set when the session
  is started,
  but isn't availale to use in your script until the page is
  re-loaded.
 
  This is based on what I can remember from 8 months ago and I
  haven't tested
  it out, but I believe this is the sort of problem being
  described in this
  thread.
 
  Cheers the noo,
 
  Derek
 


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




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


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

2001-10-04 Thread Rosen

Hi,
I'm creating web site with sessions.
Normally the site uses PHPSESSID to pass session ID to next page.
I want to use some script whitch use SID to pass session ID.
Can I set standart (i.e. PHPSESSID ) to use to pass session ID ?

Thanks,
Rosen



-- 
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] How can I simulate the login process?

2001-10-04 Thread _lallous

I want to write a script that simulates the login process and logs on and
grabs some pages (that can only be viewed when logged in) and the logs
out...
how can i do that?

consider the authentication system is done via session variables method...

any ideas would help.



-- 
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] need phpmyAdmin but no so good

2001-10-04 Thread ani

Hi:
I'm looking for a mysql administrator but no so good as
phpmyAdmin, just listing dbs, tables, insert, delete, edit
options; no create or alter tables and dbs

anybody knows about?
thanks in advance

Aniceto Lopez
www.laMundial.net
download our free music


-- 
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] Session and header() errrors

2001-10-04 Thread Web user

Why do the errors occur while running the scripts below? It seems that the
errors occured at the part of session and header(). Please give me some
advice!
Thank you!

Mike

System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
are default in php.ini)

when the 1.php is running, the IE shows errors info as below :
-
Warning: Cannot send session cookie - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

Warning: Cannot send session cache limiter - headers already sent (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed: m
(2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
session_id: 96ae897bcb501486860552d2df862863


Warning: Cannot add header information - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 9

-
The scripts of 1.php: (1.php and 2.php are under the same base directory)
?
require(html-head.inc);
session_start();
$name=user;
session_register(name);
echo session_id: .session_id().br;
sleep(10);
header(Location: 2.php);
require(html-foot.inc);
?

-
The scripts of html-head.inc:
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titlepage title/title
/head
body

-
The scripts of html-foot.inc:
/body
/html









-- 
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] Session and header() errrors

2001-10-04 Thread Rasmus Lerdorf

You can't send any output before the session_start() call.  You require a
file which outputs html before calling session_start().  Simply do the
session_start() before the require and it should work.

-Rasmus

On Thu, 4 Oct 2001, Web user wrote:

 Why do the errors occur while running the scripts below? It seems that the
 errors occured at the part of session and header(). Please give me some
 advice!
 Thank you!

 Mike

 System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
 are default in php.ini)

 when the 1.php is running, the IE shows errors info as below :
 -
 Warning: Cannot send session cookie - headers already sent by (output
 started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: Cannot send session cache limiter - headers already sent (output
 started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed: m
 (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
 session_id: 96ae897bcb501486860552d2df862863


 Warning: Cannot add header information - headers already sent by (output
 started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 9

 -
 The scripts of 1.php: (1.php and 2.php are under the same base directory)
 ?
 require(html-head.inc);
 session_start();
 $name=user;
 session_register(name);
 echo session_id: .session_id().br;
 sleep(10);
 header(Location: 2.php);
 require(html-foot.inc);
 ?

 -
 The scripts of html-head.inc:
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 titlepage title/title
 /head
 body

 -
 The scripts of html-foot.inc:
 /body
 /html












-- 
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 version of community calendar released!

2001-10-04 Thread Christopher Ostmo

Hello,

AppIdeas.com has been working hard to update it's Open Source 
PHP/MySQL offerings and has just released version 4.0 of it's popular 
community calendar system.

You can run a demo, see real world examples, view the source code 
and download a copy online at:
http://open.appideas.com/
Click Projects and then phpCommunityCalendar

We have also recently archived and made searchable our last two years 
of support mailing list data and opened online discussion forums for 
folks who have needed help but have been reluctant to signup for the 
mailing list.

Stop by and have a look!

Thanks...

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of World Wide Web time
(1995)

Business Applications:
http://www.AppIdeas.com/

Open Source Applications:
http://open.AppIdeas.com/
got Unix?

-- 
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: Re: Re: [PHP] How to simulate any browser

2001-10-04 Thread Kamil Nowicki


Thanx. I'll check it out.

 I think you need snoopy. (http://sourceforge.net/projects/snoopy/)


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]




Re: Re: [PHP] How to simulate any browser

2001-10-04 Thread Kamil Nowicki


Me again

  And gives error page in $output.
 What does the error page have?
The error page is generated by JSP and gives me
some error with VBS and dll.
When I use cURL (on other server) to get to
the same script on the same JSP server with
the same input I get correct data (if using GET
method) or partialy correct data and type
mismatch error (if using POST method).

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

2001-10-04 Thread Caleb Carvalho

Hi all,

if i have an array that is fetching the result to be display
example,
for ($i =1; $i=sybase_num_rows($result); $i++){
$row =sybase_fetch_array($result);

  $row[product]
  a href=solution.php?id=$row[prob_title]$row[prob_title]/a
  $row[description]$row[solution]

where would i put the stripslashes function to get the description?
...
I have tried up and down, but unfortunately am still learning php,

sorry,

Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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] something like alert (javascript)

2001-10-04 Thread Eduardo Kokubo

I'm implementing a system that allows the users create pages on-line. They
can create several different pages to complete a site. What I want to do is
alert them that there are still pages to be created before they finish. I'm
trying to do it checking the files they create and alerting a message, but I
think javascript can not check the files and php can not alert the user with
a function like alert(). I'm using a simple print() (PHP) but alert() would
be much better.

- Original Message -
From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
To: 'Eduardo Kokubo' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 11:38 AM
Subject: RE: [PHP] something like alert (javascript)


 Then what do you need?

 We are not any sure on what your question is ...

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
 Sent: mercoledì 3 ottobre 2001 16.31
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] something like alert (javascript)


 Is there any function in PHP that is similar to alert() or confirm() of
 javascript ? I tried die() but that's not what I need.


-- 
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] Session and header() errrors

2001-10-04 Thread Dimitris Kossikidis

You should change sessions configuration in php.ini

The default value for sessions dir /tmp.
In windows shoud point to c:\tmp

The header error occurs because you get a warning about session.


- Original Message -
From: "Web user" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 11:51 AM
Subject: [PHP] Session and header() errrors


 Why do the errors occur while running the scripts below? It seems that the
 errors occured at the part of session and header(). Please give me some
 advice!
 Thank you!

 Mike

 System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
 are default in php.ini)

 when the 1.php is running, the IE shows errors info as below :
 -
 Warning: Cannot send session cookie - headers already sent by (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: Cannot send session cache limiter - headers already sent (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed:
m
 (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
 session_id: 96ae897bcb501486860552d2df862863


 Warning: Cannot add header information - headers already sent by (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 9

 -
 The scripts of 1.php: (1.php and 2.php are under the same base directory)
 ?
 require("html-head.inc");
 session_start();
 $name="user";
 session_register("name");
 echo "session_id: ".session_id()."br";
 sleep(10);
 header("Location: 2.php");
 require("html-foot.inc");
 ?

 -
 The scripts of html-head.inc:
 html
 head
 meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
 titlepage title/title
 /head
 body

 -
 The scripts of html-foot.inc:
 /body
 /html









 --
 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[2]: [PHP] something like alert (javascript)

2001-10-04 Thread Morten Winkler Jørgensen

EK I'm using a simple print() (PHP) but alert() would
EK be much better.


Have php print your BODY tag like this:
 BODY onLoad=alert('Your warning')

That's the best solution I think.



-- 
Kind regards,
  Morten Winkler



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




Fwd: Re: [PHP] Unable to get a dot-decimal ip address from a decimal ip address

2001-10-04 Thread dharana

- Forwarded message from [EMAIL PROTECTED] -

From: [EMAIL PROTECTED]
To: David Robley [EMAIL PROTECTED]
Date: Thu, 4 Oct 2001 13:37:07 +0200
Subject: Re: [PHP] Unable to get a dot-decimal ip address from a decimal ip address

Something weird is going on:

PHP translates 
thisintothis
3232235524 127.255.255.255
3579939092 127.255.255.255
3579949354 127.255.255.255
3232235524 127.255.255.255
3237340682 127.255.255.255

but then..

1042595228 62.36.189.156

Is it just my PHP installation that is corrupt or does long2ip has the same
limitations as decbin()?

PHP Version 4.0.6 compilled from sources into a linux 2.4.10 box.

David Robley([EMAIL PROTECTED])@2001.10.04 14:09:33 +:
 On Thu,  4 Oct 2001 13:10, [EMAIL PROTECTED] wrote:
  Hi,
 
  decbin() is unable to handle decimal numers greater than 2147483647 and
  it's a problem. That's in the docs, ok. The situation is: I have a list
  of IPs in decimal format (ex: 3232235524) and I wanted to translate
  them into dot decimal. As far as I know the formula is:
 
  [...]by converting the
  number to binary, breaking the binary number down into 4 octets and
  then converting each octet into a dotted-decimal number.
 
  (got from http://www.montagar.com/~patj/ipmath.txt)
 
 
  When I try to do this with PHP, I get just 1's because the IPs are
  greater than 2147483647. Anyone knows a workaround for this?
 
  Thanks in advance.
 
 I think the function ip2long might be what you want.
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
Keyboard Not Found - Press [F1] to Continue

-- 
dharana [EMAIL PROTECTED]Black holes are where 
PGP KeyID: 0xC32A724 GOOD is dividing by zero



- End forwarded message -

-- 
dharana [EMAIL PROTECTED]Black holes are where 
PGP KeyID: 0xC32A724 GOOD is dividing by zero

 PGP signature


Re: [PHP] Session and header() errrors

2001-10-04 Thread Naintara Jain

There are 2 things you are doing here:
1) Session start
2) page redirection

put session_start() as the 1st line in your script.
Echo commands in the included file causes such warnings:
"Warning: Cannot send session cookie - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)"

The first two warnings are on account of the above problem.

The 3rd warning is becoz of the php.ini that Dimitris talks about.

For the last warning, another simple mistake:
---echo "session_id: ".session_id()."br";--
comment this line and then redirect the page.

the header() function will cause errors if you have already written, sent output 
('echoed', etc) to
the current page.

-Naintara


- Original Message - 
From: "Dimitris Kossikidis" [EMAIL PROTECTED]
To: "Web user" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 4:48 PM
Subject: Re: [PHP] Session and header() errrors


You should change sessions configuration in php.ini

The default value for sessions dir /tmp.
In windows shoud point to c:\tmp

The header error occurs because you get a warning about session.


- Original Message -
From: "Web user" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 11:51 AM
Subject: [PHP] Session and header() errrors


 Why do the errors occur while running the scripts below? It seems that the
 errors occured at the part of session and header(). Please give me some
 advice!
 Thank you!

 Mike

 System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
 are default in php.ini)

 when the 1.php is running, the IE shows errors info as below :
 -
 Warning: Cannot send session cookie - headers already sent by (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: Cannot send session cache limiter - headers already sent (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

 Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed:
m
 (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
 session_id: 96ae897bcb501486860552d2df862863


 Warning: Cannot add header information - headers already sent by (output
 started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
 in c:\program files\apache group\apache\htdocs\web1\1.php on line 9

 -
 The scripts of 1.php: (1.php and 2.php are under the same base directory)
 ?
 require("html-head.inc");
 session_start();
 $name="user";
 session_register("name");
 echo "session_id: ".session_id()."br";
 sleep(10);
 header("Location: 2.php");
 require("html-foot.inc");
 ?

 -
 The scripts of html-head.inc:
 html
 head
 meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
 titlepage title/title
 /head
 body

 -
 The scripts of html-foot.inc:
 /body
 /html









 --
 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] Re: stripslashes

2001-10-04 Thread Hidulf

if you just want to add slashes to the data, use addslashes
if you want to get away the alashes from the data, use it in the print or
echo function.

--
Hidulf
http://www.hidulf.com
Caleb Carvalho [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 if i have an array that is fetching the result to be display
 example,
 for ($i =1; $i=sybase_num_rows($result); $i++){
 $row =sybase_fetch_array($result);

   $row[product]
   a href=solution.php?id=$row[prob_title]$row[prob_title]/a
   $row[description]$row[solution]

 where would i put the stripslashes function to get the description?
 ...
 I have tried up and down, but unfortunately am still learning php,

 sorry,

 Caleb Carvalho
 Application Engineer
 LoadRunner/APM
 --
---
 Enterprise Testing and Performance Management Solutions
 --
---
 Mercury Interactive
 410 Frimley Business Park
 Frimley, Surrey.  GU16 7ST
 United Kingdom
 Telephone :  +44 (0)1276 808300


 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




-- 
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] printing comma-delimited lists

2001-10-04 Thread David Otton

What I'm doing here is fairly obvious (build a comma-delimited
string).

$arr = array(1,2,3,4,5);

for ($i=0; $i sizeof($arr); $i++) {
$lis = $lis . $arr[$i];
if ($i != (sizeof($arr)-1)) {
$lis = $lis . ',';
}
}


Question is, is there a more elegant way? I'm thinking of something
like DTML's sequence-start and sequence-end, in a foreach
construction.

djo


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

2001-10-04 Thread Oliver Ruf

Hello 

I'm trying to write some kind of parser... see the example:

$text = [LINK image.png]MyImage[/LINK];

$out = preg_replace (/\[LINK*\]*\[/LINK\]/i,
  /a href=\*\*/a/,$text);

Well... What I would like is, that $out would be something like about this:
a href=image.pngMyImage/a


But this somehow doesn't work because Regexp don't seem to be supported for 
the replacement string...

Any idea ??
Thx, Oliver


-- 
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] printing comma-delimited lists

2001-10-04 Thread Stig-Ørjan Smelror

 What I'm doing here is fairly obvious (build a comma-delimited
string).
 
 $arr = array(1,2,3,4,5);
 
 for ($i=0; $i sizeof($arr); $i++) {
   $lis = $lis . $arr[$i];
   if ($i != (sizeof($arr)-1)) {
   $lis = $lis . ',';
   }
 }
 
 
 Question is, is there a more elegant way? I'm thinking of something
 like DTML's sequence-start and sequence-end, in a foreach
 construction.
 
 djo
 


You could try implode()

$lis = implode(,, $arr);


-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/




-- 
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] Should I convert special characters before writing them to a table?

2001-10-04 Thread René Fournier

The reason I ask is, I'm having a problem processing rows in a table that
contain single quotes (specifically, the PHP code I wrote that allows the
user to duplicate a row doesn't work if the a field in the row has a single
quote in it).

Would it be better for me to strip out the single quotes before the rows are
written, replacing them with another special [harmless] character, and just
dynamically swapping that character out for the orginal when the row is
displayed?  Any thoughts?  I just started doing this PHP/MySQL thing a
couple weeks ago, and I realize I have a lot to learn.  Any suggestions
would be much appreciated.

Oh, and by the way, here is the PHP code for duplicating rows that fails to
execute when a field in the row it's processing contains a single quote.

=
// DUPLICATE
   if ($action == dup) {

$result = mysql_query(SELECT * FROM $table WHERE id=$id,$db);
$myrow = mysql_fetch_array($result);

$comma = ;

for ($i = $priv; $i  $columns; $i++) {
$fld = mysql_field_name($fields, $i);
$set .= $comma.$fld='.$myrow[$i].';
$comma = , ;
}

  // run SQL against the DB
  $sql = INSERT $table SET $set;
  $result = mysql_query($sql);

   $affected = $id;
   echo td width=10img border=0 src=../../common/spacer.gif width=10
height=1/tdtd align=center valign=middle bgcolor=#eespan
class=adminnormalgreyRecord duplicated/span/td;
}
=

Thanks.

...Rene

---
Rene Fournier
[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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] printing comma-delimited lists

2001-10-04 Thread David Otton

On Thu, 4 Oct 2001 16:27:11 +0200 (CEST), you wrote:

You could try implode()

$lis = implode(,, $arr);

That'll do it; thanks.

djo


-- 
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] need phpmyAdmin but no so good

2001-10-04 Thread Michael A. Peters

http://www.webmin.com/webmin/

On Thu, 4 Oct 2001 10:48:57 +0200
[EMAIL PROTECTED] wrote:

 Hi:
 I'm looking for a mysql administrator but no so good as
 phpmyAdmin, just listing dbs, tables, insert, delete, edit
 options; no create or alter tables and dbs
 
 anybody knows about?
 thanks in advance
  


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/

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

2001-10-04 Thread Roger Bryant

All,

I have searched high and low through the lists to find
a solution to this problem but none of the suggestions
appear to work for me.

I have added a download button to a web-site that
enables users to download images to their local
drives. (I'm using a button as I want to wrap some
logic round this function) I have the following
(simplified code )that will be called from the
web-site when the button is clicked. 

header(Content-type: application/octet-stream);
header( Content-Disposition: attachment;
filename=01lg.jpg);
$filename= c:/program files/apache
group/apache/kidz/gallery/download/01lg.jpg;
include($filename);

The result is the SaveAs box appears and the image is
being downloaded with the correct name however when I
try and re-open the image i get the message invalid
header. Does anyone have any ideas?

Vesrions are PHP 3,IE6, Windows ME.

Thanks very much in advance,

Roger



__
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: Should I convert special characters before writing them to a table?

2001-10-04 Thread Oliver Ruf

Hi

ASFAIK, the quote character (') is used in ANSI-SQL (and also in MySQL)
as string-delimiter... (e.g. SELECT * FROM users WHERE name = 'admin';)

So I definitvely would replace the character or you'll might run into 
problems with SQL. 

Maybe there's another and better solution, but it should be no big thing to 
exchange the quotes quickly.

-- Cheers, Oliver




[EMAIL PROTECTED] (René fournier) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

 The reason I ask is, I'm having a problem processing rows in a table
 that contain single quotes (specifically, the PHP code I wrote that
 allows the user to duplicate a row doesn't work if the a field in the
 row has a single quote in it).
 
 Would it be better for me to strip out the single quotes before the
 rows are written, replacing them with another special [harmless]
 character, and just dynamically swapping that character out for the
 orginal when the row is displayed?  Any thoughts?  I just started doing
 this PHP/MySQL thing a couple weeks ago, and I realize I have a lot to
 learn.  Any suggestions would be much appreciated.
 
 Oh, and by the way, here is the PHP code for duplicating rows that
 fails to execute when a field in the row it's processing contains a
 single quote. 
 
 =
 // DUPLICATE
if ($action == dup) {
 
   $result = mysql_query(SELECT * FROM $table WHERE
   id=$id,$db); $myrow = mysql_fetch_array($result);
 
 $comma = ;
 
 for ($i = $priv; $i  $columns; $i++) {
  $fld = mysql_field_name($fields, $i);
 $set .= $comma.$fld='.$myrow[$i].';
 $comma = , ;
  }
 
 // run SQL against the DB
$sql = INSERT $table SET $set;
$result = mysql_query($sql);
 
$affected = $id;
echo td width=10img border=0 src=../../common/spacer.gif
width=10 
 height=1/tdtd align=center valign=middle bgcolor=#eespan
 class=adminnormalgreyRecord duplicated/span/td;
  }
 =
 
 Thanks.
 
 ...Rene
 
 ---
 Rene Fournier
 [EMAIL PROTECTED]
 
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.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] Downloading Images

2001-10-04 Thread David Otton

On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote:

I have added a download button to a web-site that
enables users to download images to their local
drives. (I'm using a button as I want to wrap some
logic round this function) I have the following
(simplified code )that will be called from the
web-site when the button is clicked. 

header(Content-type: application/octet-stream);
header( Content-Disposition: attachment;
filename=01lg.jpg);   
$filename= c:/program files/apache
group/apache/kidz/gallery/download/01lg.jpg;
   include($filename);

The result is the SaveAs box appears and the image is
being downloaded with the correct name however when I
try and re-open the image i get the message invalid
header. Does anyone have any ideas?

What does the downloaded file look like internally? Open it in a hex
editor (or even just Notepad). Check the file-lengths of the original
and copy. My guess is you're saving an error message with a .jpeg
extension.

djo


-- 
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] Should I convert special characters before writing them to a table?

2001-10-04 Thread Steve Werby

René Fournier [EMAIL PROTECTED] wrote:
 The reason I ask is, I'm having a problem processing rows in a table that
 contain single quotes (specifically, the PHP code I wrote that allows the
 user to duplicate a row doesn't work if the a field in the row has a
single
 quote in it).

Try addslashes() before executing the query and stripslashes() when
retrieving data from the db.  See the online manual for more details.

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




[PHP] need phpmyAdmin but no so good

2001-10-04 Thread ani

Michael:

Webmin is a web-based administration interface for
Unix systems but I need something like phpmyAdmin
just for managing the info in databasesj ust listing dbs,
tables, insert, delete, edit options; no create or alter
tables and dbs.

Thanks anyway, this webmin is interesting also


Aniceto Lopez
www.laMundial.net


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

2001-10-04 Thread Steve Werby

Caleb Carvalho [EMAIL PROTECTED] wrote:
 if i have an array that is fetching the result to be display
 example,
 for ($i =1; $i=sybase_num_rows($result); $i++){
 $row =sybase_fetch_array($result);

   $row[product]
   a href=solution.php?id=$row[prob_title]$row[prob_title]/a
   $row[description]$row[solution]

 where would i put the stripslashes function to get the description?

$var = $row[product] . 'a href=solution.php?id=' . $row[prob_title] . '' .
$row[prob_title] .
'/a' . stripslashes( $row[description] ) . $row[solution];

--
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] need phpmyAdmin but no so good

2001-10-04 Thread Steve Werby

[EMAIL PROTECTED] wrote:
 Webmin is a web-based administration interface for
 Unix systems but I need something like phpmyAdmin
 just for managing the info in databasesj ust listing dbs,
 tables, insert, delete, edit options; no create or alter
 tables and dbs.

You could pretty easily remove the form elements from phpMyAdmin that allow
the functions you don't want.  Quick and painless.  You may want to remove
PHP code from phpMyAdmin itself in case phpMyAdmin doesn't check to ensure
form data was posted (vs from a get method) and that data came from a page
in the phpMyAdmin session.  Or you could reinvent the wheel.

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

2001-10-04 Thread Roger Bryant

Hi Dave,

Thanks for you prompt response. The Image is indeed a
different length, (3k as opposed to the original 9k) I
originally did have an error message appended to the
downloaded image but that no longer appears to be the
case. However the image is definitely truncated. Any
ideas why this may be happening? Please find attached
downloaded image.

Thanks,

Roger
--- David Otton [EMAIL PROTECTED] wrote:
 On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote:
 
 I have added a download button to a web-site that
 enables users to download images to their local
 drives. (I'm using a button as I want to wrap some
 logic round this function) I have the following
 (simplified code )that will be called from the
 web-site when the button is clicked. 
 
 header(Content-type: application/octet-stream);
 header( Content-Disposition: attachment;
 filename=01lg.jpg); 
 $filename= c:/program files/apache
 group/apache/kidz/gallery/download/01lg.jpg;
  include($filename);
 
 The result is the SaveAs box appears and the image
 is
 being downloaded with the correct name however when
 I
 try and re-open the image i get the message invalid
 header. Does anyone have any ideas?
 
 What does the downloaded file look like internally?
 Open it in a hex
 editor (or even just Notepad). Check the
 file-lengths of the original
 and copy. My guess is you're saving an error message
 with a .jpeg
 extension.
 
 djo
 
 
 -- 
 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]
 


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
inline: 01lg.jpg
-- 
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] Should I convert special characters before writing them to a table?

2001-10-04 Thread Arpad Tamas

 Try addslashes() before executing the query and stripslashes() when
 retrieving data from the db.  See the online manual for more
 details.

I think stripslashes() isn't needed when retrieving data from the db, 
it is needed only in the query string to protect special chars from 
interpretting them as sql.

 Arpi

-- 
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 a Bloated Kludge, discuss!

2001-10-04 Thread Ben . Edwards

(From behind filing cabinet where I am ducking preparing for flames).

Is it just me or is there anyone else that thinks PHP suffers from not
being modular.  Let me explain myself.  If you write a module for a lot of
procedural languages it sits on the filling system and is called up when it
is needed , loaded into memory and executed. There maybe some cashing which
happens but this is basically how it works.

PHP on the other hand seems to load in ALL the code that MAY be run. i.e.
an include brings things in which are inside an if,  even if the if equates
to false.

This means that the language is not extendible in the way others are.  If
you do write a function you wish to include in 'only the pages you wish to
use'  you have to first include it, then call it.

This has also meant that things like spell checking functions are built
into the core module rather than called in as or when they are needed.

Then there is the way database connectivity is handled.

There are a load of functions (again in the core language) with there NAMES
containing the name of the database you are connecting to.

For example all MySQL functions are mysql_something and I guess all oracle
ones are oracle_something.  This would only be a minor inconvenience
because wrapper functions can be written but from what I can gather
different databases have different functionality available.

I know this is partly because different databases have different
functionality.  what I would expect to see is a load of generic function
which attempt to provide same functionality where it is available or
implement some of the functionality themselves.  Obviously for some of the
less sophisticated databases these functions would have to do more work and
maybe some functionality wouldn't be available in certain databases (but
only the things like stored procedures).

Got a nast feeling that ASP (spit) does something like this.

You may cry, it cant be done.  however I remember a connectivity product
that came from Borland (this was back in the Paradox Days) which did just
this, it even had transaction handling built into this connectivity layer
for DBase!

Anyway I am playing Devils Advocate.

What I do like about PHP is how quickly it can be learnt and how quick you
can build apps with it.  Maybe this is at the expense of elegance.  Maybe
PHP5 will address these issues -;)

And there are certainly some very busy PHP sites, you should see the
traffic levels on indymedia.org during anti-capitalist demonstrations and I
am sure during the New York attacks they went belistic.

Regards,
Ben


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

2001-10-04 Thread Caleb Carvalho

Steve,

Thank you very much,

i will try it now..




Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300



From: Steve Werby [EMAIL PROTECTED]
To: Caleb Carvalho [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] stripslashes
Date: Thu, 4 Oct 2001 10:47:27 -0400

Caleb Carvalho [EMAIL PROTECTED] wrote:
  if i have an array that is fetching the result to be display
  example,
  for ($i =1; $i=sybase_num_rows($result); $i++){
  $row =sybase_fetch_array($result);
 
$row[product]
a href=solution.php?id=$row[prob_title]$row[prob_title]/a
$row[description]$row[solution]
 
  where would i put the stripslashes function to get the description?

$var = $row[product] . 'a href=solution.php?id=' . $row[prob_title] . '' 
.
$row[prob_title] .
'/a' . stripslashes( $row[description] ) . $row[solution];

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






_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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 a Bloated Kludge, discuss!

2001-10-04 Thread Oliver Ruf

Well about beeing modular...
Have you ever programmed java ?? Java is very modular and everyting in java
is programmed with classes. 

So... PHP also suports classes. Now you should be able to build your own 
modularity as you like it...

Enough said...
-Oliver


[EMAIL PROTECTED] (Ben Edwards) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

 (From behind filing cabinet where I am ducking preparing for flames).
 
 Is it just me or is there anyone else that thinks PHP suffers from not
 being modular.  Let me explain myself.  If you write a module for a lot
 of procedural languages it sits on the filling system and is called up
 when it is needed , loaded into memory and executed. There maybe some
 cashing which happens but this is basically how it works.
 
 PHP on the other hand seems to load in ALL the code that MAY be run.
 i.e. an include brings things in which are inside an if,  even if the
 if equates to false.
 
 This means that the language is not extendible in the way others are. 
 If you do write a function you wish to include in 'only the pages you
 wish to use'  you have to first include it, then call it.
 
 This has also meant that things like spell checking functions are built
 into the core module rather than called in as or when they are needed.
 
 Then there is the way database connectivity is handled.
 
 There are a load of functions (again in the core language) with there
 NAMES containing the name of the database you are connecting to.
 
 For example all MySQL functions are mysql_something and I guess all
 oracle ones are oracle_something.  This would only be a minor
 inconvenience because wrapper functions can be written but from what I
 can gather different databases have different functionality available.
 
 I know this is partly because different databases have different
 functionality.  what I would expect to see is a load of generic
 function which attempt to provide same functionality where it is
 available or implement some of the functionality themselves.  Obviously
 for some of the less sophisticated databases these functions would have
 to do more work and maybe some functionality wouldn't be available in
 certain databases (but only the things like stored procedures).
 
 Got a nast feeling that ASP (spit) does something like this.
 
 You may cry, it cant be done.  however I remember a connectivity
 product that came from Borland (this was back in the Paradox Days)
 which did just this, it even had transaction handling built into this
 connectivity layer for DBase!
 
 Anyway I am playing Devils Advocate.
 
 What I do like about PHP is how quickly it can be learnt and how quick
 you can build apps with it.  Maybe this is at the expense of elegance. 
 Maybe PHP5 will address these issues -;)
 
 And there are certainly some very busy PHP sites, you should see the
 traffic levels on indymedia.org during anti-capitalist demonstrations
 and I am sure during the New York attacks they went belistic.
 
 Regards,
 Ben
 
 


-- 
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] MySQL tables are read-only

2001-10-04 Thread Alfredeen, Johan

My webhost recently migrated my site over to a new server and IP. Everything
looks ok, except that all my MySQL tables now are read-only (at least that's
the error I get when trying to delete or insert records). How do I change
the tables back to write? Can I switch individual tables to write or is
there a setting to set the whole db instance to write?

I am using MySQL 3.23.32 and phpAdmin 2.2.0rc3. I appreciate your help.

Johan Alfredeen
www.pongworld.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] Downloading Images

2001-10-04 Thread David Otton

On Thu, 4 Oct 2001 07:51:59 -0700 (PDT), you wrote:

different length, (3k as opposed to the original 9k) I
originally did have an error message appended to the
downloaded image but that no longer appears to be the
case. However the image is definitely truncated. Any

All the JPEGs I have here end with (FF D9), as does yours. However,
it's missing the header (which starts (FF D8) and has the string JFIF
in it.) I would guess you're only saving the last 2497 bytes of the
file to disc.

As to why... maybe your script isn't seperating headers and body
properly, and a big chunk of file is being thrown away by the browser
as an unrecognised header?

ideas why this may be happening? Please find attached
downloaded image.

BTW, I'm not sure that sending binaries to a discussion list is a
bright idea.

djo


-- 
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] check if file is already in use before fopen

2001-10-04 Thread Matthew Luchak
Title: Blank



Is there a way to verify if a file is in use 
by another user before fopening it? 
 Matthew 
Luchak Webmaster Kaydara 
Inc. [EMAIL PROTECTED] 



[PHP] RE: check if file is already in use before fopen

2001-10-04 Thread Matthew Luchak
Title: Blank



damn... RTFM. I 
just now discovered flock. Sorry 'bout that.

ps. Don't flame me 
for being rude to the original poster. I am the original 
poster

 Matthew 
Luchak Webmaster Kaydara 
Inc. [EMAIL PROTECTED] 

  -Original Message-From: Matthew Luchak 
  Sent: Thursday, October 04, 2001 11:11 AMTo: 
  '[EMAIL PROTECTED]'Subject: check if file is already in use 
  before fopen 
  Is there a way to verify if a file is in 
  use by another user before fopening it? 
   Matthew 
  Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] 
  
  


RE: [PHP] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread php

On a conceptual level, I for one am a great fan of the kludge.

Every piece of software is a trade off between performance and speed of
development.

You can have the fastest app in the world for $1,000,000 in development time
OR
you can write up a in-elegant solution in 5minutes ($50) and if its slow buy
a bigger
server for  $5000.

You choose.

Taken in relation to PHP. I would rather have the developers of it release
new code
that is not optimized, then have 1 release every two years, full of very
pretty blocks
of code designed to make the hardcore OOP textbook fanatic orgasm.

 Check out mozilla.org if you want to see what elegant programmers can do.
- 2 years later a web browser intended to be small and fast, can know take
out your trash,
 wash your car - and guess what?
no release 1.0 yet.


Sean








-- 
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-04 Thread Jason Dulberg

$site_style ranges from 1 - 11

$site_style 1 - 7,11 use the same css style.
$site_style 8,9 use the same css 
$site_stylye 10 uses different css from them all.

Thanks for your time.

Jason

 -Original Message-
 From: David Robley [mailto:[EMAIL PROTECTED]]
 Sent: October 4, 2001 2:48 AM
 To: Jason Dulberg; Rasmus Lerdorf
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] php in css not working with IF's
 
 
 On Thu,  4 Oct 2001 16:04, Jason Dulberg wrote:
  Should I stick with
 
  if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))
 
  or
 
  if($site_style != ('10' or '9' or '8'))
 
 As has been pointed out, that latter won't work. What is the range of 
 possible values for $site_style? If it is 10 or less, then you could 
 simply rephrase the test to
 
 if($site_style  8)
 
 or alternatively, if the range is 0 to more than 10
 
 if( $site_style  8 || $site_style  10 )
 
 
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
Ici nous voyons le tour Eiffel! Tom parried.
 

-- 
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 is a Bloated Kludge, discuss!

2001-10-04 Thread Steve Edberg

At 4:48 PM +0200 10/4/01, [EMAIL PROTECTED] wrote:
(From behind filing cabinet where I am ducking preparing for flames).

Is it just me or is there anyone else that thinks PHP suffers from not
being modular.  Let me explain myself.  If you write a module for a lot of
procedural languages it sits on the filling system and is called up when it
is needed , loaded into memory and executed. There maybe some cashing which
happens but this is basically how it works.

PHP on the other hand seems to load in ALL the code that MAY be run. i.e.
an include brings things in which are inside an if,  even if the if equates
to false.


Not true; require() has this behavior, but include() does not. See

http://php.he.net/manual/en/function.require.php
and
http://php.he.net/manual/en/function.include.php


-steve



This means that the language is not extendible in the way others are.  If
you do write a function you wish to include in 'only the pages you wish to
use'  you have to first include it, then call it.

This has also meant that things like spell checking functions are built
into the core module rather than called in as or when they are needed.

Then there is the way database connectivity is handled.

There are a load of functions (again in the core language) with there NAMES
containing the name of the database you are connecting to.

For example all MySQL functions are mysql_something and I guess all oracle
ones are oracle_something.  This would only be a minor inconvenience
because wrapper functions can be written but from what I can gather
different databases have different functionality available.

I know this is partly because different databases have different
functionality.  what I would expect to see is a load of generic function
which attempt to provide same functionality where it is available or
implement some of the functionality themselves.  Obviously for some of the
less sophisticated databases these functions would have to do more work and
maybe some functionality wouldn't be available in certain databases (but
only the things like stored procedures).


If you can deal with the 'lowest common denominator' approach, use 
ODBC. Or, as you mentioned, use one of the db wrapper classes 
available in PHPLIB, PEAR or Metabase.


-steve

-- 
+ Open source questions? +
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+--- http://pgfsun.ucdavis.edu/open-source-tools.html ---+

-- 
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] Should I convert special characters before writing them to a table?

2001-10-04 Thread Steve Werby

Arpad Tamas [EMAIL PROTECTED] wrote:
 I think stripslashes() isn't needed when retrieving data from the db,
 it is needed only in the query string to protect special chars from
 interpretting them as sql.

I want to say this isn't true, but maybe that depends on the configuration
of PHP (I'm thinking magic quotes settings off-hand).  From experience I
know that stripslashes() can be needed when retrieving data from a db.  Just
today I've had to do so for clients separately using PostgreSQL and MySQL.
YMMV.

--
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] Using Array of classes as a class member variable?

2001-10-04 Thread Papp Gyozo


 First some basic questions:
 (1) Can you create an unitialised array ?
do you mean:

 $array = array(); // creates an empty array;

 (2) Can an unitinialised array be a class member variable ?

for( $i = 0 ; $i  5; $i++)
$array[] = new User();

I think it should work.

 I have a class called user - which represents one row in a mySQL table
 (also called user)

 I want to create a class called userBag - this class will contain an
 array of user classes - the constructor for userBag gets an SQL
 statement and uses this do decide which users to place in the userBag

 Maybe I'm going about this all worng, but is there some other way I can
 store a variable number of classes (Such as a CObject class in MFC for
 Visual C++) - i.e. is there soem other collection class/type I don't know
 of ?

 Thanks,

 Martin.


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

2001-10-04 Thread Oliver Ruf

It worked !!

Thank you very much for your help!

- Yours, Oliver

[EMAIL PROTECTED] (Papp Gyozo) wrote in 
news:003701c14cf0$d7363300$01fdfea9@jaguar:

 $text = [LINK image.png]MyImage[/LINK];
 $out = preg_replace (|\[LINK(.*)\](.*)\[/LINK\]|iU, 'a
 href=\1\2/a',$text);
 
 I hope, I don't forget anything.
 
 
 - Original Message -
 From: Oliver Ruf [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, October 04, 2001 4:23 PM
 Subject: [PHP] preg_replace
 
 
 Hello

 I'm trying to write some kind of parser... see the example:

 $text = [LINK image.png]MyImage[/LINK];

 $out = preg_replace (/\[LINK*\]*\[/LINK\]/i, /a
 href=\*\*/a/,$text); 

 Well... What I would like is, that $out would be something like about
 this: a href=image.pngMyImage/a


 But this somehow doesn't work because Regexp don't seem to be supported
 for the replacement string...

 Any idea ??
 Thx, Oliver


 --
 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] file maniputation??

2001-10-04 Thread Gerard Samuel

The code is being written for both Unix and windows boxes, so I had to 
include the 'b' option

Maxim Maletsky (PHPBeginner.com) wrote:

 Not sure, but this 'wb' looks suspicious to me.
 
From the manual:
 
 The mode may contain the letter 'b'. This is useful only on systems
 which differentiate between binary and text files (i.e. Windows. It's
 useless on Unix). If not needed, this will be ignored. 
 
 Can you ignore it as well?
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 -Original Message-
 From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
 Sent: mercoledi 3 ottobre 2001 23.08
 To: PHP
 Subject: [PHP] file maniputation??
 
 
 Hey all.  I have a script that uses that creates/manipulates files, and 
 it works great on my end.  Thats no question.  There is a small 
 percentage of my users that when they try to run the file it cannot 
 create or modify files.  I suspected file ownership may be wrong on 
 files and directories.  Just in case Im wrong, what else could be the 
 matter??
 
 Example code.
 $file = foo/bar/example.php;
 $config = array(x, y, z);
 if ($fp = fopen($config_file, wb)) {
  foreach ($config as $line) {
  fwrite($fp, $line\n);
  }
 
 Example error.
 Warning: fopen(foo/bar/example.php,wb) - Permission denied in
 /usr/local/psa/home/vhosts/httpsdocs/install.php on line 3429
 
 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]




RE: [PHP] Re: PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Chris Bailey

Ben, I think you hit on one of the key points of PHP in the latter part of
your email.  My take is that PHP is designed to be quick to learn, quick to
use, and somewhat simple (not in a bad way).  I agree that as compared to
most languages, more than usual is packed into the base system.  But, given
the speed of PHP, and that these are likely heavily used pieces anyway, it
doesn't seem so bad.

I think once you step away from what's in the base PHP distro, then PHP is
nearly as modular as anything else.  As Oliver mentioned, you can use
classes nicely (not as good as Java or Python, but not bad), and you can
obviously split your code up into many files, include what you need, etc.

I'm not clear on the comments about an include bringing in everything even
if it's in an if that evaluates to false.  Java is no better in this case
really, and neither is C++ or various others.  Also, PHP actually does have
a way of only including something in a section of code that gets run (i.e.
it's included at runtime, not parse time).  This is the difference between
include_once() and require_once().  So, if you only want something included
if some expression evaluates to true, just stick an include_once() inside
that expression's scope.  If I misunderstood your comments about this, my
apologies, and maybe you can elaborate here.

-Original Message-
From: Oliver Ruf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 8:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP is a Bloated Kludge, discuss!


Well about beeing modular...
Have you ever programmed java ?? Java is very modular and everyting in java
is programmed with classes.

So... PHP also suports classes. Now you should be able to build your own
modularity as you like it...

Enough said...
-Oliver


[EMAIL PROTECTED] (Ben Edwards) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

 (From behind filing cabinet where I am ducking preparing for flames).

 Is it just me or is there anyone else that thinks PHP suffers from not
 being modular.  Let me explain myself.  If you write a module for a lot
 of procedural languages it sits on the filling system and is called up
 when it is needed , loaded into memory and executed. There maybe some
 cashing which happens but this is basically how it works.

 PHP on the other hand seems to load in ALL the code that MAY be run.
 i.e. an include brings things in which are inside an if,  even if the
 if equates to false.

 This means that the language is not extendible in the way others are.
 If you do write a function you wish to include in 'only the pages you
 wish to use'  you have to first include it, then call it.

 This has also meant that things like spell checking functions are built
 into the core module rather than called in as or when they are needed.

 Then there is the way database connectivity is handled.

 There are a load of functions (again in the core language) with there
 NAMES containing the name of the database you are connecting to.

 For example all MySQL functions are mysql_something and I guess all
 oracle ones are oracle_something.  This would only be a minor
 inconvenience because wrapper functions can be written but from what I
 can gather different databases have different functionality available.

 I know this is partly because different databases have different
 functionality.  what I would expect to see is a load of generic
 function which attempt to provide same functionality where it is
 available or implement some of the functionality themselves.  Obviously
 for some of the less sophisticated databases these functions would have
 to do more work and maybe some functionality wouldn't be available in
 certain databases (but only the things like stored procedures).

 Got a nast feeling that ASP (spit) does something like this.

 You may cry, it cant be done.  however I remember a connectivity
 product that came from Borland (this was back in the Paradox Days)
 which did just this, it even had transaction handling built into this
 connectivity layer for DBase!

 Anyway I am playing Devils Advocate.

 What I do like about PHP is how quickly it can be learnt and how quick
 you can build apps with it.  Maybe this is at the expense of elegance.
 Maybe PHP5 will address these issues -;)

 And there are certainly some very busy PHP sites, you should see the
 traffic levels on indymedia.org during anti-capitalist demonstrations
 and I am sure during the New York attacks they went belistic.

 Regards,
 Ben




--
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] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Rasmus Lerdorf

 PHP on the other hand seems to load in ALL the code that MAY be run. i.e.
 an include brings things in which are inside an if,  even if the if equates
 to false.

That's not true.

  if(condition) include 'file';

That will only include the file if the condition is true.  Very easy to
verify for yourself.  So a bunch of your points related to this are void.

 Then there is the way database connectivity is handled.

 There are a load of functions (again in the core language) with there NAMES
 containing the name of the database you are connecting to.

 For example all MySQL functions are mysql_something and I guess all oracle
 ones are oracle_something.  This would only be a minor inconvenience
 because wrapper functions can be written but from what I can gather
 different databases have different functionality available.

There is both a C-level abstraction layer called dbx and a user-space one
in PEAR.  Plus a number of others.  So again, this makes your next points
void.

 Got a nast feeling that ASP (spit) does something like this.

As does PHP if you had bothered to look.

-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] Flexible, Component-based and Large Application Systems in PHP

2001-10-04 Thread Lucas Persona

Greetings,

  I'd like to know if anyone has any material regarding the use of 
PHP on large projects that needs to be flexible and kind of 'component
based' (like multiples modules) and what were the benefits and problems
found during development/deployment/runtime.
  I think something like JavaBeans could make it but am not sure if 
PHP can hadle that too with great success and perhaps, faster than 
JavaBeans.
  If anyone has some material on creating (structure) of a system like 
this with PHP or other related material about this topic (like 
disadvantages in using PHP for this) I would be glad.

Thanks,
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] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Ben . Edwards


Exelent, as I said I was playing devels advicate, I like PHP a lot, I am
trying to get someone else to use it to and they came up with this stuff.

 if(condition) include 'file';

Is exactly what I was looking for.  As 'if () {}' loaded, or at least
parsed things I did'nt think another form of if would be different ( RFM-;)
).  Maybe I should stop developing for a while and have a good wade through
the manual.  Its so easy to do stuff in PHP it's easy to get lazy!

Thanks,
Ben





Rasmus Lerdorf [EMAIL PROTECTED] on 04/10/2001 18:21:28



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


 PHP on the other hand seems to load in ALL the code that MAY be run. i.e.
 an include brings things in which are inside an if,  even if the if
equates
 to false.

That's not true.

  if(condition) include 'file';

That will only include the file if the condition is true.  Very easy to
verify for yourself.  So a bunch of your points related to this are void.

 Then there is the way database connectivity is handled.

 There are a load of functions (again in the core language) with there
NAMES
 containing the name of the database you are connecting to.

 For example all MySQL functions are mysql_something and I guess all
oracle
 ones are oracle_something.  This would only be a minor inconvenience
 because wrapper functions can be written but from what I can gather
 different databases have different functionality available.

There is both a C-level abstraction layer called dbx and a user-space one
in PEAR.  Plus a number of others.  So again, this makes your next points
void.

 Got a nast feeling that ASP (spit) does something like this.

As does PHP if you had bothered to look.

-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] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Rasmus Lerdorf

 Exelent, as I said I was playing devels advicate, I like PHP a lot, I am
 trying to get someone else to use it to and they came up with this stuff.

  if(condition) include 'file';

 Is exactly what I was looking for.  As 'if () {}' loaded, or at least
 parsed things I did'nt think another form of if would be different ( RFM-;)
 ).  Maybe I should stop developing for a while and have a good wade through
 the manual.  Its so easy to do stuff in PHP it's easy to get lazy!

  if(condition) {
 include 'file';
  }

is no different.

-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] Flexible, Component-based and Large Application Systemsin PHP

2001-10-04 Thread Tim

On Thu, 2001-10-04 at 13:51, Lucas Persona wrote:
   I'd like to know if anyone has any material regarding the use of 
 PHP on large projects that needs to be flexible and kind of 'component
 based' (like multiples modules) and what were the benefits and problems
 found during development/deployment/runtime.
   I think something like JavaBeans could make it but am not sure if 
 PHP can hadle that too with great success and perhaps, faster than 
 JavaBeans.

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

A key is using the correct infrastructure and doing your
design/architecture work up-front, rather than just slogging out a lot
of PHP code and HTML all mixed together.

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



-- 
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] ad rotation program

2001-10-04 Thread Joseph Bannon

Has anyone on this list developed an ad rotation program in PHP?

Joseph





















-- 
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-04 Thread Markus Fischer

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=13545edit=1
 
 
 -- 
 PHP Development 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]

-- 
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] ad rotation program

2001-10-04 Thread Wandrer

At 01:37 PM 10/4/01 -0500, you wrote:
Has anyone on this list developed an ad rotation program in PHP?
Joseph
PHP General Mailing List (http://www.php.net/)

Joseph,

dotBanner ( http://www.dot-banner.com ) is the one that I work on.

We have your script pushing well over 6 million impressions per day with 
no problem.
- Robert

...out of all the software I have bought on the net, you have provided me 
with the BEST service, HANDS DOWN man... You should be very proud of this 
man... thanks so much!
-Deejay

Paul

-
  dotBanner www.dot-banner.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] popup window under php

2001-10-04 Thread Tim Sawyer

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]




Re: [PHP] ad rotation program

2001-10-04 Thread Matt \TrollBoy\ Wiseman

I use phpAds.. it works well enough despite its lack of features..

Matt TrollBoy Wiseman
Webmaster: Shoggoth.net
Site Designer: phpslash.org
The oldest and strongest emotion of mankind is fear,
and the oldest and strongest kind of fear is fear of the unknown.
-H.P. Lovecraft
-
Please do not resell my e-mail address
to anyone or send me unsolicited e-mail
-

- Original Message - 
From: Joseph Bannon [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 2:37 PM
Subject: [PHP] ad rotation program


 Has anyone on this list developed an ad rotation program in PHP?
 
 Joseph
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 -- 
 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: popup window under php

2001-10-04 Thread Henrik Hansen

[EMAIL PROTECTED] (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.

you need to put tha javascript in script tags and just echo it all
in the if block.

-- 
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] Re: popup window under php

2001-10-04 Thread Thomas Deliduka

You could also wait for the page to load and then invoke the JS by putting
an onLoad=function_name() in the 'BODY' tag of the document.

On 10/4/2001 3:58 PM this was written:

 [EMAIL PROTECTED] (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.
 
 you need to put tha javascript in script tags and just echo it all
 in the if block.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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] session.cookie_lifetime

2001-10-04 Thread Ben-Nes Michael

Hi All

I configured apache + php on debian system

The problem is that session is not destroyed when the browser closed.

the php.ini is /usr/local/lib and working ( i tried to see if its affecting
by putting engine = On to Off )

in php.ini this is set to 0 = session.cookie_lifetime = 0

/tmp is allright and apache write the session with the right permission

I tried this script, but the counter keep growing even if I close all
browser windows ( tried mozilla  ie on two computers )
?
session_register(count);
$count++;
echo $count;
?

i configured php with
./configure --with-pgsql --with-apxs=/usr/local/apache/bin/apxs --enable-sys
vshm=yes --enable-sysvsem=yes --enable-trans-sid

and also without --enable-trans-sid

any ideas ?

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] check if file is already in use before fopen

2001-10-04 Thread Jason Stechschulte

On Thu, Oct 04, 2001 at 11:10:56AM -0400, Matthew Luchak wrote:
 Is there a way to verify if a file is in use by another user before
 fopening it?  

As far as I know this is something you have to program in yourself.  If
you are only worried about your programs accessing the file, then it is
a good idea to create a lock file.  Before you access a file called
mydata, check for a file called mydata.lock.  If that exists, then the
file is in use, so wait and check later.  If it does not exist, create a
file called mydata.lock, open mydata, do with it as you please, close
mydata, and delete mydata.lock.  

You also have to be prepared to handle a situation where your program
stops before removing the lock file.  Usually with PHP, it is much
easier to just use a database so all this file locking is dealt with by
the database and not you.
-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Sorry.  My testing organization is either too small, or too large, depending
on how you look at it.  :-)
 -- Larry Wall in [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] PHP Warning: Unable to load dynamic library

2001-10-04 Thread Edson Toshiya

Hi,

I'm trying to load ming as a module of PHP, but I get an error when loading
apache:

PHP Warning:  Unable to load dynamic library './php_ming.so' -
./php_ming.so: cannot open shared object file: No such file or directory in
Unknown on line 0

Can someone help me ?

Thanks,

ET



-- 
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] RE: This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-04 Thread Chris Hayes


  According to him, if you add
  '?=PHPE9568F36-D428-11d2-A769-00AA001ACF42'

http://www.phpbuilder.com/mail/php4-beta/24/0796.php


---
-
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the 
Netherlands  --
---
-

 


-- 
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] howw do I programm a PREV Next mechanism in PHP? Help Please!!

2001-10-04 Thread Lasse


Steve Werby [EMAIL PROTECTED] wrote in message
news:0c3701c14d18$3505c910$6401a8c0@workstation7...
[SNIPs]
 http://www.tysonchandler.com/news_3.html (that's an underscore, not a
 space).

Is it just me or is this site blazingly fast? Are you using some
cache-tricks or something? Or du you just have an over-powered under-loaded
server?

I could use a bit of speed at my own site.. :-)

--
Lasse




-- 
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] ad rotation program

2001-10-04 Thread Michael Geier, CDM Systems Admin

check out Oasis on Freshmeat...I haven't used it, but I did notice it on
there.
also, as already posted, PHPads.

-Original Message-
From: Wandrer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 2:12 PM
To: Joseph Bannon
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] ad rotation program


At 01:37 PM 10/4/01 -0500, you wrote:
Has anyone on this list developed an ad rotation program in PHP?
Joseph
PHP General Mailing List (http://www.php.net/)

Joseph,

dotBanner ( http://www.dot-banner.com ) is the one that I work on.

We have your script pushing well over 6 million impressions per day with
no problem.
- Robert

...out of all the software I have bought on the net, you have provided me
with the BEST service, HANDS DOWN man... You should be very proud of this
man... thanks so much!
-Deejay

Paul

-
  dotBanner www.dot-banner.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 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] Getting an Email into a PHP/pl script

2001-10-04 Thread Chris Aitken

Hi all,

I have looked into the archives but im not sure what im searching for so I 
decided to ask here.

What I want to do is, on my FreeBSD box running PHP and MySQL, to have a 
system which will take any email sent to a specific address, and pipe the 
body of the email to PHP (or even to a perl script). Once I have the body 
of the email as a variable, I can do all my parsing and extracting etc to 
do with it as I need, but im baffled on where to start looking to get this 
done.

Any help would be greatly appreciated.



Cheers


Chris



 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
It is said that if you line up all the cars in the world end to end,
  some moron in a rotary will still to try and pass them


-- 
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] newbie - some simple questions

2001-10-04 Thread John A. Grant

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
[...]

Thanks for the help  tips. I guess I'll use .inc for files that
are included (as opposed to being run directly) and block
access to them at the server level.  Hmm, since the directory
always has an index.html, clients will never see the filename
anyway and could only run it by guessing at the name, so
it's a small point.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here





-- 
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] Getting an Email into a PHP/pl script

2001-10-04 Thread rick fletcher

There's a good php POP3 class available here:
http://www.thewebmasters.net/php/POP3.phtml

That will enable you to log into your mail server and retrieve a mail
message from it.

 -Original Message-
 From: Chris Aitken [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 2:54 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP] Getting an Email into a PHP/pl script
 
 Hi all,
 
 I have looked into the archives but im not sure what im searching for
so I
 decided to ask here.
 
 What I want to do is, on my FreeBSD box running PHP and MySQL, to have
a
 system which will take any email sent to a specific address, and pipe
the
 body of the email to PHP (or even to a perl script). Once I have the
body
 of the email as a variable, I can do all my parsing and extracting etc
to
 do with it as I need, but im baffled on where to start looking to get
this
 done.
 
 Any help would be greatly appreciated.
 
 
 
 Cheers
 
 
 Chris
 
 
 
  Chris Aitken - Administration/Database Designer - IDEAL Internet
   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628
8890
   __-__
 It is said that if you line up all the cars in the world end to
end,
   some moron in a rotary will still to try and pass them
 
 
 --
 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] read file twice or read into array once?

2001-10-04 Thread John A. Grant

I have a file containing ~100 lines of text, each perhaps 100-200
characters in length.  I need to retrieve line $n from the file, where:
$n = $julianday % $nlines;

$julianday = today's date (from localtime[7])
$nlines = no. of lines in the file

Method A
0. fopen() the file
1. read the file line by line with fgets() and count the lines ($nlines)
2. compute the required entry: $n=$julianday % $nline
3. rewind() the file and read it again until entry $n is found
4. fclose() the file

Method B
1. read the entire file into memory: $lines=file(myfile)
2. compute the required entry: $n=$julianday % count($lines)

I appreciate that this depends on the no. of lines in the file and
the size of the file. What I'm looking for is opinions on whether
the use of file() is more efficient than fgets(). It needs more memory,
but it eliminates reading the file twice.

Thanks.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here




-- 
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] check if file is already in use before fopen

2001-10-04 Thread Brian White

Check out the flock fucntion

At 16:20 4/10/2001 -0400, Jason Stechschulte wrote:
On Thu, Oct 04, 2001 at 11:10:56AM -0400, Matthew Luchak wrote:
  Is there a way to verify if a file is in use by another user before
  fopening it?

As far as I know this is something you have to program in yourself.  If
you are only worried about your programs accessing the file, then it is
a good idea to create a lock file.  Before you access a file called
mydata, check for a file called mydata.lock.  If that exists, then the
file is in use, so wait and check later.  If it does not exist, create a
file called mydata.lock, open mydata, do with it as you please, close
mydata, and delete mydata.lock.

You also have to be prepared to handle a situation where your program
stops before removing the lock file.  Usually with PHP, it is much
easier to just use a database so all this file locking is dealt with by
the database and not you.
--
Jason Stechschulte
[EMAIL PROTECTED]
--
Sorry.  My testing organization is either too small, or too large, depending
on how you look at it.  :-)
  -- Larry Wall in [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]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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] stupid newbie question

2001-10-04 Thread Paul Procacci

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]




[PHP] php, files, ownership....(was file manipulation)

2001-10-04 Thread Gerard Samuel

Ok, I found out what was causing some of the people who were using my
script and have it fail.  They are on a shared server and apache is
being run as user nobody, so therefore the script is being run as
nobody.  But the the files has to have user ownership foo foo.  Is it at
all possible to have a script run as one user and create files as
another.  Dont know if it is even safe??
Or could you point me in another direction?
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]




Re: [PHP] Getting an Email into a PHP/pl script

2001-10-04 Thread ReDucTor

Most mail servers use qmail, so i will explain how to do it with qmail

For your qmail accounts, you will have .qmail files(e.g. .qmail-default
.qmail-webmaster and so on), open one of these files, now add the bottom of
it |preline /path/to/php /path/to/script.php or you can do it with perl the
same way, but with your path to perl, The email its self will be stored in
stdin, if you want ot read it in php you can just go fopen(php://stdin,
r); if you want to use it in perl, just do @stdinarray=stdin; it's an
array, make sure to chomp() your results, from there you can prase the
email, and check who it is, reply the the email, delete the email from the
mailbox, what ever you want... :D
- Original Message -
From: David Robley [EMAIL PROTECTED]
To: Chris Aitken [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, October 05, 2001 10:27 AM
Subject: Re: [PHP] Getting an Email into a PHP/pl script


 On Fri,  5 Oct 2001 07:24, Chris Aitken wrote:
  Hi all,
 
  I have looked into the archives but im not sure what im searching for
  so I decided to ask here.
 
  What I want to do is, on my FreeBSD box running PHP and MySQL, to have
  a system which will take any email sent to a specific address, and pipe
  the body of the email to PHP (or even to a perl script). Once I have
  the body of the email as a variable, I can do all my parsing and
  extracting etc to do with it as I need, but im baffled on where to
  start looking to get this done.
 
  Any help would be greatly appreciated.

 What are you using for an MTA? If for example you are using sendmail, you
 can set up an alias, via an entry in /etc/aliases which pipes the
 incoming mail to a script, which could be a php script. Of course, you
 would need a php binary. Similarly you can set up an alias file with
 qmail which passes the email to a script.

 This is a common technique for say creating web based mail list archives.

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

Cats aren't clean, they're just covered with cat spit!

 --
 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] ad rotation program

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


Have you looked into phpAdsNew?

www.sf.net
And search for it there

Maxim Maletsky
www.PHPBeginner.com


 -Original Message-
 From: Michael Geier, CDM Systems Admin [mailto:[EMAIL PROTECTED]] 
 Sent: giovedi 4 ottobre 2001 23.39
 To: Wandrer; Joseph Bannon
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] ad rotation program
 
 
 check out Oasis on Freshmeat...I haven't used it, but I did 
 notice it on there. also, as already posted, PHPads.
 
 -Original Message-
 From: Wandrer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 2:12 PM
 To: Joseph Bannon
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] ad rotation program
 
 
 At 01:37 PM 10/4/01 -0500, you wrote:
 Has anyone on this list developed an ad rotation program in 
 PHP? Joseph
 PHP General Mailing List (http://www.php.net/)
 
 Joseph,
 
 dotBanner ( http://www.dot-banner.com ) is the one that I work on.
 
 We have your script pushing well over 6 million impressions 
 per day with no problem.
 - Robert
 
 ...out of all the software I have bought on the net, you 
 have provided me with the BEST service, HANDS DOWN man... You 
 should be very proud of this man... thanks so much! -Deejay
 
 Paul
 
 -
   dotBanner www.dot-banner.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 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] PHP is a Bloated Kludge, discuss!

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



 (From behind filing cabinet where I am ducking preparing for flames).
 
 Is it just me or is there anyone else that thinks PHP suffers 
 from not being modular.  

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

 PHP on the other hand seems to load in ALL the code that MAY 
 be run. i.e. an include brings things in which are inside an 
 if,  even if the if equates to false.

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.

 This means that the language is not extendible in the way 
 others are.  If you do write a function you wish to include 
 in 'only the pages you wish to use'  you have to first 
 include it, then call it.

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.

 This has also meant that things like spell checking functions 
 are built into the core module rather than called in as or 
 when they are needed.
 
 Then there is the way database connectivity is handled.
 
 There are a load of functions (again in the core language) 
 with there NAMES containing the name of the database you are 
 connecting to.

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?)

 For example all MySQL functions are mysql_something and I 
 guess all oracle ones are oracle_something.  This would only 
 be a minor inconvenience because wrapper functions can be 
 written but from what I can gather different databases have 
 different functionality available.

That is why Sascha Sunmann wrote PHPLIB and (Stig?) Bakken created PEAR
(released with every PHP distribution, btw - just waiting for you to use
it)

 phplib.netuse.de
 php.net/pear

 I know this is partly because different databases have 
 different functionality.  what I would expect to see is a 
 load of generic function which attempt to provide same 
 functionality where it is available or implement some of the 
 functionality themselves.  Obviously for some of the less 
 sophisticated databases these functions would have to do more 
 work and maybe some functionality wouldn't be available in 
 certain databases (but only the things like stored procedures).
 
 Got a nast feeling that ASP (spit) does something like this.
 
 You may cry, it cant be done.  however I remember a 
 connectivity product that came from Borland (this was back in 
 the Paradox Days) which did just this, it even had 
 transaction handling built into this connectivity layer for DBase!
 
 Anyway I am playing Devils Advocate.

We all play it once at least ;-)

 What I do like about PHP is how quickly it can be learnt and 
 how quick you can build apps with it.  Maybe this is at the 
 expense of elegance.  Maybe PHP5 will address these issues -;)

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.

 And there are certainly some very busy PHP sites, you should 
 see the traffic levels on indymedia.org during 
 anti-capitalist demonstrations and I am sure during the New 
 York attacks they went belistic.

Search archives for php sites or something like this. The topic comes
up every week or so :-)


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

2001-10-04 Thread Ralph Guzman

I currently thinking on doing some freelance PHP programming and web design
for somebody. I have a pretty good idea on how much I will be chargin,
however I am looking at putting this in writing. I was wondering if anybody
had any example proposals/bids or web liks to where I can find such
information so that I can create my own.

Thanks in advance.


-- 
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] ereg checking if its only numbers

2001-10-04 Thread Chris Aitken


Ive been playing around with ereg for about half an hour and having no joy 
because I dont really understand the medhod behind it and how it all works. 
But what im trying to do is check to see if a 9 digit string is all numbers 
and nothing else

$string1 = 123456789
$string2 = 123456abc


how would I check either string with an IF statement and make it continue 
on string 1 (ie, all numbers) and error on string 2 (not all numbers).


Any suggestions ?



Thanks


Chris

--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
It is said that if you line up all the cars in the world end to end,
  some moron in a rotary will still to try and pass them


-- 
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 is a Bloated Kludge, discuss!

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

  PHP on the other hand seems to load in ALL the code that 
 MAY be run. 
  i.e. an include brings things in which are inside an if,  
 even if the 
  if equates to false.
 
 A quick check in the manual, it states that:
 
 Unlike include(), require() will always read in the target 
 file, even if the line it's on never executes. If you want to 
 conditionally include a file, use include(). The conditional 
 statement won't affect the require(). However, if the line on 
 which the require() occurs is not executed, neither will any 
 of the code in the target file be executed.  
 http://www.php.net/manual/en/function.require.php
 and
 http://www.php.net/manual/en/function.require-once.php
 
 
 So to do what you said i.e. conditionally load the 
 function/files that you want then you should use include(). 
 http://www.php.net/manual/en/function.include.php
 and
 http://www.php.net/manual/en/function.include-once.php
 
 So I don't buy this agument.

This is outdated. Look int othe archives - I had this discussion with
Zeev close to a year ago - since PHP 4.0.(something) require and include
behaves in the exactly same way.

Test it yourself on the latest release of PHP:


  require.test.php
 
 ?

 echo 'included?';

 if($go)
require 'require.error.test';

 ?
 

  require.error.test
 
 ?

 echo 'H1yup!/H1';

 parse error;

 ?
 

Access it with:
 1. require.test.php?go=e

And then try it with:
 2. require.test.php


What do you buy now?


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] ereg checking if its only numbers

2001-10-04 Thread Jack Dempsey

if(!preg_match(/^\d+$/,$string){
echo $string has something other than a number;
}

-Original Message-
From: Chris Aitken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 9:34 PM
To: PHP General Mailing List
Subject: [PHP] ereg checking if its only numbers



Ive been playing around with ereg for about half an hour and having no joy
because I dont really understand the medhod behind it and how it all works.
But what im trying to do is check to see if a 9 digit string is all numbers
and nothing else

$string1 = 123456789
$string2 = 123456abc


how would I check either string with an IF statement and make it continue
on string 1 (ie, all numbers) and error on string 2 (not all numbers).


Any suggestions ?



Thanks


Chris

--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
It is said that if you line up all the cars in the world end to end,
  some moron in a rotary will still to try and pass them


--
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] PHP is a Bloated Kludge, discuss!

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


Of cource changing the require with include would explain everything :-)
Sorry, forgot to mention that :-)

Maxim Maletsky
www.PHPBeginner.com


 -Original Message-
 From: Maxim Maletsky (PHPBeginner.com) 
 [mailto:[EMAIL PROTECTED]] 
 Sent: venerdì 5 ottobre 2001 3.33
 To: 'Opec Kemp'; [EMAIL PROTECTED]
 Subject: RE: [PHP] PHP is a Bloated Kludge, discuss!
 
 
   PHP on the other hand seems to load in ALL the code that
  MAY be run.
   i.e. an include brings things in which are inside an if,
  even if the
   if equates to false.
  
  A quick check in the manual, it states that:
  
  Unlike include(), require() will always read in the target
  file, even if the line it's on never executes. If you want to 
  conditionally include a file, use include(). The conditional 
  statement won't affect the require(). However, if the line on 
  which the require() occurs is not executed, neither will any 
  of the code in the target file be executed.  
  http://www.php.net/manual/en/function.require.php
  and
  http://www.php.net/manual/en/function.require-once.php
  
  
  So to do what you said i.e. conditionally load the
  function/files that you want then you should use include(). 
  http://www.php.net/manual/en/function.include.php
  and
  http://www.php.net/manual/en/function.include-once.php
  
  So I don't buy this agument.
 
 This is outdated. Look int othe archives - I had this 
 discussion with Zeev close to a year ago - since PHP 
 4.0.(something) require and include behaves in the exactly same way.
 
 Test it yourself on the latest release of PHP:
 
 
   require.test.php
  
  ?
 
  echo 'included?';
 
  if($go)
   require 'require.error.test';
 
  ?
  
 
   require.error.test
  
  ?
 
  echo 'H1yup!/H1';
 
  parse error;
 
  ?
  
 
 Access it with:
  1. require.test.php?go=e
 
 And then try it with:
  2. require.test.php
 
 
 What do you buy now?
 
 
 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 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 is a Bloated Kludge, discuss!

2001-10-04 Thread php


I think the implication of the oringal poster was not the include/requires
stuff,
but more a build of PHP with --enable-100 options vs php-sharedetc



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]]
Sent: Friday, 5 October 2001 11:33 AM
To: 'Opec Kemp'; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP is a Bloated Kludge, discuss!


  PHP on the other hand seems to load in ALL the code that
 MAY be run.
  i.e. an include brings things in which are inside an if,
 even if the
  if equates to false.

 A quick check in the manual, it states that:

 Unlike include(), require() will always read in the target
 file, even if the line it's on never executes. If you want to
 conditionally include a file, use include(). The conditional
 statement won't affect the require(). However, if the line on
 which the require() occurs is not executed, neither will any
 of the code in the target file be executed. 
 http://www.php.net/manual/en/function.require.php
 and
 http://www.php.net/manual/en/function.require-once.php


 So to do what you said i.e. conditionally load the
 function/files that you want then you should use include().
 http://www.php.net/manual/en/function.include.php
 and
 http://www.php.net/manual/en/function.include-once.php

 So I don't buy this agument.

This is outdated. Look int othe archives - I had this discussion with
Zeev close to a year ago - since PHP 4.0.(something) require and include
behaves in the exactly same way.

Test it yourself on the latest release of PHP:


  require.test.php
 
 ?

 echo 'included?';

 if($go)
require 'require.error.test';

 ?
 

  require.error.test
 
 ?

 echo 'H1yup!/H1';

 parse error;

 ?
 

Access it with:
 1. require.test.php?go=e

And then try it with:
 2. require.test.php


What do you buy now?


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 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 is a Bloated Kludge, discuss!

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


conditionally load the function/files that 
you want then you should use include(). 

Was the implication of the poster I replied to.


To the original I replied commenting each of his arguments, therefore I
knew his points.

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] ereg checking if its only numbers

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

With ereg it could be:

 if(ereg(^[^[:digit:]]+$))
echo 'something else came through';

Untested though ... 

Maxim Maletsky
www.PHPBeginner.com



 -Original Message-
 From: Jack Dempsey [mailto:[EMAIL PROTECTED]] 
 Sent: venerdì 5 ottobre 2001 3.42
 To: Chris Aitken; PHP General Mailing List
 Subject: RE: [PHP] ereg checking if its only numbers
 
 
 if(!preg_match(/^\d+$/,$string){
   echo $string has something other than a number;
 }
 
 -Original Message-
 From: Chris Aitken [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 9:34 PM
 To: PHP General Mailing List
 Subject: [PHP] ereg checking if its only numbers
 
 
 
 Ive been playing around with ereg for about half an hour and 
 having no joy because I dont really understand the medhod 
 behind it and how it all works. But what im trying to do is 
 check to see if a 9 digit string is all numbers and nothing else
 
 $string1 = 123456789
 $string2 = 123456abc
 
 
 how would I check either string with an IF statement and make 
 it continue on string 1 (ie, all numbers) and error on string 
 2 (not all numbers).
 
 
 Any suggestions ?
 
 
 
 Thanks
 
 
 Chris
 
 --
  Chris Aitken - Administration/Database Designer - IDEAL Internet
   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 
 2 4628 8890
   __-__
 It is said that if you line up all the cars in the world 
 end to end,
   some moron in a rotary will still to try and pass them
 
 
 --
 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] Change linux password using php

2001-10-04 Thread Sigurd Magnusson

What is the best way to change linux passwords using a web .PHP interface? 
I currently allow FTP access to php enabled webhosting sites; which use 
safe mode, thus use real linux accounts.

Thus far I thought I would:

Write a real short C program which would call allow to go
setpasswd username passwd
passwd could perhaps be the crypt() version to provide better security?
it would just call passwd, and ensure that username is not 'root' and a
few other accounts ;)

Then I would put that program within the directory of executables allowed 
in safe mode. And just have a plain http post form to update the password, 
running over HTTPS.

Does this seem a good plan ... or are there better?

It also begs the question; how do I authenticate an account using php ...  
to login to their 'change password' feature? I have already spent alot of 
time trying to merge password files for different uses; Windows 
shares, Linux ones, for samba, and this and that, so it'd be nice to now 
have yet another passwd file :)

Siggy

-- 
Sigurd Magnusson
Director
www.totallydigital.co.nz

-- 
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: Restrict where PHP is Usable?

2001-10-04 Thread Sigurd Magnusson

Richard Lynch wrote:

 httpd.conf
 php_value Engine Off or somesuch...
 
 --
 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



its php_flag engine off

---

You might be interested in this too:

Copied from http://www.php.net/manual/en/features.safe-mode.php

If you do virutal hosting, you can turn safe mode on and off for different 
Apache Virutal Hosts using the php_admin_value directive. This also allows 
you to have customised maximum execution times, disabled functions, etc. By 
placeing a base_dir for each virutal host, this means PHP CANNOT access 
files below this heirachy; strongly recoomended for cutsomer hosting.

Eg:

[VirtualHost 127.0.0.1:80]
 DocumentRoot /var/www/html/safephphost/
 ServerName safephp
 php_admin_value safe_mode 1
 php_admin_value open_base_dir /var/www/html/safephphost/
 php_admin_value sendmail_from phobo#paradise.net.nz
[/VirtualHost]

Siggy



 - Original Message -
 From: Matthew Walker [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 02, 2001 4:30 PM
 Subject: Restrict where PHP is Usable?
 
 
 I've seen this done before on servers, but I'm not sure how to do it.

 Is there a way to restrict PHP to certain directories, so that it can
 only be used by files within those directories?

 For example: I'm starting a web page hosting service, and I'd like to
 make it so that most users can't use PHP. They'll have to pay a (very
 small) monthly fee to have access to it. This is partly as a very loose
 security measure, so that not everyone has access to PHP.

 --
 Matthew Walker
 Ecommerce Project Manager
 Mountain Top Herbs

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001


 
 

-- 
Sigurd Magnusson
Director
www.totallydigital.co.nz

-- 
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] ereg checking if its only numbers

2001-10-04 Thread Evan

try:

?
if(ereg([0-9]{9}, $string)){
echo Success, 9 numbers!;
} else {
echo Failure, not 9 numbers.;
}
?

There is a great book on regular expressions by o'reily.

Evan

*** REPLY SEPARATOR  ***

On 10/5/01 at 11:33 AM Chris Aitken wrote:

Ive been playing around with ereg for about half an hour and having no
joy
because I dont really understand the medhod behind it and how it all
works.
But what im trying to do is check to see if a 9 digit string is all
numbers
and nothing else

$string1 = 123456789
$string2 = 123456abc


how would I check either string with an IF statement and make it continue
on string 1 (ie, all numbers) and error on string 2 (not all numbers).


Any suggestions ?



Thanks


Chris

--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
It is said that if you line up all the cars in the world end to end,
  some moron in a rotary will still to try and pass them


--
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] System(), exec(), Passthru(), etc

2001-10-04 Thread ReDucTor

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


-- 
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-04 Thread David Robley

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 br 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.

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

   Best way to dispose of the Borg: Give them Windows 3.1.

-- 
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] Email Processors Wanted Immediately!!!

2001-10-04 Thread terrycrowe_webdirect2001

Dear [EMAIL PROTECTED],

WE are looking for serious inquires from 
individuals who want to make a difference!!!

Our company is offering an opportunity
for individuals who want to become an
E-Mail PROCESSOR. Work from home 
and be apart of this tremendous opportunity
to sustain an income of your choice. 
Free 30 day trial membership, not MLM.

Requirements: Computer, internet hookup,
some basic computer skills and a little 
time  effort. 

 
SEND AN EMAIL TO: [EMAIL PROTECTED]
WITH SUBJECT: SHOW ME.


***Thanks for taking the time to look at this offer. Please
accept my apologies if this email has offended you in
any way. If you wish to no longer receive email please send 
an email message to [EMAIL PROTECTED] with Remove 
placed in the subject line.*** 


Web Site; http://www.geocities.com/project_internetca/

-- 
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-04 Thread ReDucTor

echo System(crontab -l, $var).br;
echo $var;
- 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 br 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.
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
Best way to dispose of the Borg: Give them Windows 3.1.
 
 -- 
 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] Change linux password using php

2001-10-04 Thread Evan Nemerson

First off, if you don't already know, the linux passwords are stored in the 
/etc/passwd file (unless you have a shadow suite installed, in which case 
/etc/shadow would be a good bet.) Basing this on a shadow file, the file is a 
text document with one user per line. The entries are stored in the following 
format: username:passwd:last:may:must:warn:expire:disable:reserved. All you 
really need for changing the password is the passwd section, although the 
other sections could be useful.

The password is not stored as plaintext, has been crypted (may be a new 
word...). Now, if you aren't familier with crypt, it is based on the DES, 
which is a symetrical algorithm. The password (called salt in this case) is a 
two character string chosen from [a-zA-Z0-9./]. This means there are (getting 
calculator out...) ((2)26+10+2)squared=4096 possible versions of the string.

Now I don't know if a different salt is used for each user or if it is 
uniform throughout. I'll put together a script that crypts my password with 
every salt string possible and checks it against my shadow file, then tries 
that salt with other passwords on my box. Fun project.

So basically, you would have to find the correct salt, crypt the new 
password, then use PHP's file functions to manipulate the passwd/shadow file- 
which brings up yet another problem- security. Do you really want to give PHP 
access to your passwd/shadow file??? Also, if I were you I would verify their 
old password too... just in case bob tries to change sue's password.

If anything in here is outdated or just plain wrong please tell me.

Evan Nemerson


PS i thought /usr/bin/md5 should exist so here:

#!/usr/local/bin/php -q

?php
unset($argv[0]);
echo md5(trim(implode( ,$argv))).\n;
?





On Thursday 04 October 2001 07:28 pm, you wrote:
 What is the best way to change linux passwords using a web .PHP interface?
 I currently allow FTP access to php enabled webhosting sites; which use
 safe mode, thus use real linux accounts.

 Thus far I thought I would:

 Write a real short C program which would call allow to go
 setpasswd username passwd
 passwd could perhaps be the crypt() version to provide better
 security? it would just call passwd, and ensure that username is not 'root'
 and a few other accounts ;)

 Then I would put that program within the directory of executables allowed
 in safe mode. And just have a plain http post form to update the password,
 running over HTTPS.

 Does this seem a good plan ... or are there better?

 It also begs the question; how do I authenticate an account using php ...
 to login to their 'change password' feature? I have already spent alot of
 time trying to merge password files for different uses; Windows
 shares, Linux ones, for samba, and this and that, so it'd be nice to now
 have yet another passwd file :)

 Siggy

-- 
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-04 Thread Jason Dulberg

I just want to thank everyone who helped me get the css stuff to work. All
of the IF statements are now working properly --- I've certainly learned a
lot from all the messages.

thanks again...
Maxim Maletsky
Rasmus Lerdorf

and all others who responded to my message!

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


 I have a common css file that is being used across several virtual
 hosts. Basically, what I am trying to do is use the same css file even
 though several text colors/sizes need to be changed depending on what
 site/platform its being used on.


-- 
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] popup window under php

2001-10-04 Thread Naintara Jain

You have the same requirement

Put this wherever you want in your script.

?php
 if (true)  // whatever the condition
 {
 echo script language=JavaScript
alert('Message!') /script;
 }
 ?


- Original Message -
From: Eduardo Kokubo [EMAIL PROTECTED]
To: Naintara Jain [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 4:56 PM
Subject: Re: [PHP] something like alert (javascript)


This is probably the best solution. I'll try something like this. Thanks.

- Original Message -
From: Naintara Jain [EMAIL PROTECTED]
To: Eduardo Kokubo [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 8:19 AM
Subject: Re: [PHP] something like alert (javascript)


 You could try:
 ?php
 if (files  4)  // whatever the condition
 {
 echo script language=JavaScript
alert('Unfinished business!') /script;
 }
 ?
 -Naintara

 - Original Message -
 From: Eduardo Kokubo [EMAIL PROTECTED]
 To: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, October 04, 2001 4:45 PM
 Subject: Re: [PHP] something like alert (javascript)


 I'm implementing a system that allows the users create pages on-line. They
 can create several different pages to complete a site. What I want to do
is
 alert them that there are still pages to be created before they finish.
I'm
 trying to do it checking the files they create and alerting a message, but
I
 think javascript can not check the files and php can not alert the user
with
 a function like alert(). I'm using a simple print() (PHP) but alert()
would
 be much better.

 - Original Message -
 From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 To: 'Eduardo Kokubo' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, October 03, 2001 11:38 AM
 Subject: RE: [PHP] something like alert (javascript)


  Then what do you need?
 
  We are not any sure on what your question is ...
 
  Maxim Maletsky
  www.PHPBeginner.com
 
 
  -Original Message-
  From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
  Sent: mercoledì 3 ottobre 2001 16.31
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: [PHP] something like alert (javascript)
 
 
  Is there any function in PHP that is similar to alert() or confirm() of
  javascript ? I tried die() but that's not what I need.


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




- Original Message -
From: Tim Sawyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 05, 2001 12:46 AM
Subject: [PHP] popup window under php


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 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] Namo Web Editor

2001-10-04 Thread Joel Ricker


 I always depreciated WYSIWYG software, especially when they mention
 those things about HTML. HTML is the alphabet of the internet and as
 such should be well known by any webmaster and whoever else is
 interested in this kind of software.

 Still, it feels like it is better than Dreamveawer and Microsoft
 FrontPage (oh boy, I pronounced devil's name)

Exactly my thoughts but it seems we are more in the minority.  My neighbor
mentioned his girlfriend taking a web class and he complained that they use
Notepad for their editing.  Who uses Notepad?, he asked.  Yet he was
suprised when she was showing him a thing or two.  WYSIWYG editors are nice
for general things like layout (I use Dreamweaver to help layout any table
in a table stuff) but I haven't ran across a editor yet that makes solid
code.

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] Re: images no appearing

2001-10-04 Thread Joel Ricker

To see exactly what image functions that are or aren't available to you, try
running this script.

?php

$func= array(GetImageSize, ImageArc, ImageChar, ImageCharUp,
ImageColorAllocate, ImageColorDeAllocate,
ImageColorAt, ImageColorClosest, ImageColorExact, ImageColorResolve
, ImageGammaCorrect, ImageColorSet,
ImageColorsForIndex, ImageColorsTotal, ImageColorTransparent,
ImageCopy, ImageCopyResized, ImageCreate,
ImageCreateFromGIF, ImageCreateFromJPEG, ImageCreateFromPNG,
ImageCreateFromWBMP, ImageCreateFromString,
ImageDashedLine, ImageDestroy, ImageFill,
ImageFilledPolygon,
ImageFilledRectangle,
ImageFillToBorder,
ImageFontHeight,
ImageFontWidth,
ImageGIF,
ImagePNG,
ImageJPEG,
ImageWBMP,
ImageInterlace,
ImageLine,
ImageLoadFont,
ImagePolygon,
ImagePSBBox,
ImagePSEncodeFont,
ImagePSFreeFont,
ImagePSLoadFont,
ImagePsExtendFont,
ImagePsSlantFont,
ImagePSText,
ImageRectangle,
ImageSetPixel,
ImageString,
ImageStringUp,
ImageSX,
ImageSY,
ImageTTFBBox,
ImageTTFText,
ImageTypes,
read_exif_data);

?Have:br
--BR?
for ($i = 0; $i  count($func); $i++) {
 if (function_exists($func[$i])) {
  print $func[$i] . ()BR;
 }
}
?brBrDon't Have:br
BR?
for ($i = 0; $i  count($func); $i++) {
 if (!function_exists($func[$i])) {
  print $func[$i] . ()BR;
 }
}

?
- Original Message -
From: Richard Lynch [EMAIL PROTECTED]
To: Adrian D'Costa [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 12:18 AM
Subject: [PHP] Re: images no appearing


 Older versions of GD will do GIF, but not JPEG, and vice versa...

 What versions of GD are on the two servers?

 --
 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: Adrian D'Costa [EMAIL PROTECTED]
 Newsgroups: php.general
 To: php general list [EMAIL PROTECTED]
 Sent: Monday, September 24, 2001 12:05 AM
 Subject: images no appearing


  Hi,
 
  I wrote a php script to create a dynamic graph (image/jpeg).  On my
  development system the image appears on my website it gives Image/Jpeg
  support not compiled.
 
  Below are the config settings:
 
  My system:
  Configure Command ^@ './configure' '--prefix=/usr'
   ^@'--with-config-file-path=/etc' '--disable-debug'
   ^@'--enable-pic' '--enable-inline-optimization'
   ^@'--enable-sockets' '--with-apxs=/usr/sbin/apxs'
   ^@'--disable-static' '--with-exec-dir=/usr/bin'
   ^@'--with-regex=system' '--with-gd'
   ^@'--with-jpeg-dir=/usr' '--with-png' '--with-gdbm'
   ^@'--enable-debugger' '--enable-magic-quotes'
   ^@'--enable-safe-mode' '--enable-track-vars'
   ^@'--enable-ftp' '--with-mysql' '--with-xml'
   ^@'--enable-trans-sid'
   ^@'--with-readline=/usr/include/readline'
 
  My webserver the info can be got from vvmm.net/phpinfo.php.
 
  They my provider has given --with-jpeg-dir=/usr/lib still the image does
  not appear.  Even in the gd section it does not give JPG Support
  enabled.  Only give.  Right now I have changed the program to work with
  gif.  My question, why not Jpg??
 
  Adrian
 
 


 --
 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] cgi bug workaround

2001-10-04 Thread James Peter Gregory

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.

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




[PHP] Re: help! linux 7 problems

2001-10-04 Thread Richard Lynch

Did you uncomment the LoadModule/AddModule for PHP?

Or add an Action line?...

AddType is only half the puzzle piece...

It sets up a mime-type (application/x-httpd-php) for an extension (.php) but
doesn't say what to *DO* with that mime-type.

--
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: Rg [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:51 PM
Subject: help! linux 7 problems


 hi,

 i installed php4 onto my linux 7.0 system along with apache and mysql.

 the apache and mysql work.

 once i did 'make install' for php, i changed the http.conf file in
 apache so that the
 AddType lines were uncommented out and the file extensions should be
 recongized.

 i've done this on windows and it worked.

 now, however, when i try to path to a .php file like localhost/test.php,
 it tries
 to save the file to disk instead of executing the code.

 anybody know why?

 thanks,

 rg



-- 
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: Really need HELP on PHP install Error in make

2001-10-04 Thread Richard Lynch

I'm no expert install guy, but...

I believe errno.h should be in one or more of these places where PHP can
find it:

/usr/include
/usr/src/linux-blah-blah-blah

Or, try this:
updatedb  might take a while
locate errno.h

Figure out why errno.h isn't where PHP expects it to be, and make it be
there by copying it or creating a symlink (man ln)

Odds are good that if errno.h is missing, is every other .h file sitting
next to it, so get them all in one go.

--
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: Augusto cesar castoldi [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 6:00 AM
Subject: Really need HELP on PHP install  Error in make


 Hi... I really need help for compile PHP. I have to
 compile because the previous compiling didn't have
 -with-dom option.

 I ./configure my php-4.0.6 in RedHat 6.2 with this
 command line:
 ./configure --with-mysql
 --with-apache=../apache_1.3.20 --enable-track-vars
 --with-dom=../libxml2-2.4.5
 --with-java=/usr/local/jdk1.3.1/
 --with-zlib-dir=/usr/src/redhat/SOURCES/zlib-1.1.3/

 Worked fine, but when I make, this error occurs:
 -
 [root@vendaval php-4.0.6]# make
 Making all in Zend
 make[1]: Entering directory
 `/home/augusto/src/php-4.0.6/Zend'
 /bin/sh ../libtool --silent --mode=compile gcc
 -DHAVE_CONFIG_H -I. -I. -I../main   -DSUPPORT_UTF8
 -DXML_BYTE_ORDER=12  -g -O2 -c zend_language_scanner.c
 In file included from /usr/include/errno.h:36,
  from zend_language_scanner.c:2718:
 /usr/include/bits/errno.h:25: linux/errno.h: No such
 file or directory
 make[1]: *** [zend_language_scanner.lo] Error 1
 make[1]: Leaving directory
 `/home/augusto/src/php-4.0.6/Zend'
 make: *** [all-recursive] Error 1
 [root@vendaval php-4.0.6]
 --

 can you help?

 regards,

 Augusto




___
 Yahoo! GeoCities
 Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
GeoCities. É fácil e grátis!
 http://br.geocities.yahoo.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]




  1   2   >