LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Debian Etch, Wordpress+mysql: setup-mysql script = permission denied (https://www.linuxquestions.org/questions/linux-server-73/debian-etch-wordpress-mysql-setup-mysql-script-%3D-permission-denied-800487/)

oznola 04-06-2010 11:20 PM

Debian Etch, Wordpress+mysql: setup-mysql script = permission denied
 
hi,

i am installing wordpress on debian etch. i have followed the instructions on this link...
http://linux.justinhartman.com/Wordp...tion_on_Debian

everything is fine until i reach Enable Your New Sites where i am instructed to run
Quote:

a2ensite www.example.com
a2ensite example.com
/etc/init.d/apache2 restart
then i get these warnings...
Quote:

bubba:/var/www# a2ensite www.alonzofretwell.com
Enabling site www.alonzofretwell.com.
Run '/etc/init.d/apache2 reload' to activate new configuration!
bubba:/var/www#
bubba:/var/www# /etc/init.d/apache2 reload
Reloading web server config: apache2.
bubba:/var/www# a2ensite alonzofretwell.com
Enabling site alonzofretwell.com.
Run '/etc/init.d/apache2 reload' to activate new configuration!
bubba:/var/www# /etc/init.d/apache2 reload
Reloading web server config: apache2[Tue Apr 06 18:27:03 2010] [warn] VirtualHost 24.234.112.226:80 overlaps with VirtualHost 24.234.112.226:80, the first has precedence, perhaps you need a NameVirtualHost directive
i think i can ignore the warning but i would rather turn it off if someone can tell me how.


next i am instructed to Setup MySQL Database & Wordpress Config File where i am suppose to run...
Quote:

/usr/share/doc/wordpress/examples/setup-mysql -n example example.com
...where exmple is replaced with my <site>.

i get this error...
Quote:

bubba:/var/www# /usr/share/doc/wordpress/examples/setup-mysql -n alonzofretwell alonzofretwell.com
bash: /usr/share/doc/wordpress/examples/setup-mysql: Permission denied
bubba:/var/www#
(observe i get this event hough i am root)

subsequently i have tried to setup the database and config file using phpmyadmin to try and finish the install. however when i try to go through the final steps of the wordpress setup i get...

Quote:

Warning: require_once(/etc/wordpress/config-alonzofretwell.com.php) [function.require-once]: failed to open stream: No such file or directory in /etc/wordpress/wp-config.php on line 6

Fatal error: require_once() [function.require]: Failed opening required '/etc/wordpress/config-alonzofretwell.com.php' (include_path='.:/usr/share/php:/usr/share/pear') in /etc/wordpress/wp-config.php on line 6
when i load http://alonzofretwell.com.

it appears that the error related to the failure of this step where i was suppose to setup a new database and create a config file at /etc/wordpress/config-example.com.php but got "permission denied" even though i am root.

please advise.

Sayan Acharjee 04-06-2010 11:26 PM

Quote:

Originally Posted by oznola (Post 3926962)
hi,

i am installing wordpress on debian etch. i have followed the instructions on this link...
http://linux.justinhartman.com/Wordp...tion_on_Debian

everything is fine until i reach Enable Your New Sites where i am instructed to run


then i get these warnings...


i think i can ignore the warning but i would rather turn it off if someone can tell me how.


next i am instructed to Setup MySQL Database & Wordpress Config File where i am suppose to run...

...where exmple is replaced with my <site>.

i get this error...
(observe i get this event hough i am root)

subsequently i have tried to setup the database and config file using phpmyadmin to try and finish the install. however when i try to go through the final steps of the wordpress setup i get...

when i load http://alonzofretwell.com.

it appears that the error related to the failure of this step where i was suppose to setup a new database and create a config file at /etc/wordpress/config-example.com.php but got "permission denied" even though i am root.

please advise.

You need to create a mysql database first and then open the wp-config.php file, specify the database name, username, password, hostname in that file. Then call this folder (where you installed wordpress)from your browser and follow the instructions on screen.

oznola 04-06-2010 11:41 PM

hi,

i have posted the contents of /usr/share/wordpress/wp-config.php because it is quite short. i don't see where i am suppose to add the things you mentioned. i have created the database using myphpadmin.

and i am trying to track down the README.Debian file wp-config.php refers to.

Quote:

<?php
/** WordPress's Debianised default master config file
Please do NOT edit and read about how the configuration works in the README.Debian
**/

require_once('/etc/wordpress/config-'.strtolower($_SERVER['HTTP_HOST']).'.php');

define('ABSPATH', '/usr/share/wordpress/');

require_once(ABSPATH.'wp-settings.php');
?>
the comment the file is somewhat confusing but i get it. :)

Sayan Acharjee 04-07-2010 12:04 AM

Quote:

Originally Posted by oznola (Post 3926975)
hi,

i have posted the contents of /usr/share/wordpress/wp-config.php because it is quite short. i don't see where i am suppose to add the things you mentioned. i have created the database using myphpadmin.

and i am trying to track down the README.Debian file wp-config.php refers to.



the comment the file is somewhat confusing but i get it. :)

Let me tell you first I never installed wordpress on a debian box, I usually put the folder in my document root and create a database in mysql, make the changes in wp-config.php and call that location from browser and it works every time.
Your wp-config.php is different from what I have in my system.
Here is my wp-config.php file:

Quote:

<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information b y
* visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'quiz');

/** MySQL database username */
define('DB_USER', 'test');

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

/** 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 https://api.wordpress.org/secret-key/ 1.1/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @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');
/**#@-*/

/**
* 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. */

/** 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');

oznola 04-07-2010 12:14 AM

the error that is reported when i try to run the wordpress setup appears to be a result of the failure to create the database and config file the debian wordpress install expects when it runs wp-config.php as is.

i dare not change my wp-config.php because of the warning in its comments. and because the architecture of my debian wordpress install appears to be significantly different from yours.

instead i am trying to track down the reason i get "permission denied" when i run /usr/share/doc/wordpress/examples/setup-mysql

but ty for offering the contents of your wp-config.php. :)

XavierP 04-07-2010 06:32 AM

Have you looked through the WordPress Codex? That has a wealth of information on getting started. I would suggest the following sites to begin with:
http://codex.wordpress.org/New_To_Wo...Where_to_Start
http://codex.wordpress.org/Getting_S...s#Installation
http://codex.wordpress.org/Getting_S...oting_and_Help

There are many more docs and they should be pleanty to get you started and give you an undersatnding of the steps to take.

Lowell1947 04-07-2010 01:25 PM

I've got several instances of wordpress and drupal running on my server. It is a debian based server.
The first thing I do is create a new database through phpmyadmin.
Then I open the wordpress folder I've downloaded from their site. I take the file called wp-config-sample.php, open it, enter the appropriate db information and save it as wp-config.php. Then I upload the entire contents of the wordpress folder to my root folder on the apache server, in my case /var/www/example/.
Once it is uploaded you simply call the site up in your browser and follow the instructions.
The whole process shouldn't take more than five minutes.

oznola 04-07-2010 02:58 PM

ty to everyone who suggested the wordpress codex and instructions at wordpress.org.

over the past few months i have run those instructions and studied the wordpress codex.

however, i was unable to get custom permalinks to work on my debian etch server.

subsequently i have removed the original 5min install and its databases and tried to use the debian package manager apt-get in the hopes that the apt-get script would do a better job of updating the necessary files and so-forth.

i need to rephrase my question to get this issue resolved because it is a mysql issue not a wordpress issue.:hattip:

oznola 04-07-2010 05:47 PM

this was the solution...
http://www.linuxquestions.org/questi...m-root-800647/

GrapefruiTgirl 04-07-2010 08:08 PM

oznola,

I have updated your thread's title per your thoughts in Post #8; if there's any problem with the rename, feel free to contact me or hit the REPORT button and suggest a different/better title.

EDIT: Updated title again per suggestion by the OP.

Cheers!
Sasha


All times are GMT -5. The time now is 11:56 AM.