WordPress error on Instal

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

WordPress error on Instal

Postby DarkenedHart » 21. January 2009 15:44

WordPress 2.7 (newest install version)
XAMP (Full) Newest Version ( on c:\xamp\ )
Windows Vista Home Premium SP1
Toshiba Satellite P205D Laptop
Primary Browser: Firefox 3

Error Reads: Parse error: parse error in C:\xampp\htdocs\wordpress\wp-config.php on line 77

Notes:

I am generally new to php code. Working with WordPress themes has been a serious education in trying to read them as I am trying to get WordPress to run as a CMS and work with my designs.

Thus the install on my personal machine, so i can test things before uploading them live.

I tried the XAMP Lite and got several previous problems with the install, etc. So I decided to download the full version and install that. The full version /seemed/ to install fine. There was one error in regards to Vista warning me about allowing Apache access (which was allowed).

I set up the database as describe in multiple tutorials online for using WordPress and Xamp. That worked fine.

I edited the WP config file, as described in the tutorials ( which is the same as a regular install). It was very much like setting it up on my site's own host and should have worked. *~ Database name, root, localhost, no password (blank)

But when I open the site link ( http://localhost/wordpress/wp-admin/install.php ) it throws the above error! So yes I am confused

I look at it in Dreamweaver (which I know sometimes adds extra code) and in notepad (hard to read the code that way) and couldn't find why it was giving me the exception. Line "77" is blank. When the "blank line" is removed the error reads a "parse error" for the next line up.
DarkenedHart
 
Posts: 2
Joined: 21. January 2009 15:25

Re: WordPress error on Instal

Postby Wiedmann » 21. January 2009 15:56

Working with WordPress

Maybe a WordPress support-/user forum is a better playce for your question?

in notepad (hard to read the code that way)

You can use e.g. "Notepad++" to edit your PHP files.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: WordPress error on Instal

Postby DarkenedHart » 21. January 2009 15:59

I wasn't sure if it was something I did with the Xamp install. Or if I was mucking about with the database in some way thatit wasn't reading the php code right? I have a hand at doing silly things. Like thus....

*head desk* *thump*

Two single quotes, not a single double quote in password field. *sighs* Sorry to bother you folks with this.

Okay, as I said I am very new to PHP code. I'm more of a CSS junkie with a lot more experience with html and some xhtml. I try to keep up to date with such advances in usability, and W3C work. I'm not much of a coder sadly.

Working with Themes requires one to learn.

My hard lessons in PHP equate to the following: You have to escape double quotes or you kill your php with errors. And now, be aware of what kinds of quotes you use and where. >.<

Thank you.
DarkenedHart
 
Posts: 2
Joined: 21. January 2009 15:25

Re: WordPress error on Instal

Postby dmphotography » 22. January 2009 00:07

DarkenedHart wrote:
Error Reads: Parse error: parse error in C:\xampp\htdocs\wordpress\wp-config.php on line 77

Notes:

I look at it in Dreamweaver (which I know sometimes adds extra code) and in notepad (hard to read the code that way) and couldn't find why it was giving me the exception. Line "77" is blank. When the "blank line" is removed the error reads a "parse error" for the next line up.


I'm no whiz at PHP myself, but I've learned quite a bit about it so let me try to help you a little on understanding it.

Dreamweaver doesn't add anything extra to a document unless it was created with it and then it'll add the appropriate header/footer tags according to the document type.

In PHP, when you get an error on Line 77, the error is almost always on a previous line and not the actual line 77. Since your line 77 is blank, it doesn't make any difference if it's there or if you remove it. The problem could be on line 76, which should have the following according to my wp-config.php file for WordPress:
Code: Select all
?>


That is the closing tag stating the end of the PHP code for that document.
The next problem might be if the ";" is missing off the end of line 75. When writing PHP code and getting the the "Error on Line 77 or whichever line it is, it's often because the ending statement, ";" was left off on the previous line of code.

Blank spaces between lines do not make any difference in a PHP document either. It can be as many lines as desired or none at all. It's more about making it easy to read and troubleshoot for the creator.

I would recommend verifying that your MySQL IS running by looking at your XAMPP control panel and then making sure your database information is correct. WordPress is just about the easiest thing to install on your XAMPP server, so the problem is just a matter of something not being quite right with your settings.
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: WordPress error on Instal

Postby Izzy » 22. January 2009 03:12

@DarkenedHart
DarkenedHart wrote:The full version /seemed/ to install fine. There was one error in regards to Vista warning me about allowing Apache access (which was allowed).
Did you run http://localhost and all the demos on the XAMPP Welcome Page to test your installation?

DarkenedHart wrote:...It was very much like setting it up on my site's own host and should have worked. *~ Database name, root, localhost, no password (blank)
Never use the super user root as a user for a database or you will open a very serious security hole and if these so called "tutorials" advise you otherwise then they are not credible and should be ignored. Using root in a database as a username is a big NO! NO!

I wrote some replies for other members outlining how to install WP perhaps they will help you also and a search for wordpress in the XAMPP for Windows forum using Author Izzy or Sharley perhaps or leave the Author field blank, may find other references to this subject - although in fact this an XAMPP forum not a Wordpress forum the subject has been raised many times before.
http://community.apachefriends.org/f/viewtopic.php?t=20278

DarkenedHart wrote:But when I open the site link ( http://localhost/wordpress/wp-admin/install.php ) it throws the above error! So yes I am confused
DW may be not using the correct line endings so as a test use Notepad to make you edits and save the file in the usual way.

DarkenedHart wrote:...and in notepad (hard to read the code that way)
Turn off word wrap in note pad to make it easier to read and quicker to edit than DW.

Or as suggested use a better text editor by searching Google for a free text editor if you don't want to outlay any dosh - I use Note Tab Pro not free but good and others of course.

Never use anything that remotely resembles a word processor or that may use the rich text format, use a plain old simple text editor for editing configuration or ini files in XAMPP.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 34 guests