Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Once xampp is installed you're set. Go to C:/xampp/htdocs (I think thats the path) and add your php files to that folder. Open your browser and go to http://localhost/ to run them. For more information please go to XAMPPs site for instructions.
  2. I guess you are install a script which requires a mysql database. In order for PHP to used with a mysql database you'll need to enable the mysql extensions within the php.ini. Please read this FAQ. NOTE: If you have installed PHP with the Installer pease download the zipped binaries package from php.net and extract the contents of the zip to where you have installed php to, making sure you overright existing files and folders.
  3. Normally within the php.ini or within a .htaccess file. Ask your host where you can make these changes.
  4. What Windows version are you using? I know in Vista the Apache Service Monitor is a bit buggy as you have to run it in XP SP2 compatibly mode and as an administrator in order for it to work. Otherwise you wont be able to Start/Stop/Restart the Apache service. Under Windows XP you should not have any problems.
  5. Make sure that you are restarting Apache when make any changes to the httpd.conf (this also applies to the php.ini) Your configuration is ok. However do try to not install AMP within C:/Program Files. As a personal preference I prefere to install AMP in C:\Server. This helps to keep file paths to be an absolute minimum.
  6. Using noscript tag is the only way I believe.
  7. What code have you used in info.php. Make sure you are using full php tags, eg <?php ?> and not any shortcut tags like <? ?> or <?= ?>. Short tags are not enabled by default. Also ensure that you install a server eg Apache or IIS and that you have configured the server with PHP. You can't just install PHP on its own and expect your PHP scripts to run. Web browser do not understand PHP code.
  8. What is outputted when you add: echo '<pre>' . print_r($flyer, true) . '</pre>'; After your while loop
  9. Your server must be configured with PHP in order for the PHP files to be parsed. PHP is not a language the web browser can understand and this is why your browser prompts you to download the file. PHP is a server side language. Is this your own server or are you renting webspace from a webhost? If you're using a webhost check with your webhost to see if they offer PHP in their packages and whether your hosting package is legible for PHP support. If they don't offer PHP with their hosting packages you'll need to find a new host which does.
  10. My earlier guess was correct. Please read this FAQ for enabling the mysql_extension. EDIT: Fenway beat me
  11. There was no need to enable register_globals as your code does not appear to rely on this setting. However you are using old superglobal variables. Rather than $HTTP_*_VARS you should use $_* eg: $HTTP_POST_VARS should be $_POST $HTTP_GET_VARS should be $_GET $HTTP_SERVER_VARS should be $_SERVER etc.
  12. No. Foreach can only loop 1 array at a time. Could you explain more on what you're trying to do?
  13. Have you enabled .htaccess support within the httpd.conf? .htaccess files wont work by default. You have to configure Apache to use .htaccess files by setting up the AllowOverride directive within the httpd.conf. Got to Apaches main <Directory></Directory> directive within the httpd.conf and look for the following lines: # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None Change AllowOverride None to AllowOverride All Save the httpd.conf and restart Apache. Apache should now be reading your .htaccess files.
  14. Add PHPIniDir to httpd.conf like so: PHPIniDir "C:/php/php.ini" PHP should now be reading the php.ini within C:/php NOTE: Make sure you save the httpd.conf and restart Apache after any changes. Also to test to see if PHP is reading the php.ini in C:/php create a test php file with the following code: <?php phpinfo(); ?> Find the line that starts with Loaded Configuration File. It should be set to C:/php/php.ini
  15. fje first enable a setting called display_errors within the the php.ini and ensure error_reporting is set to at least E_ALL. Save your php.ini and restart your server. Re run your script for connecting to mysql. If there is any problems PHP should now be displaying the errors within the browser. Post all error messages you get here in full. I don't think PHP has enabled the mysql library (even though you have uncommented it within the php.ini). The mysql extension does rely on an external library called libmysql.dll in order to function to correctly.
  16. As you are on Windows please have a read of this FAQ. rajivgonsalves is right you do not have the mysql extension enabled, The linked FAQ will help you.
  17. if $validpages contains an array of pages and you all you want to do is see if the value of $_GET['page'] is set within that array then use in_array function instead rather than looping through the array manually. If you used in_array the above code can be written as: if(in_array($_GET['page'], $validpages) { $page = $_GET['page']; }
  18. voting_system_bit function is not an official core php function. This is most probably a function which your script uses. What PHP scripts have you installed which use this function?
  19. To add that mod into your phpBB forum you will have to modify phpBB's core files. Instructions are supplied with the mod of how to install it. I think the install file is called install.mod or something like that.
  20. No need to do any of those. Adding PHP to the PATH environment variable would be better IMO rather than copy files out of the PHP's install folder. rbradshaw has installed Apache in C:/Apache2 not C:/Program Files
  21. That because your hidden form fields (which carry the group_id and session_id are out side of your loop herE: $groupYearlist = $db->sql_query("SELECT * FROM ".$prefix."_tl_groups WHERE Group_Year = $Course_Year"); while ($row = $db->sql_fetchrow($groupYearlist)) { $Group_ID = $row['Group_ID']; $Group_Name = $row['Group_Name']; if (!$groupYearlist) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } //<!-- BEGIN Group Row -->" echo "<tr><td align=\"center\">$Group_ID</td>" . " <td align=\"left\">$Group_Name</td>" . " <td><input type='text' name='GRAT_Grade[]' size='3' maxlength='3'></td>" . "</tr>"; } //-- END Group Row -->" echo "<tr><td colspan='3' align='center'><input type='submit' value='Add Grade(s)'></td></tr>\n"; echo "<input type='hidden' name='Session_ID' value='$Session_ID'>\n"; echo "<input type='hidden' name='Group_ID' value='$Group_ID'>\n"; The last two lines in the above code need to be within your while loop.
  22. If the from data is being sent by GET why are you using $_POST to recieve the form data that was submitted. You should use $_GET instead. Also when using an image as a button you have to use $_GET['(btn_name)_x'] or $_GET['(btn_name)_y'] in order to receive the variable associated to the image button, This is because the browser sends the x and y co-ordinates of the location of the cursor when the button was clicked. Note: Change (btn_name) to the actual name of your button.
  23. Ok. Clear any documents already in C:/Apache2/htdocs. Now add your test php file there and go to http://localhost/ when you go to that address you should get an Index Of page which will list any files currently within C:/Apache2/htdocs Can you see your test php file? If you can what happens when you click on it? Also if you are creating .php files from within a text editor such as Notepad or Wordpad make sure you select All Files from the File Type pull downmenu (within Save As dialog box) otherwise your file will be saved as filename.php.txt and not filename.php
  24. Umm.. Thorpe did it for you. Look at the code above!
  25. There is no errors with the code thorpe provided. The error must be coming from somewhere else within your code. Can you post lines 45 - 60 here from add_product_form.php
×
×
  • 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.