shannah / xataface

Framework for building data-driven web applications in PHP and MySQL
http://xataface.com
GNU General Public License v2.0
134 stars 57 forks source link

PHP mySQL Error Called - Trouble Installing #105

Open dziegler991 opened 6 years ago

dziegler991 commented 6 years ago

Hi there!

I am having issues simply initializing xataface and installing it through the installer. I am cloning xataface from the master branch. Changing nothing else, other than installer.disabled to .enabled, I receive this error in my php error.log:

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/xata/xataface-2.1.3/xf/db/drivers/mysql.php:2\nStack trace:\n#0 /var/www/html/xata/xataface-2.1.3/installer.php(533): xf_db_connect('localhost', 'root', 'password')\n#1 /var/www/html/xata/xataface-2.1.3/installer.php(548): db()\n#2 {main}\n thrown in /var/www/html/xata/xataface-2.1.3/xf/db/drivers/mysql.php on line 2

*Note: I receive the same error when I change localhost to my DB in installer.php

PHP version: PHP 7.2.7-2+0~20180714182401.1+jessie~1.gbp3fcba8 (cli) (built: Jul 15 2018 13:57:20) ( NTS ) Apache version: Apache/2.4.10 (Debian)

amrcode1 commented 6 years ago

you edit the conf.ini file to look like this?

[_database] host=localhost name=DB user=root password= driver=mysqli

see driver item amd user/password

mysql_connect() is not supported by php 7.0.0+ use mysqli_connect()

see http://php.net/manual/es/function.mysql-connect.php

dziegler991 commented 6 years ago

This error is being thrown before I even have a conf.ini file. As I understood it, I should be able to run the installer.php prior to the conf.ini file being created. The installer.php page visually HTTP 500's and the error_log spits out what I posted above.

shannah commented 6 years ago

The installer is going to be replaced soon by something better. It doesn't support mysqli.

In the mean time, you should do a manual install

dziegler991 commented 6 years ago

Great, got it working. Thanks guys. Out of curiosity (and full disclosure, I haven't looked at the documentation so I apologize) how customizable is the UI?