wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
no mater what OS you use MySQL will store the the newline. It just when you send newline charactersw (\r\n, \r or \n) to a web browser it will just ignore them - They are still there but can only be viewed from source. In order to get the browser to display them you need to use the HTML line breaks (<br />). It best to use nl2br when getting data out of the database, not when inserting it into the database.
-
Mystery PHP.ini file and settings
wildteen88 replied to flanman's topic in PHP Installation and Configuration
Looks like the windows path variable is not set correctly if PHP cannoyt find the php.ini in C:\php. Did you restart your PC when you added PHP to the path? How did you set PHP in the Windows PATH variable? MAke sure when you added php to the oath you seperated the PHP's path with the last path listed with a semi-colon For example: C:/current/paths;/C:/PHP -
You should only specify a unit with a size that is greater than 0. You don't need to specify a unit if the size is 0 as 0px is the same as 0em, 1px is not the same as 1em.
-
Is the mambo folder just full of just files? What unzip software did you use to uncompress the zip.
-
I have mambo (v4.5.5) and database.php is in mambo/includes/ but common.php is mambo/installation/ From what I read from your post you say common.php and database.php are in the same folder, which is the mambo folder. You sure you moved files to the server correctly?
-
Apply the style to the table cell instead rather than the div/anchor. Give each table cell a different class name.
-
I see what you mean now. If you want to include a file that is outside of the directory you are in, say you are in mysite/folder1 and you want to include a file that is mysite/folder2 (different directory) then you will use ../ to go one higher in the directory tree. So to get the file that is in mysite/folder2 you'd use this: <?php include "../folder2/myfile.php"; ?> So to get a file that is out side of folder1 and mysite folders you'd use this instead: <?php include "../../myfile.php"; ?> So the first ../ is to go out of the folder1 directory then the secound ../ is to go out of the mysite directory. Hope that helps. You can of course use absolute paths as well rather than relative paths (what I just showed you). But relative paths are much shorter and cleaner to use.
-
If its a file stored in a remote location (different website) then you can however this will only work if safe_mode is off and allow_url_includes (or allow_url_fopen (depeding on the version of PHP you use) is enabled.
-
Judging from those errors you are not placing quotes around strings as indexes in your arrays. This is the correct way: $myArray['myIndex'] This is not *: $myArray[myIndex] * Unless you already have a constant defined called myIndex That is what this error means: When you don't place quotes around letters that are supposed to be strings PHP will assume you are using a constant (a constant is a bit like a variable except you cant change its value and you don't need the $ sign at the start). However PHP is smart to enough to correct you but will then give you a notice message - which what most of those errors are.
-
Would like help with line breaks and str_replace.
wildteen88 replied to Nuggit's topic in PHP Coding Help
If you want to convert line breaks to html line breaks then use nl2br()- It does it all for you. Also you should only run that code when you get it out of the database. Do not run this code when adding the data into the database. That way when you go to edit it later it wont duplicate the line breaks. Keep everything in its raw state when being stored in the database Only do the syntax formatting later on. Also note when posting html code in posts use the [nobbc][/nobbc] tags. I have edited your post with this addition. -
If you are on Windows go to php.net an download the zipped binaries (zip package) not the installer. Delete any existence of PHP on your computer before extracting the zip. Now extract the contents of the zip file to C:\php. PHP is installed. Now if you want to use mysql with PHP you will need to configure PHP to enable the mysql extension. Follow this FAQ to do so. Now all you need to do is configure your webserver software to enable PHP on the server. If you are using Apache I can help you. I cant help you if you have IIS as I have never used it.
-
apache/MySQL/php install in xp
wildteen88 replied to newbee's topic in PHP Installation and Configuration
Ok Apache is misconfigured, how have you configured Apache? Adding the following to the httpd.conf should be sufficient: LoadModule php5_module "C:/PHP/php5apache2_2.dll"; PHPIniDir "C:/WINDOWS" AddType application/x-httpd-php .php Note -- change C:/PHP to to the correct path to PHPs folder. Save the httpd.conf and restart Apache. -
Get rid of pre and use paragraph tags instead. Like so: <?php $infodate = date('l jS \of M. Y'); echo "<p>We are <b>$display_members</b> members strong<br />\n"; if($auth['displayname'] == "") { echo "</font>Welcome <font size=\"3\" face=\"Times\"><strong>Guest</strong> please <a href=\"register.php\">Register</a>\n"; } else { echo "you are logged in as <strong>".$auth['displayname']."</strong>"; } echo "</p>\n"; ?>
-
web page in php has no background color in firefox
wildteen88 replied to Visualanté's topic in PHP Coding Help
How are you applying the background? Using html bgcolor attribute or CSS background element? Need more info. Post some code too. -
apache/MySQL/php install in xp
wildteen88 replied to newbee's topic in PHP Installation and Configuration
Clear your browser cache or do a hard refresh (Ctrl + F5). If it still displays it works then opone up your httpd.conf and scroll to line 150 which should be this: DocumentRoot "path/to/document/root/here" Change path/to/document/root/here with what DocumentRoot is currently set to. What is it set to? -
Did you do http://mysite.com/df48/ NOTE: the ending forward slash at the end of the URL.
-
apache/MySQL/php install in xp
wildteen88 replied to newbee's topic in PHP Installation and Configuration
Remove index from the htdocs folder. Then go to http://localhost/ do you see your PHP file listed in the directory index? -
Try this as the rewrite rule: RewriteRule ([A-Z0-9]+)/$ index.php??=$1 [NC]
-
apache/MySQL/php install in xp
wildteen88 replied to newbee's topic in PHP Installation and Configuration
If you are getting 404 error then the php file cant be found by the server. Where are you putting the php file to? It should be placed in the document root (this is defined in the the httpd.conf) By default it will be something like this C:/Program Files/Apache Group/Apache2/htdocs). -
Help with assigning values to form options?
wildteen88 replied to PlugComputers's topic in PHP Coding Help
Not really AJAX. Just plain javascript. Best place to post this would be in the Javascript forum. -
[SOLVED] PHP and Apache issue
wildteen88 replied to TriZz's topic in PHP Installation and Configuration
What exact version of Apache are you using? If you are using version 2.0.x then use the php5apache2.dll Apache module when loading the module. If its version 2.2.x then use php5apache2_2.dll instead. You must use the correct module for the version of Apache you have installed Also don't move files that don't need to be moved. Only php5ts.dll, libmysql.dll and php.ini should be moved to the Windows folder -- unless you have added PHP to the PATH. No other files need to be moved. All extensions should stay in the extension folder (C:/php/ext). When enabling extensions in the php.ini make sure the extension_dir directive is set up to point to PHP's extension folder. -
Getting $_SESSION Variables to Work
wildteen88 replied to usafrmajor's topic in PHP Installation and Configuration
The default setting are fine. You cannot turn session on or off. They are part of PHP's core. When using sessions make sure your have session_start(); on the first line of each page that uses sessions and that your web browser accepts cookies. If you dont have session_start(); as the first line of each page that uses sessions your session variables will not transfer from page to page. Alss make sure you are not outputting anything before you call session_start either. This should work: <?php session_start(); $_SESSION['mySessVar'] = 'someValue']; ?> Session variable set! <a href="file2.php">Next page</a> <?php session_start(); echo $_SESSION['mySessVar']; // -- output: 'someValue' ?> -
PHP fails to load MySQL
wildteen88 replied to Daedelus's topic in PHP Installation and Configuration
The phpinfo you linked to shows MySQL is loaded. So what problem are you having? -
probably used mod_rewrite to do that. Nothing to do with PHP just the server.