XoNoX Posted July 2, 2006 Share Posted July 2, 2006 HIThis is my first post :DI get a problem with my scriptMy script:[quote]<?include "./conf/config.inc";include "./conf/mysql_con.php";$mysql = new mysql_con();$dbCon = $mysql -> connect();include "./conf/super_admin_id_check.php";?><html><head><title>K2Web Class</title><meta http-equiv="refresh" content="0;URL=<?=$USER_HOME.$superadmin_id?>/"></head><body></body></html>[/quote]I run the same script in diferent server(www.whois.co.kr and www.godaddy.com) and just workiing with whois.co.krand I get error in godaddy[quote]connect(); include "./conf/super_admin_id_check.php"; ?>[/quote]I need to know how can I change this, I need to fix it, because I wanna change my server.THANX ;D Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/ Share on other sites More sharing options...
wildteen88 Posted July 2, 2006 Share Posted July 2, 2006 Use the full opening PHP tags, so chnage [b]<?[/b] to [b]<?php[/b] Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52102 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 thanx :Dand how to close the tags? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52105 Share on other sites More sharing options...
.josh Posted July 2, 2006 Share Posted July 2, 2006 same as you had. <?php ... ?> Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52107 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=Crayon Violent link=topic=99209.msg390609#msg390609 date=1151864379]same as you had. [quote]<?php ... ?>[/quote]still not working :-[this is my site[quote]http://www.coreanito.com[/quote]my new code is[quote]<?phpinclude "./conf/config.inc";include "./conf/mysql_con.php";$mysql = new mysql_con();$dbCon = $mysql -> connect();include "./conf/super_admin_id_check.php";?><html><head><title>K2Web Class</title><meta http-equiv="refresh" content="0;URL=<?=$USER_HOME.$superadmin_id?>/"></head><body></body></html>[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52113 Share on other sites More sharing options...
.josh Posted July 2, 2006 Share Posted July 2, 2006 is that the correct path of super_admin_id_check.php? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52115 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=Crayon Violent link=topic=99209.msg390618#msg390618 date=1151864761]is that the correct path of super_admin_id_check.php?[/quote]yes$USER_HOME.$superadmin_id?$USER_HOME must been load at [b]"include "./conf/config.inc";"[/b]and$superadmin_id must been load at [b]include "./conf/mysql_con.php";[/b] Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52120 Share on other sites More sharing options...
.josh Posted July 2, 2006 Share Posted July 2, 2006 well your error points to your include command, right? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52124 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 yes include command not workinginclude "./conf/config.inc";include "./conf/mysql_con.php";Why? ??? my srcipt is correct Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52129 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 my script isnt loading the files config.inc and mysql_con.phpcan I change it?But the same script work in another server, why is the diferent? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52142 Share on other sites More sharing options...
corbin Posted July 2, 2006 Share Posted July 2, 2006 [quote author=XoNoX link=topic=99209.msg390632#msg390632 date=1151865538]yes include command not workinginclude "./conf/config.inc";include "./conf/mysql_con.php";Why? ??? my srcipt is correct[/quote]/ reffers to the web root if I'm thinking right (i could be wrong :(). So is your conf folder at your webroot. Try making a relative path? Like if you have your main folder try putting the conf folder in there and make it include "conf/config.inc";include "conf/mysql_con.php";Im not sure if that will work... Hehe I'm incorrect quite often. Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52143 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=corbin link=topic=99209.msg390646#msg390646 date=1151866524][quote author=XoNoX link=topic=99209.msg390632#msg390632 date=1151865538]yes include command not workinginclude "./conf/config.inc";include "./conf/mysql_con.php";Why? ??? my srcipt is correct[/quote]/ reffers to the web root if I'm thinking right (i could be wrong :(). So is your conf folder at your webroot. Try making a relative path? Like if you have your main folder try putting the conf folder in there and make it include "conf/config.inc";include "conf/mysql_con.php";Im not sure if that will work... Hehe I'm incorrect quite often.[/quote]ThanxBut still not working :-\Can I replace the include command with another one? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52150 Share on other sites More sharing options...
corbin Posted July 2, 2006 Share Posted July 2, 2006 [quote author=XoNoX link=topic=99209.msg390653#msg390653 date=1151866856][quote author=corbin link=topic=99209.msg390646#msg390646 date=1151866524][quote author=XoNoX link=topic=99209.msg390632#msg390632 date=1151865538]yes include command not workinginclude "./conf/config.inc";include "./conf/mysql_con.php";Why? ??? my srcipt is correct[/quote]/ reffers to the web root if I'm thinking right (i could be wrong :(). So is your conf folder at your webroot. Try making a relative path? Like if you have your main folder try putting the conf folder in there and make it include "conf/config.inc";include "conf/mysql_con.php";Im not sure if that will work... Hehe I'm incorrect quite often.[/quote]ThanxBut still not working :-\Can I replace the include command with another one?[/quote]try:include("conf/config.inc");include("conf/mysql_con.php"); Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52152 Share on other sites More sharing options...
XoNoX Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=corbin link=topic=99209.msg390655#msg390655 date=1151867110][quote author=XoNoX link=topic=99209.msg390653#msg390653 date=1151866856][quote author=corbin link=topic=99209.msg390646#msg390646 date=1151866524][quote author=XoNoX link=topic=99209.msg390632#msg390632 date=1151865538]yes include command not workinginclude "./conf/config.inc";include "./conf/mysql_con.php";Why? ??? my srcipt is correct[/quote]/ reffers to the web root if I'm thinking right (i could be wrong :(). So is your conf folder at your webroot. Try making a relative path? Like if you have your main folder try putting the conf folder in there and make it include "conf/config.inc";include "conf/mysql_con.php";Im not sure if that will work... Hehe I'm incorrect quite often.[/quote]ThanxBut still not working :-\Can I replace the include command with another one?[/quote]try:include("conf/config.inc");include("conf/mysql_con.php");[/quote]thanx, but sorry, still not workingAnd if I change some php.ini configuration? Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52156 Share on other sites More sharing options...
corbin Posted July 2, 2006 Share Posted July 2, 2006 I dont think it has anything to do with the php config file... I think something in your directories is wrong... Try something real quick and this can tell if its a problem with php or the script.Make a folder thats accessible by a web browser put a file in it and name it index.php in index.php put[code]<? include('inc/inc.php'); ?>[/code] then make a folder inside that folder named inc and make a file in inc named inc.php and in inc.php put [code]<? echo "hello"; ?>[/code]and then go to the index.php file in a web browser and see if it says hello. If it says hello something is wrong in the syntax of the script you made this thread about... Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52178 Share on other sites More sharing options...
XoNoX Posted July 3, 2006 Author Share Posted July 3, 2006 [quote author=corbin link=topic=99209.msg390682#msg390682 date=1151869993]I dont think it has anything to do with the php config file... I think something in your directories is wrong... Try something real quick and this can tell if its a problem with php or the script.Make a folder thats accessible by a web browser put a file in it and name it index.php in index.php put[code]<? include('inc/inc.php'); ?>[/code] then make a folder inside that folder named inc and make a file in inc named inc.php and in inc.php put [code]<? echo "hello"; ?>[/code]and then go to the index.php file in a web browser and see if it says hello. If it says hello something is wrong in the syntax of the script you made this thread about...[/quote]thanxAnd the include command work. Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52265 Share on other sites More sharing options...
XoNoX Posted July 3, 2006 Author Share Posted July 3, 2006 My problem has been resolved.My problem was the file name. My index name was index.html, I changed by inde.php, and work perfectI dont know why, but in another server work fine with index.htmlThannk you ;D Quote Link to comment https://forums.phpfreaks.com/topic/13476-got-php-script-problem/#findComment-52269 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.