Hrvoje Posted April 13, 2010 Share Posted April 13, 2010 I have code for display user name and image avatar on external page. Error is: You don't have permission to access /forum/images/avatars/upload/2_1271130956.gif on this server. Image path is ok when I click on avatar with right click "show image" I asume that error is in code somwhere, Is something wrong or missing? tnx <?php define('IN_PHPBB', true); $phpbb_root_path = 'forum/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); if (!$user->data['is_registered']) { ?> <body bgcolor="#FFFFFF"> <div id="loginbox" class="loginbox"> <form method="POST" action="forum/ucp.php?mode=login" > <p>Username: <input type="text" name="username" size="20"> <br /> Password: <input type="password" name="password" size="20"> <br /> Remember Me?: <input type="checkbox" name="autologin"> <br /> <input type="submit" value="Submit" name="login"> </p> <p> <input type="hidden" name="redirect" value="../index.php"> </p> </form> <?php } else { ?> <div id="userbox" class="userbox"> <?php echo 'Pozdrav, ', $user->data['username']; } ?> <table width="268" cellspacing="0" cellpadding="0"> <tr> <th scope="col"><div align="left"> <img src="forum/images/avatars/upload/<?PHP echo $user->data['user_avatar']; ?>" class="floatLeft" width="90" height="90" /> </div></th> </tr> </table> </div> Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/ Share on other sites More sharing options...
Tazerenix Posted April 13, 2010 Share Posted April 13, 2010 you cant access it from an external source probably because the prepackaged .htaccess file for the avatars folder doesn't permit people viewing the avatars from external sources. You could just delete the .htaccess file but that might create some sort of security issue Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/#findComment-1040837 Share on other sites More sharing options...
Hrvoje Posted April 13, 2010 Author Share Posted April 13, 2010 Can you wrote what is the best way to do that? Show avatar image when user logged in? Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/#findComment-1040846 Share on other sites More sharing options...
Tazerenix Posted April 13, 2010 Share Posted April 13, 2010 I wouldn't be entirely sure how to go about it as I don't really use PHPBB anymore. Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/#findComment-1040853 Share on other sites More sharing options...
Hrvoje Posted April 13, 2010 Author Share Posted April 13, 2010 Ok, tnx Somebody know? Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/#findComment-1040862 Share on other sites More sharing options...
Hrvoje Posted April 16, 2010 Author Share Posted April 16, 2010 I just need simple script for show avatar image on external page? Quote Link to comment https://forums.phpfreaks.com/topic/198360-phpbb3-and-avatar-image-error/#findComment-1043010 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.