Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re-naming Admin creates php errors

    I have twice created a new installation of Zen Cart 1.3.8a on GoDaddy linux hosting. This installation has the latest patches applied. Re-naming the admin folder has caused the following php errors when logging in to the admin control panel.

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by...
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent...
    Warning: Cannot modify header information - headers already sent by (output started at...

    AND restoring the original un-changed configure.php file and renaming the folder back to "admin" triggers the errors also.

    I have set the read/write status on the configure.php to 444.

    I used the directions for re-naming the admin folder found at the following url:
    https://www.zen-cart.com/tutorials/index.php?article=33

    What have I missed?

    Thank you,
    Teragram
    Last edited by teragram; 1 Feb 2010 at 03:51 PM.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Re-naming Admin creates php errors

    In your changes you have created a syntax error which is causing premature output from your site. The warning that you quote above, usually tells you where this output is coming from, but seems to have been chopped off in your post.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jan 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Re-naming Admin creates php errors

    Quote Originally Posted by kuroi View Post
    In your changes you have created a syntax error which is causing premature output from your site. The warning that you quote above, usually tells you where this output is coming from, but seems to have been chopped off in your post.
    I thought that might be the case the first time, which is why I un-installed and re-installed the application. It does not explain why the un-touched configure.php document also generates the same errors.
    And I was VERY careful to only change the the /admin/ parts. Using TextWrangler set to document type php showed no syntax errors.

    Teragram

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Re-naming Admin creates php errors

    Quote Originally Posted by kuroi View Post
    The warning that you quote above, usually tells you where this output is coming from, but seems to have been chopped off in your post.
    ..............?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Jan 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Re-naming Admin creates php errors

    Quote Originally Posted by kuroi View Post
    ..............?
    Here are the errors messages with the sensitive data expunged:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ...shop/admin/includes/configure.php:183) in ...shop/includes/functions/sessions.php on line 108

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at .../shop/admin/includes/configure.php:183) in ...shop/includes/functions/sessions.php on line 108

    Warning: Cannot modify header information - headers already sent by (output started at ...shop/admin/includes/configure.php:183) in.../shop/admin/includes/init_includes/init_templates.php on line 36

    Line 183 in the configure.php document is after the closing ?>
    It is a blank line. Could the blank line be causing the problem?

  6. #6
    Join Date
    Jan 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Re-naming Admin creates php errors

    Thank you kuroi,
    It was indeed a blank line at the end of the php code that was creating the problem.

    Teragram

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Re-naming Admin creates php errors

    The warning tells us that there is a problem at the end of your configure.php file (as you have confirmed). As the file is normally only half this length, the problem is probably due to a problem with the way in which the app which you are using to upload the file is configured. It's probably causing the file to be double-spaced by mishandling the invisible line end characters.

    If your configure file has a closing php tag at the end ("?>") then the problem would be that this doubling up has resulting in there being a non-printing character output after that tag. In which case, counter-intuitive though it may sound, simply deleting the tag would also have resolved the problem for you. In general, it's a good idea nowadays to leave the final php closing tag off the end of files specifically to avoid the problem that you had.

    https://www.zen-cart.com/tutorials/i...hp?article=313
    https://www.zen-cart.com/tutorials/index.php?article=87
    Last edited by kuroi; 1 Feb 2010 at 04:38 PM. Reason: Original written before seeing teragram's explanation
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. naming admin folder
    By shanesoine in forum General Questions
    Replies: 4
    Last Post: 29 Jan 2011, 04:07 AM
  2. admin creates order
    By balihr in forum Managing Customers and Orders
    Replies: 9
    Last Post: 7 Jul 2009, 04:16 PM
  3. Admin errors on fresh installation - module errors and language definition errors
    By etrader in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 5 Oct 2007, 09:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg