Newbie help
Moderator: General Moderators
- johnperkins21
- Forum Contributor
- Posts: 140
- Joined: Mon Oct 27, 2003 4:57 pm
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
i hate the added crap dreamweaver puts there. have you thought about getting emacs or xemacs? (both have winblows ports)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.
how about testing it with a browser that understands what a standard is? (ie: not M$IE)
Last edited by m3rajk on Wed Oct 29, 2003 2:26 pm, edited 1 time in total.
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.
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.
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.McGruff wrote:The max E_ALL error reporting level will report undefined vars - always develop with that.
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__);
?>- johnperkins21
- Forum Contributor
- Posts: 140
- Joined: Mon Oct 27, 2003 4:57 pm
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.
Thank you very much for all the help guys. I greatly appreciate it.
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
a number (two imparticular that i mention) are free and quite versatile
viewtopic.php?t=6288