4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Parado on May 02, 2017, 06:20:31 PM
-
Ich hab Problem mit PHP 7 und zwar bekomm ich FATAL ERROR von db_mysql.
Version ist 1.8
In Moment hab ich die Seite auf PHP 5.6 gestellt bis ich eine Lösung habe.
-
Hallo,
Du müsstes die Möglichkeit habe die Einstellung selbst vornehmen zu können.
Stelle bitte auf 7 im Webspace um.
nobby
-
Nach der Umstellung auf PHP 7
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /www/htdocs/xxxxxe4/media/includes/db_mysql.php:37 Stack trace: #0 /www/htdocs/xxxxxxxx/media/global.php(400): Db->__construct('localhost', 'xxxxxxx', 'xxxxxxxxx...', 'xxxxx') #1 /www/htdocs/xxxxxxx/media/index.php(30): include('/www/htdocs/w00...') #2 {main} thrown in /www/htdocs/xxxxx/media/includes/db_mysql.php on line 37
-
Ja das must Du dier mal Anschauen /media/includes/db_mysql.php in Zeile 37 dort meldet er schwerwiegenden Fehler
nobby
-
Funktioniert jetzt hab auf mysqli umgestellt
-
Funktioniert jetzt hab auf mysqli umgestellt
:thumbup: :thumbup: :wink:
-
Hi,
ich habe heute auch das Update auf 1.8 vorgenommen und auch bei meinem Provider auf php 7.0 umgestellt.
Jetzt kommt bei mir eine ähnliche Meldung wie bei Parado:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /customers/f/1/1/xxxxxxxx.de/httpd.www/includes/db_mysql.php:39 Stack trace: #0 /customers/f/1/1/xxxxxxxx.de/httpd.www/global.php(407): Db->__construct('xxxxxxxx', 'xxxxxxxx', 'xxxxxxxx', 'xxxxxxxx') #1 /customers/f/1/1/xxxxxxxx.de/httpd.www/index.php(32): include('/customers/f/1/...') #2 {main} thrown in /customers/f/1/1/xxxxxxxx.de/httpd.www/includes/db_mysql.php on line 39
Zeile 39 in der db_mysql.php lautet:
37 function __construct($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
38 $connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
39 if (!$this->connection = @$connect_handle($db_host, $db_user, $db_password)) {
40 $this->error("Could not connect to the database server (".safe_htmlspecialchars($db_host).", ".safe_htmlspecialchars($db_user).").", 1);
41 }
Vielleicht könnte Parado mir bitte mal erklären, was er auf mysql umgestellt hat.
Gruß Heinier
-
I have the same issue with PHP7. If anyone could post a fix when they figure it out, that would be great. Thanks!
-
Hi,
Change the database to mysqli.
Then there should be no error message.
nobby
-
Hi,
Change the database to mysqli.
Then there should be no error message.
nobby
Thanks for the response but how do I change my database to "mysqli"?
-
In the CONFIG.PHP
This is where you put it :arrow: $db_servertype = 'mysqli';
config.php
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: config.php *
* Copyright: (C) 2002-2016 4homepages.de *
* Email: 4imges@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.8 *
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
date_default_timezone_set("Europe/Berlin");
$db_servertype = 'mysqli';
$db_host = 'localhost';
$db_name = 'xxxxxxx';
$db_user = 'xxxxxxx';
$db_password = 'xxxxxxxxxx';
$table_prefix = '4images_';
define("4IMAGES_ACTIVE", 1);
?>
The two files db_mysql.php and db_mysqli.php are available under 4images in the directory Include.
If the entry in the config.php is present you have another problem.
nobby
-
Thank you so much! :D
-
Thank you so much! :D
If you can help you should do it :wink: