wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
It is not necessary to move files outside of the PHP installation folder. Always keep files within the PHP Installation folder, if you moves files about it can cause more problems especially when upgrading PHP. I always suggest adding PHP to the PATH Environment Variable. In order for php_mysql.dll or php_mysqli.dll to function they require an external library call libmysql.dll (which is in the PHP installation folder C:/php) Aslso I recommend you to enabled display_errors and set error_reporting to E_ALL within the php.ini. That way PHP will display errors to the browsers rather than displaying a blank screen. Make sure you are restarting Apache after making changes to the php.ini -
Where are you installing phpBB to? On a "home-brew" server or on your hosting account? If its the latter you don't need to install the AMP stack as it is already setup for you by your webhost. All you need to do is upload the phpBB files to your website, once uploaded go to http://yoursite.com/phpbb/install/install.php and run through the on screen instructions. If you're setting up your own server, can you tell me what OS you're using on your server and what steps you have taken to install AMP (Apache, PHP and MySQL).
-
Yes Daniel is right, there was once two PHP support forums (Newbie and Advanced Help). I think these forums both got merged in to one when Ober and Ronald took over as Admins. I believe there was some discussion between the Admins and Mods what to do with the two forums. There was problems with having two support forums if I remember correctly, Easy questions, which should of got posted in the Newbie forum, would always get posted into the Advanced help forum. On some occasions members felt they was being offended if their question got moved to the Newbie support forum. I know their is a problem with the PHP help forum due it having such "high traffic" threads will get bump'd to the second page within an hour.
-
Its not to do with Apache, its to do with your linux distro. Everytime your make modifications to files, a backup file is created before saving which is called file.ext~ I dont know how to stop this. There is most probably a setting somewhere
-
what does bbcode_comment_format do?
-
Ok, that class runs fine for me. It must be what you're doing with $str where do you output $str to?
-
It must be a problem with your hilight function in the SyntaxHilighter class. We'll have to see more code.
-
When setting the width or height of any HTML element on the page you need to have a good understanding of the box model. Browsers calculates the width of any HTML element by the following simple formula (l+r stands for left and right): (borders l+r, padding l+r) + width = width; So if you set up div as follows: <div style="width: 100px;"> 100px wide DIV</div> It'll be 100px wide, very simple. Now if you apply 10px padding: <div style="width: 100px; padding:10px"> 124px wide DIV</div> The Div will now be 120px wide. The DIV wll increase in size even more if you add a border: <div style="width: 100px; padding:10px; border:2px solid #FF0000"> 120px wide DIV</div> it'll now be 124px wide. To keep the div at 100px wide you'll need to set the width 24px less than what it should be, so 76px. The same principle applies to the height also, except this time you consider the top and bottom padding and borders Margins don't have an affect on the size of an element.
-
I put the params round the wrong way, try: $str = preg_replace('/\[code\=([a-z]+)\](.*?)\[\/code\]/ies', "SyntaxHilighter::hilight(\"$2\", \"$1\")", $str);
-
Apache Server not working...please help
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
Huh! Did you change the colour scheme of Vista or something? I didn't tell you to change the theme! Just browse to ApacheMonitor.exe (path is something like C:/Program Files/Apache Foundation/Apache 2/bin) then right click on the file and select Properties from the menu. Click the Compatibly tab and apply the settings I suggested. Afterwards close any instances of ApacheMonitor.exe (easiest way is via Task Manager - Ctrl Alt Delete). Once all instances are closed (should only be one). Run ApacheMonitor.exe again and agree to the stupid UAC prompt that will now display. You should now be able to control the Apache Service via the Apache Monitor. If you have XP at hand then yes use XP if you wish to stay sane. I dual boot XP and Vista on my PC. -
Make sure your firewall is not blocking remote connections on port 80. Some ISP's block port 80 to prevent your from hosting a http server. The best way is to setup an account at no-ip.com or dyndns.org and then use the provided IP address/domain instead.
-
Apache Server not working...please help
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
What version of Windows are you using? Seems like you are using Vista. In order for the Apache Service Monitor to work on Vista you'll need to set the Program Compatibility to XP Service Pack 2 and run it with Administrator privileges (This is set via the Properties Window for ApacheMonitor.exe). Another way would be to control it via (Start >) services.msc and selecting the Apache2 Service from the List and choosing Start, Stop or Restart to left of the services list. -
Apache Server not working...please help
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
How are you starting Apache? You should be starting/restarting/stopping Apache via the Apache Service Monitor which can be located via the Apache taskbar icon (lower right hand corner of the screen by the system clock). I guess currently you are starting Apache by opening the httpd.exe file. You should not do this as it loads a new instance of Apache. -
[SOLVED] Use GET to display a page, some reason doesn't work.
wildteen88 replied to MadnessRed's topic in PHP Coding Help
Try ./pages/page_name.php rather than pages/page_name.php Make sure the pages folder is in the same folder as pages.php -
[SOLVED] Whats wrong with this For Loop?
wildteen88 replied to Mordax Praetorian's topic in PHP Coding Help
Your loop will only run if $i is equal to to 2007 If you only want the for loop to run when $i is greater than or equal to to 2007 then use $i >= 2007 as the arguement -
Apache Server not working...please help
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
If you changed the port you'll need to use http://localhost:8080/ instead of http://localhost -
If you want use PHP code in the replacement then use the e pattern modifier in your regex, ge: preg_replace ('/\[code\=(.*?)\](.*?)\[\/code\]/ies', "SyntaxHilighter::hilight(\"$1\", \"$2\")", $str);
-
Apache Server not working...please help
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
That error means that there is already a program/service using the port Apache is trying to connect to. Either disable the current program/service currently using port 80 or configure Apache to use a different port eg: 8080 -
[SOLVED] httpd.conf problems..PLEASE HELP ME
wildteen88 replied to s_ff_da_b_ff's topic in Apache HTTP Server
Interesting error. What version of Windows are you running? Try stopping Apache first then applying the modifications. -
I just did a quick search on Google for the error you are getting. Have a read this for a fix. If not downgrade mysql to 5.0.45 instead (version I'm using on Vista)
-
Try: <?php /* FUNCTION TAKEN FROM PHP.NET LINK: http://uk.php.net/manual/en/function.shuffle.php#80586 */ function shuffle_assoc(&$array) { //$keys needs to be an array, no need to shuffle 1 item anyway if (count($array)>1) { $keys = array_rand($array, count($array)); foreach($keys as $key) $new[$key] = $array[$key]; $array = $new; } //because it's a wannabe shuffle(), which returns true return true; } $recipies = array( 'Rescipe 1' => $_SERVER['PHP_SELF'].'?cmd=rescipe1', 'Rescipe 2' => $_SERVER['PHP_SELF'].'?cmd=rescipe2', 'Rescipe 3' => $_SERVER['PHP_SELF'].'?cmd=rescipe3', 'Rescipe 4' => $_SERVER['PHP_SELF'].'?cmd=rescipe4', 'Rescipe 5' => $_SERVER['PHP_SELF'].'?cmd=rescipe5' ); shuffle_assoc($recipies); foreach($recipies as $key => $value) { echo "link $key <br> <a href=\"$value\">$key</a><br><br>"; } if(isset($_GET['cmd']) && !empty($_GET['cmd'])) { switch ($_GET['cmd']) { case 'rescipe1': echo "this is rescipe 1"; break; case 'rescipe2': echo "this is rescipe 2"; break; case 'rescipe3': echo "this is rescipe 3"; break; case 'rescipe4': echo "this is rescipe 4"; break; case 'rescipe5': echo "this is rescipe 5"; break; } } ?>
-
If you are getting that error then it'll more than likely mean you haven't enabled the mod_rewrite module in the httpd.conf Make sure you have enabled the module (just remove the # in front of rewrite_module line) in the httpd.conf. After making any changes to the httpd.conf restart Apache.
-
If you want to return all $_GET data use $_SERVER['QUERY_STRING']