Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.



Showing: 1-20 of 35    »»
Questions:
What causes an Error 400 when running php on IIS?
When installing php on IIS, you may get an Error 400 trying to run any php scripts.Edit php.ini and change...
Not rated 06/29/2009 Comments: 0
Function to handle string substitution in php?
This php function replaces any occurances of tags in a string with the corresponding hash value in the $_REQUEST hash.For...
rating 07/03/2009 Comments: 0
What causes array problems with php from one host to another?
Seems to be the Zend Optimizer causes this problem - you need to upgrade to the latest, 2.5.7 or higher...
Not rated 06/30/2009 Comments: 0
My php installation can't write to the Save Session Path - how do I fix it?
If you have access to your apache config file, look for the line: php_admin_value open_basedir "/blah/blah"   You can add the value...
Not rated 06/30/2009 Comments: 0
how can I output my php arrays in a readable html format using print_r?
I just use this simple function to wrap the call to print_r.  This displays your array in a good debugging...
Not rated 06/30/2009 Comments: 0
How can I get mysql table definitions in my php script?
This will dump all the tables and fields in your database, showing the field types, and other attributes.  Useful for...
Not rated 07/01/2009 Comments: 0
How can I execute commands on mysql using a php script?
Sometimes you want to just execute arbitrary mysql commands on a one time basis against a mysql database.  This little...
rating 07/02/2009 Comments: 0
How can I capture the contents of an included file?
Usually, when you include a file in Php, any output generated by that script is printed out directly.  However, if...
Not rated 06/30/2009 Comments: 0
How can I slash out a price to denote a sale price in html and php?
Well, the easiest way is to use the <strike> tag in html.  This put a line through your text like...
Not rated 06/30/2009 Comments: 0
php session id keeps changing on every reload - how can I fix this?
The symptom here is that every reload of a page, causes a new session id to be assigned.  This of...
rating 07/03/2009 Comments: 0
How can I get php errors to show in the browser?
When debugging php code, it is often useful to actually see any errors generated, especially mysql or object code errors. ...
Not rated 07/03/2009 Comments: 0
How can I keep leading zeros when building a CSV file?
Some data looks like a number on the surface, but really is not meant to be used that way. Zip...
rating 07/03/2009 Comments: 0
When I try adding text to images in php, the color does not match what I want. How can I fix this?
You can dynamically generate images in php using the GD library, and functions like imagecreatefrompng.  When trying to add text,...
Not rated 06/30/2009 Comments: 0
How can I get bounced emails from my email CGI or PHP script?
It seems that most cgi / php scripts that send email do not get bounces.  So you never know if...
Not rated 06/30/2009 Comments: 0
How can I modify a script that relies on register globals being turned on?
This is not recommened for security purposes, but here's a short bit of code to add at the top of...
Not rated 06/30/2009 Comments: 0
Configuring htmleditor to do file uploads using php?
To enable htmleditor to use php for file uploads, edit the following files: edit: htmleditor/editor/filemanager/upload/php/config.php Change this line: $Config['Enabled'] = true; edit: /htmleditor/fckconfig.js Change...
Not rated 06/30/2009 Comments: 0
How can I format my php print_r statements to be more readable in html?
Normally print_r spits out an array with out any html linebreaks, so in a web browser, it is hard to...
Not rated 07/01/2009 Comments: 0
How can I make a state drop down list for my forms?
Often times I need to stick a dropdown list of states into a form.  Rather than retype all 50 states,...
Not rated 06/30/2009 Comments: 0
Why doesn't ftp_connect work in my php script?
If you are trying to ftp to another server from your web server, one thing to be aware of is...
rating 09/06/2010 Comments: 0
How can I force my php scripts to run php5 ?
Some hosting providers are still using php 4 as their default for scripts, but offer php5 as well.  To force...
Not rated 09/06/2010 Comments: 0



Powered by KnowledgebasePublisher 1.1
Superb Internet
Content provided by Roberts WebForge, Inc.