[PHP] New Server, Bad Attitude

2002-04-03 Thread Liam Gibbs
My friends' server is giving me a hard time. What happened is (long story short) he was forced to use a new server for the web sites on his old one. One of them was mine. I'm experiencing some weirdness now: 1. PHP automatically sticks in the backslash in front of apostrophes and quotation marks.

[PHP] New Server, Bad Attitude

2002-04-03 Thread Liam Gibbs
My friends' server is giving me a hard time. What happened is (long story short) he was forced to use a new server for the web sites on his old one. One of them was mine. I'm experiencing some weirdness now: 1. PHP automatically sticks in the backslash in front of apostrophes and quotation marks.

Re: [PHP] New Server, Bad Attitude

2002-04-05 Thread Liam Gibbs
Thanks to Tyler Longren, Hiroshi Ayukawa, and Matt Schroebel for your help. I've made big changes; the encryption thing is still throwing me for a loop, but the other two are fixed up (mostly). __ Do You Yahoo!? Yahoo! Tax Center - online filing wi

[PHP] Speaking of sockets...

2002-04-05 Thread Liam Gibbs
... I gotta problem with them. I'm trying to connect to the server (same one from which the page is at). My code is as follows: if($searchsocket = fsockopen("127.0.0.1", 8080, &$errornumber, &$errormessage, 30)) { Obviously 127.0.0.1 is not the real IP address. But it's at this point that it's

Re: [PHP] file locks

2002-04-09 Thread Liam Gibbs
<> Without testing, would this work? Just a suggestion (read: shot in the dark) that may work. while(!$filehandle) { $filehandle = @fopen("file_in_question", "r/w/whatever"); } <> You're welcome in advance. :) __ Do You Yahoo!? Yahoo! Tax C

[PHP] PHP Security Leak

2002-04-25 Thread Liam Gibbs
I'm wondering if anyone has any ideas on how to make a login site more secure. Since I'm not really sure if I've explained myself well enough and don't really know how else to say it, I'll just give examples and then you guys can follow suit and mention some oversights: I have a regular logon: us

[PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
I've been checking the PHP documentation, but can't find a function that will delete a member of an array, like such: $a = array(1, 2, 3, 4, 5); Use the function, say array_delete($a, 3); and that will delete the third member in the array (which would be 4 above), so that the array would contain

Re: [PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
Thanks for all your help, everyone, but both suggestions (unset and array_slice) pretty much didn't improve on my current way. I was jsut trying to find a faster way, but unset doesn't seem to be working properly (but I'll need to fiddle more) and the array_slice way is just too intensive. for($c

Re: [PHP] Array function to delete

2002-04-26 Thread Liam Gibbs
> But PHP builtins will do exactly this, around 3 > times faster, too. :) Yup. This one with array_diff was the winner. Thanks to all for your suggestions and Lars for the working one. Liam __ Do You Yahoo!? Yahoo! Games - play chess, backgammon,

[PHP] Variables not set

2002-04-26 Thread Liam Gibbs
I have a problem with my variables not being set. I have a file I use for constants and functions, structured like so: $this = "this"; $that = "that"; . . . function this() { $h = $this; $i = $that; } function that() { } Now, when I run this(), $this isn't set (even though it's above it

[PHP] Database Duplication

2002-04-29 Thread Liam Gibbs
I'm not sure if this is possible in PHP (maybe it's even an SQL problem, I dunno), but is there a command that will duplicate a database? I need to make a 'mirror' of it that I can dispose of after my user logs out that won't change the source database at all.

Re: [PHP] Database Duplication

2002-04-30 Thread Liam Gibbs
Maybe I should explain myself a little better. Sorry for leaving out what turned out to be crucial details. What is happening is I want to make a test user so that, whenever I log in with that user, I can muck up the database and not worry about what others will see or permanent changes. In the

Re: [PHP] Database Duplication

2002-04-30 Thread Liam Gibbs
> I'm going to guess you are using mysql. Dagwood. I always leave details out. Doesn't matter what it is. Yes, it's MySQL, and I'm forwarding this to the list because you're not the only one that caught my oversight. Sorry about that again. > Before starting a test, dump your database with the >

[PHP] PHP Editors

2002-04-30 Thread Liam Gibbs
Does anybody know of any PHP project editors, something that will group together all the PHP, INC, HTML, CSS files together into one logical project? Preferrably freeware/shareware, obviously. __ Do You Yahoo!? Yahoo! Health - your guide to health a

Re: [PHP] Re: PHP Editors

2002-05-01 Thread Liam Gibbs
Thanks to everyone for your suggestions. I went with EditPlus 2. The project features, easy access to all files, and directory-wide search-and-replace functionality are what hooked me. I'm still looking around, though, so if anyone has any other suggestions, let me know. The Zend product looks ni

[PHP] eregi(mail)

2002-05-10 Thread Liam Gibbs
Does anyone have a decent eregi statement for validating e-mail addresses? I've tried the ones on the site, but there seems to be small bugs with each of them. They tell me that [EMAIL PROTECTED] is an invalid e-mail address. __ Do You Yahoo!? Yahoo

[PHP] GD library problem

2002-05-14 Thread Liam Gibbs
This is funny: I have getimagesize(), but not createimage() and things like that. Is this because getimagesize() is not part of the GD library...? Or is there a problem with my GD library? Also, is there any resolution to this GIF copyright thing going on with Unisys? I want to be able to resize

Re: [PHP] GD library problem

2002-05-14 Thread Liam Gibbs
> getimagesize() is not part of GD. You likely didn't > add the GD extension correctly to PHP. That's what I figured, but I wasn't sure about it. Dagnabbit. I'm gonna have to try harder with GD. :) > The copyright issue really has nothing to do with > PHP. Talk to the GD > folks. It is not ou

[PHP] Use of an array element

2002-05-14 Thread Liam Gibbs
Is there any way of using an array element in the same line as it is filled? For instance, here's what I have: Say I want the image width of a pic, I have to: $f = getimagesize("certainpic.jpg"); print("$f[0]"); After this, I never use $f anymore. There's no reason to have it hanging around. Is

Re: [PHP] eregi(mail)

2002-05-16 Thread Liam Gibbs
Thanks to all who helped out with the eregi(mail) stuff. I got my problem solved, and on top of that, there were some bugs that I found in the code. Thanks again to everyone. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yah

[PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
Does anybody have a clever and efficient way of getting rid of leading zeroes in a string? __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

RE: [PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
> From version 4.1.0, $str = ltrim($str, '0') This works excellently. Thanks. One problem that I didn't think of, though: If the number is 0 (only 0), then the string ends up being empty. Is there a way around that? I put an if statement in saying if the string is empty, then the string is 0. Any

Re: [PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
> Typecasting it to an integer will do what you want. > But only if your string is numbers only. There's no guarantee. Alphanumeric data is allowed. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP General

RE: [PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
> I'm a newbie, but maybe this'll do it: > if ($str!='0') > { > $str = ltrim($str, '0') > } Duh. Sometimes I amaze myself at how stupid I can be. Thanks. :) __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP G

[PHP] IE 6 is Doing Something Weird

2002-06-13 Thread Liam Gibbs
It seems I can't set cookies in IE 6. Well, I haven't tried myself, as I'm a little bit wary of installing this over my current version of IE (and won't be able to downgrade afterward, thanks to Microsoft logic). Reported from a couple of the users on my site who use IE 6, they can't log in, pres

[PHP] Exim sendmail faults

2002-07-03 Thread Liam Gibbs
I apologize; this may be more a question for the people in php-install. But I'm having some problems with my mail stuff in PHP. I have Exim version 3.12 installed, but I'm not getting any mails sent out by PHP. I *do* get this error mail, however: This is automatically emailed back to me: This

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
m able to nslookup the addresses before hand so I don't understand why the mail delivery is not working... thx, Liam > -Original Message- > From: Liam Gibbs [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 03, 2002 12:58 PM > To: [EMAIL PROTECTED] > Subject: [PHP]

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
Jason Wong wrote: > On Thursday 04 July 2002 23:47, Liam Gibbs wrote: > > > Are you able to do an nslookup of these domains from the server? > > > > Those, of course, were just example email addresses (I'd replaced > > them before sending out this email so it w

Re: [PHP] AdRotator for PHP?

2002-07-04 Thread Liam Gibbs
> I'm wondering if anyone has found or ended up > writing something similar to > the MSWC AdRotator object in ASP, but for PHP? Or > is there already a module > on apache.org that I missed? (Figre I should pull my weight on this list here.) Hmm. Not sure exactly what MSWC AdRotator is, but here

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
uestions/information needed? thx for the help! > Liam Gibbs wrote: > > > > >Ok, fair enough. > > > >Here are the full errors I get when I try to mail "[EMAIL PROTECTED]" > >(BTW, I'm doing it as root but I get the same errors no matter who >

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
t's ok, at least you're trying. I've posted on other mail lists and got nothing in return at all! > PS You may want to post this on the nslug.ca list; some mail guru's read > it. /mt Cool, I'll check it. ttyl. > At 01:58 PM 7/4/2002 -0400, Liam Gibbs wrote: >

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
ecause exim is smart enough to just stuff it directly to that user's box rather than sending it out for a world trip. > This ain't much help - Miles Sure it is! If I take 100 small steps I'll get the equivalent of one big step! ttyl. > At 02:21 PM 7/4/2002 -0400, Liam Gibbs w

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
Chris Hewitt wrote: > >>Can you use exim to send mail from the console? Is sympatcio allowing this? > >> > >Sympatico allows it but I can't do it (I used to have another > >box that did this but it got hacked and pretty much destroyed...) > > > One quick test is to set up an email client (Netscape

Re: [PHP] øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø

2002-07-09 Thread Liam Gibbs
Oh, for Pete's sake, GROW UP, man! Stop and think for a second! Why not try visiting php.net like you did to sign up (http://www.php.net/mailing-lists.php) instead of spamming the rest of us about with this junk? Just think! Did you do any of that when you signed up? ___

[PHP] Took the job into my own hands

2002-07-09 Thread Liam Gibbs
Mr. Hegreberg will be getting an unsubscription notice shortly, telling him how to complete his request. __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To un

[PHP] Javascript running on another page

2001-02-16 Thread Liam Gibbs
I'm fiddling around with the fopen function, using it on urls. I now need to know how to run a JavaScript on another page by using PHP. I know I'll be able to do it from the url if only there's a way to run JavaScript from the url (just by using an fopen). Is there a way to run a JavaScript fun

[PHP] Problems with posix_getpwnam

2001-02-21 Thread Liam Gibbs
What does it mean when I get the line 'posix_getpwnam(username) failed with "Error number not set" in /xx.php3 on line ##' printed? It doesn't return anything anymore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

[PHP] Problems with posix_getpwnam

2001-02-22 Thread Liam Gibbs
What does it mean when I get the line 'posix_getpwnam(username) failed with "Error number not set" in /xx.php3 on line ##' printed? It doesn't return anything anymore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

[PHP] File command

2001-02-22 Thread Liam Gibbs
I'm using the file command, which reads an entire file and sticks it into an array. I'm trying to read a file from mp3.com, and what I get back is basically that the connection is refused. Doesn't it just load it up like any browser would load it? Is there an equivalent command that wouldn't try t

[PHP] File command

2001-02-23 Thread Liam Gibbs
I'm using the file command, which reads an entire file and sticks it into an array. I'm trying to read a file from mp3.com, and what I get back is basically that the connection is refused. Doesn't it just load it up like any browser would load it? Is there an equivalent command that wouldn't try t

[PHP] Downloading images through the use of code

2001-01-22 Thread Liam Gibbs
I have a question for a friend of mine (yes, it's actually for a friend of mine). Here is my code below. First of all, am I correct in assuming I could download a file and parse it using fopen("url")? Secondly, if I find an IMG tag, how would I go about grabbing the file that is contained in th

Re: [PHP] Selecting max(id) of a table

2001-01-22 Thread Liam Gibbs
> $max=mysql_result($result); $max = mysql_num_rows($result). - the L -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Maximum execution time

2001-01-23 Thread Liam Gibbs
Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam

[PHP] Parse error

2001-01-23 Thread Liam Gibbs

Re: [PHP] Parse error

2001-01-23 Thread Liam Gibbs
Should probably put the whole thing. Why does this produce a parse error (I know that include statements do weird things to if structures): if($username != "") { } else { include("file.php3"); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

[PHP] Problems with Linux PHP

2001-03-19 Thread Liam Gibbs
I'm having a couple of problems while porting some software from Lynx OS to Linux. Here they are: 1. The encryption method seems to be different. Does anyone know the salt to use in the crypt() function in Linux? 2. Also, I seem to not be able to popen() in Linux. I get a file pointer which is

Re: [PHP] Problems with Linux PHP

2001-03-19 Thread Liam Gibbs

[PHP] posix_pwnam with shadow passwords

2001-03-19 Thread Liam Gibbs
I'm using a system that uses shadow passwords, and I'm wondering if there is a way to make posix_pwnam go around that, so that all my passwords returned don't end up being 'x'. Is there a way to do this with posix_pwnam or another command? RIght now, I'm using an ugly hack, but would much rathe