Re: [PHP] PHP with JAVA support

2001-06-27 Thread Andrzej Swedrzynski

On Tue, 19 Jun 2001, Robert Vetter wrote:

 Hello,

 I'm trying to run PHP with Java support and don't get it to work. First
 I compiled PHP '--with-java=/usr/local/jdk1.2.2/'. Then I added this to
 the PHP.ini file:

 [Java]
 java.home=/usr/local/jdk1.2.2
 
java.class.path=/usr/local/lib/php/extensions/php_java.jar:/usr/local/jdk1.2.2/src.jar
  ^^^

 
java.library.path=/usr/local/lib:/usr/local/jdk1.2.2/jre/lib/i386:/usr/local/jdk1.2.2/jre/lib/i386/classic:/usr/local
 /jdk1.2.2/jre/lib/i386/native_threads
 java.library=/usr/local/jdk1.2.2/jre/lib/i386/libjava.so
 java.extension=/usr/local/lib/php/extensions/libphp_java.so


 Now, when I try to instantiate a JAVA class I get this error: Fatal
 error: Cannot instantiate non-existent class: java in
 /usr/local/apache/htdocs/index.php on line 3.

I do not have any experience in running Java from PHP, but I sug
gest replacing variable called java.class.path with path to  real
java libraries. What for the sources (src.jar) are there? Or may
be in java.library.path you should point to  jar  files  (rt.jar,
where  the  java.lang.System  class  resides). Please try and say
what the result is.

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Free Database Design Program

2001-05-06 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, Alexander Skwar wrote:

[dia]
 Compared to ERWin, this is indeed *VERY* limited - but maybe I was just
 unsuccessful, but eg. how can you define keys in an entity in dia?

Just open attribute's properties window (double click on attribu
te) and you have checkbox there.

Is  ERWin a free program or not? I searched freshmeat.net but fo
und only HTML editor named erwin...

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP as apache module and security.

2001-05-06 Thread Andrzej Swedrzynski

Hello!

Recently  someone  asked how to ensure that no one will read pas
sword from php file. The only response I noticed  was  to  create
group  and add apache user (often nobody) to that group. I consi
dered this and I can not see what would  stop  other  users  from
writing  php  script  (run also as nobody) which reads filesystem
with permissions of apache?

Is there a method of making php as module really secure?

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP as apache module and security.

2001-05-06 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, Estelle Martin wrote:

 What do you think about the following configuration:

 1) safe-mode on : this ensures that a php script can read only files that
 are owned by the same Unix user on the machine; then just check that people
 having a right to use php and mysql on your box have all a different
 corresponding Unix user.

I  can  not use it because I need to create files dynamically and
they will have ,,nobody'' as an user. Further  executing  scripts
have no way to read those files.

 2) open-basedir : put this parameter for each php directory to this
 directory; then the scripts cannot access files that are elsewhere on the
 server

 In Apache httpd.conf it would be like:
 Directory /path-to-a-php-directory
 AddType application/x-httpd-php .php .php4
 AddType application/x-httpd-php-source .phps
 php_admin_value open_basedir '/path-to-a-php-directory'
 /Directory

 Has someone tested it ? Do you see a problem in it ?

I  haven't  tested  it, however it looks nice and I'll talk to my
server's owner about it. There is however one bad feature of this
method, the administroation. For every user and every application
administrator  has  to create an entry in httpd.conf. Anyway it's
his/her problem...

Thanks for suggestions!

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] best ide for windows

2001-05-06 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, John Vanderbeck wrote:

 I am a fan of UltraEdit.  It has syntax highlighting and is a good all
 purpose powerful editor.  What I really like though is the ability to Open
 From and Save To FTP sites.  This speeds up my work considerably.

And  sends plain password over the network. Thanks.

I use vim for nearly  everything. With support of some other free
programs it's quite powerful.

http://www.vim.org

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] best ide for windows

2001-05-06 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, Bjorn Sodergren wrote:

[UltraEdit]
  And  sends plain password over the network. Thanks.

 And how does this differ from any other ftp client ?

Does  not differ. But I use ssh/scp for everything and with vim I
can  send  my file to its destination with a single keystroke. In
UltraEdit I would have to  open  ssh  client  and  send  file  by
hand...

[snip]
 Homesite is not near as complex in learning as vim,

IMHO  vim  is  worth learning and it's not as hard to learn as it
seems to be. And once you've learnt it you won't  use  any  other
editor anymore ;-).

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] best ide for windows

2001-05-06 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, John Vanderbeck wrote:

 But isn't VIM a *nix only tool?

No. Quote from vim's web page:

VIM runs on many operating systems:

AmigaOS, AtariMiNT, BeOS, DOS, MacOS,
MachTen, OS/2, RiscOS, VMS, and Windows (95/98/NT4/NT5/2000)

and, of course, on UNIX in a lot of flavours:

A/UX, AIX, BSDI, Convex, DYNIX/ptx, DG/UX, DEC Unix, FreeBSD,
HPUX, Irix, Linux [Debian, RedHat, Slackware, SuSE,...],
MacOSX, NetBSD, NEXTSTEP, OpenBSD, OSF, QNX, SCO, Sinix,
Solaris, SunOS, SUPER-UX, Ultrix, Unixware, Unisys.

 The thread was about Windows IDE's. I'm always open to new editors though,
 so if VIM is available for Windows, can you give an URL?

http://www.vim.org

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Vanishing files.

2001-05-05 Thread Andrzej Swedrzynski

On Sat, 5 May 2001, Yasuo Ohgaki wrote:

 Could we take a look at your code?

Of  course.  Shall  I send whole application or this snippet will
do?

// How the form is specified

   form enctype=multipart/form-data action=edit_item.php4 method=post
  input
 type=hidden
 name=MAX_FILE_SIZE
 value=?php echo $metaItem-getMaxImageSize(); ?
  
  input type=hidden name=action value=?php echo $action; ?
  // Some other form elements...
  input name=userfile type=file
  // Some other form elements...
   /form


// After the file is uploaded

  if ( is_uploaded_file( $userfile ) ) {
 $extension = strrchr( $userfile_name, '.' );
 $item-setImageType( $extension );
 $image = $metaItem-getImageDir().'/'.$item-getId().$extension;
 move_uploaded_file( $userfile, $image );
 chmod( $image, 0400 ); // I've tried without this at first
  }


// Class Item

  function getId()
  {
 return $this-id;
  }

  function setImageType( $image_type )
  {
 $id = $this-id;

 if ( $this-image_type != $image_type ) {
$res = db_exec(
  update ite_items
   set ite_image_type = '$image_type'
   where ite_id = $id
);
 }
  }


// Class MetaItem

  function getImageDir()
  {
 global $imagedir; // Set in configuration file
 return $imagedir;
  }

  function getMaxImageSize()
  {
 global $ITEM_MAX_IMAGE_SIZE; // Set in configuration file
 return $ITEM_MAX_IMAGE_SIZE;
  }

I  can't  find  an error by myself. Please help if you can. Thank
you.

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Free Database Design Program

2001-05-05 Thread Andrzej Swedrzynski

On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:

 But I need a program that I can document my database and even the script.

 The "relationships" of tables, the primary keys.

The  very  limited capability of drawing ERD (Entity Relationship
Diagram) in Chen notation can be found in  dia  (BTW  great  pro
gram).  I have used it successfully for small project. For larger
ones I used Oracle Designer, but it's only for Oracle  and  I  do
not suppose that it's free.

Good luck,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Vanishing files.

2001-05-05 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, Yasuo Ohgaki wrote:

 Since I don't use register_globals=on, this might not be the problem what you
 have.
[snip]
 Your code is using $userfile as scaler value. Could it be the problem?
 (Just  echo $userfile. Isn't it array?)

No,  it's string, I've checked it. I completely do not understand
this behaviour of system...

Thanks for interest.

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] class (not class instance) variables

2001-05-05 Thread Andrzej Swedrzynski

On Sun, 6 May 2001, Steven Haryanto wrote:

 Am I correct that PHP does not support class variables? That is,
 variables that belong to a class and not copied into every object.
 I need to put several arrays for information about a class, and I
 do not want to bloat every object with this data (since potentially
 I will create many instances of the class).

 Currently I do this with methods. Any other alternative?

For every class I do create additional class called MetaXXX where
XXX is the name of the original class. In the MetaXXX I do decla
re  all  variables and methods which I would make static in other
language such as C++ or Java. Then I do create one and  only  one
object of class MetaXXX (called metaXXX for convenience) which is
available in global scope. Hope this will help you.

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Vanishing files.

2001-05-04 Thread Andrzej Swedrzynski

Hello!

Recently  I  wrote a php script which handle file uploads. I took
an example from manual (and added some text  fields)  and  every
thing   seemed   to  work.  After  I  called  move_uploaded_file(
$userfile, $destination ) the file appeared in correct place. But
after  a  few minutes the file dissepeared. I do not know why be
cause I did not execute any scripts after file had been uploaded.
There is PHP 4.0.4 installed on server I use. Please help because
I can not find solution by myself. Thanks in advance.

Regards,

Andrzej

-- 
http://kokosz.horyzont.net
http://www.earthdawn.pl


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]