close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error after upgrading to PHP 5.6 MySQLi

Thread began 3/09/2018 6:51 pm by cldsk | Last modified 3/10/2018 9:31 pm by Ray Borduin | 199 views | 9 replies |

cldsk

MySQLi Error after upgrading to PHP 5.6

Hello, after having trouble with a gallery module I am using, I discovered the client's GoDaddy Server was running PHP5.2, so I had to upgrade it to 5.6 (that was the highest option). On doing this, I am now getting the following error on the admin_cms/ page:
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/content/48/8996548/html/Connections/PowerCMSConnection.php on line 11

Warning: Cannot modify header information - headers already sent by (output started at /home/content/48/8996548/html/Connections/PowerCMSConnection.php:11) in /home/content/48/8996548/html/webassist/security_assist/helper_php.php on line 65


When I created the connection I used the standard MySQL as I was under the impression that MySQLi was not supported yet in PowerCMS? Is there a way to change the connection type? Do I have to redo everything I already have done in the database? I do have the latest MySQLi Server Behaviors installed in Dreamweaver.
Thanks for any advice/help.

Sign in to reply to this post

Ray BorduinWebAssist

That is a deprecated warning and not an actual error. You should be able to turn that off without effecting the functionality of the page. You can either turn it off in the php.ini from your hosting control panel, or turn it off on any individual pages where you see the problem.

php:
error_reporting(E_ALL ^ E_DEPRECATED);
Sign in to reply to this post

cldsk

thanks so much, just to confirm, at this point we cannot use MySQLi with PowerCMS though, correct?

Sign in to reply to this post

cldsk

I tried adding in that to the php.ini file, after clearing cache it still doesn't work.
Here is the php.ini contents:

error_reporting(E_ALL ^ E_DEPRECATED);
register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="


; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so


; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
; phpinfo, exec, system, dl, fsockopen, set_time_limit,
; popen, proc_open, proc_nice,shell_exec,show_source,symlink"


Not sure what might be in conflict?

Sign in to reply to this post

Ray BorduinWebAssist

This is a line of php code for a .php page:
error_reporting(E_ALL ^ E_DEPRECATED);

the same line in the php.ini file would look like:
error_reporting = E_ALL ^ E_DEPRECATED

Sign in to reply to this post

cldsk

Thanks for the quick reply. I have tried with that as well, but the error still shows:

error_reporting = E_ALL ^ E_DEPRECATED
register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="


; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so


; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
; phpinfo, exec, system, dl, fsockopen, set_time_limit,
; popen, proc_open, proc_nice,shell_exec,show_source,symlink"

Sign in to reply to this post

Ray BorduinWebAssist

Does adding this work:
display_errors = Off

Maybe it isn't using that php.ini file.

Sign in to reply to this post

cldsk

That didn't work either :(

It is the only php.in file in the server (I did a server search with FileZilla, and that is the only one that came up).

Following instructions at: https://www.godaddy.com/help/change-php-settings-26379

I also tried creating a php5.ini file and using this: error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
as seen in:
https://www.godaddy.com/garage/suppressing-warning-messages-php-deprecated-functions/
But that didn't work either



Just to confirm, there currently isn't MySQLi support for PowerCMS with the MySQLi Server Behaviors extensions that I could switch the connection type, correct?

Sign in to reply to this post

Ray BorduinWebAssist

That is correct. PowerCMS does not currently work with MySQLi.

You may want to contact godaddy about this. It appears to be ignoring your php.ini file and they should be able to tell you the proper way to disable deprecated messages.

Sign in to reply to this post

cldsk

Thx again for the reply. Finally figured it out - for this client's hosting package it reads a php56.ini file instead of a php.ini file. Once I created that, and used the code you gave me it worked and it came back up.

Thanks again for your help - sorry to have bothered you with this!

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...