After upgrading my OS I can't access the main page of my personel little local website anymore.
Last month I upgraded my Debian Squeeze to Jessie. Before upgrading I had copied all php files, image folders and the mysql database to an external hard disk. After the upgrade I put everything back. At first the problem was that I didn't have permission to access the main page even though I own every file and folder that's connected to this site. A little chmod a+rx seemingly fixed this but when I go to the main page, all I get is a blank screen. I checked the website's folder and found that a number of files have a second version ending in .php~. I never noticed this before and I'm sure I didn't create those files myself. (Actually I found a reference in an old thread somewhere to some editors creating automatic backups with this extension. Guess that's what happened here.) These extra files only show up in a terminal, not in a file manager.
So there is a file named hoofdmenu.php (main page) and one named hoofdmenu.php~. Hoofdmenu.php is my starting page and it only shows a blank screen. In Firebug all you see is:
<html>
<head></head>
<body></body>
</html>
However, if I go to hoofdmenu.php~ I get my webpage (minus a function I defined but that's a minor problem). I can also navigate from the main page to other pages and between other pages. Only when I go back to the main page (every page has a return home button) I get the same old blank screen.
The only difference between both files is the indentation of a few blocks of code. Given that hoofdmenu.php~ works I tried copying this file to hoofdmenu.php but then again I get the empty screen. Can anyone tell me what I'm missing here?
Thanks in advance.
Checking /var/log/apache2/error.log pointed to an unexpected end of file. I don't consciously use short tags but I went looking for them just to be sure and found a stray semicolon:
<?php;
Removing said semicolon solved the entire problem including the unresponsive function. Apparently some previous version of something didn't mind (last alteration of the file was February 19 so it worked at least six weeks with the semicolon in place). Everything is now running again as it's supposed to.
Related
I have an application and its working locally perfect.
on production, all pages are fine which haven't redirection.
Its connected with database because data showing on list pages
I have checked controllers/models for starting and ending code (spaces removed and closing PHP tag removed)
I checked permissions (all folders are 755 and tmp is 777)
I updated debug value to 2,3 but not showing any thing
I checked using PR few variables and in view source it shows few spaces (didn't get any clue that from where the spaces are embedding)
Also, I have uploaded fresh copy of lib/Cake
One another project in same version of Cake is already deployed and working perfectly (Prefix changed for both projects)
On redirection, it shows a blank page. I checked view source of this blank page and it contains 32 spaces.
Any Clue why its happening or from where I need to remove these spaces?
Issue fixed.
Because it was issue of IDE.
I am using sublime but same Dreamweaver have same issue.
For Sublime, we can load a package : https://github.com/SublimeText/TrailingSpaces
For Dreamweaver, we need to do manually by search and replace.
for more details : http://www.jaredstenquist.com/2009/02/13/removing-extra-linebreaks-and-spaces-in-dreamweaver/
Thanks
I have a WordPress website that's been running for almost two years now. All of a sudden, it started to show a blank page on any public page. The admin part on /wp-admin is still working without any problems.
A http request is successful (status 200), but the returned content is completely empty (not even an tag).
I'm not really a PHP/WP expert. A simple web search got a lot of results, but mostly old stuff and never any clear conclusion of the problem's source, i.e. how to fix it. I already enabled WP_DEBUG in wp-config.php, but this only shows debug messages in wp-admin, but the public page remains blank.
Where should I continue searching?
The problematic website is http://lolkitten.org/.
Update
I just found index.php inside my public_html, which was empty. After writing something into it, it appears on my home page! Also, there's a directory /home/<user>/home/<user>/public_html/ which looks like complete nonsense to me.
Update 2
The Problem solved itself after upgrading to Wordpress 3.8. I don't know why, but it seems like some files (like index.php) were messed up and got replaced by fresh ones in this update.
Possible solution / workaround
I've had this problem again. This time, my index.php was completely empty. In my dashboard, under Dashboard > Updates, I clicked on Re-install Now and it fixed itself.
Most likely the wp-content folder can’t be found. When you login to the admin does it state that the templates can’t be found in red text in the center of the page right when you login?
I recommend going into your wp-config.php and adjust—or add—the following constants:
define('WP_SITEURL', 'http://lolkitten.org');
define('WP_HOME', 'http://lolkitten.org');
define('WP_CONTENT_DIR', '/path/to/your/wp-content');
define('WP_CONTENT_URL', 'http://lolkitten.org/wp-content');
Fairly confident that the key to fixing this will be the WP_CONTENT_DIR setting. You need the full path to the directory in the file system to your wp-content folder. So if you have a standard Unix setup with lolkitten.org in it’s own directory that path would be:
/var/www/lolkitten.org/wp-content
And the WP_CONTENT_DIR value would be:
define('WP_CONTENT_DIR', '/var/www/lolkitten.org/wp-content');
EDIT Adding info on how to determine your script’s absolute path if you do not have SSH access to the server, but have FTP access of some sort. Just FTP to the server & create a test file called test.php and just put the following code in it:
<?php
echo dirname(__FILE__);
?>
Now load that into your browser to get the full path:
http://lolkitten.org/test.php
__FILE__ is a magic constant in PHP that will echo the full/absolute path of a PHP script.
try deactivatinhg all the plugin once.
And if you can not access admin panel do the following to deactivate plugins
In the database - wp_options table
change the entry to a:0:{} on option ID 35- active_plugins
As far as i see error, it is because of share-buttons plugin.
Try removing share-buttons plugin from plugin folder and then check again.
If still problem exists then remove all active plugins and check again.
I too had same issue and it was because of plugin. I deactivated plugins one by one and my site was recovered from crash.
i have php 5.3.1 installed on apache2 in ubuntu 12.04 server .
my site was working fine untill last week when i found some of the files were missing and website was not showing.I uploaded site again on server and now when i browse any php pages it shows a blank page and also when i try to see the source code in browser for the blank page it dosnt show any source code.the html files are all showing up.
i dont think it is the server or appache2 probelm as i have other site with php on the same server working fine.
i checked with php files they are alrite.checked with the htacces.txt and that is same as the other working site on the same server.
can anyone here help what the problem could be.
thanks
Rida
Check error logs in /var/log/apache2/error.log
I got the same problem while installing a third party LAMP application and the cause was missing php5-mysql package.
Hope this helps others.
Sometime this white screen may occur because of the php page that is included by include() and include_once() functions, which may have some error or any syntax error that are not reported by the php server.
This happens because the included php page are executed first before the actual php page and if any error that is present in the included file occurs that suppresses the error catching then further php codes are not executed and a blank page is displayed.
First try to find that which dependent file has the problem by // toggling each include() or includ_once() one at a time.
After the culprit dependent file is found try to check it for the errors.
In my case this happened when I un-installed Zend using its uninstall.sh, I then needed to edit the Apache config /etc/apache2/sites-enabled/000-default.conf to remove any references to Zend Server. I did restart Apache, but restarting the whole machine helped to revive PHP bindings.
In my case I find out that the include_once() function which I put on the top of the page was the problem . I red the answer by Gaurav Kispotta , that is where I got the tip . so if you have the same problem first comment that out , maybe even the entire code depending on that include .
You should never ever use require_once or include_once.
It will burst your server memory.
Just go with include or require.
php is a server side language so viewing source from browser will not yield any result if the whole codes are surrounded by php tags. Download the files from the server using an ftp client and try to open in an editor to see if there are still codes in it.
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.
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.