Far Cry Posted July 6, 2010 Share Posted July 6, 2010 Hi there, recently downloaded some files for a CMS system for my site from:http://www.codewalkers.com/c/a/Content-Management-Code/Cura-CMS/ However when I run the file install.php and click submit (On the first page) I get this error: Fatal error: Call to undefined function pma_splitsqlfile() in /home/latestne/public_html/tests/PHP Tests/codefx/install.php on line 23 Here is the code for install.php <? if(file_exists("settings.php")){ $setopen = fopen('settings.php', 'r'); $setread = fread($setopen, filesize('settings.php')); $setting = explode(",",$setread); $_SESSION['database'] = $setting[3]; fclose($setopen); }else{ if($_POST['Submit']){ $dbh=mysql_connect ($_POST['hostname'], $_POST['username'], $_POST['password']) or die ('I cannot connect to the server because: ' . mysql_error()); $dbs = mysql_list_dbs($dbh); while ($row = mysql_fetch_object($dbs)) { if ($row->Database == $_POST['dbname']){ $flag = 1; } } if($flag=1){ mysql_query('CREATE DATABASE `'.$_POST['dbname'].'`'); } mysql_select_db ($_POST['dbname']) or die("Sorry, but the database you typed does not exist.<br>I did try try and make a new one but that didnt work either please check with your server admin."); $getsql = fopen('database.sql', 'r'); $sqlread = fread($getsql, filesize('database.sql')); PMA_splitSqlFile(&$ret, $sqlread, 40000); foreach ($ret as $sql) { mysql_query($sql); } $formset = $_POST['hostname'].",".$_POST['username'].",".$_POST['password'].",".$_POST['dbname']; $getset = fopen('settings.php', 'w+'); fwrite($getset,$formset); fclose($getset); header("location: ?"); exit; }else{ ?> <html> <head> <title>Cura Install</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p>If you are seeing this document this is your first time installing cura. By now you should have copied all your documents to the home directory and have set up a database for cura to live in. </p> <p>Please enter your server details in the form below</p> <form name="form1" method="post" action=""> <p><strong>Hostname</strong><br> If you dont know what this is leave it as localhost.<br> <input name="hostname" type="text" id="hostname" value="localhost"> </p> <p><strong>Username<br> </strong>Please enter your username for access to your servers database.<br> <input name="username" type="text" id="username" value="username"> </p> <p><strong>Password<br> </strong>Please enter your password for access to your servers database.<br> <input name="password" type="text" id="password" value="Password"> </p> <p><strong>Database Name<br> </strong>This is the name of the database you have set up to store the data from cura.<br> <input name="dbname" type="text" id="dbname" value="Database"> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> <p> </p> </body> </html> <? exit; } } ?> Can you help me? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/206838-fatal-error-call-to-undefined-function/ Share on other sites More sharing options...
premiso Posted July 6, 2010 Share Posted July 6, 2010 Chances are...no. Given that I do not see anywhere where an include is to define the function. You are better off contacting the makes of the CMS and asking them about it / searching their documentation for similar issues. Quote Link to comment https://forums.phpfreaks.com/topic/206838-fatal-error-call-to-undefined-function/#findComment-1081700 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2010 Share Posted July 6, 2010 You are not supposed to directly request install.php. You are supposed to request index.php Quote Link to comment https://forums.phpfreaks.com/topic/206838-fatal-error-call-to-undefined-function/#findComment-1081704 Share on other sites More sharing options...
Far Cry Posted July 6, 2010 Author Share Posted July 6, 2010 You are not supposed to directly request install.php. You are supposed to request index.php What do you mean by that exactly? Quote Link to comment https://forums.phpfreaks.com/topic/206838-fatal-error-call-to-undefined-function/#findComment-1081726 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.