• 04-06-2024, 23:37:25
    #1
    Merhaba, localhostumda çalışan kod site üzerinde çalışmıyor sanırım bir güvenlik kuralına takılıyor. Hosting'de whm erişimim de var ancak bulamadım bir türlü sizce nedir? cPanel kullanıyorum.

    //STEAM GROUP    $url = "http://steamcommunity.com/gid/".STEAM_GID."/memberslistxml/";    $xml = simplexml_load_file($url);    $memberscount   = (int) $xml->memberCount;    $memberscount = number_format( $memberscount );    $membersingame  = (int) $xml->groupDetails->membersInGame;    $membersingame = number_format( $membersingame );    $membersonline  = (int) $xml->groupDetails->membersOnline;    $membersonline = number_format( $membersonline );    };    if(MODULE_DISCORD == "ON"){    //DISCORD SERVER    $json_url = "https://discordapp.com/api/guilds/".DISCORD_SERVER_ID."/widget.json";    $json_string = file_get_contents($json_url);    $parsed_json = json_decode($json_string,true);        $discord_name       = $parsed_json['name'];        $discord_members    = $parsed_json['members'];    };
    Discord İçin

    <section class="section discord text-center" id="discord"> <h1>Discord Topluluğumuza Katıl!</h1> 
     
      <div class="row"> <div class="col-md-4 members" id="discord"> <h2 class="discord"><?php echo $discord_name; ?></h2> 
     
     <div class="row"> <div class="col-md-6" id="discord-total"> <span class="discord"></span> </div> <div class="col-md-6" id="discord-online"> <?php if(count($discord_members) >= "100"){echo "100+";}else{echo count($discord_members);}; ?> <span class="discord">ÇEVRİMİÇİ</span> </div> </div> <!-- //Remove lines abowe if you don't have paid Discord module //END --> 
     <!-- //Uncomment to use without Paid module// <?php if(count($discord_members) >= "100"){echo "100+";}else{echo count($discord_members);}; ?> <span>USERS ONLINE</span> //Uncomment to use without Paid module// --> 
     </div> <div class="col-md-8 members" id="online"> 
     <div class="row"> <?php $i = 0; foreach ($discord_members as $member) {if(++$i > 22) break; ;?> 
     <div class="col align-self-center"> <img src="<?=SITE_URL;?>/img/loader-50.webp" data-src="<?php echo $member['avatar_url'];?>" class="lazy rounded-circle discord-user" title="<?php echo $member['username'];?>" data-bs-toggle="tooltip" data-bs-placement="top" alt="<?php echo $member['username'];?>"/> </div> <?php ;};?> 
     </div><!-- row --> </div> 
     </div> <div class="discord-invite"> <a href="<?php echo DISCORD_INVITE_LINK; ?>" target="_blank" class="btn btn-outline-light btn-lg"><i class="fab fa-discord"></i> Discord sunucusuna katıl!</a> </div> </section>



    STEAM İÇİN
    <section class="section community text-center" id="community"> <div class="tabs">  <div class="spoon is-medium is-primary">Narkoz Steam Topluluğu</div> </div> <div class="row"> <div class="col-md-4 members" id="total"> <?php echo $memberscount; ?> <span>ÜYELER</span> </div> <div class="col-md-4 members" id="online"> <?php echo $membersonline; ?> <span>AKTİF ÜYELER</span> </div> <div class="col-md-4 members" id="ingame"> <?php echo $membersingame; ?> <span>OYUNDA</span> </div> </div> <div> <a href="https://steamcommunity.com/gid/<?php echo STEAM_GID; ?>" target="_blank" class="btn btn-outline-light btn-lg"><i class="fab fa-steam-symbol"></i> Steam Grubuna Katıl!</a></div> </section
  • 04-06-2024, 23:43:08
    #2
    Hata günlüğüne baktınız mı?
  • 05-06-2024, 00:02:24
    #3
    exUBert adlı üyeden alıntı: mesajı görüntüle
    Hata günlüğüne baktınız mı?
            ($discord_members as $member)
    <?php if(count($discord_members) >= "100"){echo "100+";}else{echo count($discord_members);}; ?>
    
    <?php if(count($discord_members) >= "100"){echo "100+";}else{echo count($discord_members);}; ?>
    Üsttekiler için verdiği hata
    Alıntı
    Parameter must be an array or an object that implements Countable in
    Bu hata da aşağıdaki için
    Alıntı
    implexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in
        $json_url = "https://discordapp.com/api/guilds/".DISCORD_SERVER_ID."/widget.json";
        $json_string = file_get_contents($json_url);
        $parsed_json = json_decode($json_string,true);
            $discord_name        = $parsed_json['name'];
            $discord_members    = $parsed_json['members'];
        };
  • 05-06-2024, 00:06:51
    #4
    Aldığınız hata PHP üzerinde allow_url_fopen kapalı olmasından kaynaklanıyor, hatada da belirtmiş zaten. Manuel olarak php.ini üzerinden ya da cloudlinux üzerinde bulunan PHP Configirator üzerinden ayarı açarsanız düzelecektir.
  • 05-06-2024, 00:11:22
    #5
    erpektech adlı üyeden alıntı: mesajı görüntüle
    Aldığınız hata PHP üzerinde allow_url_fopen kapalı olmasından kaynaklanıyor, hatada da belirtmiş zaten. Manuel olarak php.ini üzerinden ya da cloudlinux üzerinde bulunan PHP Configirator üzerinden ayarı açarsanız düzelecektir.

    allow_url_fopen = On
    manuel olarak da açık ancak halen aynı error_log henüz çıkmadı bekliyorum.
  • 05-06-2024, 00:14:08
    #6
    Valvior adlı üyeden alıntı: mesajı görüntüle
    allow_url_fopen = On
    manuel olarak da açık ancak halen aynı error_log henüz çıkmadı bekliyorum.
    Atarsanız çözmeye çalışalım aynı hata ise değişmemiş demektir yaptığınız ayar başka yerden geliyordur.
  • 05-06-2024, 00:18:50
    #7
    erpektech adlı üyeden alıntı: mesajı görüntüle
    Atarsanız çözmeye çalışalım aynı hata ise değişmemiş demektir yaptığınız ayar başka yerden geliyordur.
    Logdan attığın son şey bu;

    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=fkil0HQ6V8Blf3PBBM4rwkEkl2dgG5DwrhN): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=UIWUz3SON8XK2hLzLluWybN8yI74T8bLVxV): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(http://steamcommunity.com/gid/103582791460276957/memberslistxml/): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity &quot;http://steamcommunity.com/gid/103582791460276957/memberslistxml/&quot; in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://discordapp.com/api/guilds/772866411876843540/widget.json): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/denemesitem/public_html/modules/discord.php on line 32
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=fkil0HQ6V8Blf3PBBM4rwkEkl2dgG5DwrhN): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=UIWUz3SON8XK2hLzLluWybN8yI74T8bLVxV): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(http://steamcommunity.com/gid/103582791460276957/memberslistxml/): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity &quot;http://steamcommunity.com/gid/103582791460276957/memberslistxml/&quot; in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://discordapp.com/api/guilds/772866411876843540/widget.json): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/denemesitem/public_html/modules/discord.php on line 32
  • 05-06-2024, 00:21:29
    #8
    Valvior adlı üyeden alıntı: mesajı görüntüle
    Logdan attığın son şey bu;

    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=fkil0HQ6V8Blf3PBBM4rwkEkl2dgG5DwrhN): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=UIWUz3SON8XK2hLzLluWybN8yI74T8bLVxV): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(http://steamcommunity.com/gid/103582791460276957/memberslistxml/): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity &quot;http://steamcommunity.com/gid/103582791460276957/memberslistxml/&quot; in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  file_get_contents(https://discordapp.com/api/guilds/772866411876843540/widget.json): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:22 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/denemesitem/public_html/modules/discord.php on line 32
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=fkil0HQ6V8Blf3PBBM4rwkEkl2dgG5DwrhN): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 7
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://rust-servers.net/api/?object=servers&amp;element=detail&amp;key=UIWUz3SON8XK2hLzLluWybN8yI74T8bLVxV): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 42
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(http://steamcommunity.com/gid/103582791460276957/memberslistxml/): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity &quot;http://steamcommunity.com/gid/103582791460276957/memberslistxml/&quot; in /home/denemesitem/public_html/includes.php on line 82
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  file_get_contents(https://discordapp.com/api/guilds/772866411876843540/widget.json): failed to open stream: no suitable wrapper could be found in /home/denemesitem/public_html/includes.php on line 93
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 16
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/denemesitem/public_html/modules/discord.php on line 23
    [04-Jun-2024 21:16:38 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/denemesitem/public_html/modules/discord.php on line 32
    Localhost üzerindeki php sürümünüz ile hosting üzerindeki php sürümünüz aynı mı?
  • 05-06-2024, 00:28:27
    #9
    erpektech adlı üyeden alıntı: mesajı görüntüle
    Localhost üzerindeki php sürümünüz ile hosting üzerindeki php sürümünüz aynı mı?
    Değilmiş, aynı yaptım şimdi 8.2