Page 2 of 2

Posted: Mon Oct 27, 2003 6:40 pm
by johnperkins21
It's an internal dev server.

Posted: Mon Oct 27, 2003 6:55 pm
by d3ad1ysp0rk
is there any way for you to upload it to a different server to see if it is infact your computer?

Posted: Mon Oct 27, 2003 8:05 pm
by m3rajk
johnperkins21 wrote:Apparently I should just give up. Now I just get a blank page. I tried another php page in the same directory and it works fine (another image gallery that I d/l to get ideas). It is very strange.

For the record:

Server is Red Hat 8 running Apache 1.3.22 with PHP 4.3.2.
Using IE 6.0.2 locally to view and Dreamweaver to edit the files directly on the server (just switched to Wordpad though 10 minutes ago). Local machine running WinXP completely updated. If you guys have any ideas, I'd be happy to hear 'em.
i hate the added crap dreamweaver puts there. have you thought about getting emacs or xemacs? (both have winblows ports)

how about testing it with a browser that understands what a standard is? (ie: not M$IE)

Posted: Mon Oct 27, 2003 10:57 pm
by McGruff
A quick side note on adding elements to arrays: it is quite important to declare $var = array(); before adding elements with $var[] = 'value';

If you don't, $var is initially undefined. This can create a big security risk particularly if register globals is on. An attacker could set an initial value for your $var if you do not.

The max E_ALL error reporting level will report undefined vars - always develop with that.

Posted: Mon Oct 27, 2003 11:00 pm
by m3rajk
i have mine on e-all &~ notice

that was the default.

i guess my misthought that it was needed was actually a good thing since it's more secure.

Posted: Tue Oct 28, 2003 3:36 am
by JAM
McGruff wrote:The max E_ALL error reporting level will report undefined vars - always develop with that.
Just wanting to state that my configuration does not show you any errors, as below snippet shows, when adding array val's without declaring the array per se.

Code: Select all

PHP Version: 4.3.4RC2-dev
Display Errors: 1
Error Level: E_ALL
Register Globals: Off

<?php
$array[] = '<pre>';
$array[] = 'PHP Version: '.phpversion()."\n";
$array[] = 'Display Errors: '.ini_get('display_errors')."\n";
$array[] = 'Error Level: '.(ini_get('error_reporting') == '2047' ? 'E_ALL' : 'Not E_ALL')."\n";
$array[] = 'Register Globals: '.(ini_get('register_globals') == '' ? 'Off' : 'On')."\n";
$array[] = '</pre>';

foreach ($array as $val) { echo $val; }
show_source(__FILE__);
?>

Posted: Wed Oct 29, 2003 12:04 pm
by johnperkins21
I ended up getting it to work. My problem had something to do with the way Macromedia Dreamweaver created the file. I have switched to using JEdit and things are working properly. I was also trying to open the file directly in my browser as opposed to loading it from the site (ie. localhost/directory/file.php)

Thank you very much for all the help guys. I greatly appreciate it.

Posted: Wed Oct 29, 2003 2:28 pm
by m3rajk
heh. somehow i'm not suprised macromedia's added crap caused an issue. there's a thread on editors, if you wanna look at what toehrs use.

a number (two imparticular that i mention) are free and quite versatile

viewtopic.php?t=6288