Some revcms problems I need help with...

Status
Not open for further replies.

Nailezned

Member
May 24, 2012
63
9
PROBLEM RESOLVED. Thanks anyway!

SO...

I got this problem in HK using Mango;
PHP:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\app\tpl\class.js.php on line 24

I think this also shows up when I switch to Priv ^^
so help me guys...

BTW, what's the best SWF pack?
 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
For SWF pack, use mine (loads of custom SWFs + working SWFs + new :enable effect + "almost" updated clothings 'except Habbo has now'):


For that error, go to C:\xampp\htdocs\app\tpl\class.js.php then paste the line 24.
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
Give us the foreach() loop that the error is at. And if theres any variables used in the foreach loop (between the ( and ) not { }) give us those too if they are declared anywhere else than there.
 

Nailezned

Member
May 24, 2012
63
9
Give us the foreach() loop that the error is at. And if theres any variables used in the foreach loop (between the ( and ) not { }) give us those too if they are declared anywhere else than there.

I'll give you the whole line:
PHP:
foreach (glob("app/tpl/skins/".$_CONFIG['template']['style']."/hk/js/*.js") as $filename)
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
Try to var_dump it like this:
PHP:
echo '<pre>';
var_dump(glob("app/tpl/skins/".$_CONFIG['template']['style']."/hk/js/*.js"));
echo '</pre>';
If it doesn't return anything, it's because there is something wrong with the path or the $_CONFIG['template']['style'] variable. Try to echo that too
PHP:
echo $_CONFIG['template']['style']
and see what it returns.

Give us the results :)
 

Nailezned

Member
May 24, 2012
63
9
Try to var_dump it like this:
PHP:
echo '<pre>';
var_dump(glob("app/tpl/skins/".$_CONFIG['template']['style']."/hk/js/*.js"));
echo '</pre>';
If it doesn't return anything, it's because there is something wrong with the path or the $_CONFIG['template']['style'] variable. Try to echo that too
PHP:
echo $_CONFIG['template']['style']
and see what it returns.

Give us the results :)

Can I paste it to index.php? and then I'll post what it returns.

-----------------------------------

edit!

Here's what I got after posting those two php codes into Mango's index.php:

for the vardump:
PHP:
bool(false)

for the path:
PHP:
Mango

BTW, here's my index.php so you could see If I actually messed up on pasting those codes:
HTML:
<?php
echo '<pre>';
var_dump(glob("app/tpl/skins/".$_CONFIG['template']['style']."/hk/js/*.js"));
echo '</pre>'
?>
<?php
echo $_CONFIG['template']['style']
?>
<div id="loginbox">
<img src="app/tpl/skins/Mango/images/logo.png" id="logo"/>
<span id="stats">{online} Users Online!</span>
<div id="clear"></div>
<hr/>
<div id="login_image">
<div id="main_login">
<?php if(isset($template->form->error)) { echo '<div id="message">'.$template->form->error.'</div>'; } ?>
<strong>Welcome to {hotelName}!</strong><br/>
Please login with your account or click Register to create one
<div style="height:5px;"></div>
<form action="index" method="post">
<table width="200" border="0">
<tr>
<td>Username<br/>
<input type="text" name="log_username" id="username"/></td>
</tr>
<tr>
<td>Password<br/>
<input type="password" name="log_password" id="password"/></td>
</tr>
<tr>
<td>
<input type="submit" name="login" id="button" value="Login" style="margin-right:2px; width: 104px;"/><input type="button" style="width: 104px;" name="button2" id="button" value="Register" onclick='window.location="register"'/> </td>
</tr>
</table>
</form>
</div>
</div>
<hr/><center>Powered by <b></b><a href="http://devbest.com/threads/0-9-revcms-php-mysql.8746/">RevCMS</a></b> coded by <b>Kryptos</b> | Design by <b>dannyy94</b> | Copyright &copy {hotelName} Hotel</center>
</div>
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
Try this and send what it returns - remember to place this above the foreach loop that cause the problem not inside and not replace.
PHP:
<?php
    echo '<h3>This Folder</h3>';
    echo '<pre>';
    var_dump(glob('*'));
    echo '</pre>';
 
    echo '<h3>app/</h3>';
    echo '<pre>';
    var_dump(glob('app/*'));
    echo '</pre>';
 
    echo '<h3>app/tpl/</h3>';
    echo '<pre>';
    var_dump(glob('app/tpl/*'));
    echo '</pre>';
 
    echo '<h3>app/tpl/skins/</h3>';
    echo '<pre>';
    var_dump(glob('app/tpl/skins/*'));
    echo '</pre>';
 
    echo '<h3>app/tpl/skins/'.$_CONFIG['template']['style'].'/</h3>';
    echo '<pre>';
    var_dump(glob('app/tpl/skins/'.$_CONFIG['template']['style'].'/*'));
    echo '</pre>';
 
    echo '<h3>app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/</h3>';
    echo '<pre>';
    var_dump(glob('app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/*'));
    echo '</pre>';
 
    echo '<h3>app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/js/ (JavaScript files)</h3>';
    echo '<pre>';
    var_dump(glob('app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/js/*.js'));
    echo '</pre>';
?>
 

Nailezned

Member
May 24, 2012
63
9
Here's what I get on ASE when I pasted the lines above the foreach()

PHP:
This Folder
 
array(4) {
  [0]=>
  string(10) "global.php"
  [1]=>
  string(9) "index.php"
  [2]=>
  string(8) "tiny_mce"
  [3]=>
  string(2) "ts"
}
 
app/
 
bool(false)
 
app/tpl/
 
bool(false)
 
app/tpl/skins/
 
bool(false)
 
app/tpl/skins/Mango/
 
bool(false)
 
app/tpl/skins/Mango/hk/
 
bool(false)
 
app/tpl/skins/Mango/hk/js/
 
bool(false)
 
Status
Not open for further replies.

Users who are viewing this thread

Top