Search the Community
Showing results for tags 'server'.
-
I want to backup mp3 files from a server folder to a local folder can this be done in php which is server side. I tried many scripts claiming to do this but all result in 'failed to open stream: No such file or directory' because the code is looking for the destination on the server, not the local directory. Here is an example that says it can be done. ini_set('display_errors',1); error_reporting(E_ALL); $source = "https://domain.com/2024-2021/path_to_file/test.mp3"; echo "src is ", $source; $destination = "C:/backup/2024-2021/Cpath_to_file/"; file_put_contents($destination, file_get_contents($source)); echo "OK"; This one also claims to 'force' the download $file = '/path/to/files/photo.jpg'; if (is_file($file)) { sendHeaders($file, 'image/jpeg', 'My picture.jpg'); $chunkSize = 1024 * 1024; $handle = fopen($file, 'rb'); while (!feof($handle)) { $buffer = fread($handle, $chunkSize); echo $buffer; ob_flush(); flush(); } fclose($handle); exit; } But has the same problem, in that it fails when opening the local folder to write the file, is there a way to do this?
-
So I have a code that is suppose to save form sessions and then redirect to another website. It does redirect but the sessions are never saved when I go back to my site. And yes, I do have session_start() at the very top of the page. And also, the sessions do get saved on locahost server but not live server. Do you know why this is happening? Here's the code example. if(isset($_POST['submit'])) { $name = trim($_POST['name']); $email = trim($_POST['email']); $_SESSION['name'] = $name; $_SESSION['email'] = $email; $errors = array(); $db->beginTransaction(); if(empty($name)) { $errors[] = 'Name is required.'; } if(empty($email)) { $errors[] = 'Email is required.'; } if(empty($errors)) { $db->commit(); $new_url = 'https://www.google.ca/'; ?> <script> window.location.href = '<?php echo $new_url; ?>'; </script> <?php exit(); } else { $db->rollBack(); } }
-
Hello! I know this seems like an easy task, using strval or casting to string, but the API I am using WON'T accept anything but a hard coded string "". I figure there has to be a way to get around this... What I have here is a method used to convert an array in to a YAML/String format for me to upload onto a server using JSONAPI, found here. I am using Spyc, as that is the only thing I have found that works for this, and it does pretty well. function pushArrayToServer($array, $api) { $yaml = Spyc::YAMLDump($array,4,60); $value = 0; while (strpos($yaml, "$value:") !== false) { $yaml = str_replace("$value:", "-", $yaml); $value = $value + 1; } $yaml = str_replace("---", "", $yaml); // Final YAML from Array var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", $yaml))); } Now the problem is that last $api->call I do. This call accepts the method type as a string(argument 1), and an array for argument two. For the method "files.write", the api requires an array being (file location, string). The string is what will be replacing the content of the file. But the only way I can get that line to work is if I do this: var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", "a string here"))); That works 100% fine, no errors. This is the dump I get when I run that. But as soon as I do one of these: var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", $yaml))); $yaml2 = $yaml . ""; var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", $yaml2))); var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", strval($yaml)))); var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", "$yaml2"))); var_dump($api->call("files.write", array("plugins/GroupManager/worlds/world/groups.yml", (string)$yaml))); These do not work. The dumps all return null. I haven't found a way yet to not do "". It almost worked once when I attempted some things, but I found out I was just converting a boolean into a string which caused an error. The server I am working with is a minecraft server with JSONAPi installed. It works great, except for this error. So I am assuming the string type has to be just like Java's, or pretty plain? I have no clue this is the first real issue I've had with this plugin. Thanks in advance, HeyAwesomePeople
-
when ever i login to my cpanel i saw this CPU usage0 , memory usage , process 0 i want to know how to add process ?? how to use it ? can i program it to do a talk in my absence ?
-
Hi, I have a login/register system based on this tutorial: http://pt.wikihow.com/Criar-um-Script-de-Login-Seguro-em-PHP-e-MySQL In my localhost everything works fine. When I uploaded it to godaddy servers, I can register the new user but I cannot login into the users' pages. It looks like password or salt does not match, or after compare login data, it´s telling me the message: You don´t have permission to see this page, please login. Do you have any idea of what might be? Godaddy support told me they cannot help. They just fix their own services. Thanks in advance.
-
Hello guys, I was just wondering in what way large scale systems can run sites like Weebley in terms of using multiple servers. Is it just MySQL database linking and using lots of same specification servers or is it all done via clustering etc. I'm pretty new to this and we are currently only using one server but my employer asked me to research and look into it. Thanks,
- 1 reply
-
- server
- clustering
-
(and 3 more)
Tagged with:
-
hello dear linux-community if a server needs to meed some requirements - eg for installation wordpress and if the server needs to run eg see here: https://wordpress.org/about/requirements/ then i need to have a closer look at the apache2handler in the php-ini Apache Version Apache all the mentioned are listed in the php-info.file note: here are no mod_rewrite Apache module so what
-
Can I rely on the $_SERVER variable of HTTP_ACCEPT_LANGUAGE to get the language of the browser? I know that some browsers don't send things the same way, and even some servers may not use all variables. Is this the most common way to determine the user's language? Is there another or more preferred way? Thank you.
- 1 reply
-
- internationalization
- browser
-
(and 2 more)
Tagged with:
-
Hi Everyone. I need help. I need to find or make a software/page with the table which would allow multiple users to edit and put in values simultaneously. So, how i see it is that there is a table in front of several people, with certain data, e.g. different car names, and when one person puts a tick, as in to say, yes i want tht car (others will know the meaning), all the other users using the software or being on the page would instantaneously see that there is a tick next to this car for example, and beside the tick there would be an initial or a full name of the person who put the tick which would be filled in the cell automatically and all the users would be able to see it in realtime. Also an undo feature is good to have, in case a tick is put next to the wrong cell (e.g. car). I have tried using the Microsoft Excel to be shared by several users, however it proved itself to be inefficient as it cannot update realtime, the user has to save the document... Several of these tables might be needed, however, it would be handy if one person would create some similar table, they would be able to share it with other people for them all to use it simultaneously. Also if different people could have different colors assigned to them Something along the lines of: Please Help. I have very little knowledge in programming and php, have had some experience with html - if this helps at all...
- 3 replies
-
- programming
- server
-
(and 3 more)
Tagged with:
-
What's the best way to cache things on the server? I've found some SetEnv things but this all seems to be a single key/value. I'd like to cache an array of things that I can access later. Right now it's cached in $_SESSION which is fine, but still there's overhead on every first-time visitor to a site. Is there a way to add something to $_SERVER or elsewhere that ALL visitors to a website will ultimately be able to access? I guess I want something like web.config in C#, where the first time a page is visited, the "app starts", as it were, and those things are now in cache on the server. What's the best way to do this?
- 21 replies
-
Hi. I am trying to create a simple video file server. I finished the skeleton of it but when it came to creating the multitude of pages I realized that there could be an easier way to do it. I started out basically getting the folder names in the server then printing them on the page. <?php $dirs = glob("*", GLOB_ONLYDIR); echo '<ul>'; foreach($dirs as $dir) { $forbidden_folders = array("not4u", "ignore", Styles); $filename = str_replace($forbidden_folders, '', $dir); if (!empty($filename)) { echo '<li><a href="'.$dir.'">'.$dir.'</a></li>'; } } echo '</ul>' ?> Then I created in each of the folders with files a php file with this code: <?php function date_sort_desc($a, $b) { preg_match('/\w+ \d{4}/', $a, $matches_a); preg_match('/\w+ \d{4}/', $b, $matches_b); $timestamp_a = strtotime($matches_a[0]); $timestamp_b = strtotime($matches_b[0]); if ($timestamp_a == $timestamp_b) return 0; return $timestamp_a < $timestamp_b; } $files = array(); $dir = opendir('.'); while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..") and ($file != "index.php")) { $files[] = $file; } } natsort($files); $i = 0; foreach($files as $file) { $i++; $string = str_replace("TV Show Name S1 E$i - ", '' , $file); echo '<div><a href="../Discriptions/'.$file.'.php">'.basename($string, '.m4v').'</a></div><br>'; } ?> This opens up a php file with the same file name as the file to be played containing the episode's thumbnail and description. That file then contains a link pointing back to the real file. The problem here is that I'd have to make a new php file for every file in my collection. I'm wondering if there's somehow a way to simplify all of this.
-
Hey guys, So I making a basic website form to do CRUD operations on a database, and all of my components work, but I keep getting 500 - Internal server error on my index.php Heres my code: <?php require_once('config.php'); require_once('menu.php'); echo '<h1>View All Alien Interactions</h1>'; /* Start the table with the fields we want to display Remember $fields is now in config.php */ echo '<table> <tr>'; foreach($fields AS $label){ // th is a table header; the column's title or label. echo "<th>{$label}</th>"; } //Add the edit and delete columns at the end of the table echo '<th>Edit</th><th>Delete</th>'; echo '</tr>'; /* Select the fields we want, from all the rows The first line takes the array keys from our $fields array and implodes them, using backticks and commas. The end result will look like `first_name`, `last_name`, `phone_number`... The next line creates a SELECT query using that string. */ $fields_str = '`contact_id`, `'.implode(array_keys($fields), '`, `').'`'; $sql = "SELECT {$fields_str} FROM `aliens_abduction`"; foreach($dbh->query($sql) as $row) { echo '<tr>'; // Loop through the fields again to display them for this row. // Note: The tutorial originally contained an error here, this has been updated. foreach($fields AS $field=>$value){ // if the field is blank, we want to empty a blank space, otherwise the HTML won't work properly echo '<td>'.(isset($row[$field]) && strlen($row[$field]) ? $row[$field] : ' '.'</td>'); } echo '</tr>'; echo '<td><a href="edit.php?contact_id='.$row['contact_id'].'">Edit</a></td>'; echo '<td><a href="delete.php?contact_id='.$row['contact_id'].'">Delete</a></td>'; echo '</tr>'; echo '</table>'; ?> and heres my config.php code (idk if this is the root of the problem, i dummied out my credentials): <?php //Connect to the database $dbh = new PDO('mysql:host=xxxxxxxxx;dbname=db_demo', 'xxxxx', 'xxxxx'); //Set the default fetch mode to be an associative array. $dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); //Define the fields for our CRUD application $fields = array( 'first_name' => 'First Name', 'last_name' => 'Last Name', 'when_it_happened' => 'When it happened', 'how_many' => 'How many', 'alien_description' => 'Alien description', 'what_they_did' => 'What they did', 'fang_spotted' => 'Fang spotted', 'email' => 'Email' ); ?>
-
Hello, I'm having a bit of a problem with some code of mine. I need to save an image file however I'm not sure where I have gone wrong. So as a bit of background, in my public_html folder I have the 'Add News' file where the user will fill in a form and upload it to the database and a folder called 'news' where the images will be stored... the script to add the article (along with the image) is stored in a folder called functions. Okay so now for the code: This is the form to add the article: <form id="form" action="functions/newsadd.php" method="post"> <table class="input"> <tr><td>News Title</td><td><textarea name="title" cols="80" rows="1"></textarea></td></tr> <tr><td>Author</td><td><textarea name="author" cols="80" rows="1"></textarea></td></tr> <tr><td>Status</td><td><select name="stat"><option>Enabled</option><option>Disabled</option></select></td></tr> <tr><td>Snippet Text</td><td><textarea name="snip" cols="80" rows="6"></textarea></td></tr> <tr><td>News Story</td><td><textarea name="stry" cols="80" rows="15"></textarea></td></tr> <tr><td>Image</td><td><input type='file' name='file'></td></tr> <tr><td><input type="submit" value="submit"/></td></tr> </table> </form> AND this is the code stored in "functions/newsadd.php" <?php $t = $_POST['title']; $a = $_POST['author']; $st = $_POST['stat']; $sn = $_POST['snip']; $s = $_POST['stry']; $conn = mysqli_connect("blah" "blah "blah" "blah") or die ("Could not connect to database"); if(!is_uploaded_file($_FILES['file']['tmp_name'])) { $query = "INSERT INTO news (newstitle,newsauthor,newsdate,newsstatus,newssnippet,newsarticle) VALUES ('$t','$a',CURDATE(),'$st','$sn','$s')"; } else { if ($_FILES['file']['type'] != "image/gif" && $_FILES['file']['type'] != "image/jpeg" && $_FILES['file']['type'] != "image/jpg" && $_FILES['file']['type'] != "image/x-png" && $_FILES['file']['type'] != "image/png") { $query = "INSERT INTO news (newstitle,newsauthor,newsdate,newsstatus,newssnippet,newsarticle) VALUES ('$t','$a',CURDATE(),'$st','$sn','$s')"; } else { $finame = $_FILES["file"]["name"]; $result = move_uploaded_file($_FILES['file']['tmp_name'], "../news/$finame"); if ($result == 1) { $query = "INSERT INTO news (newstitle,newsauthor,newsdate,newsstatus,newssnippet,newsarticle,newsimage) VALUES ('$t','$a',CURDATE(),'$st','$sn','$s','$finame')"; } else { $query = "INSERT INTO news (newstitle,newsauthor,newsdate,newsstatus,newssnippet,newsarticle) VALUES ('$t','$a',CURDATE(),'$st','$sn','$s')"; } } } $result = mysqli_query($conn, $query); if($result){ echo "Entered data successfully"; echo "<BR />"; echo "click <a href='sitepath.php'>here</a> to return to News"; } else { echo "Oh No! Something has gone wrong and your article could not be uploaded"; echo "<BR />"; echo "click <a href='http://sitepath.php'>here</a> to return to News"; } mysqli_close($conn); ?> Now I am perfectly able to upload the information in the form into the database, that is fine. My problem is that I am unable to save an image to the server and I'm not sure where I have gone wrong. I know it has something to do with this part of the code: $finame = $_FILES["file"]["name"]; $result = move_uploaded_file($_FILES['file']['tmp_name'], "../news/$finame"); if ($result == 1) { $query = "INSERT INTO news (newstitle,newsauthor,newsdate,newsstatus,newssnippet,newsarticle,newsimage) VALUES ('$t','$a',CURDATE(),'$st','$sn','$s','$finame')"; } I am just unsure on what it is..... Any help would be appreciated, thanks
-
I've run into a few problems as I was following this guys tutorial to setup a registration, log-in, etc. into my website. - for references here is the tutorial that I was going through and the problem that I have encountered has occurred during the process at: http://youtu.be/740kEwoRPKk?t=15m20s As you can see in the 3rd image attached each one of my .php documents also have a notification bar on the top of the coding which entitles, "Dynamically-related files could not be resolved because the site definition is not correct for the server. Retry | Setup" I have my php files setup exactly as he has it only thing different then his is that I had to change my localhost to localhost:8080 due to a bump in the road that happened due to the fact that I have Skype on my computer which encounters a problem with the testing-server service I am using which is PhPMyAdmin The error that I am getting when I try to connect my database to my testing server is in the image attached. Please reply to this post as soon as possible so I can get this problem resolved asap! Take note that I am working on everything from Dreamweaver CC!! Also I have tried several variables for setting up the database 'MySQL server:' such as 'localhost' , 'localhost:8080' , 'localhost8080' , 'localhost' , etc. If you have any further questions you can reply to me on here or you can add me on skype as well! My skype name is: lowheartrate Thank you to all in advance!! ~Codi Bezouka-Smith 'PHP-Beginner' - screenshots of the other images that weren't uploaded - - http://prntscr.com/302xut - http://prntscr.com/302xz8 - http://prntscr.com/302y3f
- 6 replies
-
- testing server
- testing
-
(and 3 more)
Tagged with:
-
Hi There!! I am a newbie with cloud computing. I have been using AppFog for PHP, but they are reducing the services for free accounts. Do you know any other free cloud storage?? Thank you very much!
-
Can someone please help me with this. I'm pulling my hair out. I have manually uploaded videos via FTP into a folder on my website and I am trying to get a code that I can use with a button that will tell my database to update it with all the current files... then display the files on the page. Can anyone help? I have the database all set up and what I need to do is get is the movie name, upload date, and the file size into the database FROM the folder I have all the movies in. That way I can repull that information from the database back into the website and display it all. Currently I am displaying all the files in the folder onto a webpage and it's starting to get laggy and time consuming to load. Not to mention I have plans on using some sort of pagenation to help with load times. Let me know if anyone still doesn't understand my endgame here. I'm not sure I am exactly explaining this the right way. Joe
-
(As usual, this is a different type of question; if it's in the wrong forum please move it.) I own two domains: example.com and example.ru. These sites are essentially mirrors of each other but they provide better geo-awareness than having only one site. If I have files that I need to copy from example.com to example.ru on a semi-regular basis, how do I do this programmatically? Obviously I have the login credentials, nameservers, IP addresses, and whatever else of both servers. What's the code to accomplish this? I have not ever tried to send files from one server to another. It certainly would be better than FTPing the files down to a local machine and then FTPing back up to the other server. Thanks...
-
Hey guys! I'm new with this topic. Which is the better Continuous Integration Server for PHP? And, what are the better skills of this servers to be most important?
-
- continuos integration server
- continuos
-
(and 2 more)
Tagged with:
-
Hi, I have built an application in PHPRunner. Everything is ok except on my search facility. Normal Search works fine. However when ever I try to search by a specific column I get the error message: - ForbiddenYou don't have permission to access /pgcommission/tblworklistV2_list.php on this server. I have taken advice and read several forums etc and I am told it is due to File Permissions. I have tried every combination I can on both my _List.php and _search.php files for the respective Table but to no avail. Is there someone out there that can give me a fresh perspective on this and make suggestions? Many thanks desperate, Carl.
- 1 reply
-
- file permissions
- server
-
(and 1 more)
Tagged with:
-
Hi! I need some help because I'am new in php language. So, my problem is that when I load my page I got this: But I don't need all this staff, i only need the number from the int(). Please help me Thank you! index.php <html> <head> <title>PHP Test</title> </head> <?php require('JSONAPI.php'); $api = new JSONAPI("localhost", 20059, "szabi****", "jate****", ""); var_dump($api->call("getPlayerLimit")); var_dump($api->call("getPlayerCount")); ?> <html> JSONAPI.php <?php /** * A PHP class for access Minecraft servers that have Bukkit with the {@link http://github.com/alecgorge/JSONAPI JSONAPI} plugin installed. * * This class handles everything from key creation to URL creation to actually returning the decoded JSON as an associative array. * * @author Alec Gorge <alecgorge@gmail.com> * @version Alpha 5 * @link http://github.com/alecgorge/JSONAPI * @package JSONAPI * @since Alpha 5 */ class JSONAPI { public $host; public $port; public $username; public $password; private $urlFormats = array( "call" => "http://%s:%s/api/call?method=%s&args=%s&key=%s", "callMultiple" => "http://%s:%s/api/call-multiple?method=%s&args=%s&key=%s" ); /** * Creates a new JSONAPI instance. */ public function __construct ($host, $port, $uname, $pword) { $this->host = $host; $this->port = $port; $this->username = $uname; $this->password = $pword; if(!extension_loaded("cURL")) { throw new Exception("JSONAPI requires cURL extension in order to work."); } } /** * Generates the proper SHA256 based key from the given method suitable for use as the key GET parameter in a JSONAPI API call. * * @param string $method The name of the JSONAPI API method to generate the key for. * @return string The SHA256 key suitable for use as the key GET parameter in a JSONAPI API call. */ public function createKey($method) { if(is_array($method)) { $method = json_encode($method); } return hash('sha256', $this->username . $method . $this->password); } /** * Generates the proper URL for a standard API call the given method and arguments. * * @param string $method The name of the JSONAPI API method to generate the URL for. * @param array $args An array of arguments that are to be passed in the URL. * @return string A proper standard JSONAPI API call URL. Example: "http://localhost:20059/api/call?method=methodName&args=jsonEncodedArgsArray&key=validKey". */ public function makeURL($method, array $args) { return sprintf($this->urlFormats["call"], $this->host, $this->port, rawurlencode($method), rawurlencode(json_encode($args)), $this->createKey($method)); } /** * Generates the proper URL for a multiple API call the given method and arguments. * * @param array $methods An array of strings, where each string is the name of the JSONAPI API method to generate the URL for. * @param array $args An array of arrays, where each array contains the arguments that are to be passed in the URL. * @return string A proper multiple JSONAPI API call URL. Example: "http://localhost:20059/api/call-multiple?method=[methodName,methodName2]&args=jsonEncodedArrayOfArgsArrays&key=validKey". */ public function makeURLMultiple(array $methods, array $args) { return sprintf($this->urlFormats["callMultiple"], $this->host, $this->port, rawurlencode(json_encode($methods)), rawurlencode(json_encode($args)), $this->createKey($methods)); } /** * Calls the single given JSONAPI API method with the given args. * * @param string $method The name of the JSONAPI API method to call. * @param array $args An array of arguments that are to be passed. * @return array An associative array representing the JSON that was returned. */ public function call($method, array $args = array()) { if(is_array($method)) { return $this->callMultiple($method, $args); } $url = $this->makeURL($method, $args); return json_decode($this->curl($url), true); } private function curl($url) { $c = curl_init($url); curl_setopt($c, CURLOPT_PORT, $this->port); curl_setopt($c, CURLOPT_HEADER, false); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_TIMEOUT, 10); $result = curl_exec($c); curl_close($c); return $result; } /** * Calls the given JSONAPI API methods with the given args. * * @param array $methods An array strings, where each string is the name of a JSONAPI API method to call. * @param array $args An array of arrays of arguments that are to be passed. * @throws Exception When the length of the $methods array and the $args array are different, an exception is thrown. * @return array An array of associative arrays representing the JSON that was returned. */ public function callMultiple(array $methods, array $args = array()) { if(count($methods) !== count($args)) { throw new Exception("The length of the arrays \$methods and \$args are different! You need an array of arguments for each method!"); } $url = $this->makeURLMultiple($methods, $args); return json_decode($this->curl($url), true); } /** * The default function called if no one matched for JSONAPI. * * @param string $method The name of the JSONAPI API method to call. * @param array $params An array of arguments that are to be passed. * @return array An associative array representing the JSON that was returned. */ function __call($method, $params) { if(is_array($params)) { return $this->call($method, $params); } else { return $this->call($method, array($params)); } } } Configuration file on my server: ~~~~Link~~~~ If you need any other info, just say it
-
I am curious about server access. Lets say you buy a hosting service, can you manually decide which directories will be public and which will be off limits? Do public directories have to include views (templates)? Because in a lot of frameworks I see views in private directories. Can you block access via .htaccess and only allow users to browse certain pages? How do you prevent them from browsing your entire php app files? I know this is a lot of question but a simple overview about directory structure in apache servers will do, since I am building one.
-
I'm just trying to load some of the echoed results in to a txt file that I can use myself. I assumed that there should be a txt file in my server directory but no file has been created. What am I doing wrong? while ($blekr<=$blekko_count) { echo '<a href='.$Blekko[$blekr]['url'].'><h4>'.$Blekko[$blekr]['url_title'].'</h4></a>'; echo '<p>'.$Blekko[$blekr]['snippet'].'<p>'; echo '<b>'.$Blekko[$blekr]['engine'].'</b>'; $file = 'Blekko.txt'; file_put_contents($file, $Blekko[$blekr]['url'], FILE_APPEND); echo '<hr>'; $blekr++; } The echo statements run fine but no file anywhere to be found. There isn't anything said in the manual either ...
- 3 replies
-
- file_put_contents
- txt
-
(and 1 more)
Tagged with:
-
Hi all, Today I switched servers. I got a Hostgator Basic Dedicated server, and their migration team moved everything over for my website - including the MySQL database - from their congested shared servers to my new one. I went to my registrar and changed the DNS entries to point to the new private nameservers. Accessed the CPanel, saw the files, was able to modify them and see the changes at the url level. All looked good. Now, here's what's weird: SOME of the pages of my site run the MySQL queries just fine. Some do not. For example, I have a page called "kids rugs" that shows a few hundred rugs pulled straight from my database. Each shows the photo, the name, and the price. But when you click on an individual rug, and it takes you to the detail page? NO data of any kind is showed (no photo, no description, no price, etc...) The second page is running the same type of query as the first. It's a SELECT * FROM tbl_name WHERE category = 'rugs'. The table is the same, the database is the same, and the connection script is the same. But one page shows results from the inquiry where the other does not. There are lots of other pages on my site that refuse to run MySQL inquires as well. These were all inquiries that worked flawlessly on the old shared server, but don't work on the new dedicated one (both servers are Linux). My question is this: Do you think this has anything to do with DNS, non-propagation, etc? I'm tempted to say "oh, this will resolve itself in 24-48 hours", but then again, it doesn't make much sense that a MySQL query would connect and work correctly on one page, and not show any results on others. Any ideas? Thanks in advance for the help!
-
Hi, I recently got a Raspberry Pi to accompany me in my noob adventures through the learning of PHP. However i was wondering wether it would be possible to set my raspberry pi up such that it could run 24/7 as a server which parses php that i have written on other devices. E.g. so that i could write a plain php document on a computer without php or apache installed and then send that document to the pi. The pi would then display the code on a webpage as it was intented to be seen. This would be useful as it would allow me to code in school and on other devices without having to go through the effort of installing apache +python (i would therefor also appreciate being able to put the documents on the pi without being connected to a local network, e.g. on holiday in another country). If it is indeed possible to do such a thing i would hugely appreciate advice/a guide as to how i could go about doing it! Kind regards Nub Nub Alex
-
I am new to php (actually new to web programming). I do code in c++. I am writing a software that is to share the database with php page. My question is that can I connect to the custom database server(which i wrote in c++ instead of using mysql or something as such) that shares database with my application and that with php page too....suggestion and code snippet will be very useful....thanks in advance