Re: [PHP] Re: Discussion of method -- config files

2008-06-20 Thread Iv Ray
Al wrote: I freely use defined constants for all fixed variables in my config file. It insures they cannot be inadvertently reassigned by a function someplace and are available everywhere. That's a good idea, I have been thinking about this. Never thought they have global scope, though - a g

Re: [PHP] download file from an ajax request

2008-06-20 Thread Iv Ray
Eric Butera wrote: The only thing I can think of is using JS to create some sort of IFRAME, meta redirect, window.location, or a popup window, something that will force the page to hit your download script directly. I've never attempted it myself so I'm not sure what sort of issues IE would have

Re: [PHP] PDF inline viewer

2008-06-20 Thread Iv Ray
Mário Gamito wrote: Hi, Does someone knows of a PHP software that is an inline PDF reader ? You can view the idea here: http://www.scribd.com/doc/2025925/Clinical-chemistry-II-Biomedical-Science-practical-1 Any help would be appreciated. Warm Regards, Mário Gamito What will happen if you ope

Re: [PHP] download file from an ajax request

2008-06-20 Thread Iv Ray
pere roca wrote: hi everybody! Hi! is there some way to allow downloading a PHP generated file from an ajax request? No idea, but would love to hear if/how you solved it. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] http response 200

2008-06-20 Thread Iv Ray
ryan gacusana wrote: here is my code when accessing this url http://localhost/podcast/podcast.php?mobile=0823172&message=2343443=%3Eryan This runs on your computer, I can't access it. else echo "Message has been sent successfully."; // in this part i want to respond with a status of 200,sorr

Re: [PHP] http response 200

2008-06-20 Thread Iv Ray
joaquinbordado wrote: > 'm a total newbie..i just want to know how can i display an http response 200 Don't have time to customize it for you, but that's how it can be done- header("HTTP/1.0 404 Not Found"); /* * * I copied the DOCTYPE from what Apache 1.3.34 returns. * */ echo ""; echo ""

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-20 Thread Iv Ray
Per Jessen wrote: Call me .. uh no, I'm getting sick ... you guys are so completely and utterly off-topic - please take it off-line. It was obviously off-topic from the beginning,... however it felt somehow OK... - I mean, it gave the list a personal touch and every successful organization dr

Re: [PHP] climb up the path

2008-06-19 Thread Iv Ray
Richard Heyes wrote: i need a way to get the path to the parent folder of the folder i am in. one "dirty" way i found is this - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "config.php"); i can also explode() and rea

Re: [PHP] climb up the path

2008-06-19 Thread Iv Ray
Jim Lucas wrote: > Iv Ray wrote: >> Jim Lucas wrote: > So, saying that it is outside the source does not tell me if it is > outside the document root. A, right. It is outside the document root. > Use your include_path php_ini setting A, right... Didn't think of it.

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Iv Ray
tedd wrote: Hi gang: More of a question of method rather than of "right" or "wrong" -- of the two methods mentioned here, which way would be "better" and why? Initially I used to access global variables using the "global" keyword - function foo() { global $bar; } However if the functi

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Iv Ray
Dan Joseph wrote: I guess the main problem is people don't realize that there are a LOT of things you can do in the military other than just taking a gun out into the field and firing at the enemy. If you want people to believe that mandatory service is a good thing, they have to do more to get

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
Jim Lucas wrote: Iv, tell me why you are wanting to do this? If it is the reason I think it is, I can give you a better way to accomplish this. I have the source and a configuration file, which I want outside the source - it is different from server to server. The easiest is to have the c

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
Stut wrote: $path = dirname(dirname(__FILE__)); That will get you the parent directory. -Stut A,... right! - me and my limited thinking... - dirname() gives the parent of a file AND of a directory, right. Thanks, Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
James Dempster wrote: > Personally I use. > > > I think it's what most people do. A... very interesting, thanks. To get the path only I did this - $path = dirname(__FILE__); $parts= explode(DIRECTORY_SEPARATOR, $path); array_pop($parts); $INSTALL_PATH = implode(DIRECTORY_SEPA

[PHP] climb up the path

2008-06-18 Thread Iv Ray
hi all, i need a way to get the path to the parent folder of the folder i am in. one "dirty" way i found is this - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "config.php"); i can also explode() and reassemble all

Re: [PHP] CAD file decoding

2008-06-18 Thread Iv Ray
Lester Caine wrote: > Has anybody seen any software that could be used with PHP to extract the > preview pictures from CAD files such as DXF and the like. I'm looking to > keep thumbnails of the drawings in much the same was as we generate > thumbnails of images. So I can display a list of preview

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Iv Ray
Ryan S wrote: Thanks for replying m8, but if you check the rest of the thread you will see this has alraedy been solved and the result is http://ezee.se/ezeeurl.php?do=1 Cheers! Ryan How do you protect this thing from being spammed? I do not know why somebody would spam it, but I have had al

Re: [PHP] PHPMailer not working but Squirell mail works

2008-06-13 Thread Iv Ray
Shiplu wrote: In my web server, I cant send mail by PHPMailer. What does this mean? Do you get an error message, etc.? Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] UK PHP Host/Developer Required

2008-06-13 Thread Iv Ray
Robin Vickery wrote: Out of hours technical support often gets billed at a punitive rate. Which is a bugger if their "out of hours" is your working day. It seems you haven't tried Rackspace (UK) yet. And while you might get tech support out of hours, accounts and billing usually keep normal o

Re: [PHP] class? package?

2008-06-13 Thread Iv Ray
Shelley wrote: I am working on a sns site, and now my practice is grouping classes of a function "classes of a function"... perhaps "classes related to certain functionality"? (i. e. subscription) together. When I need it, just load the "package": subscription. Right? ;) Hm... I do not k

Re: [PHP] UK PHP Host/Developer Required

2008-06-13 Thread Iv Ray
2. It's useful if the host company and the client keep the same office hours. If you have a hosting company with 9 to 5 office hours, you are dead, even if it is next door. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP connection to external application

2008-06-13 Thread Iv Ray
hce wrote: Let me first describe the requirement more: The C program is a major business server I would not connect applications on low level. I would think of a "web services" type of interface - http request and xml response (Steven suggested, for example, SOAP - but it does not need to b

Re: [PHP] class? package?

2008-06-12 Thread Iv Ray
Shelley wrote: Probably you have noticed this: The classes in a package are reused together. If you reuse one of the classes in a package, you reuse them all. If that's the case, then why not just use one class as one package? What's the point of splitting a package into several classes? :-(

Re: [PHP] class? package?

2008-06-10 Thread Iv Ray
If you are designing with OO principles, could you give an explanation of what is the difference classes and packages? A class is a language construct, classes are processed/executed by php. A package is an architectural approach - this is how you combine your code/classes. When I was summa

Re: [PHP] Bulk Email Problems

2008-06-10 Thread Iv Ray
Hi Andre, I am not sure I understand what is the problem. What does it mean - that worked fine for the last few years resulting in many requests for forgotten passwords and renewed site activity. And what does it mean - Last year, we sent it again, after a few minor code changes, and had no

Re: [PHP] use of static methods after namespaces arrive

2008-05-28 Thread Iv Ray
Adam Richardson wrote: If the functionality doesn't conceptually promote the inclusion of the variables it works on (i.e., no class variables), doesn't conceptually fit a scheme where instances can exist, and likely won't benefit from refactoring into component methods, then I could see using a

Re: [PHP] OT Smarty problem

2008-05-28 Thread Iv Ray
Gabriel Sosa wrote: > try doing this.. > > {if $clearance eq 0} > > instead use == > > i saw that some version of smarty has a bug related to this issue > > BTW .. you could use the options helper [1] > > saludos > gabriel Right... I forgot to ask which Smarty version you have. I tried it with t

Re: [PHP] OT Smarty problem

2008-05-28 Thread Iv Ray
Hi George, I tried your code and it works. If you have some way of remote assistance I can have a look "on-site", if you like. But it could be that you just need a good sleep, and then look again ;) Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] use of static methods after namespaces arrive

2008-05-28 Thread Iv Ray
In which situation would somebody use a static method, instead of a function in a namespace, after the namespaces arrive with 5.3? Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XML file locking

2008-05-19 Thread Iv Ray
bruce wrote: Couldn't you also create a rather simple test to determine if the locking of the file takes place? I personally do not trust file system level locks. Even if a software is not intended to be portable across operating systems, it is possible to use different file systems under th

Re: [PHP] XML file locking

2008-05-19 Thread Iv Ray
Kaja wrote: Does anyone know if any of the PHP 5 XML libraries use flock() internally? I'd like to use XMLReader and XMLWriter but I need to make sure theres no writing going on while reading and no more than one writer at time. And if I have to use DOM, does DOM lock the file when it calls sa

Re: [PHP] SetEnv directives in VirtualHost configuration not accessible in PHP

2008-05-16 Thread Iv Ray
I had similar problem some time ago, and there was some solution, which I can't remember now. Do you still have the problem? I'll can have a look, if still needed. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question about validation and sql injection

2008-05-16 Thread Iv Ray
Hej Sudhakar, what a long e-mail ;) ! I would suggest you use e-mail address as user name. There are many good reasons why to do so, I will give you some, if you wish. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
Jason Murray wrote: I am assuming that each time you click the up or down arrow you are re-loading the page (via a GET request). A simple solution to this, would be to adjust the URLs assigned to the up and down arrows to carry an extra variable, the item either directly above or directly below

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
afan pasalic wrote: > But, actually, I need something more simple. Nothing "fancy" :D. I thought so from the beginning, just thought - it does not hurt to show different possibilities. May be you will not implement it now, but when you know about it, it might give you ideas in future. -- --

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
Eric Butera wrote: I use this: http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html Looks good. I still can't decide for one of these "big" libraries, prefer to use "small" things which I can fix/change, if the author does not have time or desire. -- -- PHP General Mailing Li

Re: [PHP] changing order of items

2008-05-15 Thread Iv Ray
afan pasalic wrote: this one bugs me for a while. how to change order. I have a list of tasks. by status, task could be 1 (todo) or 0 (done) - status value stored in mysql. I can list tasks per status or all. order number is stored in mysql too. the easiest way to change order is to have form fo

Re: [PHP] Working with internal data formats

2008-05-15 Thread Iv Ray
John Gunther wrote: > Example: I extract the 8 bytes 40 58 FF 5C 28 F5 C2 8F from > an external file You mean you "extract" "40 58 FF 5C 28 F5 C2 8F", so to speak, as a string, right? Sorry, for asking, but somehow I do not the case. -- -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Working with internal data formats

2008-05-15 Thread Iv Ray
John Gunther wrote: > What technique can I use to take an 8-byte double precision value, as > stored internally, and assign its value to a PHP float variable without > having the bytes misinterpreted as a character string. Does it get misinterpreted, or do you just want to be sure? The documenta

Re: [PHP] the class as a namespace

2008-05-15 Thread Iv Ray
Richard Heyes wrote: > That's a common use of static classes. Eg: > > HTTP::Redirect($url); > > In fact this (from the article I've read) is exactly how namespaces will > look like. So in the above example, HTTP could be either a namespace or > a class. Right. Namespaces do look similar. And PEAR

Re: [PHP] Can I install a newer version of php over an older version

2008-05-15 Thread Iv Ray
Tony M wrote: > Can I install a newer version of php over an older version? Perhaps what you need is this - "Upgrading PHP with the Install To upgrade, run the installer either graphically or from the command line as normal. The installer will read your current install options, remove your ol

Re: [PHP] Using SVN w/ Zend Studio for Eclipse

2008-05-15 Thread Iv Ray
> I do not want to copy the project into a new > directory as the existing directory is where Apache's DocumentRoot is > set. And although that's simple to change, I really don't think any > IDE should mandate where I set my project's directory on the > filesystem. I use PDT, and there is no prob

[PHP] the class as a namespace

2008-05-15 Thread Iv Ray
Is there a notion of the class as a namespace? My understanding is that the namespaces are intended to help organize the classes in large projects (and are not perfect). Is it considered good style to use a class simply to box related functions? For instance, a class called "files", contains

Re: [PHP] validating using php

2008-05-14 Thread Iv Ray
Sudhakar wrote: > if( strlen(trim($name) == 0 ) || !preg_match('/^[a-zA-Z ]+$/x', $name) ) > { > $error.="Name is blank or has special characters "; > } You have messed up the brackets. This - strlen(trim($name) == 0 ) should be - strlen(trim($name)) == 0 Then the script does what you want.

Re: [PHP] validating textarea using php

2008-05-13 Thread Iv Ray
Sudhakar wrote: > i do not want > this to happen, if a user simply hits the spacebar and does not type > anything i should be able to display an alert message. From usability point of view such check will, in many cases, generate annoyance, and bring nothing. If I do not want to enter anything

[PHP] getting iostat -x %b with php

2008-05-06 Thread Iv Ray
What is the best way to extract just the drive load information (%b column) from "iostat -x" (on FreeBSD)? I imagine to exec() the "iostat -x" and then process the result with regex, but I am not sure if this is the best way - for instance, is %b is aways the Nth column in the returned value?