[PHP] require() in other directories?

2004-11-18 Thread Peter Lauri
Best groupmember,

I have an webapplication that uses different languages and therefor I have
set up different directorys for each language. All languages use the same
classes.

The problem I have is when I want to require() the classfile I can not
require a file that is not in the same directory as my .php file. I have
tried the following:

require(../classes.php);
require(http://www.mydomain.com/classes.php;);
and more.

All gives me error messages, why?

Anyone that could help me?

- Best Of Times
/Peter

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



Re: [PHP] require() in other directories?

2004-11-18 Thread Pluance
What error happen?


On Thu, 18 Nov 2004 09:15:22 +0100, Peter Lauri [EMAIL PROTECTED] wrote:
 Best groupmember,
 
 I have an webapplication that uses different languages and therefor I have
 set up different directorys for each language. All languages use the same
 classes.
 
 The problem I have is when I want to require() the classfile I can not
 require a file that is not in the same directory as my .php file. I have
 tried the following:
 
 require(../classes.php);
 require(http://www.mydomain.com/classes.php;);
 and more.
 
 All gives me error messages, why?
 
 Anyone that could help me?
 
 - Best Of Times
 /Peter
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



Re: [PHP] require() in other directories?

2004-11-18 Thread Peter Lauri
I get the Failed to open stream, no such file in directory

If you were in one of these folders:
/fr/
/eng/
And your classfile was namned classes.php and in the directory:
/classes/
And you wanted to include the classfile, how would you write it?

I would assume: require(/classes/classes.php);

But that doesn't work.

Help :)



Pluance [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 What error happen?


 On Thu, 18 Nov 2004 09:15:22 +0100, Peter Lauri [EMAIL PROTECTED] wrote:
  Best groupmember,
 
  I have an webapplication that uses different languages and therefor I
have
  set up different directorys for each language. All languages use the
same
  classes.
 
  The problem I have is when I want to require() the classfile I can not
  require a file that is not in the same directory as my .php file. I have
  tried the following:
 
  require(../classes.php);
  require(http://www.mydomain.com/classes.php;);
  and more.
 
  All gives me error messages, why?
 
  Anyone that could help me?
 
  - Best Of Times
  /Peter
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP] converting a number

2004-11-18 Thread Octavian Rasnita
Hi all,

I have a number like 1.0122E9 and I want to convert it into a real number in
a common notation and not in that scientific one (with E).

I have seen that very long numbers are always converted automaticly to that
notation and I need to insert that number in  a MySQL database and in that
case MySQL won't calculate well.

Please tell me how to do that in PHP or in MySQL..

Thank you.

Teddy

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



[PHP] PHP-editor connected to FTP?

2004-11-18 Thread Peter Lauri
Best groupmember,

What editor do you use when working with websites (php) connected directly
to the FTP?

I like Eclipse 3.0 with the PHP plugin, but it do not have the future to
connect to the FTP.

- Best Of Times
/Peter Lauri

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



Re: [PHP] require() in other directories?

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 16:32, Peter Lauri wrote:
 I get the Failed to open stream, no such file in directory

 If you were in one of these folders:
 /fr/
 /eng/
 And your classfile was namned classes.php and in the directory:
 /classes/
 And you wanted to include the classfile, how would you write it?

 I would assume: require(/classes/classes.php);

No because PHP would be trying to find the 'classes' directory in the root 
level of your filesystem.

The best way to deal with it would be to add /full/path/to/classes into your 
include_path, then you can simply use include('classes.php').

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Will you loan me $20.00 and only give me ten of it?
That way, you will owe me ten, and I'll owe you ten, and we'll be even!
*/

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



Re: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 16:41, Peter Lauri wrote:

 What editor do you use when working with websites (php) connected directly
 to the FTP?

 I like Eclipse 3.0 with the PHP plugin, but it do not have the future to
 connect to the FTP.

Any KDE-aware editor would be able to take advantage of KDE's transparent file 
access over various protocols (ftp, ssh, etc).

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You had some happiness once, but your parents moved away, and you had to
leave it behind.
*/

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



Re: [PHP] adding a symbol in front of each line

2004-11-18 Thread Merlin
Jason Wong wrote:
On Wednesday 17 November 2004 23:15, Merlin wrote:

actually that is not as easy as it looks.

Nowhere in your original post did you specify what exactly it is you wanted.

Lets say we want to ad a \n after each 80 characters. There is always the
problem what happens if the line has already a \n inside.
E.g:
This is a sample text. This is a sample text.
This is a sample text
Should result in:
 This is a sample text. This is a
 sample text.
 This is a sample text
That looks very complicated to me. Can anybody point me into the right
direction? Thanx for any help,

If it's only one level of '' that you need to add then it's pretty easy using 
the wordwrap() function. If you need to handle multiple levels then it will 
get very complicated, and you should probably google for some algorithms.

Now that was an excellent hint! Thank you.
Here is how the problem got solved:
$message = \n .wordwrap($row-message, 70, \n );
http://de2.php.net/wordwrap
Thank you Jason!
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] [OOP] Class to handle PEAR::DB

2004-11-18 Thread valerie17
I'm making a counter using DB,

1  ?php
2  require_once 'DB.php';
3
4  $sql_type   = 'mysql';
5  $sql_user   = 'root';
6  $sql_pass   = '';
7  $sql_host   = 'localhost';
8  $sql_db = 'valerie';
9
10 $dsn=
$sql_type://$sql_user:[EMAIL PROTECTED]/$sql_db;
11 $db = DB::connect($dsn);
12
13 // autoExecute config
14 $table_name = 'counter';
15 $fields_values  = array('counter' = $counter++);
16 $where  = page = 'index';
17
18 $result = $db-query(LOCK TABLES counter WRITE);
19 if ( DB::isError($result) ) {
20 die($result-getMessage());
21 }
22
23 $sql= SELECT counter FROM $table_name WHERE $where;
24 $result = $db-query($sql);
25 if ( DB::isError($result) ) {
26 die($result-getMessage());
27 }
28 list($counter)  = $result-fetchRow();
29
30 // update counter
31 $result = $db-autoExecute($table_name, $fields_values,
DB_AUTOQUERY_UPDATE, $where);
32 if ( DB::isError($result) ) {
33 die($result-getMessage());
34 }
35
36 $result = $db-query(UNLOCK TABLES);
37 if ( DB::isError($result) ) {
38 die($result-getMessage());
39 }
40
41 die;
42 ?

it works well, but I don't think it's efficient calling DB::isError
everytime, so (inspired by Advanced PHP Programming book by Mr. George
Schlossnagle) I made a class (PHP 4.3.9) to handle it . (instead of using
functions and must call boring 'global' at the top of each function)

1  ?php
2  /**
3   * PEAR DB
4   */
5  require_once 'DB.php';
6
7  class DBku
8  {
9  // protected
10 var $type;
11 var $user;
12 var $pass;
13 var $host;
14 var $db;
15 var $dbhandler;
16
17 // {{{
18 // public
19 function __construct($type, $user, $pass, $host, $db)
20 {
21 $this-type =  $type;
22 $this-user =  $user;
23 $this-pass =  $pass;
24 $this-host =  $host;
25 $this-db   =  $db;
26 }
27 // }}}
28
29 // {{{
30 // public
31 function connect()
32 {
33 $this-dbhandler =
DB::connect($this-type,://,$this-user,:,$this-pass,@,$this-host,/
,$this-db);
34 $this-error($this-dbhandler);
35 }
36 // }}}
37
38 // {{{
39 // public
40 function execute($query)
41 {
42 if ( !$this-dbhandler ) {
43 $this-connect();
44 }
45 $ret = $this-dbhandler-query($query);
46 $this-error($ret);
47 }
48 // }}}
49
50 // {{{
51 // protected
52 function error($er_value)
53 {
54 if (DB::isError($er_value)) {
55 echo 'Standard Message: ' . $er_value-getMessage() .
\n;
56 echo 'Standard Code: ' . $er_value-getCode() . \n;
57 echo 'DBMS/User Message: ' . $er_value-getUserInfo() .
\n;
58 echo 'DBMS/Debug Message: ' . $er_value-getDebugInfo() .
\n;
59 die;
60 }
61 }
62 // }}}
63 }
64
65 $sql = new DBku('mysql', 'root', '', 'localhost', 'valerie');
66 var_dump($sql);
67 $sql-execute('SELECT * FROM country');
68 die;
69 ?

my problem is : everytime I execute this file in CLI mode I always got this
:

E:\php\pearphp config_valerie4.inc.php
object(DBku)#1 (6) {
  [type]=
  string(5) mysql
  [user]=
  string(4) root
  [pass]=
  string(0) 
  [host]=
  string(9) localhost
  [db]=
  string(7) valerie
  [dbhandler]=
  NULL
}
Standard Message: DB Error: no database selected
Standard Code: -14
DBMS/User Message: SELECT * FROM country [nativecode=1046 ** No Database
Selected]
DBMS/Debug Message: SELECT * FROM country [nativecode=1046 ** No Database
Selected]

How come the message said I didn't select database ??

I also throw this thread to php-general mailing lists because when somebody
talked about OOP then many arguments would come from many people there and I
just enjoy to hear (read) it :)

So, Opinions (good or bad things), Suggestions, Corrections to my code
(especially idea to make my class shorter and would be compatible in PHP4 
5) would be very welcome.

Thank you.

Valérie Delon
étudiante

--
On a besoin d'apprendre beacoup plus
Quelqu'un croit c'est trop
Mais j'crois que ce n'est pas assez

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



[PHP] Re: What should I name my base class?

2004-11-18 Thread Philippe Jadin
Greg Beaver wrote:
Avoid base classes like the plague.  They only limit future flexibility. 
  Use inheritance like salt - as an enhancement for flavoring, otherwise 
you might develop high blood pressure ;).  Better is to use delegation, 
factory or singleton as a way to access needed features, because then 
you can easily plug in new base functionality.
Is it standard OO practice or PHP specific ? (lack of multiple 
inheritance for instance (pun intended somewhat))

Thanks
Philippe (new to this group)

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


RE: [PHP] converting a number

2004-11-18 Thread Warren Vail

 I have a number like 1.0122E9 and I want to convert it into a
 real number in
 a common notation and not in that scientific one (with E).

 I have seen that very long numbers are always converted
 automaticly to that
 notation and I need to insert that number in  a MySQL database and in that
 case MySQL won't calculate well.

 Please tell me how to do that in PHP or in MySQL..

Is this what you were thinking of?

$query = insert table(floatcol) values(.sprintf(%2.4f,$yourno).) ;

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



Re: [PHP] mp3 cropping

2004-11-18 Thread Alessandro Rosa
 Anyone out there know of a tool or technique for cropping an MP3 file 
 (e.g., cutting the first 30 sec out into another file)? PHP would be 
 nice, but not necessary.
 
 TIA,
 ryan

If your platform is Windows, you can look for 'CDex'.
This tool works as you desire.

Alessandro Rosa

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



[PHP] Sequrity without HTTPS?

2004-11-18 Thread Peter Lauri
Best groupmember,

I am about to develop an simple admintool for a webpage. My webhost (crappy
but nonexpensive) does not support HTTPS and I still want to be able to
create some sort of secure login.

For the moment I am just using a form that sends the username and passwd
with POST method that verifies the username and passwd in a script. When
this is set I put a $_SESSION['usertype']=admin and when a adminpage is
beeing requested I check so that this sessionvariable is admin, othervise
I redirect to the loginpage and unset all session variables.

Can someone from outside set a $_SESSION variable with some hacker
techniqe?

I assume it is easy to listen to the USERNAME and PASSWORD in the POST-form.

Someone with some tips and tricks to get a secure system without using
HTTPS?

--
- Best Of Times
/Peter Lauri


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



Re: [PHP] converting a number

2004-11-18 Thread Octavian Rasnita
Not exactly. And this query gives me an error.

Thank you.

Teddy

- Original Message - 
From: Warren Vail [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 11:24 AM
Subject: RE: [PHP] converting a number


 
  I have a number like 1.0122E9 and I want to convert it into a
  real number in
  a common notation and not in that scientific one (with E).
 
  I have seen that very long numbers are always converted
  automaticly to that
  notation and I need to insert that number in  a MySQL database and in
that
  case MySQL won't calculate well.
 
  Please tell me how to do that in PHP or in MySQL..
 
 Is this what you were thinking of?

 $query = insert table(floatcol) values(.sprintf(%2.4f,$yourno).) ;


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



Re: [PHP] converting a number

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 18:50, Octavian Rasnita wrote:
 Not exactly. And this query gives me an error.

Fix the quotes.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Patageometry, n.:
 The study of those mathematical properties that are invariant
 under brain transplants.
*/

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



Re: [PHP] require() in other directories?

2004-11-18 Thread Peter Lauri
But if I am working on a webserver it would try to find it in the root of my
webserver, or am I wrong?

For example I use that notation with an image:
I use this: img src='/image/theimage.gif'

Is this not the case for the PHP-scripting?

/Peter


Jason Wong [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 On Thursday 18 November 2004 16:32, Peter Lauri wrote:
  I get the Failed to open stream, no such file in directory
 
  If you were in one of these folders:
  /fr/
  /eng/
  And your classfile was namned classes.php and in the directory:
  /classes/
  And you wanted to include the classfile, how would you write it?
 
  I would assume: require(/classes/classes.php);

 No because PHP would be trying to find the 'classes' directory in the root
 level of your filesystem.

 The best way to deal with it would be to add /full/path/to/classes into
your
 include_path, then you can simply use include('classes.php').

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Will you loan me $20.00 and only give me ten of it?
 That way, you will owe me ten, and I'll owe you ten, and we'll be even!
 */

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



[PHP] Re: Sorting multidim array and keeping associations

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
I have an multidim array that looks something like this:
[40] = [1]=32, [2]=55, [total]=87
[22] = [8]=2, [7]=105, [total]=107
[142] = [2]=3, [7]=8, [total]=11
I want to sort this array according to the total and still keep the
acc. with the basekey. I know I can easily do this by writing an function 
myself.
But are there any built in functions for this? I have looked at usort,
uksort and more, but they do not seem to solve my problem.
uksort() or array_multisort() should do fine
I have tried to figure it out how to use it with those, but I can not find a
solution.
and whats the problem? did you tried uksort() ?
what did you tried? post the code, and someone will take a look and give 
a hint!

sorry, but if you want a complete solution, go hire a php-programmer!
--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
Best groupmember,
I am about to develop an simple admintool for a webpage. My webhost (crappy
but nonexpensive) does not support HTTPS and I still want to be able to
create some sort of secure login.
For the moment I am just using a form that sends the username and passwd
with POST method that verifies the username and passwd in a script. When
this is set I put a $_SESSION['usertype']=admin and when a adminpage is
beeing requested I check so that this sessionvariable is admin, othervise
I redirect to the loginpage and unset all session variables.
Can someone from outside set a $_SESSION variable with some hacker
techniqe?
I assume it is easy to listen to the USERNAME and PASSWORD in the POST-form.
Someone with some tips and tricks to get a secure system without using
HTTPS?
if you have no https you can try a javascript-solution
encode with a encode-key with javascript before sending and decode with 
a decode-key when recieving!

just what you need is key who can encode but not decode! und the 
appropriate decode key on the server, to decode it.

just try to look for some javascript in the web!
--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to assure that php.ini is being obeyed?

2004-11-18 Thread Sebastian Mendel
Llc Mailit wrote:
My problem: To upload large files.
Although /etc/php.ini on my Linux server specifies
upload_max_filesize = 8M
post_max_size = 8M
only files smaller than 512 kB are uploaded, while larger files fail 
with message
This document contains no data
quota?
free space?
try setting display_errors and startup_errors on
try track_errors with on
also, when using apache 1.3.2 or later, see the LimitRequestBody 
directive.
I set display_errors, startup_errors, track_errors On in php.ini, restarted 
Apache and reran an upload session.
The only error message displayed upon attempt to upload a large file is This 
document contains no data
The specified log file is empty.
did you check $php_errormsg ?
track_errors  boolean
If enabled, the last error message will always be present in the 
variable $php_errormsg.

--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [OOP] Class to handle PEAR::DB

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 17:05, [EMAIL PROTECTED] wrote:

 my problem is : everytime I execute this file in CLI mode I always got this

[...]

 Standard Message: DB Error: no database selected
 Standard Code: -14
 DBMS/User Message: SELECT * FROM country [nativecode=1046 ** No Database
 Selected]
 DBMS/Debug Message: SELECT * FROM country [nativecode=1046 ** No Database
 Selected]

 How come the message said I didn't select database ??

Does this work when executed via a webserver? If so, have you checked that you 
have MySQL support compiled into your CLI php?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
For a moment, nothing happened. Then, after a second or 
so, nothing continued to happen. 
*/

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



Re: [PHP] require() in other directories?

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 19:45, Peter Lauri wrote:

Please do not top post.

 But if I am working on a webserver it would try to find it in the root of
 my webserver, or am I wrong?

 For example I use that notation with an image:
 I use this: img src='/image/theimage.gif'

That is your 'webroot'.

 Is this not the case for the PHP-scripting?

No, $_SERVER['DOCUMENT_ROOT'] is what you need to prepend in front 
directories. BTW using relative paths for include should work.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Television -- the longest amateur night in history.
  -- Robert Carson
*/

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



[PHP] Re: require() in other directories?

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
Best groupmember,
I have an webapplication that uses different languages and therefor I have
set up different directorys for each language. All languages use the same
classes.
The problem I have is when I want to require() the classfile I can not
require a file that is not in the same directory as my .php file. I have
tried the following:
require(../classes.php);
require(http://www.mydomain.com/classes.php;);
totally wrong!!!
and more.
All gives me error messages, why?
the relative path in require must be reltaive to the _executing_ script 
NOT to the _included_ script!

f.e. with classes.php in /webroot/
/webroot/index.php:
require 'lang/en.php';
/webroot/lang/en.php:
//WRONG:
require '../classes.php';
//RIGHT:
require 'classes.php';
// or
require '/webroot/classes.php';

--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Peter Lauri
If you use the Autority HTTP that pops up a login window by default, is that
safe against listeners?

/Peter

Sebastian Mendel [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Peter Lauri wrote:
  Best groupmember,
 
  I am about to develop an simple admintool for a webpage. My webhost
(crappy
  but nonexpensive) does not support HTTPS and I still want to be able to
  create some sort of secure login.
 
  For the moment I am just using a form that sends the username and passwd
  with POST method that verifies the username and passwd in a script. When
  this is set I put a $_SESSION['usertype']=admin and when a adminpage
is
  beeing requested I check so that this sessionvariable is admin,
othervise
  I redirect to the loginpage and unset all session variables.
 
  Can someone from outside set a $_SESSION variable with some hacker
  techniqe?
 
  I assume it is easy to listen to the USERNAME and PASSWORD in the
POST-form.
 
  Someone with some tips and tricks to get a secure system without using
  HTTPS?

 if you have no https you can try a javascript-solution

 encode with a encode-key with javascript before sending and decode with
 a decode-key when recieving!

 just what you need is key who can encode but not decode! und the
 appropriate decode key on the server, to decode it.

 just try to look for some javascript in the web!

 --
 Sebastian Mendel

 www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
 www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet

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



Re: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Greg Donald
On Thu, 18 Nov 2004 09:41:53 +0100, Peter Lauri [EMAIL PROTECTED] wrote:
 What editor do you use when working with websites (php) connected directly
 to the FTP?

Editplus has this ability.

http://editplus.com/


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
If you use the Autority HTTP that pops up a login window by default, is that
safe against listeners?
IMHO, the login-data is sent as plain text also, and this with every 
subsequent request! and not only with the first!

--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP-editor connected to FTP?

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
Best groupmember,
What editor do you use when working with websites (php) connected directly
to the FTP?
I like Eclipse 3.0 with the PHP plugin, but it do not have the future to
connect to the FTP.
did you tried the FTP-WebDAV plugin?
--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Sorting multidim array and keeping associations

2004-11-18 Thread Peter Lauri
The problem was more complex than I described, I instead wrote a sorting
algorithm for this specific purpose.

The array multi-dim array looks like this (short version). The total element
is just the sum of the other. This is a point system for golftournaments. I
wanted to sort them first on total and if the total was the same I wanted
to sort them with the highest point in a specific tournament, and so on. I
have not found an simple solution to this using any built in functions. So I
thought is was the best to sort it manually. My algorithm is problably not
efficient, but it works just fine for this solution. You can find the
algorithm in the end of this message.

/Peter
Array
(
[40] = Array
(
[1] = 16
[2] = 20
[3] = 20
[4] = 10
[total] = 66
)

[35] = Array
(
[1] = 20
[2] = 11
[3] = 12
[4] = 20
[5] = 17
[total] = 80
)

[49] = Array
(
[2] = 14
[total] = 14
)

[139] = Array
(
[4] = 14
[total] = 14
)

[79] = Array
(
[4] = 10
[5] = 4
[total] = 14
)
)

//Sorting Order Of Merit arrayfunction sort_oom($arr) { //create the sum
element by adding all tournament result foreach($arr as $id = $player) {
$total=0;  foreach($player as $tourpoint) {   $total+=$tourpoint;  }
$arr[$id]['total']=$total; }  reset($arr); $num = count($arr);
$sortedarray=array(); for($i=1; $i=$num; $i++) {  //Get the element that
ranks currently #1  $elem = get_largest_element($arr, 'total');  //Put that
element into a new array  $sortedarray[$elem]=$arr[$elem];  //Unset the
element from the original array  unset($arr[$elem]);  //reset the array
reset($arr); } //Viola, the array is sorted... return $sortedarray; }
function get_largest_element($arr, $sortkey) { //create candidatearray $cand
= array(); //before looping the largest total is 0 $largest = 0;
reset($arr); foreach($arr as $id = $value) {  if($value[$sortkey] 
$largest) {   //Delete all candidates entered because they are not
candidates to be largest no more   unset($cand);   //Insert into
candidatearray   $cand[$id]=$value;   //update the largest value   $largest
= $value[$sortkey];  } elseif($value[$sortkey] == $largest) {   //Add to
candidate key   $cand[$id]=$value;  } } $arg=true; $largest=0; reset($cand);
//Candidate contains at minimum 1 candidate //If more than two candidates,
subsorting have to begin while(count($cand)1 AND $arg) {  //Find the
largest subvalue (all values not $sortkey)  foreach($cand as $id = $value)
{   foreach($value as $secid = $point) {if($point  $largest AND
$secid!=$sortkey) { $largest=$point;}   }  }  //Loop thru array and
delete elements that do not have  //values larger or equal to the largest
value  foreach($cand as $id = $value) {   $ok=false;   foreach($value as
$secid = $point) {if($point == $largest AND $secid!=$sortkey) {
unset($cand[$id][$secid]); $ok=true;}   }   if(!$ok AND
count($cand[$id])1) { unset($cand[$id]);}  }  //If there are candidates
presice equal, pick the first.  if($largest==0 AND count($cand)1) {
$arg=false;   $check = 1;   foreach($cand as $id = $value) {
if($check!=1) { unset($cand[$id]);}$check++;   }  }
 $largest=0; } reset($cand); $el = each($cand); return $el['key'];}

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



[PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Manuel Lemos
On 11/18/2004 10:23 AM, Peter Lauri wrote:
If you use the Autority HTTP that pops up a login window by default, is that
safe against listeners?
It depends on the authentication method. Basic authentication method 
passes passwords as base64 encoded plain text. Digest and even NTLM are 
safer because the actual passwords are not sent without encryption.

--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Sorting multidim array and keeping associations

2004-11-18 Thread Sebastian Mendel
Peter Lauri wrote:
The problem was more complex than I described, I instead wrote a sorting
algorithm for this specific purpose.
The array multi-dim array looks like this (short version). The total element
is just the sum of the other. This is a point system for golftournaments. I
wanted to sort them first on total and if the total was the same I wanted
to sort them with the highest point in a specific tournament, and so on. I
have not found an simple solution to this using any built in functions. So I
thought is was the best to sort it manually. My algorithm is problably not
efficient, but it works just fine for this solution. You can find the
algorithm in the end of this message.
Array
(
[40] = Array
(
[1] = 16
[2] = 20
[3] = 20
[4] = 10
[total] = 66
)
[49] = Array
(
[2] = 14
[total] = 14
)
)
// without totals
$score_board = uksort( $score_board, 'sortScoreBoard' );
function sortScoreBoard( $element_1, $element_2 )
{
   if ( array_sum( $element_1 )  array_sum( $element_2 ) ) {
   return -1;
   }
   elseif ( array_sum( $element_1 )  array_sum( $element_2 ) ) {
   return 1;
   }
   elseif ( max( $element_1 )  max( $element_2 ) ) {
   return -1;
   }
   elseif ( max( $element_1 )  max( $element_2 ) ) {
   return 1;
   }
   return 0;
}
--
Sebastian Mendel
www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com
www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] HTML button as hyperlink

2004-11-18 Thread Mulley, Nikhil
Hi All,
 
My Question is that , I have an HTML page , how can  I make it as Hyperlink 
instead of a Form Button
 
When user clicks on that button , it must be a href link .
 
Please guide me.
Thanks,
Nikhil.


Re: [PHP] How do I get referer in php?

2004-11-18 Thread John Nichel
John Holmes wrote:
John Nichel wrote:
Didn't notice that those were commas and not periods either, eh? ;)

Didn't notice the result is the same either way, eh? ;)
Well, what do ya know, it is.  Since when did a comma become a 
concatenation operator???  That's it, I'm going home. ;)

--
John C. Nichel
berGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML button as hyperlink

2004-11-18 Thread John Nichel
Mulley, Nikhil wrote:
Hi All,
 
My Question is that , I have an HTML page , how can  I make it as Hyperlink instead of a Form Button
 
When user clicks on that button , it must be a href link .
 
Please guide me.
Thanks,
Nikhil.

Oh, I don't know.  Maybe you can research HTML, forms, and possibly some 
JavaScript.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Richard Davey
Hello Nikhil,

Thursday, November 18, 2004, 2:04:51 PM, you wrote:

MN My Question is that , I have an HTML page , how can I make it as
MN Hyperlink instead of a Form Button

Failing to see the PHP relevance here. Perhaps you want a Beginners
Guide to HTML?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



RE: [PHP] HTML button as hyperlink

2004-11-18 Thread Mulley, Nikhil
Hoped that this is the best list , I had my problems got solved under PHP 
always here , so mailed request to it.

-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] HTML button as hyperlink


Hello Nikhil,

Thursday, November 18, 2004, 2:04:51 PM, you wrote:

MN My Question is that , I have an HTML page , how can I make it as
MN Hyperlink instead of a Form Button

Failing to see the PHP relevance here. Perhaps you want a Beginners
Guide to HTML?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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

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



Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Marek Kilimajer
Dennis Lahay wrote:
I'm having trouble with writing special charcaters to a text file. The 
characters are your run-of-the-mill accented characters. Passing them 
back and forth in the database and displaying them on screen is NOT a 
problem.

code snippet:
$row = mysql_fetch_array($query_result, MYSQL_ASSOC);
foreach ($exportOrder as $key = $value) { // makes tab-delimited file 
from array
if (array_key_exists($key, $row)) {
$bigString .= $row[$key] . \t;
} else {
$bigString .= \t;
}
}
print $bigString;
$filename = ../../../Volumes/FILEJOB/DB Art IN/ . 
$row['currentSVVersion'];
if (!$file = fopen($filename, 'w+')) {
print Cannot open file ($filename);
exit;
}
fwrite($file, $bigString);
fclose($file);

I print the string immediately before I write the file. It looks like 
this (i hope this formats correctly for the list):
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, PICES  


I write the file, open it up in BBEdit (or your favorite text editor) 
and it looks like this:
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, PICES  
 ?

Why would I lose those special characters when writing to a text file? 
How can I avoid this? The text file will be opened offline, so using 
Eacute; and other character entities won't work.

I've tried:
 - $file = fopen($filename, 'w+b'); adding binary flag doesn't affect 
anything
 - Iooking at php.ini; nothing stood out

Any suggestions? [Mac OSX 10.3.6 : PHP 4.3.2 : MySQL 4.0.18 : Apache 
1.3.29]
You are not loosing them, only bbedit does not display them in the 
original charset. Look in the bbedit menu or configuration if you can 
find some character encoding setting

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


Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Martin Holm
Mulley, Nikhil wrote:
Hi All,
My Question is that , I have an HTML page , how can  I make it as
Hyperlink instead of a Form Button
When user clicks on that button , it must be a href link .
Please guide me.
Thanks,
Nikhil.
.
 

first of all, i dont see anything regarding php in this question.
form method=post action=http://new.url.com/whatever.html;
input type=submit value=Go to other page
/form
// Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php/html displaying query

2004-11-18 Thread Angelo Zanetti
HI all, 

I have this situation  think that maybe some of you could advise me on
a solution.

I have a field in my database which is about a few paragraphs long.
When the user edits this paragraph using php/html in a textarea it
displays correctly with the lines that separate the paragraphs. These
lines are merely blank lines.

However when I want to display this field in HTML I have a problem that
its all bunched into 1 paragraph, obviously because there are no p or
br tags telling the browser there is a space in between, 1 way to get
this to work is to to insert p or br statements in the paragraph but
when the user then edits the paragraph in the textarea it will show the
p or br tags which i dont want, they are end users and will probably
delete them. Is there a way to get around this?? either displaying the
blank line or by hiding the HTML tags in the textarea (but still saving
the paragraph with them in)

Thanks in advance.

Angelo

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] How do I get referer in php?

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 22:10, John Nichel wrote:

 Well, what do ya know, it is.  Since when did a comma become a
 concatenation operator???  That's it, I'm going home. ;)

It didn't. It works for echo because echo accepts more than one parameter 
passed to it separated by commas.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Larkinson's Law:
 All laws are basically false.
*/

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



Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Angelo Zanetti
Hi, 

it can be set as type button then in the onClick method use javascript
to call the target page.

Hope this helps
Angelo

 Mulley, Nikhil [EMAIL PROTECTED] 11/18/2004 4:04:51 PM 
Hi All,
 
My Question is that , I have an HTML page , how can  I make it as
Hyperlink instead of a Form Button
 
When user clicks on that button , it must be a href link .
 
Please guide me.
Thanks,
Nikhil.

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



RE: [PHP] HTML button as hyperlink

2004-11-18 Thread Mulley, Nikhil
Thanks Martin , it gelled :)

-Original Message-
From: Martin Holm [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 8:07 PM
To: Mulley, Nikhil
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] HTML button as hyperlink


Mulley, Nikhil wrote:

Hi All,

My Question is that , I have an HTML page , how can  I make it as
Hyperlink instead of a Form Button

When user clicks on that button , it must be a href link .

Please guide me.
Thanks,
Nikhil.

.
  

first of all, i dont see anything regarding php in this question.

form method=post action=http://new.url.com/whatever.html;
input type=submit value=Go to other page
/form

// Martin

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



RE: [PHP] HTML button as hyperlink

2004-11-18 Thread Jay Blanchard
[snip]
Hoped that this is the best list , I had my problems got solved under
PHP always here , so mailed request to it.
[/snip]


You're correct, this is the best list...but off-topic is still
off-topic. The answer that ou seek is BASIC HTML ...

a href=foo.phpimg scr=foo.jpg alt=Foo - Get Some! border=0
width=69 height=69/a

width and height are optional. To make this PHP

echo a href=\foo.php\img scr=\foo.jpg\ alt=\Foo - Get Some!\
border=\0\ width=\69\ height=\69\/a;

Now, don't do it again

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



Re: [PHP] Subscription Request

2004-11-18 Thread Philip Thompson
On Nov 16, 2004, at 10:55 PM, sujis sakethram wrote:
Hello sir,
 Previously i was subscribed to this list with
email id [EMAIL PROTECTED] but it is geniune account
that receives all important mails i mean from
companies and personal.
So, please subscribe me to this mail-id.
Thanking you sir,
  yours sincerely,
   Rajesh.B
___ 
_
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
? echo 'Request complete.'; ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php/html displaying query

2004-11-18 Thread Jay Blanchard
[snip]
However when I want to display this field in HTML I have a problem that
its all bunched into 1 paragraph, obviously because there are no p or
br tags telling the browser there is a space in between, 1 way to get
this to work is to to insert p or br statements in the paragraph but
when the user then edits the paragraph in the textarea it will show the
p or br tags which i dont want, they are end users and will probably
delete them. Is there a way to get around this?? either displaying the
blank line or by hiding the HTML tags in the textarea (but still saving
the paragraph with them in)
[/snip]

Have a look at TFM http://www.php.net/nl2br

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



RE: [PHP] php/html displaying query

2004-11-18 Thread Andrew Cherry
You'll need to looking at converting newline characters to br / tags on
display, etc. Or p if you want to be a bit more semantic about it. A regex
on the value to replace should work a treat. Google or php.net for the
specifics of the regex use and form.

Andrew

-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED] 
Sent: 18 November 2004 14:14
To: [EMAIL PROTECTED]
Subject: [PHP] php/html displaying query

HI all, 

I have this situation  think that maybe some of you could advise me on
a solution.

I have a field in my database which is about a few paragraphs long.
When the user edits this paragraph using php/html in a textarea it
displays correctly with the lines that separate the paragraphs. These
lines are merely blank lines.

However when I want to display this field in HTML I have a problem that
its all bunched into 1 paragraph, obviously because there are no p or
br tags telling the browser there is a space in between, 1 way to get
this to work is to to insert p or br statements in the paragraph but
when the user then edits the paragraph in the textarea it will show the
p or br tags which i dont want, they are end users and will probably
delete them. Is there a way to get around this?? either displaying the
blank line or by hiding the HTML tags in the textarea (but still saving
the paragraph with them in)

Thanks in advance.

Angelo

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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

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



RE: [PHP] HTML button as hyperlink

2004-11-18 Thread Angelo Zanetti
well thats the whole point of a submit button: thats it submits the form
to a specific file. I would suggest doing an HTML tutorial, it wont take
long and it will really help.

Angelo

 Mulley, Nikhil [EMAIL PROTECTED] 11/18/2004 4:39:35 PM 
Thanks Martin , it gelled :)

-Original Message-
From: Martin Holm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 18, 2004 8:07 PM
To: Mulley, Nikhil
Cc: [EMAIL PROTECTED] 
Subject: Re: [PHP] HTML button as hyperlink


Mulley, Nikhil wrote:

Hi All,

My Question is that , I have an HTML page , how can  I make it as
Hyperlink instead of a Form Button

When user clicks on that button , it must be a href link .

Please guide me.
Thanks,
Nikhil.

.
  

first of all, i dont see anything regarding php in this question.

form method=post action=http://new.url.com/whatever.html;
input type=submit value=Go to other page
/form

// Martin

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



RE: [PHP] php/html displaying query

2004-11-18 Thread Angelo Zanetti
thanks Jay, 

exactly what I needed and it works like a charm!

Angelo

 Jay Blanchard [EMAIL PROTECTED] 11/18/2004
4:46:36 PM 
[snip]
However when I want to display this field in HTML I have a problem
that
its all bunched into 1 paragraph, obviously because there are no p
or
br tags telling the browser there is a space in between, 1 way to
get
this to work is to to insert p or br statements in the paragraph
but
when the user then edits the paragraph in the textarea it will show
the
p or br tags which i dont want, they are end users and will
probably
delete them. Is there a way to get around this?? either displaying the
blank line or by hiding the HTML tags in the textarea (but still
saving
the paragraph with them in)
[/snip]

Have a look at TFM http://www.php.net/nl2br

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



[PHP] creating XML with simpleXML

2004-11-18 Thread Lorderon
Hi,

I know how to parse XML files with simpleXML. It also allows to edit/modify
elements contents.
But, is there a way to create an XML from scratch using simpleXML?

-thanks, Lorderon.

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



Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Marek Kilimajer
Mulley, Nikhil wrote:
Hi All,
 
My Question is that , I have an HTML page , how can  I make it as Hyperlink instead of a Form Button
 
When user clicks on that button , it must be a href link .
 
Please guide me.
My preference is CSS. Style your link to look like a button.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Dennis Lahay
The file doesn't exist, so I need to create it first. So I did this:
$filename = ../../../Volumes/FILEJOB/ . $row['currentSVVersion'];
if (!$file = fopen($filename, 'w+')) {
print Cannot open file ($filename);
exit;
}
fclose($file);
Then I wrote to it using your suggestion:
if (!$file = fopen($filename, 'wb')) {
print Cannot open file ($filename);
exit;
}
fwrite($file, $bigString);
fclose($file);
Still didn't work.
Anyone else have any suggestions?
On Nov 17, 2004, at 5:30 PM, Tom Z. Meinlschmidt wrote:
hi,
try to fopen() the file for writing only by fopen('filename','wb').. 
the
same for reading  - fopen('filename','rb') ...

/tom
On Wed, Nov 17, 2004 at 04:26:20PM -0600 Dennis Lahay 
[EMAIL PROTECTED] wrote:
I'm having trouble with writing special charcaters to a text file. The
characters are your run-of-the-mill accented characters. Passing them
back and forth in the database and displaying them on screen is NOT a
problem.
code snippet:
$row = mysql_fetch_array($query_result, MYSQL_ASSOC);
foreach ($exportOrder as $key = $value) { // makes tab-delimited file
from array
if (array_key_exists($key, $row)) {
$bigString .= $row[$key] . \t;
} else {
$bigString .= \t;
}
}
print $bigString;
$filename = ../../../Volumes/FILEJOB/DB Art IN/ .
$row['currentSVVersion'];
if (!$file = fopen($filename, 'w+')) {
print Cannot open file ($filename);
exit;
}
fwrite($file, $bigString);
fclose($file);
I print the string immediately before I write the file. It looks like
this (i hope this formats correctly for the list):
INGRÉDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, ÉPICES
? Â ? Ç ? É ? Ë Î ? Ô ? Ü ?
I write the file, open it up in BBEdit (or your favorite text editor)
and it looks like this:
INGR?DIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, ?PICES
? ? ? ? ? ?   ? ?? ? ? ? ? ?
Why would I lose those special characters when writing to a text file?
How can I avoid this? The text file will be opened offline, so using
Eacute; and other character entities won't work.
I've tried:
 - $file = fopen($filename, 'w+b'); adding binary flag doesn't affect
anything
 - Iooking at php.ini; nothing stood out
Any suggestions? [Mac OSX 10.3.6 : PHP 4.3.2 : MySQL 4.0.18 : Apache
1.3.29]
D

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


Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Dennis Lahay
Ah, if were only that simple but, alas, it is not. I have opened other 
documents that contain these special characters and BBEdit has 
displayed them properly.


On Nov 18, 2004, at 8:23 AM, Marek Kilimajer wrote:
You are not loosing them, only bbedit does not display them in the 
original charset. Look in the bbedit menu or configuration if you can 
find some character encoding setting


Dennis Lahay wrote:
I'm having trouble with writing special charcaters to a text file. 
The characters are your run-of-the-mill accented characters. Passing 
them back and forth in the database and displaying them on screen is 
NOT a problem.
code snippet:
$row = mysql_fetch_array($query_result, MYSQL_ASSOC);
foreach ($exportOrder as $key = $value) { // makes tab-delimited 
file from array
if (array_key_exists($key, $row)) {
$bigString .= $row[$key] . \t;
} else {
$bigString .= \t;
}
}
print $bigString;
$filename = ../../../Volumes/FILEJOB/DB Art IN/ . 
$row['currentSVVersion'];
if (!$file = fopen($filename, 'w+')) {
print Cannot open file ($filename);
exit;
}
fwrite($file, $bigString);
fclose($file);
I print the string immediately before I write the file. It looks like 
this (i hope this formats correctly for the list):
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, 
PICES  
I write the file, open it up in BBEdit (or your favorite text editor) 
and it looks like this:
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, 
PICES   ?
Why would I lose those special characters when writing to a text 
file? How can I avoid this? The text file will be opened offline, so 
using Eacute; and other character entities won't work.
I've tried:
 - $file = fopen($filename, 'w+b'); adding binary flag doesn't affect 
anything
 - Iooking at php.ini; nothing stood out
Any suggestions? [Mac OSX 10.3.6 : PHP 4.3.2 : MySQL 4.0.18 : Apache 
1.3.29]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: creating XML with simpleXML

2004-11-18 Thread Manuel Lemos
Hello,
On 11/18/2004 01:12 PM, Lorderon wrote:
But, is there a way to create an XML from scratch using simpleXML?
I don't know about SimpleXML because it is PHP 5 only and I do not 
intend to use PHP 5 most likely before 2006 .

Anyway, I use this class for composing and outputing XML documents from 
scratch:

http://www.phpclasses.org/xmlwriter
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] mp3 parsing

2004-11-18 Thread Gryffyn, Trevor
Nice script.. Short and concise.  Havn't tested it yet, but I like short
and concise. :)

One thing to note..   This appears to handle ID3v1 tags (which are
stored at the beginning of the file).  ID3v2 tags are stored at the end
of the MP3 and are a little trickier to deal with but they can hold a
lot more information.  Check out this:

http://nyphp.mirrors.phpclasses.org/browse/package/640.html

Havn't used it, but it's the first one I came across doing this search:
http://search.yahoo.com/search?p=php+id3v2


I'm sure you can find a ton of ID3 parsers for PHP.  Just wanted to
point out that there are at least two standards for ID3 tags and that
you should probably check into both if you want full compatibility.

-TG



 -Original Message-
 From: Ron Stiemer [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 16, 2004 9:01 PM
 To: [EMAIL PROTECTED]
 Cc: Ryan King
 Subject: Re: [PHP] mp3 parsing
 
 
 Hi,
 
 maybe this wil help you...i made this some time ago...
 
 ?php
 
 function ShowID3( $mp3, $path )
 {
   $file= $path . $mp3;
 $value   = fopen( $file, r);
 $content = fread( $value, filesize ($file) );
 $tag = str_replace( TAG,, strstr( $content, TAG ) );
 
   $title   = substr( $tag, 0, 30);
 $band= substr( $tag, 30, 30 );
 $album   = substr( $tag, 60, 30 );
 $year= substr( $tag, 90, 4 );
 $comment = substr( $tag, 94, 30 );
 //$genre   = substr( $tag, 124, 1 );
 
   echo,
 bTitel/b:  . $title . br .
 bBand/b:  . $band  . br .
 bAlbum/b:  . $album . br .
 bJahr/b:  . $year  . br .
 bKommentar/b:  . $comment . br;
 
   fclose( $value );
 }
 
 ShowID3( test.mp3,  );
 
 ?
 
 Regards,
 Ron
 
 Am Mittwoch, 17. November 2004 01:58 schrieb Ryan King:
  Anyone out there have a way to read the header info out of 
 an mp3 file?
  I'm able to parse out the id3 tags, but am having trouble 
 finding a way
  to read the header info. The info I'm trying to get is the 
 playtime and
  bitrate.
 
  thanks,
  ryan
 
 -- 
 

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



RE: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Gryffyn, Trevor
I use Crimson Editor which will save directly to an FTP location fairly
easily.   I'm not sure if they fixed this, but in earlier versions it
wouldn't save a local backup copy and I ran into problems where it would
fail to send via FTP, I'd have a zero byte file on the remote web server
and would close Crimson Editor without testing first or something.. So
I'd lose whatever edits I did since my last backup.   So I stopped using
the Save to FTP feature.

I do believe that they do local backups now, but out of habit I don't
use the FTP Feature.

I bet Zend Studio will save remotely too.

-TG


 -Original Message-
 From: Greg Donald [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 18, 2004 7:24 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP-editor connected to FTP?
 
 
 On Thu, 18 Nov 2004 09:41:53 +0100, Peter Lauri 
 [EMAIL PROTECTED] wrote:
  What editor do you use when working with websites (php) 
 connected directly
  to the FTP?
 
 Editplus has this ability.
 
http://editplus.com/


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] require() in other directories?

2004-11-18 Thread Ryan King
Peter Lauri wrote:
I get the Failed to open stream, no such file in directory
If you were in one of these folders:
/fr/
/eng/
And your classfile was namned classes.php and in the directory:
/classes/
And you wanted to include the classfile, how would you write it?
I would assume: require(/classes/classes.php);
require(classes/classes.php);

But that doesn't work.
Help :)

Pluance [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
What error happen?
On Thu, 18 Nov 2004 09:15:22 +0100, Peter Lauri [EMAIL PROTECTED] wrote:
Best groupmember,
I have an webapplication that uses different languages and therefor I
have
set up different directorys for each language. All languages use the
same
classes.
The problem I have is when I want to require() the classfile I can not
require a file that is not in the same directory as my .php file. I have
tried the following:
require(../classes.php);
require(http://www.mydomain.com/classes.php;);
and more.
All gives me error messages, why?
Anyone that could help me?
- Best Of Times
/Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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


Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Marek Kilimajer
Dennis Lahay wrote:
Ah, if were only that simple but, alas, it is not. I have opened other 
documents that contain these special characters and BBEdit has displayed 
them properly.
Are you using the same charset for both? What is the original source of 
the data? html form? then they are in the charset of the html page


On Nov 18, 2004, at 8:23 AM, Marek Kilimajer wrote:
You are not loosing them, only bbedit does not display them in the 
original charset. Look in the bbedit menu or configuration if you can 
find some character encoding setting


Dennis Lahay wrote:
I'm having trouble with writing special charcaters to a text file. 
The characters are your run-of-the-mill accented characters. Passing 
them back and forth in the database and displaying them on screen is 
NOT a problem.
code snippet:
$row = mysql_fetch_array($query_result, MYSQL_ASSOC);
foreach ($exportOrder as $key = $value) { // makes tab-delimited 
file from array
if (array_key_exists($key, $row)) {
$bigString .= $row[$key] . \t;
} else {
$bigString .= \t;
}
}
print $bigString;
$filename = ../../../Volumes/FILEJOB/DB Art IN/ . 
$row['currentSVVersion'];
if (!$file = fopen($filename, 'w+')) {
print Cannot open file ($filename);
exit;
}
fwrite($file, $bigString);
fclose($file);
I print the string immediately before I write the file. It looks like 
this (i hope this formats correctly for the list):
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, 
PICES  
I write the file, open it up in BBEdit (or your favorite text editor) 
and it looks like this:
INGRDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, 
PICES   ?
Why would I lose those special characters when writing to a text 
file? How can I avoid this? The text file will be opened offline, so 
using Eacute; and other character entities won't work.
I've tried:
 - $file = fopen($filename, 'w+b'); adding binary flag doesn't affect 
anything
 - Iooking at php.ini; nothing stood out
Any suggestions? [Mac OSX 10.3.6 : PHP 4.3.2 : MySQL 4.0.18 : Apache 
1.3.29]

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


[PHP] problem in my php code

2004-11-18 Thread Hongwei Li
Hi,

I have a problem in my php code.  I simplify the code as the 4 pieces
below and hope somebody can help me to fix the problem.

1. tsstart.php: -- this is the start point to be browsed

?php
include tsdata.php;
include tsshow.php;
?

2. tsdata.php: -- to get data, here I set it as a 2-d array and assign
values to it to simplify the code

?php
global $obj;
global $ind;
for($i=0;$i3;$i++) {
 for($j=0;$j2;$j++) {
  $obj[$i][$j] = $i + $j*2;
 }
}
$ind=0;
?

3. tsshow.php: -- display the values of $obj:

?php
global $obj;
global $ind;
echo result-set index:  . $ind . br;
?

html body
table align=center
 trtdFirst Row:/tdtd? echo $obj[$ind][0] ?/td /tr
 trtdSecond Row:/tdtd? echo $obj[$ind][1] ?/td /tr
/table
a href=tsnext.phpNext/anbsp;
/body /html

4. tsnext.php: -- to display the next 2-d array element's value:

?php
global $obj;
global $ind;

$ind++;
echo new ind:  . $ind . br;
include tsshow.php;
?

Now, when I browse tsstart.php, it displays:
result-set index: 0
  First Row: 0
  Second Row: 2
and the link Next

However, when I click the link Next, it displays:
new ind: 1
result-set index: 1
  First Row:
  Second Row:

no values are displayed.  Apparently, $obj is not passed to tsnext.php and
tsshow.php (the second time), but $ind is.  What is wrong in the above
codes?  Can somebody help me?

I greatly appreciate all help!

Hongwei Li

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



Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 23:46, Dennis Lahay wrote:
 Ah, if were only that simple but, alas, it is not. I have opened other
 documents that contain these special characters and BBEdit has
 displayed them properly.

After creating the file, use PHP to read it back and display its contents.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
#ifdef STUPIDLY_TRUST_BROKEN_PCMD_ENA_BIT
linux-2.4.0-test2/drivers/ide/cmd640.c
*/

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



RE: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
Thanks for the link.  Here's one relating to Yahoo's use of PHP:
http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm


Also, out of curiosity I recently did a search trying to find some numbers 
comparing ASP usage to PHP usage.  Market dominance and penetration and such.

I didn't look too long and didn't find any GREAT sites with hard numbers, but 
here's some random tidbits I came across.  I don't have time to figure out 
which of the links I bookmarked I got the info from, so forgive the rough 
numbers and paraphrasing.


There seemed to be a 2003 survey of IT professionals (as well as another source 
or two) that seemed to indicate the following:

Roughly 1/3 of the web servers on the internet these days run IIS
Roughly 2/3 run Apache in some fashion

Ok, so I'm rounding a little.. There were a smattering of other web servers of 
course, but let's work with these numbers as an example.

Roughly 40-50% of the Apache guys were running PHP as their primary scripting 
language (at least for web authoring).

Assuming that 100% of the IIS guys run ASP or ASP.NET (which isn't a great 
assumption, but let's make it anyway).  That'd put IIS + ASP at roughly 1/3 
market penetration and Apache + PHP at roughly 1/3.


When I think of Microsoft vs Other, especially open source, I feel like that 
even if it's close, it's going to be a 60/40 or 70/30 sort of split in MS's 
favor, not a dead 50/50 sort of deal.  So these kind of stats are VERY 
encouraging for anyone who needs to make the argument to their boss regarding 
how popular PHP is, if it's going to be around for a while (see other responses 
for ammo on that argument, I agree with all of them so far) and if there are 
going to be people to support your PHP apps if you die, quit, get fired, join a 
monestary, etc.

There can't be that many Apache + PHP based servers without a corresponding 
number of developers.   There aren't 20 PHP developers doing all the work and 
100,000 ASP developers doing the same amount of work in ASP.


There was another thread earlier this week though talking about justifying the 
use of PHP and another great point was brought up.  What do you use for your 
main servers currently... What do the other developers you possibly work with 
already know versus would have to learn, what other applications do you have an 
what languages are THEY written in, etc.  There are a lot more questions that 
need to be asked in order to justify PHP development.

If you have a bunch of .NET developers and already have some ASP.NET 
applications, then it might be more cost effective for you, a single person, to 
learn ASP.NET (I know, I'd hate to give up PHP too), then to have 5 other 
people learn PHP and then convert existing applications over to PHP, etc.


ASP and ASP.NET are free, just like PHP.. If you already run MS servers.  The 
good development tools might be another story, but if you have Windows XP (Pro 
I believe), then you have IIS and can run ASP and maybe ASP.NET.  If you have 
Windows 95 or Windows 98, you have Personal Web Server which will do ASP.

I think open source means a more guarenteed support base and backward 
compatibility compared ot MS's whim of the day deciding that things like J++ 
weren't viable to support, for example.  Sure, there are still J++ developers 
and user groups and such, but it only lasts so long before someone says This 
is antiquated, we need to move to something else.  Sure, eventually most of us 
will have to port our PHP4 stuff to PHP5 PHP changes too.. But it's less 
dramatic than going from J++ to C# or something.

Anyway, I'm babbling now.  Just some things to think about.

Keep fighting the good fight.  Keep asking the right questions.  Good luck.

-TG

 -Original Message-
 From: Jordi Canals [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 17, 2004 9:34 PM
 To: PHP List
 Subject: Re: [PHP] PHP Supremacy...
 
 
 On Wed, 17 Nov 2004 16:17:44 -0600, Pedro Irán Méndez Pérez
 [EMAIL PROTECTED] wrote:
 
  Hello my friends, I need your help in convince to my boss 
 in adopt php for
  development of a tool for intranet in my office, he told me 
 that php is open
  source and we don´t know if will disappear in a year, or if 
 php have a
  support like .net.
  
  what arguments can I show for convince him to try PHP?
  
 
 You know that PHP will not disapear in a year, as it is Open Source
 and anybody can take it and do what he wants with the source code ...
 Also there are important companies that have PHP based bussines (Zend
 for example).
 
 Well, the first thing you must tell him is that Microsoft has
 demonstred that changes technologies at his own interests. When a new
 version is released you have to update if you want support. As the
 source code is closed, nobody else than MS can maintain the code, so
 you're married with them. And of course, any upgrade means lots of
 money.
 
 If you choose the MS platform, Microsoft will decide when you should
 upgrade, if you look 

Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Marek Kilimajer
Chris Boget wrote:
My preference is CSS. Style your link to look like a button.

What would the CSS look like to do this, I'm curious...
For default Mozilla button:
A.button {
  padding: 0px 6px 0px 6px;
  border-width: 2px;
  border-style: outset;
  border-color: ButtonFace;
  background-color: ButtonFace;
  color: ButtonText;
  cursor: default;
  white-space: pre;
}
A.button:active {
  border-style: inset;
}
a href=http://www.php.net; class=buttonPHP/a
I used system colors: http://www.w3.org/TR/CSS2/ui.html#system-colors
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] problem in my php code

2004-11-18 Thread Richard Davey
Hello Hongwei,

Thursday, November 18, 2004, 4:46:00 PM, you wrote:

HL no values are displayed. Apparently, $obj is not passed to
HL tsnext.php and tsshow.php (the second time), but $ind is. What is
HL wrong in the above codes? Can somebody help me?

Unless there was some code missed out, I cannot see where you are
passing ANYTHING to tsnext.php - PHP scripts work fully independantly,
there is no way the tsnext.php script can know what has happened in
any previous PHP script and it cannot pick up values or variables
unless you actually explicitly send them to the subsequent script/s.

The reason $ind appears to have been passed (i.e. is set 1 to) is only
because you are doing $ind++ before you echo it out. If you didn't, it
would still be a value of 0.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



RE: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Chris W. Parker
Peter Lauri mailto:[EMAIL PROTECTED]
on Thursday, November 18, 2004 12:42 AM said:

 What editor do you use when working with websites (php) connected
 directly to the FTP?
 
 I like Eclipse 3.0 with the PHP plugin, but it do not have the future
 to connect to the FTP.

HTML-Kit (www.chami.com) will do this. I've been using HTML-Kit for
almost 2 years and I've never had a problem with a bad save.


hth,
chris.

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



[PHP] $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Scott Fletcher
I found that $_FILES and move_uploaded_file doesn't contain directories name
when I uploaded multiple files/folders.  On the unix machine, all I saw are
files as if the tree is being stripped out and the remaining files is placed
together as if there's no folder.

Why is that?  I really need this to work because the files/folders varies
all the time.

Thanks,
 Scott

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



Re: [PHP] how to parse a string parse with ereg

2004-11-18 Thread Mark-Walter
Helo,

 I meant explode each *line* (at the EOL character(s)), so this:
 xxx.x.x.x |  0.0.0.0 255.255.255.255 UH 0 |  |  | 0 |  |  |  | 0 ppp0
 is an element of the array. And this:
 192.168.0.0 0.0.0.0 255.255.255.0 U |  | 0 |  |  | 0 |  |  |  | 0 eth1
 is another element, etc.
  0.0.0.0 |  |  xxx.x.x.x 0.0.0.0 |  |  UG |  0 |  |  | 0 |  |  |  | 0
  E.g. Line 3 won't be in an array. This could maybe be caused from
  drop  paste to copy from a shell into the browser while using
  an extraordinary OS.
 Then you can process each line separately but in groups 3 lines at a time 
 (assuming they're supposed to be groups of 3).

but what happen's in the case a user drop down every line in a web
form without a ELO character ?

  The difference lead's now to an error as the syntax is wrong.

 If you state clearly, in detail, what exactly you want the regex 
 to match then 
 maybe someone could construct a better one for you. 

Ok, at the moment I verify the assuming missed device with a difference
of the following both block's:

?
$INET_NUM_exp = ereg_replace([\ ]+([a-z]+)([0-9]{1}),\\1\\2_XrR,$INET_NUM);
$sorter = explode(_XrR,$INET_NUM_exp);
$result = count($sorter);
$result = $result-1;

$INET_NUM_exp2 = 
ereg_replace(([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ 
]+([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ 
]+([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ 
]+,\\1\\2_XrR,$INET_NUM);
$sorter2 = explode(_XrR,$INET_NUM_exp2);
$result2 = count($sorter2);
$result2 = $result2-1;

?

In the case $result is equal to $result2 the following code 
will be called within a function. If not an error occurs which
will lead to a exit before the following is done.

?
   if ($INET_NUM  ereg('[\ ]+([a-z]+)([0-9]{1})',$INET_NUM,$part)) {
  $INET_STRING = $part[1].$part[2];
  $INET_NUM = ereg_replace([\ 
]+([a-z]+)([0-9]{1}),\\1\\2_XrR,$INET_NUM);
  $sorter = explode(_XrR,$INET_NUM);
  array_pop($sorter);
 while(list($key,$value) = each($sorter)) {
if (ereg('([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ 
]+([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ 
]+([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[\ ]+([A-Z]+)[\ 
]+([0-9]+)[\ ]+([0-9]+)[\ ]+([0-9]+)', $value, $part)) {
   if ($part[1] = 255  $part[2] = 255  $part[3] = 255  
$part[4] = 255  $part[5] = 255  $part[6] = 255  $part[7] = 255  
$part[8] = 255  $part[9] = 255  $part[10] = 255  $part[11] = 255  
$part[12] = 255  is_numeric($part[1])  is_numeric($part[2])  
is_numeric($part[3])  is_numeric($part[4])  is_numeric($part[5])  
is_numeric($part[6])  is_numeric($part[7])  is_numeric($part[8])  
is_numeric($part[9])  is_numeric($part[10])  is_numeric($part[11])  
is_numeric($part[12])){
 $value = clean_sql_output($value);
 $value = str_replace(\\r\\n,br,$value);
 $INET_NUM_array[$i] = $value;
 $i++;
 } else { 
$stat_ip_address_is_not_valid++; 
 } 
  } else { 
  $stat_ip_address_is_not_valid++;
}
  }
   } else {
  $stat_ip_address_is_not_valid++;
 }
  
   if ($stat_ip_address_is_not_valid1) { return $INET_NUM_array;}
   $INET_NUM_array[0] = 0;
   return $INET_NUM_array; ### SYNTAX ERROR ##
}

?

-- 
Best Regards, 

Mark 

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



Re[2]: [PHP] PHP Supremacy...

2004-11-18 Thread Richard Davey
Hello Trevor,

Thursday, November 18, 2004, 4:55:50 PM, you wrote:

GT Roughly 1/3 of the web servers on the internet these days run IIS
GT Roughly 2/3 run Apache in some fashion

I know you said roughly, but it's less than 1/3 running IIS, quite
a bit less infact. The latest Nov. 2004 Netstat survey puts it at
well under a quarter (21.25% to be exact) with Apache at 67.77%

http://news.netcraft.com/archives/2004/11/01/november_2004_web_server_survey.html

GT Roughly 40-50% of the Apache guys were running PHP as their
GT primary scripting language (at least for web authoring).

Ok, for the sake of argument let's assume it's 40%. I don't believe
for a second it is that high, but anyway.. that would be approx. 15.2
million sites running PHP.

GT Assuming that 100% of the IIS guys run ASP or ASP.NET (which isn't
GT a great assumption, but let's make it anyway). That'd put IIS +
GT ASP at roughly 1/3 market penetration and Apache + PHP at roughly
GT 1/3.

Ok, let's also assume that 100% of the IIS sites out there use ASP,
that's still only 11.9 million sites which doesn't give them an
equal market share in my books :)

The problem of course is that while all IIS hosted sites have the
ABILITY to use ASP, I would be utterly stunned if anywhere near half
of those actually did. Just in the same way that while all Apache
servers *could* run PHP if they wanted, I'd be amazed if all site
owners used it.

There are millions and millions of static HTML sites out there, I
don't think you can accurately gauge it on server software alone. I
know that you weren't trying to, but I'm just saying.

GT ASP and ASP.NET are free, just like PHP.. If you already run MS
GT servers. The good development tools might be another story,

It's the total cost of ownership though.

GT but if you have Windows XP (Pro I believe), then you have IIS and
GT can run ASP and maybe ASP.NET. If you have Windows 95 or Windows
GT 98, you have Personal Web Server which will do ASP.

You can run ASP.NET on any PC capable of supporting the .NET
Framework.

Look at the number of IIS related security issues on Netcraft,
Bugtraq, etc. Even with a 20% market share it's still got more
holes than a piece of Swiss cheese, although I dare say the majority
of those are down to using Windows as the host OS in the first place.

I'm not trying to start that holy platform war here, I'm just saying
IIS could be the most awesome piece of coding ever, but it'll still
always fall foul to that which it sits upon.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



[PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Scott Fletcher
I mean full file path, it only show the filename without the filepath...

Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I found that $_FILES and move_uploaded_file doesn't contain directories
name
 when I uploaded multiple files/folders.  On the unix machine, all I saw
are
 files as if the tree is being stripped out and the remaining files is
placed
 together as if there's no folder.

 Why is that?  I really need this to work because the files/folders varies
 all the time.

 Thanks,
  Scott

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



Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-18 Thread Jeff - Webmaster
Brent,
Declaring the DOCTYPE did it! I completely overlooked that. Thank you very 
much for your help.

Jeff
At 06:40 AM 11/17/2004, Brent Baisley wrote:
For the record, this is NOT a PHP problem. I have no problem on my Mac 
using Safari or FireFox, or even Camino .7. However, there is a problem 
using IE on the Mac. Which, if you have Mac users still using IE, you 
should tell them to cease and desist. It's a discontinued product. But, 
you may not be able to exert this amount of control.

The problem appears to be with the credit card number fields. I can enter 
data as long as I tab to the fields, but I can't click on them. When I do, 
I lose the cursor. My guess is that the problem is caused by you using the 
same id for all 4 credit number fields (id=cardnum). id's are supposed 
to be unique and the validator should have flagged this.

My recommendation to you is fix EVERYTHING that the validator flags. It's 
the right thing to do and a good habit to get into. It will save you a lot 
of time in trying to troubleshoot problems like this. Second, download and 
use FireFox for testing your javascript and your page structure. Under the 
Tools menu there is an option for a Javascript Console which will show you 
anything wrong with your javascript code. There is also a DOM Inspector, 
which will help you troubleshoot the structure of your web page. On your 
javascript init() function you are not setting a default value for the 
block variable.

Most of the browsers on the Mac (and Linux) are adhering to internet 
standards, not to what will work in IE. Code to the standards and your web 
page will most likely just have cosmetic issues due to varying levels of 
support for CSS. There are a lot of things in your code that are not 
exactly wrong, but definitely not correct. You don't have a DOCTYPE 
declared (read up on it, it's important), this will affect how a browser 
will render your page and function. You don't specify which version of 
javascript you are coding to, that can affect how your javascript is run. 
You should declare a script block like this:
script type=text/javascript language=Javascript1.5

On Nov 16, 2004, at 5:03 PM, Jeff - Webmaster wrote:
Thank you for the response Brent. I made that change and the problem 
still exists. I ran the page through the validator and it found some 
generic problems, but nothing that seemed like it would relate here.

Jeff
At 01:19 PM 11/16/2004, Brent Baisley wrote:
I never had a problem with a Mac, nor any platform as long as I adhered 
to web standards. OK, so IE can be problematic especially with CSS.

Anyway, I notice that your input field doesn't have a value= 
attribute. That may be your problem. I'm pretty sure it's a required 
attribute. IE is extremely forgiving of bad HTML, something MS actually 
bragged about recently.

You should run your web page through one of the validators on the 
internet. It will tell every little thing that is wrong with your html.
http://validator.w3.org/

On Nov 16, 2004, at 3:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users 
can go a fill out a simple form and submit it to our support department 
using the post method. For users on PC's, this works flawlessly. I am 
getting complaints from people who use Macintosh who say that they are 
not able to type in certain fields. The fields in question are text 
boxes. There is not anything special about the code (snippet at the end 
of this email). They are hitting the issue using Safari, Netscape, or 
IE and with varying versions of each. Has anyone out there run into 
this before?

Thanks
Jeff
form action=go_auto.php method=post
table cellspacing=0 border=0 cellpadding=2 width=350
#condensed#
tr
tdfont size=1 face=arialBilling Address/td
tdfont size=1 face=arialinput type=text name=cardaddress 
id=cardaddress size=35/td/tr

#condensed#
input type=radio name=agreement value=YESI agree to the 
conditions abovebr
input type=radio name=agreement value=NOPEI do not agree with 
the conditions abovebr
/table
input type=submit name=submit value=Submit
/form

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Richard Davey
Hello Scott,

Thursday, November 18, 2004, 6:05:09 PM, you wrote:

SF I mean full file path, it only show the filename without the filepath...

That's because it only uploads the file, not the full path worth of
files and certainly not any folders. In short - you cannot find out
what you need directly from PHP.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



[PHP] mail() issue...

2004-11-18 Thread Paul Danko
I am building an application that uses the mail() command. I am running
on RedHat v9 with Apache v2 and PHP v4.3.8. The problem is, when I run
the mail() function, the submitting page is very slow (1-2 seconds), I
assume because it is waiting for the message to be queued up by
SendMail. Is there a way to fire off the mail command as a thread,
similar to the way to issues a command via the command prompt followed
by  to run it as a thread.
 
Any ideas?
 
Thanks,
 
-Paul
 

Paul Danko
[EMAIL PROTECTED]
443.677.7279 Mobile
301.883.8881 x 127 Office

 


Re: [PHP] problem in my php code

2004-11-18 Thread Philip Thompson
On Nov 18, 2004, at 10:46 AM, Hongwei Li wrote:
Hi,
I have a problem in my php code.  I simplify the code as the 4 pieces
below and hope somebody can help me to fix the problem.
[snip]
no values are displayed.  Apparently, $obj is not passed to tsnext.php 
and
tsshow.php (the second time), but $ind is.  What is wrong in the above
codes?  Can somebody help me?

I greatly appreciate all help!
Hongwei Li
Like Richard said, your files don't know that the global variables 
exist in the other files. Someone correct me if I'm wrong on this, but 
globals are only global to that specific file. If you want to pass the 
data from one script to the next, I would use $_SESSION variables. If 
you do, make sure you include session_start() at the beginning of each 
script page.

Just in case you haven't used $_SESSION variables before:
http://us2.php.net/manual/en/function.session-start.php
~Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re[2]: [PHP] problem in my php code

2004-11-18 Thread Richard Davey
Hello Philip,

Thursday, November 18, 2004, 6:52:19 PM, you wrote:

PT Someone correct me if I'm wrong on this, but globals are only
PT global to that specific file.

I'm being pedantic here, but they're not really global to *files*,
more to sessions (not in the $_SESSION sense of course). All I'm
trying to say is that you could have one file that includes() another
20, but the global variables would be available to all.

I know you knew this anyway Philip, was just clarifying for the
previous poster :)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



Re: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Scott Fletcher
Well, I had successfully uploaded the files/folders.  PHP just stripped out
the folders for no reasons.  A file can be a folder too.

Scott

Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello Scott,

 Thursday, November 18, 2004, 6:05:09 PM, you wrote:

 SF I mean full file path, it only show the filename without the
filepath...

 That's because it only uploads the file, not the full path worth of
 files and certainly not any folders. In short - you cannot find out
 what you need directly from PHP.

 Best regards,

 Richard Davey
 -- 
  http://www.launchcode.co.uk - PHP Development Services
  I am not young enough to know everything. - Oscar Wilde

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



Re: [PHP] mail() issue...

2004-11-18 Thread Scott Fletcher
I did have that similar problem when it took about a minute or two on unix
machine.  It turn out to be a DNS issue, so the successful workaround I made
was to use the host file instead in /etc/hosts by added the machine name to
it since that what the sendmail use.   Maybe this is in your case?

--snip--
ip addressmachine name  machine name dot domain name dot
com/org/net
--snip--

Scott

Paul Danko [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am building an application that uses the mail() command. I am running
 on RedHat v9 with Apache v2 and PHP v4.3.8. The problem is, when I run
 the mail() function, the submitting page is very slow (1-2 seconds), I
 assume because it is waiting for the message to be queued up by
 SendMail. Is there a way to fire off the mail command as a thread,
 similar to the way to issues a command via the command prompt followed
 by  to run it as a thread.

 Any ideas?

 Thanks,

 -Paul

 
 Paul Danko
 [EMAIL PROTECTED]
 443.677.7279 Mobile
 301.883.8881 x 127 Office
 



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



RE: Re[2]: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
 GT Roughly 1/3 of the web servers on the internet these days run IIS
 GT Roughly 2/3 run Apache in some fashion
 
 I know you said roughly, but it's less than 1/3 running IIS, quite
 a bit less infact. The latest Nov. 2004 Netstat survey puts it at
 well under a quarter (21.25% to be exact) with Apache at 67.77%
 

http://news.netcraft.com/archives/2004/11/01/november_2004_web_server_su
rvey.html

Yeah.. roughly hah.  I'm sticking to that phrase. :)  And yes,
Netcraft was one of the sites I was looking at for the information I
mentioned earlier.  Thanks for the link.

 Ok, let's also assume that 100% of the IIS sites out there use ASP,
 that's still only 11.9 million sites which doesn't give them an
 equal market share in my books :)

Ahh.. What about +/- ?? % margin of error?  (devil's advocate hah)

 The problem of course is that while all IIS hosted sites have the
 ABILITY to use ASP, I would be utterly stunned if anywhere near half
 of those actually did. Just in the same way that while all Apache
 servers *could* run PHP if they wanted, I'd be amazed if all site
 owners used it.

 There are millions and millions of static HTML sites out there, I
 don't think you can accurately gauge it on server software alone. I
 know that you weren't trying to, but I'm just saying.

Agreed.  Very good point.

 GT ASP and ASP.NET are free, just like PHP.. If you already run MS
 GT servers. The good development tools might be another story,
 
 It's the total cost of ownership though.

True.  Then let's look at average salary of a Windows server admin
versus un*x server admin.  I'd be curious to see how they stacked up.
That'd have to be part of your total cost of ownership as well.  Unless
you were totally starting from scratch and were doing it all yourself
(learning whatever tech you needed to learn to get it all done).   Then
you'd have to factor in how much maintenance time each OS required on a
regular basis, etc.

Too much math for me right now.  But in general, I think it's fair to
say that free OS + free scripting + free web server probably beast out
pricey OS + free scripting + free web server.   But something has to be
factored in for we need this OS for other things/requirements too.
That's a bigger and more complicated question. I don't know anyone who
has set up a server specifically for web hosting and no other purpose
(ok, before you jump on me about people having dedicated web servers...
Chances are, they have other servers on the same network that handle
ActiveDirectory, DNS, mail, etc and their web server choice was highly
influenced by their choice in other servers..   Please take my above
statement as one server, one function, no other influences or
something.  The phrasing I want isn't coming to me right now so I'm
going to be lazy and send it out just like this.. Hah).

In general I do agree though.   Total cost of ownership is PROBABLY less
with free OS + free scripting + free web server.

 Look at the number of IIS related security issues on Netcraft,
 Bugtraq, etc. Even with a 20% market share it's still got more
 holes than a piece of Swiss cheese, although I dare say the majority
 of those are down to using Windows as the host OS in the first place.

True..  Not like other OS's DON'T have security issues though.   Running
Sendmail on your un*x box with Apache + PHP?   Running SunOS or IRIX?
How about the recent Mac OS X un*x based security issues?  Again,
devil's advocate   I'm not a huge MS fan, but it's not like they're
the only OS and general platform that provides security issues.  PHP and
Apache have had their share.   Maybe MS has more in general, or maybe
certain bits of MS's collection of apps have had more, but how does that
add up to all the little ones that various un*x components have had?

How do you quantify how vulnerable or unstable is your OS??   It seems
like MS might be more vulnerable, but how would you honestly measure
that?

 I'm not trying to start that holy platform war here, I'm just saying
 IIS could be the most awesome piece of coding ever, but it'll still
 always fall foul to that which it sits upon.

Yup.. I agree.  Again, I'm not trying to start any holy wars either.  I
use whatever OS or scripting language or whatever you put in front of
me.  I have my favorites, but there's good stuff in most systems.  And I
don't take your comments as being flaming or antagonistic at all.  But
the question remains in my mind, how does someone really, fairly,
measure all this stuff and give an accurate comparison between the
various system setups and configurations?

I don't care to find out really.  I let the evengelical users of one
system or another go on about how great their system is (even PHP) and
usually stay out of the discussions that I feel are more opinion based
than hard-facts based.

Whatever people choose to use is cool with me.  I have my reasons for
using what I use.. And so do they.  Whatever gets the job done eh?

 Best regards,
 
 Richard Davey


Re: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Jason Wong
On Friday 19 November 2004 03:28, Scott Fletcher wrote:
 Well, I had successfully uploaded the files/folders.  PHP just stripped out
 the folders for no reasons.  A file can be a folder too.

Could you explain how you did that (upload a folder)?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Rome wasn't burned in a day. 
*/

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



Re: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Marek Kilimajer
Jason Wong wrote:
On Friday 19 November 2004 03:28, Scott Fletcher wrote:
Well, I had successfully uploaded the files/folders.  PHP just stripped out
the folders for no reasons.  A file can be a folder too.

Could you explain how you did that (upload a folder)?
I guess using Raditha's Rad Upload.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] splitting arrays

2004-11-18 Thread Reinhart Viane
hey all,
 
I have a question concerning arrays.
Folowing situation:
 
usertable
 
$sql=select * from users;
$result=mysql_query($sql) or die (mysql_error());
$array=mysql_fetch_array($result);
 
Now this give me an array, i can get specific information with
array['username']
 
What i need to do now is to split up this information so i have new
arrays, or results which i can use in javascript.
Say array1 loops all usernames and puts them in a new array while
another array2 is builed up with all pictures url's of every user.
 
array1[0]=John
array1[1]=Mike
array1[3]=Pete
 
and the other array is
array2[0]=picture of John
array2[1]=picture of Mike
array2[3]=picture of Pete
 
Target is to populate a combobox with the usernames and to show there
pictures when the names are clicked (with javascript / no page refresh).
 
Can someone help me on this?
 
Thx in advance
Reinhart
 
  _  

Reinhart Viane 
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
Domos || D-Studio 
Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01 --
fax +32 15 43 25 26 


STRICTLY PERSONAL AND CONFIDENTIAL 
This message may contain confidential and proprietary material for the
sole use of the intended 
recipient.  Any review or distribution by others is strictly prohibited.
If you are not the intended 
recipient please contact the sender and delete all copies.

 


Re: [PHP] splitting arrays

2004-11-18 Thread Afan Pasalic
$sql=select * from users;
$result=mysql_query($sql) or die (mysql_error());
while($array=mysql_fetch_array($result))
{
array1[]=$array['name'];
array2[]=$array['picture'];
}

Reinhart Viane wrote:
hey all,
I have a question concerning arrays.
Folowing situation:
usertable
$sql=select * from users;
$result=mysql_query($sql) or die (mysql_error());
$array=mysql_fetch_array($result);
Now this give me an array, i can get specific information with
array['username']
What i need to do now is to split up this information so i have new
arrays, or results which i can use in javascript.
Say array1 loops all usernames and puts them in a new array while
another array2 is builed up with all pictures url's of every user.
array1[0]=John
array1[1]=Mike
array1[3]=Pete
and the other array is
array2[0]=picture of John
array2[1]=picture of Mike
array2[3]=picture of Pete
Target is to populate a combobox with the usernames and to show there
pictures when the names are clicked (with javascript / no page refresh).
Can someone help me on this?
Thx in advance
Reinhart
 _  

Reinhart Viane 
mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
Domos || D-Studio 
Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01 --
fax +32 15 43 25 26 

STRICTLY PERSONAL AND CONFIDENTIAL 
This message may contain confidential and proprietary material for the
sole use of the intended 
recipient.  Any review or distribution by others is strictly prohibited.
If you are not the intended 
recipient please contact the sender and delete all copies.


 

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


Re: [PHP] How to assure that php.ini is being obeyed?

2004-11-18 Thread Mailit, LLC
Sebastian Mendel,
I am using simple scripts to verify this file size issue:
The Html file that accepts the job is as follows:
form enctype=multipart/form-data action=uploading.php method=POST
   input type=hidden name=MAX_FILE_SIZE value=800 /
   pSend this file: input name=userfile type=file /
   pinput type=submit value=Send File /
/form
The action php script is as follows:
?php
  # uploading.php - Process the saving of an uploaded file
  $name = $_FILES[userfile][name];
  $type = $_FILES[userfile][type];
  $size = $_FILES[userfile][size];
  print( The file is called $name, type $type, size $sizebr );
  print( Error message: $php_errormsgbr );
?
I don't know how to see the error message, because when I submit a large 
file for uploading,  it does not even
execute the php script; the message This document contains no data 
pops up; if I click on OK, the php script
is not executed. I think I need a function that will catch the error 
before the system message pops up, but I don't
know how to code it.
So, that is why I am baffled. The error message that I see is not 
explanatory of the real situation.
Mario Miyojim

Sebastian Mendel wrote:
Llc Mailit wrote:
My problem: To upload large files.
Although /etc/php.ini on my Linux server specifies
upload_max_filesize = 8M
post_max_size = 8M
only files smaller than 512 kB are uploaded, while larger files 
fail with message
This document contains no data

quota?
free space?
try setting display_errors and startup_errors on
try track_errors with on

also, when using apache 1.3.2 or later, see the LimitRequestBody 
directive.

I set display_errors, startup_errors, track_errors On in php.ini, 
restarted Apache and reran an upload session.
The only error message displayed upon attempt to upload a large file 
is This document contains no data
The specified log file is empty.

did you check $php_errormsg ?
track_errors  boolean
If enabled, the last error message will always be present in the 
variable $php_errormsg.


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


Re: [PHP] PHP Supremacy...

2004-11-18 Thread Peter Risdon
Richard Davey wrote:
Hello Trevor,
Thursday, November 18, 2004, 4:55:50 PM, you wrote:
GT Roughly 1/3 of the web servers on the internet these days run IIS
GT Roughly 2/3 run Apache in some fashion
I know you said roughly, but it's less than 1/3 running IIS, quite
a bit less infact. The latest Nov. 2004 Netstat survey puts it at
well under a quarter (21.25% to be exact) with Apache at 67.77%
http://news.netcraft.com/archives/2004/11/01/november_2004_web_server_survey.html
What's more, the IIS figure is down from a high of 35% in 2002 and is 
continuing to shrink. Apache is continuing to grow. There are reasons 
for this...

GT Roughly 40-50% of the Apache guys were running PHP as their
GT primary scripting language (at least for web authoring).
Ok, for the sake of argument let's assume it's 40%. I don't believe
for a second it is that high, but anyway.. that would be approx. 15.2
million sites running PHP.
There's a Netcraft survey based graph at php.net that shows about 17 
million PHP-powered sites.  And we don't need to make assumptions about 
ASP either: PHP overtook classic in 2002 and ASP.Net powers fewer than 3 
million sites.

[snip]
GT ASP and ASP.NET are free, just like PHP.. If you already run MS
GT servers. The good development tools might be another story,
That's a four-figure if, though, in practice. Not much in the budget for 
most serious sites or hosting infrastructures, but still needs to be 
factored in. It's a few missing features on any ASP site with a fixed 
budget, compared to the equivalent Open Source OS/Apache alternative.

Development tools? OK, but you can develop on any platform and there are 
some great free tools. Oh, you want to use MS? Let me take that back. 
Want to make sense of the logs? That's more spondulicks. What's your 
database backend going to be? And so on.

It's the total cost of ownership though.
And this includes the use of extensions to the languages. PHP extensions 
are free, ASP ones invariably cost. This has implications for the future 
of any project as well as the starting point: extending an ASP site 
could cost...well, it's impossible to know right now. Depends what 
direction we need to take in the future. But PHP extensions will be 
free. Then there are the license terms which in the case of ASP 
extensions are, er... we don't know yet. Depends on the extension.

Bit of a no-brainer, really.
GT but if you have Windows XP (Pro I believe), then you have IIS and
GT can run ASP and maybe ASP.NET. If you have Windows 95 or Windows
GT 98, you have Personal Web Server which will do ASP.
Hell of a waste of perfectly good hardware, though. If you want to run a 
web server, Linux or FreeBSD will run rings round any of the above. You 
do need a MS server OS for reasonable performance and security if you 
want to go the MS route.

MS is great for some things. And there are things only MS can do (COM 
objects spring to mind). But in the main, it's a bad choice for hosting. 
I haven't even mentioned security - take a look at the server uptime 
charts sometime. That's almost entirely a function of security. It's 
great to be able to set up a FreeBSD server (the top 50 are almost 
always all *BSD) and leave it running/earning for three years without 
even a reboot. That's why the figures are as they are.

Regards,
Peter.
--
the circle squared
network systems and software
http://www.circlesquared.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] About problem in my php code

2004-11-18 Thread Hongwei Li
Thanks for all help from Philp and Richard.  I learned the session issue
and fixed the problem.

For some reason, I could not receive any email from this list.  I checked
the message only from the list's web site, but did not receive any (my
post, reply, or any other posts) in my mail.  I did receive the subscribe
confirmation message though. I have to check the web site to see posts,
but could not reply from there.

I do have spamblock software, but I don't see any mails from this list in
the blocked-mail folder.  Can the manager of this list give me some help?

Thanks!

Hongwei Li

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



[PHP] RE: **[SPAM]** Re: [PHP] PHP Supremacy...

2004-11-18 Thread Jay Blanchard
[snip]
And this includes the use of extensions to the languages. PHP extensions

are free, ASP ones invariably cost. This has implications for the future

of any project as well as the starting point: extending an ASP site 
could cost...well, it's impossible to know right now. Depends what 
direction we need to take in the future. But PHP extensions will be 
free. Then there are the license terms which in the case of ASP 
extensions are, er... we don't know yet. Depends on the extension.
[/snip]

One simple test here - try to develop an upload script in ASP (using,
say, VBScript). Too difficult? Google for one. Find a free one. Too
difficult?

:7)

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



RE: [PHP] PHP Supremacy...

2004-11-18 Thread Mike
[snip]
There's a Netcraft survey based graph at php.net that shows about 17 
million PHP-powered sites.  And we don't need to make assumptions about 
ASP either: PHP overtook classic in 2002 and ASP.Net powers fewer than 3 
million sites.
[\snip]

Also remember that all you need to dev PHP is a text editor. I still do a
lot of editing in notepad and wordpad. 

When you start doing .Net applications you need to get visual studio - which
is far from inexpensive. 

PHP will be around for a LONG time because it's accessible. So many people
can use it and it easily crosses from dev to live environments - some of
which on different platforms.

So all the numbers aside, PHP will survive because so many people have the
ability to use it for whatever they can think of in virtually whatever task
they need it to fulfill. The PHP community isn't just a group of hardcore
advocates.

Hang around the boards for a few weeks and see how many people are first
time posters. The number is growing and doesn't take into account the people
that never make it here.

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



Re: [PHP] [OOP] Class to handle PEAR::DB

2004-11-18 Thread valerie17
 object(DBku)#1 (6) { [type]= string(5) mysql [user]= string(4)
root [pass]= string(0)  [host]= string(9) localhost [db]=
string(7) valerie [dbhandler]= NULL } Standard Message: DB Error: no
database selected Standard Code: -14 DBMS/User Message: SELECT * FROM
country [nativecode=1046 ** No Database Selected] DBMS/Debug Message: SELECT
* FROM country [nativecode=1046 ** No Database Selected]

of course it would return the same otherwise it'll have no BR via web
browser . And yes, my previous projects worked very well and I do have MySql
support for my PHP 5.0.1. Isn't it strange ? Or it's just the logic of my
OOP code go wrong ?

Valérie Delon
étudiante

--
On a besoin d'apprendre beacoup plus
Quelqu'un croit c'est trop
Mais j'crois que ce n'est pas assez


From: Jason Wong [EMAIL PROTECTED]
Date: Thu, 18 Nov 2004 19:06:56 +0800
Subject: Re: [PHP] [OOP] Class to handle PEAR::DB

On Thursday 18 November 2004 17:05, [EMAIL PROTECTED] wrote:

 my problem is : everytime I execute this file in CLI mode I always got
this

[...]

 Standard Message: DB Error: no database selected
 Standard Code: -14
 DBMS/User Message: SELECT * FROM country [nativecode=1046 ** No Database
 Selected]
 DBMS/Debug Message: SELECT * FROM country [nativecode=1046 ** No Database
 Selected]

 How come the message said I didn't select database ??

Does this work when executed via a webserver? If so, have you checked that
you
have MySQL support compiled into your CLI php?

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
For a moment, nothing happened. Then, after a second or
so, nothing continued to happen. 
*/

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



Re: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Scott Fletcher
Yep, that Java applet, Raditha's Rad Upload...  Just found the documentation
there that the file path worked before PHP 4.3.6 but not with 4.3.6 and up.
I don't know what the PHP developer did with the $_FILE codes before
releasing PHP 4.3.6

Scott

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Jason Wong wrote:
  On Friday 19 November 2004 03:28, Scott Fletcher wrote:
 
 Well, I had successfully uploaded the files/folders.  PHP just stripped
out
 the folders for no reasons.  A file can be a folder too.
 
 
  Could you explain how you did that (upload a folder)?
 

 I guess using Raditha's Rad Upload.

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



[Fwd: Re: [PHP] PHP Supremacy...]

2004-11-18 Thread Peter Risdon
Whoops, didn't include the list.
--
the circle squared
network systems and software
http://www.circlesquared.com
---BeginMessage---
Pedro Irán Méndez Pérez wrote:
Hello my friends, I need your help in convince to my boss in adopt php for
development of a tool for intranet in my office, he told me that php is open
source and we don´t know if will disappear in a year, or if php have a
support like .net.
what arguments can I show for convince him to try PHP?
Maybe point out to your manager that the internet is, essentially, open 
source software. That, as others have pointed out, the whole essence of 
Open Source is that it can't disappear. This is a question to be asked 
about proprietary software, not open source.

The biggest problem might be tact: he's not being terribly bright.
Regards,
Peter.
--
the circle squared
network systems and software
http://www.circlesquared.com

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

Re[2]: [PHP] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-18 Thread Richard Davey
Hello Scott,

Thursday, November 18, 2004, 7:28:00 PM, you wrote:

SF Well, I had successfully uploaded the files/folders. PHP just
SF stripped out the folders for no reasons. A file can be a folder
SF too.

If you insist.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

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



[PHP] Understanding Static Methods

2004-11-18 Thread Jordi Canals
Hi all,

I'm trying to understand static methods in a test class. Reading the
manual, it says: A member or method declared with static can not be
accessed with a variable that is an instance of the object and cannot
be re-defined in an extending class.

Test code:


?php

class B
{
private $str;

public final function __construct()
{
$this-str = 'Hello world';
}

public function showB()
{
echo $this-str, 'br';
echo 'Showing Bbr';
$this-TestStatic();
}


public static function TestStatic()
{
echo 'brInside Staticbr';
}
}

echo error_reporting() . 'br';

$test = new B;
$test-TestStatic();
$test-showB();
echo -- END --;
?

Output:
=

4095

Inside Static-- Called by $test-TestStatic()
Hello world
Showing B

Inside Static-- Called from $test-showB with $this-TestStatic()
-- END --

Comments:


I'm running PHP 5.0.2 and error_reporting = E_ALL | E_STRICT. As
reported in the output, the values for error_reporting are well set
(4095 == E_ALL | E_STRICT)

I cannot understand why I can access the method TestStatic() with a
variable that is an instance of the class. The manual say I cannot do
it. As you can see, I call the static method with $this-TestStatic()
inside the showB() method; also, I can access it by using the instance
of this class: test-TestStatic().

I get no errors or notices about I'm accessing an static method by
using and instance var. As you can read in the manual, you cannot do
that  but it works without error.

I'm sure I'm missing something ...

Thanks in advance for comments,
Jordi.

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



RE: [PHP] Understanding Static Methods

2004-11-18 Thread Sylvain Girard

I'm taking a wild guess here, but doesn't that got anything to do with the
public declaration of the method?

-Oorspronkelijk bericht-
Van: Jordi Canals [mailto:[EMAIL PROTECTED] 
Verzonden: vrijdag 19 november 2004 2:29
Aan: PHP List
Onderwerp: [PHP] Understanding Static Methods

Hi all,

I'm trying to understand static methods in a test class. Reading the
manual, it says: A member or method declared with static can not be
accessed with a variable that is an instance of the object and cannot
be re-defined in an extending class.

Test code:


?php

class B
{
private $str;

public final function __construct()
{
$this-str = 'Hello world';
}

public function showB()
{
echo $this-str, 'br';
echo 'Showing Bbr';
$this-TestStatic();
}


public static function TestStatic()
{
echo 'brInside Staticbr';
}
}

echo error_reporting() . 'br';

$test = new B;
$test-TestStatic();
$test-showB();
echo -- END --;
?

Output:
=

4095

Inside Static-- Called by $test-TestStatic()
Hello world
Showing B

Inside Static-- Called from $test-showB with
$this-TestStatic()
-- END --

Comments:


I'm running PHP 5.0.2 and error_reporting = E_ALL | E_STRICT. As
reported in the output, the values for error_reporting are well set
(4095 == E_ALL | E_STRICT)

I cannot understand why I can access the method TestStatic() with a
variable that is an instance of the class. The manual say I cannot do
it. As you can see, I call the static method with $this-TestStatic()
inside the showB() method; also, I can access it by using the instance
of this class: test-TestStatic().

I get no errors or notices about I'm accessing an static method by
using and instance var. As you can read in the manual, you cannot do
that  but it works without error.

I'm sure I'm missing something ...

Thanks in advance for comments,
Jordi.

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

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



[PHP] access the under hood dom object from c code inside php-extension

2004-11-18 Thread luise.hans
Is there any way/document/direction to access the under hood dom object 
which is created in php land from the c code inside php extensions?

something like this:
in the php code, I do:
$domdoc = new DOMDocument;
$domdoc-loadXML($strXMLData);
$domnode = $domdoc-firstChild;
//... some operations on dom, then I will call
func_implemented_in_php_extension($domdoc);
and in the c land of php extension,  can i do:
PHP_MINIT_FUNCTION(func_implemented_in_php_extension)
{
//...
if (zend_parse_parameters(argc TSRMLS_CC, z, domdoc, dom_len) 
==FAILURE)

//...and I can continue to manipulete the dom object in c api, like
domnode = domdoc-firstChild();
domnode-set_content(hello world);
}
and later back to my php code,  I do
print($domdoc-firstchild-get_content());
and the out put is hello world.
On other hand, any idea to do this in the reversed way,  access 
underhood dom object which is created in c land of php extension from 
the php code?

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


Re: [PHP] Sequrity without HTTPS?

2004-11-18 Thread Chris Shiflett
--- Peter Lauri [EMAIL PROTECTED] wrote:
 Can someone from outside set a $_SESSION variable with some
 hacker techniqe?

For all practical purposes, no. Session data is kept on the server and
therefore less exposed and less vulnerable than other data.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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



Re: [PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Chris Shiflett
--- Peter Lauri [EMAIL PROTECTED] wrote:
 If you use the Autority HTTP that pops up a login window by
 default, is that safe against listeners?

Assuming you mean HTTP Basic Authentication, it is not encrypted, so it is
not safe from snooping.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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



[PHP] Re: php/html displaying query

2004-11-18 Thread David Robley
On Fri, 19 Nov 2004 00:44, Angelo Zanetti wrote:

 HI all,
 
 I have this situation  think that maybe some of you could advise me on
 a solution.
 
 I have a field in my database which is about a few paragraphs long.
 When the user edits this paragraph using php/html in a textarea it
 displays correctly with the lines that separate the paragraphs. These
 lines are merely blank lines.
 
 However when I want to display this field in HTML I have a problem that
 its all bunched into 1 paragraph, obviously because there are no p or
 br tags telling the browser there is a space in between, 1 way to get
 this to work is to to insert p or br statements in the paragraph but
 when the user then edits the paragraph in the textarea it will show the
 p or br tags which i dont want, they are end users and will probably
 delete them. Is there a way to get around this?? either displaying the
 blank line or by hiding the HTML tags in the textarea (but still saving
 the paragraph with them in)

Use nl2br() when you display the data; nl2br will add a BR / before each
newline.

-- 
David Robley

I hope I can still play the guitar, Tom fretted.

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



Re: [PHP] Sequrity without HTTPS?

2004-11-18 Thread Ramil Sagum
On Thu, 18 Nov 2004 12:41:01 +0100, Peter Lauri [EMAIL PROTECTED] wrote:
 Best groupmember,
 
 My webhost (crappy
 but nonexpensive) does not support HTTPS and I still want to be able to
 create some sort of secure login.
 
 Someone with some tips and tricks to get a secure system without using
 HTTPS?
 
 

Not really that secure, but you could do this

1.  When the login page is requested, the generate a random string
from the server. Let's call this string STR.
2.  On the browser, after the user enters his login name and password,
DONT send this per se. Instead, do some operation on the password and
STR and return this instead. (like concatenate STR and password, then
do SHA1 hash it.)
3. Server performs the same operation with STR and  the password in
the database, and compares this with the value submitted from the
client.

So, in no time is the password itself sent.  I'm sure there are SHA1
or at least MD5 functions already written in javascript.

I know there is a term to this method, but it escapes me.

HTH!





ramil

http://ramil.sagum.net

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



Re: [PHP] Is Perl faster than PHP?

2004-11-18 Thread Chris Shiflett
--- Merlin [EMAIL PROTECTED] wrote:
 it came to my attention that most of the high traffic portals
 are using perl in the backend. Those sites do also apear to me
 to be very fast in comparison to most php sites. Are there any
 known performance comperissons between the two available? Or can
 one say that PHP or Perl is faster about x percent in general 
 compared to the other one?

PHP and Perl are both key tools used to build many of the Web's top sites
- Amazon, Yahoo, Ticketmaster, Google, etc. As a Perl developer worded it
at this past week's ApacheCon, these types of sites receive an obscene
amount of traffic.

How these two languages perform and scale relative to one another is
entirely dependent on the design and implementation - neither is going to
consistently be better than the other, but both are very good.

You will notice that the top sites don't use Java or .NET. :-)

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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



[PHP] PEAR::SOAP return tag trouble in migration to PEAR::SOAP from NuSOAP

2004-11-18 Thread Jeff Rodriguez
I'm trying to migrate to PEAR::SOAP from NuSOAP, but I'm confused as to
why the result sent back from a function is wrapped in a return tag.
The return part of my code is simple enough:

return array('lastStatus' = 'ok');

But this gets wrapped in a return tag:
return xsi:type=xsd:string
lastStatus
xsi:type=xsd:stringok/lastStatus/return/ns4:reportInResponse



Here is the SOAP response:
SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
 xmlns:ns4=urn:mwsWSDL
 SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:Body

ns4:reportInResponse
return xsi:type=xsd:string
lastStatus
xsi:type=xsd:stringok/lastStatus/return/ns4:reportInResponse
/SOAP-ENV:Body
/SOAP-ENV:Envelope
-- 
Jeffrey Alan Rodriguez
[EMAIL PROTECTED]

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



Re: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Chris
On Thu, 18 Nov 2004 09:35:42 -0800, Chris W. Parker [EMAIL PROTECTED]  
wrote:

Peter Lauri mailto:[EMAIL PROTECTED]
on Thursday, November 18, 2004 12:42 AM said:
What editor do you use when working with websites (php) connected
directly to the FTP?
I like Eclipse 3.0 with the PHP plugin, but it do not have the future
to connect to the FTP.
HTML-Kit (www.chami.com) will do this. I've been using HTML-Kit for
almost 2 years and I've never had a problem with a bad save.
hth,
chris.
I use HTML-Kit as well and feel it is a bloated pile of crap.  Tab  
handling is broken (if you select tabs over spaces, selected text will  
still indent with spaces if you press tab to indent the whole block of  
code).  It suffers from severe option overload.  It lacks the ability to  
use secure FTP.  It also lacks simple features like setting a block of  
selected text to all lowercase without a plugin.

The only feature I actually like is the ability to edit files via FTP so  
that when I hit save, it uploads the new copy to the server.  So if that's  
all you really care about in an editor, HTML-Kit will do a fine job.   
Also, if you tell it where PHP is found on your local machine, it will  
highlight all of the PHP function names.

I have tried Ultra Edit, which claims to have a similar feature and  
supports secure FTP, but has a horrible implementation compared to  
HTML-Kit.  EditPlus claims it can connect via secure FTP through an SSH  
tunnel, which simply does not work if the server it is connecting to does  
not allow FTP connections at all.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Is Perl faster than PHP?

2004-11-18 Thread Mulley, Nikhil
It all depends on the factors like Computer Hardware, Optimization of PHP for 
that System/OS , Network Factors and all . 
Though it has been the perl way , as it is almost more than a teenager of age 
now and has more modules written for it than for PHP , PHP is the beggining , 
but I am sure the Programmers around the world ,who code for PHP way , thier 
hardwork will not go waste. and also Shifflet , I know you are the one among , 
PHP is easier to code than Perl .

Yeah , its true that top sites do not use Java or NET , 

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Friday, November 19, 2004 8:44 AM
To: Merlin; [EMAIL PROTECTED]
Subject: Re: [PHP] Is Perl faster than PHP?


--- Merlin [EMAIL PROTECTED] wrote:
 it came to my attention that most of the high traffic portals
 are using perl in the backend. Those sites do also apear to me
 to be very fast in comparison to most php sites. Are there any
 known performance comperissons between the two available? Or can
 one say that PHP or Perl is faster about x percent in general 
 compared to the other one?

PHP and Perl are both key tools used to build many of the Web's top sites
- Amazon, Yahoo, Ticketmaster, Google, etc. As a Perl developer worded it
at this past week's ApacheCon, these types of sites receive an obscene
amount of traffic.

How these two languages perform and scale relative to one another is
entirely dependent on the design and implementation - neither is going to
consistently be better than the other, but both are very good.

You will notice that the top sites don't use Java or .NET. :-)

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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

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



[PHP] I am new - Having problems displaying something

2004-11-18 Thread Brian Heibert
Hi,

I am new to this list.  I am trying to do a php script that will say what
song is currently playing in iTunes/NiceCast Internet Radio broadcaster
Onto my website

Every attempt I have made so far has failed

I got a file called playing.php
With this text inside it:
?php

echo Current Song: .passthru(osascript
/Library/WebServer/Documents/christiantoplist/whattrack.scpt);

?


And a file called whattrack.scpt (AppleScript file) with this in it
tell application iTunes
set trk to current track
set tle to name of trk
set art to artist of trk
set albm to album of trk
 return tle   -   art  ,   albm
 end tell

But it is not displaying what song is playing on my website
All it says is Current Song: and then it doesn't say the song

Brian Heibert

PS: I have a iMac G4 800mhz OS 10.3.6 running Apple's webserver system
preference which is there version of Apache I think

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



RE: [PHP] I am new - Having problems displaying something

2004-11-18 Thread Warren Vail
Looks like the URL you are trying to passthru is missing a domain, No?  ;-)

Warren Vail

 -Original Message-
 From: Brian Heibert [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 18, 2004 9:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] I am new - Having problems displaying something
 
 
 Hi,
 
 I am new to this list.  I am trying to do a php script that will say what
 song is currently playing in iTunes/NiceCast Internet Radio broadcaster
 Onto my website
 
 Every attempt I have made so far has failed
 
 I got a file called playing.php
 With this text inside it:
 ?php
 
 echo Current Song: .passthru(osascript
 /Library/WebServer/Documents/christiantoplist/whattrack.scpt);
 
 ?
 
 
 And a file called whattrack.scpt (AppleScript file) with this in it
 tell application iTunes
 set trk to current track
 set tle to name of trk
 set art to artist of trk
 set albm to album of trk
  return tle   -   art  ,   albm
  end tell
 
 But it is not displaying what song is playing on my website
 All it says is Current Song: and then it doesn't say the song
 
 Brian Heibert
 
 PS: I have a iMac G4 800mhz OS 10.3.6 running Apple's webserver system
 preference which is there version of Apache I think
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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



[PHP] getting the highest number in 3 db fields?

2004-11-18 Thread Louie Miranda
I have a db field of 3.

- prolog
- transmodal
- asian

I wish to get the highest number of those three, in different fields.

Im thingking of..

if (row0 = row1) ...

how about row2?

confused..

-- 
Louie Miranda
http://www.axishift.com

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



  1   2   >