• Welcome to RCTalk! 🚀

    Join the #1 RC community where hobbyists connect, share, and get expert advice on RC cars, trucks, boats, drones, and more!

    • Friendly & passionate RC enthusiasts
    • RC tips & troubleshooting
    • Buy, sell & trade RC gear
    • Share builds & upgrades

CGI, PHP, Perl

This site may earn a commission from merchant affiliate
links, including eBay, Amazon, and others.

dougc

RCTalk Addict
Messages
949
Reaction score
0
Points
0
Location
Taylor
RC Driving Style
Ok I Own a web site called phatlip.net. I am looking to install a counter that no one can see. I found this PHP script that is neat it can tell you the OS they use, IP address, and browser, ect... BUt I can't get it to work.. If someone can post a reply and recommend a better script or something. The error I am getting says

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Warning: Unknown: Failed opening 'F:/Apache/htdocs/count.php' for inclusion (include_path='.;C:\php5\pear') in Unknown on line 0

I run XP, Apache, Perl PHP and I dont know if My SQL is running right

Thanks even if you think you know what could be wrong please post
Also I have the count.php file in there and is not working ... as far as thee C:\php5\pear I have no Idea what that means because my php is installed on my F drive and it didnt ask me where it was installed.
 
Last edited:
doug,

Right up my alley, web programmer by trade.

First off - dump the whole counter idea. These fall under the same category as animated 'gifs, mouseovers, and under construction signs as "stupid web tricks." A page counter is an anonymous number that tells you nothing.

What you need to do is contact your provider and tell them you want access to web stats for your page. Every reputable provider has domain stats, and they are FREE. If your provider doesn't have them, get a new provider.

Stats break down your visits by month, day, hour, referrer, browser type, and tons of other details about your visitors thart tell you what is working for you and what isn't. The stats are almost as important as the page itself, get them, check them often, learn to understand them, and never manage a site without them.

You are probably already seeing how much better this is than "my domain has has 12345 visitors since XXX date." :D

But. To help you with your problem,
Failed opening 'F:/Apache/htdocs/count.php'

I'm confused most by this one line. I've never seen a Linux path like this, it loos more like a windows server path. Usually a linux path is like /var/www/htdocs/virtuals/domainname/file.php, and never preceded by an HD label. That's a windows thing. this is further confirmed by
No such file or directory in Unknown on line 0

meaning it tries to look for the file at F:/Apache/htdocs and can't find it.

If you have telnet/ssh, type whereis count.php at the command prompt. This will give the true path to your file. Or can run an environmntal variables script, put it in the same directory as the count.php file and run it, then look at the DOCUMENT_ROOT environment variable, that will be the path to your file.

If that's all good, it is likely to be a file permissions error, the count.php file needs to be executable, as in chmod 755 count.php.

this
include_path='.;C:\php5\pear')
Means that is what the system is pushing in @INC for included path envitronment varialbes and the file is not found in that path. To change it you have to push your path onto the @INC stack to make it run.

If you don't get anything I just said - run away now, run away fast, and don't look back. :D
 
rocknbil, doug is running Apache on his PC and using it as a web server. It's possible that it's a Windows "server" he's using, but we know it's a windows environment of some sort due to the paths.

doug, what rocknbil is talking about is related to web hosting. This is the best way to go for your site. Hosting the site off your broadband is slow, unsecure and unreliable. You will also lack the features available to you like the webstats rocknbil is talking about.

Anyway, putting all that aside, this is your problem:

as far as thee C:\php5\pear I have no Idea what that means because my php is installed on my F drive and

The Apache install probably assumes you will install php into C:\php This is where I have it on my little testing web server. The quick fix is to just copy and paste the php folder from the F: drive into the C: drive. The long fix means going into the Apache install and fixing the reference to C:\php and making it F:\php

have fun with it!
 
Doh! Sorry my telelpathic powers are running low today. :D

That being the case, webstats are indeed open source and you can install them on your local server but yeah . . . . running it locally is something I've never done.
 
Yea It is slow from my house but I can't afford 20$ a month yet... Plus since I have videos on my site I would have to get more bandwidth. Yes this is more of web stat than a web counter...I am just getting in to this whole web server thing, In school I am going to be taking the CIW test.

rocknbil, YOu said you are a web programmer? so you just get up the servers and your job is done intill they want a script or something else installed? I am looking at being a Web Designer but i dont even know where to start , If you could direct me in the right place it could help...

Thanks
Doug
 
No, that's actually a system admin's job.

I do design too, but it's a minor part of what I do, basically because **anyone** can do that, and most people are, for free. After they get into trouble . . that's when they come to me. :D

No most of my job is developing custom websites for customer applications. What I do is make sites that actually **do** something for the customer. I have about ten or twelve that are shopping-cart sites, the customer can go in add, edit, remove products, collect orders, it uploads pics and auto-sizes them bla bla . . another is a subscription site, the guy has a stocks newsletter (except he really DOES have good stocks info :D ) and he makes about 4K a month on it . . . 6 or 8 membership-based real estate sites including image uploads and whatnot . . . a few message boards . . . a lot of secure connection interface stuff . . . and lately an online writing lab for a college that won a national award. Of course, my name wasn't mentioned, I'm just one of the slaves that built the pyramid. But it was pretty cool anyway.

I write the programs that do all that stuff. From scratch. Hand coded. :D

If you want to get into web design? I've been doing it for about 8 years now. Here's the "real world view:"

It's a bitch.

Every day, someone's viewing your source code, looking for a chink in your armor, anything they can find to call up your boss and tell them why you're an idiot. You spend half your time trying to fend off everyone who seems to think your job is cool, and the other half keeping up with the technology. People don't want to pay you, but they want to call you up and suck up your time asking you stupid questions they're too lazy to figure out themselves so that they can do the job **without** paying you. You waste a lot of time dealing with customer issues that have nothing to do with you, for example, explaining to someone how the website you designed for them last week as nothing to do with why they are too stupid to get their email because they can't remember their password. Customers call up your boss and try to get you fired because you didn't drop everything RIGHT NOW to change the email address on their site, and the only reason they need THAT done is because they keep getting spammed from all the porn sites they visit.

Then there's the work. Hours and hours poring over your code, getting it all to work together, making it easy to understand for the visitor, to come up with a system that WORKS. The hard part is that 90% of your programming is spent writing error traps and figuring out all the possible ways a user can push the wrong button, refresh the wrong page, enter the wrong value into a form, or actually TRY to hack you just for no other purpose than to f**k up your day.

But if you come out the other side and it works, you throw all your best hack friends at it and they can't break it, it's worth it. My wife thinks I'm insane. She's prolly right. But you have to be passionate about what you do, or you doing the wrong thing.

If you **do** decide to get into web design - never ever EVER make the assumption that most "designers" do. They put together a pretty web template and let the "programmers" figure it out. This is VERY VERY BAD. Get an understanding of the tools behind your "skin" and design accordingly: FORM FOLLOWS FUNCTION. :D Never forget it.
 
Back
Top