Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You create the file your self and then you tell PHP where to log the files to. So ifyou ahve PHP installed in the root of the hard drive (C:) in a folder called PHP (C:/PHP) and you created a php.log file in that folder for logging PHP errors, then you'll setup the error_log directive like so: [code]error_log = "C:/PHP/php.log" Now wehen you save the php.ini and restart the server PHP should now log its error in php.log file in C:/PHP (not make sure log_errors directive is turned On for PHP to log its errors in the log file you just setup).[/code]
  2. You might be triggering the IPS which is causing the connection timed out. What are you trying to post? If you are posting html and it contains script tags then add a space around the word script eg: [code]< script > blah blah bnlah </ script >[/code] This should help If you are not posting any html then I'm not sure what it could be. I know we are having connection issues however I think the admins have sorted that out now. Sorry if I couldnt help.
  3. The problem is to do with the header. I removed the floats from the header elements completely as it was not needed. I also removed alot of the margins/padding you had too. This fixed the problem you where having. I also added a 20 picels of bottom margin to header it self so you get a 20px gap bettwen the header and two floated cols. The CSS: [code]/* Joyel Puryear / Master Configuration System The Freelance Businessman http://www.freelancebusinessman.com Copyright Joyel Puryear 2006 &copy;Master Framework Global CSS file, used with the master framework */ #frontend { background-color: #000000; color: #000000; text-align: center; width: 100%; height: 100%; margin-top: 0; } #frontendwrap { padding-top: 25px; margin-left: auto; margin-right: auto; background-color: #FFFFFF; color: #000000; width: 700px; height:700px; margin-top: 0; } #frontendheader { margin-left: auto; margin-right: auto; width: 600px; height: 100px; background-color: #9b9292; color: #bdbcbb; margin-bottom: 20px; } #frontendheader h1 { margin: 0 0 0 5px; padding-top: 10px; text-align: left; } #frontendheader ul { list-style: none; margin: 0; padding: 5px 10px 10px 0; text-align: right; } #frontendheader li { display: inline; } #frontendheader a:link { color: #FFFFFF; font-family: "Courier New", Courier, monospace; } #frontendheader a:visited { color: #FFFFFF; } #frontendheader a:hover { color: #FFFFFF; } #frontendbodycontent { width: 700px; height: 500px; margin-left: auto; margin-right: auto; } #frontendleftcol { background-color: #acb4b5; width: 320px; height: 400px; float: left; } #frontendrightcol { background-color: #e3ebea; width: 140px; height: 400px; float: right; }[/code]
  4. Did you restart the server? It is important you restart the server. Otherwise the new settings will not load until you do so.
  5. There is no file you edit. What you need to do is login to the MySQL server as the root (administrator) user via the command line or if you have a GUI to manage your MySQL server (eg : MySQL Administrator) then login to the root user and edit the permissions for the pmauser so they have access to the server. Prehaps [url=http://www.devarticles.com/c/a/MySQL/Creating-Users-and-Setting-Permissions-in-MySQL/]reading this article[/url] will help set the correct permissions.
  6. No problem. I am getting used how SMF works now and I am able to hack it into shape in a couple of mins. If you have anymore questions/problems with this or SMF Templates then please post in the Third Party PHP Scripts forum. I should of told you this earlier but I let you off.
  7. [quote author=rastus link=topic=117382.msg479493#msg479493 date=1165376543] when using the code you posted I get [code]Parse error: parse error, unexpected T_IF, expecting ',' or ';' in /home/my4x4toy/public_html/*******/staff_cities.php on line 18[/code] this is line 18 [code]if(isset($_POST['minlevel']) && isset($_POST['desc']) && isset($_POST['name'])) [/code] But changing this as you suggested  [code]Minimum Level: <input type='text' name=minlevel' /><br />[/code] to this [code]Minimum Level: <input type='text' name='minlevel' /><br />[/code] works.  ;D [/quote] The line 18 error is caused by the line above it. I must of accidentally deleted the semi-colon at the end of line 16. If you add it in it will solve this error. Line 16 should be this: [code]    global $db, $ir, $c, $h, $userid[/code] Just add a semi-colon ( ; ) at the end of the line.
  8. If you want you urls for the script to be like this: http://www.a1webtools.biz/ (actual category id)/ Then you will need make urls like that by doing the following: - setup the rewriteRule's for the SEO urls you want - editing the script so it uses the urls you use for the rewriteRules you have set up for mod_rewrite You may need to get extra help forum the developers of the script want to have SEO urls if you dont know PHP.
  9. See if adding - [b]RewriteEngine On[/b] before your RewriteRule solves it.
  10. There is an error and its to do with line2: $var=$_GET[var]; You should put the key in quotes if its a string. Otherwise PHP will think you're using a constant. Also if you key is also a reserved keyword and you're not putting it in quotes then you'll get an error/blank page! In your code [b]var[/b] is a reserved keyword and PHP is getting confused. So line 2 should be like this: [code=php:0]$var=$_GET['var'];[/code]
  11. [quote author=sivanath.nagendran link=topic=117370.msg479301#msg479301 date=1165353279] Hi   I was try to delete that error.log file from the Apache directory, But still not rectified. Now it shows a messeg box [color=red][font=Verdana][size=10pt][b]" Access is Denied "[/b][/size][/font][/color].  ???   What will I oo now? pls help me for this. Without It's very difficult ot find error on my project. :'( Advance thanks for your help. By Sivanath.N [/quote] You should turn on display_errors in the php.ini so if there are any errors in your PHP scripts they will be shown when you run the scripts, this saves you having to look in the error log. Also what I tend to do is setup PHP to use its own error log file instead of Apaches error log, this is done by turning on log_errors and setting up the error_log directive. Another thing I tend to do is to empty the error log at the end of each month or before it gets too large.
  12. It is not the Apache configuration that is at stake but PHPs. Find and open you php.ini and make sure you have enabled the mysql extension and setup the extension_dir directive too. If already have done that then make saure php is reading the php.ini you are editing. You can easily do that by creating a file called info.php and add the following to it: [code]<?php phpinfo(); ?>[/code] Now load that file into your browser and look for the following line: [b]Configuration File (php.ini) Path[/b] to the right of that it should state the full PATH to the php.ini. Is the Path that is stated correct?
  13. You can upgrade to any version you wish. PHP4 code will still run on PHP5 However the thing that will cause sites to malfunction will be PHPs configuration. If you do upgrade, create a backup copy of the existing php.ini and then when you upgrade PHP reconfigure PHP to what the old version of PHPs configuration was. I see in your PHP ini you have a few settings which are turned off by default as of PHP4.3, namely register_globals and magic_quotes_gpc. If you keep register globals disabled then there will be a strong chance of websites malfunctioning. Register_globals can be a security problem and was one of the reason why it was disabled. However I would still enable the setting and then perhaps get existing customers to upgrade there sites so they dont reply on this setting.
  14. Its most probably not the package you're using, but PHPs configuration (php.ini) Whats is the errors you are getting? If the package you are using doesn't come with an email server then that will be why. If you are using the standard mail (mail())function then you will need to open up the php.ini and find the following lines: [code]; For Win32 only. SMTP = localhost smtp_port = 25[/code] You will need to change localhost to an SMTP server address, try your ISPs SMTP server (if they use POP/SMTP for emails). Once you have setup the SMTP directive you'll need to save the php.ini and restart the server.
  15. Its a MySQL Permissions issue for the pmausr user. Make sure you have set the correct permissions for the pmausr for connecting the mysql server.
  16. Chnage your addcity function to the following: [code]function addcity() {     global $db, $ir, $c, $h, $userid     if(isset($_POST['minlevel']) && isset($_POST['desc']) && isset($_POST['name']))     {         $minlevel=abs((int) $_POST['minlevel']);         $name = $_POST['name'];         $desc = $_POST['desc'];         $q=$db->query("SELECT * FROM cities WHERE cityname='{$name}'");         if($db->num_rows($q))         {             print "Sorry, you cannot have two cities with the same name.";             $h->endpage();             exit;         }         $db->query("INSERT INTO cities VALUES(NULL, '$name', '$desc', '$minlevel')");         print "City {$name} added to the game.";         stafflog_add("Created City $name");     }     else     {         print "<h3>Add City</h3><hr /> <form action='staff_cities.php?action=addcity' method='post'> Name: <input type='text' name='name' /><br /> Description: <input type='text' name='desc' /><br /> Minimum Level: <input type='text' name='minlevel' /><br /> <input type='submit' value='Add City' /></form>";     } }[/code] The was with your html for the minlevel form field: [code]Minimum Level: <input type='text' name=minlevel' /><br />[/code] Notice there is no apostrophe after name= Also I have edited the syntax of the function slightly too. You should check/validate user input before your use it. Another thing is to try and format your code. It will make your code easier to read and maintain rather than having all you code in one big jumbled mess. You press the tab button or use 2 to 4 spaces everytime you go into a code block such as a function, if/else statements, switch statements etc. Then when you come out of the code block (closing curly brace }) you delete 2 or 4 spaces. Example: [code=php:0]if(bla blah) { // this opens up a code a block so we indent the contents         $someVar = blah;     // another code block     switch(blah blah)     { // this another code block so we indent the contents again (twice)           case blah :               // again indent the content for the case           break; // place the break back in line with the case it belongs to           default:               // some default value             break;       } // close the code block for the switch, notice it goes in line with the opening curly brace for the code block } // close if statement[/code] As you can see it can make the code more easier to read and maintain as you can see the code blocks.
  17. Yes you can. You'll wnat to chnage this code: [code]/ Show the post itself, finally! echo ' </td> </tr></table> <hr width="100%" size="1" class="hrcolor" />'; echo ' <div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? ' <img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '', ' </td> </tr>'; // Now for the attachments, signature, ip logged, etc..[/code] to this: [code] // Show the post itself, finally! echo ' </td> </tr></table> <hr width="100%" size="1" class="hrcolor" /> <div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';                             include('./Themes/default/html.inc.php');                             echo $message['body'], '</div>', $message['can_modify'] ? ' <img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , ' </td> </tr>'; // Now for the attachments, signature, ip logged, etc...[/code] Now you'll want to create the html.inc.php file in {SMF_ROOT_FOLDER}/Themes/default now edit that file and add the relevant html to that file. It should now include that file for ever post in the thread. If you want it only show for the first post in the thread then you'll want change this: [code]<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';                             include('./Themes/default/html.inc.php');                             echo $message['body'], '</div>', $message['can_modify'] ? '[/code] To the following: [code]<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';                             if(!isset($fPOST) || $fPOST != true)                             {                                 include('./Themes/default/html.inc.php');                                 $fPOST = true;                             }                             echo $message['body'], '</div>', $message['can_modify'] ? '[/code]
  18. If you are using SMF,. then the following should do: [code]<div style="margin-left: 20px;float:right">Google Ads javasript here</div>[/code] You place that code directly after the <div class="post"> tag and it should display the adds to the right of the text. ALso the text should warp it self around the ad too, however code/quote blocks do tend to flow over the top the ads. This is a z-index issue i think.
  19. wildteen88

    RGB

    75 should do it: 255,75,75 Will produce a light pink/red Play around with Paint or some basic image editor and change the RGB values when setting a colour.
  20. Run your code again and this time go to View > Source Is there any output, if there is post it here.
  21. What error message do you get? Windows doesn't haven any permissions. So I expect its your Apache configuration that could be the problem.
  22. wildteen88

    RGB

    Take 75 from 255 and you'll get a slightly darker red however if you increase the g and b you'll get a lighter red
  23. You will need to configure Apache to parse PHP files with the PHP Interpreter. What is the current state of Apache's configuration?
  24. This is not a php question but an SQL syntax question. I'll this to MySQL board in a sec However to answer you question. WHERE `x`='x' checks for exact matches, such say x is apple it look for exact matches in the database for any rows that has apple as its value, where as WHERE `x` LIKE 'x' does not check for exact matches but close matches, so apples and apple are matches.
  25. Looks like PHP is not finding the php.ini you're editing. Copy your php.ini to the WINDOWS folder (C:\WINDOWS) now restart Apache. PHP should now be using the correct php.ini Also include_path is used to define paths to directories only and not files. You include a file using the include or require functions.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.