Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
morpheus_75
Involved
Involved



Joined: Oct 07, 2003
Posts: 302

PostPosted: Wed Oct 15, 2003 3:07 pm Reply with quote

This is the problem I get after uploading an avatar...

Warning: copy(./modules/Forums/images/avatars/50b66a1e3f8db67e0b66b.jpg): failed to open stream: Permission denied in D:\Inetpub\webs\whatisthematrixit\portale\includes\usercp_avatar.php on line 267

When Icome back to the Forum HP, I cannot visualize ANYTHING. No forums. Just the header, the navigation bar and then "Information". Anything else...

Anyone knowing why? Crying or Very sad
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 15, 2003 3:18 pm Reply with quote

My guess would be that you haven't changed the permissions to 777 on the following folders

modules
Forums
images
avatars
 
View user's profile Send private message
morpheus_75







PostPosted: Wed Oct 15, 2003 3:26 pm Reply with quote

What does this mean? Sorry, Raven, but I'm not a php-nuke "professional"... Wink
 
Raven







PostPosted: Wed Oct 15, 2003 3:29 pm Reply with quote

You need to use either your ftp client or login as root to your host and change the file permissions on those folders to 777 (Read, Write, Execute).
 
18-delta
Hangin' Around



Joined: Oct 08, 2003
Posts: 36
Location: U.S.

PostPosted: Wed Oct 15, 2003 3:33 pm Reply with quote

i don't know how to help. I do know that i uploaded a file and it worked fine for me. I will leave your prob to the experts. Sorry I can't help you.

_________________
Image 
View user's profile Send private message Visit poster's website
morpheus_75







PostPosted: Wed Oct 15, 2003 3:39 pm Reply with quote

Raven wrote:
My guess would be that you haven't changed the permissions to 777 on the following folders

modules
Forums
images
avatars


I changed the permissions now, Rav, but the problem is stll there. Same error and (which is VERY odd) every time I update my account info, I cannot visualize the content of the forum... Confused

Any idea, raven?

Anyway, tnx 18-delta!
 
TheosEleos
Life Cycles Becoming CPU Cycles



Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Wed Oct 15, 2003 3:58 pm Reply with quote

I am still getting a red x in your account/your info. I wonder if the path in this section of the code needs to be changed.

Code:
}

   OpenTable();
   $userinfo[user_avatar] = ereg_replace("gallery/","",$userinfo[user_avatar]);
   echo "<table cellpadding=\"3\" border=\"0\" width='100%'><tr><td bgcolor='$bgcolor2'>"
       ."<form name=\"Register\" action=\"modules.php?name=$module_name\" method=\"post\">"
       ."<b>"._USRNICKNAME."</b>:</td><td bgcolor='$bgcolor3'><b>$userinfo[username]</b></td></tr><tr>"
       ."<tr><td bgcolor='$bgcolor2'><b>"._UREALNAME."</b>:<br>"._OPTIONAL."</td><td bgcolor='$bgcolor3'>"
       ."<input type=\"text\" name=\"realname\" value=\"$userinfo[name]\" size=\"50\" maxlength=\"60\"></td></tr>"
       ."<tr><td bgcolor='$bgcolor2'><b>"._UREALEMAIL.":</b><br>"._REQUIRED."</td>"
       ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_email\" value=\"$userinfo[user_email]\" size=\"50\" maxlength=\"255\"><br>"._EMAILNOTPUBLIC."</td></tr>"
       ."<tr><td bgcolor='$bgcolor2'><b>"._UFAKEMAIL.":</b><br>"._OPTIONAL."</td>"
       ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"femail\" value=\"$userinfo[femail]\" size=\"50\" maxlength=\"255\"><br>"._EMAILPUBLIC."</td></tr>"
       ."<tr><td bgcolor='$bgcolor2'><b>"._YOURHOMEPAGE.":</b><br>"._OPTIONAL."</td>"
       ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_website\" value=\"$userinfo[user_website]\" size=\"50\" maxlength=\"255\"></td></tr>"
       ."<tr><td bgcolor='$bgcolor2'><b>"._YOURAVATAR.":</b><br>"._OPTIONAL."</td><td bgcolor='$bgcolor3'>[ <a href=\"modules.php?name=$module_name&amp;op=avatarlist\">"._LIST."</a> ]&nbsp;&nbsp;"
       ."<select name=\"user_avatar\" onChange=\"showimage()\">"
       ."<option value=\"$userinfo[user_avatar]\">$userinfo[user_avatar]</option>";
   $direktori = "modules/Forums/images/avatars/gallery";
   $handle=opendir($direktori);
   while ($file = readdir($handle)) {
       $filelist[] = $file;
   }

_________________
http://jamesdibben.com 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
18-delta







PostPosted: Wed Oct 15, 2003 4:12 pm Reply with quote

Is this in reference to what I posted or another fix?
 
TheosEleos







PostPosted: Wed Oct 15, 2003 4:21 pm Reply with quote

I am using your fix.

I am still getting the red x in the your account/your info area. It is looking in forums/avatars/gallery for my uploaded avatar.
 
18-delta







PostPosted: Wed Oct 15, 2003 4:32 pm Reply with quote

This was that "Nuke drwaing from two different sources" thing i talked about.

Your upload went to
images/avatars/

in the user area it is looking for it in
images/avatars/gallery

if you want to make it work for now, simply copy your uploaded image from
images/avatars/
to
images/avatars/gallery
and it will work

It will also be renamed when tou uploaded it, something like dfs7934723dh2hd2d2.gif (just a bunch of numbers and letters, you will see it.

You might be on to something with the code suggestion you made, i dont know. You can do what i did, make a backup of it, play with it, and see if you can troubleshoot it.
 
TheosEleos







PostPosted: Wed Oct 15, 2003 4:42 pm Reply with quote

I made a couple of changes. Once my site gets up and going there is no way I am going to have time to copy stuff from one directory to another. This site will probably have too much action.

I am not a coder either so who knows what this will do. LOL!

From:
(line 786)
Code:
$direktori = "modules/Forums/images/avatars/gallery";


To:
(line 786)
Code:
$direktori = "modules/Forums/images/avatars";


And changed.
From:
(line 800)
Code:
echo "</select>&nbsp;&nbsp;<img src=\"modules/Forums/images/avatars/gallery/$userinfo[user_avatar]\" name=\"avatar\" width=\"32\" height=\"32\" alt=\"\"></td></tr>"[/quote]


To:
(line 800)
Code:
echo "</select>&nbsp;&nbsp;<img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" name=\"avatar\" width=\"64\" height=\"64\" alt=\"\"></td></tr>"
 
18-delta







PostPosted: Wed Oct 15, 2003 4:48 pm Reply with quote

did this change work?
 
Raven







PostPosted: Wed Oct 15, 2003 7:47 pm Reply with quote

I just installed a virgin 6.9 and applied my initial fix. It works until you make another change in My Info (Your_Account) and then it starts appending gallery/ as delta-18 noted. Unfortunately none of the fixes posted on here are satisfactory. I have succeeded in getting everything to work until I upload an avatar. Then it breaks when all else works. Very frustrating indeed. I am tired of working on this issue that should have been resolved by FB way back in 6.5. He has been aware of it since then and still releases this junk.
 
18-delta







PostPosted: Wed Oct 15, 2003 8:01 pm Reply with quote

the index.php i posted fixes the /gallery appending.

as far as the uploads they will go to

images/avatars/

if you want them to work copy them from images/avatars/ to

images/avatars/gallery

this is an inconvienece i understand, but it is a simple work around till its gets fixed

plus dont forget, nuke will rename all uploaded images to its own name which is nothing more than a bunch of letters and numbers.

ex: you uploaded myavatar.gif, nuke will rename it something like uty5647tyh4y57t.gif
 
Raven







PostPosted: Wed Oct 15, 2003 8:03 pm Reply with quote

I understand that Smile. I could post the fixes another way w/o copying as you do. My point is that NONE are satisfactory. I didn't say NONE will work Smile.
 
18-delta







PostPosted: Wed Oct 15, 2003 8:13 pm Reply with quote

yup i hear ya, i agree it is an unsatisfactory temp fix. I will keep playing with it and let you all know if i come up with something.
 
18-delta







PostPosted: Thu Oct 16, 2003 1:10 am Reply with quote

Image


As you can see, your avatars are being accessed by two different entities: phpNuke and phpBB.

On my setup NUKE is drawing the avatars from images/avatars/gallery. when it comes down to it, this means squat! You could go in and change the code so the NUKE side draws them from images/avatars, but it doesn't matter. No matter what you change the path to in NUKE, as long as there are avatars there they will display fine in Your_Account, and the Your Info drop-down list. It is its own happy little family.

Now, avatars in the Members List, Forum Profile, & Forum posts, are all accessed by the BB side of the house. This is where people get confused. They think that if they choose an avatar in Your_Account that it should show up in a BB accessed area like the Forum posts. WRONG, this avatar is being controlled by BB (hence the red X.)

This is whats happening: lets tackle one at a time in the FORUM control panel.

The Avatar Storage Path: set this to whatever you like, but whatever you set it to thats where uploaded avatars are going to go. this is not an issue really. matter of fact. if you set it for modules/Forums/images/avatars/gallery, and your NUKE side of the house was set to the same path (see image), you could pick an avatar that you uploaded from the Your Info drop-down list in Your_Account part of NUKE.

The Avatar Storage Path: Now heres where it all falls apart. The path set in this block has a DOUBLE function. 1) it points BB to a GALLERY and 2) points all the stuff on the BB side of the house to individual avatar files. This will be our example path for this block for explination purposes:

modules/Forums/images/avatars/gallery

If this is the path, the Members List, Forum Profile, & Forum posts will look for individual avatar files in the /gallery FOLDER.

but!! again if this is the path, it will also look for a GALLERY folder inside of /gallery/ when you try and choose an avatar in the FORUM GALLERY LIST. example: modules/Forums/images/avatars/gallery/"its looking here for a gallery folder with avatars in it" MAKE SENSE??

too further explain, if you set the AVATAR GALLERY PATH to:

modules/Forums/images/avatars

it will look for individual avatar files in the /avatars folder (which aren't there) BUT in the FORUM AVATAR GALLERY it will find /gallery with all the avatars in it. and to your amazement you will be able to choose an avatar in your FORUM PROFILE GALLERY but all your avatars for the Members List, Forum Profile, & Forum posts will be red x's because it is looking in /avatars for the individual files.


The closest you can get to make this work is to set you Avatar Gallery Path to the same one your NUKE apps are using. The only prob of course is that you will not be able to choose an avatar from a gallery in your FORUM PROFILE because it cant find a gallery folder.

this is a fix that i used that i liked: i did as i just mentioned above, then i opened up /themes/"your theme"/forums/profile_avatar_gallery.tpl file in my web editor and took out the everything in the FORUM profile that had to do with choosing an avatar or a gallery. i left the avatar there and put a link next to it that took them to the Your_Account to choose thier avatar. these are the before and after's:

Image

Image

Image

Image

I know, if you allow your users to use different themes than this only works for the theme you moded, i understand. I'm not saying anyone should do this, its just my little handy work and i like it.

This post was not meant as a fix-all, but just an opinion from what i see happening with this whole avatar thing, and to try and explain it for two reasons: help people understand why it's happening and maybe give some programmers an idea that didnt hit them before.

thanks for checkin it out.
 
morpheus_75







PostPosted: Thu Oct 16, 2003 2:31 am Reply with quote

Raven wrote:
My guess would be that you haven't changed the permissions to 777 on the following folders

modules
Forums
images
avatars


In fact u're right. I can change the permissions through my ftp but I noticed that the effects won't take place. Everytime I go to properties/CHMOD I always find the previous settings (755). Crying or Very sad
 
Raven







PostPosted: Thu Oct 16, 2003 3:46 am Reply with quote

morpheus_75 wrote:
Raven wrote:
My guess would be that you haven't changed the permissions to 777 on the following folders

modules
Forums
images
avatars


In fact u're right. I can change the permissions through my ftp but I noticed that the effects won't take place. Everytime I go to properties/CHMOD I always find the previous settings (755). Crying or Very sad
Then your host must be preventing you from changing them. In any event, until you get them changed to 777 you will have your problems.
 
Raven







PostPosted: Thu Oct 16, 2003 3:54 am Reply with quote

Delta-18,

Great stuff and right on as far as I can tell. I will look this over even closer over the next few days. Thanks!
 
morpheus_75







PostPosted: Thu Oct 16, 2003 4:30 am Reply with quote

Avatar problems seems solved.

I've changed the path of the avatars. Now it is public/avatars (and not modules/forums/images/avatars). Public is the only folder which allows users to "write" and then to upload their avatars.

The only problem I get at the moment is that after uploading the avatar (and thus changing my profile), the forum topics won't display anymore. I only get "information" and then... NOTHING... Confused
 
Savent
Regular
Regular



Joined: Jun 30, 2003
Posts: 81

PostPosted: Thu Oct 16, 2003 10:54 am Reply with quote

Ty Raven and Delta for trying to solve this LONG overdue issue, I hope your succesfully, it still shows the red x when guest post. Raven I totally agree with what you said about FB knowing about this problem since nuke 6.5. He said he closed down the forums at phpnuke.org a while back ago caused it's used too much bandwith, etc...bah. He was jut sick of people telling him to fix stuff like this. I do believe I posted this on his forums a few months ago when they will still open, and he never answerd. Every new nuke version he comes out with he updates stuff people dont use or care about, like the avant go module or the new points system. I mean come on, fix the stuff people use and see broke everyday. Raven I'm started to trust all your work more than nukelight's. I need to have a talk with him- lol. I have faith that are turstworthy Raven will solve this issue, he always fiquires this stuff out, smart man Smile

_________________
[ Only registered users can see links on this board! Get registered or login! ] [Online Arcade 340+ Games]
Image 
View user's profile Send private message Send e-mail Visit poster's website
TheosEleos







PostPosted: Thu Oct 16, 2003 3:29 pm Reply with quote

18-delta wrote:
did this change work?


The answer is yes.

I have no red Xs at my site. I have no idea what will happen when someone tries to use a gallery image as thier avatar though. Most people that come to my site will upload something anyway.

Here is my new site. It will probably "go live" sometime next week. It should get pretty busy.
[ Only registered users can see links on this board! Get registered or login! ]
 
18-delta







PostPosted: Thu Oct 16, 2003 10:21 pm Reply with quote

TheosEleos, great job on your site.

As you mentioned you have no red x's but you can't choose an avatar from the gallery in Your Info. If you select "List" it lists them but they do not show up as selections in the entry box. You have done as I have, made it functional and thats what counts at this point and time. Like i said, site looks great.
 
TheosEleos







PostPosted: Thu Oct 16, 2003 10:23 pm Reply with quote

Now I understand.


Thanks for the compliments.
 
Display posts from previous:       
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©