Jump to content

Recommended Posts

Posted

I am totally new to PHP and MySQL. I have two questions.

 

1) From a previous post, I understand Johnny is down. Is that temporary? I can't seem to get to my home page.

 

2) My goal is to run PHP & MySQL from my own database for testing purposes for now. I want to upload the query code and database(s) directly without using the built-in features. Can that be done on this website? If so, where do I upload them to? I would assume the "public_html" folder. Is that correct? Any help would be appreciated.

 

Thanks in advance.

 

Richard

Guest Geoff
Posted

1) Johnny is routinely down; the signup page does state that johnny is unstable. There is really not much we can do about this because the causes of the downtime are unstable services like ASP.NET/JSP/Ruby on Rails.

 

2)

 

My goal is to run PHP & MySQL from my own database for testing purposes for now.

 

If you don't need any dangerous services like those mentioned above, I would recommend you switch to stevie.

 

I want to upload the query code and database(s) directly without using the built-in features.

 

Do you mean you have databases to import? Do you have the SQL code?

 

I would assume the "public_html" folder.

 

You should place your web pages in that folder.

 

Why don't you have a look at this tutorial?

Posted

Thanks for responding Geoff.

 

Do I have to go through the signup process again to switch to Stevie? I don't see any control to do it through my cPanel. For now, I think all I need is PHP and MySQL.

 

This is mainly just for learning purposes for now. I'll try to make this short, but pardon me if I ramble on a bit too much.

 

My long-term goal theoretically on a regular basis (daily, weekly or otherwise) is to be able to upload databases from local computers (either mine or clients) which are updated locally and then uploaded to the web servers so the data can be searched and viewed by the public in read-only mode, such as public records, etc.

 

I have installed on my local computer PHP, MySQL and Zend Server CE. I have now figured out MySQL enough to do the basics such as connecting, disconnecting, creating databases, creating tables, adding, editing, dropping, etc. In the process I created numerous test databases/tables.

 

I then located a nice program that will generate the PHP user interface (web pages) to query the database(s) along with numerous other database management tasks. I am currently in the 30 day trial period. It is a pretty nice software. You can check them out at SQL Maestro if you wish.

 

I am now up and able to run these custom PHP MySQL query pages locally through the Zend Server CE. Now I want to transfer my mini-masterpiece to the actual web using what I am already running locally. This is mainly for practice/learning purposes at this point. Allowing or disallowing functions such as whether a user can view, add, edit, delete records and/or specific fields are set prior to generating the PHP query page(s).

 

I hope that wasn't too confusing. :-)

 

Thanks in advance.

 

Oh, and also, the PHP pages (i.e., the web pages that the public would view/use to query the databases) that are generated include numerous supporting files/folders which I assume those would all be uploaded to the public_html folder.

Posted
Do I have to go through the signup process again to switch to Stevie? I don't see any control to do it through my cPanel. For now, I think all I need is PHP and MySQL.

Stevie is more stable and offers php and mysql that you need. Johnny is more unstable because he offers all the rest of the heliohost features; namely, ruby on rails, asp.net, as well as php, and mysql, etc. I would recommend switching to stevie based on what you have said.

 

Information on switching servers can be found on the wiki: http://wiki.helionet.org/wiki/Moving_your_account It can take a while because you need to basically delete your johnny account and create a new account on stevie. You should expect the process to take about 4 days. (48 hours to delete, and 48 hours to get the new account ready to go.)

 

My long-term goal theoretically on a regular basis (daily, weekly or otherwise) is to be able to upload databases from local computers (either mine or clients) which are updated locally and then uploaded to the web servers so the data can be searched and viewed by the public in read-only mode, such as public records, etc.

 

I have installed on my local computer PHP, MySQL and Zend Server CE. I have now figured out MySQL enough to do the basics such as connecting, disconnecting, creating databases, creating tables, adding, editing, dropping, etc. In the process I created numerous test databases/tables.

 

I then located a nice program that will generate the PHP user interface (web pages) to query the database(s) along with numerous other database management tasks. I am currently in the 30 day trial period. It is a pretty nice software. You can check them out at SQL Maestro if you wish.

 

I am now up and able to run these custom PHP MySQL query pages locally through the Zend Server CE. Now I want to transfer my mini-masterpiece to the actual web using what I am already running locally. This is mainly for practice/learning purposes at this point. Allowing or disallowing functions such as whether a user can view, add, edit, delete records and/or specific fields are set prior to generating the PHP query page(s).

You can import your databases into the heliohost mysql server by going to phpMyAdmin through cpanel and choosing the import tab. It's also quite possible that you could write yourself a way to import new database information through a php webpage, but you would want to make sure that was all locked down and secure to keep people from corrupting your data.

Oh, and also, the PHP pages (i.e., the web pages that the public would view/use to query the databases) that are generated include numerous supporting files/folders which I assume those would all be uploaded to the public_html folder.

Yes, or you could upload them to sub folders within public_html to make them viewable to anyone with a browser worldwide.

Posted

Oops. I think I didn't finish.

 

So if I understand, the pages that the public would view along with supporting files/folders would go in the public_html folder? Is that correct?

 

Where I am less certain is how do I get my local MySQL database(s) uploaded to be used/queried by those publicly visible web/query pages. Since I originally posted, somebody mentioned to me that I need to dump the tables(s) locally to an .SQL file and upload those using one of the SQL management tools in cPanel or similar depending on the web hosting site. I think they said I need to first create a database on the web hosting site. Then maybe I link the uploaded table(s) to the database? Is that somewhat correct? If yes, where do I upload the .SQL file to? I think I'm close but probably off a bit.

 

Sorry, I'm still learning ... again.

 

Thanks Krydos. I think our posts crossed. I think I have enough now to take me a bit further.

 

Thanks Krydos. I think our posts crossed. I think I have enough now to take me a bit further.

Posted
So if I understand, the pages that the public would view along with supporting files/folders would go in the public_html folder? Is that correct?

Yes. If your domain is mydomain.com and you put a file called index.html into the public_html folder you could view it through a browser at mydomain.com/index.html.

Where I am less certain is how do I get my local MySQL database(s) uploaded to be used/queried by those publicly visible web/query pages. Since I originally posted, somebody mentioned to me that I need to dump the tables(s) locally to an .SQL file and upload those using one of the SQL management tools in cPanel or similar depending on the web hosting site. I think they said I need to first create a database on the web hosting site. Then maybe I link the uploaded table(s) to the database? Is that somewhat correct? If yes, where do I upload the .SQL file to? I think I'm close but probably off a bit.

Yes, you will need to create a database to hold the data first. When you use the tool to import it will ask you to choose a database to import into so if yo have zero databases it won't be able to import anything. Then it will also ask you for a file to import which will open a file browser where you can locate the file on your local computer. Where that file is and how it is created depends a bit on your local operating system, etc.

Sorry, I'm still learning ... again.

 

Thanks Krydos.

You're welcome. We're all learning; different people are just at different levels of knowledge. The only people who aren't learning anymore are the people who are dead.

I think I have enough now to take me a bit further.

Good luck!

Guest Geoff
Posted

I have a PHP script that can import MySQL databases from an SQL file. Let me fetch it.

Guest Geoff
Posted

Okay, here it is:

 

<?php

set_time_limit(0);

function SplitSQL($file, $delimiter = ';')
{
    set_time_limit(0);

    if (is_file($file) === true)
    {
        $file = fopen($file, 'r');

        if (is_resource($file) === true)
        {
            $query = array();

            while (feof($file) === false)
            {
                $query[] = fgets($file);

                if (preg_match('~' . preg_quote($delimiter, '~') . '\s*$~iS', end($query)) === 1)
                {
                    $query = trim(implode('', $query));

                    if (mysql_query($query) === false)
                    {
                        echo '<h3>ERROR: ' . $query . '</h3>' . "\n";
                    }

                    else
                    {
                        echo '<h3>SUCCESS: ' . $query . '</h3>' . "\n";
                    }

                    while (ob_get_level() > 0)
                    {
                        ob_end_flush();
                    }

                    flush();
                }

                if (is_string($query) === true)
                {
                    $query = array();
                }
            }

            return fclose($file);
        }
    }

    return false;
}

splitSQL($file);

Guest Geoff
Posted

What you need to do is upload the file to your site, and then change the $file variable to point to the file you want to import.

Guest Geoff
Posted

I went ahead and deleted your account because we were having problems with the delete script.

Posted

Thanks Geoff. I am having problems re-registering. I received this email response twice:

 

Your hosting account at HelioHost has encountered an error during installation. The error is: (blank)

 

Don't know if I didn't wait long enough or something else? I was using the exact same everything from the first registration.

 

Maybe I will wait another couple days and re-register using all new user name, domain name, password and HelioNet user name, however, I still need to use my same email address.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...