Concrete5 Demo Script
Permalink 1 user found helpful
Can anyone verify if the Concrete Demo script and instructions still work in the latest version?
Here is the how-to :
http://www.concrete5.org/documentation/how-tos/create-your-own-conc...
All I get when I run the restart script is the following
Line 37 deals with deleting the demo files
It does appear that the script removes the site.php file though, but it dos not modify the database in anyway.
Obviously it seems like it has to do with the mysql. If I plugin the command
directly into phpmyadmin I get an error until I strip it down to
but I guess that is the stuff that ADODB takes care of.
If anyone can simply verify that they have a successful current version c5 demo site, that would be helpful for my troubleshooting.
Thanks,
-Guy
Here is the how-to :
http://www.concrete5.org/documentation/how-tos/create-your-own-conc...
All I get when I run the restart script is the following
Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Warning: Invalid argument supplied for foreach() in /home/c5t/public_html/demo/recycle.php on line 37 Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''c5t_c5demo'' at line 1] in EXECUTE("show tables from 'c5t_c5demo'") ' in /home/c5t/public_html/demo/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /home/c5t/public_html/demo/concrete/libraries/3rdparty/adodb/adodb.inc.php(1037): adodb_throw('mysql', 'EXECUTE', 1064, 'You have an err...', 'show tables fro...', false, Object(ADODB_mysql)) #1 /home/c5t/public_html/demo/concrete/libraries/3rdparty/adodb/adodb.inc.php(993): ADOConnection->_Execute('show tables fro...') #2 /home/c5t/public_html/demo/concrete/libraries/3rdparty/adodb/adodb.inc.php(1465): ADOConnection->Execute('show tables fro...', Array) #3 /home/c5t/public_html/demo/concrete/libraries/database.php(73): ADOConnection->GetCol('show tables fro...', Array) #4 [internal function]: Database->__call(Array, Array) #5 /hom in /home/c5t/public_html/demo/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
Line 37 deals with deleting the demo files
foreach (glob($path . "*") as $file) {
It does appear that the script removes the site.php file though, but it dos not modify the database in anyway.
Obviously it seems like it has to do with the mysql. If I plugin the command
EXECUTE("show tables from 'c5t_c5demo'")
directly into phpmyadmin I get an error until I strip it down to
show tables from c5t_c5demo
but I guess that is the stuff that ADODB takes care of.
If anyone can simply verify that they have a successful current version c5 demo site, that would be helpful for my troubleshooting.
Thanks,
-Guy
it should work, i modified mine to use shell commands (to remove files faster)
Experienced the same issue. Had to remove " FROM database" part, not sure why, but that caused mysql errors.
I ended up having to change two lines of code in the original reset.php script.
I rewrote line 55 as follows:
and I had to edit line 113 because for some reason, the site.php being loaded on install does not have a closing ?> php tag.
I didn't really look into the reason I was getting the "invalid argument' errors when then script is deleting the uploaded files.
Everything seems to work fine now. I have attached a modified reset.php file in case anyone else runs into this problem. This file should work on a 5.4.1.1 install.
I rewrote line 55 as follows:
$tables = $db->GetCol('show tables from ' . DEMO_DB_DATABASE);
and I had to edit line 113 because for some reason, the site.php being loaded on install does not have a closing ?> php tag.
fwrite($fp, "define('ENABLE_EMAILS', false); ?>");
I didn't really look into the reason I was getting the "invalid argument' errors when then script is deleting the uploaded files.
Everything seems to work fine now. I have attached a modified reset.php file in case anyone else runs into this problem. This file should work on a 5.4.1.1 install.
Yeah, I forgot to mention that issue I had as well. The site/config.php php code was not closed so opening new php tag was redundant.
Hello and thank you for creating this post because I was running into the same issue and this saved me a load of time getting it working. I do have one question though. If I understand correctly the access.xml files are suppose to restrict access to the dashboard elements such as "Sitewide Settings" but when I log in with the "demo" account I can still see and access those sections as well as manipulate them. Any suggestions on this?