Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. If you have a mysql subsection when going to phpinfo then you should not be getting the error you're receiving. Have you tried clearing your browsers cache (or simply Ctrl +F5).
  2. This is most probably because you're using double quotes for your include paths. Either use single quotes include 'C:\program files\xampp\htodcs\leniz\modules\test.php'; or use backslashes (/) instead of forward slashes (\) as the path seperater. include "C:/program files/xampp/htodcs/leniz/modules/test.php";
  3. Why would you define two functions that did the same thing? That makes no sense at all.
  4. What version of Apache have you installed? PHP comes with three versions of the Apache module, as listed below php5apache.dll is for Apache1.3.x php5apache2.dll is for Apache2.0.x php5apache2_2.dll is for Apache2.2.x make sure your loading the correct module for the version of Apache you're using.
  5. By looking at your code for dbconnect.php, you will need this file in order for your script to work. Is this your script you have made yourself or some third party script you grabbed from somewhere else, in this case you should get in contact with the original developer and read the documentation.
  6. To understand why you are getting an Internal Server Error message you should check Apaches error log. Post the errors in your error log here.
  7. By this do you mean you have downloaded the WAMP package from wampserver.com? If you have then there is no need to do any configuration. WAMP setups up Apache, PHP and MySQL for you. Make sure you're saving your php files in WAMP's www folder (C:/wamp/www). To run your php scripts you need to go to http://localhost/ Opening your php files directly into your web browser will not work.
  8. Is this code $field = "email"; // Use field name for email if(!$subemail || strlen($subemail = trim($subemail)) == 0){ $form->setError($field, $noEmail); } else { /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if (!eregi($regex,$subemail)) { $form->setError($field, $badEmail); } $subemail = stripslashes($subemail); } Wrapped in a function? If it is then you'll have to define the variables $noEmail and $badEmail as global within your function. Otherwise your variables wont be available to your function and this is why your script outputs no errors. You should read up on variable scope
  9. Where are you calling your setError method and how are the variables $field and $badEmail being defined?
  10. If you're using tables you cannot position items within each cell. Remove all your divs and css you code will work as you intend.
  11. Are you only wanting to display records that have the field called active set to YES. If so you'll want to modify your SQL query Example query SELECT `field1`, 'field2', `etc` FROM `your_table` WHERE `active` = 'YES'
  12. Whats the css you're applying to your carPicture id?
  13. Change <div id=\"carPicture\"> to <table id=\"carPicture\" border="0" cellpadding="\0\" cellspacing=\"0\"> Now change </div><br />"; $i++; to </table>"; $i++;
  14. Looking at that code the problem is more to do with HTML than PHP. You cannot place <div> tags between a <table> and <tr> tags. Well actually looking further you don't seem to be opening/closing your table!
  15. When checking phpinfo() to see what php.ini PHP is reading you only need to focus on the line labelled as Loaded Configuration File. Ignore the line above it. Also php_pgsql.dll requires an external library called libpq.dll. This file should be located in D:/PHP5. If PHP cannot find this library it will say it cant find php_pgsql.dll Make sure when you make any changes to the php.ini that you restart Apache in order for the changes to take affect.
  16. You cannot use PHP within PHP. Your line should be echo "<textarea rows='10' cols='40' name='notes'>" . $row['notes'] . "</textarea>";
  17. Use return not echo in your second function.
  18. I see no problems with that code. Maybe you have made a typo along the way which is clearing the value of your $propertyIP variable. I assume you have a rather long if/elseif statement here. You may be better of listing your properties within an array like so $propertyList = array( 'elfaroma_3000' => array( 'name' => 'Name 1', 'ip' => 'xxx.xxx.xxx.196' ), 'buttconctr_3000' => array( 'name' => 'Name 2', 'ip' => 'xxx.xxx.xxx.135' ), /// etc ); Now to retrieve the info on the property stored in $property you'd use if(array_key_exists($propertyList, $property)) { $propertyInfo = $propertyList[$property]; echo '<pre>'.print_r($propertyInfo, true); }
  19. What do you mean by this? Are you now wanting to display all images within your array regardless of the day? Shouldn't you know that? I dont know what you're wanting to apply your styles I was just giving an example.
  20. The problem is with your RewriteRule. This line is too greedy RewriteRule ^([^/]+)?/?$ member.php?id=$1 [L,QSA] With that line everything will be sent to member.php?id=whatever If all you want is site.com/123 to be sent to member.php?id=123 You should use RewriteRule ^([0-9]+)?/?$ member.php?id=$1 [L,QSA] You should should add a couple of conditions so existing files/folders do not get affected by your rewriteRules Corrected code RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([0-9]+)?/?$ member.php?id=$1 [L,QSA]
  21. As you start your echo within your function with a double quote you'll need to escape all double quotes within your string (example \").
  22. Surely all you need to do is add a class item to your $aPictureOfTheDay array (like you have already done with the 'img' and 'txt' items). Now change this line <img src="<?php echo $aPictureOfTheDay[date('w')]['img']; ?>" /> To <img src="<?php echo $aPictureOfTheDay[date('w')]['img']; ?>" class="<?php echo $aPictureOfTheDay[date('w')]['class']; ?>" /> Or wherever you want your class to be applied to.
  23. Dreamweaver wont be able to understand PHP so you get virtually no output when you go to Design View just a bunch of PHP images representing where you PHP code is. The best thing to do is to setup a Site Definition to your live/development server. You should then manually modify your code via Code View. To preview your changes you should swap to your web browser and navigate to your live/development site. This is only possible way.
  24. When making changes to the php.ini all your need to do is restart the Apache service. No need to need to restart the whole server Also you say you're using linux. Files ending in .dll are for Windows only so loading php_gd2.dll will impossible on linux. PHP extensions on *nix based systems end in .so. Can you tell use how you have installed PHP? If you installed PHP via your systems package manager you should install gd2 for PHP via your package manager as this will take care of everything for you. However if you installed PHP manually you may need to recompile PHP to enable GD.
  25. The correct url is http://localhost/my_phpinfo.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.