Quantcast
Channel: Grafikart | Derniers Sujets du forum
Viewing all 13822 articles
Browse latest View live

Guide to writing wordpress website

$
0
0

Bài hướng dẫn này nhằm mục đích hướng dẫn khách hàng trải nghiệm dịch vụ website tại TruongGiangIT.ComPhatDatWeb.Com nói riêng cùng với người dùng đang muốn viết bài lên website bằng mã nguồn Wordrpess.

Để viết bài lên website wordpress thì bạn cần có thông tin đăng nhập vào website và kiểm tra xem tài khoản đó có quyền viết bài hay không. Thông thường thông tin này người quản trị viên website sẽ cung cấp cho bạn.

Thông tin truy cập
Đây là thông tin cần thiết để truy cập viết bài, nếu bạn chưa có thì hãy liên hệ ngay với đơn vị triển khai website cho bạn.

URL đăng nhập: Đây là url đăng nhập vào trang quản trị viết bài. VD: https://truonggiangit.com/wp-login.php

Username:Tên đăng nhập vào website để viết bài. VD: bientapvien

Password: Mật khẩu đăng nhập. VD: Matkhau123!@#

Tiến hành viết bài

Trong viết bài thì sẽ có các mục cần quan tâm sau đây:

Tiêu đề: Tên cho bài viết. VD: Hướng dẫn viết bài trên website WordPress

Nội dung: Là bao gồm thông tin, hình ảnh, video,…muốn viết để truyền tải đến người đọc. Mục này thì bạn có thể sử dụng như soạn thảo word hay dùng

Chuyên mục: Bài viết của bạn thuộc chuyên mục gì: Tin tức, Hướng dẫn, Sự kiện, Video,...chuyên mục thì bạn có thêm bất kỳ lúc nào và số lượng không giới hạn

Thẻ: Hay còn gọi là từ khóa, giống như Tags trên Facebook vậy mục này, tuy nhiên chỉ cần ghi từ khóa và nhấn Thêm

Ảnh đại diện: Ảnh sẽ hiển thị để đại điện cho bài viết, ảnh này nên chọn bức ảnh đẹp, rõ ràng
Những thông tin trên hoàn thiện là hầu như bạn đã có một bài viết hoàn chỉnh và có thể Đăng bài viết ngay rồi. Bắt tay vào thao tác luôn nào !!!

Read more: https://truonggiangit.com/huong-dan-viet-bai-tren-website-wordpress/


Unexepted token 'const'

$
0
0

Bonjour,

Voila je rencontre un petit problème avec mon code :/

Ce que je fais

//ROLE-REACT-RÈGLE
client.on('message', message => {
    if(message.content.startsWith(prefix + 'rr')
    const yes_emoji = client.emojis.get("654408392491925526")
    const rr_embed = new Discord.RichEmbed()
    .setTitle("Veillez cliquer sur le " + yes_emoji + " pour avoir accés au tchat et autres !")
    .setColor("0xffa200")
    message.channel.send(rr_embed)
    .then(message => {
      message.react(yes_emoji)
      // on attend l'event d'ajout d'une réaction
      bot.on('messageReactionAdd', (reaction, user) => {
      // on vérifie que ce soit bien la bonne réaction et on ne compte pas celui du bot
        if (reaction.emoji.name === yes_emoji && user.id !== bot.user.id) {
            var role_rules = member.guild.roles.find('name', '- [Membre] -')
            user.addRole(role_rules);
        }
      });
    });
    });


L'erreur qui apparaît :
SyntaxError: Unexpected token 'const'
at wrapSafe (internal/modules/cjs/loader.js:877:16)
at Module._compile (internal/modules/cjs/loader.js:928:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:994:10)
at Module.load (internal/modules/cjs/loader.js:813:32)
at Function.Module._load (internal/modules/cjs/loader.js:725:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1046:10)
at internal/main/run_main_module.js:17:11

Décrivez ici ce que vous cherchez à obtenir

#Décrivez ici vos erreurs ou ce que vous obtene

Développer un site, jour 2

$
0
0

Bonjour,

Je suis actuellement les tutoriaux de grafikart sur 'Developper un site' jour 2.

mais au moment d'afficher 'pages introuvable, le controller'.$this->request->controller.' n\'a pas de méthode '.$this->request->action

le message s'affiche...mais avec quelques erreures en supplément :

  • Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'PagesController' does not have a method 'indexx' in C:\wamp64\www\tuto\site\core\Dispatcher.php on line 14
  • Warning: require(C:\wamp64\www\tuto\site\view\pages\indexx.php): failed to open stream: No such file or directory in C:\wamp64\www\tuto\site\core\Controller.php on line 24
  • Fatal error: require(): Failed opening required 'C:\wamp64\www\tuto\site\view\pages\indexx.php' (include_path='.;C:\php\pear') in C:\wamp64\www\tuto\site\core\Controller.php on line 24

mon fichier PagesController.php :

<?php
class PagesController extends Controller{

    public function index()
    {
        $this->render('index');
    }

}

mon fichier Dispatcher.php :

<?php
class Dispatcher {

    var $request;

    public function __construct()
    {
        $this->request = new Request();
        Router::parse($this->request->url,$this->request);
        $controller = $this->loadController();
        if(!in_array($this->request->action,get_class_methods($controller))){
            $this->error('Le controller '.$this->request->controller.' n\'a pas de méthode '.$this->request->action);
        }
        call_user_func_array(array($controller ,$this->request->action) ,$this->request->params);
        $controller->render($this->request->action);
    }

    public function error($message)
    {
        $controller = new Controller($this->request);
        $controller->set('message',$message);
        $controller->render('/errors/404');
    }

    public function loadController()
    {
        $name = ucfirst($this->request->controller).'Controller';
        $file = ROOT.DS.'controller'.DS.$name.'.php';
        require $file;
        return new $name($this->request);
    }


}

mon fichier Controller.php

<?php
class Controller{

    public $request;
    public $vars      = array();
    public $layout    = 'default';
    private $rendered = false;

    public function __construct($request)
    {
        $this->request = $request;
    }

    public function render($view)
    {
        if($this->rendered){ return false; }
        extract($this->vars);
        if(strpos($view, '/')===0){
            $view = ROOT.DS.'view'.$view.'.php';
        } else {
            $view = ROOT.DS.'view'.DS.$this->request->controller.DS.$view.'.php';
        }
        ob_start();
        require($view);
        $content_for_layout = ob_get_clean();
        require ROOT.DS.'view'.DS.'layout'.DS.$this->layout.'.php';
        $this->rendered = true;
    }

    public function set($key, $value=null)
    {
        if(is_array($key)){
            $this->vars += $key;
        } else {
        $this->vars[$key] = $value;
        }
    }



}

Si une âme charitable pourrait m'apporter son aide :))

[Symfony 4] Accéder à une liste d'éléments

$
0
0

Bonjour,

La question que je vais poser va vous sembler très basique, je le conçois, mais je débute avec Symfony et pour l'instant je tatonne un peu.
Pour l'instant grâce au tuto Grafikart sur la création d'entités pour un projet de blog, j'ai pu réussir à faire ce que je voulais.
En gros j'ai créé mes entités, et je les gère via le bundle easyadmin.
Donc tout va bien, j'ai toutes mes données que je peux créer à volonté, consulter dans easyadmin, tout ça.

J'ai réussi à créer des "virtual properties", en suivant la doc mais pour l'instant j'ai juste mis des valeurs "en dur".
Exemple j'ai un champ " qui est censé être vrai ou faux en fonction d'une certaine condition, là je l'ai mis à faux tout le temps histoire de confirmer que ce que j'ai fait est ok.

Maintenant j'aimerais que la valeur soit réelle c'est à dire que je dois aller chercher l'info, et c'est là où j'ai besoin d'aide.
En effet, je suis sur une liste d'entités qui sont des mugs.
Pour chaque mug je peux avoir des contrats qui sont associés, de différents types.
Et là j'ai une colonne "location active" qui va me permettre de savoir, pour chaque mug de ma liste, si le mug en question possède un contrat de location actif.
Donc en gros, je dois faire un "findoneby" sur les contrats et trouver un contrat qui soit associé à mon mug, qui soit du type location et qui soit actif.
Le souci c'est que je ne sais pas coment accéder au repository des contrats lorsque je suis dans l'entité des mugs.

J'ai tenté de faire d'abord :
$em = $this->getDoctrine()->getManager(); mais cela ne fonctionne pas.

Quelqu'un pourrait-il m'aider svp ?
Je vous remercie d'avance.

Erreur mysql suite à détection doublons

$
0
0

Bonjour,

Voila je rencontre un petit problème avec mon code.

Ce que je fais

    /************ Add user to database ***************/

    public function addUserToDb($user)
    {

        $requete = $this->connection->prepare('
                    INSERT INTO users (id,nom,prenom,email,role,statut,token,login,password)
                    VALUES (:id,:nom,:prenom,:email,:role,:statut,:token,:login,:password)
                    ');
        $requete->bindValue(':id', NULL, \PDO::PARAM_INT);
        $requete->bindValue(':nom', $user->getNom(), \PDO::PARAM_STR);
        $requete->bindValue(':prenom', $user->getPrenom(), \PDO::PARAM_STR);
        $requete->bindValue(':email', $user->getEmail(), \PDO::PARAM_STR);
        $requete->bindValue(':role', $user->getRole(), \PDO::PARAM_STR);
        $requete->bindValue(':statut', 0, \PDO::PARAM_INT);
        $requete->bindValue(':token', $user->getToken(), \PDO::PARAM_STR);
        $requete->bindValue(':login', $user->getLogin(), \PDO::PARAM_STR);
        $requete->bindValue(':password', $this->hashPassword($user->getPassword()), \PDO::PARAM_STR);


        $affectedLines = $requete->execute();
        $count = $requete->rowCount();
echo '<pre>'; var_dump($count);

        return $affectedLines;

Ce que je veux

J'aimerais détecter et traiter par un message le cas ou l'utilisateur entre un login ou email déjà existant

Ce que j'obtiens

Erreur niveau Router :SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'kreso' for key 'login'

Application multilingue avec le moteur de template Twig

$
0
0

Bonjour à tous et à toutes.
Je suis entrain de développer une application en français qui utilise le moteur de template TWIG.
Cette application n'est pas basé sur le Framework Symfony.
Je dois traduire cette application en anglais avec une certaine efficacité.

Je cherche quelques pistes de solutions pour réussir mon application. Comment procéder ?
Tanks !

SQLSTATE[HY000] [1049] Base 'tuto' inconnue

$
0
0

Bonjour,

Voila, mon navigateur m'affiche SQLSTATE[HY000] [1049] Base 'tuto' inconnue alors qu'elle est présente dans mon code.

conf.php :

<?php
class Conf{

    static $debug = 1;

    public static $databases = array(

        'default' => array(
            'host'     => 'localhost',
            'database' => 'tuto',
            'login'    => 'root',
            'password' => '',
        )
    );

}

Model.php

<?php
class Model{

    static $connections = array();

    public $db = 'default';

    public function __construct()
    {
        $conf = Conf::$databases[$this->db];
        try{
           $pdo = new PDO('mysql:host='.$conf['host'].';dbname='.$conf['database'].';',$conf['login'],$conf['password']);
            Model::$connections[$this->db] = $pdo;
        }catch(PDOException $e){
            if(Conf::$debug >= 1){
                die($e->getMessage());
            } else {
                die('Impossible de se connecter a la base de donnée');
            }

        }
        echo "J'ai chargé la base et je m'y suis connecté";
    }

    public function find()
    {

    }

}

cordialement**********

Nginx et erreur "No input file specified."

$
0
0

Bonjour,

Voila je rencontre un petit problème avec ma distribution archlinux. J'ai eu une mise à jour de php ou de nginx et depuis, impossible de faire interpréter mes scripts PHP.

Je vous poste à la suite mes différents fichiers de configuration de nginx et de php!!!
J'ai tenté avec la technique des sockets ou par l'ip et le port et l'erreur est toujours la mếme!

Voici mon fichier nginx.conf:

user leknoppix users;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    #gzip  on;
    ### A remplacer par include /etc/nginx/sites-available/*.conf;   pour automatiser et séparer les ndd locaux
    include /etc/nginx/sites-available/localhost.conf;
}

Mon fichier localhost.conf /etc/php/sites-available/localhost.conf

server {
        listen       80;
        server_name  localhost 127.0.0.1;
        root   /home/public_html;
        index  index.html index.htm;
        #charset koi8-r;
        access_log  /var/log/nginx/localhost.access.log;
        error_log  /var/log/nginx/localhost.error.log;
        location / {
            autoindex on;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
}

je vous met mon fichier www.conf présent dans /etc/php/php-fpm.d

; Start a new pool named 'www'.
; the variable $pool can be used in any directive and will be replaced by the
; pool name ('www' here)
[www]

; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
; - 'chdir'
; - 'php_values'
; - 'php_admin_values'
; When not set, the global prefix (or /usr) applies instead.
; Note: This directive can also be relative to the global prefix.
; Default Value: none
;prefix = /path/to/pools/$pool
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = leknoppix
group = users
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
;                            a specific port;
;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
;                            a specific port;
;   'port'                 - to listen on a TCP socket to all addresses
;                            (IPv6 and IPv4-mapped) on a specific port;
;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000
; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
;listen.backlog = 511
; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
;                 mode is set to 0660
;listen.owner = http
;listen.group = http
;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
; When set, listen.owner and listen.group are ignored
listen.acl_users = leknoppix
listen.acl_groups = users
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
listen.allowed_clients = 127.0.0.1
; Specify the nice(2) priority to apply to the pool processes (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
;       - The pool processes will inherit the master process priority
;         unless it specified otherwise
; Default Value: no set
; process.priority = -19
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
; or group is differrent than the master process user. It allows to create process
; core dump and ptrace the process for the pool user.
; Default Value: no
; process.dumpable = yes
; Choose how the process manager will control the number of child processes.
; Possible Values:
;   static  - a fixed number (pm.max_children) of child processes;
;   dynamic - the number of child processes are set dynamically based on the
;             following directives. With this process management, there will be
;             always at least 1 children.
;             pm.max_children      - the maximum number of children that can
;                                    be alive at the same time.
;             pm.start_servers     - the number of children created on startup.
;             pm.min_spare_servers - the minimum number of children in 'idle'
;                                    state (waiting to process). If the number
;                                    of 'idle' processes is less than this
;                                    number then some children will be created.
;             pm.max_spare_servers - the maximum number of children in 'idle'
;                                    state (waiting to process). If the number
;                                    of 'idle' processes is greater than this
;                                    number then some children will be killed.
;  ondemand - no children are created at startup. Children will be forked when
;             new requests will connect. The following parameter are used:
;             pm.max_children           - the maximum number of children that
;                                         can be alive at the same time.
;             pm.process_idle_timeout   - The number of seconds after which
;                                         an idle process will be killed.
; Note: This value is mandatory.
pm = dynamic
; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI. The below defaults are based on a server without much resources. Don't
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 5
; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
pm.start_servers = 2
; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 1
; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 3
; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
;pm.process_idle_timeout = 10s;
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
;pm.max_requests = 500
; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations:
;   pool                 - the name of the pool;
;   process manager      - static, dynamic or ondemand;
;   start time           - the date and time FPM has started;
;   start since          - number of seconds since FPM has started;
;   accepted conn        - the number of request accepted by the pool;
;   listen queue         - the number of request in the queue of pending
;                          connections (see backlog in listen(2));
;   max listen queue     - the maximum number of requests in the queue
;                          of pending connections since FPM has started;
;   listen queue len     - the size of the socket queue of pending connections;
;   idle processes       - the number of idle processes;
;   active processes     - the number of active processes;
;   total processes      - the number of idle + active processes;
;   max active processes - the maximum number of active processes since FPM
;                          has started;
;   max children reached - number of times, the process limit has been reached,
;                          when pm tries to start more children (works only for
;                          pm 'dynamic' and 'ondemand');
; Value are updated in real time.
; Example output:
;   pool:                 www
;   process manager:      static
;   start time:           01/Jul/2011:17:53:49 +0200
;   start since:          62636
;   accepted conn:        190460
;   listen queue:         0
;   max listen queue:     1
;   listen queue len:     42
;   idle processes:       4
;   active processes:     11
;   total processes:      15
;   max active processes: 12
;   max children reached: 0
;
; By default the status page output is formatted as text/plain. Passing either
; 'html', 'xml' or 'json' in the query string will return the corresponding
; output syntax. Example:
;   http://www.foo.bar/status
;   http://www.foo.bar/status?json
;   http://www.foo.bar/status?html
;   http://www.foo.bar/status?xml
;
; By default the status page only outputs short status. Passing 'full' in the
; query string will also return status for each pool process.
; Example:
;   http://www.foo.bar/status?full
;   http://www.foo.bar/status?json&full
;   http://www.foo.bar/status?html&full
;   http://www.foo.bar/status?xml&full
; The Full status returns for each process:
;   pid                  - the PID of the process;
;   state                - the state of the process (Idle, Running, ...);
;   start time           - the date and time the process has started;
;   start since          - the number of seconds since the process has started;
;   requests             - the number of requests the process has served;
;   request duration     - the duration in µs of the requests;
;   request method       - the request method (GET, POST, ...);
;   request URI          - the request URI with the query string;
;   content length       - the content length of the request (only with POST);
;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
;   script               - the main script called (or '-' if not set);
;   last request cpu     - the %cpu the last request consumed
;                          it's always 0 if the process is not in Idle state
;                          because CPU calculation is done when the request
;                          processing has terminated;
;   last request memory  - the max amount of memory the last request consumed
;                          it's always 0 if the process is not in Idle state
;                          because memory calculation is done when the request
;                          processing has terminated;
; If the process is in Idle state, then informations are related to the
; last request the process has served. Otherwise informations are related to
; the current request being served.
; Example output:
;   ************************
;   pid:                  31330
;   state:                Running
;   start time:           01/Jul/2011:17:53:49 +0200
;   start since:          63087
;   requests:             12808
;   request duration:     1250261
;   request method:       GET
;   request URI:          /test_mem.php?N=10000
;   content length:       0
;   user:                 -
;   script:               /home/fat/web/docs/php/test_mem.php
;   last request cpu:     0.00
;   last request memory:  0
;
; Note: There is a real-time FPM status monitoring sample web page available
;       It's available in: /usr/share/php/fpm/status.html
;
; Note: The value must start with a leading slash (/). The value can be
;       anything, but it may not be a good idea to use the .php extension or it
;       may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
; that FPM is alive and responding, or to
; - create a graph of FPM availability (rrd or such);
; - remove a server from a group if it is not responding (load balancing);
; - trigger alerts for the operating team (24/7).
; Note: The value must start with a leading slash (/). The value can be
;       anything, but it may not be a good idea to use the .php extension or it
;       may conflict with a real PHP file.
; Default Value: not set
;ping.path = /ping
; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
; Default Value: pong
;ping.response = pong
; The access log file
; Default: not set
access.log = /var/log/$pool.access.log
; The access log format.
; The following syntax is allowed
;  %%: the '%' character
;  %C: %CPU used by the request
;      it can accept the following format:
;      - %{user}C for user CPU only
;      - %{system}C for system CPU only
;      - %{total}C  for user + system CPU (default)
;  %d: time taken to serve the request
;      it can accept the following format:
;      - %{seconds}d (default)
;      - %{miliseconds}d
;      - %{mili}d
;      - %{microseconds}d
;      - %{micro}d
;  %e: an environment variable (same as $_ENV or $_SERVER)
;      it must be associated with embraces to specify the name of the env
;      variable. Some exemples:
;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
;  %f: script filename
;  %l: content-length of the request (for POST request only)
;  %m: request method
;  %M: peak of memory allocated by PHP
;      it can accept the following format:
;      - %{bytes}M (default)
;      - %{kilobytes}M
;      - %{kilo}M
;      - %{megabytes}M
;      - %{mega}M
;  %n: pool name
;  %o: output header
;      it must be associated with embraces to specify the name of the header:
;      - %{Content-Type}o
;      - %{X-Powered-By}o
;      - %{Transfert-Encoding}o
;      - ....
;  %p: PID of the child that serviced the request
;  %P: PID of the parent of the child that serviced the request
;  %q: the query string
;  %Q: the '?' character if query string exists
;  %r: the request URI (without the query string, see %q and %Q)
;  %R: remote IP address
;  %s: status (response code)
;  %t: server time the request was received
;      it can accept a strftime(3) format:
;      %d/%b/%Y:%H:%M:%S %z (default)
;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
;  %T: time the log has been written (the request has finished)
;      it can accept a strftime(3) format:
;      %d/%b/%Y:%H:%M:%S %z (default)
;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
;  %u: remote user
;
; Default: "%R - %u %t \"%m %r\" %s"
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
;slowlog = log/$pool.log.slow
; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_slowlog_timeout = 0
; Depth of slow log stack trace.
; Default Value: 20
;request_slowlog_trace_depth = 20
; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_terminate_timeout = 0
; The timeout set by 'request_terminate_timeout' ini option is not engaged after
; application calls 'fastcgi_finish_request' or when application has finished and
; shutdown functions are being called (registered via register_shutdown_function).
; This option will enable timeout limit to be applied unconditionally
; even in such cases.
; Default Value: no
;request_terminate_timeout_track_finished = no
; Set open file descriptor rlimit.
; Default Value: system defined value
;rlimit_files = 1024
; Set max core size rlimit.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0
; Chroot to this directory at the start. This value must be defined as an
; absolute path. When this value is not set, chroot is not used.
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
; of its subdirectories. If the pool prefix is not set, the global prefix
; will be used instead.
; Note: chrooting is a great security feature and should be used whenever
;       possible. However, all PHP paths will be relative to the chroot
;       (error_log, sessions.save_path, ...).
; Default Value: not set
;chroot =
; Chdir to this directory at the start.
; Note: relative path can be used.
; Default Value: current directory or / when chroot
;chdir = /srv/http
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
;catch_workers_output = yes
; Decorate worker output with prefix and suffix containing information about
; the child that writes to the log and if stdout or stderr is used as well as
; log level and time. This options is used only if catch_workers_output is yes.
; Settings to "no" will output data as written to the stdout or stderr.
; Default value: yes
;decorate_workers_output = no
; Clear environment in FPM workers
; Prevents arbitrary environment variables from reaching FPM worker processes
; by clearing the environment in workers before env vars specified in this
; pool configuration are added.
; Setting to "no" will make all environment variables available to PHP code
; via getenv(), $_ENV and $_SERVER.
; Default Value: yes
;clear_env = no
; Limits the extensions of the main script FPM will allow to parse. This can
; prevent configuration mistakes on the web server side. You should only limit
; FPM to .php extensions to prevent malicious users to use other extensions to
; execute php code.
; Note: set an empty value to allow all extensions.
; Default Value: .php
;security.limit_extensions = .php .php3 .php4 .php5 .php7
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment.
; Default Value: clean env
;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
; Additional php.ini defines, specific to this pool of workers. These settings
; overwrite the values previously defined in the php.ini. The directives are the
; same as the PHP SAPI:
;   php_value/php_flag             - you can set classic ini defines which can
;                                    be overwritten from PHP call 'ini_set'.
;   php_admin_value/php_admin_flag - these directives won't be overwritten by
;                                     PHP call 'ini_set'
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
; Defining 'extension' will load the corresponding shared extension from
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
; overwrite previously defined php.ini values, but will append the new value
; instead.
; Note: path INI options can be relative and will be expanded with the prefix
; (pool, global or /usr)
; Default Value: nothing is defined by default except the values in php.ini and
;                specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
;php_admin_value[error_log] = /var/log/fpm-php.www.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M

Php et Nginx semble fonctionner:

[leknoppix@luminex-arch:/]$ nginx -v
nginx version: nginx/1.16.1
[leknoppix@luminex-arch:/]$ php -v
PHP 7.4.0 (cli) (built: Nov 30 2019 10:43:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Avez vous une idée? Une piste de recherche car depuis dimanche, je ne trouve pas de solution.
Merci d'avance.

leknoppix

NB: Actuellement, je n'ai qu'un seul fichier de configuration de site (localhost.conf) avec dans mon dossier root (/home/public-html), un fichier phpinfo.php!


Problème d'hebergement Symfony 4

$
0
0

Bonjour,
j'ai developpé mon site Symfony 4.2 en local, tout marche correctement. Mais je rencontre un problème lors de la mise en ligne. J'obtient l'erreur suivant InvalidArgumentExceptionaroundCannot determine controller argument for "App\Controller\HomeController::allow()": the $types argument is type-hinted with the non-existent class or interface: "App\Repository\TypesRepository". voici le lien de mon site qui affiche l'erreur--> https://www.kazimo.ga/public/

Voici mon fichier .htacces (generé par symfony)

# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php

# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options FollowSymlinks

# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
# to the front controller "/index.php" but be rewritten to "/index.php/index".
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Determine the RewriteBase automatically and set it as environment variable.
    # If you are using Apache aliases to do mass virtual hosting or installed the
    # project in a subdirectory, the base path will be prepended to allow proper
    # resolution of the index.php file and to redirect to the correct URI. It will
    # work in environments without path prefix as well, providing a safe, one-size
    # fits all solution. But as you do not need it in this case, you can comment
    # the following 2 lines to eliminate the overhead.
    RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
    RewriteRule .* - [E=BASE:%1]

    # Sets the HTTP_AUTHORIZATION header removed by Apache
    RewriteCond %{HTTP:Authorization} .+
    RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]

    # Redirect to URI without front controller to prevent duplicate content
    # (with and without `/index.php`). Only do this redirect on the initial
    # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
    # endless redirect loop (request -> rewrite to front controller ->
    # redirect -> request -> ...).
    # So in case you get a "too many redirects" error or you always get redirected
    # to the start page because your Apache does not expose the REDIRECT_STATUS
    # environment variable, you have 2 choices:
    # - disable this feature by commenting the following 2 lines or
    # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
    #   following RewriteCond (best solution)
    RewriteCond %{ENV:REDIRECT_STATUS} =""
    RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]

    # If the requested filename exists, simply serve it.
    # We only want to let Apache serve files and not directories.
    # Rewrite all other queries to the front controller.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        # When mod_rewrite is not available, we instruct a temporary redirect of
        # the start page to the front controller explicitly so that the website
        # and the generated links can still be used.
        RedirectMatch 307 ^/$ /index.php/
        # RedirectTemp cannot be used instead
    </IfModule>
</IfModule>

dans mon fichier env j'ai correctement renseigné les acces à la BDD, et passer en mode prod. Je suis sur un serveur mutualisé, je n'ai pas droit au ssh, donc j'ai uploadé mes fichier manuelement. Lorsque je me rend à www.monsite.com/public j'ai l'erreur mentionné plus haut. Qu'est-ce qui n'a pas marché ?? Ca fait des heures que je galère, je ne trouve pas de solution. Quelqu'un pour m'aider svp ?

Problème Symfony et MSSQL

$
0
0

Bonjour,

Je rencontre un petit soucis. Depuis quelques jours, j'essaie de relier Symfony avec ma base de données MSSQL en utilisant Wamp. Pour cela, j'ai bien téléchargé les extensions nécessaires pour php avec la bonne version.
J'arrive à me connecter à la base de données lorsque je fais un fichier test sur Wamp. Mais lorsque j'utilise Symfony, en ayant configuré l'adresse DATABASE_URL, la commande php bin/console doctrine:database:create me renvoie cette erreur :
"Attempted to call version "sqlsrv_configure" from the global namespace".
Pourtant ma variable Path renvoie bien sur le php utilisé sur wamp.

Est-ce que quelqu'un a une idée ?

Merci par avance,

Cordialement.

Problème de containers au lancement de mon "docker-compose up"

$
0
0

Bonjour,

J'ai un problème qui est arrivé comme ça d'un coup alors que la veille, je n'avais aucun problème. Au lancement de ma command "docker-compose up", j'obtiens ce genre de message d'erreur :

Creating projet_elasticsearch ... 
Creating projet_postgresql    ... 
Creating projet_rabbit        ... error
Creating projet_node          ... 

ERROR: for projet_rabbit  Cannot start service projet_rabbit: driver failed programming external connectivity on endpoint projet_rabbit (20f114dbb18492e35a49777b611019753b9d271a106a8dcc6cb98de55934cd14): Error starting userland proxy: listen tcp 0.0.0.0:15672: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autCreating projet_node          ... error

Creating projet_postgresql    ... error090b7aa0): Error starting userland proxy: listen tcp 0.0.0.0:8081: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.
Creating projet_elasticsearch ... error
ERROR: for projet_postgresql  Cannot start service projet_postgresql: driver failed programming external connectivity on endpoint projet_postgresql (d4db62ad0be2ee5ae631a77da628cd0a5becf7d43cc773f0ea8516130696fc6d): Error starting userland proxy: listen tcp 0.0.0.0:5433: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.

ERROR: for projet_elasticsearch  Cannot start service projet_elasticsearch: driver failed programming external connectivity on endpoint projet_elasticsearch (92a7ab9a31bcc252a4a059a627fbbc0e831d96a8945d0f6c5c2f28e18125e0c1): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500

ERROR: for projet_rabbit  Cannot start service projet_rabbit: driver failed programming external connectivity on endpoint projet_rabbit (20f114dbb18492e35a49777b611019753b9d271a106a8dcc6cb98de55934cd14): Error starting userland proxy: listen tcp 0.0.0.0:15672: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.

ERROR: for projet_node  Cannot start service projet_node: driver failed programming external connectivity on endpoint projet_node (a81fffe7b7cb9741dc9160e56d2ee33bdd9b77d875bbbff3302d1a23090b7aa0): Error starting userland proxy: listen tcp 0.0.0.0:8081: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.

ERROR: for projet_postgresql  Cannot start service projet_postgresql: driver failed programming external connectivity on endpoint projet_postgresql (d4db62ad0be2ee5ae631a77da628cd0a5becf7d43cc773f0ea8516130696fc6d): Error starting userland proxy: listen tcp 0.0.0.0:5433: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.

ERROR: for projet_elasticsearch  Cannot start service projet_elasticsearch: driver failed programming external connectivity on endpoint projet_elasticsearch (92a7ab9a31bcc252a4a059a627fbbc0e831d96a8945d0f6c5c2f28e18125e0c1): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500
ERROR: Encountered errors while bringing up the project.

Or, la veille mes conteneurs se lançaient directement. Maintenant, j'ai ce problème de ports qui nécessite que je les changes à chaque fois que je relance docker car il prend en compte chaque nouveau code de ports comme si il les conservait.

En faisant un "docker-compose ps", c'est complètement vide donc je ne sais pas d'où il tient ces informations.

J'ai testé quelleques solutions présentes dans https://github.com/docker/compose/issues/4337 comme "docker-compose --force-recreate" ou
"docker-compose down
docker-compose rm
docker-compose build
docker-compose up -d"

Si vous avez déjà eu ce problème ou que vous avez une solution, faites-moi signe, je suis preneur.

Merci d'avance pour les pistes.

Mes débuts...catastrophiques ? '-'

$
0
0

Bonjour,

Voila je fait un site pour une entreprise, mais je suis débutant en php et je ne sais donc pas comment faire pour enregistrer les logins et mots de passes des administrateurs.

Ce que je fais

mon index.php :

<!DOCTYPE html>
<html lang="fr">
<head>
  <title>Sondage GLPI</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=9" />
  <link rel="icon" href="/data/sondageglpi/img/iconesnp.ico" />
  <?php
    $u_agent = $_SERVER['HTTP_USER_AGENT'];
    if(preg_match('/Trident/',$u_agent)){
        echo '<link rel="stylesheet" href="/data/sondageglpi/css_IE.css">';
    }
    else{
    echo '<link rel="stylesheet" href="/data/sondageglpi/mycss.css">';
    }    
        ?>
</head>
<body>
    <div id="banner" >
        <div class="main">
            <div class="page">
                <div id="language">
                    <table id="tablelang">
                        <tr>
                            <td>
                                <a href="#"><img class="flags" src="../sondageglpi/sondageglpi/img/fr.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/en/index_en.php"><img class="flags" src="../sondageglpi/sondageglpi/img/en.png" /></a>
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/de/index_de.php"><img class="flags" src="../sondageglpi/sondageglpi/img/de.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/pl/index_pl.php"><img class="flags" src="../sondageglpi/sondageglpi/img/pl.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/sk/index_sk.php"><img class="flags" src="../sondageglpi/sondageglpi/img/sk.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/hu/index_hu.php"><img class="flags" src="../sondageglpi/sondageglpi/img/hu.png" />  
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="bloc-accueil">
                 <form action="home_fr.php" method="post">
                    <tr>
                        <h1>Bienvenue</h1>
                        <p>
                            Lors de ces trois derniers mois, vous avez sollicité les différentes équipes du service informatique (Infrastructure, ERP, PLM). <br /><br /><br />
                            Afin de nous aider à améliorer notre service, nous vous prions de bien vouloir prendre quelques instants pour répondre au questionnaire suivant.    
                        </p>
                    </tr>
                    <tr>
                        <button id="button-start" type="submit">Commencer</button>
                    </tr>
                    </form>    
                    </div>
                </div>
            </div>
        </div>
    <a href="login.php" ><input type="button" value="Administration" class="btn btn-primary" ></a>
</body>
</html>

mon login.php :

<?php
require 'function/load.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

    <input type="button" value="Se connecter">
        <?php
            if($login == true){
                if($password == $this->login){
                    load('admin.php');
                } else {
                    echo 'Mot de passe incorrecte';
                }
            } else {
                echo 'Login incorrecte';
            }
        ?>
</body>
</html>

mon load.php :

<?php
class load {

    public function __construct()
    {

    }

}

mon admin.php :

<!DOCTYPE html>
<html lang="fr">
<head>
  <title>Sondage GLPI</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=9" />
  <link rel="icon" href="../sondageglpi/sondageglpi/img/iconesnp.ico" />
  <?php
    $u_agent = $_SERVER['HTTP_USER_AGENT'];
    if(preg_match('/Trident/',$u_agent)){
        echo '<link rel="stylesheet" href="../sondageglpi/sondageglpi/css_IE.css">';
    }
    else{
    echo '<link rel="stylesheet" href="../sondageglpi//sondageglpi/mycss.css">';
    }    
        ?>
</head>
<body>
    <div id="banner" >
        <div class="main">
            <div class="page">
                <div id="language">
                    <table id="tablelang">
                        <tr>
                            <td>
                                <a href="#"><img class="flags" src="../sondageglpi/sondageglpi/img/fr.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/en/index_en.php"><img class="flags" src="../sondageglpi/sondageglpi/img/en.png" /></a>
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/de/index_de.php"><img class="flags" src="../sondageglpi/sondageglpi/img/de.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/pl/index_pl.php"><img class="flags" src="../sondageglpi/sondageglpi/img/pl.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/sk/index_sk.php"><img class="flags" src="../sondageglpi/sondageglpi/img/sk.png" />  
                            </td>
                            <td>
                                <a href="../sondageglpi/sondageglpi/lang/hu/index_hu.php"><img class="flags" src="../sondageglpi/sondageglpi/img/hu.png" />  
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="bloc-accueil">

                    <h1>Administration</h1>
                    <h2>Sondage en cours</h2>

                    <input type="text" >

                    <input type="radio" id="actif" value="actif" name="sondage" >
                    <label for="actif">Actif</label>

                    <input type="radio" id="non_actif" value="non_actif" name="sondage" >
                    <label for="non_actif">Non actif</label>
                        <br>
                    <button type="submit">Submit</button>
                        <br>
                    <button type="submit">Créer un sondage</button>

                </div>
            </div>
        </div>
    </div>
    <a href="index.php"><input type="button" value="Page D'accueil" class="btn btn-primary" ></a>
</body>
</html>

Ce que je veux

j'aimerai faire un systeme de login pour passer du coter de l'administration sur mon site.

faut-il que je créer une base de donnée MySQL ?

que faut il mettre dans ma fonction load ?

Ce que j'obtiens

Pour le moment j'obtiens un bouton Se connecter sur ma page login.php, et en dessous l'erreur suivante s'affiche :
Notice: Undefined variable: login in C:\wamp64\www\site\login.php on line 15.
et ensuite, un login incorrecte s'affiche
je sais que l'erreur est la car aucune de mes variables sont définit

BeelabTagBundle

$
0
0

Bonjour,

Est ce que quelqu'un a déjà utiliser se bundle pour les tags ?
https://github.com/Bee-Lab/BeelabTagBundle

Je rencontre un petit problème avec la partie JS.
https://github.com/Bee-Lab/BeelabTagBundle/blob/master/docs/javascript.md

J'arrive pas a avoir la liste des tags déjà présent et ni a en ajouter.
Voici le bout de code qui'ils disent d'insérer

$(document).ready(function () {
    (function () {
        var $tagInput = $('input[name$="[tagsText]"]');
        function tags($input) {
            $input.attr('type', 'hidden').select2({
                tags: true,
                tokenSeparators: [","],
                createSearchChoice: function(term, data) {
                    if ($(data).filter(function () {
                        return this.text.localeCompare(term) === 0;
                    }).length === 0) {
                        return {
                            id: term,
                            text: term
                        };
                    }
                },
                multiple: true,
                ajax: {
                    url: $input.data('ajax'),
                    dataType: "json",
                    data: function (term, page) {
                        return {
                            q: term
                        };
                    },
                    results: function (data, page) {
                        return {
                            results: data
                        };
                    }
                },
                initSelection: function (element, callback) {
                    var data = [];
                    function splitVal(string, separator) {
                        var val, i, l;
                        if (string === null || string.length < 1) {
                            return [];
                        }
                        val = string.split(separator);
                        for (i = 0, l = val.length; i < l; i = i + 1) {
                            val[i] = $.trim(val[i]);
                        }
                        return val;
                    }
                    $(splitVal(element.val(), ",")).each(function () {
                        data.push({
                            id: this,
                            text: this
                        });
                    });
                    callback(data);
                }
            });
        }
        if ($tagInput.length > 0) {
            tags($tagInput);
        }
    }());
});

Pour info je suis en version 4 de symfony.
Merci d'avance pour vos réponses

Problème d'export de database wp avec wp-cli

$
0
0

Bonjour,

J'essaie d'exporter ma databse wp avec wp-cli comme dans le tutoriel https://www.grafikart.fr/tutoriels/ssh-deploy-wordpress-1060 et je rencontre un petit problème avec mon code.

php wp-cli.phar db export

Cette erreur arrive

mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)" when trying to connect

Après avoir scruté de nombreux forum je n'arrive pas a trouver de solution à mon problème.

Merci d'avance pour tout aide.

keyframe problème taille d'écran

$
0
0

Salutations !
j'ai un problème de proportion via le keyframe.
Je m'explique : le background débutant avec une forme spherique et de petite taille, je souhaiterais lui donner une animation afin que celle-ci prenne la totalité du body en homothétie. le rapport x et y doivent avoir la même vitesse de déplacement qui lui donnerait un effet de zoom cohérent.
Le soucis est que chacune de mes pages ont une hauteur differentes. Et donc la forme spherique est totalement déformée.
Quelqu'un pourrait m'aider sur ce problème ?

Merci d'avance ^^


Projet: annuaire de pronostiqueurs

$
0
0

Bonjour,

Je viens vers vous pour avoir des retours et conseils sur un projet de site.

En effet, nous avons réalisé qu'il y a de nombreux pronostiqueurs demandant de payer pour obtenir leur pronostics sur des offres "VIP'.
Le problème est que ce système est très opaque et on ne sait jamais ce qui est marche et ce qui est complètement bidon.
C'est pourquoi nous aimerions avoir l'avis de la communauté pour décider de qui est le meilleur pronostiqueur.

Le site fonctionne par vote. Vous devez renseigner votre email (nous n'envoyons aucun email, cela est juste pour assurer la sécurité et éviter la fraude aux avis) et vous pouvez voter et ajouter un commentaire.

Les meilleurs pronostiqueurs apparaissent sur la page d'accueil, ce qui permet, sur le long terme, de trouver rapidement un bon pronostiqueur pour ses paris sportifs.

Si vous avez déjà eu une expérience avec un pronostiqueur, n'hésitez pas à passer sur le site pour donner votre avis. Et si vous n'avez jamais eu de pronostiqueur, on prend vos retours sur le site en général.

Encore une fois, le projet ne vivra que si vous y participez. Sans vous, nous ne sommes rien. Cependant, si nous arrivons, ensemble à construire quelque chose, ce ne sera que pour le bénéfice de tous.

N'hésitez pas si vous avez des retours sur la structure ou le design du site (ou tout autre chose).

Merci grandement pour votre aide.

Quentin,

http://le-meilleur-pronostiqueur.fr/

Informations serveur depuis IP

$
0
0

Bonjour,

J'aimerais savoir si c'est de possible d'avoir des informations sur un serveur(VPS ou Dédier) tels que la ram, le CPU, etc grace à PHP ?

Si oui quelle serait la marche à suivre ?

Merci d'avance !
Cordialement J.

problème avec accès au page en fonction du type utilisateur

$
0
0

Bonjour,

Voila je rencontre un petit problème avec mon code, je souhaite rediriger l user en fonction de son type, client ou admin, mais je ne recois pas d erreur et je reste bloquer dans la page authentification,

je fais un test pour voir si l utilisateur est admin ou client pour le rediriger vers la page adequate

if (isset($_POST['envoi'])) { 

    $adresse_courriel = trim($_POST['adresse_courriel']); 
    $mot_passe = trim($_POST['mot_passe']); 

    $results =  sqlControlerUtilisateur($conn, $adresse_courriel, $mot_passe);
        foreach($results as $row):

            if (!isset($row['type_utilisateur']) === "admin") {
                        session_start();
                        header('location: gestionProduits.php');          
                    }
            else if (!isset($row['type_utilisateur']) === "client"){
                        session_start();
                        header('location: gestionCatalogueProduits.php');
                    }

    endforeach;

        }
         <form id="identification" action="authentification.php" method="post">
                <label>Identifiant</label>
                <input type="text" name="adresse_courriel" value="" required>
                <label>Mot de passe</label>
                <input type="password" name="mot_passe" value="" required>
                <input type="submit" name="envoi" value="Envoyez">
            </form>
           /****************************************************************************************/
  function sqlControlerUtilisateur($conn, $adresse_courriel, $mot_passe) {
            $req = "SELECT * FROM utilisateurs WHERE adresse_courriel=? AND mot_passe = ?";
           $stmt = mysqli_prepare($conn, $req);
            mysqli_stmt_bind_param($stmt, "ss", $adresse_courriel,$mot_passe);

    if (mysqli_stmt_execute($stmt)) {
        $result = mysqli_stmt_get_result($stmt);
        $nbResult = mysqli_num_rows($result);
        $row = array();
        if ($nbResult) {
            mysqli_data_seek($result, 0);
            $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
        }
        mysqli_free_result($result);
        return $row;
    } else {
        errSQL($conn);
        exit;
    }
}

l'aide SVP!!

[SF4]symfony-collection plugin dans symfony 4

$
0
0

Bonjour,

J'ai un formulaire pour ajouter des Ads(les publicités) et pour chaque Ad je doit ajouter des image : le site est comme airbnb(gestion des annonces)
alors j'ai un formulaire imbriqué (collection d'image dans le formulaire pour ajouter des Ads):

AdType.php :

public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', TextType::class, $this->getConfiguration("titre", "tapez un super titre pour votre annonce"))
            ->add('slug', TextType::class, $this->getConfiguration("Adresse web", "tapez l'adresse web (automatique)"))
            ->add('coverImage', UrlType::class, $this->getConfiguration("Url de l'image principal", "Donnez l'adresse d'une image qui donne vraiment envie"))
            ->add('introduction', TextType::class, $this->getConfiguration("introduction", "donnez une description global de l'annonce"))
            ->add('content', TextareaType::class, $this->getConfiguration("Description detaille", "tapez une description qui donne vraiment envie de venir chez vous !"))
            ->add('rooms', IntegerType::class, $this->getConfiguration("Nombre de chambre", "le nom de chambres disponibles"))
            ->add('price', MoneyType::class, $this->getConfiguration("Prix par nuit", "indiquez le prix que voulez pour une nuit"))
            ->add('images',CollectionType::class, [
                'entry_type' => ImageType::class,
                'allow_add' => true
            ])
        ;
    }

et voici imageType.php :

<?php
 
namespace App\Form;
 
use App\Entity\Image;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\UrlType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
 
class ImageType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('url', UrlType::class, [
                "attr" => [
                    'placeholder' => "Url de l'image"
                ]
            ])
            ->add('caption', TextType::class, [
                "attr" => [
                    'placeholder' => "Titre de l'image"
                ]
            ])
        ;
    }
 
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => Image::class,
        ]);
    }
}

je veux installer et utiliser ce plugin

depuis la documentation :

symfony-collection form theme will be installed in app/Resources/views

symfony-collection jquery plugin will be installed in web/js.

mais je n'ai pas le dossier app ni web dans mon projet :

mon projet et de version 4.4.1
merci d'avance

Problem with CCS animation

$
0
0

Bonjour,

Voila je rencontre un petit problème avec mon code.

Ce que je fais

Je cherche à faire apparaitre une image au meme titre que sur flarum.org

Ce que j'obtiens

L'image n'apparait pas ou alors elle apparait et disparait au bout d'une seconde

Hi,

I have a problem on my Jekyll page with Google Chome.

It is same code than flarum.org but not working for me on Chrome

Indeed, the screenshoot works well with Firefox but not with Chrome.

it looks appears and disappear instantally

Please find my page: https://batteries-forum.com

Problem seems to be from the CSS animation;

@-webkit-keyframes fadeUp {
0% {opacity: 0; transform: translateY(10px)}
100% {opacity: 1; transform: translateY(0)}
}

@-moz-keyframes fadeUp {
0% {opacity: 0; transform: translateY(10px)}
100% {opacity: 1; transform: translateY(0)}
}

@-o-keyframes fadeUp {
0% {opacity: 0; transform: translateY(10px)}
100% {opacity: 1; transform: translateY(0)}
}

@keyframes fadeUp {
0% {opacity: 0; transform: translateY(10px)}
100% {opacity: 1; transform: translateY(0)}
}

.fadeUp {
-webkit-animation-name: fadeUp;
-moz-animation-name: fadeUp;
-o-animation-name: fadeUp;
animation-name: fadeUp;
}

I think the problem is with the URL because url transform with "_2x" inside

Thanks for your help

Viewing all 13822 articles
Browse latest View live