Skip to content
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

Call to undefined function mysql_connect() #810

Closed
johanthoren opened this issue Jul 14, 2016 · 7 comments
Closed

Call to undefined function mysql_connect() #810

johanthoren opened this issue Jul 14, 2016 · 7 comments

Comments

@johanthoren
Copy link

I'm getting white screen of death with the following error code in the logs:

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/crm/Include/LoadConfigs.php

Unsure if it's a bug or something I've missed in my setup.

Ubuntu 16.04.

php --version PHP 7.0.4-7ubuntu2.1 (cli) ( NTS )

@DawoudIO
Copy link
Contributor

did you install the php mysql software module if this a custom server

@DawoudIO
Copy link
Contributor

also let us know how the system works on php 7 as we mainly test on 5.6

@johanthoren
Copy link
Author

I see now, it seems to have been removed in PHP 7.

This 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. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
mysqli_connect()
PDO::__construct()

Source

@crossan007
Copy link
Contributor

We are moving all data models to Propel ORM instead of the legacy mysql extension. When the moves are complete, this error should go away...

@crossan007 crossan007 added this to the 2.3.0 milestone Sep 7, 2016
@DawoudIO DawoudIO added bug and removed development labels Sep 30, 2016
@DawoudIO
Copy link
Contributor

DawoudIO commented Oct 23, 2016

can we detect php 7 and create the method that are needed

// Establish the database connection
if (!function_exists('mysql_connect')) {
  funcation mysql_connect(xx,xx) {
   map to new funcation until we get everything to ORM
  } 
}

@crossan007
Copy link
Contributor

I think we just need to hold off on supporting PHP7 until we get all of these legacy functions out. Otherwise we're just asking for trouble.

@DawoudIO DawoudIO modified the milestones: 2.4.0, 2.3.0 Oct 29, 2016
dschwen added a commit to dschwen/CRM that referenced this issue Nov 18, 2016
@dschwen
Copy link

dschwen commented Nov 18, 2016

I'm working on moving to the mysqli api. 886d828 is a first step that takes care of the straight forward replacements. There will be another commit coming shortly.

dschwen added a commit to dschwen/CRM that referenced this issue Nov 18, 2016
dschwen added a commit to dschwen/CRM that referenced this issue Nov 18, 2016
dschwen added a commit to dschwen/CRM that referenced this issue Nov 19, 2016
dschwen added a commit to dschwen/CRM that referenced this issue Nov 19, 2016
dschwen added a commit to dschwen/CRM that referenced this issue Nov 19, 2016
@crossan007 crossan007 mentioned this issue Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants