lewisdow123
Members-
Posts
17 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
lewisdow123's Achievements
Newbie (1/5)
0
Reputation
-
Error with new website when hosted?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Resolved... http://guides.ovh.com/Php5ChezOvh -
Error with new website when hosted?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi guys, In my original post I included the attached zip file called sarahrobin. Please see my first post. Thank you, Lewis -
Hi, I have built a website that works perfectly on my local computer. I have tried to host it on my server but I get the following error messages: http://sarahrobin.be/sarahrobin/home.php http://sarahrobin.be/sarahrobin/MySQLiQuery.php (this file is included in the link above) I know the server is running php 5 : http://www.ovh.co.uk/web-hosting/ I have no idea what the problem is, would someone please tell me how I can fix it? The problem is that it works without any problem on my computer and so I do not know how to fix... I have attached my source code for your review.... Please could someone be kind enough to help. I have included the database sql dump file in case it is needed but I don't think it will be needed to solve this error. Thank you. Lewis 18681_.zip
-
Hi, I keep getting the error Error calling SPCommands out of sync; you can't run this command now, when I call the second stored procedure in one php page. Can someone please help? I have tried multiquery but I get the same issue. Can someone please give a specific answer to this problem? Thank you, Lewis // First call to SP $page = 2; $section = 1; include("DatabaseConnection.php"); //general connection - works fine $sql = 'CALL GetPageContent("'.$page.'", "'.$section.'")'; $result = mysqli_query($conn, $sql) or die('Error calling SP' .mysqli_error($conn)); while($row=mysqli_fetch_assoc($result)) { // DO STUFF< REMOVED TO MAKE READING CLEARER } mysqli_free_result($result); //SECOND CALL BELOW $section = 2; // change parameter for different results $sql = 'CALL GetPageContent("'.$page.'", "'.$section.'")'; $result = mysqli_query($conn, $sql) or die('Error calling SP' .mysqli_error($conn)); while($row=mysql_fetch_assoc($result)) { // DO STUFF< REMOVED TO MAKE READING CLEARER }
-
Hi, I've had this error for more than one week and I am hoping someone can help me big time. I get the error: Error calling SPCommands out of sync; you can't run this command now Every time I call more than one stored procedure... It is always on the second stored procedure call that I get this error. I have had one line answers to this error in the past and have tried these solutions given but they do not seem to work. Would some one be kind enough to re-write the block of code so that it works. I am essentially looking for an answer which will work for sure rather than links that will lead me off course again.... PLEASE HELP I have also included my actual script if you want to see it.... btw the first connection works, just not the second. Thank you // First call to SP $page = 2; $section = 1; include("DatabaseConnection.php"); //general connection - works fine $sql = 'CALL GetPageContent("'.$page.'", "'.$section.'")'; $result = mysqli_query($conn, $sql) or die('Error calling SP' .mysqli_error($conn)); while($row=mysqli_fetch_assoc($result)) { // DO STUFF< REMOVED TO MAKE READING CLEARER } mysqli_free_result($result); //SECOND CALL BELOW $section = 2; // change parameter for different results $sql = 'CALL GetPageContent("'.$page.'", "'.$section.'")'; $result = mysqli_query($conn, $sql) or die('Error calling SP' .mysqli_error($conn)); while($row=mysql_fetch_assoc($result)) { // DO STUFF< REMOVED TO MAKE READING CLEARER } 18478_.php
-
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Thanks for all your help! -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Wow... OK that was the deal maker. So I opened PHPMyAdmin provided by MAMP. There is where I had created one database and hence it existed, so I created the table and added one row... the php code now works perfectly!! BUT and a big BUT.... What instance is the workbench connecting to then? Because I have obviously been creating database on a different instance just that the web user is pointing to a completely different instance. The problem with binning WorkBench is that it has a good database development interface. The PHPMyAdmin web interface is horrible. So what would be ideal now is if I could get my WorkBench to connect to the same instance as the one that PHPMyAdmin is connecting to... Any ideas on how I can find that info??? Thank you so much for your help, at least I am one step further. -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Thank you for your help Please see below: Array ( [0] => information_schema [1] => NewDatabase [2] => mysql [3] => performance_schema ) Seems that NewDatabase is there but the other two database names are not, strange no? I can see them in my mysql workbench :s -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi, Yes sorry for the confusion, both are correct. I tried to create a new database and table after my first statement. So basically I have tried three different database names (all of which exist). test -> test new_database -> new_table NewDatabase -> NewTable Only when there is capitals in the name of the database and / or table do I get the error: There was an error running the the following query: SELECT * FROM NewTable; The server responded with: Table 'NewDatabase.NewTable' doesn't exist Otherwise if the name is all lower case, as in the case of test and new_database with their respective table names do I get... Unable to locate the test databse on the current server, please ensure database exists on the server and try again What I am really confused about is how it works perfectly with windows but not the mac, even though my settings and server name, user account are the same :s Thanks, Lewis -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Playing a little further I got the following output... There was an error running the the following query: SELECT * FROM NewTable; The server responded with: Table 'NewDatabase.NewTable' doesn't exist The case and spelling is correct, but if I try again with the test database and test table I get the previous message. Any ideas? -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi, yes to both... I created a new database and table just in case, named new_database and new_table. Same error -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi, I have updated the php.ini file as mentioned so that the display_errors = ON I have checked the permissions of the Root User account which is set to All Privileges and is also sysadmin / DBA, so there is no permissions error. I have displayed the mysql_error() for the db select statement and it comes back stating Unknown database 'test' :S Am not sure what to do next.... Any ideas? Thank you, Lewis -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
But if the connection was to the server would it not fail at this stage rather than further down? $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi, Any idea on how I can do that? Basically I am pro with MSSQL but a beginner in MySQL so dont really know how to add / check permissions etc. Any advice? Thank you, Lewis -
PHP not displaying MYSQL result - so strange?? Please help
lewisdow123 replied to lewisdow123's topic in PHP Coding Help
Hi, I got the following Unable to locate the test databse on the current server, please ensure database exists on the server and try again This was the code... A connection was made and I can see in the mysql workbench that there is a database called test and table called test... (please ignore the previous table name I provided). Am not sure what to say, a connection can be made but the table does not exist, when it clearly does.... many thanks in advance for your help. $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'root'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = "test"; $db = mysql_select_db($dbname, $conn) or die("Unable to locate the $dbname databse on the current server, please ensure database exists on the server and try again"); $qry = "SELECT * FROM new_table"; $result = mysql_query($qry) or die("There was an error running the the following query:<br>$qry<br><br>The server responded with:<br>".mysql_error());