Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You have to add that line into the httpd.conf at the end of the LoadModule list You'll also want to add: AddType application/x-httpd-php .php To the httpd.conf, I suggest adding that line after: AddType application/x-gzip .gz .tgz Save the httpd.conf and restart Apache.
  2. Replies are not allowed in the Freelance board unless you are the author of the thread. If you wish to contact the author about the enclosed work advertisement please do so by the contact details provided by the author, either Email, IM, PM etc. NOTE: PM is only available if you get 10 posts or more.
  3. Hold on, You are using Apache1.3.x however you are trying to load an Apache module called php4Apache2.dll That module is for use with Apache2.0.x only. You should be loading php4apache.dll. Your LoadModule line should be: LoadModule php4_module "D:/php/sapi/php4apache.dll"
  4. Just adding the following few lines should be sufficient: Add the following line at the end of the LoadModules list (do not add a # at the start of the line (lines starting with a # are considered comments and are ignored)) LoadModule php4_module "D:/php/sapi/php4apache2.dll" Scroll down and add the following few lines near the AddType's AddType application/x-httpd .php AddType application/x-httpd-php-source .phps No need to apply a script alias if you are loading PHP as an Apache Module.
  5. This: $query = "INSERT INTO checkout(id, bidnum, deposit_amount, deposit_type, deposit_code, deposit_returned, deposit_storage) VALUES('$today0$numbid', '$numbid','$depamt','$deptyp','$depcod','no','1')"; Should be: $query = "INSERT INTO checkout(id, bidnum, deposit_amount, deposit_type, deposit_code, deposit_returned, deposit_storage) VALUES('" . $today . '0' . "$numbid', '$numbid','$depamt','$deptyp','$depcod','no','1')";
  6. Please do not Double post. You already have a thread open on this subject. Thread locked.
  7. Why are you using highlight_file? Using this function PHP will apply syntax highlighting to the code in the requested file (it'll add in extra html) and thus $start_source and $end_source wont match. Use file_get_contents instead.
  8. You will have to use a combination of different variables. Like so: $full_site_url = 'http://' . $_SERVER['SERVER_NAME'] . '/' . $_SERVER['REQUEST_URI']; echo $full_site_url;
  9. Don't you just uncomment the mod_rewrite module within the httpd.conf? Find: #LoadModule rewrite_module modules/mod_rewrite.so Remove the # from the start of the line. Save the httpd.conf and restart Apache. Mod_rewrite should now be available. If you use mod_rewrite within .htaccess files make sure you have set the AllowOverride directive to All within the main <Directory></Directory> directive.
  10. That error is referring to the second parameter in the mysql_query function (highlighted below): $numberposts1=mysql_query("SELECT * FROM `posts` WHERE `by`='".$_SESSION['username']."'", $conn1) or die(mysql_error()); The second parameter to the mysql_query function is an optional parameter, but is reserved for passing the link resource from a connection to mysql via mysql_connect. Where does the $conn1 variable get set to?
  11. You can change the content type via PHP within your script eg: header('Content-type: html/xml'); That line will need to the first line within your script. Make sure you don't have any output before you call that function.
  12. Why do you need to parse xml files with PHP for in the first place?
  13. If you only want the first element from an array use array_shift: case 'mode': $v = array_count_values($array); arsort($v); $total = array_shift(array_keys($v)); break; not a loop.
  14. Try: <?php echo '<form action="test.php" method="post"> <textarea name="origdata" rows="10" cols="60">'.@$_POST['origdata'].'</textarea><br /> <input type="submit" value="convert" /> </form>'; if (isset($_POST['origdata'])) { echo '<textarea name="origdata" rows="10" cols="60">'; $data = str_replace(array("\r\n", "\r", "\n"), "\n", $_POST['origdata']); $data = preg_replace('/(\\s){2,}/', '$1', $data); $lines = explode("\n", $data); foreach($lines as $line) { $coords = explode('! ', $line); foreach($coords as $k => $coord) { echo str_pad(($coord + 20), 3, '0', STR_PAD_LEFT) . '! '; } echo "\n"; } } echo '</textarea>'; ?>
  15. Well xippy is basically just a normal webhost, except it provides hosting for people who want to setup a clan. I expect what happens when an account is created all that happens is the clan software is just copied over to that account and setup automatically. Xippy is no different to any other webhost.
  16. change echo $string; to echo $out;
  17. Looks like there is a process that is running which is interfering with the Installation process. You're better of posting this at WAMP's support site. This has nothing to do with PHP
  18. Have a read of this page in the manual. Look at the headings Running Apache as a Service and Running Apache as a Console Application
  19. You'll have to edit the php.ini. I don't think wamp has an interface for changing the error_reporting level. NOTE: When you change the php.ini you must restart WAMP in order for the changes to come into affect
  20. What is the error_reporting level to set to. For all errors it should be set as E_ALL and not something like: E_ALL ^ E_NOTICES
  21. Something like the following? <?php if(isset($_POST['add'])) { $new_entry = $_POST['id']; $new_entry .= ',' . implode(',',$_POST['option']) . "\n"; echo 'Adding: ' . $new_entry; // write new entry to file $handle = fopen('file.txt', 'a'); // open fwrite($handle, $new_entry); // write fclose($handle); // close } ?> <form action="#" method="post"> <table border="0" cellpadding="5" cellspacing="0"> <tr> <th colspan="4">Add New</th> </tr> <tr> <th>ID</th> <th colspan="3">Options</th> </tr> <tr> <td><input type="text" name="id" size="10" /></td> <td><select name="option[]"> <option value="yes">Yes</option> <option value="no">No</option> </select></td> <td><select name="option[]"> <option value="yes">Yes</option> <option value="no">No</option> </select></td> <td><select name="option[]"> <option value="yes">Yes</option> <option value="no">No</option> </select></td> </tr> <tr> <td colspan="4"><input type="submit" name="add" value="Add" /></td> </tr> </table> </form> Change file.txt (in the fopen() function) to your file that contains the data.
  22. Then you'll use the following query: $sql_query = "SELECT username, password FROM `members2` WHERE `username`='$pw_user'"; Not two.
  23. You can't do queries like that! What do you want to be returned from the query? Do you want both the username and password or just the username or password?
  24. By database do you mean MySQL? MySQL stores its databases in its own data folder, eg C:/wamp/mysql/data You should not tamper with the files within that folder. In doing so can corrupt your database.
  25. If you are getting that error then you should check your query for errors. Looking at your query there is a few problems. 1. You are using a reserved MySQL keyword for a field name, which is password If you use a reserved word in your query you should wrap back ticks (`) around the field name. 2. strings should be wrapped in quotes and invalid operator used: ... WHERE password == $pw <-- incorrect ... WHERE `password` = '$pw' <-- correct SO change this line: $sql_query = ("SELECT username FROM `members2` WHERE password == $pw"); To: $sql_query = ("SELECT username FROM `members2` WHERE `password` = '$pw'"); and you should not get the error any more. If you do still get an error, change this line: $result = mysql_query($sql_query); to: $result = mysql_query($sql_query) or die('Query Error:<br />'.$sql_query.'<br /><br />'.mysql_error());
×
×
  • 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.