wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
When MySQL gets installed it sets up a default user 'root' with no password set.
-
When you change the httpd.conf and renamed the php.ini did you restart Apache? You must restart Apache in order for changes to come in to effect.
-
downloading .dll exstensions
wildteen88 replied to Freeola_guy's topic in PHP Installation and Configuration
Your're best of just redownload PHP4 (zipped version not installer). Extract the zip to the PHP installation folder. -
help with mysql and php
wildteen88 replied to shermili's topic in PHP Installation and Configuration
The sticky thorpe is refereeing to is the thread labelled [b]Call To Undefined Function mysql_connect[/b] That thread provides a link to an FAQ [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]here[/url]. This FAQ will help to sort out this error. -
When you are logging in to PMA (phpMyAdmin) you provide the username/password details for the user you want to login to MySQL. MySQL sets up a default user during installation which is [b]root[/b] with no password setup. So enter root for the username and leave the password field blank. You should now be logged in to phpMyAdmin. Your can set a password for the root user when you are logged in (this is recommended for security reasons). You can also setup more users too whilst logged in to PMA.
-
I don't think PHP4 is not compatible with Apache2.2.x. The Apache module that comes with PHP4 is only compatible with Apache2.0.x. This is because Apache2.2.x now handles modules differently compared to Apache2.0.x. Try the latests CVS version of PHP4, or downgrade Apache to 2.0.x instead. Before you do that there may be a a third party Apache2.2.x module for PHP4 at apachelounge.com EDIT: Yeah, there is a third party apache2.2.x available [url=http://www.apachelounge.com/download/mods/php4apache2.dll-php4.4.x.zip]here[/url]. Download the zip and extract the module overwriting the existing apache2.0.x module.
-
Use $_POST instead of $HTTP_POST_VARS $HTTP_*_VARS are depreciated. It is recommended you use the new superglobals $_POST, $_GET etc
-
This will be sorted soon. Please do not request this again. It will be sorted. The admins are fully aware of this and a few other problems. Please be patient thank you.
-
php, mySQL, dreamweaver, WAMP5 - Help!!
wildteen88 replied to pam_w's topic in PHP Installation and Configuration
If you've installed WAMP then you don't need to configure anything. As WAMP has done that for you. Your PHP files should be placed in the www folder (C:\wamp\www) You then open your web browser IE, FF or whatever. Then go to http://localhost/myfile.php to run your PHP scripts. -
Activate cookies and sessions on server
wildteen88 replied to weknowtheworld's topic in Apache HTTP Server
If you mean PHP then you don't need to enable anything. Make sure you browser has cookies enabled and that your firewall is not blocking the cookie. -
I had this yesterday too. I thought it was my stupid ISP cache servers, so I kept changing to different cache servers my ISP has. Then I got a 403 forbidden error message when going to phpfreaks.com/forums the main site was Ok though. So I left and came back today and everything is (or appears) fine at the moment. I guess this is down to to the forum being upgraded though. This happened around 7:00 O'clock last night (UK - GMT timezone).
-
If your script uses an id to identify an article, you will need to change your script to identify the article with the article name instead. mod rewrite cant convert a name to a number. mod_rewrite is only used to create a user friendly url which masks the true URL.
-
Is the error you are getting like the following? [code]Notice: Undefined index: step in C:\server\www\test.php on line 3 Notice: Undefined index: HTTP_REFERER in C:\server\www\test.php on line 4[/code]
-
Call To Undefinded Function mysql_connect
wildteen88 replied to wildteen88's topic in PHP Installation and Configuration
Please attach the php.ini to your post. You can do this by doing the following: Click the Modify button for your post above this. Expand the Additional Options area. Now attahc your php.ini file to the post. Click Save button. php.ini should now be attached to your post. Also when you added PHP to the path you did restart your PC? You must restart your PC in order for the changes to the PATH to be made. -
Problem: Including only specific content in php include
wildteen88 replied to Squirrels's topic in PHP Coding Help
It would be a lot easier for your customer/end user to fill in a form which will allow him/her to enter the title for the news article and then a small textarea for the news articles content, then from there you could save to an SQL database/flat file. Rather than getting them to edit index.php to add in a news article. -
Problem: Including only specific content in php include
wildteen88 replied to Squirrels's topic in PHP Coding Help
IS the HTML hard coded in to index.php or is the content comming from a database? If its from a database just query the database to fetch the title for the news articled in the database. If its hard coded I would recommend you to use a database to store the news entries rather than hard coding them in. -
The form should be wrapped around the table. Not the table wrapped around the form. Your HTML is the error. It should be like this: [code]<form id="login_form" method="post" action="login.php"> <table> <tr><td align="right">User Name:</td><td><input class="light" type="text" name="user_name" /></td></tr> <tr><td align="right">Password:</td><td><input class="light" type="password" name="password" /></td></tr> <tr><td colspan="2" align="center"><input type="submit" name="submit" value="Login" /></td></tr> </table> </form>[/code] Also you was using an invalid input type of light. So I change the input fields to text and password for the username and password fields.
-
Do you get 500 error still if you use this instead: [tt]php_value register_globals "on"[/tt] If you do which version of Apache do you have installed? Also is PHP configured as an Apache module? As [tt]php_flag[/tt] or [tt]php_value[/tt] only works if PHP is an Apache module. It wont workif PHP is configured as GCI.
-
Add the following flag to the htaccess: [tt]php_flag register_globals Off[/tt]
-
Sounds like a regsiter globals problem to me. Open your php.ini and disable regsiter_globals (change [tt]register_globals = On[/tt] to [tt]register_globals = Off)[/tt] Save the php.ini and restart Apache
-
After this: [code=php:0]list($title, $id) = $row;[/code] Add this: [code=php:0]$titleURL = str_replace(' ', '-', $title);[/code] Then change this code: [code=php:0]$newstext .= "<li><a href=\"$self?title=$title&id=$id\">$title</a></li>\r\n";[/code] to this: [code=php:0]$newstext .= "<li><a href=\"{$self}{$id}-{$titleURL}.htm\">$title</a></li>\r\n";[/code] That should be right. Test it and see
-
Call To Undefinded Function mysql_connect
wildteen88 replied to wildteen88's topic in PHP Installation and Configuration
[quote author=Shears link=topic=87276.msg498622#msg498622 date=1168134461] I have this problem: [b]Cannot load mysql extension. Please check your PHP configuration. - Documentation[/b] The [b]extension_dir[/b] in phpinfo shows [b]c:\php5[/b], yet i definetely have [b]extension_dir[/b] set to [b]c:\php\ext[/b] in the [b]php.ini[/b] file. What am i doing wrong? Despite php.ini being in [b]c:\php[/b], in phpinfo() it says: [b]Configuration File (php.ini) Path C:\WINDOWS[/b] - I dont understand this either. Can someone help please... Thank you Shears :) [/quote] Its because PHP cannot find the php.ini PHP looks in the following places for the php.ini - C:/WINDOWS or C:/WINDOWS/SYSTEM32 - Or in the Windows PATH variable I would recommend you to add PHP to PATH. -
feri_soft doesnt want to know how to use the function, but how the code works.
-
You are best of setting up an array. You do it like so: $c[] = 'some value'; $c[] = 'some other value'; $c[] = 'what ever else'] That will create an array. remeber everytime you do $c[]= you create new item for the array. When you've created the array you can run through the array using a foreach loop like so: [code=php:0]foreach($c as $value) { // call your function urFunc($value); }[/code] Or you can use [url=http://www.php.net/manual/en/function.array-map.php]array_map[/url] which does the same thing as the foreach loop above
-
If you want to to grab a file from a directory that is higher up from where you are now use ../ to go up a directory. For example say you file structure is this: + folder1 file1.php + folder2 file2.php Now you are currently in folder1 running file1.php. But you need to require file2.php 9which is in direcotry2) into file1.php what you'll want to do is this: [code]include '../folder2/file2.php[/code] That now tells PHP to go out of the current working directory and in to folder2 to get file2.php You should not use URLs for including files. You should try to use relative paths instead.