Blank Page (v2021)

Tips submitted by PHPMaker users
Post Reply
jdiegueze
User
Posts: 8

Blank Page (v2021)

Post 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.


arbei
User
Posts: 9286

Post by arbei »

You may have PHP error but it is not displayed.

  1. Enable debug
  2. Enable error_reporting and display_errors settings in your php.ini.

jdiegueze
User
Posts: 8

Post 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)
??????


arbei
User
Posts: 9286

Post 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.


jdiegueze
User
Posts: 8

Post 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.


jdiegueze
User
Posts: 8

Post 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


arbei
User
Posts: 9286

Post by arbei »

Since you use a subpath (/pruebaphpmaker/), did you try the RewriteBase directive in the .htaccess?


jdiegueze
User
Posts: 8

Post 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]

arbei
User
Posts: 9286

Post 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


jdiegueze
User
Posts: 8

Post 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>

arbei
User
Posts: 9286

Post 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.


jdiegueze
User
Posts: 8

Post by jdiegueze »

All done. No errors.
log_errors = On
error_log = "C:\AppServ\php7\logs\php_error_log.log"


arbei
User
Posts: 9286

Post 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.


jdiegueze
User
Posts: 8

Post 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.


Post Reply