Fatal error: Uncaught Error: Call to undefined function mysql_con

Hi I am getting this message of database connection error when clicking in the first page.
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/h6/322/1077322/public_html/conn/exe.php:6 Stack trace: #0 /storage/h6/322/1077322/public_html/index.php(3): require() #1 {main} thrown in /storage/h6/322/1077322/public_html/conn/exe.php on line 6

Actually I downgrade PHP version and now I could connect but still have a message

Notice: Undefined index: area in /storage/h6/322/1077322/public_html/includes-acoes/pagina-principal/index.php on line 4

in the front page
And i am not able to access all my images.
My PHP have :slight_smile:

<?php
//pagina principal
//
$sqlvitrineh=mysql_query(“select id,id_cod,artista,image,image2,titulo,vitrine,id_cod_artista from tbl_image_artistas where vitrine=1 and id_cod=’”.anti_injection($_GET[‘area’])."’") or die (mysql_error());
$linevitrineh=mysql_fetch_array($sqlvitrineh);
//lista as vitrines
$sqllist=mysql_query("select id,id_cod,artista,image,image2,titulo,vitrine,id_cod_artista from tbl_image_artistas where vitrine=1 order by id asc limit 8 ") or die (mysql_error());

I upload the images files today after create database , need to do some refresh?

Could anyone help?

Sorry you are experiencing this, the problem is being investigated now and hopefully will be resolved soon.


Keep an eye over at http://status.000webhost.com once all the monitors are green, then give it a little time to return to normal.

Any database errors will occur while database is offline, the same for any permissions & MySQL errors that appear - while there are red monitors your site will NOT function as normal and will display errors - try not to make any major changes to your website, don’t try to perform operations on the databases etc.

Sorry again and hopefully you’ll be back up and running soon!

Database problem solved

1 Like

Hi I am getting this message of database connection error when clicking in the first page.
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/h6/322/1077322/public_html/conn/exe.php:6 Stack trace: #0 /storage/h6/322/1077322/public_html/index.php(3): require() #1 {main} thrown in /storage/h6/322/1077322/public_html/conn/exe.php on line 6
Actually I downgrade PHP version and now I could connect but still have a message

Notice: Undefined index: area in /storage/h6/322/1077322/public_html/includes-acoes/pagina-principal/index.php on line 4

in the front page
And i am not able to access all my images.
My PHP have :slight_smile:

<?php
//pagina principal
//
$sqlvitrineh=mysql_query(“select id,id_cod,artista,image,image2,titulo,vitrine,id_cod_artista from tbl_image_artistas where vitrine=1 and id_cod=’”.anti_injection($_GET[‘area’])."’") or die (mysql_error());
$linevitrineh=mysql_fetch_array($sqlvitrineh);
//lista as vitrines
$sqllist=mysql_query("select id,id_cod,artista,image,image2,titulo,vitrine,id_cod_artista from tbl_image_artistas where vitrine=1 order by id asc limit 8 ") or die (mysql_error());

I upload the images files today after create database , need to do some refresh?

Could anyone help?

Accidental repost or have you still issues?

Can you post your 000webhost.url?

Still having issues, just updated the messages. Could solve some looking old posts in the forum, but still having problems.

https://nieegaleria.000webhostapp.com

https://status.000webhost.com/

first
Fatal error: Call to undefined function anti_injection() in /storage/h6/322/1077322/public_html/includes-acoes/pagina-principal/index.php on line 4

second
©
Notice: Use of undefined constant Y - assumed ‘Y’ in /storage/h6/322/1077322/public_html/includes/rodape/index.php on line 7
2017 Niee Galeria.
Todos os direitos reservados

both with error.
I have a guess. tying to upload files , no error messages , but all of images and some files, seems not to be there in
nieegaleria public_h… uploads gravuras

I’d wait to see when the database comes back up if your site resolves issues on its own.

Ok lets wait.
In fact my DB was incomplete, but messages of undefined still appearing. Something with script.

front page ( vitrine)
Fatal error: Call to undefined function anti_injection() in /storage/h6/322/1077322/public_html/includes-acoes/pagina-principal/index.php on line 4

©
Notice: Use of undefined constant Y - assumed ‘Y’ in /storage/h6/322/1077322/public_html/includes/rodape/index.php on line 7
2017 Niee Galeria.
Todos os direitos reservados

contato

Notice: Undefined index: nome in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 5

Notice: Undefined index: email in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 6

Notice: Undefined index: cidade in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 7

Notice: Undefined index: uf in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 8

Notice: Undefined index: dia in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 9

Notice: Undefined index: mes in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 10

Notice: Undefined index: ano in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 11

Notice: Undefined index: mensagem in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 12

Notice: Undefined index: outro in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 13

Notice: Undefined index: nome in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 15

Seems to be getting better I couldn’t load any images earlier.

Just wait until database issues resolve until performing changes.

Restore PHP version to what you previously had by default

Restored. Default 7.0
I was changed to 5.6 old one
Error messages different and equal of the first time

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/h6/322/1077322/public_html/conn/exe.php:6 Stack trace: #0 /storage/h6/322/1077322/public_html/index.php(3): require() #1 {main} thrown in /storage/h6/322/1077322/public_html/conn/exe.php on line 6

mysql_connect is an extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

So try 5.2/3/4 else contact your script developer for assistance :frowning:

1 Like

Thks
Part solved. but still having this issue.
Notice: Undefined index: area in /storage/h6/322/1077322/public_html/includes-acoes/pagina-principal/index.php on line 4

Notice: Undefined index: nome in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 5

Notice: Undefined index: email in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 6

Notice: Undefined index: cidade in /storage/h6/322/1077322/public_html/includes-acoes/contato/index.php on line 7

is ur problem already solved ? because i hv same problem