Cron PHP Warning

I'm slowly chipping away at all the Cron messages, but I find this one interesting:

---------------------

PHP Warning:  Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /home/xx/web/mysite.com/public_html/inc/classes/BxDolDb.php on line 40

PHP Fatal error:  Uncaught Error: Call to undefined function mysql_pconnect() in /home/xx/web/mysite.com/public_html/inc/classes/BxDolDb.php:66

Stack trace:

#0 /home/xx/web/mysite.com/public_html/inc/classes/BxDolDb.php(44): BxDolDb->connect()

#1 /home/xx/web/mysite.com/public_html/inc/db.inc.php(12): BxDolDb->BxDolDb()

#2 /home/xx/web/mysite.com/public_html/inc/classes/BxDolAlerts.php(7): require_once('/home/xx/web/di...')

#3 /home/xx/web/mysite.com/public_html/inc/header.inc.php(160): require_once('/home/xx/web/di...')

#4 /home/xx/web/mysite.com/public_html/periodic/cron.php(11): require_once('/home/xx/web/di...')

#5 {main}

  thrown in /home/xx/web/mysite.com/public_html/inc/classes/BxDolDb.php on line 66

-------------------------

Has anyone seen it before and how should I cope with it?

Thanks

Quote · 23 Jun 2019

What version of dolphin?

And what version of PHP is installed?

https://www.deanbassett.com
Quote · 23 Jun 2019

Based on errors here is what i think.

If your running Dolphin 7.3.5 or lower, then you most likely are trying to run it on PHP 7.0.0 or up. The fatal error of PHP Fatal error:  Uncaught Error: Call to undefined function mysql_pconnect() tells me that because mysql_pconnect does not exist in PHP 7 and up.

If your running Dolphin 7.4.0 or higher, then you have a problem with your dolphin files. Some of them did not get over written when you uploaded them. Again, the thing that tells me that is the same fatal error of PHP Fatal error:  Uncaught Error: Call to undefined function mysql_pconnect(). Because that function is not in the dolphin 7.4.0 and higher versions of dolphins inc/classes/BxDolDb.php

https://www.deanbassett.com
Quote · 23 Jun 2019

Hi Deano, 

I apologise. It was very remiss of me for failing to supply that information. It was 3am and I needed so sleep.

I'll go through it carefully:

I'm using Vesta Panel with Ubantu 16.04 for the first time. Generally it looks very good.

It seems it install with PHP 7.00 or thereabout.

I installed to clean versions of dolphin under two separate users. That allowed me to install separate versions of PHP under each user.

User1 is running a clean install of Dolphin 7.3.5  and the error message I sent is for this version. /Admin/Tools/Host Tools file clearly shows it's running PHP 5.6. The only thing that looks wrong in the entire file is that it shows the Apache rewrite module as undefined.

 

PHP: 5.6.40-8+ubuntu16.04.1+deb.sury.org+1 - OK

Web-server: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g

  • rewrite_module - UNDEFINED (try to check manually: apachectl -M 2>&1 | grep rewrite_module

When I checked it says rewrite is shared. Not quite sure what that means, but possibly with the other setup which I mention further down.

----------------

The second user contains a clean install of the latest Dolphin 7.4.2 and the host tools file confirms it's running under PHP 7.2:

PHP: 7.2.19-1+ubuntu16.04.1+deb.sury.org+1 - OK

 The rest of the file is showing no errors other than Apache rewrite being undefined, as was the case above.

-------------------

Both versions seem to be running ok, but I mentioned earlier, the news feed doesn't resolve and Mod's introduction module refuses to work on on both installs.

His Profile Creator mod  works on 7.3.5 but not 7.4.2

There's not a lot more I can tell you.

John

 

 

 



Quote · 24 Jun 2019

Then there is a possibility that the cli version of php that is being used to run cron jobs on the dolphin 7.3.5 site is not the php 5.6 version.

On a lot of installs of PHP. The command line version(cli) of PHP used is not the same as the one the web site uses. So that is what i suspect now.

https://www.deanbassett.com
Quote · 24 Jun 2019

Depends on the order of the install of php and if any environment values were set.  So as Deano pointed out, if PHP 7 was the default php on the server and php 5.6 was then installed later, the CLI is probably set to php 7.  Also, installing just php does not install everything automatically, you have to also install the cli etc as well.   Depending on the package; yum install php-cli or yum install php56-cli; etc.

Geeks, making the world a better place
Quote · 25 Jun 2019

Sorry for the delay.

I agree with both of you that the problem seems to be coming from the wrong version of PHP running the Cron, and possibly other stuff. Although each version of Dolphin reports the correct PHP, I'm not convinced that each of three versions is running independently. I say three because it seems Vesta runs on PHP 7.

As it's an experimental site, mainly to test the Control Panel, I'll do what Geek_Girl suggests and have another go with Virtualmin and Ngnix.

Quote · 26 Jun 2019

 

As it's an experimental site, mainly to test the Control Panel, I'll do what Geek_Girl suggests and have another go with Virtualmin and Ngnix.

Don't forget MariaDb, it is a drop in replacement for MySQL; developed by the original MySQL team before Oracle acquired it.  The MariaDb even has a section for setting up the correct repo file so once you have it in, it is simply, yum install mariaDB.  Centos now ships with MariaDb as the default but it is an older version like everything else in the Centos repo.

Geeks, making the world a better place
Quote · 26 Jun 2019
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.