Laravel Install failing

Bug Report Template

Description

Trying to install Laravel on a site and it fails, email gave the following error

ERROR: Lararia\Jobs\Job::handle(): DateTime::createFromFormat(): Argument #2 ($datetime) must be of type string, null given

Deleted site and retried get the same issue, also tried creating a test site but again the same issue

Only affects Laravel, WordPress installed fine!

Steps to Reproduce

Create new site, install Laravel web app

Expected Behavior

Laravel web app installed

Actual Behavior

Get above error and html folder deleted

Environment

ApisCP version: 3.2.48
Operating System: 4.18.0-553.53.1.el8_10.x86_64

PHP 8.4

Installed 12.33.0 without incident against PHP 8.4.

PM me the log from:

env DEBUG=1 cpcmd -d DOMAIN laravel:install DOMAIN '' '[empty:1]'

This will install Laravel against DOMAIN emptying any files that may exist within the directory. SSL won’t be configured and it defaults to the default PHP pool user.

Can’t see a way of sending messages other than replying here, maybe i’m just having a bad day??

[root@sv1 ~]# clear
[root@sv1 ~]# env DEBUG=1 cpcmd -d DOMAIN laravel:install DOMAIN ‘’ ‘[empty:1]’
DEPRECATED: explode(): Passing null to parameter #2 ($string) of type string is deprecated
[/usr/local/apnscp/lib/Module/Support/Webapps.php:1333]
0. explode(“.”, null)
[/usr/local/apnscp/lib/Module/Support/Webapps.php:1333]
1. Module\Support\Webapps->checkVersion([empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, version:null])
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:221]
2. Laravel_Module->checkVersion([empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, version:null])
[/usr/local/apnscp/lib/Module/Support/Webapps.php:682]
3. Module\Support\Webapps->parseInstallOptions([empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, version:null], “DOMAIN”, )
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:375]
4. Module\Support\Webapps\Composer->parseInstallOptions([empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, version:null], “DOMAIN”, )
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:73]
5. Laravel_Module->install(“DOMAIN”, “”, [empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, ])
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:146]
6. Module\Skeleton\Standard->_invoke(“install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/apnscpfunction.php:991]
7. apnscpFunctionInterceptor->call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:55]
8. CLI__call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:574]
9. CLI\main()
[/usr/local/apnscp/bin/cmd:7]
DEBUG : Property verlock deferred until installation
DEBUG : Property fortify deferred until installation
WARNING: file_get_contents(https://packagist.org/p/laravel/framework.json): Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:346]
0. file_get_contents(“https://packagist.org/p/laravel/framework.json”)
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:346]
1. Module\Support\Webapps\Composer->_getVersions(“laravel/framework”)
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:295]
2. Module\Support\Webapps\Composer->latestMatchingPackage(“laravel/framework”, “”, “laravel/laravel”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:165]
3. Laravel_Module->createProject(“/var/www/html”, “laravel/laravel”, “”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:82]
4. Laravel_Module->install(“DOMAIN”, “”, [empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, ])
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:146]
5. Module\Skeleton\Standard->_invoke(“install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/apnscpfunction.php:991]
6. apnscpFunctionInterceptor->call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:55]
7. CLI__call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:574]
8. CLI\main()
[/usr/local/apnscp/bin/cmd:7]
WARNING: Undefined variable $comparatorMeta
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:301]
0. Module\Support\Webapps\Composer->latestMatchingPackage(“laravel/framework”, “”, “laravel/laravel”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:165]
1. Laravel_Module->createProject(“/var/www/html”, “laravel/laravel”, “”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:82]
2. Laravel_Module->install(“DOMAIN”, “”, [empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, ])
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:146]
3. Module\Skeleton\Standard->_invoke(“install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/apnscpfunction.php:991]
4. apnscpFunctionInterceptor->call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:55]
5. CLI__call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:574]
6. CLI\main()
[/usr/local/apnscp/bin/cmd:7]
(TypeError) EXCEPTION: DateTime::createFromFormat(): Argument #2 ($datetime) must be of type string, null given
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:301]
0. DateTime::createFromFormat(“Y-m-d\TH:i:sP”, null)
[/usr/local/apnscp/lib/Module/Support/Webapps/Composer.php:301]
1. Module\Support\Webapps\Composer->latestMatchingPackage(“laravel/framework”, “”, “laravel/laravel”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:165]
2. Laravel_Module->createProject(“/var/www/html”, “laravel/laravel”, “”)
[/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:82]
3. Laravel_Module->install(“DOMAIN”, “”, [empty:1, callbacks:CancellableQueue, failure:CancellableQueue, verlock:“minor”, squash:false, autoupdate:true, fortify:“max”, email:“info@DOMAIN”, ])
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:146]
4. Module\Skeleton\Standard->_invoke(“install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/apnscpfunction.php:991]
5. apnscpFunctionInterceptor->call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:55]
6. CLI__call(“laravel_install”, [“DOMAIN”, “”, [[empty:1]]])
[/usr/local/apnscp/lib/CLI/cmd.php:574]
7. CLI\main()
[/usr/local/apnscp/bin/cmd:7]
DEBUG : Failure detected, preempting failure callbacks
[root@sv1 ~]#

  • redacted the domain
cpcmd scope:set cp.update-policy edge-major
upcp

Then give it another go.

run those but doesn’t look like they’ve had the desired effect

[root@sv1 ~]# cpcmd scope:set cp.update-policy edge-major
1
You have new mail in /root/Mail
[root@sv1 ~]# upcp
No branch marked for merge
[root@sv1 ~]#

And I got the same outcome as above when running the original command

cd /usr/local/apnscp
git switch master
git pull
upcp

Then give it another go…

1 Like

awesome thats done the trick :sunglasses:

[root@sv1 apnscp]# env DEBUG=1 cpcmd -d DOMAIN laravel:install DOMAIN ‘’ ‘[empty:1]’
DEBUG : Property verlock deferred until installation
DEBUG : Property fortify deferred until installation
INFO : Relocated primary document root from /var/www/html' to /var/www/html-laravel’
INFO : created database webm_DOMAIN' INFO : added database backup task for webm_DOMAIN’
DEBUG : Cancelling rollback queue
INFO : Laravel installed - confirmation email with login info sent to info@DOMAIN

MESSAGE SUMMARY
Reporter level: SUCCESS
DEBUG: Property verlock deferred until installation
DEBUG: Property fortify deferred until installation
INFO: Relocated primary document root from /var/www/html' to /var/www/html-laravel’
INFO: created database webm_DOMAIN' INFO: added database backup task for webm_DOMAIN’
DEBUG: Cancelling rollback queue
INFO: Laravel installed - confirmation email with login info sent to info@DOMAIN

1

Thanks for the help much appreciated

1 Like