followed tutorial get this error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

followed tutorial get this error

Postby painfree » 09. February 2009 12:05

This is my config file...for wordpress, 2.7 XAmpp1.7, XP home sp3, DSL connection, Tried disabling firewall. MY XAMPP shows as being created successfully with permissions, myphp and mysql are running....please help I need to develop on my local machine and am a complete amateur I have used Microsoft Expressions that is it....thanks



/** MySQL database username */
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'pw');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
* Authentication Unique Keys.
*
* Change these to different unique phrases!
* You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
*
* @since 2.6.0
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', 'pw'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

/**#@-*/

/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';

/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to 'de' to enable German
* language support.
*/
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

/** WordPress absolute path to the Wordpress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
?>
Error message
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
Thanks...
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby painfree » 09. February 2009 12:09

Should have added and apache show as started and mysql as busy port 3306
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby Wiedmann » 09. February 2009 12:16

and mysql are running....
...
and mysql as busy port 3306

MySQL is running or busy? Is phpMyAdmin working?

You are starting MySQL in service (SVC) or application mode?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: followed tutorial get this error

Postby dmphotography » 09. February 2009 14:36

Yeah, your configuration file looks correct.

Like Wiedmann said, it looks like an issue with MySQL not running.

I believe this is usually caused by something else occupying port 3306 or your firewall blocking it.

Try running it as a service and then restarting your computer. This has fixed it in the past for me as long as MySQL starts before whatever else might be occupying that port.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: followed tutorial get this error

Postby painfree » 10. February 2009 01:41

http://localhost/wordpress/wp-admin/install.php I am up but when I put in the link it says I am not also have no clue about where a WP template goes, If I click the index for wordpress it goes to microsft expressions when I click in browser it says wp is installed . Thanks for helping with this I am beyond lost and wordpress is not answering....I really need something I can work at offline, I can see the code in expressions but cant seem to get awysiwyg anywhere

Amy
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby painfree » 10. February 2009 01:56

This is what I get ....

<?php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/

/**
* We are installing WordPress.
*
* @since unknown
* @var bool
*/
define('WP_INSTALLING', true);

/** Load WordPress Bootstrap */
require_once('../wp-load.php');

/** Load WordPress Administration Upgrade API */
require_once('./includes/upgrade.php');

if (isset($_GET['step']))
$step = $_GET['step'];
else
$step = 0;

/**
* Display install header.
*
* @since unknown
* @package WordPress
* @subpackage Installer
*/
function display_header() {
header( 'Content-Type: text/html; charset=utf-8' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e('WordPress &rsaquo; Installation'); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>

<?php
}//end function display_header();

// Let's check to make sure WP isn't already installed.
if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');}

switch($step) {
case 0:
case 1: // in case people are directly linking to this
display_header();
?>
<h1><?php _e('Welcome'); ?></h1>
<p><?php printf(__('Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure. Otherwise, just fill in the information below and you\'ll be on your way to using the most extendable and powerful personal publishing platform in the world.'), '../readme.html'); ?></p>
<!--<h2 class="step"><a href="install.php?step=1"><?php _e('First Step'); ?></a></h2>-->

<h1><?php _e('Information needed'); ?></h1>
<p><?php _e("Please provide the following information. Don't worry, you can always change these settings later."); ?></p>

<form id="setup" method="post" action="install.php?step=2">
<table class="form-table">
<tr>
<th scope="row"><label for="weblog_title"><?php _e('Blog Title'); ?></label></th>
<td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td>
</tr>
<tr>
<th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th>
<td><input name="admin_email" type="text" id="admin_email" size="25" /><br />
<?php _e('Double-check your email address before continuing.'); ?>
</tr>
<tr>
<td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
</tr>
</table>
<p class="step"><input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" /></p>
</form>

<?php
break;
case 2:
if ( !empty($wpdb->error) )
wp_die($wpdb->error->get_error_message());

display_header();
// Fill in the data we gathered
$weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : '';
$admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : '';
$public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;
// check e-mail address
if (empty($admin_email)) {
// TODO: poka-yoke
die('<p>'.__("<strong>ERROR</strong>: you must provide an e-mail address.").'</p>');
} else if (!is_email($admin_email)) {
// TODO: poka-yoke
die('<p>'.__('<strong>ERROR</strong>: that isn&#8217;t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>').'</p>');
}

$wpdb->show_errors();
$result = wp_install($weblog_title, 'admin', $admin_email, $public);
extract($result, EXTR_SKIP);
?>

<h1><?php _e('Success!'); ?></h1>

<p><?php printf(__('WordPress has been installed. Were you expecting more steps? Sorry to disappoint.'), ''); ?></p>

<table class="form-table">
<tr>
<th><?php _e('Username'); ?></th>
<td><code>admin</code></td>
</tr>
<tr>
<th><?php _e('Password'); ?></th>
<td><code><?php echo $password; ?></code><br />
<?php echo '<p>'.__('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.').'</p>'; ?></td>
</tr>
</table>

<p class="step"><a href="../wp-login.php" class="button"><?php _e('Log In'); ?></a></p>

<?php
break;
}
?>
<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
</body>
</html>
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby Izzy » 10. February 2009 02:03

http://localhost/wordpress/wp-admin/install.php I am up but when I put in the link it says I am not also have no clue about where a WP template goes, If I click the index for wordpress it goes to microsft expressions when I click in browser it says wp is installed . Thanks for helping with this I am beyond lost and wordpress is not answering....I really need something I can work at offline, I can see the code in expressions but cant seem to get awysiwyg anywhere
Your last post was a bit hard to follow but it seems your server is not running.

To test go to http://localhost and tell me what you see please.

Go to http://localhost/phpmyadmin and tell me what you see please.



/** MySQL database username */
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'pw');


You should never use root as a database user but instead use another name - root is the super user and has global privileges that can destroy your databases if in the wrong hands.

Did you create your WP database in phpMyAdmin before trying to install WP?

I made a how to for creating the database in phpMyAdmin for WP if it helps:
viewtopic.php?p=112258#p112258



BTW you can't run a php script by simply clicking on the file - it has to be parsed by the web server after typing the http:// address of the file in the browser, for example http://localhost/index.php


Make sure that your server is running by checking the XAMPP Control Panel for green running.


Also right click on any .php file and associate a text editor for opening and editing instead of Expressions.



You don't need to worry about where a template goes until you have WP installed and up and running as the default template will be used - then in the admin panel you will find where and how to use templates.


Don't select to work offline in your browser - make sure in the browser's File menu that Work Offline is not selected.



Can you post a link here to the Tutorial you followed to install WordPress please?
It is one of the easiest of blog scripts to install but first you must make sure that XAMPP is working properly before attempting to install any kind of script at all.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: followed tutorial get this error

Postby painfree » 10. February 2009 10:48

Tutorial I used is at word press first http://codex.wordpress.org/Installing_WordPress
and then to set up the XAMpp I used http://www.tamba2.org.uk/wordpress/xampp/

http://localhost/

Index of /
Name Last modified Size Description-------------------------------------------------------------------------------- Thumbs.db 08-Feb-2009 16:53 13K
apache_pb.gif 20-Dec-2007 21:00 2.3K
apache_pb.png 20-Dec-2007 21:00 1.4K
apache_pb2.gif 20-Dec-2007 21:00 2.4K
apache_pb2.png 20-Dec-2007 21:00 1.4K
apache_pb2_ani.gif 20-Dec-2007 21:00 2.1K
atahualpa.3.2.zip 09-Feb-2009 19:10 809K
atahualpa.3.2/ 09-Feb-2009 19:14 -
favicon.ico 20-Dec-2007 21:00 30K
restricted/ 20-Dec-2007 21:01 -
wordpress/ 08-Feb-2009 16:45 -
--------------------------------------------------------------------------------

Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 Server at localhost Port 80

Actions
MySQL localhost
Create new database
Collation armscii8_bin armscii8_general_ci ascii_bin ascii_general_ci big5_bin big5_chinese_ci binary cp1250_bin cp1250_croatian_ci cp1250_czech_cs cp1250_general_ci cp1250_polish_ci cp1251_bin cp1251_bulgarian_ci cp1251_general_ci cp1251_general_cs cp1251_ukrainian_ci cp1256_bin cp1256_general_ci cp1257_bin cp1257_general_ci cp1257_lithuanian_ci cp850_bin cp850_general_ci cp852_bin cp852_general_ci cp866_bin cp866_general_ci cp932_bin cp932_japanese_ci dec8_bin dec8_swedish_ci eucjpms_bin eucjpms_japanese_ci euckr_bin euckr_korean_ci gb2312_bin gb2312_chinese_ci gbk_bin gbk_chinese_ci geostd8_bin geostd8_general_ci greek_bin greek_general_ci hebrew_bin hebrew_general_ci hp8_bin hp8_english_ci keybcs2_bin keybcs2_general_ci koi8r_bin koi8r_general_ci koi8u_bin koi8u_general_ci latin1_bin latin1_danish_ci latin1_general_ci latin1_general_cs latin1_german1_ci latin1_german2_ci latin1_spanish_ci latin1_swedish_ci latin2_bin latin2_croatian_ci latin2_czech_cs latin2_general_ci latin2_hungarian_ci latin5_bin latin5_turkish_ci latin7_bin latin7_estonian_cs latin7_general_ci latin7_general_cs macce_bin macce_general_ci macroman_bin macroman_general_ci sjis_bin sjis_japanese_ci swe7_bin swe7_swedish_ci tis620_bin tis620_thai_ci ucs2_bin ucs2_czech_ci ucs2_danish_ci ucs2_esperanto_ci ucs2_estonian_ci ucs2_general_ci ucs2_hungarian_ci ucs2_icelandic_ci ucs2_latvian_ci ucs2_lithuanian_ci ucs2_persian_ci ucs2_polish_ci ucs2_roman_ci ucs2_romanian_ci ucs2_slovak_ci ucs2_slovenian_ci ucs2_spanish2_ci ucs2_spanish_ci ucs2_swedish_ci ucs2_turkish_ci ucs2_unicode_ci ujis_bin ujis_japanese_ci utf8_bin utf8_czech_ci utf8_danish_ci utf8_esperanto_ci utf8_estonian_ci utf8_general_ci utf8_hungarian_ci utf8_icelandic_ci utf8_latvian_ci utf8_lithuanian_ci utf8_persian_ci utf8_polish_ci utf8_roman_ci utf8_romanian_ci utf8_slovak_ci utf8_slovenian_ci utf8_spanish2_ci utf8_spanish_ci utf8_swedish_ci utf8_turkish_ci utf8_unicode_ci
MySQL connection collation: Collation armscii8_bin armscii8_general_ci ascii_bin ascii_general_ci big5_bin big5_chinese_ci binary cp1250_bin cp1250_croatian_ci cp1250_czech_cs cp1250_general_ci cp1250_polish_ci cp1251_bin cp1251_bulgarian_ci cp1251_general_ci cp1251_general_cs cp1251_ukrainian_ci cp1256_bin cp1256_general_ci cp1257_bin cp1257_general_ci cp1257_lithuanian_ci cp850_bin cp850_general_ci cp852_bin cp852_general_ci cp866_bin cp866_general_ci cp932_bin cp932_japanese_ci dec8_bin dec8_swedish_ci eucjpms_bin eucjpms_japanese_ci euckr_bin euckr_korean_ci gb2312_bin gb2312_chinese_ci gbk_bin gbk_chinese_ci geostd8_bin geostd8_general_ci greek_bin greek_general_ci hebrew_bin hebrew_general_ci hp8_bin hp8_english_ci keybcs2_bin keybcs2_general_ci koi8r_bin koi8r_general_ci koi8u_bin koi8u_general_ci latin1_bin latin1_danish_ci latin1_general_ci latin1_general_cs latin1_german1_ci latin1_german2_ci latin1_spanish_ci latin1_swedish_ci latin2_bin latin2_croatian_ci latin2_czech_cs latin2_general_ci latin2_hungarian_ci latin5_bin latin5_turkish_ci latin7_bin latin7_estonian_cs latin7_general_ci latin7_general_cs macce_bin macce_general_ci macroman_bin macroman_general_ci sjis_bin sjis_japanese_ci swe7_bin swe7_swedish_ci tis620_bin tis620_thai_ci ucs2_bin ucs2_czech_ci ucs2_danish_ci ucs2_esperanto_ci ucs2_estonian_ci ucs2_general_ci ucs2_hungarian_ci ucs2_icelandic_ci ucs2_latvian_ci ucs2_lithuanian_ci ucs2_persian_ci ucs2_polish_ci ucs2_roman_ci ucs2_romanian_ci ucs2_slovak_ci ucs2_slovenian_ci ucs2_spanish2_ci ucs2_spanish_ci ucs2_swedish_ci ucs2_turkish_ci ucs2_unicode_ci ujis_bin ujis_japanese_ci utf8_bin utf8_czech_ci utf8_danish_ci utf8_esperanto_ci utf8_estonian_ci utf8_general_ci utf8_hungarian_ci utf8_icelandic_ci utf8_latvian_ci utf8_lithuanian_ci utf8_persian_ci utf8_polish_ci utf8_roman_ci utf8_romanian_ci utf8_slovak_ci utf8_slovenian_ci utf8_spanish2_ci utf8_spanish_ci utf8_swedish_ci utf8_turkish_ci utf8_unicode_ci
Interface
Language : Afrikaans Shqip - Albanian العربية - Arabic Azərbaycanca - Azerbaijani Bangla Euskara - Basque Беларуская - Belarusian Biełaruskaja - Belarusian latin Bosanski - Bosnian Português - Brazilian portuguese Български - Bulgarian Català - Catalan 中文 - Chinese simplified 中文 - Chinese traditional Hrvatski - Croatian Česky - Czech Dansk - Danish Nederlands - Dutch English Eesti - Estonian Suomi - Finnish Français - French Galego - Galician ქართული - Georgian Deutsch - German Ελληνικά - Greek עברית - Hebrew हिन्दी - Hindi Magyar - Hungarian Bahasa Indonesia - Indonesian Italiano - Italian 日本語 - Japanese 한국어 - Korean Latviešu - Latvian Lietuvių - Lithuanian Macedonian - Macedonian Bahasa Melayu - Malay Монгол - Mongolian Norsk - Norwegian فارسی - Persian Polski - Polish Português - Portuguese Română - Romanian Русский - Russian Српски - Serbian Srpski - Serbian latin සිංහල - Sinhala Slovenčina - Slovak Slovenščina - Slovenian Español - Spanish Svenska - Swedish Tatarça - Tatarish ภาษาไทย - Thai Türkçe - Turkish Українська - Ukrainian
Theme / Style: Darkblue/orangeOriginal
Custom color:
Font size: 32% 42% 52% 62% 72% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 92% 102% 112% 122% 132%
MySQL
Server: localhost via TCP/IP
Server version: 5.1.30-community
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
Web server
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8
MySQL client version: 5.1.30
PHP extension: mysql
phpMyAdmin
Version information: 3.1.1
Documentation
Wiki
Official Homepage
[ChangeLog] [Subversion] [Lists]



Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user '.root'.
Open new phpMyAdmin window
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby painfree » 10. February 2009 10:56

Do I remove these all except WP? oor leave them as is?

User Host Password Global privileges 1 Grant
Any % -- USAGE No
Any localhost No USAGE No
pma localhost No ALL PRIVILEGES Yes
root 127.0.0.1 No ALL PRIVILEGES Yes
root localhost No ALL PRIVILEGES Yes
wordpress localhost Yes ALL PRIVILEGES Yes
wp localhost Yes USAGE No
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby Izzy » 10. February 2009 12:22

Delete only this:
wordpress localhost Yes ALL PRIVILEGES Yes

Leave the rest.

In your C:\xampp\htdocs folder (http://localhost) I do not see an xampp folder, did you delete that, as well as the index.html and the index.php files that belongs to XAMPP?

The tutorial that tell you to download the xampplite version is out of touch and should be ignored.

The lite version is of no use for any serious work and should not be used, use the full version and get all the benefits - XAMPP Lite is an only "Take-Run-Delete-Forget-it" package.

In future please use the XAMPP for Windows installation instructions here:
http://www.apachefriends.org/en/xampp-windows.html
There is even a choice of viewing the page in different languages.

Can you now install wordpress?
http://localhost/wordpress/wp-admin/install.php

But before you proceed any further make sure you have a fully installed, complete and working XAMPP and Apache and MySQL are started and Running in the XAMPP Control Panel (XCP).
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: followed tutorial get this error

Postby painfree » 10. February 2009 13:01

Hi Izzie,
Thanks for all your help...I am still getting no luck installing The Xampp folder is in the htdocs folder , I do not know why it is not showing. MYsql and Apache are running I have deleted the wordpress folder as suggested

This is what is left
User Host Password Global privileges 1 Grant
Any % -- USAGE No
Any localhost No USAGE No
pma localhost No ALL PRIVILEGES Yes
root 127.0.0.1 No ALL PRIVILEGES Yes
root localhost No ALL PRIVILEGES Yes
wp localhost Yes USAGE No
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby Izzy » 10. February 2009 13:07

This entry is wrong and needs editing as pma should not have full global privileges:
pma localhost No ALL PRIVILEGES Yes

Change the privileges so the line looks like this:
pma localhost No RELOAD, SHUTDOWN, PROCESS No


OK now we do some more testing.

Go to http://localhost/xampp and if you see the XAMPP welcome page click on all the demos and make sure you get no errors, if you do let me know what they are, please.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: followed tutorial get this error

Postby painfree » 10. February 2009 13:42

Hi Izzie all test are good except las t one which I am not sure how to do but this is the source

I also redownloaded wp1.7 took it out of file and changed the config file so now I get this error..

Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
02/10/09 07:41:35
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8

<?php
include "langsettings.php";
// Requests allowed only from localhosz
extract($_POST);
extract($_SERVER);
$host = "127.0.0.1";
$timeout = "1";

if ($REMOTE_ADDR) {
if ($REMOTE_ADDR != $host) {
echo "<p><h2> FORBIDDEN FOR CLIENT $REMOTE_ADDR <h2></p>";
exit;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann">
<link href="xampp.css" rel="stylesheet" type="text/css">
<title></title>
</head>

<body>
&nbsp;<p>
<h1><?php echo $TEXT['ADOdb-head']; ?></h1>
<?php echo $TEXT['ADOdb-text']; ?><p>
<?php echo $TEXT['ADOdb-example']; ?><p>

<?php

$host = "127.0.0.1";
$timeout = "1";

if ($REMOTE_ADDR) {
if ($REMOTE_ADDR != $host) {
echo "<h2> FORBIDDEN FOR CLIENT $REMOTE_ADDR (only localhost!)<h2>";
}
}
else {

// if ()
if (empty($_POST['dbserver'])) {
$_POST['dbserver'] = 'mysql';
}
if (empty($_POST['host'])) {
$_POST['host'] = '127.0.0.1';
}
if (empty($_POST['user'])) {
$_POST['user'] = 'root';
}
if (empty($_POST['password'])) {
$_POST['password'] = '';
}
if (empty($_POST['database'])) {
$_POST['database'] = 'cdcol';
}
if (empty($_POST['table'])) {
$_POST['table'] = 'cds';
}

if (isset($_POST['adodb']) && ($_POST['adodb'] == "submit")) {
if ($_POST['dbserver'] == "sqlite") {
include_once 'adodb/adodb-errorpear.inc.php';
include_once 'adodb/adodb.inc.php';
include_once 'adodb/tohtml.inc.php';
$db = ADONewConnection($_POST['dbserver']);
@$db->Connect($_POST['database'], '0666');
echo "<p><b>DBServer: $_POST[dbserver]</b><p>";
$result = $db->Execute("SELECT * FROM $_POST[table]");
if (!is_object($result)) {
$e = ADODB_Pear_Error();
echo '<p><b>'.$e->message.'</b>';
} else {
while (!$result->EOF) {
for ($i = 0, $max = $result->FieldCount(); $i < $max; $i++) {
echo $result->fields[$i].' ';
$result->MoveNext();
echo "<br>";
}
}
}
} else {
if (($_POST['dbserver'] == "mysql") || ($_POST['dbserver'] == "postgres7") || ($_POST['dbserver'] == "ibase") || ($_POST['dbserver'] == "mssql") || ($_POST['dbserver'] == "borland_ibase") || ($_POST['dbserver'] == "firebird") || ($_POST['dbserver'] == "mssqlpo") || ($_POST['dbserver'] == "maxsql") || ($_POST['dbserver'] == "oci8") || ($_POST['dbserver'] == "oci805") || ($_POST['dbserver'] == "oci8po") || ($_POST['dbserver'] == "postgres") || ($_POST['dbserver'] == "oracle") || ($_POST['dbserver'] == "postgres64") || ($_POST['dbserver'] == "sybase")) {
include_once 'adodb/adodb-errorpear.inc.php';
include_once 'adodb/adodb.inc.php';
include_once 'adodb/tohtml.inc.php';
$db = ADONewConnection($_POST['dbserver']);
@$db->Connect($_POST['host'], $_POST['user'], $_POST['password'], $_POST['database']);
echo "<p><b>DBServer: $_POST[dbserver]</b><p>";
$result = $db->Execute("SELECT * FROM $_POST[table]");
if (!is_object($result)) {
$e = ADODB_Pear_Error();
echo '<p><b>'.$e->message.'</b>';
} else {
while (!$result->EOF) {
for ($i = 0, $max = $result->FieldCount(); $i < $max; $i++) {
echo $result->fields[$i].' ';
$result->MoveNext();
echo "<br>";
}
}
}
} else {
print_r($TEXT['ADOdb-notdbserver']);
}
}
}
}
?>

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table width="720" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-dbserver']; ?></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-host']; ?></td>
</tr>

<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="dbserver" size="40" value="<?php echo $_POST['dbserver']; ?>"></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="host" size="40" value="<?php echo $_POST['host']; ?>"></td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-user']; ?></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-password']; ?></td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="user" size="40" value="<?php echo $_POST['user']; ?>"></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="password" size="40" value="<?php echo $_POST['password']; ?>"></td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-database']; ?></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><?php echo $TEXT['ADOdb-table']; ?></td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="database" size="40" value="<?php echo $_POST['database']; ?>"></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="text" name="table" size="40" value="<?php echo $_POST['table']; ?>"></td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
</tr>
<tr>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350"><input type="submit" name="adodb" value="submit"></td>
<td align="left" width="10">&nbsp;</td>
<td align="left" width="350">&nbsp;</td>
</tr>
</table>
</form>

<p>
<?php include("showcode.php"); ?>
</body>
</html>
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Re: followed tutorial get this error

Postby Izzy » 10. February 2009 13:55

painfree wrote:...all test are good except las t one which I am not sure how to do but this is the source
Can you tell me in more detail what you mean and what was the last test that you were not sure how to do.
Remember you have to be my eyes because I can't see what you see or what you do from here.

You saw the XAMPP Welcome Page and you clicked on the demos and everything worked including the CD collection?

I think you mean you did not know what to do with the ADOdb demo - that's fine as long as you can see the Welcome page and all the demos worked when you clicked on them.


Now we are moving forward as Apache and MySQL are working as they should which is what you established by doing all those tests - your doing very well. :)



Next we will sort out WordPress.

painfree wrote: I also redownloaded wp1.7 took it out of file and changed the config file so now I get this error..
What did you type in the address bar of your browser to get this error?

Go to xampp\apache\logs and drag the error.log file into your text editor and look for the few lines that give the file not found error just after you get the message in your browser and paste them here - not the whole file just the last few lines with the [error] lines.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: followed tutorial get this error

Postby painfree » 10. February 2009 16:00

Thanks I appreciate you are working blind and I am working ignorant...The ADOdb demo assumption is correct, I didn't know what to do with it . I am really impressed that you can program to export exell! I appreciate the encouragement...

Okay this is the error in the the apache log file
[Tue Feb 10 07:17:37 2009] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/wordpress
painfree
 
Posts: 11
Joined: 09. February 2009 11:55

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 97 guests