Renaming my Laravel 4 root directory makes it doesn't work. What's wrong? - laravel

I got Laravel 4 zip file from gitHub. ("laravel-master").
run composer and get all the dependencies.
i can access it from: "127.0.0.1/laravel-master/public"
but when i rename the "laravel-master" to other names, and then try to access it, i get:
"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."
I can not figure out what's going wrong !

You need to set your vhost docroot to /public most likely. You shouldn't be able to access it at /public since that should be the root.

Because you specifically mentioned MAMP (in the comments to an answer below), try going to Preferences on the MAMP app page, and click "--" in the cache dropdown of the PHP tab.
A simple refresh after that cleared up this same issue for me.
see Apathetic012's comment on a similar issue on Github (https://github.com/laravel/framework/issues/625)
EDIT: specifying where MAMP was mentioned.

Related

Prestashop 1.7.6.5 not taking into account php module modifications

I've been modifying a module and for some reason prestashop does not take into consideration the code modifications in module.php.
I've made modifications a while back and I need to modify it again due to an update that raises an error, the problem is that I get the error even if I remove said line.
I get this type of error: PHP message: PHP Notice: Undefined index: ordersorderFilter!active in /modules/module/module.php on line 104
I've commented first than removed that line but I still get the error.
It seems like there is a cache somewhere that I can't find, I've deactivated all possible cache in prestashop, activated debug mode, deleted the dev and prod folders in /var/cache/ but I still get the error.
I've used grep on the server to try to find that line, and when I delete it from the file I can not find it anywhere else on the server (but can find it if I add it).
Anybody has any idea?
Thanks a lot!
Prestashop does not perform any kind of caching on the modules PHP files so the problem lies elsewhere or at "lower level" (webserver / proxy ie.).
So check your environment for server-side caching, proxies or PHP accelerators such as opCache that may not serve changes from the source server.
Also try renaming or deleting the offending file altogether and see if the error changes, if not you might simply be looking at the wrong file :)

Running wordPress blog site in IIS (Windows Server)

I recently switched my site from Linux to Windows Server. In my old site there were WordPress Blog directory. For this I first uploaded entire blog directory to my new server & created database. Then re-configured database connection settings in wp-config file & uploaded it. All worked fine but when I clicked on any links in my blog first it takes too much time to get load(almost 2mins) & when loading finish it off then it shows me this error
PHP Warning: file_exists(): open_basedir restriction in effect.
File(/home/brandst1k/public_html/blog/wp-content/uploads/2016/08) is
not within the allowed path(s):
(G:/PleskVhosts//brandstik.in\;C:\Windows\Temp) in
G:\PleskVhosts\brandstik.in\httpdocs\blog\wp-includes\functions.php on
line 1492 PHP Warning: is_dir(): open_basedir restriction in effect.
File(/home/brandst1k/public_html/blog/wp-content/uploads/2016) is not
within the allowed path(s):
(G:/PleskVhosts//brandstik.in\;C:\Windows\Temp) in
G:\PleskVhosts\brandstik.in\httpdocs\blog\wp-includes\functions.php on
line 1497 PHP Warning: is_dir(): open_basedir restriction in effect.
File(/home/brandst1k/public_html/blog/wp-content/uploads) is not
within the allowed path(s):
Original error link - http://www.brandstik.in/blog/solar-rechargeable-camping-lantern/
I can understand that there is server misconfiguration which throws this error. Now only concern is how to solve this?
I had the same issue as yours, it was caused because of the misconfiguration file directory.
All you could do to solve this is add this code in your wp-config.php file.
define('WP_TEMP_DIR','/tmp')
This did work for me.

Magento Admin Backend Blank Page after login

i have a serious problem in Magento Admin Backend. After login its shows a BLANK Page. i used the same files and database in different server, there it was working fine but when i have transferred files into LIVE then Admin issues came. Please help me over this as i got frustrated from last some dayz. If you need any more dertails then plz ask but i need to resolve this soon. Link: http://studywings.com/index.php/admin/
Magento ver: 1.7
flush your magento root /var/cache folder and /var/session folders, It may have previous server session that may cause problems.
Otherwise disable all third party modules and try again. I think this will help
I had the Same problem,
i have also debug the any errors occured, i tried index.php file
ini_set('display_errors', 1);
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
pleced above code in index.php file. after that i have tried admin login.
showing the errors are session related, header already send errors.
i have to add the code in root/index.php file in top add the following line.
ob_start();
after that tried the login its worked.
Cheers..!
Is url changes to this after click login button or not?
http://yourdomain.com/index.php/admin/index/index/key/(key value)/
if url changes but not not show the dashboard page then go to
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
make copy of this file
Find the code for setting session cookie parameters these started on line 77
Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
also line 104 comment out :
//call_user_func_array('session_set_cookie_params', $cookieParams);
If there is no change in url after click login then try to uncomment display error and see error_log file of your server
I think this problem is due to file permissions. As you added files from one server to another, permissions might be get changed.. Try to give the permissions to all the files. Check this http://www.mage-shop.com/forum/threads/3-Magento-Admin-Backend-Blank-Page-Error
There are a number of things that can cause it, but it's most common after migrating to a new server, last time it happened to me it was an excessively low php memory_limit setting on the new server - the Admin part of the site uses a lot more resources per user than the frontend.
In general when having this issue:
Flush out your cache by emptying var/cache
Clear out sessions by emptying var/sessions
Check the magento error logs/reports for an error code in var\logs and var/reports
Turn on magento error logs in mysql if logging isn't already on! (look in core_config_data for WHERE path like 'dev/log/active'
Check if your php configuration is displaying errors
Check your apache/php error logs for more clues - memory errors will show up here for example
Try this solution
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce
Consider also installing XDebug
Hope this helps you!
Just to complete the other answers....
I am upgrading a magento install, and got the same problem, in the end I had another folder inside of var/
magento/var/minifycache
Only worked after clear deleting the files inside of this folder.
I had the same problem after uninstalling an extension. I thought that clearing cache would be enough, and I did without success... later speaking with the technical team, they commented me that it did not work because I hace memcache installed, and needed to be done the cleaning via system - backend (that i coudl not see...)

Magento has a redirect loop

My Magento web site home page has a redirect loop error. When I try to open it it goes to my old server url and gives the error:
The webpage resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
When I try to go into admin it takes to me old server admin url without any error.
I down loaded the fresh data base and connected my store to that it works fine but when i connect it my old data base it give same error.
Please advise me.
This isn't an ideal solution, but I was having issues with Magento 1.9.x.
The setup was: Nginx Proxy & SSL Terminator => Apache Webserver
No matter what I did enabling SSL caused a redirection loop. I narrowed the issue down to Magento rather than the Nginx configurations.
It was like Magento didn't know it was receiving a secure connection from Nginx even though the correct headers were set.
The dirty solution was to add some code to the very bottom of index.php within the magento root directory (ie. /var/www/magento) just before the Mage::run... line, like so:
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) {
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
Mage::run($mageRunCode, $mageRunType);
Wrong permissions can also cause this to happen. So in addition to truncating the var/cache and var/session folders, go ahead and make sure that you have the proper permissions on the app, skin, and includes directories, sub-directories and files. I believe the suggested permission setting is 644. You can do this with a proper FTP client such as FireZilla.
Go to table core_config_data
Update these value to be your localhost url(or whatever url you are providing while installation):
web/secure/base_url //(new url)
web/unsecure/base_url // (new url)
Empty the var folder.
I got it fixed.
I manually deleted my cache i was unable to login in my amdin and it get fixed
My issue was Cloudflare, put it in Development mode and it worked. It was cache related.
Issue: ERR_TOO_MANY_REDIRECTS - redirected you too many times
This issue is related cookie domain name.
For ex: if you already installed Magento 2 in www.example.com, and now you change magento base path to sub domain path like www.subdomain.example.com means, then you need to update your cookie domain entry inside of core_config_data table. You cannot access magento 2 backend so you can use following query to check record exist else use insert query.
SELECT * FROM `core_config_data` WHERE `path` REGEXP 'cookie_domain'
if record exit then update subdomain.example.com to the value column.
else
INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('default', 0, 'web/cookie/cookie_domain', 'subdomain.example.com');
Then flush cache using command php bin/magento cache:flush
Refresh magento 2 admin, now you can access admin. try this. thanks.
Note: if you are not using cookie domain, then don't configure this settings, if you configuration wrong then also you can face this error, so to fix that error update value to default configuration.
I had the same issue and after reloading and reloading my page I noticed that the error message responded to www.mydomain.tld and sometimes to mydomain.tld. I'm using Plesk on the server and I remembered that I set the Domain to always be called without www. I just changed that to none in the hosting settings of the domain. Lucky me, that solved that issue. Hope that helps someone else.

moving modx to new server - clear cache

I moved website to new server, domain stay the same, files structure stay the same, but path to public_html has beed changed. Database has been also moved.
I tried to clean cache, but i dont think I made it. This is error i get:
Could not find action file at: /home/account_name/domains/domain.co.uk/public_html/manager/controllers/default/welcome.php
account_name is different now.
I havent access to the old server, so I cant login and clear cache. I tried to do it using php script I found, but it didnt help.
Moving to new server documentation - there is welcome.php error and how to fix it, but since I haven't access to website from old server, I can't do it.
Also I can't login and clear cache in admin panel, because this message in when i wan get access to it.
I also change in db, in modx_workspaces->path from {core_path} to home/account_name/domains/domain.co.uk/publis_html/core, but didn't help.
How can i clear cache or if it's not the case, what should I do to make it work?
Update
I have change location in settings:
config.core.php
connectors/config.core.php
core/config/config.inc.php
manager/config.core.php
In .htaccess I couldn't find path to website, I didn't change anything.
I remove all content from core/cache/, except one file (.gitignore), and if I go to domain.co.uk/manager/ it's blank page, no content at all. And still can't log in.
Clear the cache on the new server manually VIA FTP or from a shell.
Change that modx_workspaces thing back
did you change all your settings in core/config/config.inc.php ?? if not do so, that is where you will set most of your paths & database credentials.
you have a backup? good!
Now upgrade to the same version of modx, that should fix all your path issues. [make sure you are not logged into the manager while trying to upgrade]
When moving the site to the new server rather watch two things:
the right paths into this files
/config.core.php
/core/config/config.inc.php
/connectors/config.core.php
/manager/config.core.php
the folder /core/cache/ is empty. They can be cleaned simply by removing the contents via ftp.
and correct the value in the database back to {core_path}

Resources