wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Using mod rewrite to move your site to PHP?
wildteen88 replied to kiowa_jackson's topic in PHP Coding Help
mod rewrite is nothing to do with PHP. If your .html files contain PHP code then your PHP code wont be parsed, unless your server is configured to parse .html files as PHP. If your server is not configured to parse .html files as PHP then you'll have to configure your server to do so, if you don't want to convert your .html files to .php files. What you might be able to do is add the following line to a .htaccess file within your websites root: AddType application/x-httpd-php .html If your host allows you to change the servers configuration via .htaccess then you should find your .html files are now being parsed by PHP. You can test this by creating a simple test html file with the following code: <?php phpinfo(); ?> When you run test.html you may find that you'll get a full of page of info about PHP's configuration/environment. If you don't then you'll need to convert your .html files to .php instead. -
php.exe Unabe to Locate Component
wildteen88 replied to rpjd's topic in PHP Installation and Configuration
Only enable a few extensions at a time don't enable every single extension. Some extensions listed within the php.ini rely upon external libraries for example php_mysql.dll requires a library called libmysql.dll which is located within PHP's installation folder (C:/Program Files/php). PHP doesn't check for these libraries where it has been installed. Instead it searches for these in key locations, these being within the C:/WINDOWS or C:/WINDOWS/SYSTEM32 folders or the Windows Registry or the Windows PATH environment variable. I always find it best to add PHP to the PATH. Rather than having to copy extensions/php libraries all over the place, doing so can cause problem when upgrading PHP. Adding PHP to PATH will allow PHP to access itself and so it can search for required libraries/files it'll need when starting up. You can readup on how to add PHP to the PATH here. You should not need to modify the include_path, the default setting should be ok. -
Got to Start > Run and type in services.msc there you should be able to setup Apache to startup when Windows does. If you cannot find the Apache service (Should be called Apache or Apache2) then you'll have to install the Apache service via the command line by reading this page of the manual.
-
[SOLVED] so many problems..
wildteen88 replied to acidglitter's topic in PHP Installation and Configuration
What are you using to install PHP, an AMP package like WAMP or are you installing PHP manually. How did you know PHP sessions wasn't working? Need more info in order to help you. -
You can install AMP (Apache PHP and MySQL) locally for testing PHP scripts. No need for a free/paid webhost for testing PHP. Look into WAMP for Windows or XAMPP for Windows, *nix or Mac
-
Works fine here. Try clearing the syncproductions cookie from your browser and retest your code. I dont think PHP automatically unserializes cookies.
-
I'd say you'll be better of serializing your cookie array. That way you can just setup an array of what you want your cookie to contain. Rather than having to setup a cookie for every item of your array.
-
If you want to convert newlines into HTML line breaks (<br />). Then use nl2br.
-
What datatype is the reservation_id column set to? I believe this error maybe to do with the datatype that column is set as, which by looking at the error its set to TINYINT. Change the datatype to INT for that column.
-
filter_sanitize_number_int is not actually a function within PHP. Instead it is a constant. This constant is used in conjunction with PHP's filter_* functions. edit: PFMaBiSmAd beat me
-
how do you call a javascript method within php code?
wildteen88 replied to sullyman's topic in PHP Coding Help
Yes you can do that. But PHP wont be calling the javascript code as such. -
Looks like all you need to do is group by the urser id column within the message table.
-
how do you call a javascript method within php code?
wildteen88 replied to sullyman's topic in PHP Coding Help
PHP cant call javascript. PHP and Javascript is ran at different intervals. PHP is parsed on the server side whereas JavaScript is parsed via the web broweser (client side). -
No you can just list them within your query, just separate your columns with a comma, eg: SELECT Username, col1, col2, col3 FROM userregistration WHERE UserID='$ReportedPlayer'
-
Don't select everything from the the userregistration table. If you are only want to return the Username then define just the Username column in your query rather than Select all (*) $GetUserName = mysql_query("SELECT Username FROM userregistration WHERE UserID='$ReportedPlayer'") or die(mysql_error());
-
Your arguments aren't wrapped in parenthesis () for your if statements.
-
Make sure that at the start of the line you're editing doest have a semi-colon. If it does PHP will ignore that line and thus your phpinfo wont update.
-
In the following block of code: foreach($cats as $categories) { echo "$categories"; echo "<br />"; $searchResult = "SELECT * FROM wp_posts JOIN wp_term_relationships on wp_posts.ID = wp_term_relationships.object_id JOIN wp_DLM_DOWNLOADS on wp_posts.ID = wp_DLM_DOWNLOADS.id WHERE wp_term_relationships.term_taxonomy_id = '$categories'"; } All you're doing there is defining $searchResult your query, however everytime PHP loops through the array ($cats) it will overwrite $searchResult and thus only the last checkbox will return a result from the database. You will have to run your query and get the result from that query from within the foreach loop.
-
That error normally means that somewhere in your script you have missed a closing curly bracket (}). You will have to go through your code manually making sure your braces {} or () all matchup
-
fopen does support urls only you have to enable allow_url_fopen within the php.ini As for quotes getting turned in to \" or \' then disable magic_quotes_gpc.
-
use urlencode instead, then urldecode when you get the data from the url.
-
Will PCI Express x16 work ona PCI Express x8 slot?
wildteen88 replied to samona's topic in Miscellaneous
You can always buy a riser card/converter like this. That will allow you to buy any x16 PCIe video card, however the bandwidth of the card will be limited to x8 speeds. -
phpmyadmin help for newbie
wildteen88 replied to louisesanders's topic in PHP Installation and Configuration
That is because louisesanders is installing PMA locally! She is not using a webhost. @louisesanders for installing PMA create a file called config.inc.php in the root of the PMA folder and add the following code to that file: <?php /* Servers configuration */ $i = 0; /* Server localhost (http) [1] */ $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['auth_type'] = 'http'; ?> Also edit your php.ini file and make sure you have enabled the display_errors directive and that the error_reporting directive is set to E_ALL. Another thing to do is make PHP log errors to a custom log file. To do this enable the log_errors directive and then find the following line: ; Log errors to specified file. Below that line you should find ;error_log = filename Remove the semi-colon ( at the start of that line and change filename to "C:/php_errors.log"; Save the php.ini and create a file called php_errors.log in your C: drive, Now restart IIS. Your new php configuration should now be loaded, you can always check this by running phpinfo(); Now try running PMA again. You should get a login box displayed. Enter your MySQL username/password (if you havn't setup a username/password for MySQL yet then use root as the username and leave the password field plank). You should now be logged into PMA. If any errors arise they should be displayed, if not check your php_errors.log file. -
How was the file created? Your text editor maybe the cause. Try creating it with just notepad. Note: When saving with notepad make sure you go to File > Save As... and that the File Type pull down menu is set to All Files and the Encoding is set to ANSI.
-
[SOLVED] List without repeating phonenumbers!!!!
wildteen88 replied to chanchelkumar's topic in PHP Coding Help
You'll want to use SELECT DISTINCT (half way down the page) or perhaps GROUP BY within your SQL query.