Page 1 of 1
Blank Page (v2021)
Posted: Mon Aug 16, 2021 7:04 am
by jdiegueze
Hi
I build a simple test site. (PhpMaker 2021) First using Postgresql and then Mysql. Both times i got blank page result. My servers work fine, i checked all of them (I´M USING IT ON OTHERS PROJECTS). But i still recieving a blank page as result.
I´m working with:
-Appserv 9.3 (Apache 2.4.41. PHP 7.3.10. MySQL 8.0.17 .)
-Postgresql 9.6
-Firefox and Chrome (both updated)
-Last Composer and Nodejs (as recommended here)
When i generate site there are no errors on list.
Re: Blank Page
Posted: Mon Aug 16, 2021 9:17 am
by arbei
You may have PHP error but it is not displayed.
- Enable debug
- Enable error_reporting and display_errors settings in your php.ini.
Re: Blank Page
Posted: Mon Aug 16, 2021 1:13 pm
by jdiegueze
Like you say there are some errors.
But, reading a lot i discover that the project never generate the verdor folder, so, i run composer update on it and bum.
Another error.
Fileinfo extension should be enabled on php.ini.
So next, uncoment line and run "composer update" again and there are another error.
-The requested URL was not found on this server...................................http://localhost/pruebaphpmaker/login
(I enable the basic security for the site)
??????
Re: Blank Page
Posted: Mon Aug 16, 2021 1:22 pm
by arbei
jdiegueze wrote:
Another error.
Fileinfo extension should be enabled on php.ini.
So next, uncoment line and run "composer update" again
Don't skip. You need to install all the required PHP extensions, read System Requirements -> Composer.
Re: Blank Page
Posted: Mon Aug 16, 2021 2:12 pm
by jdiegueze
All done. Starting from the very begining but still no page result.
I try this https://phpmaker.dev/download.php#url-rewrite and nothing.
Re: Blank Page
Posted: Mon Aug 16, 2021 2:44 pm
by jdiegueze
Errors none.
On access file:
127.0.0.1 - - [16/Aug/2021:02:38:24 -1100] "GET /pruebaphpmaker/EquipoList HTTP/1.1" 404 196
Re: Blank Page
Posted: Mon Aug 16, 2021 3:45 pm
by arbei
Since you use a subpath (/pruebaphpmaker/
), did you try the RewriteBase
directive in the .htaccess?
Re: Blank Page
Posted: Mon Aug 16, 2021 4:00 pm
by jdiegueze
Yes i try, with and without.
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /pruebaphpmaker/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /pruebaphpmaker/index.php [QSA,L]
Re: Blank Page
Posted: Mon Aug 16, 2021 4:25 pm
by arbei
Did you set up AllowOverride
?
From the help file:
Make sure your virtual host is configured with the AllowOverride option so that the .htaccess rewrite rules can be used. Open your httpd.conf or apache.conf in a text editor, and locate the <Directory> section and change the AllowOverride line to:
AllowOverride All
Re: Blank Page
Posted: Mon Aug 16, 2021 4:30 pm
by jdiegueze
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride all
Require all
</Directory>
Re: Blank Page
Posted: Mon Aug 16, 2021 4:47 pm
by arbei
You may click Tools -> Advanced Settings, double check and enable the follows:
- Debug
- Treat PHP warnings and notices as errors
- Log SQL to file
- Log error to file
- Environment => development
In your php.ini, double check and enable the follows:
- error_reporting=E_ALL
- display_errors=On
- log_errors=On
- error_log="d:\my\path\php_error_log"
Generate all files again. Run the site and check the log files in the site and the PHP error log file again.
Re: Blank Page
Posted: Mon Aug 16, 2021 5:13 pm
by jdiegueze
All done. No errors.
log_errors = On
error_log = "C:\AppServ\php7\logs\php_error_log.log"
Re: Blank Page
Posted: Mon Aug 16, 2021 6:04 pm
by arbei
Then it means it is not a PHP error.
Since it is 404 (Not Found), you may want to check the Apache settings again.
Since you run your site at C:\AppServ, make sure the read/write permissions are probably set for the web server user.
Re: Blank Page
Posted: Mon Aug 16, 2021 6:31 pm
by jdiegueze
Listing my errors.
The Apache service named reported the following error:
>>> Argument for 'Require all' must be 'granted' or 'denied' .
-----------------------------------------------------------------(error)
<Directory />
AllowOverride all
Require all
</Directory>
----------------------------------------------------------------- (should be)
<Directory />
AllowOverride all
Require all granted
</Directory>
----------------------------------------------------------------------(with this the job is done)
RewriteEngine On
RewriteBase /pruebaphpmaker/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /pruebaphpmaker/index.php [QSA,L]
------------------------------------------------------------------- (My advise to others..)
There are a lot of configuration files to modify. Take your time.
Enable all the possible sources to catch errors. (i find mine at system logs)
https://phpmaker.dev/download.php#url-rewrite
https://httpd.apache.org/docs/current/m ... write.html
http://www.hkvforums.com/viewtopic.php?f=4&t=42920
follow this and all the advise (enabling debuging, logs, etc) like post says.
Thanks for your time. I learn a lot. I'm gratefull.