Jump to content

Uploading changed files of my website?


eduard
 Share

Recommended Posts

How do I upload my files which are stored in the hldocs folder of MAMP Uploading the MAMP folder? There´s a lot I don´t use!

Link to comment
Share on other sites

  • Replies 128
  • Created
  • Last Reply

Top Posters In This Topic

Why would you upload something you don't use? Have you thought about your question, or is your first impulse to post it here?
So, I only have to upload the changed files?
Link to comment
Share on other sites

So, I only have to upload the changed files?
you only have to upload what you intend to use. If you have files you don't use, you should delete them. More to the point, you've already uploaded files to a host before. It's the same thing. your webserver on your local machine is like the webserver on your host. do you ever think before you speak? or do you just not have the ability to have an inner monologue?edit: it appears sarcastic minds think alike... :) Edited by thescientist
Link to comment
Share on other sites

you only have to upload what you intend to use. If you have files you don't use, you should delete them. More to the point, you've already uploaded files to a host before. It's the same thing. your webserver on your local machine is like the webserver on your host. do you ever think before you speak? or do you just not have the ability to have an inner monologue?edit: it appears sarcastic minds think alike... :)
I uploaded my files, but got this error message:array(3) { ["description"]=> string(1) "d" ["price"]=> string(1) "2" ["quantity"]=> string(1) "4" } succesful form submission. initialize DB connection .....Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/eduardli/public_html/web_designer/insert.php on line 10Could not connect: Access denied for user 'root'@'localhost' (using password: YES)How do I show the data (in a database) inserted in my form.html?P. s. ¨think´ What´s that? Can you eat it? Edited by eduardchile
Link to comment
Share on other sites

it sounds like the privileges for your host are different than the one's you are using locally. You need to find out how to get access to your hosted database so you can make the user profiles match both locally and on your host. The options are to1) change/add user privileges on the host to match the root user of your local database or2) change/add user privileges on your local machine to match the root user of your hosted databaseeither way requires access to your hosted database. Did you receive anything from your host when you signed up?

Edited by thescientist
Link to comment
Share on other sites

P. s. ¨think´ What´s that? Can you eat it?
Don't worry about it, it's just what people do to get themselves the money they need in order to buy what they need. That is way down the road, though. We're still focusing on getting you to understand what $_POST is, and how to run a PHP script. It's been 3 months of explaining that without much progress though, so we may be able to get to "thinking" by late 2012 or so.
Link to comment
Share on other sites

Don't worry about it, it's just what people do to get themselves the money they need in order to buy what they need. That is way down the road, though. We're still focusing on getting you to understand what $_POST is, and how to run a PHP script. It's been 3 months of explaining that without much progress though, so we may be able to get to "thinking" by late 2012 or so.
That early?
Link to comment
Share on other sites

it sounds like the privileges for your host are different than the one's you are using locally. You need to find out how to get access to your hosted database so you can make the user profiles match both locally and on your host. The options are to1) change/add user privileges on the host to match the root user of your local database or2) change/add user privileges on your local machine to match the root user of your hosted databaseeither way requires access to your hosted database. Did you receive anything from your host when you signed up?
I know what the problem is!All (phpMyAdmin included!) is stored in a MAMP folder and it´s not necessary to upload this folder!
Link to comment
Share on other sites

what you need is to make sure that the conditions that you use for connecting to your local database also exist for connecting to your hosted database. This includes making sure you have the correct privileges for the root user (or whatever username you have), as well as making sure the database exists on the host. You can export your local database and/or tables and import them to your host, but you need to be able to login to phpMyAdmin on your host.

Link to comment
Share on other sites

What´s wrong with this file?<html><body><?phpvar_dump($_POST);if (isset($_POST['price']) && isset($_POST['description']) && isset($_POST['quantity'])){echo "succesful form submission. initialize DB connection .....";$con = mysql_connect("localhost","eduard","root");if (!$con){die('Could not connect: ' . mysql_error());};echo "connection initialized.....";mysql_select_db("Company", $con);$sql="INSERT INTO products (description, price, quantity) VALUES ('$_POST[description]','$_POST[price]','$_POST[quantity]')";echo 'prepare for INSERT: ' . $sql;if (!mysql_query($sql,$con)){die('Error: ' . mysql_error());}else{echo "1 record added";};mysql_close($con);}else{echo "one or more form fields missing";}?></body></html>array(3) { ["description"]=> string(1) "o" ["price"]=> string(1) "2" ["quantity"]=> string(1) "4" } succesful form submission. initialize DB connection .....Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'eduard'@'localhost' (using password: YES) in /home/eduardli/public_html/web_designer/insert.php on line 10Could not connect: Access denied for user 'eduard'@'localhost' (using password: YES)

Link to comment
Share on other sites

what you need is to make sure that the conditions that you use for connecting to your local database also exist for connecting to your hosted database. This includes making sure you have the correct privileges for the root user (or whatever username you have), as well as making sure the database exists on the host. You can export your local database and/or tables and import them to your host, but you need to be able to login to phpMyAdmin on your host.
I can log in:username: eduardpassword: root (or ´yes´)
Link to comment
Share on other sites

Sorry, I don´t understand it!
It's the same error message you were getting before (just a different user name) so the answer is still the same as before:
it sounds like the privileges for your host are different than the one's you are using locally. You need to find out how to get access to your hosted database so you can make the user profiles match both locally and on your host. The options are to1) change/add user privileges on the host to match the root user of your local database or2) change/add user privileges on your local machine to match the root user of your hosted databaseeither way requires access to your hosted database. Did you receive anything from your host when you signed up?
what you need is to make sure that the conditions that you use for connecting to your local database also exist for connecting to your hosted database. This includes making sure you have the correct privileges for the root user (or whatever username you have), as well as making sure the database exists on the host. You can export your local database and/or tables and import them to your host, but you need to be able to login to phpMyAdmin on your host.
Link to comment
Share on other sites

It's the same error message you were getting before (just a different user name) so the answer is still the same as before:
I did that!
Link to comment
Share on other sites

I don´t understand it!My php checker says my files are ok and this says phpMyAdmin?phpMyAdmin - ErrorCannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Link to comment
Share on other sites

I don´t understand it!
What don't you understand about "the username and password are wrong"? It's right here:$con = mysql_connect("localhost","eduard","root");Either the username, or the password, or both, are wrong. That's as simple as I can explain that.
My php checker says my files are ok
A website that checks PHP syntax can't know whether or not your username and password are correct.
phpMyAdmin - Error
Last time you reported that error I gave you a piece of code to run in order to help test, but you ignored it. If I post it again, are you going to run it this time or are you going to ignore it again?
Link to comment
Share on other sites

What don't you understand about "the username and password are wrong"? It's right here:$con = mysql_connect("localhost","eduard","root");Either the username, or the password, or both, are wrong. That's as simple as I can explain that.A website that checks PHP syntax can't know whether or not your username and password are correct.Last time you reported that error I gave you a piece of code to run in order to help test, but you ignored it. If I post it again, are you going to run it this time or are you going to ignore it again?
I missed that piece of code! You wrote me to contact my host, but he won´t help me (Chilean people? or is this also a prejudice?) Everything was ok, but I did changes in the privileges of phpMyAdmin (because my INSERT FORM wasn´t/isn´t ok!If you posted that code already, I must have it and will certainly use it!
Link to comment
Share on other sites

What don't you understand about "the username and password are wrong"? It's right here:$con = mysql_connect("localhost","eduard","root");Either the username, or the password, or both, are wrong. That's as simple as I can explain that.A website that checks PHP syntax can't know whether or not your username and password are correct.Last time you reported that error I gave you a piece of code to run in order to help test, but you ignored it. If I post it again, are you going to run it this time or are you going to ignore it again?
$con = mysql_connect didn´t neither work!P. s. I can´t find that piece of code!
Link to comment
Share on other sites

Create a new file with only this in it:

<?phperror_reporting(E_ALL);ini_set('html_errors', 1);ini_set('log_errors', 0);ini_set('display_errors', 1);session_start();$_SESSION['test'] = 'test';echo $_SESSION['test'];?>
Save that, upload it to your server, and run it. You should only see the word "test" in the browser, if you see anything else post it here.
Link to comment
Share on other sites

Create a new file with only this in it:Save that, upload it to your server, and run it. You should only see the word "test" in the browser, if you see anything else post it here.
Thanks!I remember that! (I didn´t understand it!)
Link to comment
Share on other sites

It's not necessary to understand the code at this point, if you're getting an error in phpMyAdmin about not being able to start the session, then this code will enable all error messages and then start a session. The error message you see in phpMyAdmin was not generated by PHP, it was generated by phpMyAdmin. Running the above code will get the error message from PHP, if there is one.

Link to comment
Share on other sites

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
 Share


×
×
  • Create New...