Jump to content
PensiveOwl

Internal Server Error - InputfieldText not found

Recommended Posts

Hello,

Today I was playing around with one of my old websites. Specifically with http and https redirection through cPanel as I parked and redirected a new domain on top of the current one.
I  was able to see the home page and the website fully working.  I noticed that my current domain wasn't redirected properly as I could see the website as either http or https on all pages. I know I could have added a code to htaccess  file to achieve that, I just wasn't sure how was the Processwire initially configured and set up. Last time I did any updates was more than 2 years ago.

So I decided to check the processwire admin setup. Tried to log into my admin panel (using my custom admin login url/page) but nothing happened. Blank page. I simply could not access it. 
Then all of sudden I received that scary "Internal Server Error" :

" Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Error has been logged. Administrator has been notified.

Now my first instinct was to check the .htaccess file. But no matter what I did (modifying, restoring from backup, deleting) nothing happened.

Then I went to site/config.php file and updated the $config->debug = true;  (instead of false) to see the error messages.
Here we go: 
"
Fatal error: Class 'ProcessWire\InputfieldText' not found in /home/edwbst/public_html/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module on line 17
Warning: class_parents(): Class InputfieldPassword does not exist and could not be loaded in /home/edwbst/public_html/wire/core/Functions.php on line 804
Warning: in_array() expects parameter 2 to be array, boolean given in /home/edwbst/public_html/wire/core/Functions.php on line 805

"
My web host is using the PHP Version 7.0.26, MariaDB 10.1.28 , and I believe the Processwire version used is from September 2015. 

I'd appreciate any insights on this error.
Thank you!
Ian

Share this post


Link to post
Share on other sites

The mixture of namespaced and namespaceless class names looks a bit worrying. Might be an incomplete update (through FTP?) since InputfieldPassword seems to be namespaced but Functions.php not. I'd download everything to a local machine, get things running there, update that copy to a halfway recent PW3 version (>= 3.0.33) and see if that helps.

  • Like 1

Share this post


Link to post
Share on other sites

You could try:

Uncommenting this line in your .htaccess: https://github.com/processwire/processwire/blob/master/htaccess.txt#L92

Delete site/assets/cache folder contents

Check site/assets/logs for additional hints what went wrong

Check $config->httpHosts in site/config.php

As a last resort, find out which version you had installed, and overwrite the entire wire folder with the same version. (use $config->version somewhere in your templates to find out which one you have installed). Backup the old wire folder (rename it), just in case. e.g. if you had v. 2.6.1, grab the wire folder from here https://github.com/ryancramerdesign/ProcessWire/tree/2.6.1

And finally... you could download the entire site, clone the DB, and try to make it run locally. But this shouldn't really be necessary.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for getting back to me so promptly!
I'll give it a try then.

One quick question, what values should be in the site/config.php,  $config->httpHosts  line? What I have now is the domain name with and without www.  I don't think any changes are required there.

No additional errors found in the site/assets/logs errors.txt file.
It seems that the Processwire version used is 2.6.18.

Thanks for now..

Share this post


Link to post
Share on other sites
7 hours ago, PensiveOwl said:

It seems that the Processwire version used is 2.6.18.

In that case, you almost definitely have a mixture of versions in your wire directory. It would probably be easiest to rename the wire directory on the server, re-download 2.6.18 from github at https://github.com/ryancramerdesign/ProcessWire/archive/8964c2d0b5f7d3445adcc5d91467f6117ef0d4fb.zip and upload just the wire directory (make sure to backup the db, though).

  • Like 1

Share this post


Link to post
Share on other sites

Hi guys,

BitPoet, you were right, it was a mixture of versions/namespaces in the wire folder. I replaced that and now everything works! 
I was able to update the entire website to the latest Processwire v. 3.0.62.

Thank you all for your help!
Ian

  • Like 1

Share this post


Link to post
Share on other sites
On 1/21/2018 at 5:05 PM, PensiveOwl said:

Thank you for getting back to me so promptly!
I'll give it a try then.

One quick question, what values should be in the site/config.php,  $config->httpHosts  line? What I have now is the domain name with and without www.  I don't think any changes are required there.

No additional errors found in the site/assets/logs errors.txt file.
It seems that the Processwire version used is 2.6.18.

Thanks for now..

you may refer this : https://processwire.com/docs/start/variables/config/#httphosts

Share this post


Link to post
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.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By JMH
      Hi all,
      I'm trying to upload an image to a blog post. The ProcessWire blog editing page is relatively simple. See attached. When I try to add more images and publish the post an internal server error is returned and a blank space is where the additional images should be. 
      Can anyone advise on how this can be resolved quickly.
      Please let me know any additional information you'd need. 
      Many thanks.
      JMH 
       


    • By ngrmm
      there is a pagination (next|prex) at the end of the page
      i want to hide next on the last page of the siblings and hide prev on the first
      <?php if($page != $pages->get(1019)->children->first()) { echo "<a class='link prev' href="$page->prev->url">"; foreach($page->prev->image as $image) { $thumb = $image->height(60); echo "<div><img src='$thumb->url'/></div>"; } $test = $page->prev; echo "<span> $test->title </span>"; echo "<span class='date' > $test->teaser_date </span>"; } echo '</a>' if($page != $pages->get(1019)->children->last()) { echo "<a class='link next' href="$page->next->url">"; foreach($page->next->image as $image) { $thumb = $image->height(60); echo "<div><img src='$thumb->url'/></div>"; } $test = $page->next; echo "<span> $test->title </span>"; echo "<span class='date' > $test->teaser_date </span>"; } echo "</a>"; ?> line 3: echo "<a class='link prev' href="$page->prev->url">"; is causing the error but i don't know why
    • By Rachid Finge
      I'm building a smartphone app that allows users to record a voice clip and send it to our server, which runs ProcessWire. Files are sent over HTTPS Post, currently without any sort of authentication.
      I've succeeded using the WireUpload class to fetch the uploaded file from the $_FILES super global. Where I get in trouble is when I try to add the audio file to the audio page, where there's an Input field called 'audiofile'. Whenever I try to use any file related method, an Internal Server Error occurs.
      Here's my code, which runs in the page's template.
      <?php Header("Content-Type: text/plain"); $upload_path = $config->paths->assets . "files/audio/"; $u = new WireUpload('files'); $u->setMaxFiles(1); $u->setOverwrite(false); $u->setValidExtensions(array('mp3', 'mp4', 'm4a')); $u->setDestinationPath($upload_path); // I can confirm through my FTP client that the file sent through POST actually shows up in the $upload_path location. $fileresult = $u->execute(); // This is the File input field in my template. Doing print_r($audiofield) confirms this is an existing object. $audiofield = $fields->get("audiofile"); // Trying this for the heck of it, but all that results is HTTP 500. $audiofield->deleteAll(); foreach($fileresult as $filename) { // I've seen various examples on what to do now. Here's one that causes a 500 error. $page->'audiofile' = $upload_path . $filename; // This seems the most logical thing to do, but also causes HTTP 500. $audiofield->add($upload_path . $filename); // Unlinking succeeds (given that I comment out the lines that cause the HTTP 500 errors) unlink($upload_path . $filename); } // We never get to this phase. $page->save(); ?> Things of note:
      Server runs PHP 5.4.4-14+deb7u8 on Debian with Apache/2.2.22.  File uploading through the admin on the audio page works without issues, also when uploading multiple files at once or sequentially. I've confirmed the owner of $upload_path to be www-data and its permissions to be 755. What's the final step I'm missing to add the audio file to the input field on my page?
    • By benjaminE
      Hello,
      I was having some trouble installing modules (they weren't showing up in the module manager) and so I deleted the contents of the folder site > assets > cache in the hope of fixing this problem.
      However, having done this any page I try to navigate to on the site (including the root /index.php) throws up a 500 Internal Sever Error.
      Does anyone have any idea about what might have gone wrong here? It's slightly worrying...
      Many thanks in advance for any help.
      b
    • By Tigro
      Hello,
      I'm still a beginner when it comes to ProcessWire. Yesterday I installed on a server PW (checkdomain.de) (PHP 5.4.16). I had to install only the small problem with "Options + FollowSymLinks" I had to comment out in the htaccess. The PHP version I have on 5.4. updated.
       
      If I logging me in the admin area and would like to edit a page, I get the store a "Internal Server Error"
       
      Does anyone have an idea what it could be?
×
×
  • Create New...