I'm hosting laravel 5.1 in my cpanel but it always accured error.I tried every method (htaccess, chmod 644 and storage give o r+W) but it doesn't work in my cpanel but when i removed following line from index.php of public folder it give access to index.php file:
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
so it give access to mine folder . Can anybody help me? can it cause due to php version of cpanel?
Paste this code at the top of your index.php file which will be in the public folder:
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
Then visit the URL of your project and there you will see the issue because which laravel is throwing this error.
For Laravel, these are required, confirm this
PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
Procedure on how to host your Laravel 5.1.* application on any shared hosting:
Open Filezilla or any of your favorite FTP Client.
Login and get into the home directory of your hosting account.
Create directory called laravel-app or anything that you want inside your shared hosting account home directory.
Copy everything except public directory from your application's root directory inside the newly created folder. In this case laravel-app.
Now copy the contents of public directory in your public_html directory.
Once everything is uploaded, open up index.php file which resides in public_html directory in any of your favorite text editor.
Change the following line:
require __DIR__.'/../bootstrap/autoload.php';
to
require __DIR__.'/../../laravel-app/bootstrap/autoload.php';
And also change the following line:
$app = require_once __DIR__.'/../bootstrap/app.php';
to
$app = require_once __DIR__.'/../../laravel-app/bootstrap/app.php';
Before Uploading:
Please make sure that you have enabled all the plugins that are required by Laravel application. And also you are using PHP >= 5.5.* . If you don't know how to view which plugins are enabled by default.
Follow these steps:
Login to your cPanel account from the browser.
Scroll down way to the bottom where they say select PHP Version. Click on it.
From the dropdown, select PHP 5.5.6 or any of your choice, but it has to be PHP >= 5.5.*
There is a list of PHP Extensions below the dropdown that can be installed. You can leave it as it is or select the extension(s) that you wish to install. For example, if your application has file uploading feature, then you need to install the fileinfo extension by check marking that extension and clicking the button Save.
DONE. Your Laravel application is live on a shared hosting account.
You can check it by going to yourdomain.com
Hope this helps you. Happy Coding. Cheers.
Thank to all.. i solved it .. in cpanel there is php selector. so i changed it 5.6 and uploads all the folder of vender than give right permission to ech folder and files..
check these steps:
check .htaccess file on root or subdomain
if move files of public to root => change index.php contents /../ to /
check the php version (on loravel 5+ i used php7.2 and problem solved)
check .env file
Related
I have have recovered a project in TYPO3 v11.3.0
My database is imported without error.
I access the installation tool :)
I have access to the typo3 login / password, but if I validate the form, I get the message "Not Found, The requested URL was not found on this server."
On the internet, I found the issue https://forge.typo3.org/issues/94054
I tried the following fix: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/11.0/Breaking-93048-BackendURLRewrites.html
but suddenly I no longer have access to either the instal tool or the login form, I simply have a TYPO3 error:
Page not found The page did not exist or was inaccessible. Reason: The
requested page does not exist
Any ideas?
There is an example .htaccess file in the core that you can copy:
# cd into your web root
cd yourWebRoot/
# make a backup of your current .htaccess
mv .htaccess _.htaccess_old
# get a example .htaccess
cp typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess .htaccess
TYPO3 11 should work with that, now you can copy changes that you made in your old .htaccess into the new one.
Here is what I did:
Downloaded zip TYPO3 11.3.0 from https://get.typo3.org/version/11
Unzip into /subfolder
touch FIRST_INSTALL
Followed instructions of the setup wizard with new database
Try to login via /subfolder/typo3/ and enter credentials
/subfolder/typo3/login?loginProvider=... leads to a 404
What I already checked:
typo3temp/var/log/typo3_[...].log is empty
MAMP logs don't show anything suspicious
Install Tool Environment Status shows a weird error:
http://localhost:8888/subfolder/typo3temp/assets/e35bd633.tmp/e77fab4e.php.wrong: unexpected content PHP content
Install Tool Directory Status is all green
Original .htaccess file exists
Created typo3conf/sites/mysite/config.yaml by copying from an existing (working) project, TYPO3 10
Of course, before I created the site configuration YAML, /subfolder/typo3/login?loginProvider=... was leading to a "no site config" error.
Now, it feels like there is a problem with the .htaccess, but I can't pinpoint where.
Running Apache / PHP 7.4.12
You have to make sure to use the proper .htaccess configuration for CMS 11, so you can't just resue the one provided with CMS 10.
Have a look at this documentation of the related breaking change in TYPO3 CMS 11
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-93048-BackendURLRewrites.html
i'am new to the hosting/c-panel stuff, and i got a laravel based app installed on my godaddy hosting, the problem is that the application require some files that are placed on the root directory of the server for example http://server.com/images/ajax-loader.gif and the file is placed just there
but when i type the link http://server.com/images/ajax-loader.gif it doesn't find it:
so i need to add a public like http://server.com/public/images/ajax-loader.gif like:
the problem is that the entire app needs to be modified to add a public for every file like that, so is there any way i can access the root folder without adding this /public/ ?
Have you contacted the hosting provider? Usually, they help with these kinds of issues.
Do other images from your 'images' directory load fine? If all images in the images directory do not load in the browser, that indicates either a permission issue or some .htaccess settings. Again needs to be checked at the hosting provider end.
I am trying to built a static website using godaddy server. I created a folder say Manage inside public_html in which there is an index.php. Now when I am trying to open this page on browser with URL "www.mysite.com/Manage/index.php" It is showing error, File not found, 404 error. So what possible error I might be making?
There could be a few reasons. If you are using an RHEL-based distribution for your server, you need to edit the master Apache configuration file /etc/httpd/conf.d/userdir.conf and change two things:
Change UserDir disabled to UserDir disabled root
If #UserDir public_html is commented change it to UserDir public_html
This tells Apache that the directory containing each user's html files is a subdirectory of their home directory called public_html.
You may also need to change the permissions of your user directory and your public_html directory to allow Apache to read and execute inside them. To do this, run the following commands:
sudo chmod o+x /home/myusername
sudo chmod o+rx /home/myusername/public_html
Restart Apache and see if it works.
The source for this knowledge is not my brain. It comes from the wonderful course at Washington University in St. Louis CSE 330 Rapid prototype development.
At first look to error.log. If you use nginx find in /var/log/nginx, if httpd in /var/log/httpd.
And what do you mean about "static"? PHP preprocessor generate html from *.php files, so you index.php is not static.
For this case you need to setup LAMP stack.
As I have assigned to work on magento, according to our requirement i tried to install Arabic extension for magento. The extension got successfully installed. Later on refreshing the admin panel, it shows the URL not found. The Stores FrontEnd CMS home page is loading, But when Iclick on any products, it shows again URL not found..
How can i solve this...
When diagnosing things like this, try the following..
Delete (or move to another folder) files in /var/www/var/cache
Delete (or move to another folder) files in /tmp
From a shell, run
/var/www/shell$ php indexer.php --reindexall
You've just manually cleared your caches and re indexed your data.
See if your system comes back to life.
For me I was redirected to wrong URL from MagentoConnect after installation of extension.
My admin URL: <-hostname->/index.php/admin
Redirected To: <-hostname->/admin
I had same issue when I added extension manually. I could find the issue when checked via shell command and it returned missing table error. This is issue happened when I installed module manually.