SERVEEER ERRORR TUH GIMANA NGATASINYA????

jadi seperti ini...

Ada yang bilang Cek File htaccess.tapi  in my case there is no htaccess file but the error is same. What should I do now?

atau ganti versi phpnya?

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500

localhost Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.9

avatar laurentellyzabeth
@laurentellyzabeth

14 Kontribusi 0 Poin

Diperbarui 3 tahun yang lalu

Tanggapan

Share kodenya juga dong mba, biar bisa bantu cek sama yg lain juga

Aktifkan PHP Error nya, lalu share kodingannya biar jelas

2 Jawaban:

<div>Server error itu sangat luas, bisa kesalaha dari mana saja.<br>Salah satu cara debugnya dengan mengaktifkan error PHP, agar ketahuan masalahnya di mana jika dari kodenya</div>

avatar hilmanski
@hilmanski

2686 Kontribusi 2135 Poin

Dipost 3 tahun yang lalu

Tanggapan

php error nya masih aktif kok gan

<pre>&lt;?php

require &#039;functions.php&#039;;

if(isset($_POST[&quot;login&quot;]) ) {


	$username = $_POST[&quot;username&quot;];
	$password = $_POST[&quot;password&quot;];

	$result = mysqli_query($conn,&quot;SELECT * FROM user WHERE username = &#039;$username&#039;&quot;);


	//cek username
	if(mysqli_num_rows($result) === 1) {

		//cek password 
		$row = mysqli_fetch_assoc($result);
		if(password_verify($password, $row[&quot;password&quot;])) {
			header(&quot;Location : index.php&quot;);
			exit;
		}

	}

	$error = true;

}

?&gt;

&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Halaman Login&lt;/title&gt; &lt;/head&gt; &lt;body&gt;

&amp;lt;h1 &amp;gt;Halaman Login&amp;lt;/h1&amp;gt;

&amp;lt;?php if(isset($error)) : ?&amp;gt;
	&amp;lt;p style=&quot;color: red; font-style: italic;&quot;&amp;gt;Username atau Password yang dimasukkan salah ! &amp;lt;/p&amp;gt;
&amp;lt;?php endif; ?&amp;gt;

&amp;lt;form action=&quot;&quot; method=&quot;post&quot;&amp;gt;
	
	&amp;lt;ul&amp;gt;
		&amp;lt;li&amp;gt;
			&amp;lt;label for=&quot;username&quot;&amp;gt;Username&amp;lt;/label&amp;gt;
			&amp;lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot;&amp;gt;
		&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;
			&amp;lt;label for=&quot;password&quot;&amp;gt;Password&amp;lt;/label&amp;gt;
			&amp;lt;input type=&quot;password&quot; name=&quot;password&quot; id=&quot;password&quot;&amp;gt;
		&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;
			&amp;lt;button type=&quot;submit&quot; name=&quot;login&quot;&amp;gt;Login&amp;lt;/button&amp;gt;
		&amp;lt;/li&amp;gt;
	&amp;lt;/ul&amp;gt;

&amp;lt;/form&amp;gt; 

&lt;/body&gt; &lt;/html&gt;</pre>

avatar laurentellyzabeth
@laurentellyzabeth

14 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

Login untuk ikut Jawaban