Re: [PHP] MySQL Dump In PHP

2001-06-22 Thread Aral Balkan
I use the mysqldump command line utility to do this and I don't know how to interface that from PHP. However: I just checked how phpMyAdmin does it and apparently it has functions that re-create the dump using queries. You might want to download it (http://www.phpwizard.net/projects/phpMyAdmin/)

[PHP] REG_EMPTY error

2001-06-22 Thread Aral Balkan
Hi all, I'm getting the following error when I try to load complex web pages with a version of Hans Anderson's class.browser that I've modified to translate relative links to absolute links (as well as images, flash object / embed links). It's going to be part of a larger templating class (I'm go

Re: [PHP] OOP

2001-06-23 Thread Aral Balkan
As I understand it in PHP the constructor of the parent class is not called when a child class is initiated. You can call it manually. Eg., using your example: class one { function one() { echo "one "; } } class two extends one { function two() { one::one();

[PHP] Help with simple regular expression

2001-06-24 Thread Aral Balkan
Hi all, I'm trying to match the body tag in an HTML file (eg. ) with the following regular expression and eregi: Unfortunately it matches everything from the body tag onwards and doesn't stop at the greater-than sign. It should be simple thing but I'm stumped! To me the regex reads match strin

Re: [PHP] Help with simple regular expression

2001-06-24 Thread Aral Balkan
> (eg. ) Lol... by the way gg must be an interesting color :) Aral __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ¯¯ -- PHP General Mailing List (http://www.php.ne

Re: [PHP] set_magic_quotes_runtime()

2001-06-24 Thread Aral Balkan
Despite what it says (and as far as I know) you *can't* change the state of magic quotes from within a script. You can, however use a function like this: function myAddSlashes($st) { if (get_magic_quotes_gpc()==1) { return $st; } else { return AddSlashes($st); } } Hope this

Re: [PHP] Help with simple regular expression

2001-06-24 Thread Aral Balkan
]*> worked... thanks Kristian... As I get it -- match 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] Installation problems with MySQL

2001-06-26 Thread Aral Balkan
Have you tried FoxServ? I think it's a godsent if you're running on Windows -- installs Apache, PHP and MySQL without a hitch (at least it did for me!) --> http://sourceforge.net/projects/foxserv/ Hope this helps. Aral :) __ ([EMAIL PROTECTED]) New Media Producer

Re: [PHP] Help with simple regular expression

2001-06-26 Thread Aral Balkan
> Yes, Perl is greedy I was actually using ereg which I believe is POSIX, so POSIX must be greedy too! Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ¯¯ -- PHP

Re: [PHP] Filtering out \ when a ' is user entered?

2001-06-27 Thread Aral Balkan
The way I do it is to use a function to check if magic quotes are on (because if they're on the conversion is done automatically for you) and if they're not, use the AddSlashes function before writing to the database and use StripSlashes after reading from the database. You can use these two funct

Re: [PHP] PHP crashing IIS 5 on Wnidows 2K

2001-06-27 Thread Aral Balkan
I would agree, I had PHP 4 installed on IIS running on Win2000 and it was very unstable. Since switching to Apache, I've had no problems whatsoever -- it's rock solid! Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof

Re: [PHP] search for a better php source code viewer

2001-06-27 Thread Aral Balkan
I second that, EditPlus rules! It's also very easy to create your own custom syntax highlighting rules, templates and auto-completes so it can highlight custom libraries, etc. that you use. For example, if anyone's using Manuel's excellent Metabase database abstraction class, I've uploaded syntax

Re: [PHP] Filtering out \ when a ' is user entered?

2001-06-28 Thread Aral Balkan
I sent a reply to this earlier but for some reason some of my posts never make it to the list, so here it is again (hopefully it will post this time, and only once:) >> The way I do it is to use a function to check if magic quotes are on (because if they're on the conversion is done automatically

[PHP] Help with custom session handler

2001-06-30 Thread Aral Balkan
I'm writing a custom session handler that saves sessions using Manuel Lemos' excellent Metabase library. The problem is, although I've got the session_set_save_handler function pointing to the correct start, end, read, write, destroy and garbage collection functions, when I call session_start and

[PHP] emalloc / erealloc problem (was: help with custom session handler)

2001-06-30 Thread Aral Balkan
ok, I found what's making Apache crash... my getting entries like: FATAL: emalloc(): Unable to allocate 1701082243 bytes FATAL: erealloc(): Unable to allocate 369098752 bytes in the log. Somehow when I query the database it must be trying to allocate -- unless my eyes deceive me -- ~1.6 GBs

Re: [PHP] emalloc / erealloc problem (was: help with custom session handler)

2001-06-30 Thread Aral Balkan
Rasmus, When I try it with the MySQL handler you provided everything goes well -- no errors. I guess I was hoping that the problem was with some php.ini setting or something and not with Metabase as I'm dreading going into all code but alas, I guess I must. Do you have any idea what sort of data

Re: [PHP] emalloc / erealloc problem (was: help with custom session handler)

2001-06-30 Thread Aral Balkan
2602.php3?page=1) metabase by Manuel Lemos ([EMAIL PROTECTED], http://www.phpclasses.upperdesign.com/) copyright (c) 2001, aral balkan ([EMAIL PROTECTED]) http://www.aralbalkan.com */ // metabase database abstraction layer require_once "metabase/metabase_parser.php"

Re: [PHP] Time out Errors?

2001-06-30 Thread Aral Balkan
I've been having the same problem with Apache 1.3.19 / PHP 4.0.5 running on WinMe -- and not just with my scripts either: phpMyAdmin does it sometimes too. So, I reckon that the problem is with the configuration. Has anyone experienced this on Win2000? (I'm in the process of moving my files to a

Re: [PHP] Fatal Execution Error

2001-06-30 Thread Aral Balkan
Are you doing a database query by chance or anything with sessions? I'm getting the same errors logged in the Apache logs for something I'm working on (see my previous posts for details.) Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTE

[PHP] OO v. Functions Was: Re: [PHP] PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)

2001-07-02 Thread Aral Balkan
>> Ive coded in both PHP and ASP and in both OO and function oriented. Ultimately, i find functionally oriented PHP to be the best ... what do other people think? Having learnt how to program using Basic when I was 8, I had to unlearn a lot of things as I moved from Basic to Pascal (what? I can't

[PHP] Good intro to SQL reference Was: Re: [PHP] Get highest value of key most efficiently

2001-07-02 Thread Aral Balkan
You might also want to reference James Hoffman's excellent "Introduction to Structured Query Language" (SQL Tutorial) page: http://w3.one.net/~jhoffman/sqltut.htm Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., Am

Re: [PHP] session handler class

2001-07-02 Thread Aral Balkan
Hi Scott, I'd love to see the class you made but couldn't find a link in your email. Could you let me know where to find it? Thanks :) Aral __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ¯¯¯

Re: [PHP] session handler class

2001-07-02 Thread Aral Balkan
It's strange -- I see that the message has an attachment in Outlook Express but I'm not given the option to save it. I guess it got stripped off. I'd really appreciate it if you could put up a link to it. Thanks so much!.. Aral :) __ ([EMAIL PROTECTED]) New Media

Re: [PHP] How to prevent people from downloading images

2001-07-03 Thread Aral Balkan
I bought (it was something like $5-10) a java class called imageProtect from Liquid Cool Research (their new page is http://www.liquidcoolresearch.com/) a long time ago and I just checked on their site -- it doesn't seem to be on sale any more. It worked for me (basically it was just java loading

Re: [PHP] How to prevent people from downloading images

2001-07-03 Thread Aral Balkan
> if that image is viewable on the computer monitor, it's impossible to protect it if someone wants to steal it bad enough. True, and I have friends who are professional photographers who actually *don't* want to protect their images in this way. It is much more profitable to be able to log who i

[PHP] Losing the session with database session handler...

2001-07-08 Thread Aral Balkan
Has anyone run into this: I've got a custom session handler that saves session info in a database but the sessionID gets lost as I go from one page to another. It appears to be random as sometimes it's not lost! I've got a link from one page to the other and each time a different session ID is ap

Re: [PHP] session variable name into form

2001-07-09 Thread Aral Balkan
This might help - straight from the PHP manual: * * * If track_vars is enabled and register_globals is disabled, only members of the global associative array $HTTP_SESSION_VARS can be registered as session variables. The restored session variables will only be available in the array $HTTP_SESSION

Re: [PHP] Speed of loding PHP pages

2001-07-11 Thread Aral Balkan
>> Netscape is notoriously slug-like when it comes to loading large tables (i.e. the output of phpinfo()). A way around this is to break up large tables into numerous smaller ones (or at least have one table at the top that displays something so that the user doesn't think that things have gone a

Re: [PHP] Finding Out Document That Included Another File

2001-07-12 Thread Aral Balkan
The way PHP works currently, $PHPSELF will point to your original file. This is actually a problem, as it means that you cannot use relative includes in the included file if its in a different directory. There's currently discussion on the PHP-DEV list about changing this. Perhaps there's going t

Re: [PHP] Credit Card script that really works...

2001-07-12 Thread Aral Balkan
You may also want to try Manuel Lemos' Form class -- it is very detailed and well coded solution that handles all sorts of form validation, including credit cards: http://www.phpclasses.upperdesign.com/browse.html/package/1 Aral :) __ ([EMAIL PROTECTED]) New Media

Re: [PHP] I want to learn this!

2001-07-15 Thread Aral Balkan
If you're running Windows, try the .chm (windows helpfile?) version of the manual -- IMHO it's much easier to navigate then the HTML version. I find it indispensable. Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof.

Re: [PHP] how to include a remote file and change relative links to non-relative

2001-07-17 Thread Aral Balkan
t;] == 1) { $file_text = $file_array["content"]; // convert relative links to absolute $file_text = $browser->translate($file_text, $file); ?> class_browser.php: class Browser { /* Class Browser by Hans Anderson. This code is released under the GPL license. Modifications

Re: [PHP] Security Question

2001-07-25 Thread Aral Balkan
Ryan, I don't see how your username / password could be compromised by including it in a connect statement. There's a common warning that you should be careful when naming PHP files with a different extension (if the server doesn't recognize the extension as PHP and thus returns the unparsed file