Current location: Hot Scripts Forums » Programming Languages » PHP » PHP Newbie needs help with confirmation message after form submission


PHP Newbie needs help with confirmation message after form submission

Reply
  #11 (permalink)  
Old 06-07-06, 07:51 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
maybe you're trying to delete files from your tmp directory. maybe that's the problem. normally you delete files from your server directory, after you copied em from your tmp directory.

i don't know for sure, i never had such problem before.

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #12 (permalink)  
Old 06-07-06, 08:31 AM
rmd rmd is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Actually, could it be possible that it is restricted to only allow me to delete from the /tmp directory? And if so, where would I check/change that?
Reply With Quote
  #13 (permalink)  
Old 06-07-06, 08:35 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you mean the file permissions? or do you mean through php.ini?

if it's the file permission, but i don't think so, you have to use chmod('filepath', 0777);

Just wondering, but aren't the files in the tmp directory deleted after a while. that way there's nothing to worry about. when you wonna keep em, you should store em somewhere on your server (e.g: a folder called /images/)

the last time i wrote an upload script, i copied the file to the image directory after checking, but i didn't remove them from the tmp directory

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #14 (permalink)  
Old 06-07-06, 08:44 AM
rmd rmd is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
I was thinking that there may be a permissions restrcition in php.ini...not sure if that is possible, but it was a thought I had.

I added
PHP Code:

chmod($img_dir0777); 

and it is now printing the same error to the page twice, once each for chmod() & unlink().

Last edited by rmd; 06-07-06 at 08:45 AM. Reason: clarifying the error
Reply With Quote
  #15 (permalink)  
Old 06-07-06, 09:01 AM
rmd rmd is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
I tried moving the php file into the same directory as the image I am trying to delete, and that gave me the open_basedir & failed to open stream errors on my connection include file.
Reply With Quote
  #16 (permalink)  
Old 06-07-06, 10:09 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
are you trying to remove it from your tmp directory? if so, try copying the file to a place on your server, and then try to unlink the file in that directory. if that works, you know you can't delete or chmod files in the tmp directory.
if that doesn't work either: i don't have a single clue

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #17 (permalink)  
Old 06-07-06, 10:28 AM
rmd rmd is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
No, not touching the temp directory. I am actually trying to delete it from the directory where it resides "permanently" after being uploaded.

I will post a new thread and see if someone else might not have a suggestion. I do appreciate your help. Thanks so much!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
Form Submission, PHP Coding Problem kibby67 PHP 3 12-02-04 01:13 PM
PHP Form Submission script sixflagsga Script Requests 0 10-10-04 07:26 PM
Limit the form submission according to time bionicsamir PHP 7 05-09-04 11:10 PM


All times are GMT -5. The time now is 07:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.