I have checked tail -n 20 /Applications/MAMP/logs/php_error.log. No errors in log. I am using MAMP.
Also I have added
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
in index.php.
My memory limit in php.ini is
memory_limit = 512M
Any suggestions?
Maybe you have to enable clean URLs? Add this to .htaccess file:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Try to look at drupal's log.
With drush:
drush en dblog
drush ws
Error log was not coming because i was adding code in index.php, it should have been added at the end of the settings.php file:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
After i checked logs, there were normal warnings. After that i enabled drush & it showed database is being connected but parameters are wrong.
Removing $database array from settings.php file and then installing like a fresh vanilla instance solved the issue.
Related
I was wondering if anyone has had any experience deploying larval to blue host? I was flowing an youtube tutorial that showed how to deploy a larval application to a shared hosting service. It was using Godaddy.com, however, i was using Bluehost, and it didn't work as expected. However I managed to getting to not return an internal server error.
What I did was to configure the .env file so that it had my correct database information and my APP_URL to point to my domain.
The youtube tutorial said I should also remove everything from the public folder and place it in the applications main folder, which on Bluehost is the public_html folder. I also changed the .htaccess and removed the public in the rewrite that handles the redirects for trailing slashed.
Now, when I point to my website, all that is served up is a blank screen. but something seems to be working because I uploaded an html webpage that renders to the browser. I just wondering where do I go from here to get the entire site running.
i'm using php 5.6.
Any help would be great. Thank you
I think you are using shared hosting
Follow these steps
1: After upload files to public_html move all your /public files in public_html folder All files like index.php, .htaccess and assets folder etc
2: Find the following line in index.php
require __DIR__.’/../bootstrap/autoload.php’;
require __DIR__.’/../project/bootstrap/autoload.php’;
change to
require __DIR__.’/bootstrap/autoload.php’;
require __DIR__.’/project/bootstrap/autoload.php’;
That’s it. Well then, have fun.
check that the PHP version is correct for Laravel
in cPanle enable FastCGI for PHP
open file .htaccess located in /public and edit
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteBase /public/
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
This is my .htaccess codes which are different in different server.
#Default Setup
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
//bluehost------------
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteBase /
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I am working on a Rest Api for my application. This is my application structure
api
-config
-modules
--v1
---controllers
---models
-runtime
-tests
-web
backend
common
console
environments
frontend
I tried runing the following url http://192.168.1.4/~user/urshow/api/modules/v1/web/users
I got a Not found Error. I do have a controller named Users inside controllers folder.
My .htaccess file is like this (which is inside urshow/api/web)
RewriteEngine on
RewriteBase /~user/urshow/api/modules/v1/web/
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php
I found the solution. I had made some mistakes. First my .htaccess file was incorrect.
i had this line before RewriteBase /~user/urshow/api/modules/web/
i changed it to RewriteBase /~user/urshow/api/web/
also the url which i was trying was also wrong http://192.168.1.4/~user/urshow/api/web/movies/details
correct url is http://192.168.1.4/~user/urshow/api/web/v1/movies/details.
You haven't added the rest of the url to the redirect. Try using this on your last line;
RewriteRule ^(.*)$ index.php$1
I'm trying to use the Slim FrameWork following documentation for the same, set up mod_rewrite and installed mcryp;
If I call http://localhost/slim/books got: Not Found
If I call http://localhost/frame/index.php?books works!
What could this be.
This happens for the slim and flight, but does not happen to Laravel.
Here my htaccess:
RewriteEngine On
RewriteCond% {REQUEST_FILENAME}!-F
RewriteRule ^ (. *) $ / Index.php [QSA]
I'm using:
Apache/2.4.10 (Ubuntu 04.14)
PHP Version 5.5.15RC1
Anyone know what it could be?
In your .htaccess file change Index.php to index.php.
create an .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
Case while running
To run file example myproj/file.php
$app->get('/',function() {
});
localhost/myproj/file.php
$app->get('/nam',function() {
});
localhost/myproj/file.php/nam
you can also use postman
https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en
I've built a new site for our company, whom I recently started working for, and deployed it on a separate subdomain (http://site.mysite.com) to not interfere with some URLs that need to remain on the old subdomain.
The old HTML site (http://www.mysite.co/site) was, for some weird reason, placed inside the public/ folder of a Zend application, as public/site. We want to redirect this site, which used to be available on http://mysite.com/site folder, to our new site at http://site.mysite.com
I've edited the existing .htaccess file, inside the Zend public folder so it looks like such:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,NC,L]
# These four lines are my only alterations to this file...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(apps|site).* [NC]
RewriteRule .* http://site.mysite.com/ [R=301,L]**
RewriteRule ^cart/selectaddress$ https://%{SERVER_NAME}/cart/selectaddress [R,L]
Redirect 301 /photobook-sa http://www.mysite.com/photobooksa/
Redirect 301 /photobook-SA http://www.mysite.com/photobooksa/
Redirect 301 /photobookSA http://www.mysite.com/photobooksa/
RewriteRule ^channel\.html channel\.php
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
php_value session.auto_start 0
RewriteRule ^.*$ index.php [NC,L]
Header append P3P "CP=\"HONK IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\""
AddDefaultCharset UTF-8
The idea is to trap http://mysite.com/apps/, http://mysite.com/apps/whatever and http://mysite.com/site/ and redirect these all, unconditionally to http://site.mysite.com
The problem is, the redirection only works for /apps and apps/whatever, not for /site. So I discovered the public/site folder, which strangely hosts the company site as a HTML only site, within a Zend project folder structure.
Problem is, when I delete this folder, the whole mysite.com and www.mysite.com domain fails, but for example mysite.com/apps still manages to redirect to site.mysite.com
So I tried editing public/site/index.php to look as follows:
<?php
header('Location: http://site.mysite.com'); exit;
and it works, but only for a few requests, then I get a server error.
I also tried adding a .htaccess inside public/site/.htaccess with the following:
Redirect 301 http://site.mysite.com
which also, works initially, but then fails with a server error after a few requests?
I have no idea what's up, no clue as to why the virtual host is dependant on the public/site folder to work, which not even mentioned in the virtual host setups.
I grepped all the controllers in the Zend application/controllers folder to try and see if I can find anything that remotely mentions this /site folder, but no matches found.
I'm pulling the hair out of my scalp with this strange behaviour, can someone please help?
Also last point, this is an Amason AWS server, which I'm not entirely familiar with, could it be that this server has something funny going on, that's non-standard in terms of Apache configuration, DNS setup or something mysteriously automagic?
We've not been able to resolve this issue, and unable to figure out why our methods work only for a few minutes. I'm suspecting something weird happening with Amazon AWS.
The only way we could fix, was by adding an index.html inside the culprit /site folder, using a small JavaScript snippet to redirect the site from the client side.
I am running the Perl Dancer framework following the instructions written in Dancer::Deployment for running as a cgi-script. This allows me to display a default page for the '/' route, but I can't seem to do anything beyond that. For example, let's say that I want to request something like http://localhost/myroute and have that handled by the '/myroute' route handler. How would I pull this off?
I am using apache's mod_rewrite to direct my requests. Currently, if I try the above, I end up with a message like "The requested URL /cgi-bin/dancer.cgimyroute was not found on this server." Below is the contents of my .htaccess.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cgi-bin/dancer.cgi$1 [QSA,L]
</IfModule>
I am running Apache 2.2 on Windows XP with Dancer 1.3030. I understand why I am getting the error message that I am getting. What I am looking for is some sample code for handling the "/myroute" route and perhaps some suggestions regarding any modifications that I should make to my .htaccess file.
The configuration needed a / after dancer.cgi:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cgi-bin/dancer.cgi/$1 [QSA,L]
</IfModule>
Thanks to Quentin above.