Jump to content

Help - Error messages after mods


Recommended Posts

Hi All,

I have made a relatively minor change to my set up and find that I can not log in to admin.

Eg.

Legend Skin.

In the 'Shop by Category' box I have changed the header title by modifying

>language>en>lang.inc.php (Just changed the text)

The new title shows up on the web page OK but if I then try to access admin I get error messages as below.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/xx/dxxxxxxx/htdocs/xxxxxxx/language/en/lang.inc.php:1) in /homepages/xx/dxxxxxxx/htdocs/xxxxxxx/admin/includes/auth.inc.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /homepages/xx/dxxxxxxx/htdocs/xxxxxxxx/language/en/lang.inc.php:1) in /homepages/xx/dxxxxx/htdocs/xxxxxxx/admin/includes/auth.inc.php on line 48

I notice that lang.inc.php appears to be 68K on my computer and 65K on the server?

I have had similar error messages if I have changed other things and can restore normal admin operation by uploading the relevant file from the original install folder.

Is it OK to set my FTP client to auto detect or should I set to ACSII OR binary?

thanks for reading about my problem.

Link to comment
Share on other sites

Hopefully you still have lang.inc.php on your local machine. What did you use to edit the file? Was a simple text editor, or a WYSIWYG Web page editor. If the latter, maybe the standard web page top end was added.

The text editing itself, did you add any apostrophe's or quotes to the text? Did the text editor accidentally remove the <?php from the first line?

Link to comment
Share on other sites

Thanks for the reply.

When I restore lang.inc.php to the original everything goes back to normal.

I have been using MS Expressions Web and have made sure that I only changed the text within the quotes.

I have tried the mod again with HTML Pad and have the same error messages when I try to login to admin.

As a further test I have copied my site from the server to my computer and this particular file (lang.inc.php)remains at 65K on the server but has become 68K on my computer? :homestar: Although I don't think that this is the cause of the problem.

It is as though some other script is expecting to see the original text and throws up the error.

Update: If I transfer the files with WS FTP the file size increases. If I do the same with Wise FTP it doesn't so it seems WS FTP is the culprit.

Has anyone else had similar problems?

Apologies to mods: This is starting to drift away from skins and templates.

Link to comment
Share on other sites

I think Expression Web is what's sabotaging your file. Try NotePad. (I firmly believe Expression Web is just a fancier FrontPage.)

With a file like lang.inc.php (many, many short or blank lines), when the editor opens the file, the editor may convert Unix <LF> to MS-DOS <CR><LF>. Now, *maybe* WS-FTP also makes this modification, but as I use this program myself, I have not known WS-FTP to do this.

Considering the file is 3000 lines long, adding this one extra byte is your extra 3K filesize.

Link to comment
Share on other sites

Thanks again for your reply.

I have been trying different scenarios.

If I open my site in WS FTP and drag and copy the file lang.inc.php onto my desktop the size increases

The original file size is 66,688 bytes(as installed) and after dragging and dropping it is 69,665 bytes on desktop.

The transfer method is set to auto which should send .php files by acsii.

If I do the same thing with wiseFTP the file stays at 66,688 bytes

Dave

Update: By default WSFTP transfers .php files as acsii.

If I transfer by binary the file size doesn't alter. Also, there are 2978 lines in lang.inc.php which means 2977 <CR> and the difference in file sizes is.....2977bytes.

Well spotted bsmither.

The question now is. Should .php files *normally* be sent by acsii or binary?

Link to comment
Share on other sites

ASCII. What is the version of WS_FTP you are using? (If uploading the *entire* CC package, there are images that must go up in binary. So set your FTP client to Auto.)

In WS_FTP program options, transfers, .php files are automatically transfered as ASCII if the site options is set to auto.

Now, I use WS_FTP 9.01 (2004) which probably didn't have a feature - apparently added since - that automatically converts the ASCII newline separator to/from the server system and your local system. For ASCII files, this is really no big thing. And this is not the cause of your immediate problems.

Just make sure that the first line of this file is (using NotePad):

<?php

Link to comment
Share on other sites

Thanks again for your help.

I was using the latest version of WS-FTP but have ditched it and gone back to v9.01.

I can now do the text changes I wanted and everything works OK.

Using the new version:

If I transfer a .php file from remote to local the size increases by (number of lines -1) bytes

If I then transfer the file back the size stays increased.

Using v9.01:

If I transfer a .php file from remote to local the size increases by (number of lines -1) bytes

If I then transfer the file back the size reverts back to the original size.

Although this may not be the primary cause of the original problem I can now at least make the changes i want.

Link to comment
Share on other sites

Guest estelle

The error message indicates what file the problem is in - in this case the problem is the modified language/en/lang.inc.php file.

This problem is caused by some characters (e.g. spaces or newlines) added before the <?php at the start of the file, or more commonly after the ?> at the end of the file.

The two characters - ?> - must be the very last two characters in the file! You cannot have any spaces or newline characters after it.

It has nothing to do with uploading/downloading ascii/binary etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...