That almost seems like PHP is not correctly configured.
Also, my line 288 in wp-db.php does NOT have the function preg_match though that function is on line 287.
Check with your host. Also make sure you have a good set of WordPress files uploaded–even if you have to delete and reupload.
Uploading_WordPress_to_a_remote_host
This is my line 288:
if ( preg_match("/^\\s*(insert|delete|update|replace) /i",$query) ) {
Furthermore:
PHP is configured correctly as other scripts run without any errors.
And:
The files were uploaded for the first time- there is no re-upload.
It is the German version, readme.html dated 26.4.2008
Any ideas?
Just downloaded the http://de.wordpress.org/wordpress-2.5.1-de_DE.zip verson and that line you are talking about is line 287, not 288, at least in that distribution.
OK, I’ll download it again and make another try.
Forgot to recommend that you are using ASCII mode when using FTP or automatic mode if using FileZilla.
Uploading_WordPress_to_a_remote_host
Now:
file you mentioned uploaded, result is different, well not really:
Fatal error: Call to undefined function preg_match() in /usr/home/domain/htdocs/wp-includes/wp-db.php on line 287
Files are uploaded in correct mode, did .PHP again manually in ASCII mode to be really sure, result is the same.
OK, maybe the bug is in the MySQL, therefor here is how the database was created:
# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 171 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost"
-> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.04 sec)
Any idea?
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
A guess, but I think your PHP5 install is not complete.
If you run “pkg_info | grep php5” and don’t see pcre in the listed output then try installing the FreeBSD 6.2 package for php5-pcre.
That should include the preg functions and get you past that error.
Output:
pkg_info | grep php5
php5-5.2.4_1 PHP Scripting Language
php5-mysql-5.2.4_1 The mysql shared extension for php
php5-pcre-5.2.4_1 The pcre shared extension for php
…after having installed php5-pcre.
Result is just the same:
Fatal error: Call to undefined function preg_match() in /usr/home/domain/htdocs/wp-includes/wp-db.php on line 287
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Well, that is as far as my FreeBSD experience goes I’m afraid.
You’re installation is definitely missing something but I’m out of ideas as to what that is.
Good luck.
Problem solved after rebooting the machine.
Thanks for your help!