Re: [PHP] upload issue

2008-02-17 Thread Børge Holen
On Monday 18 February 2008 00:59:31 Chris wrote: > Børge Holen wrote: > > On Sunday 17 February 2008 19:22:03 nihilism machine wrote: > >> any idea why this fails?this is the error: "Sorry, there was a problem > >> uploading your file" > >> > >> >> > >> require_once("classes/db.class.php"); > >> >

Re: [PHP] upload issue

2008-02-17 Thread Chris
Børge Holen wrote: On Sunday 17 February 2008 19:22:03 nihilism machine wrote: any idea why this fails?this is the error: "Sorry, there was a problem uploading your file" insert_sql("INSERT INTO CMS_Media (File_Name) VALUES ('')"); $target = "media/" . $insertID . $extension; //echo $target; if

Re: [PHP] upload issue

2008-02-17 Thread Chris
nihilism machine wrote: any idea why this fails?this is the error: "Sorry, there was a problem uploading your file" It can't move the file to the $target location, or maybe the file wasn't uploaded properly in the first place. What's in $_FILES['uploaded']['error'] ? http://www.php.net/manu

Re: [PHP] upload issue

2008-02-17 Thread Børge Holen
On Sunday 17 February 2008 19:22:03 nihilism machine wrote: > any idea why this fails?this is the error: "Sorry, there was a problem > uploading your file" > > > require_once("classes/db.class.php"); > > $target = ""; > $fileName = basename( $_FILES['uploaded']['name']); > $extension = strtolower(

[PHP] upload issue

2008-02-17 Thread nihilism machine
any idea why this fails?this is the error: "Sorry, there was a problem uploading your file" $insertID = $DB->insert_sql("INSERT INTO CMS_Media (File_Name) VALUES ('')"); $target = "media/" . $insertID . $extension; //echo $target; if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $targ

Re: [PHP] upload issue

2008-01-23 Thread Richard Lynch
On Wed, January 23, 2008 6:55 pm, nihilism machine wrote: > i am using this code on my form page: > > method="post" name="adForm" id="adForm"> > > > > alt="Submit Form" /> > > > > my upload code is below: > > > $uploaddir = 'admin/advertisements/'; > $uploadfileTmp = basename($_FILES['upload1'

[PHP] upload issue

2008-01-23 Thread nihilism machine
i am using this code on my form page: method="post" name="adForm" id="adForm"> alt="Submit Form" /> my upload code is below: $uploaddir = 'admin/advertisements/'; $uploadfileTmp = basename($_FILES['upload1']['name']); $uploadfile = $uploaddir . basename($_FILES['upload1']['name']); if (

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
I found the file, but since im on a Cpanel server I do have to do some checking with the admin so that I dont mess up for other users. I wouldnt want my experimenting resulting in an unstable server for other users, :) It looks like this is the only way to alter the settings. Thanks for replies.

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Marek Kilimajer
Kim Steinhaug wrote: That leaves me with the httpd.conf settings which is supposed to work, also according to the PHP documentation. Just need to locate this file first... $> locate httpd.conf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
Hmm 1. We can rule out the ini_set() 2. We can now rule out the .htaccess Tried the following : .htaccess php_value upload_max_filesize 5M testfile.php print 'upload_max_filesize = ' . ini_get('upload_max_filesize') . "\n"; The testfile succesfully states the

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Richard Davey
Hello Kim, Tuesday, December 2, 2003, 12:34:22 PM, you wrote: KS> As the default setting for file upload is set to 2MB, we usually get KS> a problem since we cant always access the php.ini on every server KS> our scripts should be run from. Can you modify the httpd.conf for your site? If so you

[PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
As the default setting for file upload is set to 2MB, we usually get a problem since we cant always access the php.ini on every server our scripts should be run from. After looking in the php.ini file on one of my webhosting partners I noticed an interesting (in my opinion) thing with the post set