Can't start installation process; error finding autoload.psr4.php Topic is solved

Need help installing Joomla! 5.x? For all Joomla! 5.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Thu Mar 07, 2024 11:27 pm

Hi everyone,
I am trying to install Joomla 5.0.3 on Debian OS with a XAMPP installation (PHP 8.2.12).

I followed the instructions on the installation guide.
The steps of the process were the following ones:

1 _ I created a database user granting all privileges on a database with the same name as the user
2 _ I downloaded the .zip file of Joomla 5.0.3 by the joomla.org website
3 _ I create a folder named JOOMLA5 inside of the root folder of my XAMPP installation; /opt/lampp/htdocs in my case
4 _ I moved the joomla5.0.3 zip file into /opt/lampp/htdocs/JOOMLA5/
5 _ I unzipped it
6 _ I run the command "chmod -R 755 /opt/lampp/htdocs/JOOMLA5"
7 _ I opened the web browser and I visited http://localhost/JOOMLA5/

Here is the problem!!
Joomla tries to begin the installation process, but it falls into the following error:

An error has occurred while processing your request.

Code: Select all

 0 Failed opening required '/opt/lampp/htdocs/JOOMLA5/administrator/cache/autoload_psr4.php' (include_path='.:/opt/lampp/lib/php') 
[/b]

I tried to find out where that file was; I found it in

Code: Select all

 /opt/lampp/htdocs/JOOMLA5/libraries/vendor/composer/autoload_psr4.php 
. Thus I copied it into

Code: Select all

 /opt/lampp/htdocs/JOOMLA5/administrator/cache/ 
.

The installation process worked this way, but at the end of the procedure, when I try to enter the administration I face up a red page with ERROR 500.

I think the things are related, but I am not sure; I am a beginner.
Anyway,I do not know how to face the problem.
I hope someone can help me.

Thanks in advance

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9818
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Can't start installation process; error finding autoload.psr4.php

Post by AMurray » Thu Mar 07, 2024 11:48 pm

The red "Error 500 Oops there was a problem" is a a generic error.

We would need you to turn on PHP error reporting, and debug and report back to the forum here any errors you see on screen. These settings would be set from your server - php.ini file or from Joomla's configuration.php file.

Running the FPA (FOrum Post Assistant) may also be useful as it will give us some basic information about your Joomla and server environment. See Forum Post Assistant, red box at the top of the forum screen under Forum Rules.
Regards - A Murray
General Support Moderator

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Fri Mar 08, 2024 7:08 am

Thank you AMurray.
At the moment I am having problems with the web server.
I will post debug informations for my Joomla installation as soon as I can.
Thanks

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Can't start installation process; error finding autoload.psr4.php

Post by ceford » Fri Mar 08, 2024 7:50 am

autoload_psr4.php is created by Joomla during the installation process. It is a file you can delete and Joomla will create it again on the next page load. So it looks like you do not have the correct permissions.

You may find this article helpful:

https://jdocmanual.org/jdocmanual?manua ... n-linux.md

Caveat: my site, my article!

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Fri Mar 08, 2024 8:27 am

Dear ceford,
thank you very much.

I gave 777 permissions to the joomla folder recursively.

I did not have problems this way; I could install joomla easily and I did not face up the red screen entering the Admin page. I have a correctly working installation of Joomla5.0.3 now.

Only one question: Is it safe to work with 777 permission? Should I change them back now (at the end of the installation)? Which are the correct permission values to set to work properly?

Thanks in advance

@AMurray: we don't need to post debug anymore. Anyway, thank you very much.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9818
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Can't start installation process; error finding autoload.psr4.php

Post by AMurray » Fri Mar 08, 2024 8:39 am

No, it is not safe to work with CHMOD 777 - very relaxed permissions that shouldn't be used in normal circumstances.

Joomla's recommended settings are 755 for folders; 644 for files (and 444 for the configuration file).

These requirements haven't changed version to version.
https://docs.joomla.org/Verifying_permissions
Last edited by AMurray on Fri Mar 08, 2024 8:40 am, edited 1 time in total.
Reason: change caps "not" to l/c not with bold
Regards - A Murray
General Support Moderator

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Can't start installation process; error finding autoload.psr4.php

Post by ceford » Fri Mar 08, 2024 8:42 am

PlinPlin wrote:
Fri Mar 08, 2024 8:27 am
Only one question: Is it safe to work with 777 permission? Should I change them back now (at the end of the installation)? Which are the correct permission values to set to work properly?
No! Better to set up the server properly. If this is a public server you will be in severe danger. If it is your own laptop or desktop you will be in some danger.

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Fri Mar 08, 2024 10:29 pm

Dear Ceford and dear Amurray,

thank you very much.

I modified the permissions as it is written in the article and the installation of Joomla 5.0.3 is still working properly.

The question is: Does it work if I set these permissions before the beginning of the installation?

I am going to check it. I will let you know as soon as I can.

Thanks again.

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Sat Mar 09, 2024 12:08 pm

Here I am.
I tried to install from the beginning Joomla 5.0.3 in a different folder. This time I gave the right permissions ( chmod 755 for directories and chmod 644 for regular files ) before the beginning of the installation.
Sorry to tell that it's not working this way!! I read the same error as the object of the discussion.

Is it normal it is necessary to give chmod 777 to install and give the right permission later?
Or maybe I am in error someway?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17492
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Can't start installation process; error finding autoload.psr4.php

Post by toivo » Sat Mar 09, 2024 9:14 pm

PlinPlin wrote:
Sat Mar 09, 2024 12:08 pm
Is it normal it is necessary to give chmod 777 to install and give the right permission later?
That is not normal. Something has not been configured correctly in the web server, if that is the only way to get Joomla installed.
Toivo Talikka, Global Moderator

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Sun Mar 10, 2024 7:34 am

Ok, I was sure about that.
Can I post something that can be useful to discover where the problem is?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Can't start installation process; error finding autoload.psr4.php

Post by ceford » Sun Mar 10, 2024 8:09 am

Going back to your original post: a Joomla site may have several autoload_psr4.php files in different places but they are different files. The one you copied is not the one you need. Copying that would guarantee failure.

The autoload_psr4.php file you need is created by Joomla during the installation process. If it can't be created you have a server folder/file permissions problem.

Which Installation Guide instructions did you follow? You should not have to change file or folder permissions after unzipping Joomla. Can you run the Forum Post Assistant (red box above)?

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Sun Mar 10, 2024 3:30 pm

Here I am. I run pda-en.php and I obtained the following post:

Forum Post Assistant (v1.6.6) : 10-Mar-2024 wrote:
Last PHP Error(s) Reported :: wrote:[10-Mar-2024 16:17:13 Europe/Berlin] PHP Warning: require(/opt/lampp/htdocs/joomlaschool1/administrator/cache/autoload_psr4.php): Failed to open stream: No such file or directory in /opt/lampp/htdocs/joomlaschool1/libraries/namespacemap.php on line 104
Basic Environment :: wrote:Joomla! Instance :: Not Found
Joomla! Configured :: Not Found

Host Configuration :: OS: Linux | OS Version: 6.1.0-18-amd64 | Technology: x86_64 | Web Server: Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1 | Encoding: gzip, deflate, br | System TMP Writable: Yes | Free Disk Space : 9.97 GiB |

PHP Configuration :: Version: 8.2.12 | PHP API: apache2handler | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 22527 | Log Errors To: /opt/lampp/logs/php_error_log | Last Known Error: 10th March 2024 16:17:13. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 40M | Max. POST Size: 40M | Max. Input Time: 60 | Max. Execution Time: 120 | Memory Limit: 512M

Database Configuration :: Database Credentials incomplete or not available Nothing to display.
User Privileges : Unknown
Detailed Environment :: wrote:PHP Extensions :: Core (8.2.12) | date (8.2.12) | libxml (8.2.12) | openssl (8.2.12) | pcre (8.2.12) | sqlite3 (8.2.12) | zlib (8.2.12) | bcmath (8.2.12) | bz2 (8.2.12) | calendar (8.2.12) | ctype (8.2.12) | curl (8.2.12) | dba (8.2.12) | dom (20031129) | hash (8.2.12) | fileinfo (8.2.12) | filter (8.2.12) | ftp (8.2.12) | gd (8.2.12) | gettext (8.2.12) | json (8.2.12) | iconv (8.2.12) | SPL (8.2.12) | intl (8.2.12) | session (8.2.12) | ldap (8.2.12) | mbstring (8.2.12) | standard (8.2.12) | mysqlnd (mysqlnd 8.2.12) | exif (8.2.12) | mysqli (8.2.12) | PDO (8.2.12) | pdo_mysql (8.2.12) | pdo_pgsql (8.2.12) | pdo_sqlite (8.2.12) | Phar (8.2.12) | posix (8.2.12) | random (8.2.12) | Reflection (8.2.12) | imap (8.2.12) | shmop (8.2.12) | SimpleXML (8.2.12) | soap (8.2.12) | sockets (8.2.12) | sysvsem (8.2.12) | sysvshm (8.2.12) | tokenizer (8.2.12) | xml (8.2.12) | xmlreader (8.2.12) | xmlwriter (8.2.12) | xsl (8.2.12) | zip (1.21.1) | apache2handler (8.2.12) | Zend Engine (4.2.12) |
Potential Missing Extensions :: mysql | mcrypt |

Switch User Environment :: PHP CGI: No | Server SU: No | PHP SU: No | Potential Ownership Issues: Unknown

Apache Modules :: core | mod_so | http_core | prefork | mod_authn_file | mod_authn_dbm | mod_authn_anon | mod_authn_dbd | mod_authn_socache | mod_authn_core | mod_authz_host | mod_authz_groupfile | mod_authz_user | mod_authz_dbm | mod_authz_owner | mod_authz_dbd | mod_authz_core | mod_authnz_ldap | mod_access_compat | mod_auth_basic | mod_auth_form | mod_auth_digest | mod_allowmethods | mod_file_cache | mod_cache | mod_cache_disk | mod_socache_shmcb | mod_socache_dbm | mod_socache_memcache | mod_dbd | mod_bucketeer | mod_dumpio | mod_echo | mod_case_filter | mod_case_filter_in | mod_buffer | mod_ratelimit | mod_reqtimeout | mod_ext_filter | mod_request | mod_include | mod_filter | mod_substitute | mod_sed | mod_charset_lite | mod_deflate | mod_mime | util_ldap | mod_log_config | mod_log_debug | mod_logio | mod_env | mod_mime_magic | mod_cern_meta | mod_expires | mod_headers | mod_usertrack | mod_unique_id | mod_setenvif | mod_version | mod_remoteip | mod_proxy | mod_proxy_connect | mod_proxy_ftp | mod_proxy_http | mod_proxy_fcgi | mod_proxy_scgi | mod_proxy_ajp | mod_proxy_balancer | mod_proxy_express | mod_session | mod_session_cookie | mod_session_dbd | mod_slotmem_shm | mod_ssl | mod_lbmethod_byrequests | mod_lbmethod_bytraffic | mod_lbmethod_bybusyness | mod_lbmethod_heartbeat | mod_unixd | mod_dav | mod_status | mod_autoindex | mod_info | mod_suexec | mod_cgi | mod_cgid | mod_dav_fs | mod_vhost_alias | mod_negotiation | mod_dir | mod_actions | mod_speling | mod_userdir | mod_alias | mod_rewrite | mod_php | mod_perl | Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1 |
Potential Missing Modules ::

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31019
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can't start installation process; error finding autoload.psr4.php

Post by Per Yngve Berg » Sun Mar 10, 2024 4:26 pm

This is your problem: PHP API: apache2handler

The web server is running as the user www-data. You uploaded the file with a different user, so it does not have access.

Use fpm-CGI instead and configure it to use a separate user created for the site. Then files will have the correct Ownership if you upload logged in with the same user.

PlinPlin
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 07, 2024 10:35 pm

Re: Can't start installation process; error finding autoload.psr4.php

Post by PlinPlin » Sun Mar 10, 2024 6:30 pm

I have just uninstalled either xampp and joomla.

My question is: is it strictly necessary to use fpm-cgi ??

Should the problem of the permissions be solved if I install either the programs (xampp and joomla) by the root user of my Debian OS ??

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31019
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can't start installation process; error finding autoload.psr4.php

Post by Per Yngve Berg » Sun Mar 10, 2024 7:12 pm

I will not recommend XAMPP. Use LAMP. You can upgrade the php version without starting from scratch.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Can't start installation process; error finding autoload.psr4.php

Post by ceford » Sun Mar 10, 2024 7:26 pm

PlinPlin wrote:
Sun Mar 10, 2024 6:30 pm
I have just uninstalled either xampp and joomla.

My question is: is it strictly necessary to use fpm-cgi ??

Should the problem of the permissions be solved if I install either the programs (xampp and joomla) by the root user of my Debian OS ??
Assuming you are using your own laptop/desktop for local testing and development you do not need to use fpm-cgi. I use apache2handler on both Mac and Linux. But I have configured the Apache server to run as me / mygroup and I have pointed the apache root to my own file space.

The FPA report is consistent with file permissions problems - much of the data is missing because Joomla was not able to create the configuration.php file in your Joomla root.

Did you read the article I quoted previously: https://jdocmanual.org/jdocmanual?manua ... n-linux.md


Post Reply

Return to “Installation Joomla! 5.x”