Nowadays I use path to file (in DB) like this
“/files/person_1/awatar.png” – it works , file_get_content (“/files/person_1/awatar.png”) = true – is ok!
But now I changed my web server and … In PHP I can see “directory not found exception”
Path on server: /var/www/public_html/new_service_xxxxx/files/awatar.png
In PHP I have “/” as first character, I don’t want to change it.
What I should change ?
<VirtualHost *:80>
ServerName test.new_service_xxxxx.pl
ServerAlias www.new_service_xxxxx.pl
DocumentRoot /var/www/public_html/new_service_xxxxx
<Directory /var/www/public_html/new_service_xxxxxk>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm index.php5
</IfModule>
</VirtualHost>