Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SkydiveFreak's avatar

Deploy to server fails

Hi,

I have a little problem. I am currently upgrading a laravel-project (old - unknown Version) from a former developer. I need to run it on a managed Server, so I don't have any rights to install software. I don't have composer, docker, etc. I only have php and a few other tools.

Now I have finished the development and try to deploy the project to an apache-server. Standalone. I was able to log in via CLI and run php artisan (*:clear; key:generate; migrate).

On the production server I don't get a site (The directory is displayed). So I tried to make a htaccess file and also tried to mock it up by creating a index. php which simulates the startup...

php artisan serve works, but only creates a not-testable localhost: 8000 version (config - app .php is configured)

The thing is in the very old version, with a very old php version it worked, so the managed server is able to serve a laravel project, but I don't know how.

Do you guys have any idea what I can do,to deploy a laravel project without docker; compose; vendor-bin-sail up) ?

Best regards, SkydiveFreak

(Formatation looks strange because "You may not include links the first day you sign up." There are no links but the error keeps being displayed)

0 likes
10 replies
automica's avatar

@skydivefreak firstly it would be helpful to know some versions

if you can run php artisan --version to return the version of laravel

eg

Laravel Framework 8.36.2

and php -v

which should return you some output like:

PHP 7.4.16 (cli) (built: Mar  4 2021 20:48:24) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies

if it works locally but doesn't work remotely you could be on a different version of php or are missing some extensions.

SkydiveFreak's avatar

(Note I can only go to php by giving the version + I had to seperate the dots with spaces, because I am not allowed to include "links")

php80 artisan --version Laravel Framework 8 . 38 . 0

php80 -v PHP 8 . 0 . 3 (cli) (built: Mar 9 2021 11:09:25) ( NTS ) Copyright (c) The PHP Group Zend Engine v4 . 0 . 3, Copyright (c) Zend Technologies with Zend OPcache v8 . 0 . 3, Copyright (c), by Zend Technologies

SkydiveFreak's avatar

The old version:

php72 artisan --version

Laravel Framework version 5 . 2 . 45

php72 -v

PHP 7 . 2 . 34 (cli) (built: Feb 8 2021 18:14:53) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3 . 2 . 0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7 . 2 . 34, Copyright (c) 1999-2018, by Zend Technologies

automica's avatar

You’ll need to run at least php 7.3 if you are using laravel 8 now. I suspect that is your issue if I understand you correctly,

https://laravel.com/docs/8.x/deployment#server-requirements

Jr you don’t have the means to do this yourself then ask your ISP to switch it on your current package or move to a server which runs this version.

SkydiveFreak's avatar

I know. I try to run the project with PHP-version 8. 0. 3

The old version was just for your information, because the old laravel project was running with the laravel 5 .2 .45 and PHP 7. 2

So the current server runs with PHP 8. 0 but I have no possibility to get it started on apache. Neither on my local computer (Also PHP 8. 0) nor on the server. I simply need to know how I get it started on apache

jlrdw's avatar

Can you update on developer machine and perhaps upload via ftp.

SkydiveFreak's avatar

I can upload via ftp. I can't update or upgrade the server. With the FTP-verion I can only see the directory. It don't seems to run

jlrdw's avatar

What host? Is there a cpanel you can change php version. You need to find out more.

Otherwise tell someone you need the credentials to make the changes.

SkydiveFreak's avatar

I can choose between nearly all available PHP versions, but it dosn't matter because the laravel is not executed. In the old project there was some kind of (undocumented) workaround with a selfmade index. php (which looks like the artisan. php-File) I tried all versions of PHP and tried to write my own index. php File.

jlrdw's avatar

Fix this is development and re upload, the bulk of the code should be good. Sounds like someone setup laravel wrong, not secure. I would do all repairing in a development machine environment.

Please or to participate in this conversation.