Cannot Edit WordPress Themes - Various Errors - php

Our WordPress 2.8.6 installation is returning multiple different errors when trying to edit theme files via wp-admin. The errors are as follows:
"Invalid index."
"The data area passed to a system call is too small"
"The parameter is incorrect."
We've tried deactivating all plugins to no avail. We also tried creating a blank "plugins" directory and also still experienced these errors. Some theme files we are able to edit (very few), but most give one of the three errors above. We also tried switching back to the WordPress Default theme with the same results.
This installation is running on a Windows 2003 Server, IIS 6, PHP 5.3.0, FastCGI 6.1.36.1, and MySQL 5.1.40-community.

Sounds like your IIS config is messed up.
Try posting on serverfault.com too, this is more of a server config problem than a programming problem I think.

Related

Xampp not showwing my projects in browser - htdocs folder

I used windows 10 as the operating system and I installed xampp it's been a long time and it chews well, until yesterday after an error in mysql.
So I looked for solutions on the internet and I finally solved the error by copying the files from C:\xampp\mysql\backup to C:\xampp\mysql\data.
then the service mysql is well marketed even as Apache.
PhpMyadmin chews well without a problem. phpmyadmin page shows, but my code, will not show.
The problem is: my old projects exist in htdocs only display "This page does not work" and "localhost" in the title head, and nothing loads from my project files.
Note: I used codeigniter as a framework.
Note: I can navigate to a new project but for existing projects beyond that it no longer works.
Thank you P.al
Use Directly like-
http://localhost/projects/form.html
Here your files should be inside C:\XAMPP\htdocs\Projects\yourfile.html
The error in your picture appear an php script error
Edit php.ini for display error and notice in browser
display_errors = on
save the php.ini restart apache and reload page.

Can't Access WordPress dashboard after update

I just updated a dev site I'm working on to the latest version of WordPress, immediately after doing so I can't access /wp-admin/
on /wp-admin/ I get this error on Chrome if DEBUG isn't turned on - "ERR_TOO_MANY_REDIRECTS"
Trying to access /wp-admin/admin.php I get a 404 error
If Debug is turned on in wp-config, I see the following on a blank page:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/*****/public_html/wp-includes/wp-db.php on line 1569
Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/wp-includes/wp-db.php:1569) in /home/heavy/public_html/wp-includes/pluggable.php on line 1216
I've tried removing all plugins, deleting HTACCESS & reverting it back to the default version, removing all customizations to functions.php, updated PHP version to 5.6 .. nothing is working.
Anyone have an idea of how I can further troubleshoot this?
Try in a different browser. Some browsers annoyingly cache redirects. The only way to truly find the underlying cause of this is to turn everything back to vanilla WordPress. 2017 theme, no plugins activated. Then systematically turn them back on to see which is causing the error. Often these kinds of errors are caused by poorly developed code "somewhere" in the code base (either as customisations within core WordPress files, which you should never do by the way, customisations in parent theme files, which again you should never do, customisations within plugins, which again you should never do. This type of error can also be caused by trailing white spaces in various PHP files, so think about what you've just customised and undo everything.
This is weird, but I get into similar issues. Can you try:
keep the plugins disabled
download a fresh new WP from wordpress.org and upload all its content except wp-content folder and note for difference between local files and distant files
be sure that .htaccess fits to your needs
open a browser that you never used on this website and go to /wp-admin
I also had this error because of WP UTF8 files containing BOM. I had to use a tool to remove it programmatically (something like this: https://github.com/GloryMind/Remove-bom-plugin-wordpress/blob/master/removed-bom.php).

WordPress Can't Add new Page/Post

I have a problem with my WordPress and I don't know why.
I disabled all plugins, activated the default theme twenty seventeen.
Permalinks are ok I also checked that.
I even changed the edit.php file from a different WordPress where it's working.But no luck.
The problem is when I try to add new page or post it redirects me to wp-admin/edit.php.
I also checked httacces, nothing there either.
wp-debug is turned on, no errors in console nor site.
Can someone help me out?Thank You.
I'll pop my solution in here as these threads seem to reach the top of search results and it was complete accident I resolved the same issue (like you it had nothing to do with .htaccess):
If using PHP 5.6, change from FPM to FastCGI. Curiously, when we upgraded to 7.2, both FastCGI and FPM worked. Be advised that other plugins, themes etc. may have compatability issues as swapping PHP has knock-on effects.
If you're unable to do so, there are some other troubleshooting methods which are worth trying on top of disabling themes/plugins;
In Settings > Permalinks, change the URL format to "Plain", Save, then change it back to whatever you had before and Save again
Reinstall Wordpress by going to "Updates" > Re-install now

500 internal server error on drupal admin pages when adding a custom theme

I am trying to accomplish adding a custom theme to a drupal installation. Here is what I am doing and here is what I have tried:
I am downloading an instance of drupal 7 using acquia devdesktop.
I am using either php version 5.5 or 5.6.19 (both versions still get me the same error eventually.
I then navigate to sites/all/themes/ and create a new theme. In my case the folder is called homesite. I then add the files:
-homesite.info
-screenshot.png
And then here is when it gets a little tricky. I am able to see my new theme under the appearance tab in the drupal admin UI. I am able to enable my theme after clearing the cache. I am even able to add a page.tpl.php and start to see my theme come to life. But when i start adding more files - like html.tpl.php I immediately start getting a 500 insternal server error on the admin pages only. Sometimes i am not even able to add a page.tpl.php file before this starts happening.
After i start getting this error, i am no longer able to see any updates on any of the files take hold, but only once I start getting this error.
This tends to make me believe it is a memory limit issue, but when i change the memory limit in php.ini, I then only get a white screen on all urls.
I have tried uncommenting lines in the .htaccess file like 'RewriteBase /' and so on and so forth to no avail.
The answer is that when drupal was scanning my theme directory for .info files, it was getting caught up with all of the .info files in my node_modules directory.
Follow the directions on #4 on this link (#12 takes it a step further)
https://www.drupal.org/node/2329453

Dreamweaver CS5.5 Dynamically Related Files

I'm trying to use Dreamweaver with an existing code base (not WP, Drupal, or Joomla!) in a PHP/MySQL site. I continue to receive "Dynamically related files could not be found because of an internal server error." I've been googling all day and have read plenty of WP-specific solutions, including the thread on this site. I've tried all the methods listed, no luck.
Setup Info
MAMP 2.0.1
Mac OS X 10.6.8
Dreamweaver CS 5.5
Site's local address: /Users/myName/Sites/siteName
Testing server address: /Applications/MAMP/htdocs/siteName
Attempted solutions:
1) added library to site root (/Users/myName/Sites/siteName/library)
2) added library to MAMP root (/Applications/MAMP/library)
3) added include path for both locations to applied php.ini listed in phpinfo
4) set Dreamweaver to use Site Root paths instead of page-relative paths
5) switched back to page relative paths
6) Restart MAMP, reset ports in Preferences to 8888/8889, or 80/3306
7) checked site info to make sure paths are correctly defined
When I insert the following code, or any require function with a relative path, live view and preview in browser display empty pages.
<?php require_once('includes/initialize.php'); ?>
I'm incredibly frustrated. I had been using XAMPP and a plain text editor for previous work and never had an issue with relative paths. Any help would be appreciated.
Answering my own question; bad form, I'm aware.
EDIT:
Adding to previous list of attempted solutions:
8) tried designating the server ports as 8888/8889 and defining server route as http://localhost:8889/mySite/, like setting up a Drupal/WP/Joomla! testing environment.
9) Uninstalled/Reinstalled MAMP, Dreamweaver, disabled the out-of-the-box Apache server included with OS X, the redefined the site in Dreamweaver.
Fix attempt 8 led to packet error discussed here. Fix attempt 9, plus error reporting that hadn't been working, but did now:
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
showed that the testing server was using the local definition to refer to dynamically related files and, even though that should work, it wasn't working.
After reinstall, created new site with "Site > Manage Sites" and defined Local Site Folder in "Site" menu and the Server Folder in the "Server" Menu as the same directory. (/Applications/MAMP/htdocs/mySite)
Refer to the Setup info in the OP to see my system variables; this may be specific to any/all settings. But only identical local definition and server definition solved the problem. I've recreated previous settings to be sure, and different local/server definitions don't work.
This error can happen with Dreamweaver and PHP sites if the contents of the included file make additional dynamic calls using PHP syntax that Dreamweaver doesn't recognize. Without seeing the contents of initialize.php, I can't be 100% sure this is the case but I am pretty sure that DW is not able to parse the code there and figure out what files to get for display.
Problem Dynamically related files that I see a lot of people run into:
Dreamweaver is scanning whatever is in you Local Copy, it should be a the full installation of WordPress. If you're working locally, download everything on your "Testing server" to your "Local view" in the Files panel.
If you're working with two sets of files, your local copy and what is in MAMP's htdocs or on your "Testing server" should be nearly identical, except for what you're working on of coarse. That's the problem I see people have.
If you're working in kind of "pho-FTP" environment.

Categories