Php 7.4 version and unable to access user authorization page - php

I am using php 7.4. I have a php page called auth1. It requires a username and Password, which in the
past took me into auth3. I started receiving a deprecated error when I was on php 5.4 so I upgraded to
7.4. Now I get the error messages below. Any ideas. Could it be my mysql not compatible
Warning: Use of undefined constant user - assumed 'user' (this will throw an Error in a future version of PHP) in /home/utm/public_html/auth3.php on line 5
Warning: Use of undefined constant password - assumed 'password' (this will throw an Error in a future version of PHP) in /home/utm/public_html/auth3.php on line 5
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/utm/public_html/auth3.php:19 Stack trace: #0 {main} thrown in /home/utm/public_html/auth3.php on line 19

welcome to stackoverflow
your first and second lines are not Uncaught error and don't break your php processes
but about your last line it tell you that mysql_connect doesn't exists
because mysql extension and all of mysql_* functions are deprecated as of PHP 5.5 and has been removed as of PHP 7 to up
as the itachi said, and you said an example (mysqli) you should use a new extension between 3 following ways:
MySQLI reference functions Check they here
MySQLI OOP extension Check they here
PDO Extension Check they here
Also you can see this references for install your needs:
PDO Installation
MySQLI Installation
and about your 1st and 2nd lines you could put your codes to let us check, know and solve your problem

Related

Prestashop: Call to undefined function mysql_connect

I installed prestashop using softaculous, my php version is 5.2.17 and despite of that it shows this
ERROR: Fatal error: Call to undefined function mysql_connect() in /home/adeego/public_html/prestashop/classes/db/MySQL.php on line 51
If I go changing php version then it will be very painful to change every mysql_ into mysqli_ or pdo_mysqli_.
What is the best solution?

PHP : Undefined function mysql_connect() [duplicate]

This question already has answers here:
"Call to undefined function mysql_connect()" after upgrade to php-7 [duplicate]
(1 answer)
Undefined function mysql_connect() [duplicate]
(14 answers)
Closed 7 years ago.
I just downloaded the new xampp and try to run my old projects and I got this error
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:\xampp\htdocs\try\index.php:17 Stack trace: #0 {main} thrown in F:\xampp\htdocs\try\index.php on line 17
Does it mean that the mysql_connect that I used is not already supported in new xampp ?
mysql_connect()
has been removed from PHP7, which is used by the newest xampp version.
Instead, use mysqli_connect() like in this example.
Another method, PDO is also possible (but is coded in a very different way as mysql_connect.)
The MySQL module is depreciated in PHP5 and removed in PHP7, you can use these:
MySQLi http://php.net/manual/en/book.mysqli.php
PHP::PDO http://php.net/manual/en/book.pdo.php
Check your version by using phpinfo().
Not particularly by xamppp but php itself deprecated mysql Here a quote from them:
The original MySQL extension is now deprecated, and will generate E_DEPRECATED errors when connecting to a database. Instead, use the MySQLi or PDO_MySQL extensions
if you can provide us php version i can help more

php error MYSQLI_OPT_CONNECT_TIMEOUT using meekrodb

I am building a PHP website using MeekroDB and PHPMailer.
I don't know why, but today I got this PHP error that is only on my desktop.
On my laptop everything works fine.
I've tried to reinstall MySQL and delete all files and copies from my laptop.
The error is:
Notice: Use of undefined constant MYSQLI_OPT_CONNECT_TIMEOUT - assumed 'MYSQLI_OPT_CONNECT_TIMEOUT' in /var/www/html/GIT/pressofficer/public/conf/configurations.php on line 6
Notice: Use of undefined constant MYSQLI_OPT_CONNECT_TIMEOUT - assumed 'MYSQLI_OPT_CONNECT_TIMEOUT' in /var/www/html/GIT/pressofficer/public/libs/meekrodb.2.3.class.php on line 49
Fatal error: Class 'mysqli' not found in /var/www/html/GIT/pressofficer/public/libs/meekrodb.2.3.class.php on line 169
Sorry for the unnecessary post but I installed mysqli again and it started working.
Note that is mysqli not only mysql.
I am don't know much about databases that's why I was very confused.
Thanks anyway people.

Drupal Fatal error: Call to undefined function views_get_enabled_views()

I use drupal 7.22 with Apache 2.2 , mysql 5.5 and PHP 5.3.
I'm having the error of WSOD, and when I enable the error message, it shows:
Fatal error: Call to undefined function views_get_enabled_views() in
/var/www/drupal7/sites/all/modules/admin_menu/admin_menu.map.inc on
line 150
It happens when I migrate the whole drupal to another system, or when I update the core to the recent released version, WHERE I enter the username and password to access the administration page ( /drupal-address/user).
You got this error because of view does not support some function of new drupal
check last reply on this link
https://drupal.org/node/1778470
Also
https://drupal.org/node/1170192

Fatal error: Call to undefined method SplFileInfo::getRealPath()

I've got a client who has just set up a new VPN and is attempting to install my plugin.
He's getting the following error:
Fatal error: Call to undefined method SplFileInfo::getRealPath() on the commented line below. This appears to have something to do with the ZEND libraries. Any ideas what I should tell him to do?
If you are getting the undefined error means you have lower version of PHP.
The function is supported after PHP 5.2.2
SplFileInfo::getRealPath
(PHP 5 >= 5.2.2)
SplFileInfo::getRealPath — Gets
absolute path to file
http://php.net/manual/en/splfileinfo.getrealpath.php

Categories