[PHP] Hmmm

2005-02-27 Thread Jason Bennett
I just installed a new MYSQL version 4.1 (from 4.0) and now none of my
PHP scripts work anymore.  They are all complaining about attempting to
login as root.  Normally, I referance a class like:

 

class DB

{

  function DB()

  {

$this-host = 127.0.0.1:3306;

$this-db = mydatabase;

$this-user = reader;

$this-pass = read123;

$this-link = mysql_connect($this-host, $this-user, $this-pass);

mysql_select_db($this-db);

 

  }

}

 

 

Now it seems it just doesn't want to work anymore.  They all worked
great on the old MySQL.

 

Does anyone have any ideas what I might have missed?

 

Thanks!

 

J.

 



RE: [PHP] Hmmm

2005-02-27 Thread Jason Bennett
Oooo.. good one.  I used the RPM install for MySQL.. can you point me in
the right direction for doing this?

Thanks!!

J.

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 27, 2005 9:40 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Hmmm

Jason Bennett wrote:
 I just installed a new MYSQL version 4.1 (from 4.0) and now none of my
 PHP scripts work anymore.  They are all complaining about attempting
to
 login as root.
snip

I'm going to guess that you didn't setup MySQL 4.1 to accept 'old-style'

passwords.

-- 
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



[PHP] Uploading a File

2005-02-26 Thread Jason Bennett
Hi all,

I'm having this problem trying to upload a file using PHP.  I am using
Apache (compiled from source) and PHP 5.0.3

The entire contents of the page is:

form method=post enctype=multipart/form-data action=/upload.php
INPUT TYPE=hidden name=MAX_FILE_SIZE value=52428800
input type=file name=myfile
input type=submit value=Begin Upload
/form


The entire script is:

?php

$uploaddir = /tmp;
$uploadfile = $uploaddir . uploaded.file;

if (move_uploaded_file($_FILES['myfile']['tmp_name'], $uploadfile))
{
  echo Complete.;
}
else
{
   echo No Upload.;
}

?


The returned message I get is:

Notice: Undefined index: myfile in /www/htdocs/upload.php on line 6
No Upload.


I've checked $_FILES['myfile']['error'] and its empty.  The whole
$_FILES array is empty.  In my php.ini file I have the following:


; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = /tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

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



RE: [PHP] Uploading a File Solution

2005-02-26 Thread Jason Bennett
Sorry all,

I found the problem.  I had put in an entry in post_max_size as 2G
however PHP seems to think that meant 2 bytes.  I lowered it down to
something reasonable in M and it worked fine.  I'm not sure if that is
a bug or not regardless of whether or not 2G is smart for that variable,
it took it as 2 bytes either way.

Cheers,

J.


-Original Message-
From: Jason Bennett [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 26, 2005 11:05 PM
To: php-general@lists.php.net
Subject: [PHP] Uploading a File

Hi all,

I'm having this problem trying to upload a file using PHP.  I am using
Apache (compiled from source) and PHP 5.0.3

The entire contents of the page is:

form method=post enctype=multipart/form-data action=/upload.php
INPUT TYPE=hidden name=MAX_FILE_SIZE value=52428800
input type=file name=myfile
input type=submit value=Begin Upload
/form


The entire script is:

?php

$uploaddir = /tmp;
$uploadfile = $uploaddir . uploaded.file;

if (move_uploaded_file($_FILES['myfile']['tmp_name'], $uploadfile))
{
  echo Complete.;
}
else
{
   echo No Upload.;
}

?


The returned message I get is:

Notice: Undefined index: myfile in /www/htdocs/upload.php on line 6
No Upload.


I've checked $_FILES['myfile']['error'] and its empty.  The whole
$_FILES array is empty.  In my php.ini file I have the following:


; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = /tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

-- 
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