What is wrong?

  • trukhinaa
  • Born
  • Born
  • trukhinaa
  • Posts: 3

Post 3+ Months Ago

I'm not php guru, so probably some one can help.
This is one of the pages for news editor.
PHP Code: [ Select ]
 
<?
 
/* ================================================== ======================================
 
* WMNews Version 0.3
 
* Another PHP & MySQL driven News Publishing system
 
*
 
* Filename : config.php
 
* Description : Part of WMNews, configuration script
 
* Last Updated : Thursday, November 27, 2003 08:00:00 PM
 
* Latest Version : <!-- m --><span class="postlink">http://wartamikael.org/PHPScripts/</span><!-- m -->
 
*
 
* Copyright (c) 2001-2004 Rudy S. Ingga (toekangweb@wartamikael.org). All rights reserved.
 
*
 
* This program is free software; you can redistribute it and/or modify
 
* it under the terms of the GNU General Public License as published by
 
* the Free Software Foundation; either version 2 of the License, or
 
* (at your option) any later version.
 
*
 
* This program is distributed in the hope that it will be useful,
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
* GNU General Public License for more details.
 
*
 
* You should have received a copy of the GNU General Public License
 
* along with this program; if not, write to the Free Software
 
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
* ================================================== ======================================
 
*/
 
 
 
$config = 1;
 
 
 
/* ======================
 
* Database Configuration
 
* ----------------------
 
*/
 
 
 
$dbhost = "localhost"; // MySQL server host
 
$dbport = ""; // MySQL server port, change to "" if you don't know the port!
 
$dbuser = "Andrey"; // MySQL username
 
$dbpass = ""; // MySQL password
 
 
 
/* Don't run the page if not connected into the database */
 
 
 
$db = mysql_connect("$dbhost:$dbport", "$dbuser", "$dbpass");
 
if(is_string($db)){ die("Sorry, can not connect to database server!"); }
 
$db_name = "test"; // Your database name
 
$dbuse = mysql_select_db($db_name, $db);
 
if(!$dbuse){ die("Sorry, can not use database for right now!"); }
 
 
 
 
 
/* ==================
 
* Path Configuration
 
* ------------------
 
*/
 
 
 
$base_path = "/home/wmnews/public_html"; // Path where you place WMNews
 
$base_datapath = "$base_path/data"; // Path where the files generated by WMNews will keep
 
$base_sharepath = "$base_path/share"; // Path where the share files generated by WMNews will keep
 
$base_langpath = "$base_path/lang"; // Path where language files keep
 
$base_imgpath = "$base_path/nimages"; // Path where news images files will keep
 
$base_temp = "$base_path/temp"; // Path where temporary files will keep
 
 
 
$base_url = "http://wmnews"; // Web Path of your WMNews
 
$base_url_admin = "$base_url/admin"; // Admin Web Path of your WMNews
 
$base_url_share = "$base_url/share"; // Path for share your news
 
$base_url_images = "$base_url/nimages"; // Web Path of news images files
 
$base_url_temp = "$base_url/temp"; // Web Path of temporary directory
 
 
 
 
 
/* ====================
 
* Global Configuration
 
* --------------------
 
*/
 
 
 
$step = 15; // How many links(records) display per page for list page
 
$offset = 0; // Time difference between server time and your local time
 
 
 
$site_title = "WMNews 0.3, another PHP & MySQL News/Article Automation System"; // Site Name
 
$owner_email = "wmnews@news.com"; // Administrator e-mail goes here
 
$owner_name = "WMNews 0.3"; // Administrator name goes here
 
$page_title = "Interactive"; // Change to whatever you like as a default title page
 
 
 
$bgcol = "#FFFFFF"; // Background color
 
$textcol = "#000000"; // Text color
 
$linkcol = "#24249A"; // Link color
 
$vlinkcol = "#3D3D62"; // Visited Link color
 
$alinkcol = "#FF0000"; // Active Link color
 
$toprowcol = "#059AEB"; // Table Top Row Color
 
$ctrrowcol = "#69C9FC"; // Table Center Row Color
 
$botrowcol = "#CBECFE"; // Table Bottom Row Color
 
$grey = "#E4E4E4"; // What is the grey color you like?
 
 
 
 
 
/* ====================
 
* WMNews configuration
 
* --------------------
 
*/
 
 
 
$dispchr = 325; // How many character to display for every article, 0 to disable news summary
 
$maxchr = 3250; // Maximum character per page for every article
 
$t_rt_use = 1; // 1 -> use rating system! 0 -> do not use!
 
$t_cmt_use = 1; // 1 -> use comment system! 0 -> do not use!
 
$t_cmt_ctr = 0; // 1 -> will send any comment posted by visitor to admin!, 0 -> No email to admin!
 
$g_maxcmt = 1000; // How many character users can post comment
 
 
 
$max_img_size = 61440; // Maximum size (bytes) for the image
 
$max_timg_size = 20480; // Maximum size (bytes) for the thumbnail image
 
$max_img_width = 300; // Maximum size (pixel) for the image width
 
$max_img_height = 300; // Maximum size (pixel) for the image height
 
$max_timg_width = 100; // Maximum size (pixel) for the thumbnail image width
 
$max_timg_height = 100; // Maximum size (pixel) for the thumbnail image height
 
 
 
<span style="color: yellow">require_once ("$/lang/lang-english-uk.php"); </span>// Please, refer to your lang sub directory do see other language files!
 
 
 
?>
 
 
  1.  
  2. <?
  3.  
  4. /* ================================================== ======================================
  5.  
  6. * WMNews Version 0.3
  7.  
  8. * Another PHP & MySQL driven News Publishing system
  9.  
  10. *
  11.  
  12. * Filename : config.php
  13.  
  14. * Description : Part of WMNews, configuration script
  15.  
  16. * Last Updated : Thursday, November 27, 2003 08:00:00 PM
  17.  
  18. * Latest Version : <!-- m --><span class="postlink">http://wartamikael.org/PHPScripts/</span><!-- m -->
  19.  
  20. *
  21.  
  22. * Copyright (c) 2001-2004 Rudy S. Ingga (toekangweb@wartamikael.org). All rights reserved.
  23.  
  24. *
  25.  
  26. * This program is free software; you can redistribute it and/or modify
  27.  
  28. * it under the terms of the GNU General Public License as published by
  29.  
  30. * the Free Software Foundation; either version 2 of the License, or
  31.  
  32. * (at your option) any later version.
  33.  
  34. *
  35.  
  36. * This program is distributed in the hope that it will be useful,
  37.  
  38. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  39.  
  40. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  41.  
  42. * GNU General Public License for more details.
  43.  
  44. *
  45.  
  46. * You should have received a copy of the GNU General Public License
  47.  
  48. * along with this program; if not, write to the Free Software
  49.  
  50. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  51.  
  52. * ================================================== ======================================
  53.  
  54. */
  55.  
  56.  
  57.  
  58. $config = 1;
  59.  
  60.  
  61.  
  62. /* ======================
  63.  
  64. * Database Configuration
  65.  
  66. * ----------------------
  67.  
  68. */
  69.  
  70.  
  71.  
  72. $dbhost = "localhost"; // MySQL server host
  73.  
  74. $dbport = ""; // MySQL server port, change to "" if you don't know the port!
  75.  
  76. $dbuser = "Andrey"; // MySQL username
  77.  
  78. $dbpass = ""; // MySQL password
  79.  
  80.  
  81.  
  82. /* Don't run the page if not connected into the database */
  83.  
  84.  
  85.  
  86. $db = mysql_connect("$dbhost:$dbport", "$dbuser", "$dbpass");
  87.  
  88. if(is_string($db)){ die("Sorry, can not connect to database server!"); }
  89.  
  90. $db_name = "test"; // Your database name
  91.  
  92. $dbuse = mysql_select_db($db_name, $db);
  93.  
  94. if(!$dbuse){ die("Sorry, can not use database for right now!"); }
  95.  
  96.  
  97.  
  98.  
  99.  
  100. /* ==================
  101.  
  102. * Path Configuration
  103.  
  104. * ------------------
  105.  
  106. */
  107.  
  108.  
  109.  
  110. $base_path = "/home/wmnews/public_html"; // Path where you place WMNews
  111.  
  112. $base_datapath = "$base_path/data"; // Path where the files generated by WMNews will keep
  113.  
  114. $base_sharepath = "$base_path/share"; // Path where the share files generated by WMNews will keep
  115.  
  116. $base_langpath = "$base_path/lang"; // Path where language files keep
  117.  
  118. $base_imgpath = "$base_path/nimages"; // Path where news images files will keep
  119.  
  120. $base_temp = "$base_path/temp"; // Path where temporary files will keep
  121.  
  122.  
  123.  
  124. $base_url = "http://wmnews"; // Web Path of your WMNews
  125.  
  126. $base_url_admin = "$base_url/admin"; // Admin Web Path of your WMNews
  127.  
  128. $base_url_share = "$base_url/share"; // Path for share your news
  129.  
  130. $base_url_images = "$base_url/nimages"; // Web Path of news images files
  131.  
  132. $base_url_temp = "$base_url/temp"; // Web Path of temporary directory
  133.  
  134.  
  135.  
  136.  
  137.  
  138. /* ====================
  139.  
  140. * Global Configuration
  141.  
  142. * --------------------
  143.  
  144. */
  145.  
  146.  
  147.  
  148. $step = 15; // How many links(records) display per page for list page
  149.  
  150. $offset = 0; // Time difference between server time and your local time
  151.  
  152.  
  153.  
  154. $site_title = "WMNews 0.3, another PHP & MySQL News/Article Automation System"; // Site Name
  155.  
  156. $owner_email = "wmnews@news.com"; // Administrator e-mail goes here
  157.  
  158. $owner_name = "WMNews 0.3"; // Administrator name goes here
  159.  
  160. $page_title = "Interactive"; // Change to whatever you like as a default title page
  161.  
  162.  
  163.  
  164. $bgcol = "#FFFFFF"; // Background color
  165.  
  166. $textcol = "#000000"; // Text color
  167.  
  168. $linkcol = "#24249A"; // Link color
  169.  
  170. $vlinkcol = "#3D3D62"; // Visited Link color
  171.  
  172. $alinkcol = "#FF0000"; // Active Link color
  173.  
  174. $toprowcol = "#059AEB"; // Table Top Row Color
  175.  
  176. $ctrrowcol = "#69C9FC"; // Table Center Row Color
  177.  
  178. $botrowcol = "#CBECFE"; // Table Bottom Row Color
  179.  
  180. $grey = "#E4E4E4"; // What is the grey color you like?
  181.  
  182.  
  183.  
  184.  
  185.  
  186. /* ====================
  187.  
  188. * WMNews configuration
  189.  
  190. * --------------------
  191.  
  192. */
  193.  
  194.  
  195.  
  196. $dispchr = 325; // How many character to display for every article, 0 to disable news summary
  197.  
  198. $maxchr = 3250; // Maximum character per page for every article
  199.  
  200. $t_rt_use = 1; // 1 -> use rating system! 0 -> do not use!
  201.  
  202. $t_cmt_use = 1; // 1 -> use comment system! 0 -> do not use!
  203.  
  204. $t_cmt_ctr = 0; // 1 -> will send any comment posted by visitor to admin!, 0 -> No email to admin!
  205.  
  206. $g_maxcmt = 1000; // How many character users can post comment
  207.  
  208.  
  209.  
  210. $max_img_size = 61440; // Maximum size (bytes) for the image
  211.  
  212. $max_timg_size = 20480; // Maximum size (bytes) for the thumbnail image
  213.  
  214. $max_img_width = 300; // Maximum size (pixel) for the image width
  215.  
  216. $max_img_height = 300; // Maximum size (pixel) for the image height
  217.  
  218. $max_timg_width = 100; // Maximum size (pixel) for the thumbnail image width
  219.  
  220. $max_timg_height = 100; // Maximum size (pixel) for the thumbnail image height
  221.  
  222.  
  223.  
  224. <span style="color: yellow">require_once ("$/lang/lang-english-uk.php"); </span>// Please, refer to your lang sub directory do see other language files!
  225.  
  226.  
  227.  
  228. ?>
  229.  
  230.  

and I get this error

Warning: main($/lang/lang-english-uk.php): failed to open stream: No such file or directory in C:\Inetpub\wwwroot\php\config\config.php on line 112

Fatal error: main(): Failed opening required '$/lang/lang-english-uk.php' (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\php\config\config.php on line 112


about last line in the code I highlited. The path to file is correct.

Thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rjstephens
  • Professor
  • Professor
  • User avatar
  • Posts: 774
  • Loc: Brisbane, Australia

Post 3+ Months Ago

regardless of whether or not the path is correct, I don't think it is supposed to have a $ at the beginning.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

trukhinaa, Welcome To Ozzu. :D

Please remember to wrap code inside either CODE or PHP tags when posting, I fixed your post this time. Thankyou.
  • trukhinaa
  • Born
  • Born
  • trukhinaa
  • Posts: 3

Post 3+ Months Ago

I managed to sort this, thanks.

Sorry for mistake, it wouldn't happen again.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 95 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.