Jump to content


  • Content count

  • Joined

  • Last visited

About Dredd2000

  • Rank
    Dedicated Member
  1. HTTPS won't display some of my graphics.

    Thanks Rallport, I've changed the base_url a number of times to different paths '/' being one of them, and none of them have worked. I'm going to have to check my server configuration to resolve this problem.
  2. Hello all, I've recently updated to HTTPS and I've found that my Ajax functions are not working. At first I got a CORS error message but I've managed to pick up a couple of lines of code from web forums that have had the same problem and the error message has changed to a 403 error message, (meaning that the file is forbidden), which is interesting as since upgrading to HTTPS my site sometimes can't find, or is not accessing some of my images and/or files. Therefore it might be my .htaccess file, (I used to have a basic .htaccess file when the site was HTTP but I've had to google .htaccess with HTTPS). Here's my .htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\. [OR] RewriteCond %{HTTP_HOST} ^mysite.com\.com$ [NC] RewriteRule ^ https://www.mysite.com%{REQUEST_URI} [R=301,L,NE] RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(/[^\ ]*)?\ HTTP/ RewriteRule ^index\.php(/(.*))?$ mysite.com/$2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] It's possible that this file is responsible for not allowing my site to access certain files and images. I've also added the snippet of my Ajax request here, (just in case there's something wrong with the function: $.ajax({ url: "/my_php_file/my_function", crossDomain: true, contentType: "application/x-www-form-urlencoded", xhrFields: { withCredentials: true }, headers: { 'Access-Control-Allow-Origin': '*' }, type: 'POST', async:false, data: data, success: function(msg) { alert('success'); } }); I've tried adding the following and/or changing the following lines of code but it still doesn't work: url: "/my_php_file/my_function/", url: "https://www.mysite.com/my_php_file/my_function", dataType: 'jsonp', dataType: 'json', dataType: 'html', The above lines are code I've added, (they've not been added all together), but it's just so everyone knows what different permutations I've tried. It's a good possibility that it's the .htaccess file as some of my images and files don't work, or both so can anyone can help out on both or either? Thanks in advance.
  3. Sorry guys! Can't see the wood for the trees! Simply change the line in the config.php file to: $config['base_url'] = 'https://yourdomain.com/'; After getting the new SSL certificate!
  4. Hello all, I've upgraded my site to https using this snippet of code in my config.php file, (CodeIgniter 2.2). $root=(isset($_SERVER['HTTPS']) ? "https://" :"http://".$_SERVER['HTTP_HOST']); $root.= str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']); $config['base_url'] = $root; The code works fine, however, I had to delete all of my base_url() and site_url() functions and change them to a simple backslash. It's a large site so it took my a while to do. Does anyone know if there's a way to change your site to https without having an effect on your sit_url and base_url functions? Thanks in advance.
  5. HTTPS won't display some of my graphics.

    Hi Nock, Thanks for the reply but that's not the case. The src is https://, but I'll try the // and see if that works.
  6. Hello all, I'm having a problem with my CodeIgniter project. I updated my site to http using codeigniter, (not by changing the .htaccess file). The HTTPS is fine, the little green padlock is showing next to my URL, however, some of my graphics are not showing as well and my ckeditor is no longer working. Everything was fine before the change to HTTPS. I've tried absolute and relative paths to my files, but some of them don't work, while others, that use the same path are working. Does anyone know what is causing this? Do I need to change a few lines of code in my .htaccess file? Or do I need to get a new SSL certificate? (I got my last SSL certifiacte a couple of weeks ago, before I changed to HTTPS). Any help please? Thanks in advance.
  7. Hello all, I'm currently working on a project using php 5.5.12 and SOAP and I've found an interesting discrepency. If you use the following code below the framework will throw an exception stating that it cannot find the file, (even though it is there: use Zend\Soap\AutoDiscover; However, when you change the line to the code below: require 'Zend\Soap\AutoDiscover.php'; The file is found and everything works fine. I was wondering is there a line in the php.ini file or anyother file in wamp that allows you to use the 'use Zend\Soap\AutoDiscover;' method over the 'require' method? Thanks in advance
  8. Setting up laravel with Homestead on WAMP

    Thanks, I'm new to Laravel and I simply read a couple of installation tutorials and it didn't say there was a choice. I've tried just using composer and wamp but it still isn't working. I've found out that my version of wamp doesn't recvognise my new version of php, (even though the new version of php it is being displayed on my wamp dasboard when I type phpinfo() it's still displays the older version). And as Laravel needs php5.5 and higher it must be that. I'm going to fix my version of wamp instead. Thanks for the reply, you've both saved me a lot of time.
  9. Hello all, I'm trying to install PHP5.6.9 on my wamp 2.2 as the old version of php does not support magento or laravel. I've copied the new php folder inside the php folder stored inside wamp and changed the php.ini to include: the extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" and the zend_extension = "c:/wamp/bin/php/php5.6.29/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll" I've also changed the .httpd.conf to include: LoadModule php5_module "c:/wamp/bin/php/php5.6.29/php5apache2_2.dll" I also copied the phpForApache.ini and changed that extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" Although I had to copy the phpapache2_2.dll from my older version as the new version did not include it and restarted wamp. When I clicked on the wamp icon and checked the version, I found two versions, the old and the new. By clicking on the new version wamp restarted and the new version was checked. I typed in phpinfo(); to check if the new version worked and found that the page stated php5.3.8 was running. I checked the wamp again and the version php5.6.29 was still checked. Can anyone help? Thanks in advance.
  10. Hello all, I'm new to Laravel and I'm trying to set it up with my WAMP server. I've downloaded composer and vagrant as well as homestead I've installed them using the cmd line and I've generated my private and public keys. When I get to the stage were I open homestead.yaml and type in where my 'virtualboxauthorize' , 'keys' and 'folders' are I can't seem to get it. I've updated the following: virtualboxauthorize: c:/Users/User/.homestead/id_rsa.pub The .homestead folder is located inside the 'User' folder. keys: - c:/Users/User/.homestead/id_rsa Again the .homestead folder is situated inside my 'User'. Although I have my key files saved using PuTTY Key generator application in a different place. Do I have to save them in a specific folder? folders: - map: c:/wamp/www/laravel/myproject/public to: /home/vagrant/Code Where the map points to the public folder where the index.php file is located on my wamp server. I've then typed in 'homestead up' in my cmd line and restarted my server but the line 'No input file specified.' is still present rather than the splash page. Can anyone help? Thanks in advance.
  11. Thanks. I've just inserted the explode function into my other function that outputs the table. You're right it works fine. I put the explode function into my foreach loop and it only read the first element as all I was reading was the first element, (line), but when I inserted it into my other function and typed var[0], var[1] and var[2] it works fine thanks.
  12. It doesn't work. I've even hard coded the 'John@yahoo.com:7:8.35' assigned to the variable to make sure it wasn't data from the file but all it does is get rid of anything after the ':' so all you get is the email address everything after it is ignored. Thanks anyway. I'm going to try a nested foreach and see if that works.
  13. Hello all, I'm currently converting text from a file and then converting it to an array to display in my browser. I can get the data from the file and using a foreach loop I can convert it into an array, however, I need to convert each word into an array. At the moment I can only convert each line into an array, this line needs to be split up into a name, number and price. For example here's some sample data: John@yahoo.com:7:8.35 Fred@hotmail.com:4:5.59 geoff@gmail.com:3:9.29 I can convert each line in an array but each element must be inserted into its own td inside a table. At the moment I can put each line into a table row but I need to split each element up to: <td>John@yahoo.com</td><td>7</td><td>8.35 at the moment my output is: <td>John@yahoo.com7:8.35</td> Here's a snippet of my code: function display_data($data) { $fh = fopen($data, "r") or die("Unable to open file!"); $content = fread($fh, filesize($data)); $assoc_array = array(); $my_array = explode("\n", $content); sort($my_array); foreach($my_array as $key => $value) { if(is_array($data)) { get_file($value); } elseif(is_object($data)) { get_file($value); } else { $tmp = explode(" ", $value); $tmp = str_replace(array("#",":")," ",$tmp); $assoc_array[$tmp[0]] = $tmp[0]; $this->display_array($assoc_array[$tmp[0]]); } } fclose($fh); } the display_array is simply another function that outputs the code into a table. I know it has to be a explode, preg_split or preg_replace but my reg expression isn't great. Any help? Thanks in advance.
  14. I was thinking of that last night. I may need to implement an event handler to fire when the user clicks on the accordian it'll automatically get the height of the child document and create the correct height for the iframe.
  15. Hello all, I've been googling for a couple of hours now and have tried a variety of code snippets and changed some snippets to suit my web page but none of them work. I need to change the height of my iframe to fit the content, (that changes dynamically). The other problem is that the iframe is embedded inside a jquery accordian. that is when you click on the button the accordian scrolls down to reveal the iframe. Therefore a window.onload will not work. the closest I've got is to reveal part of the content. Can anyone help? Thanks in advance.