[PHP] Fw: Hosting_submission

2002-06-12 Thread The_RadiX

Well anybody who wants to join Liam Mackenzie's hosting...


Here's the touching response I got... 



.. Shows a great deal of maturity... Thankfully he doesn't start some sort of 
hosting company...


After all customers would be very very upset if there was some kind of publicity stunt 
against his company. wouldn't they?


* snigger snigger *


:)... me threatening?? pfft. no.. how could you think that...


Anyway read the email I got back below.. Notice the lovely name he cooked up for the 
From address... very cute..




- Original Message - 
From: Fuck You 
To: The_RadiX 
Sent: Tuesday, June 11, 2002 6:50 AM
Subject: Re: Hosting_submission


No!


  - Original Message - 
  From: website 
  To: Liam Mackenzie ([EMAIL PROTECTED])
  Sent: Monday, June 10, 2002 11:26 PM
  Subject: Hosting_submission


  User registered with these details...

Real Name The_RadiX 
Username spectrum 
Domain operationenigma.org  
Password 1ReRqipo78 
Email [EMAIL PROTECTED] 




Re: [PHP] Fw: Hosting_submission

2002-06-12 Thread The_RadiX

Abusing you???


I am quite sorry but I am lost as to when I abused you?


I simply had a form of service on your system and after I tried to keep
updated with what was going on I was kicked off..



If you couldn't handle the load.. Don't blame me..


I was patient.. All I wanted was a reply..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Liam MacKenzie [EMAIL PROTECTED]
To: The_RadiX [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 9:49 PM
Subject: Re: [PHP] Fw: Hosting_submission


 I am providing a free hosting service for PHP Developers.  This is
something
 that costs me a considerable amount of money and time to maintain, and I
am
 giving it away for free.

 After being abused by you time and time again, I removed your account from
 my servers and declined your request to re-join.
 I think that was a fair move.

 Now, if you will, please leave me alone.

 Liam



 - Original Message -
 From: The_RadiX [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 12, 2002 9:34 PM
 Subject: [PHP] Fw: Hosting_submission


 Well anybody who wants to join Liam Mackenzie's hosting...


 Here's the touching response I got...



 .. Shows a great deal of maturity... Thankfully he doesn't start some
 sort of hosting company...


 After all customers would be very very upset if there was some kind of
 publicity stunt against his company. wouldn't they?


 * snigger snigger *


 :)... me threatening?? pfft. no.. how could you think that...


 Anyway read the email I got back below.. Notice the lovely name he cooked
up
 for the From address... very cute..




 - Original Message -
 From: Fuck You
 To: The_RadiX
 Sent: Tuesday, June 11, 2002 6:50 AM
 Subject: Re: Hosting_submission


 No!


   - Original Message -
   From: website
   To: Liam Mackenzie ([EMAIL PROTECTED])
   Sent: Monday, June 10, 2002 11:26 PM
   Subject: Hosting_submission


   User registered with these details...

 Real Name The_RadiX
 Username spectrum
 Domain operationenigma.org
 Password 1ReRqipo78
 Email [EMAIL PROTECTED]






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





Re: [PHP] how to select a file on a random basis?

2002-05-20 Thread The_RadiX

Ok well that array idea could work..


but what's the filename format of these files??

if they're all contigous or in some kind of pattern there maybe a faster and
easier way such as if you have them for example named:
file1.ext, file2.ext

or some pattern or other.. then you can just use random number func's to do
some work with you and all should be good..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Craig Vincent [EMAIL PROTECTED]
To: Andy [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 6:18 PM
Subject: RE: [PHP] how to select a file on a random basis?


  I would like to pick a file out of a directory by random. There are 400
  files and I just want to pick on of those by random.
 
  Is there a way with rand() and file ?

 Well there's a couple ways you could do this...it's too early in the
morning
 to post code but with some quick searches in the manual you should find
all
 you need.

 The most dynamic way to do this is to grab all the filenames in the
 directory you want, then randomize the array using shufflethen use the
 first cell value in the array.

 If you don't understand what I'm suggesting just lmk =)  I'll try
explaining
 in better detail when I'm more awake hehe.

 Sincerely,

 Craig Vincent



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] (newbi)mySQL query question

2002-05-18 Thread The_RadiX

try this:

$query = SELECT code FROM links WHERE sort_text LIKE '$letter%';


Note there are now single quotes (') identifying the string of the LIKE operator and 
also the assignment operator (=) has been replaced with the proper LIKE mySQL operator 
that allows for string search arguments.



:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, May 18, 2002 11:27 PM
  Subject: [PHP] (newbi)mySQL query question


  This doesn't have a huge amount to do with PHP but,

  I have the following code for my SQL query:
  $query = SELECT code FROM links WHERE sort_text = $letter*;

  I get an error.

  What I want to do is be able to specify a letter and have the rest be undefined eg

  if $letter was t

  I would get TecEco, Tiny, and Trailer

  and if $letter was b I would get Basket and Ball.

  Could any one show me the correct syntax off their heads?JJ Harrison
  [EMAIL PROTECTED]
  www.tececo.com





--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX

Goody another easy to answer one :) no harm intended.. it's a perfectly good question


Okay first is it sorted how you want?

if so you can use the LIMIT start,len feature of mysql..


for example:

select * from table_name order by col_name limit 5,10

will select records 5 to 15 (5+10) if of course there are 10 more to collect otherwise 
it will just return whatever it finds from the select that is ordered by col_name..


quite simple..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  Sent: Sunday, May 19, 2002 12:01 AM
  Subject: [PHP] Complex(ish) Question for Newbie


  How can I return the last five lines of a mySQL database table?

  JJ Harrison
  [EMAIL PROTECTED]
  www.tececo.com


--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX

well personally I have never had a good time with mysql_num_rows.. dunno why.. never 
seemed to have worked the way it should for me..


anyway point is if it works for you good, otherwise do what I do to get a rowcount and 
just:
$sql_count=mysql_fetch_array(mysql_query(SELECT count(*) FROM table_name,$DB));


and then you can just refer to it via $sql_count[0]...


anyways after that it depends.. what do you want to do?


if for example you want a page listing system in which you have say 1000 records and 
you want to display only 30 per page or something and users can browse through by 
hitting prev page and next page etc.. that's easy to do...



just be more specific on what you want to do..






:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message - 
From: [EMAIL PROTECTED]
To: The_RadiX [EMAIL PROTECTED]
Sent: Sunday, May 19, 2002 12:39 AM
Subject: Re: [PHP] Complex(ish) Question for Newbie


 Thanks.
 
 What is the best way to make the limit update it self as I add more entires.
 
 I am thinking of using a blank query (SELECT code FROM links)
 and then counting the number of rows with mysql_num_rows().
 
 But wouldn't this be a little slow if the database was big?
 
 - Original Message -
 From: The_RadiX [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, May 19, 2002 12:07 AM
 Subject: Re: [PHP] Complex(ish) Question for Newbie
 
 
 Goody another easy to answer one :) no harm intended.. it's a perfectly good
 question
 
 
 Okay first is it sorted how you want?
 
 if so you can use the LIMIT start,len feature of mysql..
 
 
 for example:
 
 select * from table_name order by col_name limit 5,10
 
 will select records 5 to 15 (5+10) if of course there are 10 more to collect
 otherwise it will just return whatever it finds from the select that is
 ordered by col_name..
 
 
 quite simple..
 
 
 :::
 :  Julien Bonastre [The-Spectrum.org CEO]
 :  A.K.A. The_RadiX
 :  [EMAIL PROTECTED]
 :  ABN: 64 235 749 494
 :  QUT Student #: 04475739
 :::
   - Original Message -
   From: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Sunday, May 19, 2002 12:01 AM
   Subject: [PHP] Complex(ish) Question for Newbie
 
 
   How can I return the last five lines of a mySQL database table?
 
   JJ Harrison
   [EMAIL PROTECTED]
   www.tececo.com
 
 
 
 --
 
 
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread The_RadiX

simple..


try this:
echo eval($variablename);

then again why are you eval()ing at all??


why can't you do this:

$var1=var2;
$$var1=13;
echo $var2;

//or perhaps even better:
//echo $$var1;

seems simple enough.. haven't tested but theory is there I think..

HTH

:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Henry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, May 19, 2002 12:29 AM
Subject: [PHP] How can I access the value in a variable whos name is in a
string


 Dear All,

 $variablename=variable;
 eval(\$.$variablename.=13;);
 echo $variable;

 This works fine!! It echoes 13;

 But this doesn't -

 echo eval(\$variablename\);

 Why??


 Henry




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-07 Thread The_RadiX

Pfft..

Stealing is what i call that :P


Why steal someones.. When you can write your own ? :)




Muhahahahahah..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message - 
From: Mizery De Aria [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 10:55 AM
Subject: [PHP] Re: Forum with PHP, without using mySQL..


 www.yabbforum.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Who's having a good hosting experience these days? {!?}

2002-05-07 Thread The_RadiX

Hmm

Brisbane eh?

Heard of Bribie Island?? Up north.. oooh, say 40mins drive  30 mins if
your speeding abit :)


Yeah.. That's me home :P


Yeah love the crap restrictions they give you on broadband here in Aus eh?
Lemme guess: Telstra? You shoulda gone with optus.. I love Telstra (dad
works for them) but Optus give you 15Gb p/m on their cable package.. So..
I'd have to weigh up telstra loyalty for value :)

Of course that's dependent on area and geo. location too...



Anywayz.. I can't get any broadband at ALL here yet.. But ADSL has been
installed in exchanges over xmas holi's and should be hopefully rolled out
for us to use soon :)




Ok well.. Hi to a fellow Aussie :)  spose I should be saying something
appropriate like:

Cya later mate!


:P




:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Liam MacKenzie [EMAIL PROTECTED]
To: The_RadiX [EMAIL PROTECTED]; [EMAIL PROTECTED];
Justin French [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 2:25 AM
Subject: Re: [PHP] Who's having a good hosting experience these days? {!?}


 Free web hoting for PHP developers

 MySQL database (more if you need more)
 Subdomain, or I can host your domain
 Apache /w all the bits and pieces
 Slackware Linux OS
 512/512 Cable connection in Brisbane, Australia

 Only catch is, I've got a 3 GIG monthly transfer limit, so no big
 uploads/downloads please (such as MP3s)


 Email me if you're interested.


 - Original Message -
 From: The_RadiX [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; Justin French [EMAIL PROTECTED]
 Sent: Monday, May 06, 2002 5:31 PM
 Subject: [PHP] Who's having a good hosting experience these days?


 Um Justin..

 Hi..

 or should I say.. Hi fellow Aussie mate .. :)


 Yeah I am in oz too and asked some hosting questions a while back..

 Your host has only 2GB downloads on the UNIX plan and also that's at US$15
 p/m.. isnt that a tad pricey?


 I was looking into powweb.com or aletia.com at much cheaper pricing and
 larger services (200mb storage, 10/12Gb p/m,etc)



 What do you think of these..



 Thanks...
 :::
 :  Julien Bonastre [The-Spectrum.org CEO]
 :  A.K.A. The_RadiX
 :  [EMAIL PROTECTED]
 :  ABN: 64 235 749 494
 :  QUT Student #: 04475739
 :::
 - Original Message -
 From: Justin French [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 06, 2002 10:22 AM
 Subject: Re: [PHP] Who's having a good hosting experience these days?


  Cheap?
  I've been with experthost.com for around 8 months, with very little to
  complain about... I've got a reseller account with about 12 domains, so
 i'm
  paying around US$6each, and I think the standard is US$15each for one,
 $10ea
  for two, and then a sliding scale up to 25 domains @ $5ea or something.
 
  It *shouldn't* be about the money, but I'm currently making a healthy
 profit
  out of hosting some client domains under my account.
 
 
  Reliable?
  They have intelligent support staff on 24/7, and they've had one service
  fallout in this time.  It was a biggie, and I had to reload some data
from
  my local copy, but I'd like to believe this was a one-off.
 
 
  Fast?
  The service seems fast (although I'm in Australia, so pings times are
  affected by sheer distance).
 
 
  Feature Rich?
  50meg, 20POPs, redirects, groups, auto-responders, 2GB bandwidth, MySQL,
  webmail, recent versions of Apache/MySQL/PHP, intelligent support staff,
 etc
  etc.
 
 
  I'm pretty happy.  Better still, they offer a free 1 month test account,
 so
  you can try them for yourself.
 
 
  Justin French
  
  Creative Director
  http://Indent.com.au
  
 
 
 
 
 
  on 06/05/02 9:19 AM, David Freeman ([EMAIL PROTECTED]) wrote:
 
  
   My hosting service which WAS cool about 2 years ago has
   grown into a bloated mess of zero logic.
  
   Fast, Reliable, Cheap, Feature-Rich
  
   Now pick any three.
  
   In the end I guess you get what you pay for.  If you can only afford a
   lower price host then you only get lower value.
  
   CYA, Dave
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Self Destruct code

2002-05-07 Thread The_RadiX

Well I share heavily with whoever the starter of this post was..


see yes.. upfront half payments are indeed much better..


but.. (and I assume here) when you are younger and have a smaller reputation
it's harder for clients to understand that.. so you usually end up with this
problem of having a site.. but like they could reject offer at last moment
or worse yet.. personal experience here 3 months ago.. you upload to their
server..

the business changes hands.. server ftp passwords change.. you lose contact
mysteriously with your contact. and voila.. pftt. in a puff of smoke.. your
hard worked site.. has no connection to you anymore.. you can't remove/touch
it.. and noone answers you..


You ring them back EVERY afternoon for a week straight... always being told
they will ring you back ASAP...


BULLSHIT.. what a load of crap...



No reply calls... No emails... Nothing.. Zilch.. and more importantly.. NO
F***ING MONEY!!!



Soo.. You have ISP bills, mobile bills, maybe rent/family/living costs (not
in my case), Uni text books, transport, webhosting etc.. and no money..



Yes.. That's a personal tale... Quite sad... But I have moved on..



It get's worse.. I was bitten twice by same client.. First site I made for
him.. Was for their main biz.. And that took like 3-4months to FINALLY get
paid.. Then I did the 2nd one.. and yeah.. you know the rest.. :(



Anyway here's a tip..

Remember.. in this kinda work... YOU'RE THE BOSS ... so go like this..

Go to the little biz you wanna do a site for.. or if you're offered that's
even better and be straight, to the point and barely flexible.. Don't let
them get you..


AND don't sell yourself cheap..

Try this: I can make you a site for $850 that will allow you to perform all
you have asked and has room for expansion later on when your company grows..
I may also charge you a small fee of $5-10 per month for maintance and
hosting costs..


the maintance fee of course is just some bonus fixed/guaranteed income per
month... 5-10 bucks is crap but once you do 50 sites.. it counts for a
little more pocket money...



Hey don't stop there..

Site I am doing now for a popular local biz (comp shop) is 650 for site,
nice a cheap once-off. and AUD$20  per month to cover their www domain name
payments and help towards my hosting..


And my hosting is SOO cheap that I could easily fit like 12 of these sites
similiar to this one on my server on my current plan.. and therefore be
making nice little profit.. :)




Anywayz.. back to your story..


Hahahah.. I must laugh.. Yes the thought occured to me without hesitation
when they f**ked me over.. but as I said.. I had not planned for it,
therefore I had no backdoor as such.. and as I had no FTP access anymore i
was well done for..


Lesson learnt: Don't mess with biz men :)



This time? Muhahahah.. Cos every site I build uses more PHP and MySQL than
you could shake a stick at anyway its quite easy for me to put a file or
just a special little function that allows me to easily.. hmmm yes.. you
got the idea...



Yeah I think it's a good idea.. Maybe not destroy (although it'd be nice)
but just render unusable..


Like it's quite simple really..


If you let's say use a header kind of file for each and every page of site
(like I do) to load up global vars and format of site etc.. than you can
haev something in there that handles it..


For a quick example:

Let's say you have your files all use (include/require) a header.php 


Then in your header.php just add these lines



-

if(isset($HTTP_GET_VARS[site_power])) {
  if($HTTP_GET_VARS[site_power]==off) unlink(/test.tmp);
  else {
$powerfile=fopen(/test.tmp,w);
fclose($powerfile);
  }
}

if(file_exists(/test.tmp)) exit(This site has been temporarily disabled
due to payment complications.. Please check back soon.);

--


that's about all there is to it.. Should work fine.. Some of you may say:
USE $_GET instead but I have always used the $HTTP_*_VARS idea.. and it
works.. and it's compat with newer versions still of PHP so as far as I can
see it's all ok.. but replace if you want.. up to you..


Yeah basically just format up a little message for them... and that'll be
shown if you send the get name=value pair to ANY php file on your site
containing something like: /file.php?site_power=off

you can turn it back on with just passing on in there.. optionally you may
want to use a password kinda of idea too.. just combine md5 if you want to
do soemthing like

if(md5($HTTP_GET_VARS[site_power]))=41d67d9b067b00ed2ce76af695767644)...
..

which happens to be md5 of: mypassword_off


so you get the idea..



Well this whole thing was enlightening.. that might explain the huge email
reply I wrote :)





Cya..

:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739

[PHP] Who's having a good hosting experience these days?

2002-05-06 Thread The_RadiX

Um Justin..

Hi..

or should I say.. Hi fellow Aussie mate .. :)


Yeah I am in oz too and asked some hosting questions a while back..

Your host has only 2GB downloads on the UNIX plan and also that's at US$15
p/m.. isnt that a tad pricey?


I was looking into powweb.com or aletia.com at much cheaper pricing and
larger services (200mb storage, 10/12Gb p/m,etc)



What do you think of these..



Thanks...
:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Justin French [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 10:22 AM
Subject: Re: [PHP] Who's having a good hosting experience these days?


 Cheap?
 I've been with experthost.com for around 8 months, with very little to
 complain about... I've got a reseller account with about 12 domains, so
i'm
 paying around US$6each, and I think the standard is US$15each for one,
$10ea
 for two, and then a sliding scale up to 25 domains @ $5ea or something.

 It *shouldn't* be about the money, but I'm currently making a healthy
profit
 out of hosting some client domains under my account.


 Reliable?
 They have intelligent support staff on 24/7, and they've had one service
 fallout in this time.  It was a biggie, and I had to reload some data from
 my local copy, but I'd like to believe this was a one-off.


 Fast?
 The service seems fast (although I'm in Australia, so pings times are
 affected by sheer distance).


 Feature Rich?
 50meg, 20POPs, redirects, groups, auto-responders, 2GB bandwidth, MySQL,
 webmail, recent versions of Apache/MySQL/PHP, intelligent support staff,
etc
 etc.


 I'm pretty happy.  Better still, they offer a free 1 month test account,
so
 you can try them for yourself.


 Justin French
 
 Creative Director
 http://Indent.com.au
 





 on 06/05/02 9:19 AM, David Freeman ([EMAIL PROTECTED]) wrote:

 
  My hosting service which WAS cool about 2 years ago has
  grown into a bloated mess of zero logic.
 
  Fast, Reliable, Cheap, Feature-Rich
 
  Now pick any three.
 
  In the end I guess you get what you pay for.  If you can only afford a
  lower price host then you only get lower value.
 
  CYA, Dave
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] MYSQL ERROR CONNECT

2002-05-06 Thread The_RadiX

Ha.. Aussie person too eh?


Ok.. Have you recently updated your php system?


Reason I ask is the way you are using the functions mysql_connect and
mysql_select_db are quite ... bad to say the least


You should have permissions setup for a root account or something in your
mysql.user table and then you can do this:

$DB=mysql_connect(localhost,root,password);

notice I now have a user/pass arg and also I am assigning the handle of the
connection to a var ($DB)


then use:

mysql_select_db(smpk2,$DB);




and that should work fine as long as user and pass are right and db exists..
(and server has mysql running of course :P )



if not.. let us know..

If you want to know how to setup users and permissions for MySQL.. give us a
yell.. be glad to help out..




:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: Dani [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 11:49 PM
Subject: [PHP] MYSQL ERROR CONNECT


 Hi,
 I have been using this code for while:

 //1. CONNECT TO DATABASE
 mysql_connect(localhost);

 //2. SELECT A DATABASE
 mysql_select_db(smpk2);

 to connect to MYSQL database.

 but I get this error:

 Warning: Access denied for user: 'nobody@localhost' (Using password: NO)
 in /www/host/doms/com/smpk2/create_tables.php on line 15

 Warning: MySQL Connection Failed: Access denied for user:
 'nobody@localhost' (Using password: NO) in
 /www/host/doms/com/smpk2/create_tables.php on line 15

 could someone help me, please???

 thanks



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] questions about a self-made mini chat

2002-05-05 Thread The_RadiX

Try telling the frame (text one) to go to a location. instead of just
refreshing..


It may just work... :) I think that annoying click only occurs on
refresh/reload not actually going there..




:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, May 05, 2002 12:18 AM
Subject: Re: [PHP] questions about a self-made mini chat


 On Saturday 04 May 2002 21:23, Duncan wrote:
  Hi there,
 
  i have some questions to solve some problems, i recently encountered
with
  my self made mini chat script.
 
  Ok, i use the meta-refresh in the main chat-messages frame to update the
  frame every few seconds. In windows OS, you always get that click
sounds
  whenever it refreshes the frame. Is there any way to stop this?

 That's an IE problem. Use Opera or Netscape if you don't want the click or
 see if there's an option in IE to disable the click.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 You can do very well in speculation where land or anything to do with dirt
 is concerned.
 */

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure user authentication

2002-05-04 Thread The_RadiX

Pedro Pontes wrote:
 with a SIMPLE equals test. So if a user happens to get that crypted
value
 of the password (from a temporary file on the server, for example), then
all
 the little devil has to do is to create a dummy session user object, or in
 your case, array, set its password value to the stolen crypted hash and
then
 link freely to any of your pages.


well simply put? no..

If a user can get the crypted value off your server, AND also figure how to
trick the PHP engine into accepting a session cookie that wasn't created on
your domain, then that would be either:
a) you have dangerous and volatile PHP scripts that allow users to perform
such nasty tricks
b) your server security should be greatly improved..


Jon Haworth wrote:
 Why are you passing the password around, hashed or not, in the first
place?
 Just have a yes/no flag for whether the session is an authenticated user
or
 not.

 Is there any particular reason why you'd need to reauthenticate on every
 page?

yes.. too true.. and simply put.. I could just pass the key or something
around instead and then in my PHP header that runs on each and every page
just reload a array with all the details anyway.. instead of passing around
the array..

oh and as for reauthenticating well that's done because.. well stupid
really when you think of it.. Unless they breach PHP as mentioned above, and
trick the session system, then there is little need to keep auth'ing them..


Haha.. Actually I just looked at my code.. Sorry I was mistaken.. due to the
complexity of my site. it doesn't actually reauth as such.. instead it
checks to see the status of the user and does some log updates.. (to keep
track of user's still online etc..) ... when I say status.. I mean if I
ban/block users while logged in.. the changes happen AS SOON as they view
another page on the site and they get a lovely page telling them of their
predicament :)



Anywayz.. very interesting topic.. I will keep an eye on this..


Miguel says:
 This would only work if some other user is able to create files that the
 web server thinks are part of your domain (since the session cookies are
 domain-specific). Sounds to me like your problem here is severe server
 misconfiguration. If your server environment is that insecure, then
 worrying about anything else is sort of a waste of time.

Yes.. Too true..


Michael Kismal says:
 What I can't figure out is why you're allowing people to just randomly
 put pages on your server.  If someone was to randomly register a similar
 user object, etc - why bother?  If I can put pages on your server and
 execute them, I'd do some something far more malicious than just pretend
 I'm user X.


Precisely what I am getting at too..


Yes the general opinion seems to be: If someone can get the session handler
of the PHP engine tricked so easily, or gain access so easily to your
site... Then you'd better look into that WAY before you start picking on
authentication schemes..


No harm intended ok.. Just pointing out some facts..


Hope I can help.. Would love to demonstate some ideas/etc.. about how I do
security stuff..



Bye
:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Pedro Pontes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, May 04, 2002 12:33 AM
Subject: Re: [PHP] Secure user authentication


 First of all, thank you for your devote answer.

 The method I was thinking about before was to pass the md5 hash of the
 password around, as the passwords are already md5'ed in the DB. Your
method
 seems more secure as you use a totally spiced-up and personalized
encryption
 engine.

 But, the main question remains, I think. If you pass your crypted password
 around, then, in each page, you must check it agains't the database entry
 with a SIMPLE equals test. So if a user happens to get that crypted
value
 of the password (from a temporary file on the server, for example), then
all
 the little devil has to do is to create a dummy session user object, or in
 your case, array, set its password value to the stolen crypted hash and
then
 link freely to any of your pages.

 Am I right? Thanks again.

 --


 Pedro Alberto Pontes

 The_radix [EMAIL PROTECTED] wrote in message
 003601c1f2aa$6120dbb0$f86086cb@oracle">news:003601c1f2aa$6120dbb0$f86086cb@oracle...
  Hmm yes good question..
 
  Security was (still is) a major for my organisation's site and I did
  something a little unique and robust..
 
 
  I love programming and I hate stealing (some call it borrowing) other
  programmer's scripts/code from the web.. therefore I write it _all_
 myself..
 
 
  Trust me.. Sometimes this is a dumb attitude to take such as when I
 created
  my first Perl discussion forum.. still running I think
  (http://the-radix.hypermart.net i think) and that c

[PHP] Witch var is the biggest and the lowest

2002-05-03 Thread The_RadiX

and witch is spelt Which...


no harm intended.. just a tip for those English grammatically correct people
out there who care about spelling..




:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 9:34 PM
Subject: Re: [PHP] Witch var is the biggest and the lowest


 On Friday 03 May 2002 19:19, Mikael Syska wrote:
  i have 10 vars, and I would like to have them posted, so the higest is
  first and the second highest etc.

 Put your variables into an array then sort it.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Nobody ever forgets where he buried the hatchet.
 -- Kin Hubbard
 */

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Secure user authentication

2002-05-03 Thread The_RadiX

Hmm yes good question..

Security was (still is) a major for my organisation's site and I did
something a little unique and robust..


I love programming and I hate stealing (some call it borrowing) other
programmer's scripts/code from the web.. therefore I write it _all_ myself..


Trust me.. Sometimes this is a dumb attitude to take such as when I created
my first Perl discussion forum.. still running I think
(http://the-radix.hypermart.net i think) and that consisted of this huge
perl system to maintain the files etc.. for members and the forum..


Anyway! off the sub now..


I used sessions and pass around the array of columns for that member/user ..
but the password is put through my own fairly unbreakable (yes.. I am
serious) password key system..


An idea to make your own safe keys to pass them around or use for
authenticating is simple maths and a crypt() or my preferred: md5()
function..


I simply do some lovely maths like for each char of pword I loop through
them and append them onto the entire pword string plus the length, get the
md5 of that.. then md5 that md5 with the md5 of the previous result and then
do some maths, pick some specified characters (like every 3rd or whatever
you wish) .. strrev( reverse the string) md5 that again, all md5'ed again..


:) haha, you get the idea..


SO basically you'll end up with a nice 32 char string which is QUITE safe to
pass around and the chance anyone's gonna decrypt it IMHO is about zilch,
buckley's, zut, nil, null, zero..


And all you have to do, is when they login once, just run the password they
entered through this algorithm and check it against the stored algo'd
password..

Ah yes that's the next thing.. the DB passwords will also have to be proc.
using your algorithm..

So it's kinda like a key security idea.. you are not meant to decrypt md5
hashes.. instead recreate it using what you are supplied and then compare
both hashes..


Simple :P




Ok hope that helps

:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Pedro Pontes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 10:19 PM
Subject: [PHP] Secure user authentication


 Hello,

 I'm using the regular user authentication method, that is, check the
 specified login/pass agains't the entries in the DB, if it is valid,
create
 the user object and register it with the section.

 How can we prevent any user from creating a simple PHP page that creates a
 simmilar user object, registers it with the session and then links to my
 pages? One way would be to check, in each page, for the password in the
 session user object and match it with the DB entry, but storing the
password
 in the session is not advisable, as other users in the host system may
have
 access to that information.

 Please advise.

 Thank you ver much for your time.

 --


 Pedro Alberto Pontes



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure user authentication

2002-05-03 Thread The_RadiX

nope

you are quite correct.. but I put my chances of someone catching packets
from my site and ripping em open.. in that low down probability of around 0
as well. :)



:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Jon Haworth [EMAIL PROTECTED]
To: 'The_RadiX' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, May 04, 2002 12:07 AM
Subject: RE: [PHP] Secure user authentication


 Hi,

  but the password is put through my own fairly unbreakable
  (yes.. I am serious) password key system..
  SO basically you'll end up with a nice 32 char string
  which is QUITE safe to pass around and the chance anyone's
  gonna decrypt it IMHO is about zilch,
  And all you have to do, is when they login once, just run
  the password they entered through this algorithm and
  check it against the stored algo'd password..

 Presumably you have a Javascript implementation of your algorithm, which
 runs on the login page - otherwise you'd just be transmitting the password
 in clear text from the browser to the server, right?

 If you don't do this, how do you deal with getting the password from the
 user to the server so you can authenticate them?

 If you do, how do you deal with people who have Javascript disabled?


 Cheers
 Jon


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::



Re: [PHP] Secure user authentication

2002-05-03 Thread The_RadiX

that is a good suggestion..

Using SSL to perform sensitive logins.. and then using some sort of
hidden or encrypted passwords in your sessions should provide a nice
level of security and comfort..



:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::
- Original Message -
From: Brian McGarvie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, May 04, 2002 12:12 AM
Subject: RE: [PHP] Secure user authentication


another option is to use SSL for the login page/sensitive parts of the
site that deal with any transfer of 'sensitive' data?

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2002 15:08
To: 'The_RadiX'; [EMAIL PROTECTED]
Subject: RE: [PHP] Secure user authentication


Hi,

 but the password is put through my own fairly unbreakable
 (yes.. I am serious) password key system..
 SO basically you'll end up with a nice 32 char string
 which is QUITE safe to pass around and the chance anyone's
 gonna decrypt it IMHO is about zilch,
 And all you have to do, is when they login once, just run
 the password they entered through this algorithm and
 check it against the stored algo'd password..

Presumably you have a Javascript implementation of your algorithm, which
runs on the login page - otherwise you'd just be transmitting the
password
in clear text from the browser to the server, right?

If you don't do this, how do you deal with getting the password from the
user to the server so you can authenticate them?

If you do, how do you deal with people who have Javascript disabled?


Cheers
Jon


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] Null character as field seperator in a string.

2002-04-30 Thread The_RadiX


- Original Message -
From: The_RadiX [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Dave MacRae [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 10:05 PM
Subject: Re: [PHP] Null character as field seperator in a string.


 Hey..

 yeah I might..


 I don't know if I am right or just blabbering crap

 but try to add these param's to your regex statement..


 preg_split(/\0/i, $buffer);


 note the i.. It should let it read past newlines.. although you're prob is
 with null (\0) chars..


 as I said.. Don't know if I am on the right track.. but it's worth a go
eh??





 good luck..

 - Original Message -
 From: Dave MacRae [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, April 29, 2002 8:26 PM
 Subject: [PHP] Null character as field seperator in a string.


  For historic reasons, I have a file that contains a number of records in
  which the fields are seperated by the NULL character, i.e,
 
  field1\0field2\0field3\0field4
 
  I need to parse out the fields from this string.
 
  The string is read into the program using
 
  $buffer = fgets(...).
 
  This would be no problem in Perl or C but I cannot get this to work in
 PHP.
 
  I have tried using
 
  preg_split(/\0/, $buffer);
 
  But this fails. I've tried walking through the string but it seems that
  $buffer only has the content up to the first NULL character.
 
  Does anyone have a simple solution to this problem.
 
  Regards
 
  Dave
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] lookin for a Menuing System...

2002-04-30 Thread The_RadiX

Yes too true..


Quite well put..


That's why. I haven't read the rest of the posts on this topic yet as there
are heaps..

but when I started working on my project with my graphics man we discussed
the issue of using JS menus very thoroughly as yes Netscape and IE both have
very different implementations when it comes to using DIV's and layers..




check it out: http://spectrum.ausgamers.com/


Hopefully it should all go well, and for NS users the dynamic menu simply
won't be there and they can use the sidemenu navigation system... For IE
they can utilise both systems..


Please give feedback if you do run into problems though.. Would love to get
some broader testing on it..



If you wanna know how it runs I coded it myself and it uses a nice little
linked list-type PHP array system which can be dynamically modified through
each page (since the whole site runs off this really intergrated mysql
principle) which will reflect the changes in the navbar menu and popup JS
menus..




Ok.. well thx for feedback anyway.. Hope I can help..



- Original Message -
From: michael kimsal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 2:46 PM
Subject: Re: [PHP] lookin for a Menuing System...


 Miguel Cruz wrote:

 
 Do it in JavaScript, it works and it's client side so it will be
 faster.
 
 
  But take care - using JavaScript for site navigation is tricky business.
  Some people don't use it, some people can't use it (not supported by
their
  browsers / hardware / corporate policy), and search engines certainly
  won't follow those links.
 


 Can someone point me to hardware that is still in active use that can't
 handle javascript?

 Similarly, can someone point me to a company that specifically disables
 javascript as 'corporate policy'?  Back in 96-97, the 'no javascript'
 argument held, and probably holds today some if you're targetting
 handhelds and other 'non standard' devices.  But if someone specifically
 disables Javascript these days, a good portion of their web experience
 will not be as robust as it would otherwise be, and they probably won't
 notice that using your site is any worse than any other site.

 IMO, it's now like targetting only websafe colors because some people
 might only browse in 256 colors.  If they do that, about 80% of the
 web's content will look like crap anyway, and they won't specifically
 think my stuff looks all that much worse than anyone else's.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] lookin for a Menuing System...

2002-04-29 Thread The_RadiX

Yes too true..


Quite well put..


That's why. I haven't read the rest of the posts on this topic yet as there
are heaps..

but when I started working on my project with my graphics man we discussed
the issue of using JS menus very thoroughly as yes Netscape and IE both have
very different implementations when it comes to using DIV's and layers..




check it out: http://spectrum.ausgamers.com/


Hopefully it should all go well, and for NS users the dynamic menu simply
won't be there and they can use the sidemenu navigation system... For IE
they can utilise both systems..


Please give feedback if you do run into problems though.. Would love to get
some broader testing on it..



If you wanna know how it runs I coded it myself and it uses a nice little
linked list-type PHP array system which can be dynamically modified through
each page (since the whole site runs off this really intergrated mysql
principle) which will reflect the changes in the navbar menu and popup JS
menus..




Ok.. well thx for feedback anyway.. Hope I can help..



- Original Message -
From: michael kimsal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 2:46 PM
Subject: Re: [PHP] lookin for a Menuing System...


 Miguel Cruz wrote:

 
 Do it in JavaScript, it works and it's client side so it will be
 faster.
 
 
  But take care - using JavaScript for site navigation is tricky business.
  Some people don't use it, some people can't use it (not supported by
their
  browsers / hardware / corporate policy), and search engines certainly
  won't follow those links.
 


 Can someone point me to hardware that is still in active use that can't
 handle javascript?

 Similarly, can someone point me to a company that specifically disables
 javascript as 'corporate policy'?  Back in 96-97, the 'no javascript'
 argument held, and probably holds today some if you're targetting
 handhelds and other 'non standard' devices.  But if someone specifically
 disables Javascript these days, a good portion of their web experience
 will not be as robust as it would otherwise be, and they probably won't
 notice that using your site is any worse than any other site.

 IMO, it's now like targetting only websafe colors because some people
 might only browse in 256 colors.  If they do that, about 80% of the
 web's content will look like crap anyway, and they won't specifically
 think my stuff looks all that much worse than anyone else's.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Null character as field seperator in a string.

2002-04-29 Thread The_RadiX

Hey..

yeah I might..


I don't know if I am right or just blabbering crap

but try to add these param's to your regex statement..


preg_split(/\0/i, $buffer);


note the i.. It should let it read past newlines.. although you're prob is
with null (\0) chars..


as I said.. Don't know if I am on the right track.. but it's worth a go eh??





good luck..

- Original Message -
From: Dave MacRae [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 8:26 PM
Subject: [PHP] Null character as field seperator in a string.


 For historic reasons, I have a file that contains a number of records in
 which the fields are seperated by the NULL character, i.e,

 field1\0field2\0field3\0field4

 I need to parse out the fields from this string.

 The string is read into the program using

 $buffer = fgets(...).

 This would be no problem in Perl or C but I cannot get this to work in
PHP.

 I have tried using

 preg_split(/\0/, $buffer);

 But this fails. I've tried walking through the string but it seems that
 $buffer only has the content up to the first NULL character.

 Does anyone have a simple solution to this problem.

 Regards

 Dave

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread The_RadiX

You could use Headers to tell the browser to expire the page now..


header (Expires: Mon, 1 Jan 1990 05:00:00 GMT);// Date in the past
header (Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
  // always modified
header (Cache-Control: no-cache, must-revalidate);  // HTTP/1.1
header (Pragma: no-cache);


something like that should do it..

See if it works now..




- Original Message -
From: Simonk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 28, 2002 7:50 PM
Subject: [PHP] Auto refresh when data changed in Mysql


 I have made a php + mysql site and hosting in my own IIS server, but in my
 school network, The page didnt change when i changed the data in mysql
 server. I think is the cache problem, but i cant fix it even i tick the
 Update the page everytime when page load in IE.
 There is no such problem in any home pc. but only in my school's pcs
 but when i type in www..com/showdata.php
 then the page can be update.
 Is there any code or setting can be set to over come this problem?

 Thank you!



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Redirecting

2002-04-27 Thread The_RadiX

IOW ??

what's this abbrev?

thx..


:::
:  Julien Bonastre [The-Spectrum.org CEO]  
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message - 
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 27, 2002 3:14 PM
Subject: Re: [PHP] Re: Redirecting


 On Saturday 27 April 2002 12:00, Julio Nobrega wrote:
Send head()ers before any html output (including spaces or newlines
  before ?php)
 
 IOW RTFM!
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 Love tells us many things that are not so.
 -- Krainian Proverb
 */
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache: SERVER_NAME gone?

2002-04-27 Thread The_RadiX

Hi Y'all...



Ok. I just got Apache 1.3.xx and I have PHP4.1.1 and MySQL 3.23.47 on WinXP Pro...


I am currently using IIS5.1 with PHP4 and MySQL but I'd like to move across to Apache..


Catch is?  I have hunted through all the FAQ's for Apache and there is no mention of 
how-to configure Apache to actually execute PHP's...

So I went into the PHP doc's and there is a small mention.. So I finally get the php's 
to run..


BUT.. when I call $SERVER_NAME in my php's like I always have.. The variable seems to 
no longer exist... what gives??



Thanks all.. I am sure it's just a name change or something that Apache uses.. Or 
maybe I have to register the PHP global var's somehow through Apache?? don't really 
know..





Anyway thanks a heap in a advance because I'd really love to start delving into this 
great subdomaining/.htaccess world  :)




Thanks again.. Greatly appreciated...


:::
:  Julien Bonastre [The-Spectrum.org CEO]  
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::





Re: [PHP] Apache: SERVER_NAME gone?

2002-04-27 Thread The_RadiX

Hmm

 because $SERVER_NAME is created IF the php
 directive register_globals = on.  this setting
 is off by default as of PHP 4.2.0.  all
 server predefined variables behave this way,
 such as $PHP_SELF, etc.

Yes so I've heard... One thing though.. I use PHP4.1.1... not 4.2.x



Anywayz will try the $_SERVER[xxx] trick

:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: Philip Olson [EMAIL PROTECTED]
To: John Holmes [EMAIL PROTECTED]
Cc: 'The_RadiX' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, April 28, 2002 3:15 AM
Subject: RE: [PHP] Apache: SERVER_NAME gone?


 because $SERVER_NAME is created IF the php
 directive register_globals = on.  this setting
 is off by default as of PHP 4.2.0.  all
 server predefined variables behave this way,
 such as $PHP_SELF, etc.

 regards,
 philip


 On Sat, 27 Apr 2002, John Holmes wrote:

  Use $_SERVER[SERVER_NAME]
 
  ---John Holmes...
 
   -Original Message-
   From: The_RadiX [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, January 21, 2001 10:36 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Apache: SERVER_NAME gone?
  
   Hi Y'all...
  
  
  
   Ok. I just got Apache 1.3.xx and I have PHP4.1.1 and MySQL 3.23.47 on
   WinXP Pro...
  
  
   I am currently using IIS5.1 with PHP4 and MySQL but I'd like to move
   across to Apache..
  
  
   Catch is?  I have hunted through all the FAQ's for Apache and there is
  no
   mention of how-to configure Apache to actually execute PHP's...
  
   So I went into the PHP doc's and there is a small mention.. So I
  finally
   get the php's to run..
  
  
   BUT.. when I call $SERVER_NAME in my php's like I always have.. The
   variable seems to no longer exist... what gives??
  
  
  
   Thanks all.. I am sure it's just a name change or something that
  Apache
   uses.. Or maybe I have to register the PHP global var's somehow
  through
   Apache?? don't really know..
  
  
  
  
  
   Anyway thanks a heap in a advance because I'd really love to start
  delving
   into this great subdomaining/.htaccess world  :)
  
  
  
  
   Thanks again.. Greatly appreciated...
  
  
   :::
   :  Julien Bonastre [The-Spectrum.org CEO]
   :  A.K.A. The_RadiX
   :  [EMAIL PROTECTED]
   :  ABN: 64 235 749 494
   :  QUT Student :: 04475739
   :::
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] SQL Warning

2002-04-24 Thread The_RadiX

Hey...


Ok Firs Mike.. Yes I have been fixing some of her scripts and saw she used
this too..

Unbelievably I also so this point about the string in the string without
concat op's but incredibly it works..



Now back to reason why it don't work..


Okay Jenny..

Hi again :)

Next..

Do you have anything actually IN your table ({$config[prefix]}_users) ??


If so does the username in it match {$session[uid]} ??


If it doesn't and mysql_query returns a error cos a) table don't exist or b)
some other sql error such as column name wrong etc..

Then mysql_fetch_array will cough up error..




This happened when I setup your scripts on my box.. And whenever I setup any
scripts in which I don't yet have any records matching the query so
mysql_fetch_array goes nuts..




Ok.. Hope it helped..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: Ford, Mike [LSS] [EMAIL PROTECTED]
To: 'Jennifer Downey' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 24, 2002 10:05 PM
Subject: RE: [PHP] SQL Warning


  -Original Message-
  From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
  Sent: 24 April 2002 04:46
 
  Would you please direct your attention to this URL
 
  http://testphp.netfirms.com/code1.html
 
  Look at the bottom where the big orange commented syntax is
  and explain what
  is going on there?

 
 $query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]};

 $ret = mysql_query($query);



 // this is line 14
 while($row = mysql_fetch_array($ret))
 .
 .
 .
 // this is the problem area. It is giving me this sql warning Warning:
Supplied argument is not a valid MySQL result resource in
/home/public_html/sortitems.php on line 14 look at top for line 14 why is it

 // looking at line 14 I am not asking for any of that information?
 

 No idea why the error message is so far down the page, but it is certainly
referring to line 14 -- it is telling you that the $ret you are supplying to
mysql_fetch_array is invalid.  Why?  Because the mysql_query failed, and so
$ret was not assigned valid result resource.  This is why you should ALWAYS
check the return value of a mysql_query call before trying to fetch its
results.

 Now, why is the query failing?  Well, let's take a look at this line:

 $query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]};

 The stuff to the right of the = consists of:

 (1) the string SELECT name FROM {$config[
 (2) the constant named prefix (which, I guess, doesn't exist)
 (3) the string ]}_users WHERE uid={$session[
 (4) the constant named uid (ditto!)
 (5) the string ]}

 with NO concatenation operators in between.

 This line ought to generate multiple warnings and notices -- you must have
error_reporting set to suppress all these useful messages, so I suggest you
change it to something more useful forthwith (such as E_ALL, or at least
E_ALL ^ E_NOTICE).

 So, the final solution to your problem would be either of the following:

 $query = SELECT name FROM {$config[\prefix\]}_users WHERE
uid={$session[\uid\]};

 $query = SELECT name FROM {$config['prefix']}_users WHERE
uid={$session['uid']};

 Hope this helps.

 Cheers!

 Mike

 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Attachments

2002-04-24 Thread The_RadiX

I have read briefly through past topics..


Just wanted to know:

A) How do you use attachments in the: mail() function


B) how using attachments would I compose an email to batch off using text/html as a 
optional item if the client supports it or use the default text/plain ??



Thx a heap


:::
:  Julien Bonastre [The-Spectrum.org CEO]  
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::





Re: [PHP] Better standards in PHP-coding

2002-04-21 Thread The_RadiX

Yes thank you Jason..


I could have.. But I was busy..

And _usually_ my posts here are somewhat ignored so I thought better than to
spend _too_ much time on it..


Thanks anyway..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 21, 2002 5:53 PM
Subject: Re: [PHP] Better standards in PHP-coding


 On Sunday 21 April 2002 11:26, The_RadiX wrote:

   Hard in email to show as the character spacing is not equal like good
text
   editors..

 Set your mail client to use a fixed width font -- Lucida Console is my
 preferred font.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Q: Do you know what the death rate around here is?
 A: One per person.
 */

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: I would like to get a script to display in a frame

2002-04-21 Thread The_RadiX

Umm

Can't you simply use:

output.document.forms[0].submit()


I did Javascript for 3 years but that was a while back now.. But there is
most definitely a submit function for forms so you don't have to use that
queer invisible submit trick..




... Hope that helps ...


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: R. Visser [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 21, 2002 9:22 PM
Subject: [PHP] Re: I would like to get a script to display in a frame


 [EMAIL PROTECTED] wrote:

  Does anyone have any experience with making script output display in a
  frame??  I would like to get this to happen on an e-commerce site I am
  designing and am stuck.  I have tried form method=POST
  action=myscript.php target=main with no success.  Please help.

  
  Jeff Means
  CIO for PicoTech
  http://www.picotech.net


 Hi Jeff,

 maybe it's a good idea to create a hidden HTML-form in the output frame.

 In that case you can use javascript in your input frame in order to send
 the given
 values to the hidden form in your output frame. After that you can submit
 the hidden form using the same javascript in your input form.

 For example your output frame is called output

 To fill your hidden frame with input data:

output.document.forms[0].hidden_name.value=value;


 I would simply create a hidden submit-button (using css display-function)

 You can activate this button out of javascript with:

output.document.forms[0].submit.click();


 It's very simple, but I think it should work.


 Greetings,

 René


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Australian *nix Hosts?

2002-04-20 Thread The_RadiX

Thanks a heap guys and Justin for your support..


Yeah I am heavily interested in www.powweb.com anybody know if they're any
good??

They have really 1337 service it seems and give me 12GB p/m and 200mb for
only USD$7.77 ...

w00t.. w00t!



Anybody here use them? any exp. with them??


Thanks a heap...


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: Justin French [EMAIL PROTECTED]
To: The_RadiX [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, April 20, 2002 3:31 PM
Subject: Re: [PHP] Australian *nix Hosts?


 Hi,

 I stopped searching in Australia and looked over to the US, and am pretty
 happy with experthost.com (2GB/50meg/20POP starting at US$15/m)... since
 signing up, I changed over to a reseller account to run multiple domains
for
 clients, and am now paying around US$6.25/m per domain.

 I know that additional bandwidth is available too.


 The problem is that AU bandwidth is wy expensive.  A comparable plan
to
 the above on a reliable, customer service drive ISP in AU is more like
 AU$50-150/month, and as you know, getting up near 5gb puts the price
through
 the roof.

 Bandwidth is the US is s much cheaper.  Unless you have a specificly
 focused group of Australian users, and are server a lot of large files, or
 stuff that requires really short ping times (like gaming?), I'd recommend
 looking overseas...  just ensure they have 24/7 support, otherwise you'll
 have email/support delays and 3am phone calls :)


 Justin French
 
 Creative Director
 http://Indent.com.au
 



 on 15/04/02 11:31 PM, The_RadiX ([EMAIL PROTECTED]) wrote:

  Hi yes I have already read the posts about the hosting questions
 
 
  But as I am in Australia I'd like to know if anyone here has had any
dealings
  with a good Australian host and any recommendations..
 
 
 
 
  Thanks a heap..
 
 
  P.S. I see what spec's US and EU guys have on the sites and from the
months I
  have hunted around AUS I found that it's pretty exp. just to get like
5gb a
  month downloads is around AUD$300p/m which is kinda pricey for me..
 
 
 
 
  Thanks again..
 
 
 
 
  :::
  Julien Bonastre [The-Spectrum.org CEO]
  A.K.A. The_RadiX
  [EMAIL PROTECTED]
  ABN: 64 235 749 494
  Mobile: 0407 122 268
  QUT Student #: 04475739
  :::
 
 
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Better standards in PHP-coding

2002-04-20 Thread The_RadiX


 I don't know who you are Frank..

 But I understand and support you entirely..


 I could write my own 1500 word post like you..


 But you've covered it all

 I always see the { } pair used when there is only one statement, and also
 this weird

 if(expression)
 {
   statement
 }
 else
 {
   statement 2
 }

 blocks are VERY weird and hard to understand.

 I prefer and use for every lang. Including C++, Object Pascal, java, PHP,
 Perl:

 if(expression) {
   statement block
   if(expression2) {
 statementblock 2
   }
 } else {
   statement if
 }

 in a text editor these blocks are easily read and the double spacing (not
 tabs) I use makes it REALLY easy to find and track code during debugging..


 sometimes I see loops in conditional statements mixed with functions and
 this neverending mass of curly braces and I am very confused trying to fix
 their code..

 SO I try as hard as possible so suggest my method as it makes reading much
 easier..





 I do understand where you are coming from with your starting { being in
line
 with the actual expression it refers to... Hmm yes but as I always indent
 for loops, conditional expressions, etc.. anything that needs curly braces
I
 will easily see that if the code doesn't return back to the first column
 something is wrong

 Eg..


 if(exp1) {
   if(exp2) {
 ..do that..
   } else {
 while(xy) {
   ..do this..
 }
   }
 }


 and I can clearly see the last brace finishes again on col 1.. SO i know
all
 is good..

 Hard in email to show as the character spacing is not equal like good text
 editors..

 but paste it in your editor you'll see what I mean..






 Thanks for your support.. Should have more people following these readable
 standards in the world!

 :::
 :  Julien Bonastre [The-Spectrum.org CEO]
 :  A.K.A. The_RadiX
 :  [EMAIL PROTECTED]
 :  ABN: 64 235 749 494
 :  QUT Student :: 04475739
 :::


 - Original Message -
 From: Frank [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, April 21, 2002 11:51 AM
 Subject: [PHP] Better standards in PHP-coding



 The nice thing about standards is that there are so many to choose
 between.

 Subject: Uses of block markers in coding

 GNU recommends a standard with block-markers aligned under each other and
 a
 number of people - including myself - find it senseless and
 counter-progressive to keep up an older standard resting from old days and
 doing the programmer a disfavor.

 Too many programmers continue to use a style that originates back to the
 days where dumb terminals with one-line memory and line-editors was
 common.

 Those days it could take long time to submit a line to the mainframe. I
 have tried it myself and in worst-case situations it could take up to half
 a minute to submit a line.

 So naturally we put more things into one line. Statements like

 if (tempratureM1=tempratureSTP) {cout  Warning! Cooling needed;
 log(tempratureM1, Warning);};

 all in one line.

 When editors became a little faster people started to write:

 if (tempratureM1=tempratureSTP)  {
cout  Warning! Cooling needed; log(tempratureM1, Warning); }

 which is nicer to look at but would take many seconds more as one more
 line
 has to be submitted.

 - - -

 Nowadays few people have any problems with waiting for a CR.

 But for mysterious reasons a rest from the old forced standard remains
 among people who use C(++) like languages.

 It is still standard to write

 if (some_expression) {
statements;
...
 }

 What the { - the marking of the beginning of a block that should be
 indented - is doing in the end of the line nobody has yet been able to
 explain me.

 Why, then, are functions not written as

 function foo(parameter1, foo(parameter1, parameter2, ... parameterN) {
   statements
   ...
 }

 ?

 In other block-structured languages you of course align block-markers
 under
 each other, allowing for easy scan.

 if expression
 begin
statement;
...
...
 end;

 I have yet to see anybody write

 if expression begin
statement;
...
...
 end;

 - - -

 Does it matter? Oh, yes it does. A lot. As teacher I know from experience
 that programmers has a harder time tracking their own block with a number
 of {s dancing far out of sight in the right side of the screen. This is
 not a matter of experience. No experience can ever make it equally fast to
 control structures based on vertically aligned block-markers contra those
 where the marker can be found anywhere on a line.

 As an amusing result of the weird practice it has been necessary to
 recommend a standard where the { }-pair is always used, even though there
 is only one statement following an if:

 if ($myvarirable1*myvariable2 = myvariable3*myvariable4+114) {
oneStatement;
 }

 instead of simply

 if ($myvarirable1*myvariable2 = myvariable3*myvariable4+114)
oneStatement;


 Why the need for the extra { }s?

 Of course

[PHP] Better standards in PHP-coding

2002-04-20 Thread The_RadiX

Hmm sorry all


yes it seems I misread some crucial parts myself..


That whole

if(exp) {
  statement

that's a load..

if you want a one-liner conditional statement do:

if(exp) statement;

and that's it.


yes also michael you are right..

I use the:

if(exp) {
  blah blah
} else {
  blah blah 2
}

concept as well and find it the best

that whole wasting of lines:

if(exp)
{
  yabba
}
else
{
  yadda
}

is terrible..




Sorry bout that guys.. Didn't really understand the message till I reread
email..






:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::


- Original Message -
From: michael kimsal [EMAIL PROTECTED]
To: Mark Charette [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, April 21, 2002 1:22 PM
Subject: Re: [PHP] Better standards in PHP-coding


 Mark Charette wrote:
  Hehehe. And I thought the OTBSW (One True Brace Style Wars) had passed
into
  memory back some 10 or 15 years ago! Lo! They resurface yet again! 30
years
  in this business and still I hear them argue.
 
  Perhaps a cb style program for PHP so people can write any blasted style
  they feel like and then have another programmer transform it into
_their_
  OTB style.
 
  _My_ coding standards may not be _your_ coding standards, but
mechanical
  transformations can pretty much make it all moot.
 

 Cool - thanks.  I seem to have posted twice on accident, but you
 summed up much better what I tried to say, but quicker!  :)
 This guy got on my few remaining nerves this evening.  :)




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Better standards in PHP-coding

2002-04-20 Thread The_RadiX

Sorry double posting..




Yes.. that's right Michael..



Both styles are correct and are parsed exactly the same..

They obviously both are part of the specifications of the PHP interpretor and 
structure OTHERWISE they wouldn't work would they? :P



And yes, it's to do with what is more comfortable for the programmer.. As long as the 
programmers at the end can read it easily enough that's all that should count..


Considering that:

if(exp) statement;

Is quite legal in all the languages I stated before then it is quite valid to use it 
as I see fit..





Hopefully you're not trying to impose on us the standard because standards are simply 
made for the sake of clarity to the developers.. Not the users... Obviously anyway :P






Bye


:::
:  Julien Bonastre [The-Spectrum.org CEO]  
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student :: 04475739
:::





Re: [PHP] if elseif else

2002-04-19 Thread The_RadiX

Nope..

That is fine..


I use it all the time.. It's quite acceptable..




- Original Message -
From: Gerard Samuel [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Saturday, April 20, 2002 12:01 AM
Subject: [PHP] if elseif else


 I redoing some code, and the original author has code like

 if
 elseif
 elseif
 elseif
 else

 I have always known it to have just one elseif, not multiple ones.
 I was going to move it to a switch/case, but there is no common switch.
 So I wanted to know if its technically ok, or just ok to use multiple
elseif

 Thanks


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP MySQL Hosting services

2002-04-15 Thread The_RadiX

What's the URL of host..


Ahh za. I have seen them.. They also run a free php hosting service..


Yes ok but how much downloads/transfer off server do you get??







:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::


- Original Message - 
From: Vins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 15, 2002 7:12 AM
Subject: [PHP] Re: PHP MySQL Hosting services


 Hey.
 I have the best hosting you can get.
 for only $46 p/m
 
 ALL THIS...
 
 400 MB web space
 Execution of Custom CGI scripts
 Support for PERL
 Support for C and C++
 Support for SSI
 Support for GCC
 Support for GD
 Support for 5 independent MySQL Databases
 
 Own URL in the format
 Extensive Support Forum
 99,9% Uptime
 24/7/365 Network Monitoring
 Power Back-up  Generator
 Daily Back-ups
 Web Site Control Panel
 FTP User Login
 25 POP3 Accessible Mailbox(es)
 Unlimited E-mail Aliases
 Online Mail Administration Tool
 Online Web Mailbox
 Advanced E-mail Forwarding
 E-mail Auto Responder
 Form to e-mail CGI script (cgiemail and formmail.pl)
 Access to CGI Counter and Counter Configurations Tool
 Daily Log Files
 Graphic Statistics Report
 Disk Usage Monitor
 Full range of MIME types
 Execution of PHP scripts (PHP4)
 Telnet Access (activated on request)
 SSH Access (activated on request)
 Microsoft Frontpage 2000 Extensions (activated on request)
 5 Databases with MySQL
 CGI Shopping Cart
 Custom CGI
 Support for SSI
 Perl
 C, C++
  GCC
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Australian *nix Hosts?

2002-04-15 Thread The_RadiX

Hi yes I have already read the posts about the hosting questions


But as I am in Australia I'd like to know if anyone here has had any dealings with a 
good Australian host and any recommendations..




Thanks a heap..


P.S. I see what spec's US and EU guys have on the sites and from the months I have 
hunted around AUS I found that it's pretty exp. just to get like 5gb a month downloads 
is around AUD$300p/m which is kinda pricey for me..




Thanks again..




:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::






Re: [PHP] Closing curly brackets?

2002-04-14 Thread The_RadiX

haha

Yeah you are right

But in her case the question was quite heavily a PHP related one..




But yes I see what you mean, and no we don't want HTML q's in here...



bye
::: Julien Bonastre
[The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235
749 494 Mobile: 0407 122 268 QUT Student #: 04475739
:::
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 14, 2002 3:11 PM
Subject: Re: [PHP] Closing curly brackets?


 On Saturday 13 April 2002 19:24, The_RadiX wrote:
  No it's okay  lots' of people post general HTML questions in here..

 I hope people don't get the wrong impression. General HTML questions is
NOT
 what this list is for. This list is called php-general for a very good
 reason!

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 A good scapegoat is hard to find.
 A guilty conscience is the mother of invention.
 -- Carolyn Wells
 */

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Closing curly brackets?

2002-04-13 Thread The_RadiX

No it's okay  lots' of people post general HTML questions in here..


I love studying other people's..code style...


You really need to work on your style I think.. No offence but it's quite
hard to read.. I had to painstakingly (thank God it was fairly small script)
space it all out and set the format all nice so it made sense.


The hardest thing in the world I think is trying to read anothers code :)


anyway after this process I finally saw where the error most possibly is
occuring.. the formatting of my style made it really easy to pick out..


ok.. I have attached it anyway.. so it should retain it's formatting.. make
sure you have wordwrap off if your using some old text editor


I strongly suggest getting a good text editor if your planning on coding a
lot.. I use TextPad 4 and I love it.. It has full code colouring, PLENTY of
features for text-searches and replacement, macros etc... multiple files..
there are so many diff. text editors out there like it, but they are much
better than Notepad once you get the hang on them... trust me :) I used to
use Notepad for around 3-4 years for all my Javascript, Java, Turbopascal,
Perl... e.. terrible really.. hard to read..


anyways

yes I believe you are putting that closing brace in the right spot (as in
the spot you said it should work but doesn't due to the parse error) but
you unfortunately that's not where the problem lies.. You somehow have put
one TOO many closing braces further up in your code around this part:

  $thisoption=;
}
  }
} == one of these should be taken out


//check if form has been submitted
if($submit){


see how there's 3 closing braces?? try with two and then also put in one
where you thought you were supposed to:

  echo You have $quantity of this item and it's id is $iidBR;
  }

// it seems like the first while statement's closing curly bracket should go
here but if I put it here I get a pars error.
} //== This is the one you were missing..

} else {
//if the form has not been submitted run the following

?


hope it helps.. if not please email me: [EMAIL PROTECTED] would love
to find out how it goes... what are you making anyway? some kinda virtual
creature/pet game?? sounds fun :)









:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::



- Original Message -
From: Jennifer Downey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 13, 2002 1:09 PM
Subject: [PHP] Re: Closing curly brackets?


 My apologies for putting this in the wrong list.

 Jennifer

 Jennifer Downey [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi everyone,
 
  I have a question about this code. The way it sits now it always shows
the
  last record in the table.
  in other words if the user has 6 items, like:
  item id 1
  item id 2
  item id 5
  item id 6
  item id 7
  item id 8
 
  it will only show the last record item id 8.
 
  I believe it has something to do with the first while statement's
closing
  curly bracker
  But I can't seem to get it in the right place.
 
  Can someone spot the mistake and show me how to fix it.
  see also comments in code.
 
 
 
  $id = $HTTP_GET_VARS[id];
 
 
  $query = SELECT id, name, image, quantity, type FROM
  {$config[prefix]}_my_items WHERE uid={$session[uid]} ORDER BY id;
  $ret = mysql_query($query);
   while($row = mysql_fetch_array($ret))
  {
  $iid = $row['id'];
  $image = $row['image'];
  $name = $row['name'];
  $quantity = $row['quantity'];
  $type = $row['type'];
 
 
  if($iid == $id)
  {
  $display_block =CENTERimg src=$image border=0brfont size =
  2$nameBR$quantityBR$type/font/CENTER;
  echo $display_blockBRBR;
  if($type == food)
  //if book or weapon is present then set an option and include in the
form
  later
  {$thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION;
  }else{
  //if any other type is present then set a blank
  $thisoption=;}
  }
  }
 
 
 
  //check if form has been submitted
  if($submit){
 
 if($sort == 'shop')
   {
   echo This item has been taken care ofBR;
 
  // We are selecting user id to insert into the users items.
  $db=SELECT  uid FROM {$config[prefix]}_users WHERE
  uid={$session[uid]};
  $ret = mysql_query($db);
  while(list($db)=mysql_fetch_row($ret))
  { $user = $db;
  echo Your user ID is $userBR;
  }
 
 
  echo You have $quantity of this item and it's id is $iidBR;
 
 
  }
  // it seems like the first while statement's closing curly bracket
should
 go
  here but if I put it here I get a pars error.
  }else{
  //if the form has not been submitted run the following
 
 
  ?
  FORM ACTION=?echo$PHP_SELF;? METHOD=post
  SELECT NAME=sort SIZE=1 
  ?echo $thisoption;?
  OPTION VALUE=shopPut in my shop/OPTION
  OPTI

[PHP] Newsgroups? Which ones

2002-04-13 Thread The_RadiX

just a quick question


what's the major newsgroup most people use here??

I just wanna know cos my alt.php and alt.php.sql are quite dead and empty...



thx in adv.




:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::






[PHP] Re: Closing curly brackets? and BEING IGNORED!

2002-04-13 Thread The_RadiX

- Original Message -
From: The_RadiX [EMAIL PROTECTED]
To: Jennifer Downey [EMAIL PROTECTED]
Sent: Sunday, April 14, 2002 9:47 AM
Subject: [PHP] Re: Closing curly brackets? and BEING IGNORED!


 Happy to hear you fixed your problem...


 I sent you a reply about how you should correctly format your code as
well..


 Ooh about probably hang on will check sent items 9:28pm saturday I sent
one
 to you and at 10:01 I sent it off to the mail list itself..


 With an attached file... In nicer format... Clearly formatted..




 But it seems even after all this my postings here were ignored...


 Hmm, leads me to think either a) I am posting these emails to wrong
 address..
 b) People don't like my name The_RadiX maybe I will rename it to Julien
 Bonastre as it should be



 Well I will soon find out if people are getting my emails anyway ;)





 Okay, well thanks Paul for helping out someone here anyway and backing up
 the email I sent last night...



 Remind to spend my time selfishly on my own work, instead of helping
 others..


 Sorry.. getting carried away


 Anywayz.. will stop whinging.. back to trying to help the others in this
 place..




 Actually it's just occured to me.. That those emails were sent through the
 HTML format.. It's happened before and it's possible now I think about it
 that this maybe one of the reasons they have never been replied to??




 :::
 Julien Bonastre [The-Spectrum.org CEO]
 A.K.A. The_RadiX
 [EMAIL PROTECTED]
 ABN: 64 235 749 494
 Mobile: 0407 122 268
 QUT Student #: 04475739
 :::


 - Original Message -
 From: Jennifer Downey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, April 14, 2002 4:57 AM
 Subject: [PHP] Re: Closing curly brackets?


  Well as I have seen lot's of people get yelled at if they post in the
 wrong
  list. So rather than letting that happen and risk not getting any help I
  thought I would apologize and send it to the right list.
 
  Anyway the file you sent is it in the correct format? I have asked about
a
  tutorial on proper code formatting and got back a tutorial that was
  extremely hard to understand. While lots of people have screamed at me
for
  my  coding format no one has supplied an understandable answer. That is
  until this morning.
 
  From Paul Burney :
 
  Hi Jennifer,
 
  The first thing you should do is properly indent your code.  If you do
so,
  you'll be sure to find the missing bracket.  Basically, for each new
 block,
  tab out again.  It really helps to use a programmer's editor with syntax
  highlighting like vim or BBEdit.
 
  Thought that was the best tutorial I could ever get. Short and sweet and
 oh
  so easy to understand.
  I am using HTML_Kit as it has the same features as all the othere
editors
  (color coding and such) but it also has a lot more I can get plugins for
  anything I would ever need. Except a formatting tutorial ;)
 
  I will use your code as an example of formatting.
  It doesn't work as far as the script goes as it returns multiple:
  Warning: Supplied argument is not a valid MySQL result resource.
 
  So I am going to study your formatting and start at the beginning.
 
  But thank you for your time and help! :)
 
  You have been a great help, look at my new signature.
 
  Thanks again
  Jennifer
 
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP MySQL Hosting services

2002-04-13 Thread The_RadiX

wow.. 10-15gb.. where do you get that kinda hosting and for how much??


Here in Aus it'd cost you a packet.. Don't know where abouts in the globe
you are though..


Here in AUS my host only gives me 1gb p/m and 50mb space... for AUD$399p/a
that's USD$198... bit of a ripoff I think. but unbelievably they're one of
the cheapest I have ever seen in AUS and best quality...









:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::


- Original Message -
From: Jennifer Downey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 14, 2002 7:46 AM
Subject: [PHP] PHP MySQL Hosting services


 Hi everyone,

 I am wondering if anyone has a good hosting service? I am currently with
 Aletia which has an excellant package good tech support but sometimes not
 very functional servers.

 My site has gone down at least 3 times within the last 20 days. Too many
for
 me.

 It has to be at least 50 mb disk space, 10 to 15gig /m transfer, of course
 PHP and MySQL, ftp, ssh or telnet, cgi/perl, free domain transfer, at
least
 15 POP3 email accounts, cron support.

 Thanks
 Jennifer
 --
 The sleeper has awaken






 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: globals in functions

2002-04-13 Thread The_RadiX

Just one thing...


Is there an easier way than having to manually place global in each
function...??


Other than passing by parameter?


Like is it possible to actually declare var's in PHP as global?




thx..





:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] limit posts and have a next page?

2002-04-06 Thread The_RadiX

Yes I have built many a forums and product listings/search engines like this..


simply make it check using COUNT how many rows there are total..


now let's say your viewing page 1..

so we can see listing 1 - 10 therefore the first offset is 1

so the next set will logically be 11-20

so with this info:

?
$page=(isset($HTTP_GET_VARS[page])?$HTTP_GET_VARS[page]?1);
$item_count=mysql_fetch_array(mysql_query(SELECT count(*) FROM tablename,$DB));
if($item_count-$page10) echo a href=.$PHP_SELF.?page=.($page+10).Next Page 
/a;
?


now as you can see I use $HTTP_GET_VARS[page] here so this means that the page will 
add in the GET var by itself as the user browses around the place..

For extra functionality: (code from before plus some new bits)

?
$page=(isset($HTTP_GET_VARS[page])?$HTTP_GET_VARS[page]?1);
$item_count=mysql_fetch_array(mysql_query(SELECT count(*) FROM tablename,$DB));
if($page10) echo a href=.$PHP_SELF.?page=.($page-10). Previous Page/a;
if($item_count-$page10) echo a href=.$PHP_SELF.?page=.($page+10).Next Page 
/a;
?

this simply adds a backward control to the form as well..


from here you can design it as you wish... generally placed in a table on bottom left 
and right, using this same system you can also expand it to create a numerical fast 
page index at the bottom with a listing of available pages (1 2 3 4 5 6) as links etc..


endless possibilities..





okay then... I hope I was able to help someone out here..






:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::




- Original Message - 
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 06, 2002 7:25 PM
Subject: Re: [PHP] limit posts and have a next page?


 On Saturday 06 April 2002 16:57, Hawk wrote:
  This is just speculations, but I thought I'd as well ask now before I get
  to work
  Lets say I have a news page, and I only want the last ten posts to show on
  it, then I ORDER BY id ASC LIMIT 10 right?
  but how do I add the next page?
  count rows from the database and see if its more than 10 lines, and then ?
  saw something about a MAX and a MIN mysql command, but how do I use it? and
  should I use it for that purpose? :)
  like... ORDER BY id ASC LIMIT 10 MIN(10) MAX(20) or something?
  I dont know really.. just speculations as I said :)
 
 Rather than indulging in idle speculation, consult the mysql manual :)
 
 For the first 10:
 
   ... ORDER BY id ASC LIMIT 0, 10 
 
 
 For the next 10:
 
   ... ORDER BY id ASC LIMIT 10, 10 
 
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 Nothing is so firmly believed as that which we least know.
 -- Michel de Montaigne
 */
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php