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

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
kbarrett2008
Forum Newbie
Posts: 9
Joined: Fri Mar 13, 2009 5:09 pm

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

Post 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:
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

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

Post by jaoudestudios »

It should not cause a problem. If in doubt use the previous api mysql.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

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

Post 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
Post Reply