[PHP] Polymorphism question

2002-02-15 Thread Richard Fox
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawPlainDialog { public: ... virtual Draw(); // implementation draws a vanilla dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); //

[PHP] Polymorphism question

2002-02-15 Thread Richard Fox
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawDialog { public: ... virtual Draw(); // implementation draws a plain dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); //

[PHP] OOP: Polymorphism question

2002-02-15 Thread Richard Fox
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawDialog { public: ... virtual Draw(); // implementation draws a plain dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); //

[PHP] Re: Polymorphism in PHP

2002-02-18 Thread Richard Fox
That's right, the difference between C++ pure virtual and virtual is that a virtual function has an implementation but pure virtual only defines an interface. But can we get back to my original PHP question: Can I do something like the following in php: class Base { function Foo() { echo

[PHP] PHP, Java, and Apache

2002-02-26 Thread Richard Fox
I am trying to sort out several technologies and how they fit together. The basic problem I want to solve is to be able to use BrowserHawk, a JavaBean by CyScape, from a PHP script. In researching how to do this (and there are several relevant articles written) I have come across several

[PHP] PHP and BrowserHawk

2002-02-28 Thread Richard Fox
Hi Richard, I have finally got Java working with PHP. My Java is JSDK 1.4.0, the latest release of the SDK from Sun. How do I know it's working? I put $system = new Java(java.lang.System); print Java version=.$system-getProperty(java.version). br\n; print Java

Re: [PHP] PHP and Java

2002-03-01 Thread Richard Fox
From my experience getting Java to run w/ PHP and Apache on RedHat 70, you can try setting the LD_LIBRARY_PATH environment variable ( without which my Java would not run) set to the location of libjavaso, libjvmso, and php_javajar, in my case (without line feeds)

Re: [PHP] PHP and Java

2002-03-01 Thread Richard Fox
Minor point, but you do mean LD_LIBRARY_PATH, not LD_LIBRARYPATH right? Also, set [Java] extension = libphp_javaso extension_dir = (pathname to libphp_javaso) Rich -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

[PHP] Session variable scope - surprise!

2002-03-04 Thread Richard Fox
This is a behavior I have not found documented, in fact the books I have read indicated that this would not be the case given the script (with sessionsave_handler = files): ?php function reg() { $test = 13; session_register(test); echo in reg(), test=$testbr; } session_start();

RE: [PHP] Session variable scope - surprise!

2002-03-04 Thread Richard Fox
OK, but then how do you explain: ?php function reg() { $test = 13; session_register(test); echo in reg(), test=$testbr; } global $HTTP_SESSION_VARS; session_start(); reg(); if (session_is_registered(test)) { $tt = $HTTP_SESSION_VARS[test]; echo session variable test=$ttbr;

RE: [PHP] Session variable scope - surprise!

2002-03-04 Thread Richard Fox
Then, when session_register(); is called (even on a variable which is going out of scope) what actually happens? Where is the data actually stored? I know it isn't in the file yet (I have sessionsave_handler = files) because nothing is written to the file until the script exits So the

[PHP] PHP and Java Servlets

2002-03-15 Thread Richard Fox
I have to build a bridge page from my PHP script that does the following: 1. Kick off a Java servlet (in my case running on my Tomcat4 plug-in to Apache) 2. Receive data back from that servlet and continue my PHP script. Does anyone have hard won advice, tips on great articles, examples, etc?

[PHP] Error compiling PHP with native MySql

2002-03-21 Thread Richard Fox
When I try to configure PHP 4.1.1 I get the following error: checking whether to include ming support... no checking for mnoGoSearch support... yes checking for mnoGoSearch version... 3.1.19 checking for mSQL support... no checking for Muscat support... no checking for MySQL support... yes

[PHP] GMT Time

2002-04-19 Thread Richard Fox
Ok, I give up. I want to compare a timestamp(14) field in a MySQL table with the current time. Currently I use the following pseudo-sql: select field from table where table.time date(YmdHis, time()) only, the table timestamp is GMT time and the time function is returning local time. How do I

RE: [PHP] Re: How to connect to mysql through JAVA?

2002-04-24 Thread Richard Fox
Sourceforge MySQL JDBC driver http://mmmysql.sourceforge.net/ maybe this code frag will be helpful... String connectionURL = jdbc:mysql://centauri.sbs:3306/dbname; Connection conn = null; Statement statement = null; ResultSet rset = null; try {

Re: [PHP] Re: How to connect to mysql through JAVA?

2002-04-24 Thread Richard Fox
The last post is using the MySQL JDBC from a Java Server Page in a servlet environment. I never tried to run this from Java imbedded in a PHP script. You would have to remove the exception handling, at least. I dispatch a Java Server Page from my php script (write to a socket), do some java

[PHP] yet another session problem

2002-04-24 Thread Richard Fox
I am testing user-handling of sessions (mysql database) and just do not understand this behavior. my SESSION table is created as CREATE TABLE SESSION ( id varchar(32) NOT NULL default '', time timestamp(14) NOT NULL, user_id mediumint(8) NOT NULL default '-1', data text NOT NULL,

[PHP] Unexpected OOP behavior

2002-04-25 Thread Richard Fox
I noticed a behavior of my PHP class (4.1.1) which I found very unexpected and also undocumented. I defined a class constructor, and this constructor was automatically called *again* on my instantiated object when the script ended! This runs counter to 1. what one would expect a constructor

[PHP] date comparison

2002-04-29 Thread Richard Fox
I have a date string, let's call it 'date a' in the format 2020-10-16 which I want to compare to the UNIX_TIMESTAMP overflow limit (2038-01-18). Obviously I can't convert date 'a' to a timestamp because it may be too large. How can I make this comparision without converting it to a timestamp?

[PHP] Apache/PHP/Java problem

2002-05-03 Thread Richard Fox
I have Apache 1.3.24, PHP 4.2.0, and Java2SDK installed and working. My problem is, when I boot up and dispatch my phpTest.php script from my browser ?php // java.util.Date example $formatter = new Java('java.text.SimpleDateFormat', , dd,

[PHP] Compilation error

2002-06-02 Thread Richard Fox
Hi, I am compiling PHP 4.2.0 on a RedHat 7.1 system with mnogosearch 3.2.3. I am running into a problem that I have not seen on my other RedHat systems with the same configuration (except Redhat 7.2 instead of 7.1), and that is that the link does not work because there are some symbols that are

[PHP] Multidimensional arrays

2002-08-19 Thread Richard Fox
Hi, Given the array $array initialized by: $query = SELECT id,name FROM MYTABLE; $result = mysql_query($query); $nrows = mysql_num_rows($result); for ($i=0; $i$nrows; $i++) { $arr = mysql_fetch_array($result); $array[$i]['id'] = $arr['id'];

[PHP] String operation

2002-09-04 Thread Richard Fox
Hi Given string1 = /home/web/ string2 = /home/web/www/index.php How can I elegantly do an exclusive or of string1 with string2, that is, I want to end up with string3 = www/index.php Thanks!

[PHP] Disabling cookies per website

2002-09-23 Thread Richard Fox
Is there a way to disable cookies not for all sites but on a per site basis? If I do an ini_set() on session.use_cookies will all sites be afftected or only the site I am on? Thanks, Rich

[PHP] Explorer-like drill down interface

2002-09-25 Thread Richard Fox
I have two questions: 1. I would like to build a php page that contains a Windows explorer-like drill down mechanism, where clicking the '+' beside an item will expand the sub-items below (which can also have a '+' or '-' on the left) and clicking the '-' will collapse the item. Is there any

[PHP] Encrypted MySQL passwords

2002-09-26 Thread Richard Fox
Hi, I am connecting to a mysql server on a remote machine, and opened up port 3306 for this purpose. But, I am concerned about sending a clear text password, via the mysql_pconnect() call. My question is, what is the procedure for connecting to a remote server with an encrypted password? Or,

Re: [PHP] Encrypted MySQL passwords

2002-09-27 Thread Richard Fox
Rodolfo Gonzalez [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 26 Sep 2002, Brad Bonkoski wrote: also might be better then sending it in the clear. But I guess that the original poster wanted to know how to avoid the clear text session originated

[PHP] Re: Encrypted MySQL passwords (new info from MysQL list)

2002-09-27 Thread Richard Fox
Hi Andrew and Richard, The password and connection info is scrambled up. You can look, If you want to check it out for your self look in the source code of ./mysql-3.23.XX/libmysql search for the following functions. especially in 'mysql_real_connect' function. It is not the best

[PHP] SELECTing a row by maximum value

2002-12-30 Thread Richard Fox
Hi, What would be a query to select a single record from a number of records in a table, depending on which one has the biggest value in an integer field? e.g something like: MYTABLE id ifield 1100 2200 3150 SELECT * FROM MYTABLE WHERE id=$id and

[PHP] use_cookies not working

2002-10-04 Thread Richard Fox
I am using ini_set(session.use_cookies,0); to disable cookies but I don't see PHPSESSID showing up like I thought it would, so I don't think its working. I call it before session_start(). After the ini_set call I do session_log(CSE_Session_Start);

[PHP] FTP and security

2002-11-26 Thread Richard Fox
My company, as a matter of policy, closes the ftp ports of the servers in the DMZ. However, I am not convinced that this is necessary, given the advent of very secure ftp servers. I would appreciate any comments on the security of an open ftp port. To relate this to php, I am ready to give up

Re: [PHP] FTP and security

2002-11-26 Thread Richard Fox
To relate this to php, I am ready to give up trying to make my system(scp ..); code work, because I will have to give the apache user more permissions than I am comfortable with. What exactly are the problems you're encountering using scp? I created an apache user, which I