Website problems

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
Hi, I have a problem, literally, I'm trying to put a line to Highscore.php to show me the reborn, but if I throw it from the machine, the page does not work for me when you enter the empty white page. Will anyone help or how to remedy this?
 

bybbzan

mapper
Premium User
Joined
Aug 4, 2012
Messages
723
Reaction score
62
Post the .php file so we could locate the problem.
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
Hi, I have a problem, literally, I'm trying to put a line to Highscore.php to show me the reborn, but if I throw it from the machine, the page does not work for me when you enter the empty white page. Will anyone help or how to remedy this?
Spagetti and noodles?
I dont understand. Improve the explanation pls.

Assuming that I understood::
Did you try adding some code in highscores.php and as a result got an empty white page when you accessed it from your browser?
 
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
so one problem it this

CANNOT WRITE TO FILE: config/config.php - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/flags - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/DONT_EDIT_usercounter.txt - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/DONT_EDIT_serverstatus.txt - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: custom_scripts - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: install.txt - edit file access for PHP [on linux: chmod]
 

Owner Gado

New Member
Joined
Mar 14, 2018
Messages
23
Reaction score
2
Location
Egypt
so one problem it this

CANNOT WRITE TO FILE: config/config.php - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/flags - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/DONT_EDIT_usercounter.txt - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: cache/DONT_EDIT_serverstatus.txt - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: custom_scripts - edit file access for PHP [on linux: chmod]
CANNOT WRITE TO FILE: install.txt - edit file access for PHP [on linux: chmod]
you should use this command: chmod 777 -R var/www
 
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
$query = $SQL->query('SELECT players.name,players.id,players.level,players.reborn, players.experience, server_motd.id, server_motd.text FROM players,server_motd WHERE players.group_id < '.$config['site']['players_group_id_block'].' AND players.name != "Account Manager" ORDER BY reborn DESC LIMIT 1;')->fetch();

as I put in a file on the page from the main page to my white page
 

Owner Gado

New Member
Joined
Mar 14, 2018
Messages
23
Reaction score
2
Location
Egypt
Have you added the structure on players table ‘reborn’?

I think @Snavy can help you if theres any error else
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
looks like you forgot to join the second table. I will write a better answer in about 10m (nlt at home right now)
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
$query = $SQL->query('SELECT players.name,players.id,players.level,players.reborn, players.experience, server_motd.id, server_motd.text FROM players,server_motd WHERE players.group_id < '.$config['site']['players_group_id_block'].' AND players.name != "Account Manager" ORDER BY reborn DESC LIMIT 1;')->fetch();

as I put in a file on the page from the main page to my white page
ok.. So First of all you can't possibly select from multiple tables without joining them.
also there's nothing in server_motd table that is associated with any of the columns in players table so joining is not possible.

What you can do is create two different queries, 1 for players, 1 for server motd

PHP:
$player_info = $SQL->query("SELECT `id`,`name`,`level`,`reborn`,`experience` FROM `players` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `reborn` DESC LIMIT 1")->fetchAll();

$server_motd = $SQL->query("SELECT * FROM `server_motd`")->fetchAll();
 
Last edited:
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
ok.. So First of all you can't possibly select from multiple tables without joining them.
also there's nothing in server_motd table that is associated with any of the columns in players table so joining is not possible.

What you can do is create two different queries, 1 for players, 1 for server motd

PHP:
$player_info = $SQL->query("SELECT `id`,`name`,`level`,`reborn`,`experience` FROM `players` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `reborn` DESC LIMIT 1")->fetchAll();

$server_motd = $SQL->query("SELECT * FROM `server_motd`")->fetchAll();
I checked it and it's still a white page
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
I checked it and it's still a white page
Are you on a linux machine or windows?
& what webserver are you using ?

BTW I did some mistakes in the players query, use this ::

PHP:
$player_info = $SQL->query("SELECT `id`,`name`,`level`,`reborn`,`experience` FROM `players` WHERE `players`.`group_id` < ".$config['site']['players_group_id_block']." AND `players`.`name` != 'Account Manager' ORDER BY `reborn` DESC LIMIT 1")->fetchAll();
 
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
I use the liniux system and the Gessior 2012 website under tfs 0.3.6-0.4
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
I use the liniux system and the Gessior 2012 website under tfs 0.3.6-0.4
note: I updated my previous post, change the players query to the new one.

ok go to /etc/php5/apache2/php.ini assuming that's where your php.ini file is located...
search for "display_errors" it should be set to Off by default. Change it to On
and then save the file.

restart apache2 by service apache2 restart
 
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
-bash: /etc/php5/apache2/php.ini: No such file or directory
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
@Sirdonald

create info.php and put <?php echo phpinfo(); ?>

then visit that page by /info.php and find loaded configuration file
 
OP
S

Sirdonald

Well-Known Member
Joined
Jan 16, 2012
Messages
67
Reaction score
3
Loaded Configuration File/etc/php5/fpm/php.ini
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
744
Reaction score
125
Location
Kepler452b
@Sirdonald
type: nano /etc/php5/fpm/php.ini

when the file opens, press CTRL+W and type display_errors (press enter twice to find the correct one)

it should be set to Off, change that to On.
after modifying, press CTRL+X, Y, ENTER

then restart by service apache2 restart
 
Top