Page 2 of 3
Posted: Fri Oct 31, 2003 11:16 am
by scorphus
Wow... Didn't even get a single line outputed? No error? Please post the output of twigletmac's code...
Regards,
Scorphus.
Posted: Fri Oct 31, 2003 11:28 am
by volka
I tried twigletmac's code and with a small modification it's working
$sql = "INSERT INTO mactrix";
(missing space after mactrix or before SET in 'the next line')
But as a sidenote:
$sql .= "SET assetnum='".$_POST['assetnum']."', cpu='".$_POST['cpu']."', os='".$_POST['os']."', loc='".$_POST['loc']."', sn='".$_GET['sn']."', macaddress='".$_POST['macaddress']."', warrentee='".$_POST['warrentee']."'";
never ever let userinput get unfiltered in a sql-query. Unless you're absolutly sure that magic_quotes are enabled
and you find that to be sufficient take a look at
mysql_escape_string()
Posted: Fri Oct 31, 2003 11:36 am
by Mactek
Still not working. I open the page, nothing comes up and there are no errors.
Posted: Fri Oct 31, 2003 12:23 pm
by volka
nothing at all?
Then it's probably a parse error. Check the error.log of your webserver if you have access to. If not - because you're using a shared host somewhere - it's probably a good idea to install php locally for testing. For a syntax check you don't even need a webserver.
Posted: Fri Oct 31, 2003 1:47 pm
by Mactek
I am running this locally. This all has to do with the Panther Update and my variables. Ever since i updated to Panther nothing has been working right. I reconfigured my config file and i turned register_globals off in my php.ini file. Other than that i don't know where to begin.
Posted: Sun Nov 02, 2003 4:36 am
by twigletmac
If display_errors is off you need to turn it on. Locate your php.ini file and change it's value to on.
Mac
Posted: Mon Nov 03, 2003 10:56 am
by Mactek
Ok i turned Display_errors ON and restarted, and still nothing shows up. No errors and nothing on the page.
Posted: Mon Nov 03, 2003 11:28 am
by volka
does any php script run?
e.g.?
Did you check the webserver(application)'s error.log?
parse errors only show up there unless you set
display_startup_errors = On in your php.ini (if you do check the value again with phpinfo(); )
Posted: Mon Nov 03, 2003 11:56 am
by Mactek
Yes, PHP info works fine.
Posted: Mon Nov 03, 2003 4:36 pm
by Mactek
Yes display_startup_errors is off also. I don't understand this. It seems like i'm gonna have to re-write all of my code all over again cause i upgraded to Panther, now that's a bummer!!
Posted: Mon Nov 03, 2003 4:55 pm
by d3ad1ysp0rk
what a great "upgrade"
maybe you should talk to the tech support for panther about this? im sure they have a forum or something
Posted: Mon Nov 03, 2003 5:09 pm
by jason
Try
http://www.phpmac.com and the forums here. James is usually pretty good with this PHP + Mac stuff.
Posted: Tue Nov 04, 2003 10:28 am
by Mactek
Thank you! I sent an email off to James or Support.
Posted: Thu Nov 06, 2003 12:43 pm
by Mactek
Hello again! Twigletmac, I finally got my errors working again. You gave me code back on page 1 of this Thread to try out. This is my error:
Parse error: parse error in /Library/WebServer/Documents/mfsmsd/forumgetmethtest.php3 on line 59
I noticed that another user said to add a space in the insert statement, i also did that. Any ideas why i am getting a parse error? Thank you for all your time Twigletmac and everyone else who has posted!!
Posted: Fri Nov 07, 2003 4:55 am
by twigletmac
Could you post lines 50 to 65 so we can try and sort out the parse error?
Mac