4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 21, 2017, 01:27:26 AM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Issues / Ausgaben
| |-+  Discussion & Troubleshooting (Moderators: Acidgod, ivan, Rembrandt)
| | |-+  PHP 7
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: PHP 7  (Read 1820 times)
Parado
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« 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.

Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #1 on: May 02, 2017, 06:45:58 PM »

Hallo,

Du müsstes die Möglichkeit habe die Einstellung selbst vornehmen zu können.

Stelle bitte auf 7 im Webspace um.


nobby
Logged
Parado
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #2 on: May 02, 2017, 07:17:03 PM »

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
Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #3 on: May 02, 2017, 07:27:43 PM »

Ja das must Du dier mal Anschauen /media/includes/db_mysql.php in Zeile 37 dort meldet er schwerwiegenden Fehler

nobby
Logged
Parado
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #4 on: May 02, 2017, 08:17:32 PM »

Funktioniert jetzt hab auf mysqli umgestellt
Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #5 on: May 02, 2017, 08:20:59 PM »

Funktioniert jetzt hab auf mysqli umgestellt

 Good Good Wink
Logged
heinier
Newbie
*
Offline Offline

Posts: 15

Thank You
-Given: 2
-Receive: 0


View Profile
« Reply #6 on: May 07, 2017, 05:51:20 PM »

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
« Last Edit: May 07, 2017, 06:09:45 PM by heinier » Logged
dneibert
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 3
-Receive: 0


View Profile
« Reply #7 on: July 18, 2017, 05:07:42 AM »

I have the same issue with PHP7. If anyone could post a fix when they figure it out, that would be great. Thanks!
Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #8 on: July 18, 2017, 08:10:08 AM »

Hi,

Change the database to mysqli.

Then there should be no error message.

nobby
Logged
dneibert
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 3
-Receive: 0


View Profile
« Reply #9 on: July 18, 2017, 05:36:11 PM »

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"?
Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #10 on: July 18, 2017, 07:38:03 PM »

In the CONFIG.PHP

This is where you put it  Arrow $db_servertype = 'mysqli';

config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?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

Follow members gave a thank to your post:
dneibert

For this post, 1 member gave a thank you!
« Last Edit: July 18, 2017, 07:56:15 PM by nobby » Logged
dneibert
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 3
-Receive: 0


View Profile
« Reply #11 on: July 18, 2017, 07:58:36 PM »

Thank you so much!  Very Happy
Logged
nobby
4images Guru
*******
Offline Offline

Posts: 2815

Thank You
-Given: 8
-Receive: 69


View Profile
« Reply #12 on: July 18, 2017, 08:16:10 PM »


If you can help you should do it  Wink
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.203 seconds with 22 queries.
Post your comments here