FIX: Url not accessible for DreamHost and others using custom php.ini

Last modified by kara on Thu, June 24, 2010 15:34
Source|Old Revisions  

This is an old revision of the document!


If you are not able to continue the installation and get stuck at “Url not accessible“ then follow this simple guide.\

As from what I have learned this happens basically when url get function is turned off. We need to turn it back on using custom php.ini \

PART A : For those who are hosting on wamp or any other simple hosting.\

Locate your php.ini, for wamp got to c:wampApache2bin. For any other hosting check with your host.\ Open your php.ini and search for allow_url_fopen\

Change\

  1. allow_url_fopen = off

to\

  1. allow_url_fopen = on

That’s it. Everything should be working.\

PART B : Exclusive for DreamHost hoster\

1. We need to get our original php.ini files. To do this we must have shell access.\ 2. Make a cgi-bin folder inside the root folder of your web.\ 3. Using shell access execute the following cmd to copy original php.ini file to new cgi-bin folder\

  1. cp /dh/cgi-system/php5.cgi /home/username /yourwebsite.com/cgi-bin/php.cgi
  2. cp /etc/php5/cgi/php.ini /home/username /yourwebsite.com/cgi-bin/php.ini

4. Go to the new cgi-bin folder and download php.ini using ftp\ 5. Edit the new php.ini\

Search for allow_url_fopen\

Change\

  1. allow_url_fopen = off

to\

  1. allow_url_fopen = on

6. Upload the new php.ini file\ 7. Also create a .htaccess file. Copy & paste the following, then save it in root folder or the folder where Magento is located.\

  1. AddHandler php-cgi .php
  2. Action php-cgi /cgi-bin/php.cgi

Note: .htaccess & cgi-bin folder should both exist in same folder level. It doesn’t matter if both are inside Magento’s folder. In that case the custom php.ini will only effect scripts that are executed below Magento folder.\

8. Now change the chmod for all\

.htaccess\ cgi-bin\ php.cgi\ php.ini\

to minimum 755\

9. To test it completely if everything is fine create a php file and upload it to root folder. Copy paste the following script.\

Thanks A.Piotrowski

  1. <?php
  2. $url = 'http://localhost:80/magento/';
  3. $checkRes = file_get_contents($url);
  4. echo $checkRes;
  5. ?>

Now when you open it it should open your Magento installation. If it does then everything is fine.\

8. For those who don’t have https cert please keep the following parameter in secure host.\ Port : 80\ Protocol : http \

Also DreamHost users please read this wiki. Its the same thing what I have mentioned above. http://wiki.dreamhost.com/Custom_PHP.ini\




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs