wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
MYSQL Fatal error:Call to undefined function mysql_connect()
wildteen88 replied to benlester's topic in MySQL Help
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). -
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";
-
Why would you define two functions that did the same thing? That makes no sense at all.
-
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.
-
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.
-
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.
-
[SOLVED] Going Crazy here!
wildteen88 replied to jewysi's topic in PHP Installation and Configuration
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. -
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
-
Where are you calling your setError method and how are the variables $field and $badEmail being defined?
-
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.
-
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'
-
Whats the css you're applying to your carPicture id?
-
Change <div id=\"carPicture\"> to <table id=\"carPicture\" border="0" cellpadding="\0\" cellspacing=\"0\"> Now change </div><br />"; $i++; to </table>"; $i++;
-
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!
-
Problems with Postgres on PHP
wildteen88 replied to chris.ecs's topic in PHP Installation and Configuration
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. -
You cannot use PHP within PHP. Your line should be echo "<textarea rows='10' cols='40' name='notes'>" . $row['notes'] . "</textarea>";
-
Use return not echo in your second function.
-
[SOLVED] assigning two variables based on a third...
wildteen88 replied to aolong's topic in PHP Coding Help
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); } -
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]
-
As you start your echo within your function with a double quote you'll need to escape all double quotes within your string (example \").
-
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.
-
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.
-
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.
-
Access Issues When Installing Wamp
wildteen88 replied to cwindham's topic in PHP Installation and Configuration
The correct url is http://localhost/my_phpinfo.php