Valuate Domain Names
DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
HomeRegisterMembershipsGetting StartedDomain Tools Domain EbooksSEO Software Domain Resellers Advertise

Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2008, 12:28 PM   #1 (permalink)
Platinum Lifetime Member
 
SGBoise's Avatar
 
Last Online: 09-28-2009 02:11 AM
iTrader: (1)
Join Date: Jan 2008
Posts: 38
DNF$: 60
Location: USA


imagepng() and File Permissions

Hey guys,
I am having problems with my script. My script allows you to upload videos, music, pictures, etc. When I upload the thumbnail from the media it uses imagepng() to resize the thumbnail to the size I want.
The problem is that it makes the permissions 363 which won't allow anyone to be able to read the file. I can't even change the permissions using ftp. I have to use the cpanel file manager.
I also tried setting the permissions to 755 using chmod() in php and it returns as true.
Anyone have any ideas?
__________________
Video Script - The ultimate media site script
AutoVideoScript com - Run your own youtube sharing site
SGBoise is offline   Reply With Quote
Sponsored Ads
Old 10-15-2008, 01:37 PM   #2 (permalink)
Missing in action
 
sdsinc's Avatar
 
Name: Kate
Last Online: Yesterday 06:42 PM
iTrader: (41)
Join Date: Jul 2005
Posts: 4,667
DNF$: 28,093
Location: .cz
Country:


Perhaps it's the permissions of the particular directory where the thumb is saved. Have you tried saving to another folder ?
When you use cpanel I assume you connect as root so you have higher rights... PHP must be running under the apache user with insufficient permissions on the directory.
__________________
VeryOldNames.com
sdsinc is offline   Reply With Quote
Old 10-15-2008, 06:04 PM   #3 (permalink)
Platinum Lifetime Member
 
SGBoise's Avatar
 
Last Online: 09-28-2009 02:11 AM
iTrader: (1)
Join Date: Jan 2008
Posts: 38
DNF$: 60
Location: USA


I did try your suggestion with different directories and it seams like it worked when saving it on the root. After reading doing some research I noticed the that chmod takes 4 charaters instead of 3. So I just replaced 755 with 0755 and that worked.
__________________
Video Script - The ultimate media site script
AutoVideoScript com - Run your own youtube sharing site
SGBoise is offline   Reply With Quote
Old 10-16-2008, 05:03 AM   #4 (permalink)
Missing in action
 
sdsinc's Avatar
 
Name: Kate
Last Online: Yesterday 06:42 PM
iTrader: (41)
Join Date: Jul 2005
Posts: 4,667
DNF$: 28,093
Location: .cz
Country:


Indeed you need to add the leading zero. 0777 and not 777
__________________
VeryOldNames.com
sdsinc is offline   Reply With Quote
Reply


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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:16 AM.
Copyright @2001-2009 DNForum.com