Drupal not rendering page content - php

I'm trying to create a full backup of cyclekids.org. I've backed up all the files, dumped the database, and restored it on another machine (beta.cyclekids.org). However, Drupal doesn't seem to be rendering any page content on the backed-up site. Even pages that 404 on the regular site display the same mostly-blank template with a smattering of content.
What are likely culprits for this (e.g. misdirected theme file or broken config)?

There can be multiple reasons:
First, upload some simple php file containing only php info function (http://php.net/manual/en/function.phpinfo.php), call it and see is everything ok there with the server. I.e. do you have PHP enabled at all. Don't forget to delete that file when it starts working.
If you get php info output that means that php is working. So next problem could be that because of different server settings you are getting php error, but errors are not displayed.
Try finding in your control panel where php settings are and turn off on page error reports.
If you can't find it in control panel, try enabling error reporting from the code: add
error_reporting(E_ALL);
as first function in index.php file in site root.
Check how much memory PHP has available. Upload some php info file to working site and compare difference in their output.

Related

Menu Editor in Wordpress WP-ADMIN generating error

I'm getting the following error when I open the menu editor in the admin options.
The site is on a IIS web server and it's currently using php v5.6.0
So far I have tried the following approaches:
adding define(CONCATENATE_SCRIPTS', false) tag in the wp-config file.
changing the php version on the IIS from 5.6.0 to 7.1.21
I have less than a months working with wordpress and I had never used php before.
--------------------- EDIT ---------------------
It seems the issue might be related to permissions because when I try to access the javascript file which is not missing from the js folder I get the following message:
This is the only file in the folder which I cannot access. I also checked the permissions of the file in the server and it has the same as the other files.
First:
You should post the code which you are using, if you are not using any code, the paste proper screenshots here.
Second:
Its a syntax error which means there's a mistake in your code. So you need to check the code, there's an extra "<" somewhere in the code.

How to debug ERR_CONNECTION_TIMED_OUT

I am trying to build a site which saves a (checkbox) value using PHP to a txtfile. And everything worked fine. However, I'm rearranging the files on the server in order to make it easier later to create more.
I think I rewrote the path's to the files right (including fopen(_ DIR _ . 'pathname')), but when I'm changing the checkbox (which is a form that submits on-click) I get a "ERR_CONNECTION_TIMED_OUT" error and the site links to the error page of my host.
My question is, how can I debug this error? via console I can't find any errors and it's not giving me any information about missing links or files on the server.

Code shown as text output

I'm a newbie to Facebook app development. It almost works when the page liked.php is shown (it's shown when a user liked the site), the PHP code is displayed as text output.
my liked.php code:
deleted for privacy reasons
?>
Here's the output(it's shown as blank text):
I simply don't know why. Even the error_reporting(E_ALL); doesn't show anything. Simply blank text output. I use the newest facebook php sdk.
I guess the problem is not in the code but in the configuration of your server. You need to tell the server to execute the php code instead of displaying it.
Sounds like you either don't have PHP installed or you're not using a file extension which invokes the PHP engine - is your file called [Blah].php?
Some things to check:
You're serving the file from a web server (not locally)
The server has PHP installed
Your webserver is configured to use the PHP engine to handle the file type you're using (usually .php or .php4 or similar)
creating a new file with just <?php phpinfo(); ?> and serving it should give you lots of info about your PHP install.
If you have access to the server, you should be able to run PHP from the command line/shell

Migrating magento to new server causes incomplete templates

I'm working locally on a Magento install, when I try to upload the sources to the production server it starts happening something very frustrating: the homepage output is not complete, I only see a section of the page instead of seeing the whole page.
I zipped the local copy and transferred using scp so I don't think it can be some missing file, the only thing I updated was the media directory, but from what I know it has to do with media assets, not with templates... I uploaded the source several times, and nothing...
Also the DB is the same copy, so it cannot be an issue.
The output HTML is different (and for instance it's also missing the closing body and html tags.
What can be wrong?
Try this:
http://www.magentocommerce.com/_media/magento-check.zip
http://www.magentocommerce.com/system-requirements
Since the only difference is the server you need to make sure it has all those pre-requisites checked.

Joomla 2.5 and Global Configuration admin page

WE recently upgrade our site from Joomla 1.7 to Joomla 2.5. Everything seems to be working fine, except one single page, which is the global configuration page. See: http://imgur.com/Q9CQj
I have tried reuploading the administrator files and have checked permissions. Any idea?
I think the Javascript and CSS files used within the site changed but the names of these files remained the same. The upshot is that your web browser is continuing to use previously downloaded versions of the files.
It isn't the Joomla cache that it causing the issue - it is the browser cache. Next time you are in the /administrator/ area click the refresh/reload button while holding down the shift key on the keyboard. If you are using Google Chrome hold the Ctrl key instead - and you may have to do this twice - but no more. If it isn't working after two goes then the fault lies elsewhere.
If your problem isn't solved by the above - view the source of the HTML on the page that is a problem. You will probably find errors or warnings in the html that are breaking functionality. It may be that there is a fatal error somewhere towards the end of the page too - if this was output in the middle of a html tag it may not be visible until you view source.
Alternatively you may be hitting a fatal error and your server may be set to not show errors - in that case check your server's error log. Your hosting control panel may have a 'last 50 errors' output so if you log into your hosting control panel in one tab, trigger the error in another and then click through to the 'last 50 errors' area of the control panel you may be able to quickly see the cause of the issue.
Check your error log. I had my global configuration page looking exactly like yours. It turned out the errors was this:
PHP Fatal error: Cannot redeclare class JDatabaseMySQLi in /var/www/vhosts/example.com/httpdocs/libraries/joomla/database/database/mysqli.php original.backup on line 567, referer: http://www.example.com/administrator/index.php
I had a (1) file named mysqli.php original.php in /libraries/joomla/database/database which is a backup of mysqli.php in the same folder. It turns out joomla parses all files in the folder as php files and therefore the redeclare error. I put the file in a subdir and the problem was solved.

Categories