Hi,
We recently experienced a server crash. We had our hosting company reinstall our entire system and they installed PHP 5.0.4. We previously were using PHP 5.0.3.
99.9% of everything worked fine after the reinstall (we are also using Ensim, which is why they used that version of PHP). However, we are having a problem with our arrays.
Here is a quick example of code, followed by a description of the problem:
// sql query
$counter = 0;
while($row = mysql_fetch_array($queryResult))
{
$program_id[$counter] = $row['program_id'];
$program_name[$counter] = $row['program_name'];
$program_fee[$counter] = $row['program_fee'];
$counter++;
}
// program ids should be 57,58,59,60
The values in the arrays look something like this (comma seperates each value):
$program_id: 5556
$program_name: program1,program2,program3,program4
$program_fee:10.00,15.00,10.00,10.00
Notice that the program id is not an array, but just a number made up of the first digits of each value.
Does anyone know why this is happening? It works fine on our test server, which has almost no configuration options. Here is a list of the configuration options used:
Also, if I add $program_id = array() before the loop, it works fine. However, we have many instances of this sort of loop, so it would take quite some time to fix all the issues. I'm looking for something in the config file that is causing it so I can change it.
phpinfo() wrote:
Live Server
'./configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'
Test Server
cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"