wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Windows Installer for Current PHP version?
wildteen88 replied to jwmh's topic in PHP Installation and Configuration
Ooh bum!! Sorry I deleted your last reply. Didnt mean that. PHP can write error logs. In order to do that you need to tell it to. However PHP usually writes errors to Apaches error log (when loaded as an Apache Module/CGI successfully) and/or the sytems error log. To make PHP write to an error log find and edit the php.ini in the php folder, or where ever you have it located to. If you cant find it the rename php.ini-recommended (in the php folder) to php.ini instead. Now edit the php.ini Find where it says display_startup_errors = Off change Off to On Now to make PHP write PHP to its own error log you need to find the following: ;error_log = filename and change that to this: error_log = "C:/php-errors.log" Save the php.ini and copy the php.ini to C:\WINDOWS\. Restart Apache or attempt to run a script via the command line. It should report errors to the error log you just setup. Make sure php-errors.log exists in the root of your hard drive first though. -
You cant, As $x stores the result resource of the query ($z). It holds nothing else. In order get the information form the result resource you need to pass $x to another mysql_*() function to process the result resource.
-
Your query might be failing. So change this: [code]$result = mysql_query ($query);[/code] To this: [code]$result = mysql_query ($query) or die("error with query:<br />\n" . mysql_error());[/code] If you get any errors post them here in full. Do not post part of the error message. It is important you post the error as-is. Also I'd suggest you change this: [code]$row = mysql_fetch_array ($result, MYSQL_NUM); if($row){[/code] To this: [code]if(mysql_num_rows($result) > 0) { $row = mysql_fetch_array ($result, MYSQL_NUM);[/code]
-
MySQL is easy to install just download the installer from mysql.com and follow the onscreen instructions.
-
Windows Installer for Current PHP version?
wildteen88 replied to jwmh's topic in PHP Installation and Configuration
I'm not sure. I havnt configure PHP for CGI before. You can use PHP5.1.6 with Apache2.2 by downloading the third partly apache module from [url=http://www.apachelounge.com/download/mods/php5apache2.dll-php5.1.x.zip]apachelounge.com[/url]. Installing PHP as an Apache module is easier. When you download the third part apache module you should be able to use PHP5.1.x with Apache2.2.x I have no idea why theres no installer for PHP5.1.6. However I still do recommend you to downgrade Apache to Apache2.0.x though. -
How can i check if the php installed as Apache Module
wildteen88 replied to nazeel's topic in PHP Coding Help
Create a new file called info.php and add the following to it: [code=php:0]<?php phpinfo(); ?>[/code] Now upload that file to your website. And run it in the browser (http://mysitre.com/info.php) Now look for the following line: [b]Server API[/b] After that it should state the API. If PHP is installed as an Apache Module it'll state Apache Handler. If its CGI it'll state CGI/FastCGI or someting similar. -
Windows Installer for Current PHP version?
wildteen88 replied to jwmh's topic in PHP Installation and Configuration
What windows installer. You can get the windows installer from the downloads page at php.net if you want However the Windows Installer does nothing. All it does is extract the files from the installer to C:\php and thats it. How are you installing Apache and PHP? When installing PHP have a read through [url=http://www.phpfreaks.com/forums/index.php/topic,110211.msg445108.html#msg445108]this post of mine[/url] -
http://www.php-mysql-tutorial.com/ should help you there. However if you want someone to write it for you then take a trip the Freelancing Forum.
-
You can only increaee the size of the upload size fi you have root access to the server. You might be able to increase it by addinga aphp flag to the .htaccess file, however godady may not allow you to use htaccess files. Also make sure the music that will be uploaded is ownedby you or people uploading it. godaddy may not prohibit uploading of copyright material. I suggest you read godaddys TOS
-
Its actually to do with this: [code=php:0]function emoticon($r['post']) {[/code] You cannot use an array as parameter for tghe function, you can passa n array to the function when you call it. So remove the $r['post'] variable and replace it with $r_post or something similiar. Also make sure chnage any other instances of $r['post'] too in the emoticon function to $r_post too. Then when you call the emotion function you can use $r['post']: [code=php:0]// call the emoticon function $r['post'] = emoticon($r['post']);[/code]
-
You'll want to use javascript rather than PHP. PHP can only be used on a page request and not on a users action, without the page having to reload/refresh.
-
Windows Installer for Current PHP version?
wildteen88 replied to jwmh's topic in PHP Installation and Configuration
PHP5.1.x or PHP4.4.x is not compatible with Apache2.2.x. Install Apache 2.0.x instead. -
Having trouble running an image gallery
wildteen88 replied to mashbox's topic in Third Party Scripts
In that case foreach syntax is incorrect. Make sure the syntax is like this: foreach($var as $other_ver) or foreach($var as $key => $value) $var should be an array. Also note you should of posted this in the Third Part Scripts forum. Try contacting the creater of the script for assistance. EDIT: The script is poorly coded. However a quick fix is to add the following: [code=php:0]$galerieyearordered = array();[/code] after [b]$thisyear = 0;[/b] on line 187 in index.php -
Look in your servers error log. The error log will give you a reason why you are getting the 500 Internal Error message.
-
Please read this [url=http://www.phpfreaks.com/forums/index.php/topic,95563.0.html]FAQ Thread[/url].
-
Search google or whatever foir emoticon tutorial or search this forum. There has been posts like yours a few times. However [url=http://ryanslife.net/2006/07/12/php-simple-emoticon-support/]this tutorial[/url] should get you going.
-
Use a for loop instead. Use the following code in place of your switch statement. [code] if($seq != 0) { for($j = 0; $j < $seq; $j++) { $sessid .= $token{$i}; } $sessid .= $hash{$i}; } else { echo "i equals 0"; }[/code]
-
Add 0-9 after A-Za-z in the rewriterule So its like this: [code]RewriteRule ^([A-Za-z0-9]+)$ profile.php?ID=$1 [/code]
-
[quote author=businessman332211 link=topic=111806.msg453265#msg453265 date=1161108197] http://www.freelancebusinessman.com/temp The one with mech in the title. I am thinking of using that one as my admin, but using css, is there a way to code that type of layout, and still allow content to go downwards, I never thought about coding something like this, any advice. The main thing I was looking for are some tips to help me bring it together where I can still have text that can expand, instead of being restricted by the layout, I had that problem with www.hasbadservice.com/useradmin/admintemplate.php That one was restricted, the layout can't expand because of the brorders, but it's going to be even worse on the mech one? Any advice? [/quote] Thats just plain bulls**t Your admin layout you are currently doing (the green one) can make the content go "downwards". Its that youre using whole images for the backgrounds/borders. If you use whole images then you are constraining yourself. Use sections of images for the layout you are doing. In order to do the layout correctly you need to learn how to slice the image up properly. You need to work out the sizes of the images and what images you need.
-
Use regualar expressions again then.
-
Server does not support graphics?
wildteen88 replied to barney's topic in PHP Installation and Configuration
Do you know whether PHP is using the PHP.ini you're editing. Also turn a setting called [b]display_startup_errors[/b] On in the php.ini if it hasnt been already. Also chekc your servers error logs too to see if there is a problem with PHP loading up the gd extension. Also make sure you have setup the extension_dir directive up correctly too. It should point to PHPs extension directory. -
Put simply Use CSS rather than HTML/Javascript Look into the [b]:hover[/b] pseudo class
-
Go to the main site phpfreaks.com and chekc out the tutorials in the PHPFreaks Tutotials section. Should find what you want. Or google for PHP Login script.
-
Server does not support graphics?
wildteen88 replied to barney's topic in PHP Installation and Configuration
Chek that yoou get a GD section when you run phpinfo() function. Or use the gd_info() to see if GD is loaded. If phpinfo and gd_info() returns nothing or you get an error withe the latter function the GD is installed enabled correctly. -
get rid of the www.'s in the hosts file and urls just use the hostname phpmyadmin.div and ngc.dev Also restart your PC when you ahve edited the hosts file too.