Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. There is no boss of each group. each individual admin/moderator take there own decision on what action to take when moderating the boards. However sometimes if an admin/moderator are unsure what action to take we'll discuss it. The recommended group do not have any admin/moderator powers (AFAIK).
  2. Can you can change permissions via FTP? Login to your FTP client and right click the folder you wish to change permissions if you cannot change via FTP then it looks like you host has disabled file permissions.
  3. To make a folder writeable you don't edit the php.ini instead you have to change the CHMOD permissions on the specified folder. You can do this within your script using the chmod function (temporary permissions) or you can use an FTP client (permanent permissions). You only need to use chmod on *nix based OS's. Windows does not use chmod for file permissions.
  4. Apache 2.2 works no problem with PHP. When you use Apache2.2 with PHP you'll want to use php5apache2_2.dll for configuring PHP with Apache. Apache2.2's module handling has changed, Apache 2.0.x modules are not compatible with Apache2.2.x modules. PHP comes with all module files for which ever version of Apache you're using: php5apache.dll - for Apache1.x php5apache2.dll - for Apache2.0.x php5apache2_2.dll - for Apache2.2.x Note change php5 to php4 if you're using php4.
  5. You have to run $query through mysql_query in order for the query to execute. PHP wont execute queries with out mysql_query // if id provided, then delete that record if (isset($_GET['id'])) { // create query to delete record $query = "DELETE FROM purchase WHERE sale_id = ".$_GET['id']; mysql_query($query);
  6. Is PHP reading your php.ini? Check the following two lines: Configuration File (php.ini) Path Loaded Configuration File When you run phpinfo(). One of those should be set to the full path in which php is reading your php.ini from, eg if you php.ini is in C:/Program Files/PHP/ then one either of the above lines should be set to C:/Program Files/PHP/php.ini if none of them is set the correct path then PHP is not reading your php.ini
  7. Better way for validation: <?php if(isset($_POST['submit'])) { $errors = null; if(isset($_POST['first_name']) && empty($_POST['first_name'])) { $errors[] = 'First name is left blank!'; } if(isset($_POST['last_name']) && empty($_POST['last_name'])) { $errors[] = 'Last name is left blank!'; } if(is_array($errors)) { echo "Please correct the following errors:\n"; echo "<ul>\n<li>" . implode("</li>\n<li>", $errors) . "</li>\n</ul>"; } else { $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; echo 'First name: ' . $first_name . "<br />\n"; echo 'Last name: ' . $last_name . "<br />\n"; } echo "<hr />\n"; } ?> <form action="#" method="post"> First name: <input type="text" name="first_name" /><br /> Last name: <input type="text" name="last_name" /><br /> <input type="submit" name="submit" /> </form>
  8. You'll also want to run the following too: ini_set('display_errors', '1');
  9. What is the files listed in C:/MySQL/Data/handlessing/data/? There should be .frm files in there for your tables. Also the root of the mysql data folder should have files in there too. Mysql uses the files in the root of the data folder too. If Mysql isn't reading your databases still then they are corrupt and there is nothing you can do. You'll have to redo your databases from scratch.
  10. Its to do with your table cellspacing and cellpadding which is causing it.
  11. Why cant you just move all files in C:/MySQL/Data/handlessing/data/ to C:/MySQL/Data/handlessing/. Perhaps then mysql can read your database. Because you are using the wrong backup method I can not recommend you what to do. The correct way was to create a mysql dump of the databases. That way when you go to install a new version of mysql you just have to import the dump file(s) and MySQL will recreate all the databases/tables as they where. You would not have any of the issues you're having now. Do you have a lot of data backed up for your databases?
  12. look into your my.ini file in the mysql folder. Search for: #Path to the database root datadir="C:/MySQL/Data/" Append handlessing to the datadir: #Path to the database root datadir="C:/MySQL/Data/handlessing/data/" Save ini and restart MySQL.
  13. You can't do that. You cannot use the files generated by mysql in mysql/data for backups. This is not how you do database backups with MySQL. try copying the files from MySQL/Data/handlessing/data to MySQL/Data/handlessing instead. I doubt it will work though. You may have corrupted your database. Last time I backed up the files in MySQL/Data (when I first go started with MySQL) I corrupted my database and had to rebuild my database from scratch.
  14. Not sure but perhaps use: $path = $upload_folder . $upload_factsheets; system('unzip "'.$path.'"');
  15. Lower PHP's error_reporting level to E_ALL rather than E_STRICT. Note: when you make any changes to the php.ini your must restart Apache for the changes to take affect.
  16. Its better looking at the html source code the php script generates. Right click view source in your web browser.
  17. You cannot modify/change the location of the files with in C:\mysql\data If you move/change files within that directory you have a chance of corrupting your database. You should instead run a full database backup. This backup should of been performed before you uninstalled the previous version of MySQL. Unfortunately as you are new to MySQL you probably didn't realise this and I guess you thought you could treat the files/folders in C:\mysql\data the same you can with MS Access files. This is not the case.
  18. Have you modified the file.txt's format. Make sure its in this format: [post title] [post id]|[content for post]|[timstamp]|[author]|[ip address] Looks like you have changed that file and the code has broken due to the changes you have made to the file The result of running the script will be this
  19. <?php if(extension_loaded('gd')) { echo 'GD is loaded!'; if(function_exists('gd_info')) { echo ' Info: '; echo '<pre>' . print_r(gd_info(), true) . '</pre>'; } } else { echo 'GD is not loaded'; } ?>
  20. Please use your other thread http://www.phpfreaks.com/forums/index.php/topic,153598.15.html
  21. Try: <?php $lines = file('file.txt'); $k = 0; $new_lines = array(); for($i = 0; $i < count($lines)/2; $i++) { $new_line = trim($lines[$k+1]); $col = explode('|', $new_line); $id = $col[0]; $timestamp = $col[2]; $new_line = str_replace(array($id . '|', $timestamp . '|'), '', $new_line); $new_lines[$timestamp] = trim($lines[$k]) . '|' . $new_line; $k += 2; } ksort($new_lines); foreach($new_lines as $k => $line) { list($header, $content, $author, $ip) = explode('|', trim($line)); $date = date('D jS M Y', $k); $id++; $content = str_replace('<br>', "<br />\n ", $content); echo "<h1>$header</h1> <p>Posted by: $author ($ip) at $date</p> <p> $content </p>\n <hr />\n"; } ?> I have removed the post id and the posts should display in ascending order (earliest (top) to recent (bottom))
  22. Huh! Who you replying to? Are you replying to me? If you are im not sure what you mean by your posts about phpbb and postid.
  23. Try: <?php $lines = file('file.txt'); $k = 0; $new_lines = array(); for($i = 0; $i < count($lines)/2; $i++) { $new_lines[] = trim($lines[$k]) . '|' . $lines[$k+1]; $k = $i+2; } foreach($new_lines as $line) { list($header, $id, $content, $timestamp, $author, $ip) = explode('|', $line); $date = date('D jS M Y', $timestamp); $id++; $content = nl2br($content); echo <<<EOF <h1>$header</h1> <p>#$id - Posted by: $author ($ip) at $date</p> <p>$content</p> <hr /> EOF; } ?> I'm asumming your file goes in this format: Heading [post-id]|[content for post]|[timestamp]|[Author]|[iP Address of Author] Heading [post-id]|[content for post]|[timestamp]|[Author]|[iP Address of Author] Heading [post-id]|[content for post]|[timestamp]|[Author]|[iP Address of Author]
  24. include session.php before header.php include("include/session.php"); include "connect.php"; //mysql db connection here include "header.php"; include ("menu.php"); Also please can you use code tags when posting code with in posts. I have done it for you. But next time use code tags
  25. You define it in the PHP script I just provided. Just edit these variables: $db_user = 'USERNAME'; // change USERNAME to username you want to login to MySQL as $db_pass = 'PASSWORD'; // change PASSWORD to the password for the user name you supplied // above (delete PASSWORD if no password is set for specified user) $db_base = 'DATABASE'; // the database that contains the counter table Sorry I forgot to mention that earlier.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.