Receiving Error from Creating E-commerce, HELP

Status
Not open for further replies.

nilevall

New Member
Messages
10
Reaction score
0
Points
1
need help :banghead::banghead::banghead: I'm so frustrated with this error all day. :locktopic: seems like PHP is playing tricks on my mind I use the script to install the site and the site installs but doesn't run at all.
http://nilevalleyriver.x10host.com/ is the site I'm setting up but it keeps coming with this error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/nilevall/public_html/classes/db/mysql.class.php:36 Stack trace: #0 /home/nilevall/public_html/classes/db/mysql.class.php(63): Database->__construct(Array) #1 /home/nilevall/public_html/controllers/controller.index.inc.php(20): Database::getInstance(Array) #2 /home/nilevall/public_html/index.php(20): include('/home/nilevall/...') #3 {main} thrown in /home/nilevall/public_html/classes/db/mysql.class.php on line 36

I am using PHP 7.2 at default settings and it isn't working. I don't understand no matter which PHP version I try it doesn't seem to work and I am using it only at default settings I believe. Somebody please aid to my assistance immediately.
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
Someone respond now! There is no answers I could find on google.
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
Moderators forgive the triple posting before hand, I just want someone of knowledgeable
experience to help a despaired beginner to redeem a functioning website successfully.
I really need the answer to this and why it's happening?

Fatal error: Call to undefined function mysql_connect() in /home/nilevall/public_html/classes/db/mysql.class.php on line 36
 
Last edited:

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
ext/mysql ("mysql_*()") was removed in PHP 7. You will either need to use an older version of PHP such as 5.6 or use MySQLi/PDO functions instead.
The PHP version can be changed in cPanel.
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
ext/mysql ("mysql_*()") was removed in PHP 7. You will either need to use an older version of PHP such as 5.6 or use MySQLi/PDO functions instead.
The PHP version can be changed in cPanel.
Yes I am aware of how to change the PHP already but what settings would it get to get CubeCart to function properly?
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
I installed the software directly from the script installer.
I will show screen shots
gg.png

rgtr.png

tt.png
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Do you know the version number of the CubeCart software being used? Because newer versions (which you can get from the official site) supports and recommends PHP 7.2.
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
Do you know the version number of the CubeCart software being used? Because newer versions (which you can get from the official site) supports and recommends PHP 7.2.
It is the latest one from the script installer (or b.k.a. softaculous ) version 6.2.2
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
So it says..
You mentioned that older versions of PHP versions were used without success. Have you enabled the 'mysql' option in the PHP module settings for 5.6?
I find it odd that mysql_* functions are being used in the version that is being claimed by Softaculous. It doesn't sound like the software version is actually 6.2.2 in this case.
Edit: found a few things while going through the source code. Will get back with suggestions.
Edit 2: create a file with whatever name you want such as 'test123' but end it with '.php'. So, 'test123.php'. Add the following into the file:
PHP:
<?php
if (function_exists('mysqli_connect')) {
    echo 'MySQLi ready';
} else {
    echo 'MySQLi not ready';
}
Visit youractualsitenamehere.x10host.com/test123.php and share the result.
(The software partly does this check to determine if it should use MySQLi or MySQL functions.)
 
Last edited:

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
So that explains the error. It falling to MySQL rather than MySQLi because it cannot find MySQLi, regardless if it is on PHP 7.
Try unchecking 'mysqli' & 'mysqlnd', applying, checking them and then apply once more.
If it still says 'MySQLi not ready,' while not recommended, set the version as PHP 5.6 and enable the PHP modules you need (including 'mysql').
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Mhm. In that case, someone higher up who has access would need to look into the MySQL modules not properly being enabled/applied for your account. It isn't the first time it happened.
 

nilevall

New Member
Messages
10
Reaction score
0
Points
1
Mhm. In that case, someone higher up who has access would need to look into the MySQL modules not properly being enabled/applied for your account. It isn't the first time it happened.

Okay how do I go about it? I tried contacting support@x10hosting and they said I'm better off posting here lol
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
If you post here then volunteers (those who have [more] access and have contacts) and sometimes staff would eventually check out the forum threads and do what they can to help. Although it can take a while for that to happen.
I would have expected them to help you out via email if it is something that the end user cannot do anything about. Then again, maybe at the time you emailed them they thought it was just a programming or 3rd party software issue that would not necessarily require staff assistance.
 
Status
Not open for further replies.
Top