When attempting to install the b4 release, I get the following errors (when choosing "Expert Installation":
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/reasonableness.com/httpdocs/blog/include/functions_installer.inc.php on line 370 (Repeated 5 times)
I click "Complete Installation" and these errors occur:
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/reasonableness.com/httpdocs/blog/include/admin/installer.inc.php on line 35 (Repeated 5 times)
Fatal error: Call to undefined function: serendipity_db_probe() in /home/httpd/vhosts/reasonableness.com/httpdocs/blog/include/functions_installer.inc.php on line 527
This is with PHP 4.3.10, MySQL, no Imagemagick library.
Any ideas? (I've installed previous 7.x releases of Serendipity on different servers, never encountered problems like this before.)
Thanks!
Invalid argument supplied for foreach()
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Invalid argument supplied for foreach()
This error seems to happen because serendipity cannot parse the file include/tpl/config_local.inc.php - check if that file exists?
Maybe you got a corrupted tarball.
Regards,
Garvin
Maybe you got a corrupted tarball.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
RadBryan
-
RadBryan
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
This may be caused by a special CGI setup of php. Can you give me a link to a phpinfo() output? I cannot reproduce this anywhere on my machine 
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Wow. I've never seen such a overfilled PHP/Apache combination! You load about any module that is available; I'm quite sury any of these modules create trouble; maybe some of the encoders or additional modules.
I'm really sorry, but this is too hard to debug, there are just so many components which could act weird. I can only offer you to look at it if you give me FTP access to the blog directory, then I'll do some debugging.
Regards,
Garvin
I'm really sorry, but this is too hard to debug, there are just so many components which could act weird. I can only offer you to look at it if you give me FTP access to the blog directory, then I'll do some debugging.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Thanks to the help of RadBryan by supplying me with FTP data, I got his problem down to a thing.
Bryan, your PHP installation is garbaged. It produces wrong results when iterating through an array. I created a test.php:
This produces this output on your machine
while this is the output that is produced on a right server:
As you can see, your PHP module returns completely wrong array indizes.
For PHP 4.3.10 this can happen because they changed the bytecode of the foreach() operation. This caused quite some seroius bugs using the zendEncoder or other zend bytecode compilers, causing the exact same problem.
As your phpinfo() tells that you are using the ionCube encode, it looks that this is creating the trouble for you. Deactivate that module and you should be fine!
Regards,
Garvin
Bryan, your PHP installation is garbaged. It produces wrong results when iterating through an array. I created a test.php:
Code: Select all
<?php
$test = array(
'database' => array(
'items' => array(
array(
'var' => '1',
'nothing' => '2'),
array(
'var' => '3',
'nothing' => '4')
)
),
'paths' => array(
'items' => array(
array(
'var' => '1',
'nothing' => '2'),
array(
'var' => '3',
'nothing' => '4')
)
)
);
print_r($test);
foreach($test AS $category) {
print_r($category);
}
Code: Select all
Array
(
[database] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
[paths] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
)
Array
(
[0] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
[1] => database
)
Array
(
[0] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
[1] => paths
)
Code: Select all
Array
(
[database] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
[paths] => Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
)
Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
Array
(
[items] => Array
(
[0] => Array
(
[var] => 1
[nothing] => 2
)
[1] => Array
(
[var] => 3
[nothing] => 4
)
)
)
As you can see, your PHP module returns completely wrong array indizes.
For PHP 4.3.10 this can happen because they changed the bytecode of the foreach() operation. This caused quite some seroius bugs using the zendEncoder or other zend bytecode compilers, causing the exact same problem.
As your phpinfo() tells that you are using the ionCube encode, it looks that this is creating the trouble for you. Deactivate that module and you should be fine!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/