Page 1 of 1

using mysqli(...) in "PHP safe mode"

Posted: Fri Mar 27, 2009 2:31 pm
by kbarrett2008
Ok, this one has me baffled.

I had a free web hosting service through Cisco that allowed MYSQL. Through some struggling I finally got their undocumented internal MYSQL scripts to work and got my db up and running.

When I attempted to connect to this database through PHP using

@ $db = new mysqli('hostname','mysqlusername','mysqluserpassword','databasename') ;

it crashed.

I contacted the help desk for this free hosting service and was told that perhaps my problem was that I was that mysqli (the oop call) might not work in php safe mode.

Can anyone either point me to some documentation that can enlighten me about this, or explain it to me (using small words since I'm an old retired guy)?

:offtopic: I've since been punted off this free system for giving the help desk guy my password so he could look at my php code directly. :banghead: Apparently giving the help desk guy, who has sysadmin privileges, your password so he can have access to your code is a violation of security protocol. :banghead:

Re: using mysqli(...) in "PHP safe mode"

Posted: Wed Apr 01, 2009 7:21 am
by jaoudestudios
It should not cause a problem. If in doubt use the previous api mysql.

Re: using mysqli(...) in "PHP safe mode"

Posted: Wed Apr 01, 2009 9:31 am
by Chris Corbyn
Is MySQLi actually installed on the server? Remove the error suppression so you can see what the error is.

EDIT | Also ignore your host about the OO style API being a problem in safe_mode. They don't know what they're talking about 8O