wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
You have some form of output before you call session_start(). There must not be any form of output before you call session_start(). Looking at the error PHP has detected that output has started on line 2 in index.php and your session id is invalid. Post index.php here for use to look at. Make sure you post your code within code tags ( ).
-
You're best of reading your sites error log. godaddy should have a section set up for you to view your sites access/error logs. Internal Server Error 500 error messages writes the true error to the servers error log. Without knowing why you are getting the error I cant really help. However normally Internal Server Error 500 error messages are caused by server configuration issues. EDIT: Just noticed this line: $tipTypes = array(exhaust, suspension, engine); You should wrap strings within quotes, unless exhaust, suspension, and engine are constants: $tipTypes = array('exhaust', 'suspension', 'engine');
-
Your code is fine. It's just that PHP cannot call the function mysqli_connect. You need to enable the mysqli php extension in the php.ini (php_mysqli.dll) in order to use mysqli_* functions. The topic vbnullchar has linked you to will walk you through it.
-
If you script errors out when you use ' in your query then you are not escaping it. Always use mysql_real_escape_string when inserting data into the database. Never use raw data straight from the user.
-
Don't use @ for suppressing errors. If you are checking input variables (_GET, _POST, _COOKIE, _SESSION etc) values always use isset function and then check it's value. So instead of: if ( @$_SESSION['auth'] != "TRUE" ) Do: if ( isset($_SESSION['auth']) && $_SESSION['auth'] != "TRUE" ) @ should only be used as a last resort.
-
If you are storing PHP code in the database you'll need to eval it. Otherwise will treat the PHP code as plain text it wont process it. Be careful when using eval
-
In that case there is an error with the script. To see what the error is turn display_errors on and make sure error_reporting is set to E_ALL within the php.ini If you don't have access to the php.ini add the following two lines to the top of index.php: <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); // rest of code here for index.php ?> Re run index.php. If there is any errors PHP should display them to the screen.
-
We all do it! If you are on windows I'd recommend you to disable a setting a called Hide extensions for known file types in Folder Options (Open amny folder > Tools menu > Folder Options > View Tab). That way when you view files in Windows Explorer you'll see the full filename, eg: filename.doc and not just filename.
-
Just replace `".$this->ipsclass->DB->obj['sql_tbl_prefix']." with ibf_ then just copy the strings defined within double quotes (for example: $q[] = "COPY WHAT IS HERE"; ). Basically just drop everything that is PHP related when you have done that you're left with the SQL query which should be ready to be queried into MySQL. There you go: CREATE TABLE IF NOT EXISTS `ibf_ibspeak_messages` ( `id` bigint(20) NOT NULL auto_increment, `mid` mediumint( NOT NULL default '0', `date` int(10) NOT NULL default '0', `message` text NOT NULL, PRIMARY KEY (`id`) ); ALTER TABLE `ibf_groups` ADD `g_ibspeak_usesystem` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canview` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canshout` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_caneditown` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canedit` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_candeleteown` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_candelete` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canviewhistory` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_postsmilies` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_postbbcode` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_posthtml` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_noflood` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_members` ADD `ibspeak_isbanned` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canban` tinyint(1) NOT NULL default '0';
-
That should work fine. When you have / at the beginning of a file path it means root. / should tell Apache to request the file 'images/pic.gif' from the document root. There may be a configuration issue or Apache1.3.x doesn't support it. I'm not sure I'll have a look at the Apache documentation.
-
Have you restarted Apache so any changes you have made to httpd.conf (or the php.ini) can take affect. Also what files are listed when you go to http://localhost/ - if no files is listed and you get the 'It Works' message remove any files already in the htdocs directory. Reload http://localhost/ you should see all files/folders in the htdocs folder listed. Your httpd.conf configuration is fine. However for me I prefer to install Apache and PHP in C:/Server rather than the default installation path (C:/Program Files). This just helps to keep file paths short and simple.
-
New to PHP. Need Help
wildteen88 replied to sagardcoder's topic in PHP Installation and Configuration
What is S/W? To get started with PHP I encourage you to first install Apache (http server) and PHP. PHP is a server side language so requires a server, thus Apache. php.net has very good documentation for setting up PHP with Apache. Installing Apache and PHP on your computer you can can easily test and run your PHP scripts on your computer. Which allows you to develop offline so you don't need to be connected to the net to test your PHP files on your website. If you are going to be developing a web application that requires some form of database then I recommend installing MySQL. MySQL is one of the many database's PHP supports. It's also the most popular database to be used with PHP. -
Your post is a little confusing do you have WAMPServer package (wampserver.com) installed or separate installations of Apache, PHP and MySQL installed. When you say WAMP I think WAMPServer package.
-
Need abit more info to suggest something What is the script you are trying to install. What version of PHP does it require. What do you see when you right click > View Source (do you see PHP coding or nothing).
-
Trouble with phpMyAdmin (theme.class.php and theme_manager.class.php
wildteen88 replied to amnivi's topic in MySQL Help
OK so everything is working when you test it with PHP directly. So PHP is setup correctly just you are having problem getting phpMyAdmin to work. Could you post the two files here that you get errors with so I can have a look. Also what version of PHP and MySQL is your client running? -
You move it/save it in XAMPP's web folder which is C:/xampp/htdocs Then you go to http://locahost/ as thorpe suggests Alo XAMPP is a server. It installs Apache HTTP server on to your computer.
-
Trouble with phpMyAdmin (theme.class.php and theme_manager.class.php
wildteen88 replied to amnivi's topic in MySQL Help
Change : display_errors("1"); to: ini_set('display_errors', 'On'); Sorry I thought there was a function called display_errors -
Escape characters can only be used within double quotes. I'd change this line: $customer='"'.$row->fname.'","'.$row->lname.'","'.$row->address.'","'.$row->city.'","'.$row->state.'","'.$row->zip.'","'.$row->phone.'","'.$row->email.'" \r\n'; To this: $customer='"'.$row->fname.'","'.$row->lname.'","'.$row->address.'","'.$row->city.'","'.$row->state.'","'.$row->zip.'","'.$row->phone.'","'.$row->email.'"'; And change this line: if (fwrite($handle, $customer) === FALSE) { to this: if (fwrite($handle, $customer . "\r\n")=== FALSE) { EDIT: Brand beat me. I'd recommend Brands suggestion.
-
Where to download Dreamweaver MX 2004?
wildteen88 replied to anon's topic in Editor Help (PhpStorm, VS Code, etc)
You should be able to get it off adobes website site. I believe they do sell previous versions. Probably not MX 2004 but Dreamweaver 8 (this is not Dreameaver CS2). -
[SOLVED] How do you make a PHP file in WAMP?
wildteen88 replied to anon's topic in PHP Installation and Configuration
What editor are you using. -
[SOLVED] PHP CLI Windows Environment Variable?
wildteen88 replied to AbydosGater's topic in PHP Coding Help
You'll need to add the php folder to the Windows PATH variable Start > Control Panel > System > Advanced tab > Environment Variables Select the PATH from the system environment variables box and press edit button. Press the End key on your keyword now type ;C:/wamp/php; (NOTE: DO NOT DELETE ANYTHING THAT IS ALREADY SET) Click Ok on all remaining windows. Now restart Windows for Windows to apply the changes made. Open up a command prompt php should now be recognised. -
Have you enabled display_errors? display_errors is turned off by defualt. If it is not enabled no errors will be shown during runtime. Turn display_errors on and it should display errors. Get the following error: Fatal error: Cannot redeclare class test in C:\Server\www\class.test.php on line 3 I did what you suggested to do for reproducing the error. class.test.php is the file that has the same class code as the file that is including class.test.php
-
Only if display_errors is enabled in the php.ini You're best of adding the following two lines at the top of your page you wish to debug: <?php error_reporting(E_ALL); display_errors(1); // your code here ?>
-
Yes you use regular expressions within mod_rewrite. The regex syntax is the same as PHP's
-
[SOLVED] PHP Problems...
wildteen88 replied to xhitandrun's topic in PHP Installation and Configuration
You server is returning a 500 internal server error so I guess your server's configuration is not correct/has errors in it. Check your servers error log to see why you are getting a 500 Internal Server error. Do you get the same error if you use relative paths for includes, eg: include 'header.php'; instead of using an absolute path, eg: include 'http://www.octobernights.org/header.php';