wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
I'm not sure myself but I think a 500 Internal Error message is caused when PHP is running as CGI.
-
When an error occurs within your code.
-
It does not suppress the error messages. It will display the errors during run time. When display_errors is not enabled (this is the setting which display the errors) you will either get a 500 Internal Error Message or a blank screen. When an error occurs they will be logged to the servers error log.
-
You need to configure PHP so the settings error_reporting is set to E_ALL and display_errors is set to On within the php.ini You can also enable these settings within your scripts(s) using error_reporting(E_ALL); ini_set('display_errors', 1);
-
Add the following lines at the start of your faction and chat PHP scripts error_reporting(E_ALL); ini_set('display_errors', 1); That should force any errors messages to be outputted to the browser.
-
Look at your server/site error log for why you are getting the internal server error.
-
Variables are not parsed within single quotes. Remove the quotes around the $userverf variable
-
Then use Divs. You'll can then position the divs using CSS.
-
You'd do this within the if statement. Change if(is_numeric($_POST['id']) To if(is_numeric($_POST['id'])) && ($_POST['id'] != '0' && $_POST['value'] != '0'))
-
There is no need for a loop. You can add the entered values into your $_SESSION['cart'] array like this <?php session_start(); // check that the form has been submited if (isset($_POST['submit'])) { // check that the entered id is a number if(is_numeric($_POST['id']) { // get the id number the user typed in $id = $_POST['id']; // get the value the user typed in $value = $_POST['value']; // use $id as the key // $value as the value. $_SESSION['cart'][$id] = $value; } } // output the contents of the $_SESSION array echo '<pre>' . print_r($_SESSION, true) . '</pre>'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form action="" method="post"> ID Number<input name="id" type="text" value=""><br> Value<input name="value" type="text" value=""><br> <input name="submit" type="submit" value="submit"> </form> </body> </html> For each id number you enter, it'll add it to the $_SESSION['cart'] array. The value will be tied to the id.
-
Sorry I meant to use the PATH_SEPERATOR constant ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . 'assets/lib/zend'); However that may not work either as assets/lib/zend is a relative path. You need to use a full system path. Prehaps use ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/zend');
-
Add the zend folder to your include_path. ini_set('include_path', ini_get('include_path') . DIRECTORY_SEPARATOR . 'full/path/to/your/zend/folder/here');
-
wamp issue-local host not working
wildteen88 replied to aprilpgb22's topic in PHP Installation and Configuration
Just open the hosts file in notepad and add the following to it. Type it in or copy 'n paste it 127.0.0.1 localhost That line is used to translate the localhost domain to its ipaddress (127.0.0.1). I've not used WAMP recently I guess the tray icon has changed. If its yellow then that indicates there is a problem. You may need to get help from the developers at wampserver.com -
wamp issue-local host not working
wildteen88 replied to aprilpgb22's topic in PHP Installation and Configuration
Does it work if you go to http://127.0.0.1/ If it does you will need to add 127.0.0.1 localhost To your hosts file (located in C:/Windows/system32/drivers/etc). Also make sure the wamp taskbar icon is a white semi-circle. This indicates wamp is running. If it is red or yellow then this indicates wamp is not running or has encountered an error. -
No, that is an absolute url. Its the same as your suggestion but without defining the website address.
-
or just start your urls with a / <link rel="shortcut icon" href="/innovationation1/commonResources/images/container/favicon.ico" />
-
Because <?php echo $_SERVER['DOCUMENT_ROOT']."/innovationation1/commonResources/images/container/favicon.ico"; ?> is returning a file system path. Not a url. Remove $_SERVER['DOCUMENT_ROOT'] from that code.
-
Have a look at the code examples in this post for producing multi column results
-
Cant create Array of Object with new operator
wildteen88 replied to anindya.roy's topic in PHP Coding Help
I don't think you can create a new instances of objects when defining your class properties. You have to do this within your constructor. namespace \Bft\Core\Util; Class ClassB { private $_obj = array(); function __construct() { $this->_obj = array( new \Bft\Core\Util\ClassA(1), new \Bft\Core\Util\ClassA(2), ); } } -
When linking to your css, javascript, image files etc. start the url path with a /. Otherwise the web browser will trying to load your files from http://website.com/modelinfo/model/ rather than http://website.com/. Example <link rel="stylesheet" href="/your/css/file.css" />
-
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=336056.0
-
Does the orignal url still work okay? (website.com/modelinfo.php?model=Model_Name)? But the url website.com/modelinfo/model/Model_Name/ doesn't? I have tested the rewrite rule and the code that creates the links. They both work fine for me.
-
Just did a google on the SforceEnterpriseClient class and came across this documentation. As the documentation showws you need to loop over the results ($responce) and convert the records into SObjects. $response = $client->query($query); foreach($response as $record) { $sObject = new SObject($record); // covert current record into SObject echo $sObject->Id; // get the id of the currect record }
-
Define what you mean by HTML sitemap. What are you wanting to 'map' in your database? Can you show an example of what you're trying to do.
-
When posting code please wrap it within or tags.