I uploaded my code with Laravel 4.2 on a hosting share with settings.
When I go to the home page or any page on my website. I see a white page , no error nor message.
I set 'debug' => true and 777 for permissions of app/storage
My .httaccess is :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
The databese was created and the tables were imported.
Please help me! My website URL is: larintravel.com.
In the past, configuring a local PHP development environment on your machine was a headache. Installing the proper version of PHP, required extensions, and other needed components is time consuming and confusing. Instead, consider using Laravel Homestead. Homestead is a simple virtual machine designed for Laravel and Vagrant. Since the Homestead Vagrant box is pre-packaged with all of the software you need to build robust PHP applications, you can create a virtualized, isolated development environment in seconds.
http://laravel.com/docs/quick
Related
I am facing a problem with a project recently. The site is running locally fine. Like if I browse the site its showing me the page also if I do some thing like "localsite.dev/students" it is also showing the page. But if I type "localsite.dev/students:auth", I am getting "Access forbidden!". I am using XAMPP in Windows 8. Here is my configuration:
Apache Version Apache/2.4.10 (Win32) OpenSSL/1.0.1t PHP/5.6.24
PHP Version 5.6.24
Is it a problem with the .htaccess file or any Apache settings problem. Please let me know. The .htaccess file that I am using is like following:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
Please help me. I have already spent a lot of time with it. Thanks in advance for any kind of help.
Apache runs as the "nobody" user by default, it might have permission to browse your [OSX/Win] user directory or some of its subdirectories.So, you will receive "access forbidden" error when you try and view your development site. Another scenario will be that you might find that you are able to view your dev site, but PHP throws errors when you attempt to write files or make directories on the filesystem.
So, to fix this you can configure Apache to run as your [OSX/Win] user. Open httpd.conf and look for following lines:
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group nogroup
Change this to:
User Username01
Restart Apache and you are now good to go to navigate your site without any issues, including manipulating files and folders using PHP.
Refer the link for reference:
Virtual Hosts in xampp
Hope It helps you.
I'm trying to set up CakePHP 2.x in Cpanel (Hostmonster) while the domain of the site is still pointing to the older server. In order to pull up the site without the domain (for demo), I have to use http://[hosting-IP-address]/~mysite.
This is my default .htaccess file located in the root (the one before app/ folder):
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
If I leave it as it is, I get 404 error. When I remove the .htaccess file or leave it blank, the site content loads, but without CSS. The site files are located in /home2/mysite/public_html/ folder. I tried adding RewriteBase with different combinations (~mysite, mysite, mysite/public_html), but no avail.
I have tried with rewrite base setting then i get 500 internal server error. Please suggest
Instead of changing your site .htaccess code. I will suggest you update your local pc host file to point your site to new server, so that you can check your all URL.
Open your hosts file which is located at : c:\Windows\System32\Drivers\etc\hosts and add the following code with your new hosting IP address
hosting-IP-address www.domain.com
hosting-IP-address domain.com
I uploaded a new laravel 4 app and cannot figure out how to get it to work. I am not sure if it is something with the composer.json file or what.
Here is the error I am getting:
>Warning: require(/home/flemzy/public_html/l/bootstrap/../vendor/autoload.php) [function.require]: failed to open stream: No such file or directory in /home/flemzy/public_html/l/bootstrap/autoload.php on line 17
>Fatal error: require() [function.require]: Failed opening required '/home/flemzy/public_html/l/bootstrap/../vendor/autoload.php' (include_path='.:/opt/php53/lib/php') in /home/flemzy/public_html/l/bootstrap/autoload.php on line 17
Where did you upload you Laravel app ? From you path it seems it is in your home folder ? Laravel should be placed on your server, and you should point your server path to Laravel public folder. There is a default .htaccess file in every Laravel instalation, which is ready for Apache. Also, after install, you should run composer install, in order to download all dependencies. That vendor/autoload.php file is a part of core framework, so that means that you didn't install all dependencies properly.
I have had similar messages / problems uploading laravel to a server subdirectory.
Laravel docs provide an alternate .htaccess file that fixed my problems.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Copy / paste that into your .htaccess, replacing the old one. Laravel Docs
To use the command line if it's a composer issue, you can use SSH to access your laravel directory. If you're using windows you can use PuTTY for that, which has lots of tutorials and instructions online.
Laravel SSH docs
I have installed MAMP on my laptop and moved my web project (developed using CodeIgniter) under MAMP's webroot.
I use an .htaccess file to hide my index.php file within my urls and everything is working fine...almost, everything.
I'm able to surf my site locally as in my remote server but some folders/files are not recognized. Looks like they are missing or the path is not matching the physical location on my laptop.
Basically I have configuration like below:
MAMP
htdocs
myFolderSite
.htaccess
site
myApplicationFolder
.htaccess
config
controllers
views
.....
...
myPublicFolder
css
images
.....
...
Surfing my site locally css and images are not visible. All the required files are present under the proper folders within myPublicFolder.
The .htaccess file I'm using in myFolderSite appears as below
RewriteEngine On
RewriteBase /myFolderSite/
RewriteCond $1 !^(index\.php|images|upload|users|thumb|fckeditor|public|css|js|robots\.txt|sitemap2\.xml)
RewriteRule . index.php [L]
Am I missing something?
Thanks in advance
The CodeIgniter wiki has a good article on Mod Rewrite that is worth looking at. Specifically, these two lines will stop actual files and directories being redirected.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
I've used this across a few different servers and Macs, without too many problems, so hopefully it helps.
I started working on a project in the mid. We are using Zend Framework, PHP, MySql, Ajax, jQuery and jSon on Ubuntu. It was working on ubuntu.
Now I switched to Windows. I installed Wamp, Eclipse and create a host(test.dev) on windows for my project. But when start the project by test.dev. it give me the following error on browser windows:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
then i deleted the public/.htaccess file and try again. This time no error is displayed but browser page is blank. I checked the firebug(mozilla browser) and there is no response in consol.
My .htaccess file is like that:
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Can someone tell me that what problem may be and how to solve this. If you need some other information then tell me what type of information required for you to solve this.
Thanks
A 500 - Internal Server Error is often caused by something incorrect in a configuration file.
Considering it works (i.e. no error) when you delete the .htaccess file, there's probably something in it that causes troubles.
As a first idea (as there is not much in yours, except rewrite rules), are you sure that mod_rewrite is enabled ?
You can check this in your Apache configuration : there should be a line like this one :
LoadModule rewrite_module modules/mod_rewrite.so
If this doesn't help, do you have any error message in Apache's error_log file ?
The .htaccess file looks fine. My bet is the mod_rewrite module is not activated in your local Apache. Check out your httpd.conf file..
Take a look into Apache's error.log file first. It will give you detailed information about the 500 error and its cause.
What Pekka and Pascal said is right, but you can take a look to if mod_env module is loaded in your Apache configuration so you can use the SetEnv directive.
I have this same problem when I put an application in production. To my surprise, this module is not enabled in some installations.