Facing 404 while accessing a php file - php

After doing some changes to my plugin amtyThumb, I realized that there is some problem to access imgsize.php. But i dint change anything in imgsize.php.
If i put this script into some other folder other than plugin folder on my site, then everything is working fine. I am keeping file permission 644 on both places. Folder permission is 755 on both places. It is working fine if i run it locally on my PC.
I had checked .htaccess for hotlinking. But it is not enable.
visit article-stack to view the problem. If you open page in IE or chrome, you can see broken image sign or cross sign in place of images which should be appear just before the post title in sidebar.
In addition, I am using previous version of this plugin on my one of the sites where it is working fine. visit thinkzarahatke. All images in footer bar and sidebar, are being displayed through amtyThumb 1.0.
For debugging : I added some code to write to a text file (just to check). But even that code is not getting executed :(

After a long time i found the silly mistake i did. I actually was calling script resides in "amtyThumb" but the actual plugin url was having "amtythumb".

Related

Magento 1.9.1.0 product images are not showing after migrating

I've migrated my magento website from demo to live server, imported database, same files and everything from demo version, and changed url's in database, but for some reason products images which have been working on demo site are not showing up on live.
Now, i've tried:
Delete /var/cache, /var/sessions
Delete /media/cache
Move /media/catalog/product to /media/import and import products through admin panel using csv
Import products using csv
Replace strings in database
[UPDATE]: Forgot to mention that i've tried to chmod /media and /var folders recursively with 777 rights
Also, i've tried removing .htaccess file from /media folder - didn't made any difference.
The interesting thing is that on demo website, when i open url like: http://mydemowebsite/magento_demo/media/catalog/product/i/m/img_1204_image_name_1_1_1_1_1_1_1_1_1_1.jpg
i can see the image BUT when i go to /media/catalog/product/i/m/ i can't find img_1204... file anywhere. Crazy, huh... ?
and when i open the same url but with my live websites domain name - i have blank page.
[UPDATE]: I've tried editing get.php file, and it seems that when i try to access image through url on my live site, if i'll add echo "something" - the text will appear in the browser.
If i edit get.php on my demo website - text doesn't appear at all. Even if i add die('something') at the beginning of the file.
Can anyone explain me what is happening and how can i fix this ?
Thanks in advance!
Found the problem myself.
Thanks to everyone who tried to help, but the problem was:
FTP client shows only up to 10k images per folder. That folder had more than 10k files, and when i downloaded website files from demo server - i've downloaded only those 10k images per folder.
And that's why they didn't show up on live website

opencart corrupted menu in xampp

I copied my files for opencart store from my host and the db to work localy using xampp, but iam experiencing a little problem, the menu in the front end is broken it doesn't look structured.
The links works perfectly fine, i did change the config files to point to the correct folder, rewrite_module is on, changed #RewriteBase / so the links works fine.
I did even update opencart to make sure all files is there, but nothing i have tried is working.
Can someone please help me fix this problem? Have tried everything i can think of.
Iam using Opencart 1.5.6.4
you can see on the following image how the menus look bazaargadgets.com/corrupted menus.jpg
The CSS file isn't being loaded properly (or not at all).
Check to see If it does exist and not corrupted. Re-download anyway just to make sure.
If that doesn't solve your problem, look at the http headers to see exactly what's going on (press F12 in your browser to see dev tools - IE, FF & Chrome)
you may switch to default theme first,
if working fine, the image link might be broken of your current theme
check the image link

Wordpress page suddenly blank

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.

dreamweaver automatically creating a new folder

Ok I didn't see this anywhere and Google isn't helping it keeps directing me how to create a folder.
So my issue is this, I have a login page that I'm trying to test. When I hit f12 to show the page in a browser (on my localhost) some how dreamweaver is creating a new folder within a folder and placing the file I just saved in a completely different folder in there and renaming the file with random characters.
so in effect it is doing this :
file name is login.php, folder location is admin, so my page should show as this in the url
admin/login.php
but instead it is showing this
Mysite/Mysite/admin/KOyilwoe.php
is is actually creating these folders as well so it is showing in my dreamweaver folder structure as
Mysite/Mysite/Mysite/admin/KOyilwoe.php
Of course when it does this it breaks all links to images and any connections I'm trying to make to the database.
I am using Dreamweaver CS4 does anyone know why it would do this? I have tested many sites before on my localhost and never had this issue until this website. Is this possibly a setting in dreamweaver itself or would a javascript be causing it? I did try removing the javascript and it was still creating the new folders.
So I posted a similar question on Adobe's forums and they responded with this and yes it does fix the issue.
Dreamweaver creates a temporary page. It's created specifically for previewing.
You "should" be able to turn it off in the preferences...
Edit > Preferences >select Preview In Browser > uncheck the "Preview using temporary file" checkbox
EDIT: OOps, forgot the Preview In Browser selection.

Help with Clean URLs

I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.

Categories