chrishea 182 Nearly a Posting Virtuoso

It doesn't necessarily have to be a choice. It only matters if you are using the email address to verify the account in which case you have use what they entered as an ID or provide another field for the email address. The other option is to allow them to login through Facebook, Google etc.

chrishea 182 Nearly a Posting Virtuoso

You can access an existing session using the session id.

This thread has more info:
Click Here

chrishea 182 Nearly a Posting Virtuoso

You need to protect the code from being viewed in its original text format and you need a licensing scheme to prevent the "encrypted" code from being copied to another server without permission.

ionCube provides both of these functions. This will make it virtually impossible for the average user to pirate your software. Keep in mind however; that no protection is absolute. All you can do is make it much more difficult for a dedicated hacker to break through / bypass the protection that you put in place.

Zend provides a similar protection facility for the code. Not sure if they also offer a licensing scheme. You may find other (cheaper) protection utilities out there but many of them merely "obfusticate" the code and can be easily reversed.

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

Have a look at this:
Click Here

chrishea 182 Nearly a Posting Virtuoso

If you want to get some help you need to provide more detailed info (usually including some code) and some info about how your environment is set up. You would normally provide the info on what you have already done to try to resolve this problem and then ask a question.

Do you have a valid MySQL user in your environement called 'nobody@localhost' or is this just a default user in the code that you are using? If it is a default in the code, then you need to change it to use a valid MySQL user ID (and password if there is one).

chrishea 182 Nearly a Posting Virtuoso

If you want to run PHP on your local machine you should install a LAMP package (usually called WAMP if it's on a Windows machine) that provides you with your own local server and supports MySQL (and usually SQLite) databases. PHP is part of the package but you also need a version of Apache and MySQL. I use a package called Uniform Server (Uniserver). There are quite a few others including WAMP and XAMPP. You just install the package, put your code in the right folder and you can be up and running without having to really understand the internal complexity of assembling an environment that works.

If you want to run PHP as if it was a desktop application (ie without any server environmentat all - even local), that isn't a common way to do it and there isn't much software available to support it. PHP is meant to be run using a server environment.

chrishea 182 Nearly a Posting Virtuoso

I have used the php-excel-reader quite successfully. I don't believe that it handles the newer formats (xlsx) so if that is required there are other tools available. You can also have a look at this.

baloch123 commented: Thanks +1
chrishea 182 Nearly a Posting Virtuoso

When I need to produce a PDF file, I use HTML2PDF. In this case it would require some extra work to read the Excel file and generate a report output in the format that you want in PDF. If you can get PHPExcel working it will probably be less work but if not, this is another way to do it.

chrishea 182 Nearly a Posting Virtuoso

It would be easy to have icons for the standard file types and display a "PDF icon" if it's a PDF file.

This thread addresses the rendering of a PDF file but it seems that you may need more than that. You will need the ability to preview a variety of file types (maybe more than PDF's and image files) and then you need to manage how the preview is shown (location and size). This thread covers some of that.

chrishea 182 Nearly a Posting Virtuoso

I don't know anything about vbs but I did manage to find an answer just by doing a bit of digging (http://www.php.net/manual/en/function.exec.php)

If you use the format:

exec('start /B "my_window" "vbs/hello.vbs"',$output,$return);

Then it opens the VBS in the background. My VBS program was just a MsgBox. If you want to open a proper window from the VBS or capture the output (try sleep in the PHP program), then you will probably have some further challenges that will require a bit of research / experimentation.

chrishea 182 Nearly a Posting Virtuoso

The Windows 7 Snipping Tool works jst fine.

chrishea 182 Nearly a Posting Virtuoso

Some info on diesel vs gas:

  • Fuel is much more expensive in Europe. Given the demand for diesel; in England, it isn't cheaper any more ($2.12/L for gas $2.24/L for diesel);
  • The UK has the seventh-highest petrol price and the second-highest diesel price in Europe. There may still be a price advantage for diesel in other countries.
  • US gas price is $3.35/gal ($.88/L). Diesel is $3.89/gal ($1.03/L).
  • Oil companies are exporting diesel from the US to Europe because they can get a higher price for it there.
  • Since oil is priced in US dollars the exchange rate makes a difference.
  • Chevy is selling a diesel version of the Cruise for 2014. Will probably not be a big seller because there is no real advantage.
chrishea 182 Nearly a Posting Virtuoso

I have 3 Camrys: A 2000 CE, a 2006 Solara SLE hardtop (2 door) and a 2010 Hybrid. I bought them all used. For the last two, I started out by looking at other cars (not Toyotas) but I ended up buying another Camry because the size, comfort and reliability was a fit for what I needed.

I am 6'4" and my younger son is a couple of inches taller. Headroom and legroom are key factors for me and a lot of cars get eliminated pretty quickly because of that. I tend to keep cars until they're ready for the scrap yard so long-term reliability is also very important. I haven't had a reason to regret buying Camrys. They don't have the pzazz of a BMW or Mercedes but if you give them regular maintenance, they just keep going and going. The Hybrid gives me 35mpg (up to 40 for highway driving with a bit of hypermiling) and despite all the extra technology, they have an excellent reliability record (as does the Prius).

Long answer to a short question!

chrishea 182 Nearly a Posting Virtuoso

Seems that I just had to do it the one time. It was a new install so I don't know why it was needed but it did the trick. Now I can log in and out as normal.

chrishea 182 Nearly a Posting Virtuoso

Clearing the cookies in Pale Moon fixed it. Seems to be a great browser.

chrishea 182 Nearly a Posting Virtuoso

I just installed Pale Moon a day or two ago and so far, no other issues. I just tried it again. I started on this page, clicked on Log In from the header. It took me to the login page. After I put in the info and clicked the button, it came back to this page but, of course, the login didn't take.

chrishea 182 Nearly a Posting Virtuoso

Through a process of elimination, I found that DCOMLaunch was being driven to about 20% of the CPU by daemonprocess.exe which is part of the MoboGenie System (All-in-one Android SmartPhone PC Manager) which I installed but haven't really used. Disabling that got my CPU usage back to the normal range.

I also saw cases yesterday where the Chrome browser was driving the CPU to 50% (also a known problem it seems). I started using the Pale Moon browser instead (it seems to be very efficient).

chrishea 182 Nearly a Posting Virtuoso

Tried logging in with the Pale Moon browser today (first time with Pale Moon). I used my Daniweb ID and PW and it immediately took me back to the home page with no error message. The ID and PW are the same as what I used to login in using Chrome (to post this message).

If you aren't familiar with Pale Moon, it is a customized version of Firefox / Mozilla that has been built to be very efficient (and it seems to be). I am starting to use it because of a high CPU problem I am having with Chrome.

chrishea 182 Nearly a Posting Virtuoso

I made great progress this morning in resolving a number of problems that were plaguing my Win7 laptop. It was difficult to find good info about how to resolve these problems. I can provide more details if anyone needs them. Here are the bare bones:

  • High CPU
    There are a number of common programs that churn the CPU. These are known problems but the Software companies don't seem to care.
    CONDUIT Search Protect
    From what I've read, this is almost like a virus. Softronic Download service has an agreement with them and include this in their 'Express' downloads. If you have it in your system, you will probably see Conduit as the default search engine in Internet Explorer. The 'Search Protect' process runs constantly and drives WmiPrvSE to very high levels of CPU.
    AVG Identity Protection
    If you use the free AVG Virus Protection (or the paid version) then Identity Protection is included. There is a known problem with the AVGIdsAgent module using high CPU. I didn't notice this happening before but this morning I could see it spiking up to 40-50% at times. I had to use Safe Mode to disable it.

  • Dead USB Ports
    I found that my USB ports would work when I first started the machine but after a while, if I tried to use one, it wouldn't respond. There is an option for the (USB) devices to allow Power Management to disable the device to save power. This was turned on …

chrishea 182 Nearly a Posting Virtuoso

Why?

One of the benefits of Paypal for the user and for the developer is that your website doesn't have to collect sensitive credit card info. You are giving a user two reasons not to buy whatever you are selling:

  1. Having to enter the info twice
  2. Giving up the confidentiality of the credit card info that Paypal provides.

If you want to collect this sort of info, you need a secure (https) connection with the appropriate certificate. If you are storing the info then you need controls on access to it (possibly including some encryption). You would also need to do everything possible to make your site hacker-proof. Why do this when you can leave all of this to Paypal?

chrishea 182 Nearly a Posting Virtuoso

Sounds a lot like a homework question. If so, then you need to do your own homework.

chrishea 182 Nearly a Posting Virtuoso

It's easy enough to set a flag (by user) in the database to indicate that the email has been sent. The more important issue is: Can this set of conditions occur again, necessitating a further email? If so, there has to be some sort of reset process to end the first occurrence and set everything back to "Normal" and unset the flag. Otherwise you have the opposite problem and you'll never send another email after the first.

chrishea 182 Nearly a Posting Virtuoso

If all you want to do is to strengthen the login process by sending them a code that they can use as part of their login, then after they do the normal ID and PW entry, generate a random code and send it via SMS. Display a screen (from PHP) where they can enter the code and once they enter it (and you verify it) you're done.

Many Carriers provide an email address format where you can send an SMS message. To do it that way, you need to know the carrier for each user and the format that they use. In North America, all Carriers do this and there is no extra charge. If that is not the case in your country, you can use a paid service. This may be provided by your phone company or by a separate organization like Twillio. In that case, they provide you with an API and all you need to have is the phone number that you wish to send to.

chrishea 182 Nearly a Posting Virtuoso

Apprenticeships seem to be fairly common in the UK but not in North America, at least not any more. I went through a company programming school many years ago not long after I got started in the IT business. I don't think there are many companies (at least in North America) that do that sort of thing anymore.

I think that many of the comments that you saw in this thread (including mine) are quite true if you are in the US or Canada. Since you are in the UK, it appears that you have some apprenticeship options. Looking up "IT apprenticeship program UK" provides links to quite a few companies with such programs.

chrishea 182 Nearly a Posting Virtuoso

If you are "just" a good programmer and need to have other people to give you the specs for what needs to be done (and want a steady paycheck), then you need to get a job working for someone else and that will be an uphill battle without any sort of formal qualifications. Having a college / university degree/diploma provides a potential employer with some assurance that you've learned at least some basics. It also demonstrates that you finish what you start, have a certain amount (or maybe a lot) of intelligence, can meet deadlines for assignments, can communicate adequately and so forth. If you can't provide this third party stamp of approval, then you are asking the employer to evaluate all of these things based on an interview and maybe some limited evidence that you can show him/her. In many / most cases, the employer can't be bothered trying to figure out if you can really do the job without that third party validation. The fact that you believe you can do it doesn't count for too much.

For the limited number of employers who might be prepared to give you a chance, you will need to be able to demonstrate the range of skills that they are looking for. It isn't just about coding and learning languages. You might even end up taking a job where there is no coding (e.g. doing system testing). They will want to have a good feeling for your business skills and people …

chrishea 182 Nearly a Posting Virtuoso

I've tried quite a bit of this using different tools. In my experience, Autoit is the best tool to use. This is a PC-based Basic languauge so if you need a web-based solution then this won't work for you. It uses the COM interface to Internet Explorer and it's capable of doing almost anything in terms of logins, navigation, form-filling etc. Other solutions that I tried didn't work with sites based on Javascript. Autoit sits outside the Internet environment and acts like an automated user so it does work with Javascript-based sites. If you need to have the data that you extract on a server then the last step can be an automated upload (you may have to add some code to the server to support it).

chrishea 182 Nearly a Posting Virtuoso

If you Google it, you will find lots of lists for the S&P 500.
http://lmgtfy.com/?q=stock+market+list+of+companies+s%26p+500+by+sector

Some of these (like the Yahoo one) are by sector. You will need to screen scrape to get the list into a file. I didn't see a list that you can purchase (as a file) but that's probably out there if you look hard enough.I'm sure that you can find info on any publicly traded stock if you search for it.

chrishea 182 Nearly a Posting Virtuoso

Try changing line 16 to use == in the comparison and see if that makes a difference.

chrishea 182 Nearly a Posting Virtuoso

The rebels are allied with Al Qaeda and very anti-US. They are probably worse than Assad. They are being strongly supported by Saudi Arabia who would like to get the US involved as well. This is no-win for the US (except maybe the arms companies who like to have the US at war with someone).

There are some claims that the rebels have used chemical weapons supplied by Saudi Arabia. If both sides were using chemical weapons, then who do you bomb? In reality, it seems like more of a pretext for involvement than anything else. It is estimated that there have been about 100,000 casualties so far. When you're dead you're dead. How much does it really matter whether it is from gas, a bullet or a bomb, especially if you are an innocent civilian.

chrishea 182 Nearly a Posting Virtuoso

It's brighter and busier than before. Initial gut reaction was that I like it better than the previous version.

As mentioned previously, it isn't mobile friendly. Had a look on my Samsung Galaxy S2. It doesn't scale down to the size of the screen (should probably have a viewport parm for mobile users). Couldn't get the drop-down menus to work. When you open a post / "article" the menu goes to 2 lines. That and the purple header occupy almost half the vertical height of the screen (when viewing on the long side) and, of course, they don't scroll up so you end up using only half the height when reading anything.

Overall, on PC pretty good. On phone, needs work.

chrishea 182 Nearly a Posting Virtuoso

If you look carefully you will see that you have an opening double quote before the Select on line 6 but there is no closing double quote on line 7.

Errors in PHP often point to the first symptom of an error rather than the specfic cause. You have to work backwards on the preceding line(s) to look for missing quotes, brackets, braces or semi-colons. PHP is looking for a match for an opening (,{,[,",' and only recognizes that it has an error when it finds some sort of illogical situation. In this case, it finds another double quote on line 9 followed immediately by the 'Y' but recognizes that this can't be the closing double-quote for the preceding line so that's when it reports an error. There are probably good reasons why the error message isn't more direct but the result is a fairly obtuse indication of an error. This sometimes makes the finding of the actual error a bit challenging, especially if the code isn't clean and simple.

BadManSam commented: Thank You +1
chrishea 182 Nearly a Posting Virtuoso

Attachments require the file name and a type as in:

$m->Attach( "files/file1.jpg", "image/jpeg" ) ;
$m->Attach( "files/file2.jpg", "image/jpeg" )

Use multiple attach statements for as many files as you want to attach.

chrishea 182 Nearly a Posting Virtuoso

You can certainly roll your own (including attachments) any time you want to send an email but why bother? You just include the module, add half a dozen lines of code to your program and you're done (for the whole thing not just the attachments). Are you that concerned about minimizing the size of your module at the expense of your own time? How much time have you already spent doing the code, doing the post and so forth? How much time will you need the next time you need to do some email code in a year or two?

When I first started doing PHP, I tried to do email code with attachments from scratch and I found it hard to get the attachment part working. That's when I went looking for an easier alternative. I didn't write this module (I did make a few changes) but it solved my problem. I no longer waste any time working on email code, it just works. As recently as last night, I had a need to send some emails from a system that I am writing and I just added Libmail and the job was done. I also have to send some text messages so I will use something that I wrote before as the basis for that. You don't need a Framework to be efficient (contrary to he impression some people have) but you do need a library of stuff that you can use so you can avoid re-inventing the …

chrishea 182 Nearly a Posting Virtuoso

I use a module called Libmail. It works for me every time.
[Click Here]

chrishea 182 Nearly a Posting Virtuoso

I wrote something a bit similar to this and it is still in production use. It logs in to a site, navigates to a specific page extracts data and then uploads that data to another site (sending the data to a custom PHP program that updates a mysql database). For the login, the user entered the ID ad PW the first time and then the program saved them to an encrypted file (which the program has to decrypt so it isn't highly secure). The program could have been written to require the ID and PW every time if security of the info was a bigger deal. I did give the user the program to run and that mostly worked for a while but it is a little bit fragile so I ended up taking it back and now I run it for the user. It is getting less fragile as time goes on because I add more defensive code as I run into issues.

It seems that you could give the user a program to extact the data / html and then upload it over a secure connection to a server file. This would require the user to enter the login information every time. You would probably need to have login authority for a while as you develop it (and they might need some special procedure to monitor the usage). If you are going to have access to the extracted (sensitive) data then they will still need to have some …

chrishea 182 Nearly a Posting Virtuoso

From "Read this Before Posting a Question" (abbreviated):
* Engage your brain!
* Search the PHP manual.
* Search the forum.
* Search the web.

chrishea 182 Nearly a Posting Virtuoso

I've been watching this thread and I'm still not sure that I understand why this is a problem (but I may be missing something). If you can assemble the information into an html table (and put that into a variable), it's easy to create a CSV file. Unless you have a massive amount of data, it shouldn't be a problem reading it from your db tables and creating an html table for the data.

I created an include module a while back that can be used to generate a number of different file types, including CSV. The module is quite simple and it's more of a demo of how easy it is. It includes some example code to use it. You can find it here.

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

Here is a short list of packages that can be used to install a LAMP stack on your PC (if you are running Windows). I could only find this list in the internet archive as it has been deleted from Wikipedia.

Any one of these should pretty quickly get you to the point of seeing "Hello World" in your browser.

Click Here

chrishea 182 Nearly a Posting Virtuoso

Are you trying to send emails from a local test server or from a proper "production" server. A local test server isn't normally set up to allow sending of emails.

chrishea 182 Nearly a Posting Virtuoso

Do an error check (check the return) on each of the MySQL functions. One of the previous ones is failing.

chrishea 182 Nearly a Posting Virtuoso

I am also a Chrome user. One of the reasons that I started using it was because my laptop has a relatively small screen size (1366x768) and Chrome is pretty minimal in terms of toolbars and so forth. It is one of the newest browsers and it has good HTML5 and CSS3 support. Initially, there were some sites that wouldn't work properly in Chrome (so I had to use IE) but I haven't seen any of that recently. It runs pretty fast (especialy at startup) compared to IE or Firefox.

As a developer I have done quite a bit of work using Chrome windows from Windows programs. You can configure the window pretty well using Chrome parms and display urls or your own output.

For a long time, I used Slimbrowser (which uses IE facilities in Windows). I don't like using the native IE as a browser and I like it even less when I'm building a website and having problems with making it compatable with IE. As a developer, I have used the underlying Windows facilities to automate the navigation through websites and screen scraping (using Autoit) and that part works well.

chrishea 182 Nearly a Posting Virtuoso

I had one pop up a few minutes ago for a year old message.

chrishea 182 Nearly a Posting Virtuoso

This is called debugging and it's a skill that you need to learn if you are going to write code. The simplistic version would be to insert a few (extra) echo's into your code so you can follow the path of what it is doing. You will no-doubt find by doing this that it isn't following the path that you expected. Once you understand why it is doing this, you can make changes and try again.

chrishea 182 Nearly a Posting Virtuoso

If other users sent emails classified as spam from justhost, then the spam filters may have blocked some/all of their IPs. You should read about spam filtering and you'll understand more about what the spam filters look for and what you need to do to avoid them. There isn't a silver bullet for this and you shouldn't expect that everything will get through. There are things that you can do to minimize the problem. You can start with this:
Click Here

chrishea 182 Nearly a Posting Virtuoso

If you understand how an interpreted language works, that's what it does whether it's a local test environment or on the server. The interpreter takes each line of code in your (PHP) program, parses it and then acts on the action words and data elements in that line.

Most of the servers are running a version of Linux/Unix but you don't need to know a lot about Linux in order to set up a site on a linux server and run your code. The same applies to running a local test environment. You do the install, you put your code into the designated directory within that environment and then you run the start procedure for the package. When you do this, you will actually have a local standalone version of the LAMP stack (Linux, Apache, MySQL and PHP).

PHP is generally run from the original source but there are some options to create "byte-code" and run from that instead. This isn't compiled code, it is a half-way measure. It does provide some protection for your code if you are selling it. Zend and IonCube both sell facilities that do this. IonCube also provides an online pay-as-you-go version as well.

chrishea 182 Nearly a Posting Virtuoso

This explanation is a few years old but th basics haven't changed:
Click Here

There are many packaged Lamp stacks that you can install on your local PC to use for development and testing. This provides a list of the ones you can use for a Windows environment:
Click Here

chrishea 182 Nearly a Posting Virtuoso

I have worn glasses since I was 10 or 12 years old so for me that's normal. What I resisted for a long time was getting hearing aids. Loud music and genetics seriously reduced my mid and high frequency hearing. Getting hearing aids seemed like something that old people do so I didn't deal with it. About 1 1/2 years ago, I decided that it was something that I had to do. What I found out was the hearing aids helped to stabilize the hearing that I do have, gave me back an almost normal ability to hear people speak, watch TV etc and they are barely noticeable. Despite my advancing years, I'm now back in a band. I couldn't have done that without the hearing aids because the music was just getting too muddy. To stay young, I've also joined the fitness center and use it regularly. Thinking young and staying active is much better than the alternative.