Author Topic: Cannot Create a Symbolic Link  (Read 10119 times)

0 Members and 1 Guest are viewing this topic.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Cannot Create a Symbolic Link
« on: September 27, 2014, 03:21:38 pm »
Hello,

I am facing a problem while symlimking my DataBase.db.The problem is that the file is not symlinked correctly therefore leaving my webstats page with a line "Database doesn't exist."When i create a symbolic link the file appears like this :



This is the image of the console :



The Line I am using to Create a Symlink : ln -s /root/efe/efe/Files/DataBase.db /var/www/html/stats/DataBase.db

My webstats Page : http://webhost.efe-vcmp.tk/stats/

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #1 on: September 28, 2014, 10:32:09 am »
Bump!

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Cannot Create a Symbolic Link
« Reply #2 on: September 28, 2014, 12:58:41 pm »
First of all. Don't ever run the server as root. For fucks sake people. This is common sense.
Second, that should work fine. As you can see from the ls command it is symlinked, and should have the correct permissions. Make sure you have the name right in your config file, it is case sensitive.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #3 on: September 28, 2014, 05:40:32 pm »
I think that my config file is okay.You can check it yourself :

Code: [Select]
<?php
/*
         config.php | Holds all the necessary information
 
 ------------------------------------------------
 
 MaDKiLLeR's Online Stats v1.0.
   
     http://online-stats.madkiller.tk/
   
     Copyright (c) MaDKiLLeR 2013 - All Rights Reserved.
   
     You cannot remove this message and my name from the footer as the "creater" of this webstats script.

*/

           /* 
     This is the path to your Online Stats.
 Examples:
 
 http://stats.server.com/
 
 http://myserver.com/stats/
 
 etc..
  */

          
$stats_url "http://http://webhost.efe-vcmp.tk/stats";
  
  //Add you server's name here
  $servername "Extreme Fighting Era 2015";
  
  //If you've a logo, specify it here. i.e replace the empty string with
  //Logo.png and place the image within images/ directory.
  $serverlogo "http://i.imgur.com/b5wumV8.png";
  
  //Sepcify the path to the database.
  $databasepath "DataBase.db";
  
  //Declare the main fields.
          
$mainfields = array (
         
 //Replace "Stats" with the name of your stats table.
         'stats_table' => "Account",
 
 //Replace "User" with the name of the column which holds the player's name in the stats table.
         'nick_name' => "Name",
 
 //Replace "Kills" with column's name which holds the kills.
 'stats_kills' => "Kills,,",
 
 //Replace "Deaths" with the column's name which holds the deaths.
 'stats_deaths' => "Deaths",
 
 //Replace "Joins" with the column's name which holds the joins.
 'stats_joins' => "Joins",
  );
  
  
  /*
           Weapon's Statistics part.
  */
  
  //You've wep stats? Change this to true.
  $wep_stats_enabled true;
  
  //If wepstats is enabled, specify the name of the table holding wepstats.
  $wep_stats_table "Wstats";
  
  //Sepcify the column's name in bstats table which consists of nicknames.
  $wep_stats_nickname "User";
  
  //You must edit these fields with the name of columns holding the data for associated weapon.
  $wep_stats_fields = array ( 
'stats_m60' => "M60",
'stats_flames' => "FlameThrower",
'stats_laser_sniper' => "LaserScope",
'stats_sniper_rifle' => "SniperRifle",
'stats_ruger' => "Ruger",
'stats_mp5' => "MP5",
'stats_m4' => "M4",
'stats_ingram' => "Ingrams",
'stats_uzi' => "Uzi",
'stats_tec9' => "Tec9",
'stats_stubby' => "Stubby",
'stats_spaz' => "Spaz",
'stats_shotgun' => "Shotgun",
'stats_python' => "Python",
'stats_fist'  => "Fist",
'stats_screwdriver'  => "ScrewDriver",
'stats_golf_club'  => "GolfClub",
'stats_nightstick' => "NightStick",
'stats_knife'  => "Knife",
'stats_baseball_bat'  => "BaseballBat",
'stats_hammer' => "Hammer",
'stats_cleaver'  => "Cleaver",
'stats_machete'  => "Machete",
'stats_katana'  => "Katana",
'stats_chainsaw'  => "Chainsaw",
'stats_colt45'  => "Colt45"
  );
  
  //Weapons you would like to see on Wep Stats page. Please limit these to a reasonable number.
  //Before adding any weapon, check the correct name for it!
          /*    
      For Example, if you want to show Heli Blades, then in the array,
  add heli_blades.
  
  Select the weapon correct name for the weapon according to this:
  
  heli_blades = HeliBaldes
explosion = Explosion
driveby = Driveby
vehicle = Vehicle
heli_canon = HeliCanon
m60 = M60
flames = FlameThrower
laser_sniper = LaserScope
sniper_rifle = SniperRifle
ruger = Ruger
mp5 = MP5
m4 = M4
ingram = Ingrams
uzi = Uzi
tec9 = Tec9
stubby = Stubby
spaz = Spaz
shotgun = Shotgun
python = Python
fist  = Fist
screwdriver  = ScrewDriver
golf_club  = GolfClub
nightstick = NightStick
knife  = Knife
baseball_bat  = BaseballBat
hammer = Hammer
cleaver  = Cleaver
machete  = Machete
katana  = Katana
chainsaw  = Chainsaw
colt45  = Colt45
       
  */
  
  $wep_show = array (
             'm4',
 'm60',
 'mp5',
 'ruger',
 'ingram',
 'uzi',
 'stubby',
 'spaz',
 'shotgun'
  ); 
  
  /*
        Body Parts Statistics
  */
  
  //You've Body Parts stats? Set this to true then.
  $bp_stats_enabled true;
  
  //Sepcify the name of the table which holds the bstats.
  $bp_stats_table "Bstats";
  
  //Sepcify the column's name in bstats table which consists of nicknames.
  $bp_stats_nickname "User";
  
  //Edit these fields with the name of columns in your bstats table, holding stats for the respective bodypart.
  $bp_stats_fields = array (
      'stats_left_arm' => "LeftArm",
   'stats_right_arm' => "RightArm",
   'stats_left_leg' => "LeftLeg",
   'stats_right_leg' => "RightLeg",
   'stats_body' => "Body",
   'stats_torso' => "Torso",
   'stats_head' => "Head"
  );
  
  //Don't edit this array, move on.
  $bp_show = array (
                'left_arm',
'right_arm',
'left_leg',
'right_leg',
'body',
'torso',
'head'
  );
  
  /*
       Live Map
  */
  
  //You've live map? If so, set this to true.
  $live_map_enabled false;
  
  //Set the path to your live map. i.e http://98.25.63.125/server/map
  //If on the same server, then specify the directory containing live map.
  //Just for example, using EA's Live Map. Follow the same pattern:
  $live_map_path "";
  
  /*
       Clan Stats
  */
  
  //Have clans stats? Set this to true
  $clan_stats_enabled false;
  
  //The name of your table consisting clanstats
  $clan_stats_table "";
  
  //Column in the clanstats table which holds the clan's name.
  $clan_stats_field "";
  
  //Edit these fields with the name of the columns holding kills & deaths.
  $clan_stats_fields = array (
      'stats_kills' => "Kills",
  'stats_deaths' => "Deaths",
  );

?>


Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Cannot Create a Symbolic Link
« Reply #4 on: September 28, 2014, 06:01:25 pm »
I don't know where MadKiller's script wants the database, but I see your stats_url is wrongly copied.

If you're okay with permissions, you can just put /root/efe/efe/Files/DataBase.db in that variable. It should work atleast, I don't know how his script works.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #5 on: September 28, 2014, 06:33:49 pm »
Still says the same thing.I tried to change the Database route to /root/efe/efe/Files/DataBase.db but it still didn't work.My permissions are okay.IDK what causes this problem.I've faced this problem once before but it automatically got fixed over time.

Offline soulshaker

  • Street Thug
  • *
  • Posts: 21
    • View Profile
    • Ethical DM VC:MP 0.4
Re: Cannot Create a Symbolic Link
« Reply #6 on: September 29, 2014, 04:56:36 pm »
in ssh console try this:-

Code: [Select]
cd /var/www/html/stats
ln -s /root/efe/efe/Files/DataBase.db

if everything in your config file is correct, webstats will be up :)

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #7 on: September 29, 2014, 05:13:25 pm »
Nah, Still the same error :/

Offline soulshaker

  • Street Thug
  • *
  • Posts: 21
    • View Profile
    • Ethical DM VC:MP 0.4
Re: Cannot Create a Symbolic Link
« Reply #8 on: September 29, 2014, 06:38:49 pm »
well try the files i gave you, and it will work like THIS

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Cannot Create a Symbolic Link
« Reply #9 on: September 29, 2014, 07:54:48 pm »
Place this in a new file and post a link to the file here:
Code: [Select]
<?php
phpinfo
();
?>


Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #10 on: September 29, 2014, 08:18:32 pm »

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Cannot Create a Symbolic Link
« Reply #11 on: September 29, 2014, 10:59:51 pm »
That seems fine, you can remove that file now.



Go to your server directory (the one which should have your database file, and scripts), and post the output of ls -lha

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #12 on: September 30, 2014, 01:32:29 pm »
ls -lha of my Server Dir :



ls -lha of my Database Directory :


Offline Gudio

  • Street Thug
  • *
  • Posts: 22
    • View Profile
    • Gudio
Re: Cannot Create a Symbolic Link
« Reply #13 on: September 30, 2014, 03:23:03 pm »
Symbolic link to the /root directory.


You should never use Linux.
Ensure you have unloaded SymLinksIfOwnerMatch and loaded FollowSymLinks.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Cannot Create a Symbolic Link
« Reply #14 on: September 30, 2014, 03:33:11 pm »
What are you talking about?I've never heard of  SymLinksIfOwnerMatch and FollowSymLinks.