php error MYSQLI_OPT_CONNECT_TIMEOUT using meekrodb - php

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.

Related

How can I get my Joomla 3 to work correctly?

I need to do a very simple task for school in Joomla 3.10.3 but it doesn't seem to work correctly.
I'm trying to create modules but I can't, it gives me those errors:
Undefined property: Joomla\CMS\Object\CMSObject::$checked_out in C:\xampp\htdocs\Joomla3\administrator\components\com_modules\views\module\view.html.php on line 62
Warning: Undefined property: Joomla\CMS\Object\CMSObject::$position in C:\xampp\htdocs\Joomla3\administrator\components\com_modules\views\module\tmpl\edit_positions.php on line 17
Warning: Undefined property: Joomla\CMS\Object\CMSObject::$position in C:\xampp\htdocs\Joomla3\administrator\components\com_modules\views\module\tmpl\edit_positions.php on line 27
I've tried going into the files, but it looks like gibberish and I don't think I can fix it from there.
Maybe it's something with Joomla 3 being older and me having PHP version 8.1.10, dunno.
I think it is almost certainly the template that you are using is not compatible with PHP 8.1. A lot of the older Joomla 3 templates will throw errors. If you can switch to PHP 7.4.x I expect the problems will stop

Php 7.4 version and unable to access user authorization page

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

Joomla 3.0.2 to 3.0.3 upgrade causes blank front and back end

Tried to upgrade Joomla site from 3.0.2 to 3.0.3 using the web interface and this caused the front and backend to go down. The logs read as follows:
[31-Dec-2013 09:08:19 America/Regina] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/nicsca/public_html/libraries/gantry/core/gantrybrowser.class.php on line 91
[31-Dec-2013 09:08:20 America/Regina] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/nicsca/public_html/modules/mod_roknavmenu/lib/common/RokBrowserCheck.php on line 22
[31-Dec-2013 09:40:19 America/Regina] PHP Fatal error: Call to a member function get() on a non-object in /home/nicsca/public_html/plugins/system/remember/remember.php on line 94
I'm at a lost (fairly new to Joomla) and any help would be really appreciated!
Since remember is giving you a fatal error, unpublish that plugin by editing the extensions table in your database, at least then your site should load.
Update:
It is very strange that the updater is telling you 3.0.3. IF you go to the options for the Joomla update component, what settings are showing in the pop up?

"Fatal error: Call to undefined function" resulting in particular local server, but ran well in others'

I'm developing a PHP application which generating reports to PDF
Right now I'm facing some troubles
I'm working from my own computer with XAMPP Server and the code ran well
But when I copied the codes to my office's WAMP5 Version 1.6.5 Server I got errors
Fatal error: Call to undefined function array_fill_keys() in D:\wwwroot\tcpdf\include\tcpdf_fonts.php on line 1848
I went to that troubled line and removed it, but another Fatal error: Call to undefined function occured
Is there something wrong with my WAMP5 configuration?
Thanks
Your version of php is to old... as Royal Bg suspected.
Either upgrade to 1.6.6 for php 5.2. But if there is no reason to use such an old version switch to something less than 7 years old :)
see:
http://sourceforge.net/p/wampserver/news/?source=navbar

Problem with php mailer

am getting these errors while running php mailer. What could be the problem
MAMP/htdocs/practice/email/email.php on line 2
[06-Jun-2011 09:53:40] PHP Notice: Undefined variable: from in /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 259
[06-Jun-2011 09:53:40] PHP Notice: Undefined variable: Encoding in /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 271
[06-Jun-2011 09:53:40] PHP Fatal error: Cannot access empty property in /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 271
Please be sure that you are using the latest release of PHPMailer, 5.1. There is no such file "phpmailer.inc.php" in that release, which implies that the code you're using is either entirely incorrect or horribly obsolete. Indeed, the only reference I could find to that file is from a release dating back to 2003.
You might also want to consider using a more modern mailing library instead, like SwiftMailer.
The download link on PHPMailer's website is wrong. Instead of downloading PHPMailer v. 5+ you downloaded PHPMailer 4. Edit the download link and change the # 4 to 5. Then you get the correct version.

Categories