Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

mauro26

Problemas com CakePHP/CSS e exportaçao

Recommended Posts

Boas Irmaos, tenho aqui umas grandes dores de cabeça, hoje me deram uma tarefa para resolver, uma tarefa bem simples para o que era, até que quando peguei nele foi como se me tivessem mandado um balde de agua fria.

Primeiro problema é com o CSS, vejome á rasca para perceber a sua construçao, pois parece não basta so mexer no styles mas também noutros scripts, alguem me pdoe orientar?

Segundo e o pior de todos, a sua exportaçao, o site exporteilhe para o meu servidor, para o meu localhost, para trabalhar com mais rapidez, so que ele não me dá, so fica com uma pagina branca, ja modifiquei as credenciais do script database.php, mas n me funciona e se não conectar tou lixado, pois fazendo por internet é um filmeee dos grandes, pois so para fazer o refresh da pagina demora uma eternidade incrivel.

 

Espero que me possam ajudar brothers

 

P.S. Quanto a pagina branca esqueci de ligar o php errors, os erros sao o seguinte:

 

Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\trabalho\webroot\index.php on line 161

Warning: include() [function.include]: Failed opening 'cake\bootstrap.php' for inclusion (include_path='C:\wamp\www\core;C:\wamp\www\trabalho\;.;C:\php5\pear') in C:\wamp\www\trabalho\webroot\index.php on line 161

Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in C:\wamp\www\trabalho\webroot\index.php on line 163

Ficam bem

Compartilhar este post


Link para o post
Compartilhar em outros sites

Primeiramente gostaria que você abrisse o arquivo /webroot/index.php e me dissesse como estão definidas as variáveis:

 

if ( !defined('CAKE_CORE_INCLUDE_PATH') ) {
	define( 'CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cakephp-1.3.4-0' );
}

Att.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bem Tyler, aqui este index está um grande trocadilho, n tenho a certeza se é essa parte do codigo, por isso deixo aqui o codigo do index, desculpa lá ter que expor esse codigo todo, :S

 

Obrigado pela resposta rapida

 

<?php

/* SVN FILE: $Id: index.php 4216 2010-04-21 12:14:26Z siva_063at09 $ */

/**

 * Short description for file.

 *

 * Long description for file

 *

 * PHP versions 4 and 5

 *

 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)

 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)

 *

 * Licensed under The MIT License

 * Redistributions of files must retain the above copyright notice.

 *

 * @filesource

 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)

 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project

 * @package       cake

 * @subpackage    cake.app.webroot

 * @since         CakePHP(tm) v 0.2.9

 * @version       $Revision: 7805 $

 * @modifiedby    $LastChangedBy: AD7six $

 * @lastmodified  $Date: 2008-10-30 23:00:26 +0530 (Thu, 30 Oct 2008) $

 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License

 */

/**

 * Use the DS to separate the directories in other defines

 */

	if (!defined('DS')) {

		define('DS', DIRECTORY_SEPARATOR);

	}

/**

 * These defines should only be edited if you have cake installed in

 * a directory layout other than the way it is distributed.

 * When using custom settings be sure to use the DS and do not add a trailing DS.

 */



/**

 * The full path to the directory which holds "app", WITHOUT a trailing DS.

 *

 */

	if (!defined('ROOT')) {

		define('ROOT', dirname(dirname(dirname(__FILE__))));

	}

/**

 * The actual directory name for the "app".

 *

 */

	if (!defined('APP_DIR')) {

		define('APP_DIR', basename(dirname(dirname(__FILE__))));

	}

/**

 * The absolute path to the "cake" directory, WITHOUT a trailing DS.

 *

 */

	if (!defined('CAKE_CORE_INCLUDE_PATH')) {

	    define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'core');

	}



/**

 * Editing below this line should not be necessary.

 * Change at your own risk.

 *

 */

	if (!defined('WEBROOT_DIR')) {

		define('WEBROOT_DIR', basename(dirname(__FILE__)));

	}

	if (!defined('WWW_ROOT')) {

		define('WWW_ROOT', dirname(__FILE__) . DS);

	}

	if (!defined('CORE_PATH')) {

		if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {

			define('APP_PATH', null);

			define('CORE_PATH', null);

		} else {

			define('APP_PATH', ROOT . DS . APP_DIR . DS);

			define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);

		}

	}

	if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {

		trigger_error("CakePHP core could not be found.  Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);

	}

	if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {

		return;

	} else {

		$Dispatcher = new Dispatcher();

		$Dispatcher->dispatch($url);

	}

	if (Configure::read() > 0) {

		echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";

	}

?>


Compartilhar este post


Link para o post
Compartilhar em outros sites

Diga-me, o diretório /cake/ está na sua app ou na raiz do servidor?

 

Caso não esteja na aplicação, deve alterar este caminho e informar onde está:

 

define( 'CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cakephp-1.3.4-0' );

Compartilhar este post


Link para o post
Compartilhar em outros sites

O directorio cake criei á pouco no meu localhost e exportei os files do servidor web, mas no servidor web n tinha directorio cake, simplesmente estava dispota desta forma:

 

public_html:

app/

cgi-bin/

core/

custom/

.htacess

Compartilhar este post


Link para o post
Compartilhar em outros sites

você não está ajudando....

 

Me diga: ocorriam os warnings apenas no servidor ou no localhost?

 

Se não tem diretório cake no servidor então envie para a raiz de public_html e informe este diretório onde eu te disse 2 vezes (3 com esta):

 

define( 'CAKE_CORE_INCLUDE_PATH', 'raizdoservidor . DS . 'public_html' . DS . 'cakephp-1.3.4-0' );

Compartilhar este post


Link para o post
Compartilhar em outros sites

Vamos me dê detalhes!

 

O diretório cake está dentro de sua app ou na raiz do servidor?

 

Você só disse que criou no localhost mas não explicou onde...

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ah, ufa! |o|

Bom, então informe desta forma:

define( 'CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cakephp' );
E veja se resolve o problema.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Mas defino no WEB ROOT DIR, WWW_ROOT ou APP path?

 

deume o seguinte erro:


Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\cake\app\webroot\index.php on line 161

Warning: include() [function.include]: Failed opening 'cake\bootstrap.php' for inclusion (include_path='C:\wamp\www\cakephp;C:\wamp\www\cake\app\;.;C:\php5\pear') in C:\wamp\www\cake\app\webroot\index.php on line 161

Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in C:\wamp\www\cake\app\webroot\index.php on line 163


Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\cake\app\webroot\index.php on line 161

Warning: include() [function.include]: Failed opening 'cake\bootstrap.php' for inclusion (include_path='C:\wamp\www\cakephp;C:\wamp\www\cake\app\;.;C:\php5\pear') in C:\wamp\www\cake\app\webroot\index.php on line 161

Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in C:\wamp\www\cake\app\webroot\index.php on line 163

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.