wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
I cannot install PHP5 with Apache 2.2...
wildteen88 replied to JP128's topic in PHP Installation and Configuration
[quote author=JP128 link=topic=112963.msg460942#msg460942 date=1162356720] Ok, I now have it working, thanks... But now when I try to get MySQL, I get a CALL TO UNDEFINED FUNCTION... hmmm. [/quote] You'll need to enable the MySQL extension in the php.ini now. PHP5 doesnt come with mysql builtin no more. To enable the mysql extension please read this [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]FAQ Thread[/url] @thorep JP128 is using Windows so no compiling necessary :) -
If you use mod_rewrite GET will still work. Your sitll using the following url: myscript.php?catid=2343 However you're just giving the above URL a mask. As you'll do something like this when mod_rewriting the above URL: [code]RewriteRule ^myscript/([0-9]+)$ myscript.php?catid=$1[/code] So fi you now go to mysite.com/myscript/5648 it'll be changed to this: myscript.php/catid=5648, however you wont see the latter URL as its sent in the background. So when you go to create your links you'll need to use the newer seo URL. Like so: [code]<a href="myscript/5689">See product 5689</a>[/code]
-
checking if a file exists via http using 4.3.9
wildteen88 replied to scliburn's topic in PHP Coding Help
So now url wrappers is open! You just said in your first post it is not available, which I've quoted below: [quote]since the [b]url wrappers [color=red]is not[/color] available[/b], does anyone have any solid suggestions.[/quote] Also file_exists is version independent as its available for PHP3, 4 and 5 -
See if wrapping backticks (`) around your field names in your query. MySQL might be getting confused as your have used MySQL keywords as your field names in your news table. The following are mysql keywords: - date - where So change the lower part of your query to this: `date`, when, `where`, `type`
-
When you installed Apache did you uninstall IIS? You may have not uninstalled IIS and when Apache started up. It couldn't as IIS was still running. About the error your get could you post me the error you got too. Also when you go to http://localhost/ or http://127.0.0.1/ make sure Apache is running. You know when its not as you get a 404 Page cannot be displayed error or something similar.
-
checking if a file exists via http using 4.3.9
wildteen88 replied to scliburn's topic in PHP Coding Help
If the url wrappers are disabled then there is no other way of checking if a file exists on a remote server. -
You cannot suppress the following error: fatal error: maximum time of 30 seconds exceeded That error is due to your script! Your script is taking longer than 30 seconds to execute. The only to way to make this error to go away is to extend the execution time to 60 seconds in the php.ini. However this is not recommended as a script should not take longer to execute more then 30 seconds. Setting error_reporting to zero will not suppress this error either as its still there but not actually being shown! The script will halt with a fatal error.
-
Seems like a double post then. Topic closed.
-
PHP - MySQL - IIS XPP issue
wildteen88 replied to Ting's topic in PHP Installation and Configuration
Just create a file called mysql-test.php and do something like this: [code=php:0]<?php echo "Connecting to MySQL Server...." $conn = mysql_connect("localhost", "username", "password"); echo "<br />Connection established!<br /><br />Selecting Database...."; mysql_select_db("mysql"); echo "Database selected!!<br /><br />"; ?>[/code] If you get the following output: [quote]Connecting to MySQL Server.... Connection established! Selecting Database.... Database selected!![/quote] Then the mysql extension is loaded. -
Thats just completely confused me! Could you explain it a bit more and perhaps a little example too.
-
Use include(_once) or require(_once) for including files with PHP. No need to use SSI then.
-
OK. It appears you've installed Apache as a Windows Service. When you do this Apache automatically runs when Windows loads. If you want to manually start Apache, then follow these instructions: 1. Go to Start > Run > Type services.msc 2. The Services windows opens up. Scroll down the list of services until you find the Apache service. 3. Right click on the Apache service and select Properties 4. Look for the Startup Type menu under the General tab (should be seletected). 5. Select Manual from the menu. 6. Click OK and close the services Window You can do the same for MySQL too, however look for the MySQL service in the list. When you restart Windows now. Apache (and MySQL if you changed its startup type too) should not load up. In order to load Apache up you'll need to do it by opening up the Apache Monitor (icon in the taskbar) oir by going to Start > Program Files > Apache HTTP Server <version here> > Control Apache Server > Start. However with MySQL you'll need to start it via the Command Line or use the mysqladmin tool in the bin directory of the MySQL installation folder. Another way is to download the free MySQL Administrator tool from mysql.com too.
-
You can scrap the following command in the .htaccess: [b]php_value error_reporting 8191 # E_ALL Error reporting[/b] I accidentally copied it in. More information about safe_mode can be found [url=http://uk.php.net/manual/en/features.safe-mode.php]here][/url] You may ask your questions related to .htaccess here
-
Please do not double post threads. You've already asked this, in this forum within a thread called [b] cOlouR mE thIs, coLOUr Me thAt <?>[/b].
-
remove the [code=php:0]exit();[/code] function after [code=php:0]echo "ACCESS DENIED";[/code] in your code.
-
PHP - MySQL - IIS XPP issue
wildteen88 replied to Ting's topic in PHP Installation and Configuration
Where is the location of the following file: libmysql.dll The above file should be located in the WINDOWS (or WINNT) folder if you have not added your PHP folder to the Windows PATH variable. PHP needs to find this file in order to load up the mysql(i) extension Also make sure there is no older version of libmysql.dll that PHP might be finding too. -
Not sure what the problem is as I can see the Add banner image fine in FF2
-
The only error I got when running it through my IDE is the following error: PHP Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:/Server/www/test.php on line 13 Which is to do with this: $sql="INSERT INTO 'users' ('id', 'ip_address', 'name') VALUES (NULL '$ip_address', [b]$_POST['name'][/b])"; You need to use $user as you have already setup a variable which stores the value of $_POST['name']. Also I suggest you use a function called mysql_real_escape_string on the $_POST['name'] variable to prevent SQL Injection attacks. So change [code=php:0]$user=$_POST['name']; [/code] to $user = mysql_real_escape_string($_POST['name']);[/code]
-
The include_path directive has nothing to do with it. The [b].:[/b] tells PHP to use a the current directory. However the colon is a separator. I suggest you read up on what's the include_path is for PHP is finding the file security.inc.php however from the error it is having trouble opening this file, most probably due to the permissions are set too low so PHP is not being allowed access to this file from the OS. Make sure security.inc.php CHMOD permissions is set to 644
-
You'll either have to set a temporary cookie which has a unique identifier which will be used by the send page to work out whether the user has visited the first one. Or use the $_SERVER['HTTP_REFERER'] variable to check whether tehy have come from the first page. However this is easily spoofed.
-
$HTTP_*_VARS are depreciated thats the only difference You should use the new superglobals. $HTTP_POST_VARS is $_POST $HTTP_GET_VARS is $_GET $HTTP_COOKIE_VARS is $_COOKIE etc. As of PHP5 they are turned off. To use these older style superglobals you'll need to turn a setting called register_long_arrays on. Otherwise just use the new shorter superglobals
-
You'd add the following: php_value error_reporting 8191 # E_ALL Error reporting php_flag display_errors On To the .htaccess in the www/ folder. This will apply to all subsequent folders below the www directory too. If you added it in the phpnuke folder (www/phpnuke/) it'll only affect the phpnuke folder and the subsequent folders below the phpnuke folder and not the folders in the www folder. You might be able to disable safe_mode too by adding [b]php_flag safe_mode Off[/b] to the .htaccess file too, however I don't think you can change safe modes setting from outside of the php.ini You can check whether the php_flags/values you have changed in the .htaccess file has made an affect by looking at the [b]Local Value[/b] column when running the phpinfo() function. So if display_errors is turned off in the php.ini and you turned it on in a .htaccess file you should find that the Local Value column will be set to On and the Global Value column will be set to Off when looking at the display_errors row. NOTE: You'll need to run the phpinfo() function in the directory in which you added the php_flag/value in the .htaccess file. As this is the nature of the .htaccess file, as quoted from apache: [quote=http://www.phpfreaks.com/forums/index.php/topic,113111.0.html].htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.[/quote] About the following: [quote]One other thing, the host replied with this email telling me how to turn ON display_errors [quote]Please insert the following line of code into the PHP files you wish to display errors on, including the code into a php file which is used for every page such as a header or config file. error_reporting(1);[/quote] ^If thats actually true and works, to which file(s) should I add that, www/phpnuke/index.php or all? I know its alot of questions sorry Smiley, and thanks for taking your time to reply. (BTW this is a great website I love it !)[/quote] Yes you can do that. However you'll need to add [code=php:0]error_reporting(1);[/code] in the main file that is used by phpnuke in order for it to work. It is no point in adding it to index.php as it'll show errors from index.php and nowwhere else. Thatsd why it is easier to turn display_error in the .htaccess file as then it is on through out your site.
-
Well blob (which is the same as text) can only store just over 65,500 characters which is about 63KB of text. However longtext allows you to store dramatically more characters just under 4.3 trillion characters! Have a look at this [url=http://www.ilovejackdaniels.com/mysql_cheat_sheet.png]MySQL Cheat Sheet[/url] to see what each data types holds. You'll probably want to use MEDIUMTEXT instead, which holds about 17 million characters, which is about 16MB. 1 character is a byte.
-
need help with this php code willing to pay .
wildteen88 replied to khan kaka's topic in Editor Help (PhpStorm, VS Code, etc)
A repeat region is a query and a while loop. I would recommend you to lean how to code in PHP and MySQL and don't use Dreamweaver to code it for you. If you want someone to it for you then post in the PHP Freelancing forum instead. -
Have a read of [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this FAQ Thread[/url]. It'll lak you through enabling the mysql(i) extension.