Answers.Body: <p>Brad, Thank you again for your help.</p>
  
  <p>I found the problem, although I'm not sure of "why". In my service file, I have this line:</p>
  
  <pre><code>$email-&gt;body = craft()-&gt;templates-&gt;renderString($settings-&gt;welcomeEmailMessage, ['firstName' =&gt; $contact-&gt;firstName]);
  </code></pre>
  
  <p>After digging though log file(s), I found the error. "Unexpected '['"</p>
  
  <p>It needed to be this:</p>
  
  <pre><code>$email-&gt;body = craft()-&gt;templates-&gt;renderString($settings-&gt;welcomeEmailMessage, array('firstName' =&gt; $contact-&gt;firstName));
  </code></pre>
  
  <p>Because everything was working perfectly on my local machine, (newer version of php) I wonder if that's the root cause.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-07T04:29:22.950Z
Answers.Text: Yup... the `[]` is PHP 5.4+ [short array syntax](https://secure.php.net/manual/en/migration54.new-features.php). Your production box probably has PHP 5.3, which doesn't recognize it.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-07T04:22:30.367Z
Answers.LastActivityDate: 2015-08-07T04:22:30.367Z
Answers.UserDisplayName: Damon
Body: <p>I'll start off by saying my plugin is working perfectly locally. The problem is when I upload to my server. My plugin is for a contact form. It handles the submission, and logs the entry in the db.</p>
  <p>I have a page in the CP for it as well - this is the page that is giving me the white screen.</p>
  <p>With <code>devMode</code> I am seeing this in the logs:</p>
  <pre><code>[error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /path-to-my-site/craft/app/controllers/TemplatesController.php:59
  </code></pre>
  <p>So I looked up that file, and to me it seems that the system can't find a template?</p>
  <p>I don't get any errors - although when I try to submit my form, I do get a 500 error. Could it be a permissions problem?</p>
  <p><strong>EDIT</strong></p>
  <p>Everything else in the entire site/app is working perfectly, so I know it's something with the plugin page.</p>
  <p>My plugin &quot;settings&quot; page renders/works fine. It's when I click on the top &quot;tab&quot; to access my plugin's page within the CP that fails.</p>
  <p><strong>EDIT 2</strong></p>
  <p>I'm wondering if it's a case-sensitive thing now though. I don't see that exact error in the log file anymore.</p>
  <p>I know with CodeIgniter, locally things work great, but when I upload to my server (CentOS) I get white screens. It's because of the case is all strange.</p>
  <p>I have followed the suggested guidelines for plugin development:</p>
  <pre><code>controllers
      ContactFormPlugin.php
      controllers
          ContactFormController.php
              class ContactFormController extends BaseController {...}
      models
          ContactFormModel.php
              class ContactFormModel extends BaseModel{...}
  
     records
          ContactFormRecord.php
              class ContactFormRecord extends BaseRecord{...}
     
     resources
          ...
  
     services
           ContactFormService.php
               class ContactFormService extends BaseApplicationComponent {...}
  
     templates
         ...
  
     variables
         ContactFormVariable.php
             class ContactFormVariable {...}
  </code></pre>
  <p>...and so on.</p>
  <p>My host is Rackspace, has anyone experienced this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-06T17:40:11.070Z
Comments.Text: What's the stack trace of the 500 error?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-06T17:54:46.420Z
Comments.Text: It's an ajax submit, so it's just javascript trace through jQuery. I have updated my question...I think it might be something else?
Comments.UserDisplayName: Damon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-06T18:05:26.997Z
Comments.Text: Could be case sensitivity.  Can you share the class names as well?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-06T19:11:38.407Z
Comments.Text: Hrm... that looks O.K. to me.  Anything in your Apache error logs?
Comments.UserDisplayName: Brad Bell
Tags: <plugin-development><error-message>
Title: Plugin CP page causes white screen
ThreadText: # Plugin CP page causes white screen
  
  (Asked by: username_0 on 2015-08-06)
  
  I'll start off by saying my plugin is working perfectly locally. The problem is when I upload to my server. My plugin is for a contact form. It handles the submission, and logs the entry in the db.
  
  I have a page in the CP for it as well - this is the page that is giving me the white screen.
  
  With `devMode` I am seeing this in the logs:
  
  ```
  [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /path-to-my-site/craft/app/controllers/TemplatesController.php:59
  
  ```
  
  So I looked up that file, and to me it seems that the system can't find a template?
  
  I don't get any errors - although when I try to submit my form, I do get a 500 error. Could it be a permissions problem?
  
  **EDIT**
  
  Everything else in the entire site/app is working perfectly, so I know it's something with the plugin page.
  
  My plugin "settings" page renders/works fine. It's when I click on the top "tab" to access my plugin's page within the CP that fails.
  
  **EDIT 2**
  
  I'm wondering if it's a case-sensitive thing now though. I don't see that exact error in the log file anymore.
  
  I know with CodeIgniter, locally things work great, but when I upload to my server (CentOS) I get white screens. It's because of the case is all strange.
  
  I have followed the suggested guidelines for plugin development:
  
  ```
  controllers
      ContactFormPlugin.php
      controllers
          ContactFormController.php
              class ContactFormController extends BaseController {...}
      models
          ContactFormModel.php
              class ContactFormModel extends BaseModel{...}
  
     records
          ContactFormRecord.php
              class ContactFormRecord extends BaseRecord{...}
     
     resources
          ...
  
     services
           ContactFormService.php
               class ContactFormService extends BaseApplicationComponent {...}
  
     templates
         ...
  
     variables
         ContactFormVariable.php
             class ContactFormVariable {...}
  
  ```
  
  ...and so on.
  
  My host is Rackspace, has anyone experienced this?
  
  **Tags:** plugin-development, error-message
  
  > **Comments:**
  > **username_1**: What's the stack trace of the 500 error?  
  > **username_0**: It's an ajax submit, so it's just javascript trace through jQuery. I have updated my question...I think it might be something else?  
  > **username_1**: Could be case sensitivity.  Can you share the class names as well?  
  > **username_1**: Hrm... that looks O.K. to me.  Anything in your Apache error logs?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-08-07. Score: 3 | Accepted answer
  
  username_1, Thank you again for your help.
  
  I found the problem, although I'm not sure of "why". In my service file, I have this line:
  
  ```
  $email->body = craft()->templates->renderString($settings->welcomeEmailMessage, ['firstName' => $contact->firstName]);
  
  ```
  
  After digging though log file(s), I found the error. "Unexpected '['"
  
  It needed to be this:
  
  ```
  $email->body = craft()->templates->renderString($settings->welcomeEmailMessage, array('firstName' => $contact->firstName));
  
  ```
  
  Because everything was working perfectly on my local machine, (newer version of php) I wonder if that's the root cause.
  
  > **Comments:**
  > **username_1**: Yup... the `[]` is PHP 5.4+ [short array syntax](https://secure.php.net/manual/en/migration54.new-features.php). Your production box probably has PHP 5.3, which doesn't recognize it.  
  
  ---
  
  