Visualizzazione dei risultati da 1 a 3 su 3

Discussione: php mi chiude apache

  1. #1

    php mi chiude apache

    salve,

    secondo come scrivo la pagina php (mi basta commentare una riga di codice), apache mi da un errore (quella che mi dice se spedire il dump o meno) e mi si chiude.

    La questione è alquanto insolita e il codice non mi pare che abbia qualcosa di insolito.

    Provo a postare il codice anche se non penso serva a qualcosa.

    Error log di apache:
    [Sat Feb 14 19:10:15 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
    [Sat Feb 14 19:10:15 2009] [notice] Server built: Dec 10 2008 00:10:06
    [Sat Feb 14 19:10:15 2009] [notice] Parent: Created child process 1516
    [Sat Feb 14 19:10:16 2009] [notice] Digest: generating secret for digest authentication ...
    [Sat Feb 14 19:10:16 2009] [notice] Digest: done
    [Sat Feb 14 19:10:16 2009] [notice] Child 1516: Child process is running
    [Sat Feb 14 19:10:16 2009] [notice] Child 1516: Acquired the start mutex.
    [Sat Feb 14 19:10:16 2009] [notice] Child 1516: Starting 250 worker threads.
    [Sat Feb 14 19:10:16 2009] [notice] Child 1516: Starting thread to listen on port 443.
    [Sat Feb 14 19:10:16 2009] [notice] Child 1516: Starting thread to listen on port 80.
    [Sat Feb 14 19:11:22 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
    [Sat Feb 14 19:11:22 2009] [notice] Digest: generating secret for digest authentication ...
    [Sat Feb 14 19:11:22 2009] [notice] Digest: done
    [Sat Feb 14 19:11:23 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
    [Sat Feb 14 19:11:23 2009] [notice] Server built: Dec 10 2008 00:10:06
    [Sat Feb 14 19:11:23 2009] [notice] Parent: Created child process 1456
    [Sat Feb 14 19:11:23 2009] [notice] Digest: generating secret for digest authentication ...
    [Sat Feb 14 19:11:23 2009] [notice] Digest: done
    [Sat Feb 14 19:11:24 2009] [notice] Child 1456: Child process is running
    [Sat Feb 14 19:11:24 2009] [notice] Child 1456: Acquired the start mutex.
    [Sat Feb 14 19:11:24 2009] [notice] Child 1456: Starting 250 worker threads.
    [Sat Feb 14 19:11:24 2009] [notice] Child 1456: Starting thread to listen on port 443.
    [Sat Feb 14 19:11:24 2009] [notice] Child 1456: Starting thread to listen on port 80.
    codice:
    try {
        DBSite::connect();
        $scheda=DBSite::getScheda(5);
    } catch(Exception $e) {
        echo $e;
        include "standardfooter.inc";
        exit();
    }
    Se commento getScheda non succede nulla di anomalo.

    Il codice di getScheda()

    codice:
        /**
         * Permette di caricare una scheda di un elemento tramite il suo ID.
         *
         * @throws DBSiteException Se la scheda non è stata trovata o non è connessoal DB
         * @throws InvalidArgumentException
         * @throws PDOException Se la query non è stata eseguita con successo.
         * @param integer $ID ID della scheda da caricare
         * @param String $TIPO il tipo della scheda da caricare
         * @return DBSiteScheda un oggetto che rappresenta la scheda caricata
         */
        public static function getScheda($ID,$TIPO=NULL) {
            $ID=(int)$ID;
            if($ID<=0)
                throw new InvalidArgumentException('$ID deve essere maggiore di zero.');
            if(isset($TIPO) && !is_string($TIPO))
                throw new InvalidArgumentException('$TIPO deve essere una stringa.');
            if(!DBSite::$is_connected)
                  throw new DBSiteException("DBSite non connesso");
            $sth=DBSite::$PDO->prepare("SELECT * FROM ".TBL_SCHEDE." WHERE ID=?");
            $sth->execute(array($ID));
            $data=$sth->fetch(PDO::FETCH_ASSOC);
            if($data!=false) {
                if(isset($TIPO) && $data['TIPO']!=$TIPO)
                    throw new DBSiteException("Il tipo della scheda non è quello richiesto.");
                return new DBSiteScheda($data);
            } else {
                throw new DBSiteException("Scheda non trovata");
            }
            
        }
    Sto usando Windows XP x64bit con XAMPP.
    Fino ad adesso non mi aveva dato problemi, ora ... non so che dire.
    ...

  2. #2
    sembra che succeda il casino immenso quando nella getSchede eseguo la execute() sulla query.E' molto molto strano che php mandi in errore apache...
    senza poi nemmeno dire molto riguardo all'errore...
    ...

  3. #3
    sembra che il problema sia PDO bacato o php. Il problema è che sono le ultime versioni che ho e che sembrano stabili.
    Io devo continuare lo sviluppo che ho la consegna il 18! Che faccio? potrei provare le vecchie versioni ma capace che sono meno stabili di queste ultime.
    Provando a cercare "3221225477 pdo php" si trovano un sacco di pagine...il problema non è nuovo...

    Sono nella cacca

    dannato php
    ...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.