[PHP] Re: how to check for a static call from an object

2005-07-21 Thread Sebastian Mendel
Sebastian Mendel wrote: > Hi, > > how can i check if a method is called statically when called from inside > another object? (without debug_bactrace()) > > > class foo > { > function bar() > { > if ( isset( $this ) ) >

[PHP] how to check for a static call from an object

2005-07-21 Thread Sebastian Mendel
bar() { return $this->value; } } or even class foo { static function bar( $param ) { return $param; } function bar() { return $this->param; } } or is this at least an issue for the internals-list? -- Sebastian Mendel www.seba

[PHP] Re: Freing memory resources?

2005-06-16 Thread Sebastian Mendel
Sebastian Mendel wrote: >> Gustav Wiberg wrote: >>> Hi there! >>> >>> I have a script that runs about 10 minutes... Localy on my computer >>> (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then >>> when the script is running.

[PHP] Re: Freing memory resources?

2005-06-16 Thread Sebastian Mendel
your indices how large are your tables? -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: incrementing a register global

2005-06-16 Thread Sebastian Mendel
> > for($i=1;$i<=$boxes;$i++){ > echo $_GET['name'].$i; > } did you tried foreach() with $_GET ( or $_REQUEST ) ? foreach ( $_GET as $key => $var ) { echo $key . ' => ' . $var; } but this is not "incrementing a register global" but &#

Re: [PHP] Re: Converting [and] to XML format- help/advise requested

2005-06-16 Thread Sebastian Mendel
Dotan Cohen wrote: > On 6/15/05, Sebastian Mendel <[EMAIL PROTECTED]> wrote: >> Dotan Cohen wrote: >> >>>>> Hi gurus. I'm having fun replacing the text within [ and ] to XML >>>>> format on 4000+ files on a windows XP machine. I installed ph

[PHP] Re: unable to load php_gd2.dll

2005-06-15 Thread Sebastian Mendel
ystem Eventviewer? >> >> this error doesnt mean that 'php_gd2.dll' can not found, but that >> another dll, required by php_gd2.dll can not be found. > > I checked the even view but no help there. What dll do you > think i would need? Please I appreciate your help. extension_dir = "c:\php\extensions\" http://www.php.net/manual/en/install.windows.extensions.php "Please do not forget the last backslash" -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: unable to load php_gd2.dll

2005-06-15 Thread Sebastian Mendel
Sebastian Mendel wrote: >>> ; Directory in which the loadable extensions (modules) >>> reside. >>> extension_dir = "C:\PHP\extensions" >>> >>> I have also uncommented the >>> >>> extension = php_gd2.dll >>> >&

Re: [PHP] Re: Converting [and] to XML format- help/advise requested

2005-06-15 Thread Sebastian Mendel
e final ocde. > > The code works great for [] tags that do not contain the word algebra. > If the word algebra is alone between the tags then it returns > , which I can easily remove with one more line of code. > But if the word algebra appears with another word, then it is > converted to a note just as if it did not contain the word. $search = array( '/\[[^\]*algebra[^\]*\]/', '/\[([^\]]+)\]/', ); $replace = array( '', '\1', ); preg_replace( $search, $replace, $string); -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: unable to load php_gd2.dll

2005-06-15 Thread Sebastian Mendel
ow XP $ 2000 with IIS 5.0 but still nothing what means 'nothing'? does it start? or does it report any errors? what says phpinfo() about gd? -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting [and] to XML format- help/advise requested

2005-06-14 Thread Sebastian Mendel
there that checked the presence of > the word algebra, but it ALWAYS returned blank. preg_replace( '/\[(algebra|([^\]]+))\]/', '\2', $string); just to mention, you need only the second example, the first ist just to explain the step toward the final ocde. -- Seb

[PHP] Re: Right syntax for max value??

2005-06-14 Thread Sebastian Mendel
pport sub-querys > What it does: > > collects the newstitle from the field where PRIMARY key(news_id) is > the highest auto_increment number. > > This works just as excpected on localhost but not on remote. > > Does anybody know the right syntax? SELECT `newstitle`

[PHP] Re: DB relationship chart generator?

2005-06-14 Thread Sebastian Mendel
Thomas wrote: > Is there an app out there that can easily create a relationship (flow) > diagram of a given database? DBDesigner at http://www.fabforce.net/dbdesigner4/ -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -

[PHP] Re: formatting paragraphs in to strings

2005-06-14 Thread Sebastian Mendel
gt; Any ideas why this is happening and how I can format the text properly?? not, with any look at your code or results try preg_replace( '|\s*|', ' ', $string ); it will replaces any occurence of one or more white-space-characters with one single space http://www.php.net/

[PHP] Re: Understanding Static Methods

2004-11-19 Thread Sebastian Mendel
RICT. As reported in the output, the values for error_reporting are well set (4095 == E_ALL | E_STRICT) with zend engine 1.3 compatiblity on ? -- 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: Confused with constructors

2004-11-19 Thread Sebastian Mendel
uctor function of its own and the constructor of the base class would have been called, printing 'I am the constructor of A.'." Is this an error in the manual? Or a bug in php 4.3.9? Or just me being stupid? as i understand it exactly as you, it must be a bug/error -- Sebastian

[PHP] Re: Holding an array in a session

2004-11-19 Thread Sebastian Mendel
the array, if so how can I display its value?# $_SESSION['key'] = $current_array_key; // f.e. 0 on the first page echo $_SESSION['ses_csv_files'][$_SESSION['key']]; -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/p

[PHP] Re: Sorting multidim array and keeping associations

2004-11-18 Thread Sebastian Mendel
) { 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; } -- Se

[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

[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.sebastia

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

2004-11-18 Thread Sebastian Mendel
he _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';

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

2004-11-18 Thread Sebastian Mendel
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.seba

[PHP] Re: Sequrity without HTTPS?

2004-11-18 Thread Sebastian Mendel
t-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 Mende

[PHP] Re: Sorting multidim array and keeping associations

2004-11-18 Thread Sebastian Mendel
ied 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! -- Seba

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

2004-11-17 Thread Sebastian Mendel
t know where to look. Did anybody have this experience before? quota? free space? try setting display_errors and startup_errors on try track_errors with on -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projec

[PHP] Re: Array unset

2004-11-17 Thread Sebastian Mendel
moduleLevel] => 5 [moduleOrder] => 3 [moduleVisibility] => 1 [moduleType] => alias [moduleStatus] => 1 ) ) So, the question, how resort the numeric values to 1,2,3,4? which "numeric values" ? -- Sebastian Mendel www.sebastia

[PHP] Re: File Handing Windows / Linux

2004-11-17 Thread Sebastian Mendel
hat to look for! why not ry relative path? $handle = opendir("./extra/photos/".$_GET['page']."/"); -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet -

[PHP] Re: Sorting multidim array and keeping associations

2004-11-17 Thread Sebastian Mendel
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

[PHP] Re: Dynamic Combo Box

2004-11-15 Thread Sebastian Mendel
project at last by today... This is a javascript related problem! Why not just take a look add any driver-section of a web-page from a hardware-manufacturer? -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net

Re: [PHP] Re: Which PHP for MySQL 4.1

2004-11-12 Thread Sebastian Mendel
Mario Bittencourt wrote: I could not compile php 5.0.2 with the latest mysql 4.1.7. I've installed the rpms (server,max,client,devel,shared) from mysql.com. ./configure --with-mnogosearch --with-xml --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-apxs2 --enable-soap When I compile I g

[PHP] Re: parsing /'s in urls

2004-11-12 Thread Sebastian Mendel
because the browser just thought it was accessing a direct link to a file. But now download.php/30/file.torrent results in a 404. Is this something I can change back? this is an apache related thing http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo -- Sebastian Mendel

[PHP] Re: Which PHP for MySQL 4.1

2004-11-12 Thread Sebastian Mendel
all mysql_passwords stored in the db, thats why you have to run mysql_fix_privilege_tables read carefully through all 4.1. changelogs! -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet

Re: [PHP] calling function from function?

2004-11-12 Thread Sebastian Mendel
the DB? if you have a primary key on `session` you can just user REPLACE instead of "if SELECT INSERT ELSE UPDATE" logs() { db( $defined[9], $defined[1], $defined[2], $defined[3] ); $sql = 'REPLACE INTO logs VALUES ( ... )'; mysql_query( $sql ) or die( '...&

[PHP] Re: find duplicated values in array and count them

2004-11-11 Thread Sebastian Mendel
) ) ) loop through all and create a new array foir counting foreach ( your arrays to serach for as $array) { counts[$array['room']][$array['teacher']][$array['class']]++; // or by whatever is relevant for you } -- S

Re: [PHP] Question on functions

2004-11-11 Thread Sebastian Mendel
ct( $defined[9] shouldnt it be @mysql_pconnect( $defined[0] Sorry, yeah it is a typo and? is it a typo in the message or in your source and solves this typo your problem? -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetime

[PHP] Re: header variable ?

2004-11-11 Thread Sebastian Mendel
Jerry Swanson wrote: What variable "header" use? If I send something in header, what GLOBAL variable header use? do you mean $_SERVER ? $_SERVER holds some header-information sent by the client to the webserver -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.t

[PHP] Re: LINUX: Problem with php installation

2004-11-11 Thread Sebastian Mendel
AddType. The error log file is showing "Segmentation fault". try without modules if it works try one module check again and so on... -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projects/phptim

Re: [PHP] should basic data validation go outside a function or inside?

2004-11-11 Thread Sebastian Mendel
certain input and complains, or returns false, if it doesn't get it. yes, and of course shouldnt every function check it parametres before proceeding? -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/pro

Re: [PHP] Question on functions

2004-11-11 Thread Sebastian Mendel
_pconnect( $defined[9] shouldnt it be @mysql_pconnect( $defined[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] Re: Array to $_GET variable

2004-11-10 Thread Sebastian Mendel
ache" a recordset? i would prefer $_SESSION! btw. - do you see the ...?getvar=... in the URL ? - what does var_dump( $_GET['getvar'] ); - do you tried urlencode(); -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetime

Re: [PHP] Question on functions

2004-11-10 Thread Sebastian Mendel
x27;]; // is the same as: global $my_var echo $my_var; // 'global' just creates a local reference to the global variable // global $my_var; is the same as: $my_var =& $GLOBALS['my_var']; echo $my_var; } -- Sebastian Mendel www.sebast

[PHP] Re: Help: Database Search

2004-11-10 Thread Sebastian Mendel
); $where = array(); if ( isset($_POST['Ind']) ) { $where[] = 'vendorjobs.Industry = ' . (int) $_POST['Ind']; } if ( isset($_POST['Days']) ) { $where[] = 'Date_Sub(Curdate(), interval ' . (int) $_POST['Days'] . ' day) <= PostS