Jump to content
Sign in to follow this  
Tierri Lopes

[Freebsd] Instalação Php7 + Extensões

Recommended Posts

Após instalarem o apache24, para utilizarem ficheiros php precisarão de o instalar.

Será utilizado o php7 no tutorial. Para utilizarem outra versão bastará substituir php70 pela versão do php desejada. Por exemplo: php56/php55/php54.

 

Correr os seguintes comandos por ordem:

 

pkg update

pkg upgrade

pkg install -y php70 php70-extensions mod_php70

 

Adicionar o seguinte ao final do ficheiro httpd.conf do apache (Please login or register to see this link. ):

 

<FilesMatch "\.php$">

SetHandler application/x-httpd-php

</FilesMatch>

<FilesMatch "\.phps$">

SetHandler application/x-httpd-php-source

</FilesMatch>

Please login or register to see this link.

 

Reiniciar o servidor apache:

Please login or register to see this code.

Share this post


Link to post
Share on other sites

This command will install php extensions but apache and php extensions must be integrated to make the extesnions work properly

Please login or register to see this code.

Share this post


Link to post
Share on other sites

Most of the metin2 site uses PHP 5.3 and php 5.3 is not the default version on FreeBSD 10.The default version is php5.6 and above

 

So the sites will not work after installing php5.7

 

So do you have any tutoriual to change the default version and force freeBSD to intall php 5.3

Share this post


Link to post
Share on other sites
Guest Gamers

Tierri está me dando esse erro no site,

 

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache24/data/inc/daten.inc.php on line 7

 

Fatal error: Call to undefined function mysql_connect() in /usr/local/www/apache24/data/index.php on line 11

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

open the file daten.inc.php and go to line 7 and see whether any timezone is set

 

date.timezone = America/New_York

 

If its there like the above line or somecode related to timezone then change the timezone to your location and the error will be resolved.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

 

O primeiro erro é como o birender disse.

 

O segundo erro é devido à api mysql ter sido descontinuada. Já o tinha sido feito a partir do 5.5 mas podia continuar a ser utilizada, no entanto na 7 foi removida.

Existem vários problemas de segurança na mesma.

Para tal o recomendado (e apenas possível a partir do php7) é utilizar pdo ou mysqli.

 

Podes transformar as coneções da api mysql do teu website para mysqli sem grande dificuldade (inclusive existem funções que têm exatamente a mesma estrutura, sendo preciso mudar mysql para mysqli).

Share this post


Link to post
Share on other sites
Guest Gamers

Será que poderia me ajudar melhor? via team?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.