Jump to content


Photo

got PHP script problem


  • Please log in to reply
16 replies to this topic

#1 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:15 PM

HI
This is my first post :D


I get a problem with my script

My script:

<?
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>



I run the same script in diferent server(www.whois.co.kr and www.godaddy.com)  and just workiing with whois.co.kr
and I get error in godaddy

connect(); include "./conf/super_admin_id_check.php"; ?>



I need to know how can I change this, I need to fix it, because I wanna change my server.

THANX ;D

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 02 July 2006 - 06:17 PM

Use the full opening PHP tags, so chnage <? to <?php

#3 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:18 PM

thanx  :D
and how to close the tags?

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 02 July 2006 - 06:19 PM

same as you had.

<?php ... ?>
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:24 PM

[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]
<?php
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]

#6 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 02 July 2006 - 06:26 PM

is that the correct path of super_admin_id_check.php?
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#7 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:31 PM

is that the correct path of super_admin_id_check.php?



yes

$USER_HOME.$superadmin_id?


$USER_HOME must been load at  "include "./conf/config.inc";"

and

$superadmin_id must been load at  include "./conf/mysql_con.php";




#8 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 02 July 2006 - 06:35 PM

well your error points to your include command, right?
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#9 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:38 PM

yes include command not working

include "./conf/config.inc";
include "./conf/mysql_con.php";

Why? ???  my srcipt is correct

#10 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 06:54 PM

my script isnt loading the files config.inc and mysql_con.php

can I change it?


But the same script work in another server, why is the diferent?

#11 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 06:55 PM

yes include command not working

include "./conf/config.inc";
include "./conf/mysql_con.php";

Why? ???  my srcipt is correct


/ 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.
Why doesn't anyone ever say hi, hey, or whad up world?

#12 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 07:00 PM

yes include command not working

include "./conf/config.inc";
include "./conf/mysql_con.php";

Why? ???  my srcipt is correct


/ 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.



Thanx

But still not working :-\

Can I replace the include command with another one?

#13 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 07:05 PM

yes include command not working

include "./conf/config.inc";
include "./conf/mysql_con.php";

Why? ???  my srcipt is correct


/ 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.



Thanx

But still not working :-\

Can I replace the include command with another one?


try:

include("conf/config.inc");
include("conf/mysql_con.php");

Why doesn't anyone ever say hi, hey, or whad up world?

#14 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 02 July 2006 - 07:15 PM

yes include command not working

include "./conf/config.inc";
include "./conf/mysql_con.php";

Why? ???  my srcipt is correct


/ 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.



Thanx

But still not working :-\

Can I replace the include command with another one?


try:

include("conf/config.inc");
include("conf/mysql_con.php");




thanx, but sorry, still not working

And if I change some php.ini configuration?

#15 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 07:53 PM

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

<? include('inc/inc.php'); ?>


then make a folder inside that folder named inc and make a file in inc named inc.php and in inc.php put
<? echo "hello"; ?>

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...
Why doesn't anyone ever say hi, hey, or whad up world?

#16 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 03 July 2006 - 12:55 AM

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

<? include('inc/inc.php'); ?>


then make a folder inside that folder named inc and make a file in inc named inc.php and in inc.php put
<? echo "hello"; ?>

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...


thanx

And the include command work.



#17 XoNoX

XoNoX
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 03 July 2006 - 12:59 AM

My problem has been resolved.

My problem was the file name. My index name was index.html, I changed by inde.php, and work perfect
I dont know why, but in another server work fine with index.html

Thannk you ;D





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users