Re: [PHP] Session variables does not get sent

2004-09-05 Thread Marek Kilimajer
Dre wrote:
and by the way ..
I'm using MS Windows XP Pro. which I do believe that it has some hand in the
problem :)
Like you did not change session.save_path setting in php.ini from /tmp 
to whatever it is supposed to be on windows.


"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I do know this
and what happen is that the $_SESSION array become empty once I redirect
from the login page (after login) to another members' area page .. !!
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Dre wrote:
I don't know why but session variables does not get posted .. is there
any
thing in the php.ini that I should configure as
I can't find any thing wrong in the code I'm using !!
Session variables are not posted, they are kept on the server. Only the
session id is sent as a cookie, get or post variable. Session variables
are available in $_SESSION array

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


Re: [PHP] Session variables does not get sent

2004-09-05 Thread Peter Brodersen
On Mon, 6 Sep 2004 13:33:02 +0800, in php.general
[EMAIL PROTECTED] (Jason Wong) wrote:

>>   $username = trim(addslashes($_POST['user_name']));
>>   $pass = trim(addslashes($_POST['password']));
>
>addslashes() is not needed as you're performing SELECT query and not an INSERT 
>query.

How did you come up with that? The escape mechanism is the same for
SELECT and INSERT.

addslashes() is not needed if magic_quotes is enabled, though. But if
it isn't, it could be easy to login as another user, e.g. post:

other_user' OR user_name = 'foo

.. as user_name.

In that case the attacker could login as other_user.

-- 
- Peter Brodersen

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread Jason Wong
Please do not top post.

On Monday 06 September 2004 06:53, Dre wrote:

As well as what everybody else has said ...

>   $username = trim(addslashes($_POST['user_name']));
>   $pass = trim(addslashes($_POST['password']));

addslashes() is not needed as you're performing SELECT query and not an INSERT 
query.

>$sql = "SELECT * FROM  members_webdata WHERE user_name='".$username."'
> AND password='".$pass."'";

$sql = "SELECT * FROM  members_webdata WHERE user_name='$username' AND 
password='$pass'";

Much easier on the eyes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Of course you have a purpose -- to find a purpose.
*/

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread John Nichel
Dre wrote:
yes I'm sure
Won't hurt to echo it out.
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-05 Thread php-list
Thanks Anders and Daniel. Daniel, I like your approach. I want to make it as
secure as possible. I'm going to place the files outside the web directory
and use authentication to approve that the user can download some particular
song. I didn't know you could do a forced download. I will definitely have
to try that. Thanks again.

Nilaab


-Original Message-
From: Daniel Schierbeck [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 5:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

[EMAIL PROTECTED] wrote:

> Hello everyone,
> 
>  
> 
> I want to build a music site, all copyrights intact, and I want users to
be
> able to download mp3 or realplayer files using a one-click link. When they
> click on a link they will simply be given a typical download window to
save
> that music file. How do I go about doing that and how should my file
> structure work? What should the link include? Is it possible to just say,
> for example, http://somesite.com/music/something.mp3?
If you want more control over the files you could have the mp3's in a 
private directory, then using PHP to force a download. There are some 
other threads about the Content-Type header, which is probably what 
you're looking for

Imagine that your file, 3416.mp3 is in /songs. 3416 is the song ID, so 
you can grab info such as artist, album and song name from a DB. Below 
is download.php, to download 3416.mp3, you should type 
download.php?file=3416





> Also, if I wanted them
> to listen to streamed music does PHP have any specialized functions I
could
> use to achieve that? 

You should take a look at the Ming library and the mp3 stream function 
(http://www.php.net/manual/en/function.swfmovie.streammp3.php). It's a 
bit tricky though, but i can't think of anything else.

-- 
Daniel Schierbeck

-- 
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] Session variables does not get sent

2004-09-05 Thread Dre
yes I'm sure

"John Nichel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dre wrote:
> 
> >   if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> >   {
> >   header('Location: index.php');
> >include("login_form");
> >exit();
> >   }
>
> That include is useless, as you're forwarding to another document right
> before it.
>
> >   else{
> >include("db.php");
> >$sql = "SELECT * FROM  members_webdata WHERE
user_name='".$username."'
> > AND password='".$pass."'";
> >$result = mysql_query($sql);
> >$num_return = mysql_num_rows($result);
> >
> >if($num_return ==1)
> >{
> > $row = mysql_fetch_array($result);
> >  $_SESSION['uname'] = $row['user_name'];
>
> Are you sure $row['user_name'] has value?
>
> -- 
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread John Nichel
Dre wrote:

  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
  {
  header('Location: index.php');
   include("login_form");
   exit();
  }
That include is useless, as you're forwarding to another document right 
before it.

  else{
   include("db.php");
   $sql = "SELECT * FROM  members_webdata WHERE user_name='".$username."'
AND password='".$pass."'";
   $result = mysql_query($sql);
   $num_return = mysql_num_rows($result);
   if($num_return ==1)
   {
$row = mysql_fetch_array($result);
 $_SESSION['uname'] = $row['user_name'];
Are you sure $row['user_name'] has value?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session variables does not get sent

2004-09-05 Thread Dre
and by the way ..
I'm using MS Windows XP Pro. which I do believe that it has some hand in the
problem :)


"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I do know this
> and what happen is that the $_SESSION array become empty once I redirect
> from the login page (after login) to another members' area page .. !!
>
>
> "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Dre wrote:
> > > I don't know why but session variables does not get posted .. is there
> any
> > > thing in the php.ini that I should configure as
> > > I can't find any thing wrong in the code I'm using !!
> > >
> >
> > Session variables are not posted, they are kept on the server. Only the
> > session id is sent as a cookie, get or post variable. Session variables
> > are available in $_SESSION array

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread Dre
this is the username/password validation script which receives the user name
and password from a regular form
and they are sent correctly

logme_in.php
//==
==
"."CLICK HERE TO GO TO MEMBERS SECTION";
 echo "";
 //session_write_close();
// header('Location: members/main.php'."?_SESSION['uname']=".
$row['user_name']);
   }
   else {
   }
  }

?>
//
this is the page I try to open after logging in but it behaves like if I'm
not logged at all

members/main.php
//


...

//
//

"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I do know this
> and what happen is that the $_SESSION array become empty once I redirect
> from the login page (after login) to another members' area page .. !!
>
>
> "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Dre wrote:
> > > I don't know why but session variables does not get posted .. is there
> any
> > > thing in the php.ini that I should configure as
> > > I can't find any thing wrong in the code I'm using !!
> > >
> >
> > Session variables are not posted, they are kept on the server. Only the
> > session id is sent as a cookie, get or post variable. Session variables
> > are available in $_SESSION array

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



Re: [PHP] Session again !!!

2004-09-05 Thread Chris Shiflett
--- Dre <[EMAIL PROTECTED]> wrote:
> $username = trim(addslashes($_POST['user_name']));
> $pass = trim(addslashes($_POST['password']));

I recommend using mysql_escape_string() or mysql_real_escape_string()
instead of addslashes().

> if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> {
>  header('Location: index.php');
>  include("login_form");
>  exit();
> }

The Location header requires an absolute URL. Also, including login_form
wouldn't display the form, even if you remembered to add the file
extension.

>  header('Location: /members/main.php');

Same thing as above with this header.

>  if ($_SESSION['uname'] = = "")

There is no space in the == comparison operator.

> header('Location: ../../index.php');

Same thing again with this header.

> After I login using the correct user name and password I get
> always re-directed to that index page as if I'm not logged in

Instead of redirecting when someone isn't logged in, use the following
code instead:

echo "Cookie: [{$_COOKIE['PHPSESSID']}]";
echo "URL: [{$_GET['PHPSESSID']}]";

It is likely that the browser is not identifying itself. Do you have
cookies enabled?

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread John Nichel
Dre wrote:
I do know this
and what happen is that the $_SESSION array become empty once I redirect
from the login page (after login) to another members' area page .. !!
Are you starting the session on every page?  How are you sending the 
session id?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] problem with front page files downloaded to dev machine OT

2004-09-05 Thread Sam Hobbs
"John Nichel" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> How about middle posting?

I have noticed that usually when people say things like "don't top post", 
the reasons provided for not doing it apply equally as much to 
bottom-posting. What they really maen is that they want us to snip the 
extraneous portions and then reply inline ("middle posting"), but they don't 
say that.

I really, really feel that people would be more effective if they did not 
say things such as simply "Please don't top post.". I think comments such as 
that, without explanation, is the type of thing that starts flames. It is 
entirely possible to be more reasonable. Sure it might require an extra 
minute of time, but the world would be so much nicer if people would do more 
things like that.

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread Marek Kilimajer
Dre wrote:
I do know this
and what happen is that the $_SESSION array become empty once I redirect
from the login page (after login) to another members' area page .. !!
That means you are loosing your session. Is the session id sent? Is the 
session file (usualy in /tmp) created?

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Dre wrote:
I don't know why but session variables does not get posted .. is there
any
thing in the php.ini that I should configure as
I can't find any thing wrong in the code I'm using !!
Session variables are not posted, they are kept on the server. Only the
session id is sent as a cookie, get or post variable. Session variables
are available in $_SESSION array

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


Re: [PHP] Session variables does not get sent

2004-09-05 Thread Dre
I do know this
and what happen is that the $_SESSION array become empty once I redirect
from the login page (after login) to another members' area page .. !!


"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dre wrote:
> > I don't know why but session variables does not get posted .. is there
any
> > thing in the php.ini that I should configure as
> > I can't find any thing wrong in the code I'm using !!
> >
>
> Session variables are not posted, they are kept on the server. Only the
> session id is sent as a cookie, get or post variable. Session variables
> are available in $_SESSION array

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



[PHP] Re: Session again !!!

2004-09-05 Thread Torsten Roehr
"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I added  print_r($_SESSION); after the session start();
> and the printed text was
>
> Array( )

Which means that your session value is NOT set. Your if/else should look
like this:

if (!isset($_SESSION['uname'])) {
header('Location: ../../index.php');
exit();
} else {
// output contents
}

Regards, Torsten Roehr

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



Re: [PHP] Session variables does not get sent

2004-09-05 Thread Marek Kilimajer
Dre wrote:
I don't know why but session variables does not get posted .. is there any
thing in the php.ini that I should configure as
I can't find any thing wrong in the code I'm using !!
Session variables are not posted, they are kept on the server. Only the 
session id is sent as a cookie, get or post variable. Session variables 
are available in $_SESSION array

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


Re: [PHP] ERROR IN THIS CODE

2004-09-05 Thread Jorge
$id = ( isset($_GET['id']) )?$_GET['id']:'1';
this was the solution.
- Original Message - 
From: "John Nichel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 05, 2004 9:36 PM
Subject: Re: [PHP] ERROR IN THIS CODE


Jorge wrote:
I resolve the problem.
And the solution was?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.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] ERROR IN THIS CODE

2004-09-05 Thread John Nichel
Jorge wrote:
I resolve the problem.
And the solution was?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session again !!!

2004-09-05 Thread Jason Wong
On Sunday 05 September 2004 22:24, Dre wrote:

>  $_SESSION['uname'] = $username;

session_write_close() before you redirect.

>  header('Location: /members/main.php');

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
There's always room to merge behind a diesel bus
-- Murphy's Driving Laws n4
*/

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



[PHP] Session variables does not get sent

2004-09-05 Thread Dre
I don't know why but session variables does not get posted .. is there any
thing in the php.ini that I should configure as
I can't find any thing wrong in the code I'm using !!

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



Re: [PHP] ERROR IN THIS CODE

2004-09-05 Thread Jorge
I resolve the problem.
Thank you for all.
- Original Message - 
From: "Jorge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 05, 2004 6:23 PM
Subject: [PHP] ERROR IN THIS CODE

the problem is that when i do a echo shows me:
"SELECT * FROM oposicions WHERE id = ''" 

- Original Message - 
From: "raditha dissanayake" <[EMAIL PROTECTED]>
To: "Jorge" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, September 05, 2004 6:01 PM
Subject: Re: Fw: [PHP] ERROR IN THIS CODE


Is this part of a guessing game?
do you want us to guess the error message you are seeing?
Jorge wrote:
include('include/conexion.php');
   include('include/conf.php');
   $sql = "SELECT * FROM 
oposicions WHERE id = '$id'";> I think that the 
problem is here.

   $result = mysql_query($sql, 
$link);

   while( 
($row=mysql_fetch_object($result)) ) {
   $nome = $row->nome;

In my database exist the table oposicions with a field called id.My 
php version es 4.3.38 and of mysql is 3.23.58

thank you in advance

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
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: installing PHP on winXP

2004-09-05 Thread Gerben
I finially found the solution to my problem (see also 
http://www.sitepoint.com/forums/showthread.php?t=92314). I downloaded the 
php4apache dll from http://www.kromann.info/php4.php and it's now working 
like a charm.

thanks

"Gerben" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> hi there
>
> I have a problem with installing PHP on my winXp with apache server using 
> the installer. I'm missing the sapi directory ("c:/progra~1/php/sapi/") 
> with in it the php4apache.dll file which apache misses.
> The weird thing is that I've succesfully installed php and apache on this 
> same machine, but now it's not working.
> I've copied my httpd.conf and php.ini files from my last (succesfull) 
> installation.
>
> I have apache 1.3.28 and php 4.3.4 (but the latest version 4.3.8 also 
> doesn't work)
>
> Please help |:-( 

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



[PHP] Re: Session again !!!

2004-09-05 Thread Dre
I added  print_r($_SESSION); after the session start();
and the printed text was

Array( )

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



[PHP] please ignore my last question

2004-09-05 Thread Felix Ang
Dear all, 

 

Please ignore my last question.

 

I found out that simple echo on known variable can't work either. It's
probably an installation problem.

 

Thanks,

Felix Ang



[PHP] Re: OOP in PHP 5 won't work under IIS 5.1

2004-09-05 Thread M. Sokolewicz
How does it not work? Does it show errors? or a blank screen? does IIS 
crash...?

Felix Ang wrote:
I installed PHP 5 and tried phpinfo(). It worked. But then I tried OOP
sample from www.php.net   , like:
 



class MyClass { 

   private $Hello = "Hello, World!\n"; 

   protected $Bar = "Hello, Foo!\n"; 

   protected $Foo = "Hello, Bar!\n"; 

 

   function printHello() { 

   print "MyClass::printHello() " . $this->Hello; 

   print "MyClass::printHello() " . $this->Bar; 

   print "MyClass::printHello() " . $this->Foo; 

   } 

} 

 

class MyClass2 extends MyClass { 

   protected $Foo; 



   function printHello() { 

   MyClass::printHello();  /* Should print */ 

   print "MyClass2::printHello() " . $this->Hello; /* Shouldn't print
out anything */ 

   print "MyClass2::printHello() " . $this->Bar;  /* Shouldn't print
(not declared)*/ 

   print "MyClass2::printHello() " . $this->Foo;  /* Should print */ 

   } 

} 

 

$obj = new MyClass(); 

print $obj->Hello;  /* Shouldn't print out anything */ 

print $obj->Bar;/* Shouldn't print out anything */ 

print $obj->Foo;/* Shouldn't print out anything */ 

$obj->printHello(); /* Should print */ 

 

$obj = new MyClass2(); 

print $obj->Hello;  /* Shouldn't print out anything */ 

print $obj->Bar;/* Shouldn't print out anything */ 

print $obj->Foo;/* Shouldn't print out anything */ 

$obj->printHello(); 

?>
 

It won't work.
 

Does anyone have the same problem?
 

I use PHP 5 with IIS 5.1
 

Brgds,
Felix Ang
 

 


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


[PHP] Re: ERROR IN THIS CODE

2004-09-05 Thread Daniel Schierbeck
Jorge wrote:
the problem is that when i do a echo shows me:
 "SELECT * FROM oposicions WHERE id = ''" 

- Original Message - 
From: "raditha dissanayake" <[EMAIL PROTECTED]>
To: "Jorge" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, September 05, 2004 6:01 PM
Subject: Re: Fw: [PHP] ERROR IN THIS CODE


Is this part of a guessing game?
do you want us to guess the error message you are seeing?
Jorge wrote:

include('include/conexion.php');
  include('include/conf.php');
  $sql = "SELECT * FROM 
oposicions WHERE id = '$id'";> I think that the 
problem is here.

  $result = mysql_query($sql, 
$link);

  while( 
($row=mysql_fetch_object($result)) ) {
  $nome = $row->nome;

In my database exist the table oposicions with a field called id.My 
php version es 4.3.38 and of mysql is 3.23.58

thank you in advance

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Try using $_GET['id'] instead of $id.
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] tool to increase your web site?s profitability

2004-09-05 Thread Octavian Rasnita
Does this list have a moderator?

Teddy

From: "theeb basheer" <[EMAIL PROTECTED]>

Dear Friend,

Would you be excited if I told that YOU COULD EARN $3,500 EVERY DAY from a
web site that gets only 100 visitors a day... and sells a product that costs
less than $150?

You could be earning over $100,000 every month!

This isn't hype. And this certainly is no joke! It's rare that I am this
impressed by a marketing technique... but this literally blew my mind! This
is information that we are sharing with our subscribers only -- so listen
up!

I watched in utter amazement as this guy (who we'll call "Mr. H" for the
moment) turned...

100 visitors a day into $1,277,500 a year in profits!

... and he's just starting out!

Get this -- he expects to be earning $10,000,000 a year when he's finished
implementing this SIMPLE, yet totally INGENIOUS MARKETING STRATEGY!

This isn't about banner advertising... search engines... or newsgroups. And
it's certainly not about some rare, high priced product... or huge volumes
of traffic. It's about none of that.

This guy has developed AN ENTIRELY NEW WAY TO MARKET YOUR BUSINESS on the
Internet! And he's blown the gimmicky theories of those "so-called"
marketing experts right out of the water!

He's proven that -- using this one totally brilliant marketing strategy -- 
the small business owner can EARN HUGE PROFITS CONSISTENTLY! Day after day,
month after month... the sales just keep rolling in!

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



[PHP] Re: installing PHP on winXP

2004-09-05 Thread Gerben
my install-paths are still the same. the real problem (I think) is that I'm 
missing the php4apache dll for some peculiar reason ||:-|
Thanks anyway. I'll try downloading the zip file and doing it manually.


"Chris Martin" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Gerben wrote:
>> hi there
>>
>> I have a problem with installing PHP on my winXp with apache server using 
>> the installer. I'm missing the sapi directory ("c:/progra~1/php/sapi/") 
>> with in it the php4apache.dll file which apache misses.
>> The weird thing is that I've succesfully installed php and apache on this 
>> same machine, but now it's not working.
>> I've copied my httpd.conf and php.ini files from my last (succesfull) 
>> installation.
>>
>> I have apache 1.3.28 and php 4.3.4 (but the latest version 4.3.8 also 
>> doesn't work)
>>
>> Please help |:-(
>
> Are your paths the same as they were in your last install? If not, you 
> need to update the conf files. Especially your modules directory
>
> You might read along the PHP manual install instructions and verify 
> everythings in the right place. I always prefer the manual install anyway. 
> I usually place php4apache.dll (and php4ts.dll) in the Apache root, or 
> Apache/modules directory
>
> If all else fails you could uninstall and try the WAMP bundle.
>
> -- 
> Chris Martin
> Web Developer
> Open Source & Web Standards Advocate
> http://www.chriscodes.com/ 

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



[PHP] Re: tool to increase your web site’s profitability

2004-09-05 Thread Daniel Schierbeck
Theeb Basheer wrote:
Dear Friend,
Would you be excited if I told that YOU COULD EARN $3,500 EVERY DAY from a web site 
that gets only 100 visitors a day... and sells a product that costs less than $150?
You could be earning over $100,000 every month!
This isn't hype. And this certainly is no joke! It's rare that I am this impressed by 
a marketing technique... but this literally blew my mind! This is information that we 
are sharing with our subscribers only -- so listen up!
I watched in utter amazement as this guy (who we'll call "Mr. H" for the moment) 
turned...
100 visitors a day into $1,277,500 a year in profits!
... and he's just starting out!
Get this -- he expects to be earning $10,000,000 a year when he's finished 
implementing this SIMPLE, yet totally INGENIOUS MARKETING STRATEGY!
This isn't about banner advertising... search engines... or newsgroups. And it's 
certainly not about some rare, high priced product... or huge volumes of traffic. It's 
about none of that.
This guy has developed AN ENTIRELY NEW WAY TO MARKET YOUR BUSINESS on the Internet! And he's 
blown the gimmicky theories of those "so-called" marketing experts right out of the 
water!
He's proven that -- using this one totally brilliant marketing strategy -- the small 
business owner can EARN HUGE PROFITS CONSISTENTLY! Day after day, month after month... 
the sales just keep rolling in!
What's his secret? I can't tell you here. There's not enough room in this e-mail!
It took a 90-minute audiotape to capture the original interview with this marketing 
genius... and ANOTHER tape to answer the questions of 130 participants!
However, you're in luck! For the FIRST TIME EVER, "Mr. H's" blueprint for success is 
being released...
Like I said before, it's really rare that I endorse marketing material... but as soon 
as I heard his unique success formula, I knew that I had a responsibility to share 
this EXTREMELY PROFITABLE information with our subscribers.
This guy has really proven that ANY SMALL ONLINE BUSINESS can earn big money... using 
the right approach!
To begin learning "Mr. H's" proven techniques and start making your web site a huge 
success story, I highly recommend that you check out
http://www.marketingtips.com/t.cgi/823254/directsales
And don't hesitate! This limited-time opportunity to discover his secrets will only be 
available for a few more days!
Sincerely,
theeb basheer
Mooo!
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session again !!!

2004-09-05 Thread Dre
thanks

"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Dre" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I really did
> > and it behaves the same
> >
> > I tried isset() also but there is no good it still does not work !!!
> >
> >
> > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Try use
> > >
> > > if(empty($_SESSION['uname'])
> > >
> > > instead
> > >
> > > if($_SESSION['uname'] = = "")
> > >
> > >
> > > Afan
>
> You should try a bit more debugging than just posting your code here. Try
> this at the top of your second page:
>
> print_r($_SESSION);
>
> Then you will see which values are set in $_SESSION and you can check if
> that is what you are expecting or not.
>
> Another idea would be using a ready made authentication/permission package
> like PEAR::LiveUser:
> http://pear.php.net/package/LiveUser
>
> Regards, Torsten Roehr

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



[PHP] OOP in PHP 5 won't work under IIS 5.1

2004-09-05 Thread Felix Ang
I installed PHP 5 and tried phpinfo(). It worked. But then I tried OOP
sample from www.php.net   , like:

 

Hello; 

   print "MyClass::printHello() " . $this->Bar; 

   print "MyClass::printHello() " . $this->Foo; 

   } 

} 

 

class MyClass2 extends MyClass { 

   protected $Foo; 



   function printHello() { 

   MyClass::printHello();  /* Should print */ 

   print "MyClass2::printHello() " . $this->Hello; /* Shouldn't print
out anything */ 

   print "MyClass2::printHello() " . $this->Bar;  /* Shouldn't print
(not declared)*/ 

   print "MyClass2::printHello() " . $this->Foo;  /* Should print */ 

   } 

} 

 

$obj = new MyClass(); 

print $obj->Hello;  /* Shouldn't print out anything */ 

print $obj->Bar;/* Shouldn't print out anything */ 

print $obj->Foo;/* Shouldn't print out anything */ 

$obj->printHello(); /* Should print */ 

 

$obj = new MyClass2(); 

print $obj->Hello;  /* Shouldn't print out anything */ 

print $obj->Bar;/* Shouldn't print out anything */ 

print $obj->Foo;/* Shouldn't print out anything */ 

$obj->printHello(); 

?>

 

It won't work.

 

Does anyone have the same problem?

 

I use PHP 5 with IIS 5.1

 

Brgds,

Felix Ang

 

 



[PHP] ERROR IN THIS CODE

2004-09-05 Thread Jorge
the problem is that when i do a echo shows me:

 "SELECT * FROM oposicions WHERE id = ''" 


- Original Message - 
From: "raditha dissanayake" <[EMAIL PROTECTED]>
To: "Jorge" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, September 05, 2004 6:01 PM
Subject: Re: Fw: [PHP] ERROR IN THIS CODE


> Is this part of a guessing game?
> do you want us to guess the error message you are seeing?
> 
> Jorge wrote:
> 
>>
>> include('include/conexion.php');
>>include('include/conf.php');
>>
>>$sql = "SELECT * FROM 
>> oposicions WHERE id = '$id'";> I think that the 
>> problem is here.
>>
>>
>>$result = mysql_query($sql, 
>> $link);
>>
>>while( 
>> ($row=mysql_fetch_object($result)) ) {
>>$nome = $row->nome;
>>
>>
>> In my database exist the table oposicions with a field called id.My 
>> php version es 4.3.38 and of mysql is 3.23.58
>>
>> thank you in advance
>>
> 
> 
> -- 
> Raditha Dissanayake.
> 
> http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
> Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
> Graphical User Inteface. Just 128 KB | with progress bar.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Re: [PHP] Slow upload

2004-09-05 Thread Simon Rigét
  but for such files PHP may take up a lot of
> clocks and ram and thereby slow down on a busy server.
>--
> Raditha Dissanayake.

Shure you are right about that.
But it is'nt 10-20 times harder for the server to upload then to download.
I was thinking it was a problem in PHP with flushing a buffer og a buffer
size or somthing...??
Any idears??

/Simon Rigét

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



Re: [PHP] Goosebump ? ? New feature / implementaion in PHP

2004-09-05 Thread Marek Kilimajer
Manoj Kumar wrote:
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what is procedure to include a new module in php source(php cvs ) , so it will available free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com


Publish it at PECL: http://pecl.php.net/account-request.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Session again !!!

2004-09-05 Thread Dre
the code I use is
//=
 
 
 ... other html code
 
//=
there are no extra spaces between the equal signs, and it does not give any
errors, it just acts like if I'm not logged in
is there any settings in the php.ini that may affect this ?!!!

"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi ..
>
> I'm still working on my members login script.
>
> I'm using a simple username/password login form that calls the following
> login script
> //=
>$username = trim(addslashes($_POST['user_name']));
>   $pass = trim(addslashes($_POST['password']));
>
>   if((empty($_POST['user_name'])) || (empty($_POST['password'])))
>   {
>   header('Location: index.php');
>include("login_form");
>exit();
>
>   }
>   else{
>include("db.php");
>$sql = "SELECT * FROM  members_data WHERE user_name='".$username."' AND
> password='".$pass."'";
>$result = mysql_query($sql);
>$num_return = mysql_num_rows($result);
>
>if($num_return ==1)
>{
> $row = mysql_fetch_array($result);
>  //session_register('uname');
>
>  $_SESSION['uname'] = $username;
>  header('Location: /members/main.php');
>}
>else {
>   }
>   }
> ?>
> //=
>
> the login scrip works fine .. and it directs me to the correct landing
page
>
> The problem occures when I tried to secure the members area pages using
the
> following code in the begining of each page
> //=
>   if($_SESSION['uname'] = = "")
>  {header('Location: ../../index.php');
>   exit();
>  }
>  else{}
> ?>
> 
> ... other html code
> 
> //=
> After I login using the correct user name and password I get always
> re-directed to that index page as if I'm not logged in
>
> I'm really so new with the sessions usage so I can't figure out what do I
> miss here
> any help would be appreciated.
>
> Thanks in advance

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



Re: [PHP] Session again !!!

2004-09-05 Thread Dre
it does not actually exist in the real code
I just added it to show that there are 2 equal signs in there
"Andre Dubuc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> In your code:
>
>  if($_SESSION['uname'] = = "")
>   ^
>
> Get rid of that extra space bewteen the ==
> Hth, Andre
>
>
>
> On Sunday 05 September 2004 11:23 am, Dre wrote:
> > I really did
> > and it behaves the same
> >
> > I tried isset() also but there is no good it still does not work !!!
> >
> >
> > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Try use
> > >
> > > if(empty($_SESSION['uname'])
> > >
> > > instead
> > >
> > > if($_SESSION['uname'] = = "")
> > >
> > >
> > > Afan
> > >
> > > Dre wrote:
> > > >Hi ..
> > > >
> > > >I'm still working on my members login script.
> > > >
> > > >I'm using a simple username/password login form that calls the
following
> > > >login script
> > > >//=
> > > > > > >  $username = trim(addslashes($_POST['user_name']));
> > > >  $pass = trim(addslashes($_POST['password']));
> > > >
> > > >  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> > > >  {
> > > >  header('Location: index.php');
> > > >   include("login_form");
> > > >   exit();
> > > >
> > > >  }
> > > >  else{
> > > >   include("db.php");
> > > >   $sql = "SELECT * FROM  members_data WHERE
user_name='".$username."'
> >
> > AND
> >
> > > >password='".$pass."'";
> > > >   $result = mysql_query($sql);
> > > >   $num_return = mysql_num_rows($result);
> > > >
> > > >   if($num_return ==1)
> > > >   {
> > > >$row = mysql_fetch_array($result);
> > > > //session_register('uname');
> > > >
> > > > $_SESSION['uname'] = $username;
> > > > header('Location: /members/main.php');
> > > >   }
> > > >   else {
> > > >  }
> > > >  }
> > > >?>
> > > >//=
> > > >
> > > >the login scrip works fine .. and it directs me to the correct
landing
> >
> > page
> >
> > > >The problem occures when I tried to secure the members area pages
using
> >
> > the
> >
> > > >following code in the begining of each page
> > > >//=
> > > > > > > if($_SESSION['uname'] = = "")
> > > > {header('Location: ../../index.php');
> > > >  exit();
> > > > }
> > > > else{}
> > > >?>
> > > >
> > > >... other html code
> > > >
> > > >//=
> > > >After I login using the correct user name and password I get always
> > > >re-directed to that index page as if I'm not logged in
> > > >
> > > >I'm really so new with the sessions usage so I can't figure out what
do
> > > > I miss here
> > > >any help would be appreciated.
> > > >
> > > >Thanks in advance


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



Re: [PHP] Session again !!!

2004-09-05 Thread Torsten Roehr
"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I really did
> and it behaves the same
>
> I tried isset() also but there is no good it still does not work !!!
>
>
> "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Try use
> >
> > if(empty($_SESSION['uname'])
> >
> > instead
> >
> > if($_SESSION['uname'] = = "")
> >
> >
> > Afan

You should try a bit more debugging than just posting your code here. Try
this at the top of your second page:

print_r($_SESSION);

Then you will see which values are set in $_SESSION and you can check if
that is what you are expecting or not.

Another idea would be using a ready made authentication/permission package
like PEAR::LiveUser:
http://pear.php.net/package/LiveUser

Regards, Torsten Roehr

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



[PHP] here are Corey’s e-mail trade secrets

2004-09-05 Thread theeb basheer
Hi,

It's not often that I am surprised by something I see online. And it's even more rare 
that I stumble upon a book that causes me to literally stop what I am doing and write 
a letter to everyone I know.

But I just discovered that Corey Rudl -- probably one of the best-known and most 
well-respected experts on the subject of e-mail marketing -- has just released all the 
details behind how he used e-mail marketing to make $213,705 and attract 41,409 new 
opt-in subscribers in the last 30 days alone!

The truth is, I still can't figure out exactly WHY Corey has made this information 
available, since it gives everyone -- including his competitors -- the chance to steal 
the secrets he's spent the last 6 years perfecting!

He shows you everything from growing a super-responsive opt-in list as quickly as 
possible, to generating the highest possible revenue from every e-mail you send, to 
protecting your business from being wrongly accused of spamming and knowing how to 
effectively deal with it if you are...

He also teaches you when you should mail, how you should mail, what you should write, 
and when you should send it so that you are guaranteed the best possible results from 
each and every e-mail...

His years of testing are going to completely eliminate all of YOUR guesswork!

The thing is, the e-mail marketing industry HAS changed dramatically over the past few 
years. And while company after company has gone out of business just trying to keep up 
with all these changes, Corey has continued to generate over $2.4 million every year 
with e-mail marketing.

And this book shows you step-by-step what he did and how he did it so you can take his 
strategies and model them to create your own success.

With over 430+ pages that include tons of great real-life examples, I was especially 
impressed by the way Corey's book breaks down exactly HOW you can implement -- and 
test -- all the tips and techniques that he teaches into your own business.

I still think that Corey's going to regret giving all this information away, so I 
would advise you to grab this book while you can! It really does tell you everything 
you need to do to grow your business successfully with e-mail marketing. Find out more 
at:

http://www.marketingtips.com/emailsecrets/t.cgi/823254/

All the best...

theeb basheer

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



[PHP] Re: interface problem in PHP5

2004-09-05 Thread Torsten Roehr
"Erik franzén" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If you want to delete an object, when you have other references to it,
> you must use the & operator, otherwise the object will not be killed for
> all references.
>
> I tested without the &-operator, but that did not work
>
> The &-operator is still important in PHP5. Look at the folling example
>
>  $a = new stdclass;
> $b = $a;
> $c =& $a;
> ?>
>
> unsetting a will only kill a, b and c will still be "alive".
> setting a to null will kill c but not b
>
> /Erik

OK, but what about your interface problem? Could you solve it with this?:

>>>
I think you have to also define the arguments you want to use for item() in
your interface:
function item($a_iIndex);
<<<

Regards, Torsten Roehr

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



Re: [PHP] Session again !!!

2004-09-05 Thread raditha dissanayake
Dre wrote:
according to what little i know this should give you a parse error.
if($_SESSION['uname'] = = "")
   


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] tool to increase your web site’s profitability

2004-09-05 Thread theeb basheer
Dear Friend,

Would you be excited if I told that YOU COULD EARN $3,500 EVERY DAY from a web site 
that gets only 100 visitors a day... and sells a product that costs less than $150?

You could be earning over $100,000 every month!

This isn't hype. And this certainly is no joke! It's rare that I am this impressed by 
a marketing technique... but this literally blew my mind! This is information that we 
are sharing with our subscribers only -- so listen up!

I watched in utter amazement as this guy (who we'll call "Mr. H" for the moment) 
turned...

100 visitors a day into $1,277,500 a year in profits!

... and he's just starting out!

Get this -- he expects to be earning $10,000,000 a year when he's finished 
implementing this SIMPLE, yet totally INGENIOUS MARKETING STRATEGY!

This isn't about banner advertising... search engines... or newsgroups. And it's 
certainly not about some rare, high priced product... or huge volumes of traffic. It's 
about none of that.

This guy has developed AN ENTIRELY NEW WAY TO MARKET YOUR BUSINESS on the Internet! 
And he's blown the gimmicky theories of those "so-called" marketing experts right out 
of the water!

He's proven that -- using this one totally brilliant marketing strategy -- the small 
business owner can EARN HUGE PROFITS CONSISTENTLY! Day after day, month after month... 
the sales just keep rolling in!

What's his secret? I can't tell you here. There's not enough room in this e-mail!

It took a 90-minute audiotape to capture the original interview with this marketing 
genius... and ANOTHER tape to answer the questions of 130 participants!

However, you're in luck! For the FIRST TIME EVER, "Mr. H's" blueprint for success is 
being released...

Like I said before, it's really rare that I endorse marketing material... but as soon 
as I heard his unique success formula, I knew that I had a responsibility to share 
this EXTREMELY PROFITABLE information with our subscribers.

This guy has really proven that ANY SMALL ONLINE BUSINESS can earn big money... using 
the right approach!

To begin learning "Mr. H's" proven techniques and start making your web site a huge 
success story, I highly recommend that you check out

http://www.marketingtips.com/t.cgi/823254/directsales

And don't hesitate! This limited-time opportunity to discover his secrets will only be 
available for a few more days!

Sincerely,

theeb basheer

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



Re: Fw: [PHP] ERROR IN THIS CODE

2004-09-05 Thread raditha dissanayake
Is this part of a guessing game?
do you want us to guess the error message you are seeing?
Jorge wrote:
include('include/conexion.php');
   include('include/conf.php');
   $sql = "SELECT * FROM 
oposicions WHERE id = '$id'";> I think that the 
problem is here.

   $result = mysql_query($sql, 
$link);

   while( 
($row=mysql_fetch_object($result)) ) {
   $nome = $row->nome;

In my database exist the table oposicions with a field called id.My 
php version es 4.3.38 and of mysql is 3.23.58

thank you in advance

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session again !!!

2004-09-05 Thread Andre Dubuc
Hi,

In your code:

 if($_SESSION['uname'] = = "")
  ^

Get rid of that extra space bewteen the ==
Hth, Andre



On Sunday 05 September 2004 11:23 am, Dre wrote:
> I really did
> and it behaves the same
>
> I tried isset() also but there is no good it still does not work !!!
>
>
> "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Try use
> >
> > if(empty($_SESSION['uname'])
> >
> > instead
> >
> > if($_SESSION['uname'] = = "")
> >
> >
> > Afan
> >
> > Dre wrote:
> > >Hi ..
> > >
> > >I'm still working on my members login script.
> > >
> > >I'm using a simple username/password login form that calls the following
> > >login script
> > >//=
> > > > >  $username = trim(addslashes($_POST['user_name']));
> > >  $pass = trim(addslashes($_POST['password']));
> > >
> > >  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> > >  {
> > >  header('Location: index.php');
> > >   include("login_form");
> > >   exit();
> > >
> > >  }
> > >  else{
> > >   include("db.php");
> > >   $sql = "SELECT * FROM  members_data WHERE user_name='".$username."'
>
> AND
>
> > >password='".$pass."'";
> > >   $result = mysql_query($sql);
> > >   $num_return = mysql_num_rows($result);
> > >
> > >   if($num_return ==1)
> > >   {
> > >$row = mysql_fetch_array($result);
> > > //session_register('uname');
> > >
> > > $_SESSION['uname'] = $username;
> > > header('Location: /members/main.php');
> > >   }
> > >   else {
> > >  }
> > >  }
> > >?>
> > >//=
> > >
> > >the login scrip works fine .. and it directs me to the correct landing
>
> page
>
> > >The problem occures when I tried to secure the members area pages using
>
> the
>
> > >following code in the begining of each page
> > >//=
> > > > > if($_SESSION['uname'] = = "")
> > > {header('Location: ../../index.php');
> > >  exit();
> > > }
> > > else{}
> > >?>
> > >
> > >... other html code
> > >
> > >//=
> > >After I login using the correct user name and password I get always
> > >re-directed to that index page as if I'm not logged in
> > >
> > >I'm really so new with the sessions usage so I can't figure out what do
> > > I miss here
> > >any help would be appreciated.
> > >
> > >Thanks in advance

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



Re: [PHP] Slow upload

2004-09-05 Thread raditha dissanayake
Simon Rigét wrote:
Dos anyone know how to solve the problem of very slow file upload?
I think its a common problem, but I can't find a solution anyware.
(Upload 10 - 20 times slower then download, even on intranet)
php V 4.3.1 /Free BDS 4.8
 

upload going slower than download is common enough for the reason that 
the outbound pipes are usually narrower than the inbound pipe. However 
this shouldn't happen with in the intranet - unless your admin has 
introduced bandwidth throttling .

Normally you will be able to monitor the speed of upload in the LAN only 
for very large files - but for such files PHP may take up a lot of 
clocks and ram and thereby slow down on a busy server.

Simon Rigét
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] This is awesome

2004-09-05 Thread theeb basheer
Hi,

If you have been marketing on the Internet for any length of time, chances are you 
have heard of Corey Rudl. Corey is one of the most successful REAL-LIFE Internet 
marketing experts online today.

As one of my mentors, I have learned more about the hard- hitting Internet marketing 
strategies that really work directly from Corey than any other so-called Internet 
marketing expert. So when I saw Corey's newest idea it only took me a few minutes 
before I was once again amazed by the POWERFUL STRATEGIES he had uncovered.

I am talking about a monthly publication that gives you the NO BS EXAMPLES of real 
people making real money and the exact STEP-BY-STEP DETAILS of how they're doing it!

Corey introduces you to people just like you and me -- real people who are making real 
money on the Internet -- and shows you the exact strategies they have used to generate 
incomes in excess of $100,000 to $600,000 online every year... most of them working 
from home!

I was in his new private site just yesterday, and even though I've personally been 
marketing on the `Net for quite some time, I learned some killer new tricks from 
people like...

Robert who turned his $275 a week paycheck into a site of online investigative 
resources that takes him only 2 hours each day to run... while earning him OVER 
$250,000 A YEAR in profits!


Ellen, a work-at-home mom who generates a great income by simply selling her homemade 
soaps from her site!


Ken who made $300,000+ IN HIS SECOND YEAR OF BUSINESS by teaching people how to 
daytrade on the Internet... all from his beachfront condo in Hawaii.


Andy, who makes $600,000 a year educating others about the hairloss industry and 
showing people how he managed to reverse his own hairloss!


... and these are just a few of the people that have already been EXTENSIVELY 
INTERVIEWED for Corey's brand new private web site. With his monthly subscription you 
will be exposed to 2 additional interviews every single month.

IMPORTANT NOTE: These are not the typical amateur interviews... You will hear these 
people answer some extremely tough questions about the exact strategies, software, and 
tools they used to start, build, and grow their businesses to their current success. 
You'll even hear about the mistakes they made, and how they suggest YOU avoid them!

So if you want to skip the failing promotions and get a personal tour of REAL WEB 
SITES built by REAL PEOPLE making REAL PROFITS on the Internet, then go to...

http://dynamic.secretstotheirsuccess.com/t.cgi/823254

... and take advantage of the invaluable tips and tricks that these Internet successes 
reveal so that you can start applying them to your business today.

All the best,

P.S. As an extra bonus, you'll also have the opportunity to enter a special draw for a 
site review done by Corey and his team (valued at $5,000).

Each month, a member's site is drawn and then reviewed by Corey and his team, who 
dissect the site and give tips and tricks they can use to really accellerate their 
growth and sales.

PLUS! Even if your site isn't chosen, you get the benefit of seeing all of the 
profitable suggestions that Corey and his team make -- many of which will likely apply 
to your site, too!

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



Re: [PHP] Session again !!!

2004-09-05 Thread Dre
I really did
and it behaves the same

I tried isset() also but there is no good it still does not work !!!


"Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try use
>
> if(empty($_SESSION['uname'])
>
> instead
>
> if($_SESSION['uname'] = = "")
>
>
> Afan
>
>
>
> Dre wrote:
>
> >Hi ..
> >
> >I'm still working on my members login script.
> >
> >I'm using a simple username/password login form that calls the following
> >login script
> >//=
> > >  $username = trim(addslashes($_POST['user_name']));
> >  $pass = trim(addslashes($_POST['password']));
> >
> >  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> >  {
> >  header('Location: index.php');
> >   include("login_form");
> >   exit();
> >
> >  }
> >  else{
> >   include("db.php");
> >   $sql = "SELECT * FROM  members_data WHERE user_name='".$username."'
AND
> >password='".$pass."'";
> >   $result = mysql_query($sql);
> >   $num_return = mysql_num_rows($result);
> >
> >   if($num_return ==1)
> >   {
> >$row = mysql_fetch_array($result);
> > //session_register('uname');
> >
> > $_SESSION['uname'] = $username;
> > header('Location: /members/main.php');
> >   }
> >   else {
> >  }
> >  }
> >?>
> >//=
> >
> >the login scrip works fine .. and it directs me to the correct landing
page
> >
> >The problem occures when I tried to secure the members area pages using
the
> >following code in the begining of each page
> >//=
> > > if($_SESSION['uname'] = = "")
> > {header('Location: ../../index.php');
> >  exit();
> > }
> > else{}
> >?>
> >
> >... other html code
> >
> >//=
> >After I login using the correct user name and password I get always
> >re-directed to that index page as if I'm not logged in
> >
> >I'm really so new with the sessions usage so I can't figure out what do I
> >miss here
> >any help would be appreciated.
> >
> >Thanks in advance
> >
> >
> >

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



Re: [PHP] Session again !!!

2004-09-05 Thread Dre
I really did
and it behaves the same

I tried isset() also but there is no good it still does not work !!!


"Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try use
>
> if(empty($_SESSION['uname'])
>
> instead
>
> if($_SESSION['uname'] = = "")
>
>
> Afan
>
>
>
> Dre wrote:
>
> >Hi ..
> >
> >I'm still working on my members login script.
> >
> >I'm using a simple username/password login form that calls the following
> >login script
> >//=
> > >  $username = trim(addslashes($_POST['user_name']));
> >  $pass = trim(addslashes($_POST['password']));
> >
> >  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
> >  {
> >  header('Location: index.php');
> >   include("login_form");
> >   exit();
> >
> >  }
> >  else{
> >   include("db.php");
> >   $sql = "SELECT * FROM  members_data WHERE user_name='".$username."'
AND
> >password='".$pass."'";
> >   $result = mysql_query($sql);
> >   $num_return = mysql_num_rows($result);
> >
> >   if($num_return ==1)
> >   {
> >$row = mysql_fetch_array($result);
> > //session_register('uname');
> >
> > $_SESSION['uname'] = $username;
> > header('Location: /members/main.php');
> >   }
> >   else {
> >  }
> >  }
> >?>
> >//=
> >
> >the login scrip works fine .. and it directs me to the correct landing
page
> >
> >The problem occures when I tried to secure the members area pages using
the
> >following code in the begining of each page
> >//=
> > > if($_SESSION['uname'] = = "")
> > {header('Location: ../../index.php');
> >  exit();
> > }
> > else{}
> >?>
> >
> >... other html code
> >
> >//=
> >After I login using the correct user name and password I get always
> >re-directed to that index page as if I'm not logged in
> >
> >I'm really so new with the sessions usage so I can't figure out what do I
> >miss here
> >any help would be appreciated.
> >
> >Thanks in advance
> >
> >
> >

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



[PHP] Slow upload

2004-09-05 Thread Simon Rigét
Dos anyone know how to solve the problem of very slow file upload?
I think its a common problem, but I can't find a solution anyware.
(Upload 10 - 20 times slower then download, even on intranet)

php V 4.3.1 /Free BDS 4.8

Simon Rigét

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



Fw: [PHP] ERROR IN THIS CODE

2004-09-05 Thread Jorge
include('include/conexion.php');
   include('include/conf.php');
   $sql = "SELECT * FROM oposicions 
WHERE id = '$id'";> I think that the problem is here.

   $result = mysql_query($sql, 
$link);

   while( 
($row=mysql_fetch_object($result)) ) {
   $nome = $row->nome;

In my database exist the table oposicions with a field called id.My php 
version es 4.3.38 and of mysql is 3.23.58

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


Re: [PHP] Session again !!!

2004-09-05 Thread Afan Pasalic
Try use
if(empty($_SESSION['uname'])
instead 

if($_SESSION['uname'] = = "")
Afan

Dre wrote:
Hi ..
I'm still working on my members login script.
I'm using a simple username/password login form that calls the following
login script
//=

 if((empty($_POST['user_name'])) || (empty($_POST['password'])))
 {
 header('Location: index.php');
  include("login_form");
  exit();
 }
 else{
  include("db.php");
  $sql = "SELECT * FROM  members_data WHERE user_name='".$username."' AND
password='".$pass."'";
  $result = mysql_query($sql);
  $num_return = mysql_num_rows($result);
  if($num_return ==1)
  {
   $row = mysql_fetch_array($result);
//session_register('uname');
$_SESSION['uname'] = $username;
header('Location: /members/main.php');
  }
  else {
 }
 }
?>
//=
the login scrip works fine .. and it directs me to the correct landing page
The problem occures when I tried to secure the members area pages using the
following code in the begining of each page
//=


... other html code

//=
After I login using the correct user name and password I get always
re-directed to that index page as if I'm not logged in
I'm really so new with the sessions usage so I can't figure out what do I
miss here
any help would be appreciated.
Thanks in advance
 

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


[PHP] Session again !!!

2004-09-05 Thread Dre
Hi ..

I'm still working on my members login script.

I'm using a simple username/password login form that calls the following
login script
//=

//=

the login scrip works fine .. and it directs me to the correct landing page

The problem occures when I tried to secure the members area pages using the
following code in the begining of each page
//=


... other html code

//=
After I login using the correct user name and password I get always
re-directed to that index page as if I'm not logged in

I'm really so new with the sessions usage so I can't figure out what do I
miss here
any help would be appreciated.

Thanks in advance

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



[PHP] ERROR IN THIS CODE

2004-09-05 Thread Jorge
include('include/conexion.php');
include('include/conf.php');

$sql = "SELECT * FROM oposicions WHERE id = 
'$id'";> I think that the problem is here.

 
$result = mysql_query($sql, $link);

while( ($row=mysql_fetch_object($result)) 
) {
$nome = $row->nome;


In my database exist the table oposicions with a field called id.My php version es 
4.3.38 and of mysql is 3.23.58

thank you in advance





Re: [PHP] PHP site ?

2004-09-05 Thread raditha dissanayake
Lester Caine wrote:
Jack Gates wrote:
I replaced this:
$address = getenv("REMOTE_ADDR");
with this
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
and now I am getting exactly what I was trying to get.

This will work fine for networks that provide their own 'REMOTE_ADDR', 
but once proxies are in the way, you will see a proxy address rather 
than the real machine.
very true. Some 'nice' proxies will oblige by sending an X-Forwarded-For 
header .

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: !!Urgent .. Session Problem Solved ... But not completely

2004-09-05 Thread Torn
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Reply-To: "Dre" <[EMAIL PROTECTED]>
From: "Dre" <[EMAIL PROTECTED]>
Date: Sat, 4 Sep 2004 16:10:32 +0300
Subject: Re: !!Urgent .. Session Problem Solved ... But not completely


> > the errors are as follows
> > //=
> > Warning: session_start(): Cannot send session cookie - headers already
sent
> > by (output started at C:\Program Files\Apache
> > Group\Apache2\htdocs\ELBA\logme_in.php:1) in C:\Program Files\Apache
> > Group\Apache2\htdocs\ELBA\logme_in.php on line 2
> >
> > Warning: session_start(): Cannot send session cache limiter - headers
> > already sent (output started at C:\Program Files\Apache
> > Group\Apache2\htdocs\ELBA\logme_in.php:1) in C:\Program Files\Apache
> > Group\Apache2\htdocs\ELBA\logme_in.php on line 2
> >
> > //=
> >>//
> >>
> >>  >>  session_start();
> >>  include("db.php");
Does db.php starts with:
session_start()
?

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



Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-05 Thread Daniel Schierbeck
[EMAIL PROTECTED] wrote:
Hello everyone,
 

I want to build a music site, all copyrights intact, and I want users to be
able to download mp3 or realplayer files using a one-click link. When they
click on a link they will simply be given a typical download window to save
that music file. How do I go about doing that and how should my file
structure work? What should the link include? Is it possible to just say,
for example, http://somesite.com/music/something.mp3?
If you want more control over the files you could have the mp3's in a 
private directory, then using PHP to force a download. There are some 
other threads about the Content-Type header, which is probably what 
you're looking for

Imagine that your file, 3416.mp3 is in /songs. 3416 is the song ID, so 
you can grab info such as artist, album and song name from a DB. Below 
is download.php, to download 3416.mp3, you should type 
download.php?file=3416


	if (!isset($_GET['file']) or !file_exists('songs/' . $_GET['file'] . 
'.mp3')) {
		die("No file selected");
	} else {
		$file = $_GET['file'];
	}

$db = mysql_connect();
// More DB stuff
$artist = $row['artist']; // The artist name from the DB
$album  = $row['album']; // ...
$song   = $row['song']; // ...
$filename = $artist . '-' . $album . '-' . $song . '.mp3';
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize('songs/'.$file.'.mp3'));
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
readfile('songs/' . $file . 'mp3');
exit();
?>

Also, if I wanted them
to listen to streamed music does PHP have any specialized functions I could
use to achieve that? 
You should take a look at the Ming library and the mp3 stream function 
(http://www.php.net/manual/en/function.swfmovie.streammp3.php). It's a 
bit tricky though, but i can't think of anything else.

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


Re: [PHP] Re: Does any one else get this?

2004-09-05 Thread Paul Waring
I get bounces from both addresses mentioned, but not every time it
seems (must only happen why I reply to one of their questions and CC
them I think). I also used to get vacation messages off someone but
that's stopped now.

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



[PHP] Re: array_merge changed behaviour in Php5??

2004-09-05 Thread M. Sokolewicz
You can find more info about this here:
http://www.php.net/manual/en/migration5.incompatible.php
I2eptilex wrote:
Hi,
I came across a strange behaviour in array_merge since I installed php5.
I merge three arrays, one of them can be empty. So not an array at all.
In php 4.3.6 that I had before, there was no warning and the two first 
arrays were merged. In php5 on the other hand, there is a warning and my 
array is empty.
Is this behaviour wanted? Or is this just me having this problem?
I find it pretty ugly, either there is more than a warning, or at least 
the first two arrays should be merged and given back.

$array_1 = array('key1'=>'oranges','key2'=>'apples');
$array_2 = array('key3'=>'pears','key4'=>'tomatoes');
$array_3 = null;
$arr_gemerged = array_merge($array_1,$array_2,$array_3);
print_r($arr_gemerged);
Result on php4:
Array ( [key1] => oranges [key2] => apples [key3] => pears [key4] => 
tomatoes )

Result on php5:
Warning: array_merge() [function.array-merge]: Argument #3 is not an 
array in /Library/WebServer/Documents/regis24/admin/test_array_merge.php 
on line 7

I would define this behaviour as backwards incompatible. How about you?
Sebastian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: htmlentities and foreign characters from MS Word

2004-09-05 Thread I2eptileX
Well it seems you have a UTF-8 encoded text after your function. Use 
iconv to change it. See http://de3.php.net/manual/en/ref.iconv.php .

try doing this with your array before inserting it into the DB
foreach($insert_array as $key => $var){
$new_arr[$key] = iconv("UTF-8", "ISO-8859-1", $var);
}
It can be that your array has a different coding than UTF-8 check the 
manual for the htmlentities function, but i'm pretty shure that should 
solve it.

I2eptilex
Monty wrote:
I'm having a problem figuring out how to deal with foreign characters in
text that was copied from an MS Word document and pasted into a form field.
I'm not how sure this is getting stored in the MySQL database, but, when I
run htmlentities() on this text, each foreign character is converted into 2
other foreign characters that don't at all represent the original.
For example, a lowercase u with an umlat over it (ü) is somehow displayed as
an uppercase A with an umlat over it followed by the 1/4 symbol after parsed
by htmlentities(). A lowercase o with an ulmat displays as an uppercase A
with an umlat over it followed by the paragraph symbol. It seems that the
uppercase A w/umlat is a constant, and the next character changes.
The ord() function returns the same number for all of these foreign
characters: 195. So, I'm not sure what's happening with these foreign
characters, and if there's any way to convert them to proper htmlentities
before being displayed in a browser. I thought htmlentities would do this,
actually.
Thanks!
Monty.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] array_merge changed behaviour in Php5??

2004-09-05 Thread I2eptileX
Hi,
I came across a strange behaviour in array_merge since I installed php5.
I merge three arrays, one of them can be empty. So not an array at all.
In php 4.3.6 that I had before, there was no warning and the two first 
arrays were merged. In php5 on the other hand, there is a warning and my 
array is empty.
Is this behaviour wanted? Or is this just me having this problem?
I find it pretty ugly, either there is more than a warning, or at least 
the first two arrays should be merged and given back.

$array_1 = array('key1'=>'oranges','key2'=>'apples');
$array_2 = array('key3'=>'pears','key4'=>'tomatoes');
$array_3 = null;
$arr_gemerged = array_merge($array_1,$array_2,$array_3);
print_r($arr_gemerged);
Result on php4:
Array ( [key1] => oranges [key2] => apples [key3] => pears [key4] => 
tomatoes )

Result on php5:
Warning: array_merge() [function.array-merge]: Argument #3 is not an 
array in /Library/WebServer/Documents/regis24/admin/test_array_merge.php 
on line 7

I would define this behaviour as backwards incompatible. How about you?
Sebastian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-05 Thread Anders Ossowicki
Hi.

> What should the link include? Is it possible to just say,
> for example, http://somesite.com/music/something.mp3?

There shuoldn't be any problem in just writing the link. You could make the
syntax like this:
print "http://domain.com/link/to/your/file.mp3\"; title=\"Name of
your MP3 File\">";

>Also, if I wanted them
> to listen to streamed music does PHP have any >specialized functions I
could
> use to achieve that?

Not that i know of, but it is possible to make an audio player in
javascript. You can do a search on Google on that

Regards
Anders from DK

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