Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. When setting the path make sure you use a full path. You'll be better of creating a sessions folder out side of your sites document root. Then create a .htaccess file in your document root and add the following php_value session.save_path /full/path/to/sessions/ Now whenever you uses sessions PHP should save/read sessions from your sessions folder.
  2. That'll make no difference Run phpinfo() on your hosted site(s) to see where your sessions are being stored. You can change where your sessions are saved to by having the following in each page (before session_start) which uses sessions ini_set('session.save_path', '/path/to/sessions'); Alternatively place a .htaccess in your sites root folder and add the following php_value "session.save_path" "/path/to/sessions"
  3. wildteen88

    XAMPP

    To remove xampp have a read of the Uninstall section at the bottom of the page here http://www.apachefriends.org/en/xampp-linux.html#388 Before removing ensure XAMPP has stopped (this is explained in the link above too).
  4. The problem is caused on line 33 in wp-config.php What is on line 33?
  5. If all you're doing is storing your codes and nothing else, then you can use a text file. To prevent any one publicly accessing your text file move it outside of your sites document root, This will then only allow PHP to access your text file.
  6. Change <?php foreach($catList as $catName): ?> <option value="<?php echo $catName['id'] ?>"><?php echo $catName['name'] ?></option> <?php endforeach; ?> to <?php foreach($catList as $catName): ?> <option value="<?php echo $catName['id'] ?>"<?php (($catName['id'] == $_GET['c']) ? 'selected="selected"' : null) ?>><?php echo $catName['name'] ?></option> <?php endforeach; ?>
  7. How is the list stored in your database?
  8. If the the codes are stored in the text file then use $codes = file('codes.txt'); // get first code $first_code = array_shift($codes); echo $first_code // write remaining codes to codes.txt $codes = array_map('trim', $codes); file_put_contents('codes.txt', implode(PHP_EOL, $codes));
  9. Are you using a web host? If you are you should get in contact with them for how to configure PHP. Not all hosts will allow you to configure PHP.
  10. There is not that much to to it really. Example if(isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $_GET['id']; $sql = "SELECT * FROM table WHERE id='$id'"; $result = mysql_query($sql); if(mysql_num_rows($result) == 1) { $row = mysql_fetch_assoc($result); echo '<pre>' . print_r($row, true) . '</pre>'; } } else { $sql = 'SELECT id, title FROM table'; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo '<a href="?id='.$row['id'].'">'.$row['title'].'</a><br />'; } } As I don't know what you're table structure is, you will need to modify the queries and the $row variables.
  11. I'd get in touch with your host to see if they support the mysqli extension. The mysqli extension is only available with PHP5, if your host use PHP4 you'll need to either modify you code to use the standard mysql extension or move hosts which profiles your sites requirements.
  12. $value should be $checkboxes.
  13. Foreach can return the key as well as the value, us the following syntax foeach($array as $key => $value)
  14. Seems your browser is switching to its "off-line" state when it detects no internet connection. When you're not connected to the net go to the File menu and uncheck Work Offline if its selected and try accessing http://localhost NOTE: If you're using IE7+ you'll need to hold the Alt key down to see the toolbar menu Access to localhost or 127.0.0.1 does not require any internet connection at all. The problem you're having is to do with your browsers configuration.
  15. You'll have to use regex to convert multiple new lines in to a single newline, eg $str = "Hello Hello World"; $str = preg_replace('|(\s){3,}|s', "\n", $str); echo nl2br($str);
  16. Are you displaying the generated XML directly in the browser within an HTML page? If so web browsers do not display any form of whitespace characters (other than a single space) on the page. In order for a browser to display a new line within the page you need to use the line break tag (<br />).
  17. What are the errors you;re getting can you post them here.
  18. Seany I suggest you turn your attitude down a little. The PHP Help board is not for scripts to be made for you. This includes modifications of any kind to an existing script not made by you. These requested should be posted in the Freelancing forum. The Freelancing board does not require you to pay anyone for the work to be done, you can however offer free advertising for them or something in favour of the work they carried out for you -- his is called being grateful. Also do not demand someone to do something for you. Apply some sort of effort in trying to do what you're trying to archive. If you don't put forward any form of effort then don't expect many positive replies. If I was modifying an existing script then I would at least try to get in touch with the original author of the script. After all they will know how the script works than some random person on the net.
  19. Not sure on that really. Make sure there are no typos in your php.ini and that PHP is not having issues whilst loading by enabling display_startup_errors, and that the line you're editing doesn't start with a semi-clon ( ; ).
  20. When checking phpinfo make sure you're reading the Global column, not the Local column Also make sure you havn't got an .htaccess file which is overriding your settings.
  21. I was just looking in to Geshi. The problem is they dont share how they added Geshi to SMF.
  22. There is one available however when you copy the code, you also copy the line numbers! The mod is available here. It Works fine with 1.1.6 just tested it.
  23. Umm, I thought the query would of produced that. I did try a different tyoe of JOIN but it wasn't quite right. I'll have a word with fenway - our MySQL guru about this for you.
  24. Not sure what you mean by Wrong path, You should ignore the Configuration File (php.ini) Path line. Its the line below that should be correct - It must state the full path to the php.ini you're modifying. There should only be one instance of php.ini on your file system. Which should be the one in C:/php (this is php.ini PHP is reading for configuration). There should only be at least two instances of libmysql.dll, one should be in MySQL's bin/ folder. The other in the root of your PHP installation folder (C:/PHP) You should delete/rename any other instances. Ensure the extensions you have available is of the same build as the version of PHP you have installed. If the versions do not match up they will not work, for example PHP5.2.5 extensions are not compatible with PHP5.2.6 extensions
  25. I would recommend installing PHP manually rather than use the installer. First download the zipped binaries version of PHP, you can get this from php.net/downloads. Once the zip file has been downloaded, extract the contents of the zip to C:/php Next Add PHP to the PATH Environment Variable. Make sure Windows is restarted in order for the changes to take effect. Now open Apaches httpd.conf file and add the following lines to the end LoadModule php5_module "C:/php/php5apache2_2.dll" PHPIniDIr "C:/php" AddType application/x-httpd-php .php NOTE: I amuse you're using Apache2.2.x, if you're using Apache2.0.x then the loadModule line will need to be changed to LoadModule php5_module "C:/php/php5apache2.dll" ENDNOTE After save the httpd.conf. Next navigate to C:/php and find a file called php.ini-recommended rename it to just php.ini and open it for editing. Scroll down and find the following line extension_dir = "./" Change it to extension_dir = "C:/php/ext" NOTE: DO NOT uncomment any extensions yet. Save the php.ini and (re)start Apache. Next create a file in Apaches Document root (eg C:/Apache/htdocs) called info.php. Within this file add the following <?php phpinfo(); ?> Now open you browser and go to http://localhost/info.php. If Apache is configured correctly you should see information about PHPs setup/environment. Scroll down and look for the Loaded Configuration File line it should be set to C:/php/php.ini (this is to ensure PHP IS reading the php.ini we have just modified). PHP is now setup and your're ready to configure PHP as you wish.
×
×
  • 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.