New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 16.04.1 and php7 #343

Closed
wispr opened this Issue Sep 1, 2016 · 12 comments

Comments

Projects
None yet
4 participants
@wispr

wispr commented Sep 1, 2016

Well totally jacked myself up tonight. The upgrade to 16.04.1 didn't go well. It doesn't install php by default during the upgrade and host of other problems. The site won't load and getting a bunch of error logs that leads me to this:

http://stackoverflow.com/questions/34557221/php-undefined-function-mysql-connect

Basically looks like FM is us mysql_connect, which is no longer support in php7. But I could have just as easily missed a package install that was removed during the upgrade.

Anyone else running FM on 16.04.1 with php7 on apache?

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 1, 2016

I have yet to test fM with php7, but perhaps this is your solution.

http://stackoverflow.com/questions/35424982/how-to-enable-mysqli-extension-in-php-7

@wispr

This comment has been minimized.

wispr commented Sep 1, 2016

Unfortunately no....

I had not found the reference to enable mysqli in php7. Needed to add it to the file and this is what is in php.ini for mysql now:

/etc/php/7.0/apache2$ fgrep "mysql" php.ini
;extension=php_mysqli.dll
extension=php_mysqli.so
;extension=php_pdo_mysql.dll
[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size = 2000
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=
; http://php.net/mysqli.max-persistent
mysqli.max_persistent = -1
; http://php.net/mysqli.allow_local_infile
;mysqli.allow_local_infile = On
; http://php.net/mysqli.allow-persistent
mysqli.allow_persistent = On
; http://php.net/mysqli.max-links
mysqli.max_links = -1
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/mysqli.cache_size
mysqli.cache_size = 2000
; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; http://php.net/mysqli.default-port
mysqli.default_port = 3306
; http://php.net/mysqli.default-socket
mysqli.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-host
mysqli.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-user
mysqli.default_user =
; Default password for mysqli_connect() (doesn't apply in safe mode).
; Any user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; http://php.net/mysqli.default-pw
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
; Enable / Disable collection of general statistics by mysqlnd which can be
; http://php.net/mysqlnd.collect_statistics
mysqlnd.collect_statistics = On
; Enable / Disable collection of memory usage statistics by mysqlnd which can be
; http://php.net/mysqlnd.collect_memory_statistics
mysqlnd.collect_memory_statistics = Off
; http://php.net/mysqlnd.net_cmd_buffer_size
;mysqlnd.net_cmd_buffer_size = 2048
; http://php.net/mysqlnd.net_read_buffer_size
;mysqlnd.net_read_buffer_size = 32768

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 1, 2016

I guess it's time to change fM to use mysqli. :)

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 1, 2016

@WillyXJ WillyXJ modified the milestone: 3.0 release Sep 7, 2016

@WillyXJ WillyXJ added the fM Core label Sep 7, 2016

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 8, 2016

This is now included in 3.0-alpha1 and later.

@wispr

This comment has been minimized.

wispr commented Sep 19, 2016

FYI, running through this in the alpah version and the website will load at this point. Getting this error:

Your PHP installation appears to be missing the mysql extension which is required by facileManager.

Let me know if I can get you any more info.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 19, 2016

Ah, that check was missed. If you edit fm-includes/init.php line 62, remove 'mysql' from the array. I'll get this check fixed for the next pre-release.

@wispr

This comment has been minimized.

wispr commented Sep 19, 2016

Thanks Jon. Made the change manually, server went through the upgrade process just fine. All of the clients updated as well.

@wispr

This comment has been minimized.

wispr commented Oct 3, 2016

FYI, looks like this is broken again. Tried the lastest from the 3.0 branch on github as well. Apache is up and running but the main page won't load at all. You can get the login page to load (after removing mysql from the array in init.php) but after attempting to log in, it'll just sit there and spin.

@lchanouha

This comment has been minimized.

lchanouha commented Oct 3, 2016

linked to #353

WillyXJ added a commit that referenced this issue Oct 5, 2016

@tedcahall

This comment has been minimized.

tedcahall commented Nov 21, 2016

Is there a build version I can download and test on 16.04.1 that corrects this? Happy to test and start using that. If not, is there an ETA for that build?

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Nov 21, 2016

The latest unstable version that includes this fix is 3.0-alpha2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment