2,113 Posted Topics
Re: Same here on: * Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 * Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0 I've seen this in many threads in the last few days. | |
Re: I had the same issue this morning (more or less when mattyd reported the problem), I was posting my reply in the PHP forum, the page reloaded but my post was not there. At that moment I thought I erroneously reloaded the page. It was a simple message with a … | |
![]() | Re: Not sure if this is related but there are transmission rates, if you send more than 150/200 mails in 15 minutes to the same domain you can get blacklisted. Each mail provider is different for limits and *sensibility*. A part that, if you're sending mails through Gmail SMTP you're limited … |
Re: Hi, from the command line check if the **oci8** module is loaded: php -r 'echo extension_loaded("oci8") ? "true":"false";'; You can also list all the modules loaded by using: php -m The PHP version used in command line is known as **CLI** version and the configuration of this is usually different … | |
Re: It can be done also at query level by using `dayofweek()`. Differently from PHP the range is `1-7`: 1 for sunday, 7 for saturday, for example: select * from images where dayofweek(created_at) NOT IN(1,7); Docs: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayofweek | |
Re: Can you explain better what you want to achieve? > I just want point relation between Word A, B, C to Z Are you referring to the signifier or to the meaning? | |
Re: Hi! If your current errors are the same of the above (Aug 2013) there are also few permissions errors, maybe Apache cannot write/read to those DBM files? | |
Re: Add `$` to `"dateQ"` otherwise you get `filename_dateQ.tar.Z` instead of the date & time string: tar xvf filename_"$dateQ".tar.Z | |
Re: The `pg_fetch_array()` function takes 3 arguments, not 2, so change it to: while ($filesrow = pg_fetch_array($movie_file_result, NULL, PGSQL_ASSOC)) Documentation: * http://www.php.net/manual/en/function.pg-fetch-array.php Bye! | |
Re: Check also HipHop: https://github.com/facebook/hhvm is used to convert PHP to C++ and speed up the execution of the code. | |
Re: The day of the month (`DOM`) refers to the `1-31` range, it does not consider when the job was created. There's a comment in **cron.c** source, extended in the **FEATURES** file that explains a bit how it works: >the dom/dow situation is odd. '* * 1,15 * Sun' will run … | |
Re: Please give us more information. If you can login through FTP/SSH then you should be able to edit the config file and you can change the value of `WP_SITEURL`, that should fix the problem: define( 'WP_SITEURL', 'http://domain.tld/wordpress' ); **Reference:** * http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29 If you cannot access in any way, then you … | |
Re: Hi, the `.htaccess` file is used for HTTP connections, not for FTP access. The article in LH talks about HTTP Authentication: when you open an URL it appears a prompt that asks for username and password, those specified in `.htpasswd`. If Apache is properly configured then the HTTP access will … | |
Re: Hi, I'm not sure if is this but: neither the `From:` header, nor the `Reply-To:` are correct email addresses. In the `From` header is missing the local part, i.e. the part that goes before `@`: "From: Bright-Tutors <bright-tutors.com> \n"; In the `Reply-To` the missing part is the top level domain, … | |
Re: You can use `preg_match()`, an example: <?php $string = "Decrypt the following random string: O2tsOGJeLj0saj07ODM1IQ=="; preg_match('/:\s(.*)/', $string, $match); print_r($match[1]); The pattern `/:\s(.*)/` searches the string after `:`, but you could also use `explode()`: $res = explode(':', $string); echo trim($res[1]); *Docs:* * http://php.net/preg_match * http://php.net/explode * http://php.net/trim ![]() | |
Re: Hi, you could use an external script and run it daily with cron job to set up a meta key in `wp_postmeta`, the name can be `post_of_the_day`, the value a Unix timestamp. An example: <?php # config $dbhost = 'localhost'; $dbname = 'database_name'; $dbuser = 'database_username'; $dbpass = 'database_password'; $pdo … | |
Re: Is the `dbms_output` enabled? If you run `show errors` do you get any information? | |
Re: Move the form opening and closing tags outside the **IF / ELSE** statements, currently: * when the user is not logged the form is not closed; * when the user is logged the opening tag is missing and for this reason is not submitted. You could also use a completly … | |
Re: Consider also the [PDO library](http://php.net/manual/en/book.pdo.php), it supports more databases: MySQLi is limited to MySQL and his forks, while PDO can query MySQL, Oracle, SQlite, PostgreSQL, MSSQL and others. That way you can change database without worrying about rewriting all the code with the specific extensions. | |
Re: To run these kind of events consider to use Gearman, Beanstalkd or other work queues: * http://gearman.org/ * http://kr.github.io/beanstalkd/ It enables you to perform parallel and background tasks in local or remote servers, and does not limit you to PHP, you can use Python or other supported languages. For example: … | |
Re: With `mysql_pconnect()` you can create temporary tables, these will not be destroyed when the script ends, because the connection will stay open, unless you don't use `mysql_close()` or you drop the table: * http://php.net/mysql_pconnect | |
Re: Interesting thread. In Yahoo mail when you set the password you are not allowed to use the characters included in the username, no matter if you're using only one of those characters and this check is case insensitive. But they still want at least an uppercase character. In my opinion … | |
Re: Change line `12` to: if ($redirect === true) { And change the single quotes with double quotes on line `13`: header("Location:$redirect_page"); Docs: http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing | |
| |
Re: This is the same request of your previous thread but with a different schema to match: * http://www.daniweb.com/web-development/php/threads/470445/help-with-this-scrap-please Probably you can apply my suggestion by changing the pattern in `preg_match()`. Also we still don't know the code of `cut_str()`, please refer [to my question](http://www.daniweb.com/web-development/php/threads/470445/help-with-this-scrap-please#post2052193) in the previous thread. If we … | |
Re: If this is not a production server, but only for testing, you can add your user to `www-data` **group**: usermod -a -G www-data apott If in this server there's another user added to the same `www-data` group he would have the ability to read or rewrite your code. The same … | |
Re: You have to enable the module, you can do this at compilation or by adding: extension=soap.so to the configuration file of PHP, usually there is a `conf.d` directory where you can create files with these instructions, for example in my machine is under `/etc/php5/apache2/conf.d/`, you create **soap.ini** with permissions and … | |
![]() | Re: There is a little typo at line `6`, the closing parenthesis is after the double quote, so it is outside the query expression. Change it with this: $wpdb->get_row("SELECT name FROM country WHERE parent IN (SELECT parent FROM country WHERE name == '$page_name')"); |
Re: The `cut_str()` is a user defined function, so if you want to use it you have to show us your code, otherwise use `preg_match_all()`, here's an example: function scrapit($data) { preg_match_all('/[<a[^>]*?>(.*)<\/a>/i', $data, $matches); if($matches === false || count($matches) == 0) return false; return implode(', ', $matches[1]); } To test it: … | |
Re: Check this: http://trends.builtwith.com/javascript/jQuery-UI According to their statistics there are about 6 million websites that use JQueryUI. | |
Re: Maybe I know what is happening, in the other thread I suggested you to create the table manually, maybe the one you created through PHPMyAdmin was `myisam` instead of a temporary table. This would explain why is not deleted. Drop it and then adjust the create query in your script, … | |
Re: Change the `IF` statement to: if($submit == 'submit' && strlen($service_name) > 0 && strlen($service_content) > 0) **@broj1** sorry, I didn't saw your answer, bye! | |
Re: **@Mohamed** don't worry about her, she's a spammer. Regarding your problem, try to change this: $result_selecttemptable = mysql_query( $query_selecttemptable,$dbhandle); $row_selecttemptable = mysql_fetch_array($result_selecttemptable, $dbhandle); while($row_selecttemptable = mysql_fetch_array($result_selecttemptable, $dbhandle)){ echo $row_selecttemptable or die mysql_error("Error"); } To: $result_selecttemptable = mysql_query($query_selecttemptable,$dbhandle) or die(mysql_error()); while($row_selecttemptable = mysql_fetch_array($result_selecttemptable)) { echo $row_selecttemptable['ArtistName']; } | |
Re: This happens because of the `X-Frame-Options` header, if the remote server uses a directive like this: Header always append X-Frame-Options SAMEORIGIN The browser will check and won't allow the iframes, unless you don't use a local script through Greasemonkey or Tampermonkey. It means your users should install it on their … | |
Re: It seems there's an extra space near the end of the filename, run the trim function against the $file variable: `$file = trim($file);` before populating the $sql variable. | |
Re: A small correction: you cannot compare booleans with integers, otherwise you get unexpected results. An example: $a['foo'] = FALSE; echo (int)$a['foo'] !== FALSE ? 'true':'false'; The problem here is given by `(int)`. The comparison will translate to `0 !== FALSE` which returns true instead of false, the same happens if … | |
Re: Start from the database, for example MySQL: when you enter something, if the table has a primary key and this is numeric and increments automatically, i.e.: id int(10) primary key autoincrement not null then you can use `last_insert_id()` to get the last data entered in the table. The above is … | |
Re: The first argument of `session_is_registered()` must be a string, in your case `myusername` is not a constant, it's a string, so add the quotes: if(session_is_registered('myusername')) In addition these functions will be removed from PHP 5.4, their use is highly discouraged: * http://www.php.net/manual/en/function.session-register.php * http://www.php.net/manual/en/function.session-is-registered.php | |
Re: The PDO connection takes 3 arguments: the first is used to set the kind of database `mysql:` then you set the **hostname** `host=` and the database name `dbname=`; the second argument is the username; and the last one is the password. All these values are strings, so use the quotes: … | |
Re: GO: package main func main() { print("hello world") } | |
Re: Multiple foreign keys are possible, show your create statements and the full error message. | |
Re: **Aside Note** Check CodeIgniter (CI) framework you can find an example of what you want to achieve, refer to their session library, here you can find the documentation: * http://ellislab.com/codeigniter/user-guide/libraries/sessions.html Basically they do what Lsmjudoka is suggesting, so you have to create a table like this one: CREATE TABLE IF … | |
Re: Ditto. I've lost ~50 posts (I was over 1500) and 28 points on reputation, but it's fine for me too. | |
Re: The problem is given by the double quotes inside the date function, you're breaking the quotes of the echoed string, if you escape them then it will print the line without executing the code. So, you can get the output by setting a variable and include it in the string: … | |
Re: The variable values, in this case, **must** be strings, so surround them with quotes: $dbhost = "sql.domain.tld"; $dbuser = "username"; $dbpass = "password"; The port value can be submitted as integer, so you can omit the quotes. Anyhow, by adding `mysql_error()` you should be able to see the error. Since … | |
Re: > the result is not where it suppse to show in the $content or the $ourput Its showing in the header of the template I'm not sure I've understood your request, it seems some code is missing. I suppose the view page above is not the template page but the … | |
Re: ## Regarding your script ## There are some variables that are not set, for example at line 10: $upload_path = $uploaddir; Where is the value of `$uploaddir`? At line 3, instead: $userfile = $_POST['user_profile_image']; You're expecting a value from POST, but in the form this input field is `file` type: … | |
Re: Who knows :) But I would hazard by saying no. Let's say new technologies could speed up the decryption, or they could find a flaw in the algorithm, or they could add an hidden backdoor into the new chips: once you change one of the components in your server, or … |
The End.