Re: [PHP] Posting variables from one php script to another

2005-09-22 Thread Jasper Bryant-Greene
Graham Anderson wrote: I am using GET to send variables from one php script to another php script How would I POST the same variables ? http://php.net/curl You can use the CURL functions to send a POST request. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name

Re: [PHP] Posting variables from one php script to another

2005-09-22 Thread Jasper Bryant-Greene
Graham Anderson wrote: In a POST request: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php"); I think you may need to put the full URL here. I don't do a lot with CURL, though, so someone else may be able to help you more here. -- Jasper Bryant-Green

Re: [PHP] Opensource webshop

2005-09-22 Thread Jasper Bryant-Greene
rcecms.com/ -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] File complete check (FTP)

2005-09-23 Thread Jasper Bryant-Greene
e FTP server, and then filesize() on it afterwards... both from the server... if the two are equal then the file is complete. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
pts through tags and the like with no problems whatsoever. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
PRequest to fetch a base64-encoded stream of your data and write it to the src attribute within a "data:" URI scheme, but that won't work on IE or many other browsers. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
; Would the movieBuilder.php file retain the POST'ed variables ? Or, would they be lost in the void. maybe this approach is silly? You could save the variables to a file. But it's silly and slow when you could just use GET. Can you explain why you don't want to just send them as GET v

Re: [PHP] How to Looking at Raw Binary Data with PHP and curl

2005-09-24 Thread Jasper Bryant-Greene
l data and not a representation of it :) str_replace is not for encryption. You might want to look at mcrypt, as using str_replace is probably just as bad as sending the unencrypted string. It's not going to be secure. http://php.net/mcrypt -- Jasper Bryant-Greene Freelance web

Re: [PHP] Is PHP the language for me???

2005-09-24 Thread Jasper Bryant-Greene
classic ASP you can write VBScript or JScript, and in ASP.NET you can write VB.NET, JScript or C#. Both classic and .NET allow you to add additional languages of your choice with a bit of work. I still prefer PHP though; just thought I'd point out the difference... -- Jasper Bryant-G

Re: [PHP] basic user/input form questions... more validation!

2005-09-24 Thread Jasper Bryant-Greene
d extract the resulting data, and use the data in vars that i've defined to be the specific data type. And hopefully htmlspecialchars() it if you intend outputting it to the user's browser... -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP G

Re: [PHP] cache xml objects in php5

2005-09-26 Thread Jasper Bryant-Greene
n the memcached server (it can be on localhost for a single server setup, or for many servers it can be shared if the interconnects are fast enough). Then you can cache just about any PHP variable, including objects, in memory. -- Jasper Bryant-Greene Freelance web developer http://jasper.b

Re: [PHP] Optimal Regex?

2005-09-26 Thread Jasper Bryant-Greene
David Pollack wrote: Ok, so this is the actual code that I'm using. preg_match_all("/-?([\d]+)?(\.[\d]+)?/", $string, $matches); -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] cache xml objects in php5

2005-09-27 Thread Jasper Bryant-Greene
Rasmus Lerdorf wrote: Jasper Bryant-Greene wrote: Have you looked at memcache? http://www.php.net/manual/en/ref.memcache.php He did say that serialization wasn't an option and you can't use memcached without serializing. You may not realize you are serializing, but the memcache

Re: [PHP] why does this not work?

2005-09-27 Thread Jasper Bryant-Greene
eet switching entirely on the client anyway, but you might want to look at your CSS and see why exactly you need to do this, and if there's another way. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Jasper Bryant-Greene
d to something: $result = $site->Run(); -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Web Service Php - Currency Conversion

2005-09-28 Thread Jasper Bryant-Greene
Sylvain Gourvil wrote: I am looking of a webservice whiwh could permit to convert euro price in dollar and uk pounds on my php website ! http://pear.php.net/package/Services_ExchangeRates -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing

Re: [PHP] serializing result sets or what?

2005-09-28 Thread Jasper Bryant-Greene
situation is to benchmark. Go on, it won't take long! [1] http://php.net/apc -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] if string contains

2005-09-29 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains "searchenquiry=". $yourAnswer = ( strpos( $searchenquiry, 'searchenquiry=' ) !== false ); -- Jasper Bryant-Greene Freelance web developer http://jaspe

Re: [PHP] working with xml from a php file for xsl transformations

2005-09-29 Thread Jasper Bryant-Greene
g for a file called "menu_render.php?menu_id=4&format=xml" which doesn't exist. Try: $menu = file_get_contents( 'http://www.yoursite.com/yourpath/menu_render.php?menu_id=4&format=xml' ); -- Jasper Bryant-Greene Freelance web developer http://jasper.brya

Re: [PHP] function not returning anything via return$

2005-10-01 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: rdfpic2html( $rdfpicdata ); Shouldn't that be: $rdfpicdata = rdfpic2html( $rdfpicdata ); Since you haven't defined rdfpic2html as receiving its argument by reference... -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-g

Re: [PHP] session_name("CCLTrolley")

2005-10-01 Thread Jasper Bryant-Greene
been replaced by $_POST and $_SESSION, respectively. The manual will have more details. P.S. do folks prefer I reply on top or on bottom? Well, I can't speak for everyone else, but personally, bottom, as long as you trim your posts :) -- Jasper Bryant-Greene Freelance web deve

Re: [PHP] convert array to HTML GET request

2005-10-02 Thread Jasper Bryant-Greene
contents( "http://www.example.com/?$query"; ); // For POST, pass $query to curl_setopt for an HTTP POST (see CURL docs) ?> Disclaimer: I typed this from memory and haven't tested it, so there might be minor errors, but you get the picture. -- Jasper Bryant-Greene Freelance web deve

Re: [PHP] HTML Header Location - relative URI issue

2005-10-02 Thread Jasper Bryant-Greene
bsite if you do send a relative URI, as they are usually (albeit loosely) based around the standards, which require an absolute URI [1]. [1] http://w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP Ge

Re: [PHP] Can I call .html file as a form action instead of .php?

2005-10-03 Thread Jasper Bryant-Greene
n very occasionally be useful if you intend to do something with those parameters in JavaScript. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Handling competing edits in a wiki engine?

2005-10-03 Thread Jasper Bryant-Greene
se of transactions in an ACID-compliant storage engine like MySQL's InnoDB, if possible. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] chown function

2005-10-03 Thread Jasper Bryant-Greene
d trying the same command? More than likely the user apache is running as doesn't have permissions to chown -- in fact I believe that in order to chown files one must be root (at least that's the way it seems to work on my system). You could use chmod instead to allow the "admi

Re: [PHP] Warning: Cannot send session cookie

2005-10-04 Thread Jasper Bryant-Greene
ing to the list? Warning: Cannot send session cookie - headers already sent by (output started at /var/www/html2/thingstodo.html:2) in /var/www/html2/thingstodo.html on line 4 Warning: Cannot send session cache limiter - headers already sent -- Jasper Bryant-Greene Freelance web deve

Re: [PHP] session_name("CCLTrolley")

2005-10-04 Thread Jasper Bryant-Greene
ESSION['TrolleyContents'] as $value) if ($value == $mydata->RNum) { } } Why not replace the foreach and if combo inside the while with: if( array_search( $mydata->RNum, $_SESSION['TrolleyContents'] ) !== false ) { } -- Jasper Bryant-Greene Freelance web develo

Re: [PHP] caching parsed XML files as DOM objects in memory

2005-10-05 Thread Jasper Bryant-Greene
n it be done? This question seems to come up every other week on this list. Have a look at APC[1]; you can cache objects with its apc_store() and apc_fetch() functions. [1] http://php.net/apc -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP Genera

Re: [PHP] Detect file size BEFORE upload it

2005-10-05 Thread Jasper Bryant-Greene
server resources. Not possible unless you can write your own client app. Javascript etc.'s access to file controls is heavily restricted. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] caching parsed XML files... FALSE advice, still not working

2005-10-06 Thread Jasper Bryant-Greene
which you got that quote? I cannot find any words to that effect on either the php.net or pecl.php.net websites, but maybe I'm not looking hard enough... -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: var myFile = new File("c:\temp\myfile.txt"); myFile.open("r"); alert('myFile length: ' + myFile.getLength()); Somehow I don't think any browser is going to give JS access to arbitrary files on the user's system like that.

Re: [PHP] Re: Non-Javascript PHP Onsubmit function?

2005-10-07 Thread Jasper Bryant-Greene
firmation thing, provide the ability to undo changes instead. That way you don't piss off the advanced users who KNOW what they're doing, but you still allow the less advanced users to undo changes they "accidentally" make. -- Jasper Bryant-Greene Freelance web developer ht

Re: [PHP] Regular expressions

2005-10-09 Thread Jasper Bryant-Greene
/opendb.php"); //$sql = "UPDATE beskrivandeVarunamn=" . safeQuote($bNamn) . " WHERER" //mysql_close(); } ?> -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I want to know if some link is online

2005-10-09 Thread Jasper Bryant-Greene
cation: $muerto"); } You need to specify an absolute URI here (http://www.example.com/myimage.gif for example). -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getting php to generate a 503

2005-10-10 Thread Jasper Bryant-Greene
that you sent to it. The 503 status is a signal to the browser, and I don't believe either Firefox or IE pass that signal on. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can I call .html file as a form action instead of .php?

2005-10-10 Thread Jasper Bryant-Greene
ccess file in the root of your application. AddType application/x-httpd-php .html -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] object as function argument

2005-10-11 Thread Jasper Bryant-Greene
as taking that argument by reference (&$foo) unless you want to pass a copy of the object. It would have taken you less time to write a test script and see for yourself than to search the docs and then post to the list... -- Jasper Bryant-Greene Freelance web developer http://jasper.brya

Re: [PHP] help me in creating tables on the fly

2005-10-12 Thread Jasper Bryant-Greene
very helpful for you. Please don't just copy-paste the above table definitions, they're meant to be modified to suit your needs. I'll leave your other question to be answered by someone with experience of streaming audio from PHP, as I've never had occasion to do that. -- Jasp

Re: [PHP] Trouble moving directory

2005-10-12 Thread Jasper Bryant-Greene
); ?> Is there some way to escape the characters in the directories? For example if i put a "\" in front of blank spaces it takes care of those (same for "'","(" etc.) but that obviously doesn't take care of everything. I'm hoping there is somet

Re: [PHP] Problem with Javascript:...submit()

2005-10-12 Thread Jasper Bryant-Greene
he same thing happens. If you've got a row ID number or something, just call the form "lit[id]" (replacing [id] with the ID number), because I don't think a form name can start with a number. Otherwise you could sha1() the title and use that as the identifier, or simply remove all sp

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-14 Thread Jasper Bryant-Greene
jonathan wrote: the real characters (presumably è) won't render correctly. Are you outputting the correct character set information (UTF-8), and are you sure that UTF-8 is being used throughout the entire process? -- Jasper Bryant-Greene General Manager Album Limited a: Freepost Albu

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-15 Thread Jasper Bryant-Greene
aracters like è don't have any special meaning in XML, and they can be represented in the UTF-8 character set, so there's no need to convert them to entities at any stage. -- Jasper Bryant-Greene General Manager Album Limited a: Freepost Album, PO Box 579, Christchurch 8015, New Zeal

Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Jasper Bryant-Greene
going to be very confusing for users seeing the Acrobat toolbar floating in the middle of their page. It would be interesting to see some tests of PDF-in- done in various different browsers, but unless it just happened to work perfectly in every common browser (we can all dream, can't

Re: [PHP] win32service extension source code

2005-10-19 Thread Jasper Bryant-Greene
php.net/pecl/win32service/ -- 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] Re: No redirect with header()

2005-10-19 Thread Jasper Bryant-Greene
gt; > I know, but I don't want to post my tracking code. I am certain, > however, that it is not returning anything to the browser. The is at the top of the page, no echo, ... So just blank out the tracking code. I'm not sure how you expect us to help you if we can't see t

Re: [PHP] Putting Form Variables / URL Parameters in to an associative array?

2005-10-20 Thread Jasper Bryant-Greene
//php.net/parse_str -- 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] Executing process in background

2005-10-20 Thread Jasper Bryant-Greene
script regularly (how regular would depend on the specific app) to execute all the processes in the list. -- 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

Re: [PHP] SCRIPT_NAME

2005-10-20 Thread Jasper Bryant-Greene
ths http://php.net/parse_url for URLs -- 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 unsubscri

Re: [PHP] Declaring vars as INT ?

2005-10-21 Thread Jasper Bryant-Greene
it was me I'd probably treat it as a string. If you really *have* to treat it as a number, then use float and get all the precision errors that come with floating-point, or use binary coded decimal or another arbitrary precision system. -- Jasper Bryant-Greene General Manager Album Limited e:

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
d to use that degenerate platform, is that sometimes PHP is using a different php.ini from the one you thought it was using, f.x. if there has been an earler PHP install and someone's put php.ini in c:\windows\system32 or something. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
ne that you've been editing, and then move the one you've been editing around the following folder until you find the one in which it works: c:\php c:\windows c:\windows\system32 c:\ Horrible, isn't it? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Jasper Bryant-Greene
're using IIS, but is there a similar thing available through IIS's configuration? (I wouldn't know, I don't practise the dark arts...) -- 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] 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

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] 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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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
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-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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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

[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

[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

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

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] 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] 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

<    1   2   3   4   5   >