Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid calling MySQL executable for creating database #132

Closed
nabeelio opened this issue Jan 10, 2018 · 45 comments
Closed

Avoid calling MySQL executable for creating database #132

nabeelio opened this issue Jan 10, 2018 · 45 comments
Labels

Comments

@nabeelio
Copy link
Owner

nabeelio commented Jan 10, 2018

Some (shared) hosts can potentially have the proc_open method blocked for security:

The Process class relies on proc_open, which is not available on your PHP installation.
  • Rewrite the database creation code, and skip it in total during the installer for mysql (assuming that the user already creates the database)
  • Including trying to connect to the database in the connection check code
@brent11292
Copy link

@nabeelio I am getting this error now: Wrong COM_STMT_PREPARE response size. Received 7 (SQL: select * from information_schema.tables where table_schema = id4231794_phpvms and table_name = migrations)

@nabeelio
Copy link
Owner Author

I found this, I can look into it as well, I see someone suggested a fix but I have to do some research if there are any side effects. They suggest contacting support, though. If you do that, can let me know what their answer is and if they have a fix?

https://www.000webhost.com/forum/t/wrong-com-stmt-prepare-response-size-received-7/66868/7

@nabeelio
Copy link
Owner Author

There's a new build up. I've forced disabled the emulation parameter, though the recommendation is to enable it, though enabling seems to have some other side effects. Give that a try. If that doesn't work and you get the same error, I'll come up with something.

@nabeelio
Copy link
Owner Author

@brent11292 Can you let me know what MySQL version they're running?

@brent11292
Copy link

@nabeelio Where would I find that? Currently using phpMyAdmin to manage the database.

@nabeelio
Copy link
Owner Author

@brent11292 if you can create a page called info.php and then upload it somewhere accessible; in it, put:

<?php
phpinfo();

And shoot the link over.

@brent11292
Copy link

@nabeelio How would I do that? Sorry just new to all of this.

@nabeelio
Copy link
Owner Author

Create a new file that has that in it, upload it to your server, in the same folder as the index.php file

@brent11292
Copy link

Found out how to do it another way. Heres the version: 10.1.29-MariaDB

@nabeelio
Copy link
Owner Author

Interesting you're seeing it on Maria. Do you have the option for MySQL? Or is Maria the only variant?

@brent11292
Copy link

Maria is the only one showing up

@nabeelio
Copy link
Owner Author

There's a new build going up, should show up in the development channel when it's available. If an env.php was created, delete it, and try reinstalling

@brent11292
Copy link

Where would env.php show up if it was created?

@nabeelio
Copy link
Owner Author

The root folder for wherever you uploaded phpvms

@brent11292
Copy link

I found something called env.blade.php; should I delete it?

@nabeelio
Copy link
Owner Author

No, that would break things. It's in the root folder, next to the index.php file. It'll be in the folder that you uploaded everything into.

@brent11292
Copy link

Theres a env.php.example next to index.php

@nabeelio
Copy link
Owner Author

If you can download then upload the latest version that was just built, that has some extra logging too, so if you have issues, you can at least send me the log files so I can examine.

And ok, so the env.php didn't get written, so you should be able to just run the installer.

@brent11292
Copy link

Alright I will run it tomorrow and I will comment again if I run into anything. Thanks for the help!

nabeelio added a commit that referenced this issue Jan 10, 2018
@nabeelio nabeelio removed this from the alpha milestone Jan 10, 2018
@brent11292
Copy link

@nabeelio Same message comes up: Wrong COM_STMT_PREPARE response size. Received 7 (SQL: select * from information_schema.tables where table_schema = id4240382_phpvms and table_name = migrations)

@nabeelio
Copy link
Owner Author

Hey, can you tell me what's in the file called VERSION. And, can you download the files in the storage/logs folder, zip them up, and then upload them here? Thanks!

@brent11292
Copy link

Where would I find those?

@brent11292
Copy link

And are you talking about MySQL?

@nabeelio
Copy link
Owner Author

No, it's the phpVMS logs. Go to the folder where the index.php is, there's a storage folder, and then a logs folder inside of that. Just send me all the files in there in one zip.

@brent11292
Copy link

Logs.zip

@nabeelio
Copy link
Owner Author

nabeelio commented Jan 11, 2018

I believe you might not have the latest version. Can you redownload and reupload?

@brent11292
Copy link

Yeah tried that twice now and nothing seems to be working

@nabeelio
Copy link
Owner Author

nabeelio commented Jan 11, 2018

Can you tell me what's in the VERSION file, that's in the same directory as the index.php? The log file doesn't have the added information so I think it's not the latest.

@brent11292
Copy link

v7.0.0-8aacd8

@brent11292
Copy link

Alright, will continue tomorrow. Hope it gets fixed by then

@nabeelio
Copy link
Owner Author

nabeelio commented Jan 11, 2018

I found a mistake I made, noticed it in the logs. Hopefully this next version will work. If it does/doesn't, either way, can you send me the latest logs you have? Thanks

@brent11292
Copy link

@nabeelio Still same error: Wrong COM_STMT_PREPARE response size. Received 7 (SQL: select * from information_schema.tables where table_schema = id4240382_phpvms and table_name = migrations)

@nabeelio
Copy link
Owner Author

Can you attach the latest log files, please?

@brent11292
Copy link

Logs.zip.zip

@brent11292
Copy link

whoops included .zip by mistake

@nabeelio
Copy link
Owner Author

Is this still MariaDB? And do you know what version? Because it seems to be IDing itself as mysql 5.5

@brent11292
Copy link

10.1.29-MariaDB - MariaDB Server

@nabeelio
Copy link
Owner Author

I'd contact your support. According to the log, it's reporting:

[2018-01-11 22:57:51] dev.INFO: Detected DB Version: 5.5.30  

5.5.30 is a MySQL Version. The Maria DB version would read like the one you said, with -mariadb in it.

@brent11292
Copy link

Ok

@brent11292
Copy link

@nabeelio I got it to work. Just needed to change hosts.

@nabeelio
Copy link
Owner Author

Cool, can you send me the logs again, just so I can see if the tweak I made took effect?

@brent11292
Copy link

logs.zip

@nabeelio
Copy link
Owner Author

Interesting, it still gives the DB version as Detected DB Version: 5.7.20-log, but it's ok, as long as it's working now.

@brent11292
Copy link

Yeah thats the version now.

@nabeelio
Copy link
Owner Author

But running on Maria still gives issues? Well it's alright, if it comes up again, I'll deal with it then. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants