Invalid argument supplied for foreach()

Visto 37 veces
Saltar al primer mensaje no leído

jvmale

no leída,
16 mar 2012, 12:14:4216/3/12
a bed...@googlegroups.com
i have bedita 3.1 ulmus.

my configuration:
backend: www.dominio.com/bedita
frontend: www.dominio.com/frontends/wp.example.com

after the first installation I encountered this problem in frontend:

Warning (2): Invalid argument supplied for foreach() [/var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php, line 61]

which may be the solution to this problem?

bato

no leída,
16 mar 2012, 12:34:2716/3/12
a bed...@googlegroups.com
Hi jvmale,
that problem sounds strange... 
try to edit /var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php adding after $dirs = glob("*", GLOB_ONLYDIR); (line 59)

pr($dirs);

then reload browser and write me the output.

Try also to use the other sample frontends that you should be in /var/www/vhosts/dominio.com/frontends to check if problem is present also there.

jvmale

no leída,
16 mar 2012, 12:54:5316/3/12
a bed...@googlegroups.com
output:

Array
(
[0] => account
[1] => behaviors
[2] => business
[3] => datasources
[4] => dummy
[5] => objects
)
Warning (2): Invalid argument supplied for foreach() [/var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php, line 62]
______________________________________________________________________________

this error is indented

pr($dirs);
if(sizeof($dirs) > 0) {
foreach($dirs as $dir) {
enableSubFoldersOn - /var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php, line 62
enableSubFoldersOn - /var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php, line 65
require_once - /var/www/vhosts/dominio.com/bedita/bedita-app/config/bootstrap.php, line 150
include - APP/config/bootstrap.php, line 3
Configure::__loadBootstrap() - /var/www/vhosts/dominio.com/cake/libs/configure.php, line 671
Configure::getInstance() - /var/www/vhosts/dominio.com/cake/libs/configure.php, line 129
include - /var/www/vhosts/quilia.it/httpdocs/cake/bootstrap.php, line 46
[main] - APP/webroot/index.php, line 88

____________________________________________________________

Array
(
[0] => collection
[1] => content
[2] => product
)

jvmale

no leída,
16 mar 2012, 12:56:0916/3/12
a bed...@googlegroups.com
Other examples of frontend return a blank page.

bato

no leída,
16 mar 2012, 13:01:1216/3/12
a bed...@googlegroups.com
Make sure that debug is on in config/core.php file of frontend.
You should have

Configure::write('debug', 1);

bato

no leída,
16 mar 2012, 13:16:4416/3/12
a bed...@googlegroups.com
uhmm... the $dirs var contains an array, I don't understand why in the follow foreach php triggers a warning as the argument wasn't an array

Other useful informations:
1) Operating System
2) PHP version and a list of php modules
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos