php - Laravel in shared hosting give me "Internal Server Error" - php

in my hosting I have a few pages in folders inside of public_html.
So, I need upload a Laravel project in a new folder for access like this: "www.mypage.com/laravelproject". My problem is that I create a folder laravelproject and I put all the laravel project inside this, but give me:
Forbidden
You don't have permission to access /laravelproject/ on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
And if i try enter to: "www.mypage.com/laravelproject/public" I receive this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
The hosting give me this errors that produce the project. The project name is "eysa", so I want access it like: "www.mydomain.com/eysa":
[Thu Sep 14 14:31:54 2017] [alert] [client 190.19.102.99]
/var/www/vhost/example.com/home/html/eysa/public/.htaccess: Option
MultiViews not allowed here [Thu Sep 14 14:31:54 2017] [error] [client
190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/500.html [Thu Sep 14
14:31:54 2017] [error] [client 190.19.102.99] File does not exist:
/var/www/vhost/example.com/home/html/favicon.ico, referer:
http://example.com/eysa/public [Thu Sep 14 14:31:54 2017] [error]
[client 190.19.102.99] File does not exist:
/var/www/vhost/example.com/home/errors/404.html, referer:
http://example.com/eysa/public
I need help!
Thanks!

Ok, so let's tear down your log file
Here is your main problem your server configuration does not allow to use MultiViews, removing that from your .htaccess file probably should fix the issue.
[Thu Sep 14 14:31:54 2017] [alert] [client 190.19.102.99]
/var/www/vhost/example.com/home/html/eysa/public/.htaccess: Option
MultiViews not allowed here
Your server looking for your custom error page but cannot found, you can define yours in .htaccess as well ;
[Thu Sep 14 14:31:54 2017] [error] [client
190.19.102.99] File does not exist: /var/www/vhost/example.com/home/errors/500.html
Your browser tries to get favicon.ico but cannot be found in root.
[Thu Sep 14 14:31:54
2017] [error] [client 190.19.102.99] File does not exist:
/var/www/vhost/example.com/home/html/favicon.ico, referer:
http://example.com/eysa/public
This is also almost identical error with the one above, same comment applies.
[Thu Sep 14 14:31:54 2017] [error]
[client 190.19.102.99] File does not exist:
/var/www/vhost/example.com/home/errors/404.html, referer:
http://example.com/eysa/public
Seems like your server only allows MultiViews on your root folder, if laravel requires this you can create a sub-domain or create a virtual folder if your hosting allows.

Related

Website shows 404 not found nginx?

Recently I transferred my website and domain from 1and1 to inmotionhosting. When I try to visit my website (www.wapgee.com). It shows this error:
Anyone who have faced this problem? I will appreciate the help!
This error log I found in public_html folder
[Wed Nov 09 02:38:23.846102 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.694511 2016] [:error] [pid 663540:tid 139899990714112] [client 144.76.13.209:64845] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.542651 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.391229 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.088840 2016] [:error] [pid 663540:tid 139899990714112] [client 144.76.13.209:64845] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:30:14.558814 2016] [:error] [pid 572374:tid 139899906787072] [client 141.8.143.213:57443] File does not exist: /home/wapgee/public_html/index.php
Firstly You have to wait at least one day. Because dns changes can take 12 hours or than 12 hours to change.
Secondly you need to remove dns cache, lets do it
Windows 7 and Vista:
Click on the Start Menu
Type cmd in the search box
Right click on cmd in the programs search results and choose Run as Administrator
Windows 98/NT/2000/XP
Click on the Start Menu Select Run
Type or select cmd to open the command line window
Once the cmd opens type this command:
ipconfig /flushdns
Then you need to clear your browser chache:
Google chrome:
https://support.google.com/accounts/answer/32050?hl=en
Firefox: https://support.mozilla.org/en-US/kb/how-clear-firefox-cache
See if the root directory of your site is placed at the right place. Unlike Apache, Nginx does not display a file index.

zend_mm_heap corrupted ERROR crashing app server

I have encountered "zend_mm_heap corrupted" Error on my app server.
error_log trace is below
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] zend_mm_heap corrupted
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] Premature end of script headers: index.php
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] zend_mm_heap corrupted
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] Premature end of script headers: index.php
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] zend_mm_heap corrupted, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] Premature end of script headers: index.php, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] zend_mm_heap corrupted, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] Premature end of script headers: index.php, referer: http://domain/
I tried different approach bu no luck. Any Idea how this problem can be fixed.
Thanks in advance
Update : Issue is resolved now.
Made two changes in app server to clear the issues.
One reinstalled the frame work used in the server. that resolved the issue of zend_mm_heap.
Secondly removed unwanted extension of homeloader.so from php.ini to end the error of Premature end of script headers: index.php.

Apache server stopped working

I'm using Apache/2.2.16 (Debian) Server as a test server. It has stopped working. What I mean is whenever I try to access a page at say x.x.x.x/foo/bar.php my browsers status bar says waiting for x.x.x.x and the server never responds.
This is what the error logs at says:
[Thu Jun 25 11:30:22 2015] [error] [client 94.200.27.10] PHP Parse error: syntax error, unexpected T_STRING in /usr/share/drupal6/abdi-test/index.php on line 28
[Thu Jun 25 11:30:59 2015] [error] [client 94.200.27.10] PHP Parse error: syntax error, unexpected T_STRING in /usr/share/drupal6/abdi-test/index.php on line 28
[Thu Jun 25 11:31:20 2015] [error] [client 94.200.27.10] PHP Fatal error: Call to undefined method DbConnector::dbQuery() in /usr/share/drupal6/abdi-test/index.php on line 31
[Thu Jun 25 11:57:41 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
[Thu Jun 25 11:59:03 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
[Thu Jun 25 12:15:33 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
[Thu Jun 25 12:31:56 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
[Thu Jun 25 12:49:47 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
[Thu Jun 25 12:50:15 2015] [error] [client 151.80.123.208] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Thu Jun 25 12:56:29 2015] [error] [client 94.200.27.10] Directory index forbidden by Options directive: /usr/share/drupal6/abdi-test/
I'm just an intern so I only have ftp access to this test server. My supervisor says there is a problem with the code on one of the pages somewhere on the server but he's too busy with something else to fix it right now.
Does anyone know what might be wrong?

Zend Skeleton Apache failed to restart

I'm following the guide on the official website : http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html to get started with the Zend Skeleton Application.
After typing the composer commands :
php composer.phar self-update
php composer.phar install
and setting up the virtual host, I get to the step "Restart your web server".
Apache fails to restart and when looking at the error logs in Apache2 folder :
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whmsg.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whtopic.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whutils.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whproxy.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whutils.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whlang.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whtopic.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:40:53 2014] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Feb 18 23:40:53 2014] [notice] Child 5908: Exit event signaled. Child process is ending.
Syntax error on line 3 of E:/Dev Soft/Zend/ZendServer/etc/sites.d/vhost_zf2-skeleton.conf:
DocumentRoot takes one argument, Root directory of the document tree
[Tue Feb 18 23:40:54 2014] [notice] Child 5908: Released the start mutex
[Tue Feb 18 23:40:54 2014] [notice] Child 5908: All worker threads have exited.
[Tue Feb 18 23:40:55 2014] [notice] Child 5908: Child process is exiting
What's this bunch of missing files ?
What did I miss ?
vhost_zf2-skeleton.conf :
<VirtualHost *:80>
ServerName zf2-skeleton
DocumentRoot E:/Dev Soft/ZF2-Skeleton/public
SetEnv APPLICATION_ENV "development"
<Directory E:/Dev Soft/ZF2-Skeleton/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Because you're using Windows, I think you need quotes around the paths:
DocumentRoot "E:/Dev Soft/ZF2-Skeleton/public"
you also might need to use escaped backslashes instead of forward slashes:
DocumentRoot "E:\\Dev Soft\\ZF2-Skeleton\\public"

Mod_rewrite and URL redirection - APACHE,Mod_rewrite,PHP,Codeigniter

I have got a very specific problem. I am using wamp server to run my codeigniter projects locally. I have loaded mod_rewrite in and it is showing in my phpinfo.
In my wamp root directory, I have a codeigniter project folder "mysite".Here is the directory structure of mysite.
-mysite
|--images
|--eshots
|--useruploads
|--temp
|--SpryAssets
|--css
|--js
|--timthumb
After enabling this mod_rewrite, I modified my "host" file in my windows directory and added this line of code in my virtual host file to access my website like this. (mysite.local)
127.0.0.1 mysite.local
After this I created an htaccess file in root directory (i.e under mysite folder)
htaccess file:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|lists|eshots|useruploads|temp|SpryAssets|css|js|robots\.txt|timthumb\.php)
RewriteRule ^(.*)$ /index.php?$1 [L]
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
After this, when I try to access my website from the wamp, it leads me to nowhere. For example, if I click from localhost's project folder i.e mysite, it takes me back to the localhost folder and my URL looks like this:
http://mysite.local/mysite/
and when I click on mysite again, it shows the URL like this:
http://mysite.local/mysite/mysite
And after this, my link doesn't take me to the web pages. And remain stuck here.
Why am I getting this behavior from server? Is there any problem with CODEIGNITER or htaccess file that is stopping this? And what steps I need to do so that I could get each N everything working including javascript, css, images .
How to deal with this challenging problem?
Mostly people say you need to have your mod_rewrite enabled or read manual provided from Apache.
[UPDATED]:
when I TRIED WID new codeigniter project.FIRST,I copied all the files apart from htaccess file into project folder.Luckily i was able to navigate to the index page but it didnt show me any css,image,scripts.
My htaccess consists of only these bits: RewriteEngine on .
What shall i do now to make my js,images work as above?Apache_error log looks like this:.Also,when i try to move onto next pages ,it says "(Error:404)The requested URL /Code/wham.local/categories/listings/Products was not found".Kindly suggest.Where wham.local is virtual host.
apache_error Log:
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/css, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/css, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/js, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/js, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/js, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/js, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/js, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/Code/
[Sun Nov 25 13:00:54 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images
[Sun Nov 25 13:01:03 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images
[Sun Nov 25 13:01:55 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images
[Sun Nov 25 13:01:56 2012] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/Code/wham.local, referer: http://localhost/Code/
check the http.conf file in C:\wamp\bin\apache\Apache2.2.17\conf
if their is entry like this
#Virtual hosts
#Include conf/extra/httpd-vhosts.conf
then open the file httpd-vhosts.conf add below lines in it.
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/mysite/"
ServerName mysite.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/"
ServerName localhost
</VirtualHost>
otherwise you can add this line to httpd.conf file also
and restart ur server.
this is the virtual host concept.
It looks like this line is messing with you:
RewriteCond $1 !^(index\.php|images|lists|eshots|useruploads|temp|SpryAssets|css|js|robots\.txt|timthumb\.php)
Try this instead
RewriteCond %{REQUEST_URI} !^(index\.php|images|lists|eshots|useruploads|temp|SpryAssets|css|js|robots\.txt|timthumb\.php)
you need to enable rewrite module for apache.. you can do this by going to
wamp tray icon > apache > apache module then select rewrite module.

Categories