Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 30/09/2015, à 09:28

PROLIFIIK

Pas d'erreur affichéé pas mon interpreteut PHP dans le navigateur.

Bonjour Chers Ami(e)s
je developpe en Php sous  unbuntu pour créer une application web.
Mais mon petit souci c'est que l'interpreteur PHP n'affiche pas les bugs. Du coup j'arrive pas à me retrouver.
j'ai installé le composant Lampp.
je vous prie de m'apporter votre aide.
Merci et bonne journéé......


Efforcez vous à aimer.
Efforcez-vous à croire en vous.
La verité, c'est que personne ne s' efforce...

Hors ligne

#2 Le 30/09/2015, à 10:54

alius

Re : Pas d'erreur affichéé pas mon interpreteut PHP dans le navigateur.

Va dans le fichier php.ini :

sudo vim /etc/php5/apache2/php.ini

Tu as quelques lignes qui correspondent à l'affichage des erreurs et quels  sont les types d'erreurs qui doivent s'afficher....


Alius

Hors ligne

#3 Le 01/10/2015, à 11:51

PROLIFIIK

Re : Pas d'erreur affichéé pas mon interpreteut PHP dans le navigateur.

j'ai modifié le fichier php.ini
comme ci

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; This directive informs PHP of which errors, warnings and notices you would like
; it to take action for. The recommended way of setting values for this
; directive is through the use of the error level constants and bitwise
; operators. The error level constants are below here for convenience as well as
; some common settings and their meanings.
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
; those related to E_NOTICE and E_STRICT, which together cover best practices and
; recommended coding standards in PHP. For performance reasons, this is the
; recommend error reporting setting. Your production server shouldn't be wasting
; resources complaining about best practices and coding standards. That's what
; development servers and development settings are for.
; Note: The php.ini-development file has this setting as E_ALL. This
; means it pretty much reports everything which is exactly what you want during
; development and early testing.
;
; Error Level Constants:
; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
; E_ERROR           - fatal run-time errors
; E_RECOVERABLE_ERROR  - almost fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_STRICT          - run-time notices, enable to have PHP suggest changes
;                     to your code which will ensure the best interoperability
;                     and forward compatibility of your code
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
; E_DEPRECATED      - warn about code that will not work in future versions
;                     of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
;   E_ALL (Show all errors, warnings and notices including coding standards.)
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL | E_STRICT

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than
; having the errors sent to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = On

Mais ça ne marche pas toujours pas.
Meme quand je fais

error_reporting = E_ALL 

Ça ne fonctionne pas aussi.
Pas contre, j'ai cette configuration  sous Windows et ça fonctionne labas.
Alors est-ce qu'il y aurait une autre méthode de pouvoir afficher les resultats du debogage?
Merci.


Efforcez vous à aimer.
Efforcez-vous à croire en vous.
La verité, c'est que personne ne s' efforce...

Hors ligne

#4 Le 01/10/2015, à 13:10

Rufus T. Firefly

Re : Pas d'erreur affichéé pas mon interpreteut PHP dans le navigateur.

Il faut relancer apache pour que les modifications soient prises en compte...


La provocation est une façon de remettre la réalité sur ses pieds. (Bertolt Brecht)
Il n'y a pas de route royale pour la science et ceux-là seulement ont chance d'arriver à ses sommets lumineux qui ne craignent pas de se fatiguer à gravir ses sentiers escarpés. (Karl Marx)
Il est devenu plus facile de penser la fin du monde que la fin du capitalisme

Hors ligne

#5 Le 01/10/2015, à 15:10

PROLIFIIK

Re : Pas d'erreur affichéé pas mon interpreteut PHP dans le navigateur.

[RESOLU] Après le redemarrage d'apache, tout est redevenu  normal.
Merci de votre aide précieuse.


Efforcez vous à aimer.
Efforcez-vous à croire en vous.
La verité, c'est que personne ne s' efforce...

Hors ligne