We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

PDO, MySqli Support?? | Forum

Nathan
Nathan May 13 '16

When will oxwall get its PDO, MySqli support?


As you should be aware MySql is deprecated as of PHP7 and totally removed from PHP.


I just updated my server PHP to PHP7 and when trying to install oxwall I get this on the installation 


Your hosting account doesn't meet the following requirements:

mysql PHP extension not installed


By now all suppliers of PHP scripts should be updating their MySql code to PDO or MySqli.


PHP7 is now LIVE and out in the public domain it is the latest version of PHP that most hosting companies are running.


So why is oxwall still using MySql when it is deprecated and removed from PHP?


When can I expect a fully MySqli or PDO compliant update of Oxwall to be released so that my hosted clients can benefit from us using PHP7 on our hosting servers?


At present I have to roll back our servers PHP release to an older less secure version just so Oxwall will work, this is not good for our clients.

dave Leader
dave May 13 '16
MySQLi is an extension of MySQL so you have to have MySQL base installed for (i) to run. MySQLi will continue to perform even after PHP7. I believe what they are removing from PHP7 is the ability to run MySQL without the (i) extension.  


Also Oxwall already uses PDO prepared statements and such in the core.


The Forum post is edited by dave May 13 '16
Nathan
Nathan May 14 '16

OK thanks dave.


So if like you say that Oxwall already uses PDO prepared statements then why the error about 


mysql PHP extension not installed


When trying to install on a server running PHP7 and PHP7 no longer having mysql as an installable module while compiling PHP.


From the error it seems like Oxwall is trying to force use of mysql to me.


If it was as you say Oxwall already uses PDO prepared statements then that error would never even be displayed

The Forum post is edited by Nathan May 14 '16
dave Leader
dave May 14 '16
could be a bug in php7 or could be a bug in oxwall, or it could be that oxwall still has some dependency on it, not sure.. 


However i wonder why you want to jump on php7 already this soon, is there a reason?  Most people are on php 5.5 or even 5.6   why jump so far ahead. There are alot of softwares that are not even coded for php7 yet. 

Nathan
Nathan May 14 '16
The reason is that most PHP scripts have already been Re Written to use solely PDO or mysqli because as from php 7 scripts written solely in mysql will no longer work not at all. And PHP7 is the latest available version and as so is the most secure, I think that all hosting providers should be offering PHP 7 (as it has been live for quite some time now) for those reasons and most hosting providers that are on top of updates have already made the move to it.
The Forum post is edited by Nathan May 14 '16
dave Leader
dave May 14 '16
OK thanks for sharing... This is the weekend for the team, i am in the US so for me they come back sunday night, for you its monday when they do.  So lets see what ross has to say and maybe he has a good solution for you.  


Thanks ;)


PS... since i am finding both mysql and PDO in the script i am assuming 'and this is a guess' that they have not yet fully converted to just PDO... 

The Forum post is edited by dave May 14 '16
Nathan
Nathan May 14 '16
OK dave no problem mate yeah would be Monday here in the UK.


I have not checked over the code yet and I am no coder myself in anyway apart from themes but I do know that most scripts have been rewritten to use either mysqli or PDO or are in the process of being rewritten to do so, I am a moderator on a support forum for another GPL script, an auction script and at the moment the new FULLY PDO version of that is in testing RC4 now and waiting to be released and should be released by the end of the year.


I also am aware that WP and a lot of other scripts are all now PDO or mysqli only or in the process of being rewritten to be so.


Thanks for your help anyway and I was coming at this more as a Hosting Provider looking at Server Security more than anything else what with PHP7 now being implemented on most servers for security reasons as mysql was far to insecure and one the main reason that PHP have decided to drop support of it completely as of PHP7.

The Forum post is edited by Nathan May 14 '16
dave Leader
dave May 14 '16
I have a friend that runs a hosting company that still caters to the old php 5.3 and 5.4 clients lol.. Those clients could not afford or did not want to update their script so he caters to them with the lower php versions available so they dont have to change. lol... 


Seems to be working well for him.. :)   Some of those scripts are still using mysql_escape_string and not even mysql_real_escape_string  LMAO  and that is soooo old and deprecated now. 

The Forum post is edited by dave May 14 '16
Nathan
Nathan May 14 '16
Yeah I agree with that.


My clients can choose in their cPanel what version of PHP they wish to run right down to 5.0 but that still does not help if a client that has chosen to use PHP7 in cPanel and then decides I will install Oxwall and Oxwall won't even install and the error they get back in return don't even tell a novice a hell of a lot about why the error has occurred, like "this error is because your using PHP7 in cPanel and PHP7 no longer supports mysql coding, the script you are using works only on mysql, Please either update your script to the latest version or choose an earlier and less secure version of PHP inside your cPanel".


Hence I then get a support ticket asking why it is not working.


I guess this also works the other way round and the reason I mentioned that all hosting companies now should only offer PHP7 and up. 


It is the responsibility of a server admin to make sure all clients are safe by using the latest and safest option of all server add ons and components, mysql has been proven to be insecure on all levels hence the decision by PHP to drop all support of mysql as of php7, so it is now down to script creators to rewrite scripts according to the latest available SECURE coding processes

The Forum post is edited by Nathan May 14 '16
dave Leader
dave May 14 '16
All true however its not a perfect world, look how long it took for people to start trying to go to mysqli after mysql was deprecated, many years.   Some people hold out till the last minute.   


I hope that ross has a good answer when he gets in cause im curious as well :)

Nathan
Nathan May 14 '16
Thanks bud I have to say that I enjoyed that little debate.


Have a great day anyway Dave and I shall monitor the thread.

ross Team
ross May 16 '16
Nathan, we have not tested Oxwall on php 7 version yet. As it is fairly new and the stable version is still 5.6

So, can you please try to install the software in 5.5 + and see if you still have this issue?

Nathan
Nathan May 25 '16
Tried it on 5.5 and cant upload any images see my other threads
Nathan
Nathan May 25 '16
I can only seem to get it to install via softaculous.


I cant get through the install at all when uploading Oxwall via FTP and even after following all of the documentation for CHMODS and RECURSIVE CHMODS and even just uploading to my FTP gives all of the files and folders listed in the install instructions to make 777 are automatically given a CHMOD of 777 on any version of PHP including 5.4 or newer even with the PDO and mysqli modules installed and right up to PHP7.


I just keep getting the below screen (see attachment) when I try to install it in php7 however I do get a bit further in older PHP versions that even have the PDO and mysqli modules installed but then I just keep getting redirected back to the first page of the install when clicking next on the create a cron job page even though I have already made my cronjob and as listed above I have checked and double checked all CHMOD of all files and folders listed in the install docs.


PHP7 is not NEW it is the latest version of PHP that is LIVE and is now replacing all other versions of PHP on most hosting servers it is not NEW it has been live since early 2016 and most hosting providers have already updated to the new and secure PHP 7, in actual fact PHP7 is now that comonly established that it is even on a .3 version of PHP 7.0.3



The Forum post is edited by Nathan May 25 '16
Attachments:
  install.jpg (105Kb)
ross Team
ross May 26 '16

Nathan, Your PHP.INI doesn't have the mysql line uncommented, so it's not loading the mysql module (or the module is simply missing entirely).

Restart your webserver after you fix the PHP.INI file.

If you don't have access to php.ini file contact your hosting provider to assist you with that

Nathan
Nathan May 28 '16

Quote from ross

Nathan, Your PHP.INI doesn't have the mysql line uncommented, so it's not loading the mysql module (or the module is simply missing entirely).

Restart your webserver after you fix the PHP.INI file.

If you don't have access to php.ini file contact your hosting provider to assist you with that

It seems that you are not reading my posts in FULL or you just don't understand them.


Yes the mysql module is missing completely and there is no mysql line any longer in php.ini.

We are talking about php7 here and the mysql module is completely removed from php as of php7.


Go to a server near you and compile it with php7, it is now at php 7.3 and you will soon see that there is no longer a mysql module to install.


PHP have completely removed the mysql module and all and any support of it as of PHP7 due to security reasons.

 

All php scripts on servers running PHP7 and up must use PDO or MYSQLI modules and coding to support one or the other of them, there is no longer a MYSQL module or any way of adding it back from PHP7 and up.

The Forum post is edited by Nathan May 28 '16
dave Leader
dave May 28 '16
I know that Oxwall has not been tested officially for php7 and i know that the (i) is an extension of the MySQL, but i believe the question we should be asking here is this: 


Why is it flagging for MySQL when he has PDO and MySQLi enabled?


Why doesn't the software accept just PDO and MySQLi ?


All i can think of is that maybe MySQLi by itself is not the full library and is still has dependence on the base module. 


I do understand you nathan that you are on php7 and there is no MySQL at all. But remember that Oxwall has not been tested and as far as i know, not approved for PHP7 yet for these kinds of reasons.  But we will get there.  :)

The Forum post is edited by dave May 28 '16
Nathan
Nathan May 28 '16
Thanks Dave I agree exactly with what you said below


I believe the question we should be asking here is this: 
Why is it flagging for MySQL when he has PDO and MySQLi enabled?
Why doesn't the software accept just PDO and MySQLi ?


And another question to be asking is why oxwall is only compatible with PHP 5.5?


The Server Requirement docs state any PHP version up to PHP 5.5 however under testing I can only get oxwall to run under a PHP 5.5 Environment.


There have been numerous updates to PHP since PHP 5.5 

we have also had PHP 5.6 numerous different 5.6 releases, PHP 7.0.0, PHP 7.0.1, PHP 7.0.2, PHP 7.0.3, PHP 7.0.4, PHP 7.0.5, PHP 7.0.6 and now PHP 7.0.7 the current release and with each new release comes new security features and fixes so forcing users of your script to use a very outdated version of PHP is not right.

The Forum post is edited by Nathan May 28 '16
ross Team
ross May 30 '16
Nathan, we do have the testing of php7 on our roadmap, I'll pass to the devs the issue you're running into. I'll get back to you with the feedback asap. 
Nathan
Nathan May 30 '16
Thanks Ross I appreciate the help mate.


And by the way thanks for a great script I love Oxwall and all the hard work that the staff and team members have put into this great script however I do think that forcing the use of an outdated PHP version is not good and could be a possible security hole and the reason for me making the post originally to ask about PDO or Mysqli Support and to list the problems with installing on a NON mysql version of PHP as all PHP versions from 7.0  and into the future are NON mysql.

The Forum post is edited by Nathan May 30 '16