I am developing a web-site in PHP - MySQL. Here are some points to note:
The server's configuration offers the use of mysqli_stmt::bind_object(). But get_result()
seems to be a much better choice for me, since we can have result in the form of an array. I have overridden the function to accept variable number of arguments using the following line:
call_user_func_array(array($stmt, 'bind_param'), $params);
where the $params is an array of parameters.
I looked for several hosting companies, talked and mailed to customer support of many companies, including GoDaddy and Manas Hosting, they do not offer the use of mysqlnd. They, very logically, insist the use of VPS or Dedicated Servers. And obviously, both the suggested options are very costly, even at the entry level.
So, finally to my question, can we installed / embed mysqlnd into a website on a Linux server? If not, what alternative do I have to prevent me from changing the code of entire website, which will take me many-many days?
Regards
I experienced this before as well and it was a real time-eater. The only solution is to use PDO if you do not want to upgrade to VPS. You can try to SSH in the shared hosting account but good luck trying to change anything because the web administrators are smart in web hosting. The web hosters I have even went as far as to remove yum.conf
from /etc/
and denied permission to it to where you couldn't install any packages through yum. If you get a VPS however and you have cpanel, you can change the configuration options for PHP. It took me a long time to figure this out, but I learned that you can change PHP options in CPanel by running /usr/local/cpanel/scripts/easyapache
. If you run Apache 2.2, you can also change the config options for PHP config options by following this documentation. Without a VPS, there's no way to change CPanel like that I'm pretty sure. I hope this post helps somewhat.
Unless your hosting company has enabled the use of dl()
which I can almost guarantee they have not, then no.
Your second option which you've already pointed out, would be to write (or find, they may exist, maybe someone else can point you in that direction) a compatibility layer for mysqlnd. I'm assuming there isn't one already existing since you wrote your own. So unfortuantely, I believe you are stuck in the mud.
In any event, you should really use PDO next time :) But I know, hindsight is 20/20, so...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With