wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
libmySQL and libmysql are the same. Just different case. do you get any start up errors when IIS starts up?
-
did you give it the correct database name? I don't quite understand your WAMP comment though.
-
XAMPP comes with GD :-\, enabled by default if I remember correctly. I think you can enable it via the web based control panel http://localhost/xampp anyway why did you download XAMPP for? All you needed to was change the php.ini in your last set up to enable GD. Which my last post explained how to do.
-
[SOLVED] installing php on apache
wildteen88 replied to baraxil's topic in PHP Installation and Configuration
As a side note I would not recommend installing anything server related in C:\program files. I prefer to install these in C:\server instead. This keeps everything centralised and keeps paths short and space free. Having spaces involved in paths may cause problems. -
[SOLVED] installing php on apache
wildteen88 replied to baraxil's topic in PHP Installation and Configuration
Load it as a Module instead of cgi (script alias) Apache module lines: LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll" AddType application/x-httpd-php .php Note: if you are using apache2.2.x then replace php5apache2.dll with php5apache2_2.dll, or if you are using PHP4 then replace php5 with php4 Save the httpd.conf and restart Apache. -
The mysql extension hasn't been enabled or PHP is having issues loading the extension. I see in your php.ini you have set up the extension_dir to point to PHP's extension folder which is correct and that you have enabled the mysql extension line in the php.ini Those are correct steps to take for enabling the mysql extension. There is an external library called libmysql.dll in order for the mysql extension to function correctly. Where is the location of this file?
-
I get these errors whne going to link supplied: Warning: main(../../data/conn.php) [function.main]: failed to open stream: No such file or directory in /home/mylabser/public_html/242/morris/projects/project5.php on line 2 Warning: main(../../data/conn.php) [function.main]: failed to open stream: No such file or directory in /home/mylabser/public_html/242/morris/projects/project5.php on line 2 Warning: main() [function.include]: Failed opening '../../data/conn.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mylabser/public_html/242/morris/projects/project5.php on line 2 The last two errors are caused by the first error message. PHP can't find the file conn.php and thus it throws out those errors. check that conn.php exists in ../../data/
-
You will want to play around with the properties of the command line dialog box you want to run at 1680x1050 Just open acommand line window and right click the title bar and select properties from context window and select the Layout tab to change the width/height of the command window. Note: Any changes you make will not be reflected to existing/newly opened command windows. When you close the window all changes will be lost.
-
If you want to create a database just run the CREATE DATABASE command followed by your database name. You don't need to run the GRANT command to set permissions on your database/tables. I know it gives added security however for now just set up the database and it's tables. Then go on to set up permissions. Also if you have installed WAMP. You might find it easier using phpMyAdmin to create your database and tables for the application. You can use phpMyAdmin by opening a web browser and going to http://localhost/phpmyadmin or by clicking wamps task bar icon (looks like a rev-meter) and select phpMyAdmin.
-
Remove the @ from in front of mysql_connect. The @ suppresses errors so if have that in front of a line/function call then any errors returned will be ignored. Also when you make any changes to server configuration files, you must restart the server.
-
You add in the checkbox in to your form and give it a name of rememberMe and value of true. THe following html should do: [code]<input type="checkbox" name="rememberMe" value="true" /> Then in your PHP code when you process the data submitted from the form you check that $_POST['rememberMe'] exists and equals to 'true', if it exists and equals to 'true' then set the rememberMe cookie. Here is your new code: <?php require_once('config.php'); // Use session variable on this page. This function must put on the top of page. session_start(); $message = ''; //Login Section. if(isset($_POST['username']) && isset($_POST['password'])) { $username = $_POST['username']; $password = md5($_POST['password']); // Encrypt password with md5() function. // RemeberMe Feature if(isset($_POST['rememberMe']) && $_POST['rememberMe'] == 'true') { // prepare cookie data $c['username'] = $username; $c['password'] = $password; // // set the cookie // name: remeberMe // expire after 1 year setcookie('rememberMe', serialize($c), time()+3600*24*365); } // Check matching of username and password. $sql = "SELECT 8 FROM vbb_members WHERE username='$username' AND password='$password'"; $result = mysql_query($sql); // If match. if(mysql_num_rows($result)!= 0) { $_SESSION['username'] $username; // create session username mysql_query("UPDATE vbb_members SET logged_in=logged_in+1 WHERE username='$username'"); header("Location: index.php"); // Re-direct to main.php exit; } // If not match. else { $message = "--- Incorrect Username or Password ---"; } } // End Login authorize check. ?> <? echo $message; ?> <table> <tr> <td>User : </td> <td><input name="username" type="text" id="username" /></td> </tr> <tr> <td>Password : </td> <td><input name="password" type="password" id="password" /></td> </tr> </table> Remeber Me? <input type="checkbox" name="rememberMe" value="true" /> <input name="Login" type="submit" id="Login" value="Login" /> </form> </body> </html> The code will set a cookie called 'rememberMe' when you want to use the cookie you want to use the $_COOKIE['remeberMe'] variable. However before you can use the values set in the cookie you must unserialize the data, as I serialized the array when setting the cookie So in order to use the cookie data you'll want to do this: // unserialize the serialized data in the cookie // rm short for rememberMe $rm = unserialize($_COOKIE['rememberMe']); // when you unserialize the cookie the $rm variable will hold an array 'username' and 'password': //Username variable: $rm['username'] <--- contains the username string //Password variable: $rm['password '] <--- contains the md5 hash of the password [/code]
-
what do you mean by that? Post examples. DO you want to format to be like this? $47-14
-
[SOLVED] PHP 4, 5 and gd
wildteen88 replied to spamoom's topic in PHP Installation and Configuration
By that you mean you added something like the following line in the httpd.conf, correct? LoadModule php5_module "C:/php/php5apache2.dll" When you added that line, did you add in an AddType for php?. Such as the following line: AddType application/x-httpd-php .php Also the PHPIniDir directive in httpd.conf tells PHP where the php.ini is. So if you remove that PHP can't find the php.ini and so can cause more problems. When you enable the GD2 extension make sure you uncommented the following line in the php.ini: ;extension=php_gd2.dll and that you set up the extension_dir directive (line 520 in php.ini) too to point to PHP's extension folder. Any changes you make to the httpd.conf or php.ini make sure you save and then restart Apache for the changes to take affect. -
Displaying MySQL version using PHP, how?
wildteen88 replied to bilis_money's topic in PHP Coding Help
That will only work if you are using the mysql improved extension (php_mysqli.dll or php_mysqli.so) If you are using the normal mysql extension (php_mysql.dll or php_mysql.so) then you use mysql_get_server_info() function Note: you must be connected to mysql before using this function. -
Categories in.htaccess, or some sort of if statement?
wildteen88 replied to Runilo's topic in Apache HTTP Server
You will want to do that processing in your script that gets the category and trim url variables. I guess you are using a database. SO what you will want to do is have a an if statement that checks to see how results was returned from the database, if its 1 then display the content that corresponds to the url vars. If its 0 then use die() and include() together to include your 404 error page. -
You save them in the htdocs folder. The htdocs folder is located in Apache's root folder (default path: C:/Program Files/Apache Group/Apache2/htdocs - note: it may be slightly different. I cant remember the exact path) Once you have saved your file in the htdocs you will be able to go to http://localhost/filename.ext to run your scripts. change filename.ext to the name of your script.
-
BBCode Parsers and exporting text from a DB
wildteen88 replied to deadpossum's topic in PHP Coding Help
You can either use phpBB's bbcode parser or get a premade bbcode parser, like this one -
What is the best FREE PHP IDE on windows?
wildteen88 replied to Pr0fess0rX's topic in PHP Coding Help
Please look in the miscellaneous forum and/or the poll forum. There are threads in those forums discussing the best PHP IDE to use. Thread Locked. -
Open your php.ini and find the following line: ;extension=php_gd2.dll and remove the semi-colon from then start of the line. Save the php.ini and restart your server. Is GD now listed? Who told that? That is completely untrue. I have GD on my WAMP setup.
-
[SOLVED] Multiple Browsers On WAMP
wildteen88 replied to websmoken's topic in PHP Installation and Configuration
Just open firefox and go to http://localhost http://localhost is not browser dependent. -
[SOLVED] Can't even get started!
wildteen88 replied to phplearner07's topic in PHP Installation and Configuration
What exact version of Apache you using? If you are using Apache2.0.x then the php5apache2.dll module should be fine, however if you are using Apache2.2.x then you should use the php5apache2_2.dll module instead. Also I strongly advise you to not move any files from the php folder. I would recommend you to add the php folder to the Windows Path instead. When you move files around the file system it can make problems worse. -
Are those the headings/sub-headings from the result of phpinfo()? If they are then GD is not loaded as there is no GD sub-heading.
-
That is extremely insecure! I would do something like this: if(isset($_GET['id'])) { $page = $_SERVER['DOCUMENT_ROOT'] . '/' . $_GET['id']; if(file_exists($page)) { include "$page"; } else { die($page . ' cannot be found!'); } } That is much more secure.
-
If you are using BBCode only convert the bbcode when you are displaying the formatted text to the page and not when you enter it in the database. I would recommend you to look in the Regex within PHP board. There are many posts on this subject. Note: search for my posts in that forum in one of my replies I linked to a site that had a simple pre-made BBCode parser.