Apache24/php7/mysql8

1586269401332.png

Hello
My problem webpage or what else should be installed to run a website normally?
It doesn't handle php properly especially where mysql queries are.
There is a solution to this?
 
Install www/mod_php72 and read the message.

Code:
 # pkg info -D mod_php72
mod_php72-7.2.29:
On install:
Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled,
add WITH_MPM=event to /etc/make.conf to prevent build failures.
 
Please copy and paste the text instead of posting a picture. Pictures are very difficult to quote or refer to.

Did you follow the instructions? And are there any errors in /var/log/httpd-errors for example?
 
Code:
[Tue Apr 07 13:45:35.592719 2020] [mpm_prefork:notice] [pid 8103] AH00163: Apache/2.4.41 (FreeBSD) configured -- resuming normal operations
[Tue Apr 07 13:45:35.593466 2020] [core:notice] [pid 8103] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Tue Apr 07 13:53:54.966731 2020] [mpm_prefork:notice] [pid 8103] AH00169: caught SIGTERM, shutting down
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20170718/gd.so (/lib/libz.so.6: version ZLIB_1.2.9 required by /usr/local/lib/libpng16.so.16 not found), /usr/local/lib/php/20170718/gd.so.so (Cannot open &quot;/usr/local/lib/php/20170718/gd.so.so&quot;)) in Unknown on line 0
[Tue Apr 07 13:53:55.244446 2020] [mpm_prefork:notice] [pid 9104] AH00163: Apache/2.4.41 (FreeBSD) PHP/7.2.29 configured -- resuming normal operations
[Tue Apr 07 13:53:55.244606 2020] [core:notice] [pid 9104] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Tue Apr 07 13:53:57.652743 2020] [php7:error] [pid 9105] [client 37.187.118.21:51476] script '/usr/local/www/apache24/data/xmlrpc.php' not found or unable to stat
[Tue Apr 07 13:53:57.723320 2020] [php7:error] [pid 9106] [client 103.93.54.198:60626] script '/usr/local/www/apache24/data/xmlrpc.php' not found or unable to stat
 
PHP 7.x won't support mysql_ calls e.g. mysql_fetch_array, mysql_query and mysql_real_escape_string.


You need to change the code to use mysqli_ or use another method to access the database. Or if a open source PHP project, see if they have a PHP 7 compatible version.

You'll have to scroll about half-way down to see this part:

All ext/mysql functions
All ext/mysql functions were removed. For details about choosing a different MySQL API, see Choosing a MySQL API.
 
Back
Top