masonk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: where’s the error log, I can’t approve commentsI’m able to edit, delete, unapprove, and otherwise change comments using WordPress. The only thing I can’t do is approve them. This implies that my database is working correctly and that the issue is on WordPress’s end. I’ll keep checking back here for details.
By the way, I found the error log (it was just Apache’s log, I thought WP generated its own log for some crazy reason).
Forum: Fixing WordPress
In reply to: where’s the error log, I can’t approve commentsI managed to get the comments approved by editing the comments_approved field in the comments table. However I’m still unable to do it programmatically. I’m sure someone here can tell me where the logfiles are, even if they have no suggestions for my problem. Thanks in advance.
Forum: Installing WordPress
In reply to: wp-admin/install.php script hangsrleighton. I have a workaround for this problem.
The php file that causes a random password to be generated for the admin account during the installation process is located at: <Blogfolder>/wp-admin/includes/upgrade.php. The specific line that causes this behavior is 61. You can comment out that line and cause the password to be something that you specify instead of a randomly generated password. When it creates the table, it will create it with the password that you chose, and this will let you login the first time. After that I haven’t had any problems. Change 61 to these two lines:
// $random_password = wp_generate_password();
$random_password = "my_special_password";
It will still hang, but it will have created the admin account with the password that you specify. Wait 5-10 seconds after running the script, then refresh the page and login with that password.
samboll – your suggestion doesn’t make much sense; maybe you don’t understand what the problem is. The problem is that the installation script hangs and never reports what is the random password that it generated. Since the password is encrypted in the database, there is no way to login to the admin account that first time, and therefore, though the installation is successful despite the hang, it is useless.
I got it to work. I created a new .php file to test the command mysql_connect().
What worked was using ” (emptry string as the DB_HOST).
define('DB_HOST', '');
and having my php.ini line read:
mysql.default_socket = localhost:/opt/local/var/run/mysql5/mysqld.sock
Ahh, yes, I’m getting the “Error establishing a database connection” screen when I navigate to the wordpress site.
By the way, I’ve read a few blog posts about the socket being in the wrong place. Both say to update /etc/php.ini with the correct default mysql socket.
https://foolswisdom.com/mac-wordpress-error-establishing-a-database-connection/
https://www.fischerlaender.net/apple-mac/mac-os-x-trouble-with-mamp-mysql
However, my socket is at neither of those places. I think it’s here:
/opt/local/var/run/mysql5/mysqld.sock
. However, updating the php.ini file with that location (e.g. localhost:/opt/local/var/run/mysql5/mysqld.sock) doesn’t seem to fix the problem either.