PDA

View Full Version : Php Myadmin



ljmyers
01-25-2005, 03:39 PM
OK guys. I'm trying to install a script without the help of installatron. I'm building my first database and this has me stumped...


KEY `login` (`login`), KEY `expires` (`expires`) )

I can't find any place on the screen in PHP MyAdmin (where you input all the create table info) where you could add the stuff above. How do I accomplish adding this? If that makes any sense. hehe

AND...

After the word default (just below in bold) it has this ''
What do I do with that? Add a ' in the space for default?

`users` ( `ID` int(11) NOT NULL auto_increment, `login` varchar(20) NOT NULL default '', `pass` varchar(20) NOT NULL default '',

AND...

Where do I add this in? LOL

AUTO_INCREMENT=38

Thanks for the help as always,
;) Me

eugene
01-25-2005, 05:58 PM
It appears that you have been given the SQL commands to create the new table.

First step, make (or select) your database. Then, In the box where you can enter raw sql commands, copy & paste the code snippet. You don't need to worry about using the built-in table creator system, just paste the code into the sql query box.

The default '' is single-quote single-quote, meaning the default is blank.

-Eugene

thevillageinn
01-26-2005, 02:29 AM
I'm not sure whether it helps or not, but SQL means 'structured query language' meaning that everything you want to do in / with SQL is set up as a query.

Whenever I have to figure out how to do something in SQL, I just think of it first as a query, and then the commands begin to flow into place.

ljmyers
01-26-2005, 08:31 AM
Thanks guys. I'll try creating it by copy and paste later today.

*smiles

thevillageinn
01-26-2005, 11:34 AM
of course, if you haven't worked with other SQL type queries, my little explanation probably won't help much.

ljmyers
01-26-2005, 03:44 PM
OK guys, I copied and pasted for tables and it worked fine but now in the install I'm getting this error. Does anyone know what it could mean or what I should do?
I posted this on the forum for the script but no one has answered yet and I have time today to accomplish this so I would like to if possible. If not, no worries.

http://www.myonlinemagazine.net/inspirations/install.php

Warning: fopen(config.php): failed to open stream: Permission denied in /home/ljmyers/domains/myonlinemagazine.net/public_html/inspirations/install.php on line 226

actual code on line 226: $file = fopen("config.php","wb+");

This is what I see on step 3 with the error at the bottom...

1. Checking database connection... Database Connection successful - OK
2. Processing tables...
... table "insp_categories" - Updating... Table updated successfully - 4 fields updated, 0 fields inserted - OK
... table "insp_config" - Updating... Table updated successfully - 24 fields updated, 0 fields inserted - OK
... table "insp_items" - Updating... Table updated successfully - 12 fields updated, 0 fields inserted - OK
... table "insp_users" - Updating... Table updated successfully - 7 fields updated, 0 fields inserted - OK
... table "insp_styles" - Updating... Table updated successfully - 4 fields updated, 0 fields inserted - OK
3. Creating 'config.php'...
Could not create 'config.php'. Please check folder permissions.

I uploaded via direct admin, deleted and ftp'd via dreamweaver but it didn't help.

eugene
01-26-2005, 05:45 PM
The reason for the error is that your php install script is trying to write a file. Unfortunately for it, it has not the permissions to write that file in that directory. You can address this problem by changing the directory permissions of inspirations to 777 (read write and execute for all users) within DirectAdmin. Then run the install. After it has finished, you may choose, for security reasons, to return the permissions to the default.

D9r
01-27-2005, 09:26 AM
I think you're making this much harder than it is. Cudos for trying but you've jumped a few steps ahead in the learning sequence, IMO.

What program are you installing? Are you absolutely sure you have to create the tables yourself? I'd be very surprised if you do. Most installation scripts do that for you. All you do is create the database (using the DA control panel) -- give it a name, username, and password. Then run the 'install' page for your application, enter the name/username/password as directed, and you're done.

(Study and learn about queries after it's installed.)

Of course now it sounds like you're almost finished with the installation so what I just wrote you can use next time around. Just change the permissions on that folder and you should be fine.

ljmyers
01-27-2005, 12:04 PM
Thanks for all the help and advice guys. I got it working just fine now. At least soooo far. I did have to create the tables myself and the permissions change was the cause of the error of course. Oh, and D9r, I'll be the first to admit that I do tend to make these things harder than they have to be when it is totally new to me. Well, all this script and code stuff anyway. My wee lil' brain just isn't wired for this type of stuff. lol It understands much better when explained as eugene did with the error. More or less in baby talk. lol Oh well, I got it; fiiiinally.

Thanks bunches again,
*Smiles