How to debug ERR_CONNECTION_TIMED_OUT - php

I am trying to build a site which saves a (checkbox) value using PHP to a txtfile. And everything worked fine. However, I'm rearranging the files on the server in order to make it easier later to create more.
I think I rewrote the path's to the files right (including fopen(_ DIR _ . 'pathname')), but when I'm changing the checkbox (which is a form that submits on-click) I get a "ERR_CONNECTION_TIMED_OUT" error and the site links to the error page of my host.
My question is, how can I debug this error? via console I can't find any errors and it's not giving me any information about missing links or files on the server.

Related

PrestaShopException.php ignore modifications

I'm trying to regenerate images for my shop in the backoffice but i get a ERROR 500 page without any stack trace or anything.
so i changed "_PS_MODE_DEV_" to true (and checked that's it's actually true in the code) but i still get the error500.html page content instead of the debug version with the stacktrace.
I tried wiping everything in 'PrestaShopException.php' but i still got the error500.html page content despite the fact that'PrestaShopException.php' is the only file using "error500.html" in its code in the entire prestashop project.
I need to get the stacktrace so i can debug. i don't have access to apache logs
I already deleted the cache folder but nothing changed, my modifications of 'PrestaShopException.php' are totally ignored and when i check the file on the server it's correctly modified..

Drupal not rendering page content

I'm trying to create a full backup of cyclekids.org. I've backed up all the files, dumped the database, and restored it on another machine (beta.cyclekids.org). However, Drupal doesn't seem to be rendering any page content on the backed-up site. Even pages that 404 on the regular site display the same mostly-blank template with a smattering of content.
What are likely culprits for this (e.g. misdirected theme file or broken config)?
There can be multiple reasons:
First, upload some simple php file containing only php info function (http://php.net/manual/en/function.phpinfo.php), call it and see is everything ok there with the server. I.e. do you have PHP enabled at all. Don't forget to delete that file when it starts working.
If you get php info output that means that php is working. So next problem could be that because of different server settings you are getting php error, but errors are not displayed.
Try finding in your control panel where php settings are and turn off on page error reports.
If you can't find it in control panel, try enabling error reporting from the code: add
error_reporting(E_ALL);
as first function in index.php file in site root.
Check how much memory PHP has available. Upload some php info file to working site and compare difference in their output.

Copied Joomla 1.5.12 across to new host server. Front End OK. Admin fails

I've been fishing through answers to similar problems, but none seem to address the issue we currently have. To sum up what has occurred this far:
Client has a website running joomla v1.5.12 (yeah, we know it's old...)
Site was very slow so upgraded hosting package to higher specs.
Took an FTP backup of the original site beforehand and then copied it accross.
Site works on the front end as normal. Sends emails and is both cosmetically and visually sound.
However, admin pages keep showing errors in the same vein as the following:
JFolder::folder: Path is not a folder
and
Warning: Invalid argument supplied for foreach() in \\**servername**\Domains\e\sitename.com-XXXnumbersXXX\user\htdocs\libraries\joomla\language\language.php on line 712
The errors keep popping up throughout portions of the admin side of things. Trying to add or edit any new articles results in a blank screen. Editing other modules results in the above foreach() errors. The foreach() functions are being passed filepaths, but I can't figure out their values (I'm not much of a PHP dev).
Why would the front end work without any problems and only the backend areas have an issue?
Any ideas of how I should go about troubleshooting this?
Many thanks in advance,
D
Whenever I have issues with a new Joomla install I check the following things:
Are file paths set correctly?
Are the file permissions correct?
Are the tmp and log folders writable?
Is the .htaccess file set correctly?
You can find the answers to the first three at the following location:
Joomla Admin Panel > Help > System Info
Hope that helps

search URL in not working on live

Iam developing a cart using opencart and I followed
SEO SEARCH URLS
for changing the result URL from top search form.And it worked perfectly on my localhost.But after I uploaded those files to live ,it is not working even it throughs me a error like
Fatal error: Cannot redeclare ControllerProductSearch::ajax() in /home/myopencart/public_html/vqmod/vqcache/vq2-catalog_controller_product_search.php on line 744.
Can anyone suggest me to get rid of this.
I'm assuming in ControllerProductSearch you have more then one function called ajax.
There might be a couple of different files called vq2-catalog_controller_product_search.php and the new site may be picking up a different version then what is intended because of differences in include paths. That may explain why it is working in one environment and not the other.
I noticed two that it is being pulled from a vqcache directory, could vqmod need a cache refresh.
To refresh the cache you simply delete the /vqmod/mods.cache file

Help with Clean URLs

I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.

Categories