[PHP] Integrating Perl into PHP

2003-11-21 Thread Dan Anderson
Is it possible to execute perl from a PHP script without resorting to a system call (which might possibly be disabled on a users system)? Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Extracting Source code from Binary Files(.dll,.exe.,class)

2003-11-13 Thread Dan Anderson
> Is it Right or i am going somewhere illogical? Basically, source code is a convenient way to represent in a human readable form what the machine is supposed to do. Unless you happen to be debugging it is unlikely that the source code will be saved within the compiled file. The problem

Re: [PHP] Problems using gethostbyname() to resolve *.net.au

2003-11-03 Thread Dan Anderson
> If you're going to ask for help, you should take it in whatever form it > comes. Perhaps he wasn't answering your primary question, but just stating > how it is possible to not have a ping request returned by a valid address. > In which case he is quite right. I am thankful he answered my quest

Re: [PHP] Problems using gethostbyname() to resolve *.net.au

2003-11-03 Thread Dan Anderson
> the firewall is configured to block pings from outside - security reasons - so > called stealth mode No, you are wrong. gethostbyname($hostname) correctly resolves my servers, and I have disabled pings for security reasons. gethostbyname($hostname) has nothing to do with pings as a matter of

[PHP] Problems using gethostbyname() to resolve *.net.au

2003-11-03 Thread Dan Anderson
Some domain names on .net.au are not being resolved when I use gethostbyname. I can whois them on http://whois.ausregistry.net.au/and fine them, but they can't be pinged. Anybody know why this might be? Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Quick question: PHP user?

2003-10-10 Thread Dan Anderson
> Just a quick question... What user does php run as on linux? It all depends on how PHP is set up. Do something like: $fff = fopen ("./temp","w"); fwrite($fff,"testing"); fclose($fff); in a directory chmod 777. Look at the user id. (For what it's worth on my system its UID 518). -Dan -

Re: [PHP] CSV file with PHP

2003-10-10 Thread Dan Anderson
You could do something like: $result = mysql_query($query) or die(mysql_error()); // don't display errors on production machines $first = TRUE; while ($line = mysql_fetch_array($result)) { if ($first) { foreach ($line as $key => $value) { if ($first) { fwrite($f

[PHP] Anybody know of a good web site on how to create P3P privacy policies?

2003-10-06 Thread Dan Anderson
Does anyone know of a good web site on how to create a P3P Privacy policy? When I googled I kept getting other people privacy policies and proprietary tools. Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO parent/child relationship

2003-10-05 Thread Dan Anderson
Out of curiousity, what exactly are you trying to do? Are you sure this type of framework is most appropriate (and easiest to implement?) -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO parent/child relationship

2003-10-05 Thread Dan Anderson
> Im looking to verify some behaviour Im running into. > When a child extends a parent, from that point on, the parent, has no idea, > on what the child is capable of, or what it contains. > Is that a "real" parent??? ;) No but if you really wanted to you could create a framework for paren

Re: [PHP] returning a variable from a class function? plus otherprobs

2003-10-04 Thread Dan Anderson
> up until now! Dumb now I realize, thanks for pointing that out. I've > created a new root pwd, and created a user with access only to the "alumni" If you want to be super secure you should create several users. Once for SELECTing, one for INSERTing, etc. Juggling resource handles gets tricky

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
> Using ' is prefered IIRC, and also escaping all the data before sending > it to the database: Hmmm. Perhaps Emacs isn't converting from Unicode to ASCII properly? ::shrugs:: I just know sometimes my queries don't work if I use ' . -Dan -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
A couple of things... > $conxn = mysql_connect('localhost','root','redtail.7') or fail("Could > not connect: ".mysql_error()); Create a script inc.mysqlconnect.php that connects and selects and require_once() it on all of your files that need to connect to the database. This will sav

Re: [PHP] Does the AOL browser break any standards?

2003-09-29 Thread Dan Anderson
> Aside from it being OT, how can you expect anyone to help, if even you don't > know (can't describe) what the problem is? Well I was mostly looking for known issues. For instance IE has some problems if you try and do certain things, so I figured AOL's browser might do the same. For instance,

RE: [PHP] Does the AOL browser break any standards?

2003-09-29 Thread Dan Anderson
> And this is a PHP problem how? Well the script is coded within PHP. I probably should have put an OT: on the first line of the subject. But I figured that some kind soul may be willing to help and let me know if there is something I am missing. -Dan -- PHP General Mailing List (http://www.p

Re: [PHP] Does the AOL browser break any standards?

2003-09-29 Thread Dan Anderson
. -Dan On Mon, 2003-09-29 at 12:47, Larry Rosenman wrote: > --On Monday, September 29, 2003 12:43:06 -0400 Dan Anderson > <[EMAIL PROTECTED]> wrote: > > >> AOL uses IE libraries, so yes, it breaks as many standards as it can. > >> What specific symptoms are use

Re: [PHP] Does the AOL browser break any standards?

2003-09-29 Thread Dan Anderson
> AOL uses IE libraries, so yes, it breaks as many standards as it can. What > specific symptoms are users reporting? Users can't access the web page at all. They are getting some kind of error. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

[PHP] Does the AOL browser break any standards?

2003-09-29 Thread Dan Anderson
I am having problems with one of the web sites I have -- AOL users are reporting they can't view it. Does AOL break any major standards it shouldn't? p.s. the page is at http://www.mathjunkies.com/jtlinks/jtlinks_interface.php if you feel like taking a look. :-D Thanks in advance, Dan -- PHP

[PHP] Integrating Various Languages in PHP

2003-09-26 Thread Dan Anderson
I just picked up a copy of the PHP Architect magazine this month (http://www.phparch.com) and they had an article about compiling PHP in such a way that you can call Java code from within PHP. How many other languages does PHP support like this? Can I use Perl, C++, or other languages without any

[PHP] CSS Question

2003-09-24 Thread Dan Anderson
Can anyone either recommend a good mailing list to discuss CSS style sheets or answer the following question? When I call BACKGROUND-COLOR: #??; and COLOR: #??; on a file input: () both the part which shows the file and the "Browse" button get colored. Is there any way to specify "Button

Re: [PHP] PHP email message composing

2003-09-24 Thread Dan Anderson
Instead of putting your message in your code like that, why not just put it in a seperate text file and do: $message = implode(" ", file("./message")); ? This will make your code look cleaner. So you could create something like: $message = implode(" ", file("./message1")); if (isset($checkbox[0

Re: [PHP] sql faq

2003-09-24 Thread Dan Anderson
I just wanted to add that if you don't need all the information in MaeSocio or MaeSeguro when doing a select, it is best to use: SELECT NroSocio, whatever else you need FROM MaeSeguro; -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sql faq

2003-09-24 Thread Dan Anderson
On Wed, 2003-09-24 at 12:30, Jonatan Pugliese. wrote: > select MaeSocio.* from MaeSocio > LEFT JOIN MaeSeguro ON MaeSocio.NroSocio=MaeSeguro.NroSocio > where MaeSeguro.NroSocio is null > > MaeSeguro.NroSocio is not null > > count(*) MaeSocio = 354000 > count(*) MaeSeguro=108000 > > how i can ret

[PHP] Accellerators and Encryptors: Taking Scripts to the Next Level

2003-09-24 Thread Dan Anderson
On this listserv I have heard quite a bit of talk about "accelerators". And I have also seen some advertisements about "Encryptors" -- letting PHP code be sold in a byte compiled type form so your clients can't pirate your scripts. Do these things work? And if they do, can you re

Re: [PHP] mySQL vs pgSQL | php vs others

2003-09-24 Thread Dan Anderson
> Is pgsql , better ? faster ? more reliable than mysql ? I won't speculate on which one is faster (although I think both camps would claim ownership of the trump card). But Postgresql does conform closer to the SQL standard, and there are a number of features available in it that are not

Re: [PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Dan Anderson
HTTP 1.1 says the following: 1. Client (with web browser) sends GET request to server. 2. Server responds with something like: Content-type: text/html Content-size:...blah...blah...blah 3. Server sends the web page. The header is sent on #2. What is happening is that somewhere in the code

Re: [PHP] IP to Postal Code CSV? anyone messed around with this and PHP

2003-09-23 Thread Dan Anderson
> If you find a good public free resource which is > frequently updated (as it would need to be as the Internet is always > changing) then please let me know. I have been unable to find something > and have looked on multiple occasions. Please let me know too. I think that the resources

Re: [PHP] PHP Editor - which to use?

2003-09-22 Thread Dan Anderson
> Best PHP Editor on the market: called "Notepad". Written by a tiny little > software dev company called Microsoft. Very nicely written, compared to the rest > of their software. You must either be insane, a genius, or joking. I couldn't imagine writing code without context sensitive highlight

RE: [PHP] non-php issue

2003-09-22 Thread Dan Anderson
Yes, it is possible to secure anything if you know what you are doing. But the average user doesn't know what he or she is doing. So they run their computer as the superuser because they don't want to have to log off and back on to install a program, and all of a sudden any virus that com

[PHP] How to get the Web Address of the Script

2003-09-20 Thread Dan Anderson
I am creating a script and there is an autoconfig file. I want to read in the web address of the server, and throw some correct URLs into the database. Will using $_SERVER['HTTP_HOST'] guarantee getting me the domain name of the server on which the web page I am viewing is hosted? I am somewha

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
I find your responses to my e-mails quite humorous. Upon review -- aside from a single WTF -- I don't think I was condescending in any way shape or form. I was just trying to offer help. After reading about wrappers, I find it doubly humorous that you didn't just disregard my e-mail when I asked

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
One more thing: gdb doesn't do a damned thing for debugging PHP scripts. Look for the errors and warnings output to the browser. (or tty if you're using /usr/bin/php). -Dan On Sat, 2003-09-20 at 00:33, Robert Cummings wrote: > I wanted t play around with the CGI (not CLI) version of PHP and

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
Why are you using php:// below? If stdin is a file './stdin' will suffice (or the path instead of ./). If you want to run the PHP script in stdin you should use one of the following: include() include_once() require() require_once() See the manual at php.net for pertinent sections... > if( ($

[PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread Dan Anderson
I am learning perl and my book describes "boolean short circuiting". Basically: function1() OR function2(); (function2 never is evaluated if function1 is true). Will this work in PHP for any function? Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Reading URL is changed

2003-09-19 Thread Dan Anderson
First of all, you can use Javascript to submit a form when the link is pressed. Andu has a good idea too, but I figured I'd elaborate: If you create a form like: The browser visits the URL: http://www.foo.com?foo=bar&bar=foo This is called GET method in a form. Do a google search.

Re: [PHP] Session with various Browser.

2003-09-18 Thread Dan Anderson
Try running newer browsers. I'd be curious how everything handles with Netscape 7 or the newest incarnation of IE. -Dan On Thu, 2003-09-18 at 22:53, Harry Yau wrote: > Hi all, > I am new to php. At first, I wrote a php script to generate a pdf > file from a tex file and load that pdf file to

Re: [PHP] Mathematical differences?!

2003-09-18 Thread Dan Anderson
Without spending a lot of time looking at your problem I would speculate this is the result of round off error. What is roundoff error you ask? Well the number 0.6255264658909423 does not designate 0.6255264658909423... but 0.6255264658909423 and some fraction that could not be displa

[PHP] Need Help With gethostbyname()

2003-09-17 Thread Dan Anderson
I have a section of my script where I call gethostbyname($hostname) . For some host names that are not registered (according to register.com) I am still getting an IP address returned? What is happening? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> These gatherings are most likely for people sponsored by their employers, don't > imagine participants come out of it $500 smarter then they went in. If it makes Well I suppose that depends on exactly what you are looking to get out of it. Conferences can be many things. For instance, you have

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> ah like with 4 kids I have nothing better to do than run down and grab a > book and evaluate my parenting skills. It's not about parenting but about money management. It's pretty cool and shows you how to minimize taxes (so the govn't gets less then 40%). > umm I take it you dont have kids and

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> Unless I'm missing out on all the gold (which is a possibility), speakers > usually get a very modest honorarium and their expenses paid. I can't imagine > that speakers are the most significant cost of a conference. Well it does depend on the fame (or infamy) of the speaker. If you want Bill C

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> Yea its not bad if you dont have a life outside of programming and/or > computers Well most professionals who would go to this conference -- IMHO -- would be doing it because it would be worth while. For instance, I considered going because if it reduced the time it takes for me to develop softw

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> The pricing seems insane, and geared towards people with lots of > spare money... ::snip:: > but I'm not going to shell out $495 (the cheapest non-student If you consider the average salary for a computer programmer is probably $40k - $50k (at least in the US) this is not insane. (Heck, it's

[PHP] Is the "PHP List Automoderator" a spam bot?

2003-09-15 Thread Dan Anderson
I just got an email from some daemon claiming to be the "PHP List Automoderator" asking me to reply before my e-mail could be sent to the list. I assume that this is a spam bot. Anybody else having this problem? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] MS-SQL 2000 weird problem

2003-09-15 Thread Dan Anderson
> Any thoughts? Are you dying and outputting an error where something could happen to bodge up the server? I'm not familiar with MS SQL Server, but I know under mysql: -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread Dan Anderson
I am running a script that occasionally utters a few warnings when the user does something dumb (but it does not kill the script). Is there a way to turn off warnings within a script? I really don't want my users to see them. Thanks in advance, Dan Anderson -- PHP General Mailing List

[PHP] Verifying E-mail Addresses

2003-09-14 Thread Dan Anderson
I'm having a problem with e-mail addresses entered by users that are invalid (i.e. $email == "some person at somewhere.com"). Is there a function I could call like: Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mozilla and german 'Umlaute'

2003-09-13 Thread Dan Anderson
> Does anyone know this problem? Does someone have a solution for this? You are probably using UTF16 (or is it called UTF8?) encoding which allows many spiffier things then ASCII. There are functions to allow conversion between UTF and ASCII. I ran into this problem when a spanish client tried u

Re: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
site with an Iframe, and having no problems with recent > > releases of Netscape, older releases are a problem, even with IE. > > > > I have another site that does WYSIWYG editing in IE and provides a TEXTAREA for > > those NS users who insist on using stone axes, and it present

RE: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
> I am implementing a site with an Iframe, and having no problems with recent releases > of Netscape, older releases are a problem, even with IE. Try running Netscape 7.1 on Linux and the iframe may be broken under certain conditions. As always, your mileage may vary, and they may have patched

Re: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
> why does it work in IE and not in Netscape 7.1? I'm pretty sure ActiveX controls don't run on anything besides MS Windows Lockinware (TM). There are a number of other things that netscape does not fully support (try loading a page with an iframe tag in Netscape). You probably ran into another

RE: [PHP] loading classes and efficiency

2003-09-11 Thread Dan Anderson
> woah u kiddin me ? i'm sure i edited a function in a functions file which > wasnt executed and it still got parsed (spat out errors) Well connecting to a database, etc. does take overhead above and beyond a function. So yes, it does save resources to include it. And I am not completely sure of

RE: [PHP] Escaping the " ' " character

2003-09-11 Thread Dan Anderson
> You've completely misread and misinterpreted Robert's comments. He > didn't say he didn't want to read posts he wasn't interested in and he > didn't ask the poster to not post things he wasn't interested in > reading. He DID however request that people not send html emails to the > list. Oh wait

RE: [PHP] loading classes and efficiency

2003-09-11 Thread Dan Anderson
> The way I understand it (maybe you know something I don't?) > require/include_once only prevent an included file from being included > MORE than one time, hence the character string _once tacked onto the end > of include() and require(). > > It does NOT however include a file only when it's need

Re: [PHP] Attention Moderator - Autoresponder Needs Unsubing from list

2003-09-11 Thread Dan Anderson
I get the same. (Although [EMAIL PROTECTED] is now being filtered to the trash. :-D ) -Dan On Thu, 2003-09-11 at 07:34, Jay Blanchard wrote: > Each time I send/respond I get an autoresponder from (major snippage to > header) > > Received: from lns.hs.ro (lns.hs.ro [194.102.195.10]) > Received

Re: [PHP] loading classes and efficiency

2003-09-10 Thread Dan Anderson
> Hi there i was wondering is it more efficient to load class files and > objects when needed per page or is it ok to include them in my main include > file ? require_once() or include_once() The files containing the class files before you need them. They will only be loaded when needed that way

Re: [PHP] Escaping the " ' " character

2003-09-10 Thread Dan Anderson
> I believe the general posting guidelines discourage posting HTML to > mailing lists, and to be quite honest many of us pay for our bandwidth > and don't need your 8k image eating up resources. If you don't like somebodys post just ignore it. I'd bet your 2 cents that you don't find every post t

RE: [PHP] Looking for a real good editor with some specific featrues ...

2003-09-10 Thread Dan Anderson
60% of what makes an editor good is familiarity. Take emacs for instance (http://www.gnu.org/software/emacs/emacs.html). Running PHP Mode (http://sourceforge.net/projects/php-mode/) I fly through code. But I've also spent quite a lot of time memorizing the zillion or so commands to do things aut

RE: [PHP] Upload seems to time out over 7.5 M

2003-09-10 Thread Dan Anderson
> In the php.ini file set this value? I believe so. If safe mode isn't stopping you from doign so you should be able to set_time_limit manually. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Upload seems to time out over 7.5 M

2003-09-10 Thread Dan Anderson
try: set_time_limit(0); // don't time out. By default, if it takes more then 30 seconds (or is it 60?) to execute a web page PHP kills the script. -Dan On Wed, 2003-09-10 at 14:15, Lou Parmelee wrote: > Hello all, > > I couldn't upload any files larger than 2M. So I searched around an

[PHP] Multiple Forms

2003-09-09 Thread Dan Anderson
Is it possible to tell a browser to send form a to URL a and form b to URL b? (i.e. post to two different URLS) Thanks, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dynamic Form checking

2003-09-08 Thread Dan Anderson
if $quantity isn't filled you get NULL or FALSE. so you could use: if ($_POST['variable']) etc. Try posting less code and more question to the list. Nobody's going to wade through 5 pages of code to analyze it and give you an answer. -Dan On Mon, 2003-09-08 at 03:41, Aris Santillan wrote: >

Re: [PHP] upload problems

2003-09-08 Thread Dan Anderson
If you go to the PHP site they have a nice section on file uploads: http://us2.php.net/features.file-upload Double check that $_FILES['cat1_thumb']['error'] == 0 See: http://us2.php.net/manual/en/features.file-upload.errors.php -Dan -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] Creating a Calender

2003-09-08 Thread Dan Anderson
Does anybody know how to generate calendars easily? (i.e. print out complete calenders from the current month on) Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form data

2003-09-08 Thread Dan Anderson
Forget about cookies and sessions (because cookies are evil). The way I do something like this is: $value) { if (!(($key == 'dont_save') OR ($key == 'dont_save_2'))) { hidden($key, $value); } } function hidden($key, $value) // saves lots of time { print "\n"; } ?> Then you can keep i

RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Dan Anderson
> OMG! PHP > is slower. The difference is .035 seconds. Does this matter? Who is > asking which is faster? Why do they care? Are they looking for a reason > to choose one technology over another? I totally agree with you, but I find it funny that many times when talking to people they

Re: [PHP] Remove vars from memory?

2003-09-07 Thread Dan Anderson
> Note that you don't technically need to worry about it but if you are > going to work with other languages it is a good habit to get into. > Also I have noticed a significant performance increase in scripts that > are coded more cleanly, if you don't need a variable anymore unset() > it. Well y

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
> I'll try finding these things in i786, thanks for the help! Well you don't need an i786 and probably won't find one. i786 means you can use it if you have a PIV but not a PIII -- basically it takes advantage of architecture specific things. You could use an i586 or i686 or i386 fine -- you jus

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
> When downloading Linux ISOs or whatever, which do I need? What is the > difference between i386, PPC, and all those other exactly? How do I know > which I need? This may be the source of your problems. i386, PPC, etc. are architectures: i386: x386 or higher i586: Pentium II or higher (or equiv

Re: [PHP] Running PHP scripts in PHP Nuke

2003-09-07 Thread Dan Anderson
> You need to be more specific. What error do you get? I don't get any error. It will ask me for the HTML code to the page and just not work. So I'm assuming that instead of being processed by Apache and a preprocessor that can send it to PHP it's being printed to the screen. -Dan -- PHP Gen

Re: [PHP] Linux Issues

2003-09-06 Thread Dan Anderson
Oh also make sure you are using /9.1/ and NOT /9.2 RC1/! -Dan On Sat, 2003-09-06 at 22:51, Stephen Craton wrote: > Hello, > > This isn't really a PHP issue but I have no where else to go to get help really. > Hopefully someone here can still help me. > > I am running Windows XP and have deci

Re: [PHP] Linux Issues

2003-09-06 Thread Dan Anderson
> I went to the online manual for Mandrake and it said to add the text "noauto" which > I did for the boot sequence. Same error. Any ideas what's going on and how to fix it? Did you run an md5 sum of your burnt isos? What about double checking the burnt CD against the iso? Try redownloading and

[PHP] Running PHP scripts in PHP Nuke

2003-09-06 Thread Dan Anderson
PHP nuke page? Thanks, Dan Anderson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function calling from url

2003-09-06 Thread Dan Anderson
I know what you're trying to do you just don't quite know how to say it... I use something like: if ($_GET['somevar'] AND $_GET['something_else']) { do_something($_GET['somevar'], $_GET['something_else']); } else { output_error_message(); } -Dan On Sat, 2003-09-06 at 13:19, Robin Kopetzky wr

Re: [PHP] Remove vars from memory?

2003-09-06 Thread Dan Anderson
> yes, you must use unset() to remove a variable, otherwise it will stay > for the duration of the script. Don't worry about memory management if you're going to use PHP. The point of using a high level language like PHP is you can just ignore it. Let's say you decided to: if ($temp) { /* some

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
> While multiple connections will just return the first connection, anyhow, > why do the extra work, right? Yes that was what I was thinking. But I was also thinking that I would need to global the $link and $db variables and run mysql_query() with them in options. So I'm wondering how much work

[PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
I'm trying to figure out ways to tweak my scripts for performance. I've figured out that all mySQL queries should use indexed ids for speed. (For anyone who doesn't know: mySQL indexes fields with PRIMARY KEY, UNIQUE, or AUTO_INCREMENT in them. This means they're stored in binary trees internall

Re: [PHP] POST security

2003-09-05 Thread Dan Anderson
Be careful about hidden variables and form variables. A clever user can create a new form with custom edited fields and ACTION="yoursite.com" For instance, if you keep a hidden variable: It's not very hard for a computer saavy person to create a new form where it says: And circumvent your

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Dan Anderson
> [snip] > How can I get IP Address from my connection ppp0 or ppp1 in Linux? What > 's the function? > [/snip] Well, you can (if I'm not mistaken) create PHP modules using C++. You could also create shell scripts you could exec(). PHP isn't really meant to be a server control though. So anyth

Re: [PHP] Refreshing After Submitting a From

2003-09-03 Thread Dan Anderson
> Does anyone have any ideas on how I could do this? Is there any reason you can't throw a refresh command into a header before any data is sent? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] installing php5

2003-09-03 Thread Dan Anderson
> Has anyone an idea, what I could do? You might be better off joining the beta testing mailing list if one exists. Many PHP 5 questions don't get much attention here for whatever reasons. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

[PHP] if else while statement speed

2003-09-03 Thread Dan Anderson
I have a function where I have: would it be quicker to do the above code or: if ($option1) { while(something()) { do_1(); } } elseif ($option2) { while (something()) { do_2(); } } // ... continue for 10 or more options... Thanks, Dan -- PHP General Mailing List (http://www.php.net

Re: [PHP] Block HTML Control

2003-09-02 Thread Dan Anderson
You do realize that you don't need a semicolon right after Seth, > try to mingle PHP and HTML.. that means escape the PHP and jump to HTML > when > you want the HTML.. like this... > > > if (!$var) { > ?> > > > ; > } else { >

Re: [PHP] opening remote tar.gz files

2003-09-02 Thread Dan Anderson
There are a number of possible solutions. If i remember correctly some compressed file types need the ability to handle them compiled into PHP. Try different things. Sometimes the easiest way to do things is to FTP into the remote server and ftp into your server to transfer it. -Dan -- PHP Ge

Re: [PHP] Backup Database

2003-09-02 Thread Dan Anderson
Do some googling. I keep seeing this on the listserv and there has to be a free/opensource one out there somewhere. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read / unread system for my forum

2003-09-02 Thread Dan Anderson
> i'm coding a little forum an now i want to make a read / unread system for > the new posts and topics. > Can anybody explain to me, how I can do that? I'm not sure what you mean, do you mean let each users mark messages as read or not read? Well, if you don't mind the space in a mySQL database

Re: [PHP] Re: Copy database from MySQL to MSAccess

2003-09-02 Thread Dan Anderson
> server. So I'm actually never gonna use Access, it's just the database I'm > using for storage of data. Well ODBC implies that you are going to have a database program (i.e. Oracle, SQL Server, Access, whatever) to connect to. At least that's how I understand it to work. So if you don't have a

Re: [PHP] Restart Apache with PHP???

2003-09-02 Thread Dan Anderson
Search the archives. Somebody wanted to restart their server using a web page, and a clever solution was pointed out. By creating a script that monitored for a particular file in temp and restarted the server if it existed it, and cronning it for every minute, they could do it safely and securely

Re: [PHP] Can't Connect Within Function?!

2003-09-01 Thread Dan Anderson
add this in the 1st line of the body of the function: global $shs_MySQLServer; global $shs_MySQLUser; global $shs_MySQLPassword; On Mon, 2003-09-01 at 14:20, Seth Willits wrote: > If I try to connect to a database within a function, I get the > following error. Why is this? > > > MySQL Connec

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Dan Anderson
> Better to do this in an .htaccess file, so you don't incur PHP processing > overhead on the entire server (if there are others using it). Apache suggests not using .htaccess files at all because they require a recursive traversing of directories looking for .htaccess files, because some supersed

Re: [PHP] Content of Variable ist html code

2003-08-24 Thread Dan Anderson
I'm not sure what you're asking but... Using htmlentities() and undohtmlentities() (look up the real functions) to data going into and out of your database will allow you to store it without getting lots of errors... mySQL storage (even TEXT and BLOB types) can't be larger then so many bytes (sys

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
While I'm still on my soapbox... There are a number of great books out there on object oriented programming. Basically the idea is to take a top down approach -- decide what components makes up what you want to do, what components make up those components, and so on until you can program

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
> Hmm.. Although this sounds like a good idea at first, it seems like it > would get pretty complicated really fast. Am I missing something? Well the idea is that on very large programs you create a number of different components that can be used and changed independently. To give you an

Re: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
You want to break off things into as many functions and components as possible. The idea is that if you want to change the way tables are displayed with the data, for instance, you can't break the way data is queried. I usually have a bunch of different files like "inc.function.something.php" and

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> 1. I can see that you have issues with anger. Have you thought about > seeing a therapist? If you see me as angry you're reading wyyy too much into these e-mails. I'm trying to educate... > 2. So because other lists aren't doing it, this one shouldn't also? I > wonder, would you ju

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> Second, it would be better if the list owners would do something about > it. Sure, I absolutely agree with you. But there are a lot of lists /not/ doing anything about it. So whatever. Don't spend a half hour bitching about the spam -- spend 5 minutes blocking it and be done with it. -Dan

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> Blocking the users is not solving the issue... Don't just block random users. Create a rule something like: if (sender contains POSTMASTER or MAILER or DAEMON) AND (cc, to, or bcc contains [EMAIL PROTECTED]) DELETE Doing things like this, adding in filters like "if subject contains VIRUS" a

Re: [PHP] This is getting rediculus

2003-08-20 Thread Dan Anderson
> This is fine an dandy but this problem needs to be resolved. not > ignored!!! What a brilliant idea! I'll tell you what, you start in the Eastern United States and tell everyone to use something besides Windows and I'll start in the Western United states. We'll meet up somewhere in the Great

Re: [PHP] This is getting rediculus

2003-08-20 Thread Dan Anderson
Just throw up a filter deleting messages and threads from anybody you don't like. This can include obnoxious users, or mailer daemons (gets rid of all the worm garbage). -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] calling a user defined java class method .....

2003-08-20 Thread Dan Anderson
> i am trying to call, in php , a java class method which happens to > be my own as well user defined that is > > how do i go about this > and that also if its possible at all . Well you could use exec("") to execute a shell command. Of course, that is /if/ safemode isn't enabled.

  1   2   >