Re: [PHP] exec and system do not work

2013-08-26 Thread Jasper Kips
Ethan, A return code of not 0 means an error occured. Probably /var/www is not writable. Test that one by doing this: $a = is_writable("/var/www); var_dump($a); If that says anything else than (boolean) TRUE, you can't write in the directory. Sincerely, Jasper Kips Op 27 aug. 2013

[PHP] Relative includes and include_path

2011-12-22 Thread Jasper Horn
clusion. (I included my experiment below.) Is the idea that those two are equivalent wrong? Am I doing something wrong? Is something strange going on? Can anyone clear this issue up for me? Thanks, Jasper --- The experiment: On a machine where the include_path is ".", I had the

RE: [PHP] pass text variables to next page

2011-08-09 Thread Jasper Mulder
gt; > Chris > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > The problem is with the mysql_real_escape_string closing parenthesis position, instead of ($_GET['id']."'"); it should be ($_GET['id'])."'"; HTH, Jasper

RE: [PHP] Tree menu list in php

2011-07-26 Thread Jasper Mulder
his appears like a typical JavaScript thing to me. If you insist on not using JS, you could probably use AJAX+PHP to do it. However, JavaScript appears to me as the more convenient method. Regards, Jasper

RE: [PHP] How to sum monetary variables

2011-07-18 Thread Jasper Mulder
fferent results in case of overflow. However as python supports arbitrary integer arithmetic, overflows should not occur. At the moment, still overflow errors seem the most likely explanation. Does your table consist of very large values (occasionally perhaps)? Could you give us an example? Best regards, Jasper

RE: [PHP] I want to use POST when redirect via PHP Header function.

2011-06-30 Thread Jasper Mulder
y. As for the readers of this list, I am sorry to go into this non-PHP subject, but I couldn't really let this pass. Best regards, Jasper

RE: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Jasper Mulder
ages associated to it > > hope i make sense > > kind regards > > Adam Suppose that $arrays is your array of arrays. Then is $res = array(); foreach($arrays as $item){   $res[$item['cat_name']][] = $item; } what you are looking for? Best regards, Jasper Mulder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] phpsadness

2011-06-03 Thread Jasper Mulder
e that this post has only extended the list by one. Let us get over it and get back to discussing what we all *do* like: PHP. Best regards, Jasper Mulder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Jasper Mulder
s you made. As was stated before, people may be offended and thus it makes the chances of you solving your problem fast smaller. As a last, please refrain from bombarding the list with small posts. Please think a bit before posting your questions. Thanks in advance. Best regards, Jasper Mulder

RE: [PHP] Urgent help - Token Generation code!

2011-05-27 Thread Jasper Mulder
> From: shreya...@gmail.com > To: lord_fa...@hotmail.com > Subject: Re: [PHP] Urgent help - Token Generation code! > Date: Sat, 28 May 2011 04:15:59 +0530 > > Jasper, > > Tried echoing $sToken but wouldn't work. > > Re

RE: [PHP] Urgent help - Token Generation code!

2011-05-27 Thread Jasper Mulder
Extract, $nTime); > > echo $token; > > There are two cases: > 1. You made a typo and meant 'echo $sToken;' on the above line instead > 2. You omitted the part where $token is defined and used > > > [More code that seemed fine] > > > > -- > > Rega

[PHP] Need experience with OOPHP

2011-05-20 Thread Jasper Mulder
ammer. I stress I have quite some experience with the old, procedural PHP. Anybody interested? Best regards, Jasper Mulder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] A Review Request

2011-05-18 Thread Jasper Mulder
t: Please correct   This Authorization Proceedure to   This authorization procedure or, if you must,   This Authorization Procedure Otherwise I can only encourage such an initiative because it can help out and save time. Best regards, Jasper Mulder

RE: [PHP] mysql problems [SOLVED]

2011-05-14 Thread Jasper Mulder
you, everyone for your help. > > Curtis A small remark: I think it is good programming practice to place such static if-clauses before the while statement. This prevents a lot of redundant checks and thus saves time. Best regards, Jasper -- PHP Ge

RE: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Jasper Mulder
ary. Only thing is, that you would have very wide tables (I don't know how wide MySQL can go). Creating tables on-the-fly as necessary seems to be something you could consider, but again I stress that I don't know performance details. There might be something quicker. So far for my

[PHP] C++, $_POST -> php-cgi

2009-06-08 Thread Jasper
while(ReadFile(hStdoutR,buf,sizeof(buf),&dwRead,NULL) && dwRead != 0){ printf(buf); } printf("|\n\nEND"); CloseHandle(hStdoutR); getch(); return 0; } -- Thanks! Jasper

[PHP] mktime() vs date()

2006-04-17 Thread Jasper V. Ferrer
hi, is mktime() actually faster than date() or any other date functions? tnx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-03 Thread Jasper Bryant-Greene
a transaction. That will hold up certain other queries. But that's at a whole other layer. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
John Nichel wrote: Jasper Bryant-Greene wrote: I never close connections; PHP does that for me and has never caused any problems doing that. I don't see it as sloppy programming, it is a documented feature that PHP closes resources such as database connections at the end of the s

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Sat, 2006-04-01 at 21:39, Jasper Bryant-Greene wrote: Robert Cummings wrote: There's smart lazy programming, and sloppy lazy programming. I don't trust anything magical in PHP. Most of us are familiar with the magic quotes and global vars fiascos *LOL*. B

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Sat, 2006-04-01 at 20:48, Jasper Bryant-Greene wrote: Yeah, e.g. I have a database objects layer that means I only write SQL in classes, everything else is just calling object methods. I create the database object at the start of every script but that doesn&#

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
any problems doing that. I don't see it as sloppy programming, it is a documented feature that PHP closes resources such as database connections at the end of the script. But, as has been said, each to their own. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz

Re: [PHP] MySQL close connection, what's the purpose?

2006-04-01 Thread Jasper Bryant-Greene
connect and disconnect from the same database multiple times within the same request? In my experience, connecting to the database takes up more than half of the execution time of the average database-driven PHP script (I said *average*, there are exceptions). You don't want to be doing it

Re: [PHP] preg_match

2006-03-31 Thread Jasper Bryant-Greene
e-insensitive flag, since there's no characters in your pattern). The strpos() solution above is much better and faster in this case, though. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP Ge

Re: [PHP] Overloading Limitation- Can Someone Confirm?

2006-03-31 Thread Jasper Bryant-Greene
Jim Lucas wrote: Jasper Bryant-Greene wrote: Jochem Maas wrote: [snip] you guess wrong :-) .. I couldn't resist testing it: php -r ' class T { private $var = array(); function __set($k, $v) { $this->var[$k] = $v; } function __get($k) { var_dump($k); } } $t = new T; $t->a

Re: [PHP] setting the same value to multiple variables

2006-03-30 Thread Jasper Bryant-Greene
y code (have you considered an array? what is the point of all those variables if they all hold the same value?), replace all of those '&&' with '=' and you will be fine. PHP evaluates right-to-left and the result of an assignment is the value that was assigned, so th

Re: [PHP] Database connections

2006-03-30 Thread Jasper Bryant-Greene
Chris wrote: If they're accessing the same database you don't need to disconnect/reconnect. Different db's - well, yeh you don't have a choice. Of course you do. mysql_select_db() or whatever it's called. Or just issue a USE [databasename] query. No need to reco

Re: [PHP] Visa / MasterCard security compliance

2006-03-30 Thread Jasper Bryant-Greene
rcard's requirements. :) -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTTP status code

2006-03-30 Thread Jasper Bryant-Greene
with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) h

Re: [PHP] HTTP status code

2006-03-30 Thread Jasper Bryant-Greene
In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who

Re: [PHP] Outputting text "

2006-03-30 Thread Jasper Bryant-Greene
ersion="1.0" encoding="ISO-8859-1" ?>'; would work just as well and is a hell of a lot easier to look at. That's assuming you actually want it to appear on the page for the user to see, if you want the browser to interpret it you'll have to change the < a

Re: [PHP] Overloading Limitation- Can Someone Confirm?

2006-03-30 Thread Jasper Bryant-Greene
Jochem Maas wrote: Jasper Bryant-Greene wrote: Jochem Maas wrote: I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g: echo $tc->arr['a'] this is triggers a call to __g

Re: [PHP] Overloading Limitation- Can Someone Confirm?

2006-03-30 Thread Jasper Bryant-Greene
e 'a' key inside that array. Or at least it should, dammit. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Overloading Limitation- Can Someone Confirm?

2006-03-30 Thread Jasper Bryant-Greene
27;])) { unset($tc->arr['b']); } you just removed b from the array under 'arr' in the $vars member array. //var_dump is only to see results of above var_dump($tc); this should show something equiv. to: array( 'arr' => array(

Re: [PHP] PHP4: calling method on returned object

2006-03-30 Thread Jasper Bryant-Greene
this->Location->GetMap())->GetUrl() .. which doens't work. In short, no. That syntax was introduced in PHP5. For OO work, I would strongly recommend upgrading to PHP5 as there are many other important OO features that simply are not available in PHP4. -- Jasper Bryant-Greene General

Re: [PHP] Outputting text "

2006-03-30 Thread Jasper Bryant-Greene
. "\n"; ?> -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] parent constructor

2006-03-29 Thread Jasper Bryant-Greene
. Seriously. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] addslashes()

2006-03-29 Thread Jasper Bryant-Greene
From http://php.net/addslashes : "Having the PHP directive magic_quotes_sybase set to on will mean ' is instead escaped with another '." Jasper Chris Boget wrote: Can someone explain something to me: $string = "Bob's carwash's door"; echo 'a

Re: [PHP] private $foo

2006-03-28 Thread Jasper Bryant-Greene
the previous post? Are you running a version of PHP that supports them? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unset a constant

2006-03-27 Thread Jasper Bryant-Greene
There is no way using the core language. You can, however, use the runkit function if you absolutely have to: http://php.net/runkit_constant_remove Jasper Suhas wrote: Hi, How do I unset a defined variable. e.g. define('AA',1); unset(AA) // gives error any suggestions!

Re: [PHP] $i vs. $r

2006-03-27 Thread Jasper Bryant-Greene
} $r = 0; while ($row = mysql_fetch_array($result)) { echo ("Blah blah blah"); $r++; } Those two blocks of code are for all intents and purposes identical, and indeed probably end up as exactly the same opcodes. Jasper -- PHP General Mailing List (http://w

Re: [PHP] mysql query/$post problem

2006-03-27 Thread Jasper Bryant-Greene
vname')WHERE id ='$user_id')"; Also - it looks like an UPDATE might be more suitable for what you want, given that you've got a WHERE clause tacked on the end. Google for a good SQL tutorial; the PHP mailing list is not the place to learn SQL :) Jasper -- PHP Gener

Re: [PHP] Switching to UTF-8. Need help.

2006-03-24 Thread Jasper Bryant-Greene
If you're on *nix: man iconv otherwise, I have no idea, sorry. Jasper Andy wrote: No it was not. If I save it with UFT8 encoding it works well. So, do I have to convert all the files to UTF8 encoding? Is there an easy way to do that? - Original Message - From: "Jasper Bry

Re: [PHP] Switching to UTF-8. Need help.

2006-03-24 Thread Jasper Bryant-Greene
Is the file saved in UTF-8 encoding (the PHP script itself)? Jasper Andy wrote: This is my code: "; echo utf8_encode ($str); ?> öüééééÉõõÕÕ I tried all the ways: and etc. The first echo... is not showed correctly. The second (with the encoding

Re: [PHP] security risk by using remote files with include(); ?

2006-03-24 Thread Jasper Bryant-Greene
/www.server.com/file.html' ); but only if you really trust his server to never get compromised, as that would allow an attacker to replace content on your website with anything they liked. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Execute a program from PHP CLI and allow user interaction

2005-11-22 Thread Jasper Bryant-Greene
nano tmpfile.txt" ); all just hang (top shows nano is running, but it doesn't seem to be attached to the terminal). How can I launch a process and attach it to the terminal PHP CLI was launched from so that the user can interact with it? TIA -- Jasper Bryant-Greene General Mana

Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread Jasper Bryant-Greene
. GET represents nothing of importance changing on the server, e.g. performing a search on the database, and can safely be repeated. SSL/TLS is the best option if you wish to transmit sensitive data. -- Jasper Bryant-Greene General Manager Album Limited +64 21 708 334 [EMAIL PROTECTED] -- PHP

Re: [PHP] shell command

2005-11-18 Thread Jasper Bryant-Greene
. I can't speak for your machine, though. cd /; find -name head.jpg -- Jasper Bryant-Greene General Manager Album Limited +64 21 708 334 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-DB] Drag and Drop with PHP and MySQL

2005-11-18 Thread Jasper Bryant-Greene
There's no way the browser is going to let JS have access to the user's filesystem. I would expect ditto for Flash, although I don't use it. Jasper On 11/18/05, Micah Stevens <[EMAIL PROTECTED]> wrote: No. That would be nice though eh? What I have done in the past

Re: [PHP] Re: Variables in Variables?

2005-11-18 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: Ben wrote: $dbVars=explode(',',$two_vars); // Assuming comma seperator foreach($dbVars AS $key => $value) { $eval="\$temp=".$value.";"; eval($eval); echo $temp; } WTF do you need eval() for?! $dbVars = explode( 

Re: [PHP] Re: Variables in Variables?

2005-11-18 Thread Jasper Bryant-Greene
Ben wrote: If I understand your question properly I'd explode $two_vars with whatever seperator you have between them and then you'll need to use eval to get your results. Maybe something like... $dbVars=explode(',',$two_vars); // Assuming comma seperator foreach($dbVars AS $key => $value) {

Re: [PHP] Re: php error message

2005-11-17 Thread Jasper Bryant-Greene
An alternative solution is to just turn on output buffering, which will make sure no output gets sent until after all PHP has stopped processing (unless you specifically tell it to get sent earlier). Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] random row

2005-11-15 Thread Jasper Bryant-Greene
table isn't too big, it's fine to do: SELECT * FROM mytable ORDER BY RAND() LIMIT 1 If you've got more than a few 10,000s of rows, you might want to look at other ways, like selecting a random row based on the primary key by generating a random number in PHP before executing

Re: [PHP] Virtual Directory Support

2005-11-15 Thread Jasper Bryant-Greene
Brad Glonka wrote: The script does not give me any output. I think this is what I need to enable. No, as has already been said on the list. That "virtual directory" setting has nothing to do with this AFAIK. Are you running PHP as an Apache module or as CGI? Jasper -- PHP Gener

Re: [PHP] Virtual Directory Support

2005-11-15 Thread Jasper Bryant-Greene
at string (hint: explode on '/'). Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: emailing MySQL list not working

2005-11-14 Thread Jasper Bryant-Greene
eturn (these names date from typewriters, I believe!) I think that \r\n is the standard way to separate header fields in HTTP and SMTP, but maybe it's just the most interoperable way. Everyone I know does it, so I'm just being a sheep... Jasper -- PHP General Mailing List (http://w

Re: [PHP] [EMAIL PROTECTED]

2005-11-14 Thread Jasper Bryant-Greene
just to stop the bounces, but it appears there is no way to sign up on that webmail site. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: please shed some light on SQLsyntax error

2005-11-13 Thread Jasper Bryant-Greene
s it was and put the backticks in the SQL statement, like this: $sql = "INSERT INTO `$table_name` values ('', '$_POST[f_name]', [...] Jasper On 11/13/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: Bruce Gilbert wrote: You would need to show us the SQL

[PHP] Re: please shed some light on SQLsyntax error

2005-11-13 Thread Jasper Bryant-Greene
('', '$_POST[f_name]', You'll be wanting to put backticks (`) around the table name, because it contains a space. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] please shed some light on SQLsyntax error

2005-11-13 Thread Jasper Bryant-Greene
7;', 'firstname', 'lastname', 'address', ' You would need to show us the SQL that was causing that error. Otherwise it is fairly meaningless. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Printing to a buffer

2005-11-13 Thread Jasper Bryant-Greene
Todd Cary wrote: Marcus - Many thanks! I did not know that MIME-Type. Change duly made! You're not suggesting that you actually set the MIME-Type to application/force-download, are you? Todd Marcus Bointon wrote: On 13 Nov 2005, at 00:17, Jasper Bryant-Greene wrote: seem

Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene
Todd Cary wrote: Yup! It was the missing parentheses! Works as planned. Many thanks The "application/text" gives the user the ability; "text/plain" does not The ability to...? seem to do that. I just tried "application/text" since I use "application/pdf" for other applications. Wh

Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene
Todd Cary wrote: My client's new shared server does not allow printing to a file, so I want my print statement to print to a buffer, then I'll send it to the user via Headers. This does not work since "print" does no go to the buffer, or at least appears not to: I get the errors from the heade

Re: [PHP] Re: emailing MySQL list not working

2005-11-12 Thread Jasper Bryant-Greene
er\r\n"; $headers .= "Reply-To: $reply_to\r\n"; and so on. If the headers are all on one line then the MTAs and mail clients have no way of telling them apart. Jasper On 11/12/05, Marco Kaiser <[EMAIL PROTECTED]> wrote: Hi, try to add in your $headers linebreaks. (&qu

Re: [PHP] What is the purpose of sessions extension?

2005-11-11 Thread Jasper Bryant-Greene
GamblerZG wrote: What is the purpose of sessions extension? The reason I ask is because learning to deal with all its functions, ini options and quirks took me _much_ more time than writing pure-php replacement. (That is, without using session_set_save_handler().) I realise that yours might b

Re: [PHP] Filtering and Escaping (Was: Select and $_POST)

2005-11-11 Thread Jasper Bryant-Greene
s the spec goes). I always try to enter my email address like this when asked for it on a form: Jasper Bryant-Greene <[EMAIL PROTECTED]> That is a perfectly valid (according to RFC822) email address. Those that do bother to validate usually spit it out as invalid. Just to demo

Re: [PHP] fopen on windows

2005-11-11 Thread Jasper Bryant-Greene
Jay Blanchard wrote: [snip] Well, it's a pretty model example of a line-by-line file read. I can't see anything wrong with it, so perhaps the problem lies elsewhere. There's no other files with the same name in your include_path? Maybe something to do with auto_detect_line_endings or whatever

Re: [PHP] fopen on windows

2005-11-11 Thread Jasper Bryant-Greene
Jay Blanchard wrote: $theFile = fopen("docs/InstallationInstructionMaster.txt", "r") || die; I'm not sure if it would make any difference, but I usually use "or" in this case rather than "||", and I know they have different operator precedence. while(!feof($theFile)){ $theLine = fg

Re: [PHP] Inserting a NULL value into MySQL via PHP

2005-11-10 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: Is there a way when making a MySQL database entry through a PHP script and there is no data to make the db treat it as NULL? Wouldn't this just work: INSERT INTO myTable (myField) VALUES (NULL) Jasper -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Re: Security Issues - Where to look?

2005-11-10 Thread Jasper Bryant-Greene
GamblerZG wrote: Richard Lynch wrote: Please pay attention. Sorry, I did not see your message when I posted that. Oh and would you mind using an email address that exists? Every time I reply to one of your posts, I get a returned mail from highstream.net saying your user doesn't exist..

Re: [PHP] Gotta learn asp.net...

2005-11-10 Thread Jasper Bryant-Greene
chard Lynch's benefit.) :) Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] undefined index and php

2005-11-10 Thread Jasper Bryant-Greene
= isset( $_POST['heading'] ) ? stripslashes( $_POST['heading'] ) : ''; By the way, while you're switching register_globals off, it might be a good idea to also switch off magic_quotes_gpc (the reason you need stripslashes() above) and short_open_tag (judgi

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Jasper Bryant-Greene
sure AllowOverride is set correctly in your main Apache config file; try setting it to All for debugging this. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Jasper Bryant-Greene
> > > If you guys wouldn't mind taking a few more minutes to mow over all of > > this, I would *greatly* appreciate it. Would you mind telling us what the problem is? You've said that you are having problems and that you don't think you're alone, but you hav

Re: [PHP] FileExists?

2005-11-07 Thread Jasper Bryant-Greene
a file pointer exists. You want to check if the file exists. Try: if( file_exists( "http://www.stammis.com/getstart.php"; ) ) -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p: 0800 4 ALBUM (0800 425 2

Re: [PHP] Line breaks in mail function?

2005-11-06 Thread Jasper Bryant-Greene
, I've also tried using "\n\n" instead of "\r\n\r\n". > > Can anyone give me some advive on how to get the linebreak characters > interpreted as linebreaks? Use double quotes around the parts that have \r and \n characters if you want them to be interpreted. --

RE: [PHP] PHP from the command line

2005-11-03 Thread Jasper Bryant-Greene
tween the output of phpinfo() in CLI mode and through your webserver. Jasper > -Original Message- > From: Robbert van Andel [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 03, 2005 8:37 PM > To: [EMAIL PROTECTED]; 'David Tulloh' > Cc: php-general@lists.php.net &g

Re: [PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Jasper Bryant-Greene
> global $DB; Again, no need to global $DB. You are still in the global scope. > $RL="__"; > $LoginD="__"; > $ID=$UserInfo['ID']; > echo $ID; > $DB="membersp"; Here is your problem. You just replaced the $DB object with a string. Maybe you

Re: [PHP] Re: Reset STDIN pointer

2005-11-02 Thread Jasper Bryant-Greene
STDIN ); > > > > returns an error. > > The internal STDIN pointer? there is no such thing by the name of STDIN in > php. Yes there is, when running in CLI mode. See: http://php.net/features.commandline#AEN7906 -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: > Oh thanks again > and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.n

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
are $DB as a global at the start of the function. Like this: function doSomething() { global $DB; $DB->doSomethingElse(); } Or access $DB through the globals superglobal. RTFM. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz

Re: [PHP] eval();

2005-10-30 Thread Jasper Bryant-Greene
way to do what you need to do. I can assure you one does exist, but with your example it's fairly obvious, so you'd need to explain better what you're trying to do before I could help you. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.albu

Re: [PHP] eval();

2005-10-30 Thread Jasper Bryant-Greene
On Sun, 2005-10-30 at 21:16 -0500, John Taylor-Johnston wrote: > I need to generate embedded php within in a mysql record. $contents is > the actual contents of that record. > > $contents = " arial,helvetica; font-weight: bold;\">About the Project > "; > echo eval($contents); > ?> > > I get thi

Re: [PHP] PHP5 class constants

2005-10-27 Thread Jasper Bryant-Greene
D =1 << 3; > } > > Well now, is this a bug, and I should file it, or is it, and why, normal? Not a bug. Read manual. >From http://php.net/oop5.constants comes the following: "The value must be a constant expression, not (for example) a variable, a class member, result of a

Re: [PHP] regex and global vars problem

2005-10-27 Thread Jasper Bryant-Greene
On Thu, 2005-10-27 at 00:00 +0200, Jochem Maas wrote: > gonna jump on your thread there Jasper, I would > like to comment on your function and ask you a question: > > which is 'better' (for what), preg_*() or ereg[i]*()? I prefer preg_*(), but I used eregi() because

Re: [PHP] regex and global vars problem

2005-10-26 Thread Jasper Bryant-Greene
h chk_mac() (which by the way should return true or false, not 1 or 0, but meh). -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- PHP Gen

Re: [PHP] regex and global vars problem

2005-10-26 Thread Jasper Bryant-Greene
sn't working" is a bit vague. * Does it throw an error? - If so, can we have the error message? * Does it mark invalid strings as valid? - Or vice versa? Just posting a pile of code with an explanation of what it does and leaving the rest of us to figure out what the problem is

Re: [PHP] regex and global vars problem

2005-10-26 Thread Jasper Bryant-Greene
oblem was? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

RE: [PHP] GUID or any other unique IDs

2005-10-25 Thread Jasper Bryant-Greene
near congruential generator, collisions should be *very* improbable, even when generating IDs on multiple hosts all at the same time. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box

Re: [PHP] GUID or any other unique IDs

2005-10-25 Thread Jasper Bryant-Greene
> but found nothing suitable > there. > > I really need "true" unique identifiers - md5() hash is not OK because of > the "birthday paradox". > > Can anyone recommend a way for solving this trouble? I use: $unique_id = sha1( uniqid( mt_rand(), true ) ); w

Re: [PHP] how to display GD graphic in web page

2005-10-24 Thread Jasper Bryant-Greene
aviour. You can call graphic.php with GET variables if you need to pass information on, but you can't put images inline like that except for with data: URIs. data: URIs are currently only supported by Gecko browsers (Mozilla, Firefox, etc) and maybe Safari or Opera (not sure about the latter two). Do

Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
On Sun, 2005-10-23 at 23:01 -0400, Bob Hartung wrote: > Jasper & Derek > >phpinfo() says: > configuration file path /etc/php.ini > >PHP Core >DirectiveLocal Value Master Value > > display_errorsOff

Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
On Sun, 2005-10-23 at 21:31 -0400, Bob Hartung wrote: > Jasper >If if make a file containing only > phpinfo() ; >?> >I get what I expected. > >If I make a file containing > > phpinfo() ; > > // Now a simple class and a call to th

Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
php.ini. If it isn't, then you're editing the wrong php.ini. Also, make sure you're not overriding those values in a .htaccess file or in a script. What kind of errors are happening that aren't being displayed? For example in an output buffering handler, an error could just c

Re: [PHP] connect to MySql

2005-10-23 Thread Jasper Bryant-Greene
splayed if you create a file containing and view it with your web browser -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A better way to do this

2005-10-23 Thread Jasper Bryant-Greene
'publications' => 'Publications' ); print( '' ); foreach( $selectValues as $value => $option ) { print( '' . htmlspecialchars( $option ) . '' ); } print( '' ); ?> If you're using XHTML, replace ' sele

Re: [PHP] Abstract Classes?

2005-10-23 Thread Jasper Bryant-Greene
thing as an HTTP_Response on its own. It has to be a specific type of HTTP Response, that is a 301 Moved Permanently or a 304 Not Modified. Does that help? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +

Re: [PHP] Memory Leak?

2005-10-22 Thread Jasper Bryant-Greene
ue7') ... and so on. These are apparently much nicer for MySQL to process, which may result in lower memory usage and faster operation. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21

Re: [PHP] rtrim Null characters

2005-10-21 Thread Jasper Bryant-Greene
issue in any suggested answer, keep that in mind. To be honest, I think you're going about it the wrong way. Put the secret word into $_SESSION. Point the tag at a PHP script which pulls it out of $_SESSION and renders it as an image. Then you don't need to send it to the client in any fo

Re: [PHP] SCRIPT_NAME

2005-10-21 Thread Jasper Bryant-Greene
> becomes: > > a/b/c/d/foo.php > > but the OP wanted: > > foo.php It will actually work... Did you not notice that he was using strrpos() ? Note the extra 'r' in there :) http://php.net/strrpos -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL

  1   2   3   4   5   >