Wordpress on XAMPP

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

Wordpress on XAMPP

Postby moschino » 03. July 2010 16:14

Hello,

I just installed XAMPP to edit my website offline and to not put it into maintenance mode.
The problem is that, the same website on XAMPP has a syntax error.
Then, I installed a clean wordpress 2.9.2. By using the default theme, it seems to work ok, but when I change to BlueGrey theme I get this error:
Code: Select all
Parse error: syntax error, unexpected T_ENDWHILE in E:\xampp\htdocs\wordpress\wp-content\themes\BlueGrey\index.php on line 35

The same theme on the public server has no error and the site works just fine.

Does anyone knows how to solve this problem?
moschino
 
Posts: 3
Joined: 03. July 2010 16:07

Re: Wordpress on XAMPP

Postby JonB » 03. July 2010 17:18

Its pretty hard to guess at something like that, but I suspect it really has nothing to do with XAMPP.

First -
I'd download a clean copy of the theme (clearly the exact same version of the theme) to your local machine, and then run a soruce code comparator. I use WinMerge, but many development environments can also compare source versions. There may have been an error in the download of the file.

If they are identical --

I can't think of any php or WordPress configuration options that would lead to that, other than php error suppression. If that code 'works' but has an error that does not affect execution - this could be the issue. PHP is very forgiving. In your XAMPP/php/php.ini search for an uncommented line beginning with 'error_reporting =' (it should be around line 514)

try using this value: (it will turn off notifications)
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

Also a few lines in the php.ini, down there is the value
display_errors = On

That may be set to Off on your host's server (i.e. no error messages are output -- this means you don't know if they exist if the code does not fail.). You can find the settings your host uses by either finding their settings in Help or an FAQ or uploading a phpinfo.php file into a public folder on your hosting account and executing it in your browser.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Wordpress on XAMPP

Postby moschino » 03. July 2010 18:07

Thanks for your fast reply,

I followed all your instructions, source versions are identical.
On the server "error_reporting" is set to Local Value: 6135, Master Value 6135 (I have no idea what are these numbers)
However, on my php.ini file I set "error_reporting" to E_ALL & ~E_NOTICE & ~E_DEPRECATED, but this didn't solve my problem.

About "display_errors", on the server is set to On. In my php.ini file was set to On too, however I followed your recommendation and I set it to Off, but again this didn't solve my problem.

Any other suggestions?
moschino
 
Posts: 3
Joined: 03. July 2010 16:07

Re: Wordpress on XAMPP

Postby Nobbie » 03. July 2010 20:21

moschino wrote:Any other suggestions?


Edit the mentioned file, go to the mentioned line and see whats wrong. Whatelse? Thats the idea of error messages.
Nobbie
 
Posts: 8772
Joined: 09. March 2008 13:04

Re: Wordpress on XAMPP

Postby JonB » 03. July 2010 20:30

Answer: D**bF**k theme developer

http://www.skinpress.com/bluegrey-theme-2/

If you are testing on localhost, you will frequently get this.
You need to change the short_open_tags to ON, in your local php.ini file.


I also have to say you should have checked the SOURCE of the theme. You would have immediately found the error in a Google search as I just did. It would also have been revealed by the phpinfo() that I suggested, in the Core Section - short_open_tag Off Off... enough said

Object lesson about PHP, when you write code for others "DON"T USE SHORT OPEN TAGS".

It may look good, but HE is a lazy, inconsiderate ass.

Good luck with your project.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Wordpress on XAMPP

Postby moschino » 04. July 2010 01:06

I knew about those topics, I found them on google. I tried before to turn short_open_tags to ON and I did it but did not solve the problem.
Now I searched again and I found there was another line set short_open_tags to OFF, so I turned this one too to ON.
Everything works now, thank you all.
moschino
 
Posts: 3
Joined: 03. July 2010 16:07


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 53 guests