wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
what is the username when connecting to mysql
wildteen88 replied to skateme's topic in PHP Installation and Configuration
Is mypass the username? What is the code you are using to connect to mysql post it here: It should be like this: [code=php:0]$conn = mysql_connect('localhost', 'root', '') or die('Connection error:<br />' . mysql_error());[/code] If the root user doesn't work then you must of changed the password for it. You can rest the password however it is a little tricky and hard to explain. -
what is the username when connecting to mysql
wildteen88 replied to skateme's topic in PHP Installation and Configuration
try root as the username and leave the password blank This is the default account MySQL sets up when you install it. However you can change these during installation. -
Help needed with a mysqli_error() expecting a parameter :)
wildteen88 replied to Solarpitch's topic in PHP Coding Help
mysqli_error requirest the link identifier The identifier is the variable that holds the connection when you connected to mysql. I am guessing $mysql_connect is the variable that holds the identifier. SO use this instread: [code=php:0]$res = mysqli_query($mysql_connect, $sql) or die (mysqli_error($mysql_connect));[/code] -
[quote author=Demonic link=topic=118962.msg486581#msg486581 date=1166351038] When I test some of the scripts on my Os from the PHP manual site It seems that the \n doesn't work properly? So I have to use the [code]<br />[/code] is there a reason of this? [/quote] Are you running the script in the browser which outputs html with new line characters? Example: [code=php:0]<?php echo "hello \n world"; ?>[/code] When you view that in the browser you get 'hello world' instead. If you are then the browser will ignore these characters, however if you look in the source you'll see they are there. Instead you will need to use the html equivalent ([nobbc]<br />[/nobbc]) in order for a line break to appear on the page.
-
Turning regsiter_globals on will not "cure it". register_globals affects super global variables ($_POST, $_GET, $_SERVER etc). You should not turn this setting on. The message you are getting is a syntax issue, nothing will cure it from the settings in the php.ini, however you can get PHP to ignore notices by lowering the error_reporting level but this is not recommended. The only way to cure it is make the changes taith suggested.
-
displaying php MYSQL result row only with CSS, no tables
wildteen88 replied to ThunderAI's topic in CSS Help
What data are you showing? If it is some form of data such as unique hits your site gets then you can just use tables. Tables are fine to be used to display tabular data -but not for layouts of a website. However if you want to do it in divs then just use 8 divs, that all float left and have the same width. -
If you are tying to create a new user/change account privileges then you shouldn't use INSERT INTO Instead you use GRANT Also make sure you are running the FLUSH PRIVILEGES directly after too.
-
What editor are you using? Prehaps its a character encoding issue. Attach one of the files here so I can see what you mean.
-
Is your SMTP settings setup in the php.ini correctly? Also sometimes when you send email from the mail function it tends to get marked as spam so check out your junk/spam inbox.
-
If its on your computer then its no good there! I would recommend emailing your web host about this. Your host should have some sort of email server installed and PHP setup to use that server for emails. If your host has not setup an email server then you will need finds a third part SMTP email server - a good choice would be your ISP. You can setup the SMTP email server settings by using the following in a .htaccess file: [code]php_value SMTP 'smtp.my_isp.com' php_value smtp_port '25' php_value sendmail_from '[email protected]'[/code]
-
When you use associative arrays (arrays with strings as the keys) you [b][u]should[/u][/b] wrap them in quotes (as shown by taith) otherwise PHP will think you are using a constant.
-
GD Library: Problem with header
wildteen88 replied to georgepapa's topic in Editor Help (PhpStorm, VS Code, etc)
All the info is in the error message. You are getting that error because you have some sort of output on line 7 in Browse.php Post lines 4 - 10 here from Browse.php -
[SOLVED] Where to find a WAMP installer
wildteen88 replied to Lassie's topic in PHP Installation and Configuration
EasyPHP is a quite an old package. I prefer to manaully install Apache, PHP and MySQL rather than using a prebuilt package. Once you become more confident try to install AMP manually. However when I started PHP I started out using EasyPHP then moved on to installing AMP manually. -
You can get Apache, PHP, MySQL and PHPMyAdmin from the following: Apache - http://httpd.apache.org - download [url=http://www.mirror.ac.uk/mirror/ftp.apache.org/httpd/binaries/win32/apache_2.2.3-win32-x86-no_ssl.msi]apache_2.2.3-win32-x86-no_ssl.msi[/url] PHP - http://www.php.net - download [url=http://www.php.net/get/php-5.2.0-Win32.zip/from/a/mirror]PHP 5.2.0 zip package[/url] MySQL - http://www.mysql.com - download [url=http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-essential-5.0.27-win32.msi/from/pick]Windows Essentials (x86)[/url] PHPMyAdmin - http://www.phpmyadmin.net - download [url=http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-2.9.1.1-all-languages-utf-8-only.zip?download]phpMyAdmin 2.9.1.1.zip[/url] Zend Optimizer - http://www.zend.com - download [url=http://www.zend.com/products/zend_optimizer]link[/url] - optional I will explain each of these here: Apache - Apache is a http web server. PHP is a server side programming language and thus you need a server installed in order for your PHP scripts to be parsed. Apache is also the most popular open source http server to be used - nearly every website on the internet uses Apache! PHP - this is what you'll be coding in and so you'll need an interpreter to parse your PHP scripts. If you don't have this, your computer wont understand PHP code! PHP stands for PHP Hypertext Preprocessor MySQL - this an SQL database. Databases allow you to store information on the server. This information can then be used later on. MySQL is a very common database when creating dynamic websites phpMyAdmin - this a PHP script which allows you to manage your MySQL database from your website. Zend Optimizer is a free application that runs the files encoded by the Zend Guard, while enhancing the performance of PHP applications.
-
I now see it :) I have missed the solved button
-
[SOLVED] PHP Apache and MYSQL
wildteen88 replied to g19's topic in PHP Installation and Configuration
Look in your servers error logs file and see if there are any errors being logged, also I'd recommend you to turn on the display_errors in the php.ini - make sure you restart the server when do change this setting. When you tun on display_errors it will display the errors in your script on your screen. If you get any errors please post them here in full. -
Yep, I still don't see no Topic Solved button. :(
-
Umm... I dont see the Topic Solved buttom in any thread in the PHP Help forum. However I see it for threads in the Apache forum :/
-
Run phpinfo() function and look at the [b]Configuration File (php.ini) Path[/b] line. Is that the correct path to the php.ini you're editing?
-
If you can use .htaccess files then you may be able to disable register_globals by adding the following to a .htaccess file: [code]php_flag register_globals Off[/code] Preferably add it/create a .htaccess file in the document root (the folder you upload your files to). That way it will be disabled throughout your website. Note you will know if its disabled by looking at the local Value column when running phpinfo.
-
I believe your problem is due to the session.cookie_path You have it set to C:/tmp Change it so its set to / like so: [code]session.cookie_path = /[/code] Save the php.ini and restart the server. Your cookies should now work.