March 28, 2024, 02:39:50 PM *
Welcome, Guest. Please login or register.
News: Welcome to Talk.ws - The Official Forum for all GDI members!

If you are a new member please make sure to read the "Forum Rules, Forum Tutorials, and GDI FAQs" section.

Please avoid posting any questions which may require us to discuss detailed information regarding your GDI account. Such questions should be submitted to support@wsdomains.ws.

GDI has a strict Anti-SPAM policy. Please do NOT send unsolicited messages via Private Message.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Mysql support and Php extensions  (Read 6453 times)
NLahkim
Newbie
*
Posts: 2


View Profile
« on: November 28, 2011, 11:24:12 AM »

hi
i want to install a script on my website using php and mysql, but it seem that GDI doesn't have a mysql data base support.

how can i fix that please?

2- i wanna also insatll those extension on php, and active a Safe mode;

-mcrypt
-pdo_mysql



i have this message when i check the compatibility to install the sccipt


Quote
Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

    * Safe Mode is on
    * You are missing the mcrypt extension
    * You are missing the pdo_mysql extension


best regards
Najib
Logged
Nav M.
Full Member
***
Posts: 141

Believe in yourself when nobody else will...


View Profile WWW
« Reply #1 on: November 29, 2011, 05:07:43 PM »

hi
i want to install a script on my website using php and mysql, but it seem that GDI doesn't have a mysql data base support.

how can i fix that please?

2- i wanna also insatll those extension on php, and active a Safe mode;

-mcrypt
-pdo_mysql



i have this message when i check the compatibility to install the sccipt


Quote
Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

    * Safe Mode is on
    * You are missing the mcrypt extension
    * You are missing the pdo_mysql extension


best regards
Najib


Hello,

GDI does not offer access to MySQL db's but as far as I'm aware, the servers are more then capable of supporting them.

If you need access to a MySQL db for your Standard Hosted domain, you'll need to go buy some access from a different hosting provider.

BUT, If you already have a SQL db setup somewhere else and you need to access it with your .WS (GDI hosted) domain, you will need to do it differently as there is a remote access block preventing users accessing remote SQL db's.

Let me know if that's what your trying to do. I'll then explain further.

Nav
Logged

Global Domains International - My-WS


A NEW GDI REPLICATED SITE IS NOW AVAILABLE FOR ALL GDI AFFILIATES Email For Business Lead Capture Page

Global Domains International
Nav M.
Full Member
***
Posts: 141

Believe in yourself when nobody else will...


View Profile WWW
« Reply #2 on: November 30, 2011, 11:03:35 AM »

hi
i want to install a script on my website using php and mysql, but it seem that GDI doesn't have a mysql data base support.

how can i fix that please?

2- i wanna also insatll those extension on php, and active a Safe mode;

-mcrypt
-pdo_mysql



i have this message when i check the compatibility to install the sccipt


Quote
Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

    * Safe Mode is on
    * You are missing the mcrypt extension
    * You are missing the pdo_mysql extension


best regards
Najib


Hello,

GDI does not offer access to MySQL db's but as far as I'm aware, the servers are more then capable of supporting them.

If you need access to a MySQL db for your Standard Hosted domain, you'll need to go buy some access from a different hosting provider.

BUT, If you already have a SQL db setup somewhere else and you need to access it with your .WS (GDI hosted) domain, you will need to do it differently as there is a remote access block preventing users accessing remote SQL db's.

Let me know if that's what your trying to do. I'll then explain further.

Nav


Sorry, I missed your quote and didn't read your question properly.

I think the script you are trying to install is incorrectly assuming the server does not support the appropriate extensions because of a failing attempt to setup a SQL db on the server.

As I said before, the basic (or premium) GDI hosted plan do not provide SQL db access.

Post a link to this script your trying to install, I'll check it out.

Post a raw link to the zip file containing the script(s) for the application (Magento) you are trying to install.

Nav
Logged

Global Domains International - My-WS


A NEW GDI REPLICATED SITE IS NOW AVAILABLE FOR ALL GDI AFFILIATES Email For Business Lead Capture Page

Global Domains International
DavidBarnard
Newbie
*
Posts: 2


Make Money, or Make Excuses! - You Can't Do Both!


View Profile WWW
« Reply #3 on: December 06, 2011, 02:58:40 PM »

Quote
Quoting Nav:

,,,,BUT, If you already have a SQL db setup somewhere else and you need to access it with your .WS (GDI hosted) domain, you will need to do it differently as there is a remote access block preventing users accessing remote SQL db's. Let me know if that's what your trying to do. I'll then explain further.
Nav

PLEASE DO EXPLAIN:

I have ftp'd WordPress to the Root of my site. But, can not install.

I have the Blog, Forum and Gallery subdomains enabled. However, I do not see the files in my ftp program. (where the heck are those and how do we get to those?)

So,
1- how do we connect to mysql from another hosting vendor
2- how so we access the subdomains and files
3- how do we access the php.ini file

Thanks in advance
Logged

David Barnard
Founder
Global Mentors International
"Where Common Sense Finds Success"
Nav M.
Full Member
***
Posts: 141

Believe in yourself when nobody else will...


View Profile WWW
« Reply #4 on: December 07, 2011, 03:20:13 PM »

Quote
Quoting Nav:

,,,,BUT, If you already have a SQL db setup somewhere else and you need to access it with your .WS (GDI hosted) domain, you will need to do it differently as there is a remote access block preventing users accessing remote SQL db's. Let me know if that's what your trying to do. I'll then explain further.
Nav

PLEASE DO EXPLAIN:

I have ftp'd WordPress to the Root of my site. But, can not install.

I have the Blog, Forum and Gallery subdomains enabled. However, I do not see the files in my ftp program. (where the heck are those and how do we get to those?)

So,
1- how do we connect to mysql from another hosting vendor
2- how so we access the subdomains and files
3- how do we access the php.ini file

Thanks in advance

If your trying to install WordPress on your GDI hosted domain, you do not need to manually upload WP files as that's what the plugin does.

As you know, WordPress requires a SQL db, which you cannot manually setup with GDI. BUT when you activate the WordPress plugin, A SQL DB will automatically be setup for you, and the WP files will again, automatically be installed on your (sub)domain.

So you do not need to manually download the WordPress files (from WordPress.org) or upload them yourself, as it all gets done automatically once you have activated the plugin.

To access content from subdomains in on your FTP program:

This is what your FTP settings should look like:

Username: GDIUSERNAME
Password: GDIPASSWORD
FTP Address: ftp.YOURDOMAIN.ws
Port:21
Root Directory: / (<< notice the "/")
Web URL: http://www.YOURDOMAIN.ws (<< notice, NO subdomains)

Check if those settings match yours configured with your FTP program. If they don't, make the appropriate changes. You should then see multiple directories (folders) on your server, each named by your sub domain, so it should look like this:

FTP:YOURDOMAIN.WS//root
blog.yourdomain.ws
somethingelse.yourdomain.ws
forum.yourdomain.ws

And you will be able to open those folders in your FTP program, and see/play with the content in them.

How do we connect to MySQL from another hosting vendor:

This all depends, If you need MySQL access for WordPress, then my answer to your question above should sort this issue out.

Short brief of how this remote DB access block works:

Users who wish to access a SQL database which is provided by one of the available plugins (WordPress, Forum, etc etc) will not have a problem, as the SQL db will be hosted on GDI's servers, therefore, it's not a 'REMOTE' DB, so the block wont effect that.

But, when a user wishes to access a SQL database, which is not hosted on GDI's servers (not part of one of the plugins), that makes the DB access 'REMOTE', therefore, the block prevents access.

Now there are ways to get around this issue, but before I explain them, I have a better solution:

If you have either the WordPress or Forum plugin installed (judging from your previous post, you do) on the domain you wish to access a SQL DB, then actually, you don't need to get a SQL db from another hosting provider as you have one setup already. And because its on GDI's servers, the block wont have any effect on it when you try to access it.

So here's what to do, if your OKAY with using the SQL db already setup for one of your plugins:

I don't know much about the Forum plugin, but once you have WordPress up and running, here's what to do:

Access the sub domain you have WP installed on, from your FTP program and look for a file called wp-config.php, once you found it, open it.

That file holds all your DB info (username, password, host, etc etc)....

Take that info, and use it as you please. Again, because that info is for a DB hosted on GDI's servers, the block wont effect it.

BUT NOTE:
There are certain security policies on this DB. So there will be somethings that you just cannot do on the DB, which you can do on a DB hosted by another provider.

NOW, If all else fails or you just simply do not want to use GDI's SQL DB for your own stuff, and you'd prefer to use one with full access, hosted by another provider:

Here's what you need:

FTP access with another domain hosted by a different hosting provider (GoDaddy maybe?)
of course, access to the SQL.
A text editor (notepad) OR better, a Web DEV program such as Dreamweaver, or some kind of application that supports PHP checkup.

The steps: (I'm going to use GODADDY for this example)

1.) Create a new .php file and name it access.php, then save that on the ROOT of your GoDaddy server.
2.) Create a folder on the ROOT of your GoDaddy server, called DB_INFO (or whatever you want).
3.) Create another .php file called db.php and save it in the DB_INFO folder.
4.) In db.php, copy and paste this :

Quote
$db_host = DB_HOST;
$db_user = DB_USER;
$db_password = DB_PASSWORD;
$db_name = DB_NAME;

Replace the bold stuff with your own DB info, then save the file again. (make sure you re-upload it on your server if your working on it locally)

5.) Open up notepad (or any other text editing applications) and copy and paste this into the text editor:
Quote
deny from all

Now save that into the DB_INFO folder, and make sure you name it .htaccess.
NOTE: When saving it as .htaccess, make sure you select All Files on the Save as type:.

6.) Go back to the access.php file you created earlier, and open it up.

Now, this is where we get technical:

For security purposes, you need to come up with a HUGE password. Something like:
Quote
YoUwillNEverguEssthisAmaz1ngp2ssw5rd
(notice how I use upper/lower case and numeric characters there...)

Once you have thought of a password, copy and paste this into your access.php file:

Quote
$exp_pass="YOURPASSWORD";
$req_pass = $_POST['my_pass'];

if ($exp_pass == $req_pass){

require_once('DB_INFO/db.php');

// do what you want with your SQL db here.

//once you have done all DB queries, and you've got the info you need from the DB, you need to send the info to your GDI hosted domain, so you put it all in an array:

$final_DB_result=array('example_name' => $DB_q['Name'], 'example_email' => $DB_q['Email']);

//once all the info is in the array, you need to use JSON ENCODE to encode the info:

echo json_encode($final_DB_result);

}

Now of course, you can do as you please in the access.php file (any kind of DB query (insert, select, drop, etc etc). So you need to change that code up a little, which I'm sure your capable of doing.
 
7.) Once you have that done, re-upload it to your GoDaddy server..

Now back to your GDI server:

8.) Open up the .php file you which to access your SQL DB with, or if you haven't already, create one and call it what you like.

9.) Copy and paste this code into the .php file:

Quote
$pass="YOURPASSWORDHERE";
$fields = array(
    'my_pass' => $pass,
);
$field_string = "";
foreach($fields as $key=>$value) {
   $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string,'&');
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://YOUR_GODADDY_DOMAIN/ACCESS.PHP");
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
curl_setopt($ch, CURLOPT_POST, 1);
$F_RESULT = curl_exec($ch);
$data = json_decode($F_RESULT);

//now we wanna fetch some of that data we put in that array, so here's how we do it:

$name = $data->example_name;
$email = $data->example_email;

//and for testing purposes, we shall echo the fetched info out:

echo "here is $name, and here is $email";

And there you have it, you've sent a request to another server, to process all the DB stuff, and once its all be processed, you get the info back at your GDI domain.

Just a short Brief of what actually goes on, when you use this method:

Basically, the first thing that happens is your password gets sent off to the access.php file on your GoDaddy server. Then, the password gets checked to see if it matches the correct password (defined in the access.php file itself.)

If the password is correct, all your DB queries will be processed and your results will be placed in an array, which will then be echoed out with JSON for your GDI domain to fetch, and decode.

Once everything is done on your GoDaddy side, your GDI domain will then decode that array, and allow you to use it as you please (echo it, email it, do whatever with it).

NOTE: You can send all you want from your GDI domain to access.php. So lets say your working on a HTML form which places its input data into a db...You can simply send off the form data to access.php the same way you do with the password:

Just include it into the $fields array:

Quote
$fields = array(
    'my_pass' => $pass,
'form_input_name' => $form_name,
'form_input_email' => $form_email, //etc etc
);

and then, you can receive it in your access.php file, in the same way you do the password:

Quote
$req_pass = $_POST['my_pass'];
$the_form_data_name=$POST['form_input_name'];
$the_form_data_email=$POST['form_input_email'];// etc etc So you can send and receive as much variables/data as you want to process in the DB query or for other purposes....

NOW, NOTE:
Some of the steps I mentioned are just done for security reasons, which therefore mean they are optional, BUT I HIGHLY recommend them.

Also: It would be stupid of you to just use the code/file names/folder names I've written in this example on your project, as some evil monster could be reading this, and thats not good. So make sure you change the folder.file names to your own (so change DB_INFO and other file names to something you'd better prefer. If you do change the names, be sure to change it in the code.)

As to your other question, I'm not quite sure about hot to access the php.ini file. You should contact support, they should be able to help you with that.

One more thing: Because my example it not the safest way to go about this, I'm not responsible for any action you take, whether you use my example or not.

And its taken me over an hour to right this all out for you, so I am expecting some feedback on how things go please.

But other then that, happy coding!

Nav
Logged

Global Domains International - My-WS


A NEW GDI REPLICATED SITE IS NOW AVAILABLE FOR ALL GDI AFFILIATES Email For Business Lead Capture Page

Global Domains International
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Copyright © 2024 by Global Domains International, Inc. · All Rights Reserved
701 Palomar Airport Road #300 · Carlsbad, CA 92011 · 760-602-3000