[PHP] Re: Magis_qoutes + linux + smarty

2007-07-13 Thread Bogdan Ribic
This is wrong place for Smarty questions, try smarty mailing lists. That said, you probably have problem with file access rights, ie folder you're trying to write to or create has flags that don't allow that, or you've created it with ftp (and as ftp user) and your php script is running under

[PHP] Good php-news newsletter?

2007-08-24 Thread Bogdan Ribic
Hi all, I was wandering if anyone knows a good php newsletter, one where you would get a digest of interesting news libraries etc in your mailbox. You know, to keep you up-to-date and spark a few ideas without actively searching the net for it. Boban. -- PHP General Mailing List

Re: [PHP] Good php-news newsletter?

2007-08-24 Thread Bogdan Ribic
Edward Kay wrote: I was wandering if anyone knows a good php newsletter, one where you would get a digest of interesting news libraries etc in your mailbox. You know, to keep you up-to-date and spark a few ideas without actively searching the net for it. This list is the best resource I've

[PHP] Check for unsafe HTML

2006-08-30 Thread Bogdan Ribic
Hi all, I need to check html that is entered by user for unsafe content (ie javascript, vbscript, onmouseover etc) and still keep safe tags. Is there any easy way for that? Boban. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Check for unsafe HTML

2006-08-30 Thread Bogdan Ribic
yodismdo, not try./yodism http://us3.php.net/strip_tags tedd Thanx, you've been lots of help :) But I wanted to clean out unwanted tags, not all of them. I found this class: http://phpclasses.waaf.net/browse/package/2189.html that is supposed to do the job, in case someone else has

Re: [PHP] Check for unsafe HTML

2006-08-30 Thread Bogdan Ribic
we have a 'Matt' that's actually a 'Dave' (or is it the other way around), now we have a 'Bogdan' who is propably a 'Boban'. Im sure there are other examples. Seems we attract multiple personality disorder cases around here. Good catch :) Boban is my nickname that everybody calls me,

[PHP] Broken compatibility with escaping { in php 5.2

2007-01-18 Thread Bogdan Ribic
Hi all, Try this: $a = ''; echo \{$a}; from php 4, it outputs {}, from php 5.2 (one that comes with Zend 5.5) it outputs \{}, thus breaking existing scripts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Broken compatibility with escaping { in php 5.2

2007-01-18 Thread Bogdan Ribic
be pragmatic - fix your script :-) I did :) It was a part of code generator, and I had something like : $res .= function $this-insert_prefix() \{$this-_global_db\n; and replaced it with $res .= function $this-insert_prefix() {{$this-_global_db}\n; ... in about 20 locations. But the

[PHP] How can I make postgre execute file with SQL code, on windows platform

2006-02-25 Thread Bogdan Ribic
Hi all, I need to synchronize two postgresql servers, but synchronization is one-directional (ie, data from one computer needs to be copied to another). Basically, I want the target computer to drop the schema public and then re-create it from my dump made on the source machine. Is there

Re: [PHP] How can I make postgre execute file with SQL code, on windows platform

2006-02-26 Thread Bogdan Ribic
Hi Chris, Goal was to get postgre to execute/import an sql dump file, ie not to write import-export functionality myself. In the end, I used piping, something like this: system(type $filename | \C:\Program Files\PostgreSQL\8.1\bin\psql.exe\ -h localhost -p 5432 X6tmp \postgres\);

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include $xml_file; $content = ob_end_flush(); and then parse the $content string. If you are doing this from within a function and you want access to global

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( Bogdan Ribic wrote: Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include

[PHP] Re: Cookies in non-frame sites

2006-02-26 Thread Bogdan Ribic
You can also use output buffering, write cookies from anywhere, and at the end of execution buffers will auto-flush. [EMAIL PROTECTED] wrote: Hello, Most sites today seems to be based on this style: include(top); include(current_page); include(bottom); If one wants to set cookies from

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Ivan, Did you try entering the code with debugger, or at least printing out what output buffer was holding, ie $content var in my example? Can you post exact code? Also, is short_tags turned on or off in php.ini? If it is on, php will get confused on first line of your xml file, it will

[PHP] Re: Printing library in PHP ?

2006-03-14 Thread Bogdan Ribic
This is more of an HTML question than it has to do with PHP, and you sound like a noobie :) Only useful info I can give you is to use THEAD in tables to hold headers, browsers put that row first on every page when breaking large table on several pages. Boban. robert mena wrote: For

[PHP] Re: Inserting NULL Integer Values

2005-10-29 Thread Bogdan Ribic
Oliver Grätz wrote: Shaun schrieb: $qid = mysql_query('INSERT INTO MYTABLE ( column1, column2, ) VALUES ( '.$value1.', '.$value2.'

[PHP] Re: foreach / unset

2005-10-29 Thread Bogdan Ribic
Richard Lynch wrote: Anyway, can you do *this* safely as a DOCUMENTED FEATURE: foreach($array as $k = $v){ if (...) unset($array[$k]); } Well, somewhere in the said manual it is written that foreach operates on a *copy* of the array, so you should be safe unsetting values in the

[PHP] Re: Referencing Containing (Non-Parent) Object?

2005-10-29 Thread Bogdan Ribic
Morgan Doocy wrote: I'm trying to figure out if PHP has the facility to reference containing, non-parent objects. I have three classes, embedded hierarchically, but which are NOT extended classes of their containing objects. I'd like to be able to reference variables in the higher-level

[PHP] Re: Register Globals (more)

2005-11-05 Thread Bogdan Ribic
John Taylor-Johnston wrote: How do I rebuild this peice of code to be register_globals=off friendly? Just when I thought I was getting good. This keeps up, I'm changing back the php.ini myself. John If your code absolutley needs register_globals and you don't have the time to rewrite

[PHP] Re: question about using $this as a method in a function argument

2006-01-21 Thread Bogdan Ribic
I have a question about using $this as an argument in a method. As I understand it, the only issue here is if you are passing $this from constructor of your class from PHP 4. In short, when you do $var = new MyClass(); you are actually storing a copy of what constructor was seeing as

[PHP] Serious bug ?

2006-02-04 Thread Bogdan Ribic
Hi all, I've found a strange bug with extract($GLOBALS, EXTR_REFS), and it only shows up if you try to access a non-existent variable or array member before that. Here's a demo script: // Uncomment this line to see the problem // $return = @$_GET['xx']; function extr_globals() {

Re: [PHP] Serious bug ?

2006-02-06 Thread Bogdan Ribic
Marco Kaiser wrote: Hi, i tested it with php 5.1.3-dev snap and it works correctly for me. btw. $return = $notdefined_variable; is a bad style for coding and this happens in your situation in a undefined behavior. If you think this is a bug please go to http://bugs.php.net and report them

[PHP] A serious bug? or operator gives out diffferent results depending on order of operands

2004-12-23 Thread Bogdan Ribic
Here's a little test script: $x = 2; $y = 10; $b1 = is_null($x) or ($y 5); $b2 = ($y 5) or is_null($x); var_dump($b1); var_dump($b2); Obviously, it should be false for both $b1 and $b2, but the output is: bool(false) bool(true) Is this a bug? I tried

[PHP] Re: Need Some Direction

2004-08-05 Thread Bogdan Ribic
I have been reading up on sessions, which I think will be a cool addition to this site, but I still havent found much on restrictin access without a username and password. Sounds like you need to use cookies, check php manual if you don't know what they are. Boban -- Please answer to the list

[PHP] Re: Log transaction for audit

2004-08-05 Thread Bogdan Ribic
Will you have that kind of experience? How can I do it comprehensively, e.g. no too big additional coding effort, easy to manage, reliable, etc. Do you want to hire me or did you just mistakingly press Reply instead of compose new mail :) Anyway, what you suggest is OK while testing

[PHP] open_basedir restriction and local value for php.ini

2004-09-22 Thread Bogdan Ribic
Hello all, I am having problems with cleint's webserver and its open_basedir settings. open_basedir is set to folder where all my php files are, but when I include a file that already includes another one (all under allowed directory tree) it throws out warnings: Warning: open_basedir

[PHP] Re: open_basedir restriction and local value for php.ini

2004-09-22 Thread Bogdan Ribic
Thanx, but the script works fine with this include structure. I just need to get rid of the warnings. Niklas lampén wrote: Is the situation this: /home/a.php includes page /home/lib/b.php which includes /home/lib/c.php? If I recall correctly, when you include a file in an included file, the

[PHP] Re: Watch out for automatic type casting

2012-04-07 Thread Bogdan Ribic
This is *not* typecasting at all, this is assignment of a result of boolean operator, and it boils down to operator precedence. It's equivalent to this code: $b = $x == 11; in the part that right side of equation sign is calculated first, then assigned to lvalue. In effect, you wrote this:

[PHP] Re: php in windows

2012-04-10 Thread Bogdan Ribic
On 4/10/2012 04:05, Kirk Bailey wrote: The edition of php for windows I instaklled does not work. Which flavor of windows php DOES work properly in windows? Trust me, it does work :) I'm running PHP 5.3.10 thread-safe, as apache module on apache 2.4.1 from apache lounge (not official apache

[PHP] Re: PHP: a fractal of bad design

2012-04-17 Thread Bogdan Ribic
Where's the Like button on this list? :) On 4/13/2012 01:44, Ross McKay wrote: On Wed, 11 Apr 2012 17:06:10 -0700, Daevid Vincent wrote: There are only two kinds of languages: the ones people complain about and the ones nobody uses. -- Bjarne Stroustrup -- PHP General Mailing List