boompa
Members-
Posts
305 -
Joined
-
Last visited
-
Days Won
1
Everything posted by boompa
-
Well, you could test for the existence of the csv file before you try to open it to see if that's the issue. As mac_gyver intimated, you could also output an error if the fopen fails. That might narrow things down for you.
-
http://us3.php.net/manual/en/datetime.add.php
-
CodeIgniter has been all but abandoned; why the heck would you *move* to it?
-
Do you understand the huge security hole you've got here? There's absolutely nothing stopping someone from writing a node.js script that destroys your system.
-
file_exists() not finding file that DOES exist
boompa replied to stevieontario's topic in PHP Coding Help
My suggestion: Go to the /home/ubuntu/public_html directory. Type "ls -l" Copy the results here. Type "ps -ef | grep httpd" or "ps -ef | grep apache2" (whichever returns results) Copy the results here. -
file_exists() not finding file that DOES exist
boompa replied to stevieontario's topic in PHP Coding Help
What is the ownership and permissions of the myfolder directory? Does the user under which PHP/your web server is running have execute permissions on the myfolder directory? -
The end delimiter of a heredoc *must* start at the first column. Note the big red box in the documentation: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
-
Try adding #!/usr/bin/env php as the very first line of loaddata.php and ensure that the loaddata.php file is executable.
-
Undefined variable: db_hostname in C:\xampp\htdocs\
boompa replied to Ordinary_Shepp's topic in PHP Coding Help
If you were regularly using global variables in C++, you were doing that wrong too. -
Chances are these errors have always been there, but the update revealed them to you where they were hidden before. The first is because of this line: $noStormMessage .= "<table style='{$noMessageStyle}' cellpadding='0' cellspacing='0'>\n"; That's saying "concatenate the right side of the = with the existing string in the $noStormMessage variable". Problem is, there *is* no existing variable called $noStormMessage. Solution to that is not to use .= in that line, but just =. The other two are related and self-explanatory. You have no array variable defined called $stormTypesAry until *after* you're trying to use it. Move the definition of this variable before the attempt to use it.
-
The standard port for mysql is 3306, not 3036.
-
if ($url="http://www.myurl/dashboard.php") = is used to assign, == is used to compare.
-
You don't even have a mysql_num_rows() call in that code, but as always with this error, the answer is: Your query failed, and you never bothered to check. It's #6 is the README: PHP Resources & FAQs thread stuck at the top of the forum page: http://forums.phpfreaks.com/index.php?act=findpost&pid=1428660
-
The tutorial you're following is old and uses deprecated functions as well as a very poor database hashing mechanism. I suggest you take a look at this one: http://forums.devshed.com/php-faqs-stickies-167/program-basic-secure-login-system-using-php-mysql-891201.html
-
Well, instead of exec-ing cURL here: exec('C:\curl '.$_SERVER['HTTP_HOST'].':'.$port, $output); I would consider using PHP's cURL library.
-
Much easier to do this: <?php if(loggedin()){ ?> <div class="like-btn <?php if($like_count == 1){ echo "like-h";} ?>"><!-- Like --></div> <?php } ?>
-
I think your database is fundamentally flawed if you are storing make, model, and trim in one table. Each of those should be in a separate table related by foreign keys. This is how relational database systems such as MySQL are used correctly and efficiently. A make has many models A model has many trims
-
Basic Loop and Itterational Variable Question!
boompa replied to laraggg111's topic in PHP Coding Help
A web search reveals it's an question posed to developers applying for a position at Blue Fountain Media. Misspelling of "iterational" included. -
If you can post your C++ code, maybe I can see what you're doing wrong.
-
OMG, are you seriously storing people's credit card numbers??? AND THEIR CVV??? That is seriously, seriously wrong. Yes, it's called utter incompetence.
-
Creating a table in Database with php not working
boompa replied to justin7410's topic in PHP Coding Help
Yeah, that's a pretty broken schema design. First thing you need to do is revisit that, perhaps find a good relational database tutorial. I see people trying to use PHP to create and manipulate database schemas all the time, and unless you're using some sort of migration facility from a framework, it seems a bit of an exercise in futility. I have always written straight SQL scripts and fed them into the mysql command line client through stdin. transactions.sql DROP TABLE IF EXISTS `transactions`; CREATE TABLE `transactions` ( `transaction_id` varchar(11) NOT NULL, `name` varchar(255) character set latin1 default NULL, `price` varchar(255) character set latin1 default NULL, `transaction_date` DATETIME default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; $ mysql --database=mydatabase < transactions.sql Also, unless things have changed, MyISAM tables do not support foreign keys so using SET FOREIGN_KEY_CHECKS is useless. -
$length == $_POST["length"]; $height == $_POST["height"]; $radius == $_POST["radius"]; $sides == $_POST["sides"]; The == performs a comparison between the right and left sides of the double-equals, not an assignment of the right side to the left.
-
Amazon has many APIs. Which one are you using?
-
HTTP_POST_VARS was deprecated as of PHP 4.1.0, which was released in December of 2001. You should be using $_POST instead. If you're still using a version of PHP that old, you owe it to yourself to update!